@ovotech/element-native 4.2.0-canary-e1006e1-298 → 4.2.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.
Files changed (35) hide show
  1. package/dist/components/ActionCard/ActionCard.js +3 -23
  2. package/dist/components/ActionList/ActionList.d.ts +1 -2
  3. package/dist/components/ActionList/ActionList.js +4 -4
  4. package/dist/components/ActionList/styled.d.ts +0 -1
  5. package/dist/components/ActionList/styled.js +2 -2
  6. package/dist/components/CurrencyField/CurrencyField.d.ts +2 -2
  7. package/dist/components/CurrencyInput/CurrencyInput.d.ts +2 -2
  8. package/dist/components/EmailField/EmailField.d.ts +2 -2
  9. package/dist/components/EmailInput/EmailInput.d.ts +2 -2
  10. package/dist/components/FilterSelect/FilterSelect.js +1 -1
  11. package/dist/components/Input/Input.d.ts +2 -2
  12. package/dist/components/NavHeader/IconButton.d.ts +0 -2
  13. package/dist/components/NavHeader/IconButton.js +1 -1
  14. package/dist/components/NumberField/NumberField.d.ts +2 -2
  15. package/dist/components/NumberInput/NumberInput.d.ts +2 -2
  16. package/dist/components/PasswordField/PasswordField.d.ts +2 -2
  17. package/dist/components/PasswordInput/PasswordInput.d.ts +2 -2
  18. package/dist/components/PhoneField/PhoneField.d.ts +2 -2
  19. package/dist/components/PhoneInput/PhoneInput.d.ts +2 -2
  20. package/dist/components/SelectField/Select.js +1 -1
  21. package/dist/components/Strong/Strong.d.ts +1 -3
  22. package/dist/components/Strong/Strong.js +2 -2
  23. package/dist/components/TextField/TextField.d.ts +2 -2
  24. package/dist/components/TextInput/TextInput.d.ts +2 -2
  25. package/dist/components/TextareaField/TextareaField.d.ts +2 -2
  26. package/dist/components/TextareaInput/TextareaInput.d.ts +2 -2
  27. package/dist/esm/components/ActionCard/ActionCard.js +3 -23
  28. package/dist/esm/components/ActionList/ActionList.js +4 -4
  29. package/dist/esm/components/ActionList/styled.js +2 -2
  30. package/dist/esm/components/FilterSelect/FilterSelect.js +1 -1
  31. package/dist/esm/components/NavHeader/IconButton.js +1 -1
  32. package/dist/esm/components/SelectField/Select.js +1 -1
  33. package/dist/esm/components/Strong/Strong.js +2 -2
  34. package/dist/providers/types.d.ts +1 -1
  35. package/package.json +3 -3
@@ -1,15 +1,4 @@
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
- };
13
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
3
  if (k2 === undefined) k2 = k;
15
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -47,13 +36,7 @@ var __1 = require("../");
47
36
  var styled_native_1 = __importStar(require("../../styled.native"));
48
37
  var P_1 = require("../P");
49
38
  var IndicatorIconShape_1 = require("./IndicatorIconShape");
50
- var StyledPressableCard = styled_native_1.default.Pressable(function (_a) {
51
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, inline = _a.inline, inverted = _a.inverted, reducedBottomPadding = _a.reducedBottomPadding;
52
- var paddingVal = inline ? core.space[4] : core.space[6];
53
- var reducedBottomPaddingVal = inline ? core.space[3] : core.space[5];
54
- return "\n border-radius: ".concat(inline ? (0, element_core_1.numToPx)(core.space[6]) : 0, ";\n background-color: ").concat(inverted ? semantic.inverted.surface : semantic.surface.elevated, ";\n padding: ").concat((0, element_core_1.numToPx)(paddingVal), ";\n padding-bottom: ").concat((0, element_core_1.numToPx)(reducedBottomPadding ? reducedBottomPaddingVal : paddingVal), ";\n overflow: hidden;\n border-width: 0;\n width: 100%;\n ");
55
- });
56
- var StyledCard = styled_native_1.default.View(function (_a) {
39
+ var StyledCard = styled_native_1.default.Pressable(function (_a) {
57
40
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, inline = _a.inline, inverted = _a.inverted, reducedBottomPadding = _a.reducedBottomPadding;
58
41
  var paddingVal = inline ? core.space[4] : core.space[6];
59
42
  var reducedBottomPaddingVal = inline ? core.space[3] : core.space[5];
@@ -75,9 +58,6 @@ var ActionCard = function (_a) {
75
58
  var cardAction = hasSingleAction
76
59
  ? onPressActionButton || onPressIndicator
77
60
  : null;
78
- var RootContainer = hasSingleAction
79
- ? StyledPressableCard
80
- : StyledCard;
81
61
  (0, react_1.useEffect)(function () {
82
62
  if (onMount) {
83
63
  onMount();
@@ -86,7 +66,7 @@ var ActionCard = function (_a) {
86
66
  var Heading = inline ? __1.Heading3 : __1.Heading2;
87
67
  var cardPadding = core.space[inline ? 4 : 6];
88
68
  var negativeMarginAdjustment = -cardPadding;
89
- return ((0, jsx_runtime_1.jsxs)(RootContainer, __assign({}, (cardAction ? { onPress: cardAction } : {}), { inline: inline, inverted: inverted, reducedBottomPadding: Boolean(buttonTitle && !ctaVariant), testID: "".concat(testID, "-card"), accessibilityRole: cardAction ? 'button' : 'none', children: [(0, jsx_runtime_1.jsxs)(react_native_1.View, { style: { flexDirection: 'row' }, children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { style: { flex: 1 }, children: (0, jsx_runtime_1.jsxs)(__1.Stack, { spaceBetween: 2, children: [(0, jsx_runtime_1.jsx)(Heading, { style: {
69
+ return ((0, jsx_runtime_1.jsxs)(StyledCard, { onPress: cardAction, inline: inline, inverted: inverted, reducedBottomPadding: Boolean(buttonTitle && !ctaVariant), testID: "".concat(testID, "-card"), children: [(0, jsx_runtime_1.jsxs)(react_native_1.View, { style: { flexDirection: 'row' }, children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { style: { flex: 1 }, children: (0, jsx_runtime_1.jsxs)(__1.Stack, { spaceBetween: 2, children: [(0, jsx_runtime_1.jsx)(Heading, { style: {
90
70
  color: inverted
91
71
  ? semantic.inverted.message.link
92
72
  : semantic.message.branded,
@@ -126,6 +106,6 @@ var ActionCard = function (_a) {
126
106
  position: 'absolute',
127
107
  right: core.space[2],
128
108
  top: core.space[2],
129
- }, onPress: onPressCloseButton, testID: "".concat(testID, "-close-button"), children: (0, jsx_runtime_1.jsx)(CloseIconWrapper, { inverted: inverted, children: (0, jsx_runtime_1.jsx)(__1.Icon, { name: "cross", size: "16", color: semantic.message.base }) }) })) : null] })));
109
+ }, onPress: onPressCloseButton, testID: "".concat(testID, "-close-button"), children: (0, jsx_runtime_1.jsx)(CloseIconWrapper, { inverted: inverted, children: (0, jsx_runtime_1.jsx)(__1.Icon, { name: "cross", size: "16", color: semantic.message.base }) }) })) : null] }));
130
110
  };
131
111
  exports.ActionCard = ActionCard;
@@ -14,8 +14,7 @@ type ActionProps = PropsWithChildren<ViewProps & {
14
14
  ref?: Ref<View>;
15
15
  testID?: string;
16
16
  inList?: boolean;
17
- standalone?: boolean;
18
17
  }>;
19
18
  declare const ActionList: ({ children, inverted, ...rest }: ActionListProps) => JSX.Element;
20
- declare const Action: import("react").ForwardRefExoticComponent<Pick<ActionProps, "onPress" | "inverted" | "inline" | keyof ViewProps | "fullWidth" | "iconLeft" | "iconRight" | "standalone" | "inList"> & import("react").RefAttributes<View>>;
19
+ declare const Action: import("react").ForwardRefExoticComponent<Pick<ActionProps, "onPress" | "inverted" | "inline" | keyof ViewProps | "fullWidth" | "iconLeft" | "iconRight" | "inList"> & import("react").RefAttributes<View>>;
21
20
  export { ActionList, Action };
@@ -47,12 +47,12 @@ var ActionList = function (_a) {
47
47
  };
48
48
  exports.ActionList = ActionList;
49
49
  var ActionWrapper = (0, react_1.forwardRef)(function (_a, ref) {
50
- 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, _f = _a.standalone, standalone = _f === void 0 ? false : _f, rest = __rest(_a, ["children", "accessibilityRole", "activeOpacity", "fullWidth", "hasBorder", "inverted", "inline", "inList", "onPress", "testID", "standalone"]);
51
- 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, { hitSlop: inline ? 14 : null, activeOpacity: activeOpacity, accessible: true, accessibilityRole: accessibilityRole, onPress: onPress, children: (0, jsx_runtime_1.jsx)(styled_1.StyledActionInner, { fullWidth: fullWidth, inList: inList, inline: inline, standalone: standalone, children: children }) }) })));
50
+ 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"]);
51
+ 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, { hitSlop: inline ? 14 : null, activeOpacity: activeOpacity, accessible: true, accessibilityRole: accessibilityRole, onPress: onPress, children: (0, jsx_runtime_1.jsx)(styled_1.StyledActionInner, { fullWidth: fullWidth, inList: inList, inline: inline, children: children }) }) })));
52
52
  });
53
53
  var Action = (0, react_1.forwardRef)(function (_a, ref) {
54
- var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'link' : _b, children = _a.children, _c = _a.fullWidth, fullWidth = _c === void 0 ? false : _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, _f = _a.standalone, standalone = _f === void 0 ? false : _f, rest = __rest(_a, ["accessibilityRole", "children", "fullWidth", "inverted", "inline", "onPress", "testID", "iconLeft", "iconRight", "standalone"]);
54
+ var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'link' : _b, children = _a.children, _c = _a.fullWidth, fullWidth = _c === void 0 ? false : _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"]);
55
55
  var smallAndUp = (0, hooks_1.useBreakpoint)().smallAndUp;
56
- return ((0, jsx_runtime_1.jsxs)(ActionWrapper, __assign({ ref: ref, accessible: true, accessibilityRole: accessibilityRole, fullWidth: fullWidth, inverted: inverted, inline: inline, onPress: onPress, testID: testID, standalone: standalone }, rest, { children: [iconLeft ? ((0, jsx_runtime_1.jsx)(styled_1.StyledLeftIcon, { inverted: inverted, name: iconLeft, size: 16 })) : null, typeof children === 'string' ? ((0, jsx_runtime_1.jsx)(styled_1.StyledActionText, { smallAndUp: smallAndUp, inverted: inverted, inList: rest === null || rest === void 0 ? void 0 : rest.inList, children: children })) : ((0, jsx_runtime_1.jsx)(styled_1.StyledActionNodeWrapper, { children: children })), iconRight ? ((0, jsx_runtime_1.jsx)(styled_1.StyledRightIcon, { inverted: inverted, name: iconRight, size: 16 })) : null] })));
56
+ return ((0, jsx_runtime_1.jsxs)(ActionWrapper, __assign({ ref: ref, accessible: true, 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, typeof children === 'string' ? ((0, jsx_runtime_1.jsx)(styled_1.StyledActionText, { smallAndUp: smallAndUp, inverted: inverted, inList: rest === null || rest === void 0 ? void 0 : rest.inList, children: children })) : ((0, jsx_runtime_1.jsx)(styled_1.StyledActionNodeWrapper, { children: children })), iconRight ? ((0, jsx_runtime_1.jsx)(styled_1.StyledRightIcon, { inverted: inverted, name: iconRight, size: 16 })) : null] })));
57
57
  });
58
58
  exports.Action = Action;
@@ -1708,7 +1708,6 @@ export declare const StyledActionInner: import("styled-components").StyledCompon
1708
1708
  }, {
1709
1709
  fullWidth?: boolean | undefined;
1710
1710
  inline?: boolean | undefined;
1711
- standalone?: boolean | undefined;
1712
1711
  }, never>;
1713
1712
  export declare const StyledActionText: import("styled-components").StyledComponent<typeof import("react-native").Text, {
1714
1713
  core: {
@@ -42,8 +42,8 @@ exports.StyledActionWrapper = styled_native_1.default.View(function (_a) {
42
42
  return "\n width: 100%;\n align-self: flex-start;\n border-bottom-width: ".concat(hasBorder ? (0, element_core_1.numToPx)(core.borderWidth.small) : 0, ";\n border-bottom-style: solid;\n border-bottom-color: ").concat(inverted ? semantic.inverted.border : semantic.border.graphic, ";\n");
43
43
  });
44
44
  exports.StyledActionInner = styled_native_1.default.View(function (_a) {
45
- var fullWidth = _a.fullWidth, inline = _a.inline, standalone = _a.standalone;
46
- return (0, styled_native_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n min-height: ", ";\n "], ["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n min-height: ", ";\n "])), fullWidth ? 'space-between' : 'flex-start', inline || standalone ? '' : '44px');
45
+ var fullWidth = _a.fullWidth, inline = _a.inline;
46
+ return (0, styled_native_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n ", ";\n "], ["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n ", ";\n "])), fullWidth ? 'space-between' : 'flex-start', !inline ? 'min-height: 44px' : '');
47
47
  });
48
48
  exports.StyledActionText = styled_native_1.default.Text(function (_a) {
49
49
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, _c = _a.inverted, inverted = _c === void 0 ? false : _c, _d = _a.inList, inList = _d === void 0 ? false : _d;
@@ -4,8 +4,8 @@ import { FieldProps } from '../Field';
4
4
  export declare const CurrencyField: import("react").ForwardRefExoticComponent<Omit<FieldProps, "children"> & import("react-native").TextInputProps & {
5
5
  invalid?: boolean | undefined;
6
6
  stretch?: boolean | undefined;
7
- iconLeft?: import("../../providers").IconNameExtended | undefined;
8
- iconRight?: import("../../providers").IconNameExtended | undefined;
7
+ iconLeft?: string | undefined;
8
+ iconRight?: string | undefined;
9
9
  rightSlot?: import("react").ReactNode;
10
10
  } & {
11
11
  currency?: "GBP" | "EUR" | "AUD" | "USD" | undefined;
@@ -7,8 +7,8 @@ export type CurrencyInputProps = InputProps & {
7
7
  declare const CurrencyInput: import("react").ForwardRefExoticComponent<import("react-native").TextInputProps & {
8
8
  invalid?: boolean | undefined;
9
9
  stretch?: boolean | undefined;
10
- iconLeft?: import("../../providers").IconNameExtended | undefined;
11
- iconRight?: import("../../providers").IconNameExtended | undefined;
10
+ iconLeft?: string | undefined;
11
+ iconRight?: string | undefined;
12
12
  rightSlot?: import("react").ReactNode;
13
13
  } & {
14
14
  currency?: "GBP" | "EUR" | "AUD" | "USD" | undefined;
@@ -4,7 +4,7 @@ import { FieldProps } from '../Field';
4
4
  export declare const EmailField: import("react").ForwardRefExoticComponent<Omit<FieldProps, "children"> & import("react-native").TextInputProps & {
5
5
  invalid?: boolean | undefined;
6
6
  stretch?: boolean | undefined;
7
- iconLeft?: import("../../providers").IconNameExtended | undefined;
8
- iconRight?: import("../../providers").IconNameExtended | undefined;
7
+ iconLeft?: string | undefined;
8
+ iconRight?: string | undefined;
9
9
  rightSlot?: import("react").ReactNode;
10
10
  } & import("react").RefAttributes<NativeTextInput>>;
@@ -3,8 +3,8 @@ import { TextInput } from 'react-native';
3
3
  declare const EmailInput: import("react").ForwardRefExoticComponent<import("react-native").TextInputProps & {
4
4
  invalid?: boolean | undefined;
5
5
  stretch?: boolean | undefined;
6
- iconLeft?: import("../../providers").IconNameExtended | undefined;
7
- iconRight?: import("../../providers").IconNameExtended | undefined;
6
+ iconLeft?: string | undefined;
7
+ iconRight?: string | undefined;
8
8
  rightSlot?: import("react").ReactNode;
9
9
  } & import("react").RefAttributes<TextInput>>;
10
10
  export { EmailInput };
@@ -76,7 +76,7 @@ var FilterSelect = function (_a) {
76
76
  right: react_native_1.Dimensions.get('window').width - (x + width),
77
77
  });
78
78
  });
79
- }, accessibilityRole: "dropdown", children: [(0, jsx_runtime_1.jsx)(P_1.P, { children: (0, jsx_runtime_1.jsx)(Strong_1.Strong, { children: selected.value === 'default'
79
+ }, children: [(0, jsx_runtime_1.jsx)(P_1.P, { children: (0, jsx_runtime_1.jsx)(Strong_1.Strong, { children: selected.value === 'default'
80
80
  ? ''
81
81
  : (_b = selected.collapsedLabel) !== null && _b !== void 0 ? _b : selected.label }) }), (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: "caret-arrow-down", size: 14, style: { marginLeft: 2 } })] }, String(isOpen)), rightText ? (0, jsx_runtime_1.jsxs)(P_1.P, { children: [" ", rightText] }) : null, (0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: isOpen, animationType: "fade", onRequestClose: function () { return setOpen(false); }, children: (0, jsx_runtime_1.jsx)(DropdownWrapper, { children: (0, jsx_runtime_1.jsx)(DropdownContainer, { style: {
82
82
  top: measure === null || measure === void 0 ? void 0 : measure.top,
@@ -11,8 +11,8 @@ export type InputProps = TextInputProps & {
11
11
  declare const Input: import("react").ForwardRefExoticComponent<TextInputProps & {
12
12
  invalid?: boolean | undefined;
13
13
  stretch?: boolean | undefined;
14
- iconLeft?: IconNameExtended | undefined;
15
- iconRight?: IconNameExtended | undefined;
14
+ iconLeft?: string | undefined;
15
+ iconRight?: string | undefined;
16
16
  rightSlot?: ReactNode;
17
17
  } & import("react").RefAttributes<TextInput>>;
18
18
  export { Input };
@@ -3,8 +3,6 @@ import { IconNameExtended } from '../../providers';
3
3
  export type RightActionConfig = {
4
4
  iconName?: IconNameExtended;
5
5
  onActionPress?: () => void;
6
- accessibilityLabel?: string;
7
- accessibilityHint?: string;
8
6
  };
9
7
  type IconButtonProps = {
10
8
  size: 'small' | 'large';
@@ -13,7 +13,7 @@ var IconButton = function (_a) {
13
13
  if (!rightActionConfig || !(rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.iconName)) {
14
14
  return null;
15
15
  }
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, accessibilityRole: "button", accessibilityLabel: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.accessibilityLabel, accessibilityHint: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.accessibilityHint, 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) {
17
17
  var pressed = _a.pressed;
18
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 }) }));
19
19
  } }));
@@ -4,7 +4,7 @@ import { FieldProps } from '../Field';
4
4
  export declare const NumberField: import("react").ForwardRefExoticComponent<Omit<FieldProps, "children"> & import("react-native").TextInputProps & {
5
5
  invalid?: boolean | undefined;
6
6
  stretch?: boolean | undefined;
7
- iconLeft?: import("../../providers").IconNameExtended | undefined;
8
- iconRight?: import("../../providers").IconNameExtended | undefined;
7
+ iconLeft?: string | undefined;
8
+ iconRight?: string | undefined;
9
9
  rightSlot?: import("react").ReactNode;
10
10
  } & import("react").RefAttributes<NativeTextInput>>;
@@ -3,8 +3,8 @@ import { TextInput as RNTextInput } from 'react-native';
3
3
  declare const NumberInput: import("react").ForwardRefExoticComponent<import("react-native").TextInputProps & {
4
4
  invalid?: boolean | undefined;
5
5
  stretch?: boolean | undefined;
6
- iconLeft?: import("../../providers").IconNameExtended | undefined;
7
- iconRight?: import("../../providers").IconNameExtended | undefined;
6
+ iconLeft?: string | undefined;
7
+ iconRight?: string | undefined;
8
8
  rightSlot?: import("react").ReactNode;
9
9
  } & import("react").RefAttributes<RNTextInput>>;
10
10
  export { NumberInput };
@@ -4,8 +4,8 @@ import { FieldProps } from '../Field';
4
4
  export declare const PasswordField: import("react").ForwardRefExoticComponent<Omit<FieldProps, "children"> & import("react-native").TextInputProps & {
5
5
  invalid?: boolean | undefined;
6
6
  stretch?: boolean | undefined;
7
- iconLeft?: import("../../providers").IconNameExtended | undefined;
8
- iconRight?: import("../../providers").IconNameExtended | undefined;
7
+ iconLeft?: string | undefined;
8
+ iconRight?: string | undefined;
9
9
  rightSlot?: import("react").ReactNode;
10
10
  } & {
11
11
  hasVisibilityToggle?: boolean | undefined;
@@ -3,8 +3,8 @@ import { TextInput as RNTextInput } from 'react-native';
3
3
  declare const PasswordInput: import("react").ForwardRefExoticComponent<import("react-native").TextInputProps & {
4
4
  invalid?: boolean | undefined;
5
5
  stretch?: boolean | undefined;
6
- iconLeft?: import("../../providers").IconNameExtended | undefined;
7
- iconRight?: import("../../providers").IconNameExtended | undefined;
6
+ iconLeft?: string | undefined;
7
+ iconRight?: string | undefined;
8
8
  rightSlot?: import("react").ReactNode;
9
9
  } & {
10
10
  hasVisibilityToggle?: boolean | undefined;
@@ -4,7 +4,7 @@ import { FieldProps } from '../Field';
4
4
  export declare const PhoneField: import("react").ForwardRefExoticComponent<Omit<FieldProps, "children"> & import("react-native").TextInputProps & {
5
5
  invalid?: boolean | undefined;
6
6
  stretch?: boolean | undefined;
7
- iconLeft?: import("../../providers").IconNameExtended | undefined;
8
- iconRight?: import("../../providers").IconNameExtended | undefined;
7
+ iconLeft?: string | undefined;
8
+ iconRight?: string | undefined;
9
9
  rightSlot?: import("react").ReactNode;
10
10
  } & import("react").RefAttributes<NativeTextInput>>;
@@ -3,7 +3,7 @@ import { TextInput } from 'react-native';
3
3
  export declare const PhoneInput: import("react").ForwardRefExoticComponent<import("react-native").TextInputProps & {
4
4
  invalid?: boolean | undefined;
5
5
  stretch?: boolean | undefined;
6
- iconLeft?: import("../../providers").IconNameExtended | undefined;
7
- iconRight?: import("../../providers").IconNameExtended | undefined;
6
+ iconLeft?: string | undefined;
7
+ iconRight?: string | undefined;
8
8
  rightSlot?: import("react").ReactNode;
9
9
  } & import("react").RefAttributes<TextInput>>;
@@ -90,7 +90,7 @@ var Select = function (_a) {
90
90
  label: "-- ".concat(noOptionMessage, " --"),
91
91
  value: 'default',
92
92
  };
93
- return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { children: [(0, jsx_runtime_1.jsxs)(SelectInput, { testID: testID, hasError: hasError, onPress: function () { return setOpen(!isOpen); }, children: [(0, jsx_runtime_1.jsx)(P_1.P, { style: { marginTop: 0, marginBottom: 0 }, children: selected.value === 'default' ? '' : selected.label }), (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: "chevron-down", size: 16, style: { marginLeft: 'auto' } })] }), (0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: isOpen, animationType: "fade", onRequestClose: function () { return setOpen(false); }, children: (0, jsx_runtime_1.jsx)(DropdownWrapper, { children: (0, jsx_runtime_1.jsx)(DropdownContainer, { children: (0, jsx_runtime_1.jsxs)(react_native_1.ScrollView, { nestedScrollEnabled: true, testID: "".concat(testID, "-OptionsScrollView"), children: [(0, jsx_runtime_1.jsxs)(SelectOption, { accessible: true, accessibilityRole: "radio", onPress: function () { return handleOptionPress(requiredOption); }, children: [(0, jsx_runtime_1.jsx)(StyledP, { children: (0, jsx_runtime_1.jsx)(Strong_1.Strong, { children: requiredOption.label }) }), (0, jsx_runtime_1.jsx)(Radio, { isChecked: selected.value === requiredOption.value, children: (0, jsx_runtime_1.jsx)(RadioDot, { isChecked: selected.value === requiredOption.value }) })] }), Object.keys(optionsByCategories).map(function (category) { return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [category !== 'undefined' ? ((0, jsx_runtime_1.jsx)(StyledCategory, { children: category })) : null, optionsByCategories[category].map(function (option, i) { return ((0, jsx_runtime_1.jsxs)(SelectOption, { accessible: true, accessibilityRole: "radio", isLastOption: i === optionsByCategories[category].length - 1, onPress: function () { return handleOptionPress(option); }, children: [(0, jsx_runtime_1.jsx)(StyledP, { children: (0, jsx_runtime_1.jsx)(Strong_1.Strong, { children: option.label }) }), (0, jsx_runtime_1.jsx)(Radio, { isChecked: selected.value === option.value, children: (0, jsx_runtime_1.jsx)(RadioDot, { isChecked: selected.value === option.value }) })] }, option.label)); })] }, category)); })] }) }) }) })] }));
93
+ return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { children: [(0, jsx_runtime_1.jsxs)(SelectInput, { testID: testID, hasError: hasError, onPress: function () { return setOpen(!isOpen); }, children: [(0, jsx_runtime_1.jsx)(P_1.P, { style: { marginTop: 0, marginBottom: 0 }, children: selected.value === 'default' ? '' : selected.label }), (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: "chevron-down", size: 16, style: { marginLeft: 'auto' } })] }), (0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: isOpen, animationType: "fade", onRequestClose: function () { return setOpen(false); }, children: (0, jsx_runtime_1.jsx)(DropdownWrapper, { children: (0, jsx_runtime_1.jsx)(DropdownContainer, { children: (0, jsx_runtime_1.jsxs)(react_native_1.ScrollView, { nestedScrollEnabled: true, children: [(0, jsx_runtime_1.jsxs)(SelectOption, { accessible: true, accessibilityRole: "radio", onPress: function () { return handleOptionPress(requiredOption); }, children: [(0, jsx_runtime_1.jsx)(StyledP, { children: (0, jsx_runtime_1.jsx)(Strong_1.Strong, { children: requiredOption.label }) }), (0, jsx_runtime_1.jsx)(Radio, { isChecked: selected.value === requiredOption.value, children: (0, jsx_runtime_1.jsx)(RadioDot, { isChecked: selected.value === requiredOption.value }) })] }), Object.keys(optionsByCategories).map(function (category) { return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [category !== 'undefined' ? ((0, jsx_runtime_1.jsx)(StyledCategory, { children: category })) : null, optionsByCategories[category].map(function (option, i) { return ((0, jsx_runtime_1.jsxs)(SelectOption, { accessible: true, accessibilityRole: "radio", isLastOption: i === optionsByCategories[category].length - 1, onPress: function () { return handleOptionPress(option); }, children: [(0, jsx_runtime_1.jsx)(StyledP, { children: (0, jsx_runtime_1.jsx)(Strong_1.Strong, { children: option.label }) }), (0, jsx_runtime_1.jsx)(Radio, { isChecked: selected.value === option.value, children: (0, jsx_runtime_1.jsx)(RadioDot, { isChecked: selected.value === option.value }) })] }, option.label)); })] }, category)); })] }) }) }) })] }));
94
94
  };
95
95
  exports.Select = Select;
96
96
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
@@ -562,6 +562,4 @@ export declare const Strong: import("styled-components").StyledComponent<typeof
562
562
  };
563
563
  };
564
564
  };
565
- }, {
566
- color?: string | undefined;
567
- }, never>;
565
+ }, {}, never>;
@@ -6,6 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Strong = void 0;
7
7
  var styled_native_1 = __importDefault(require("../../styled.native"));
8
8
  exports.Strong = styled_native_1.default.Text(function (_a) {
9
- var _b = _a.theme, core = _b.core, semantic = _b.semantic;
10
- return "\n font-family: ".concat(core.fontFamily.bodyBold.native, ";\n color: color ?? ").concat(semantic.message.base, "\n ");
9
+ var core = _a.theme.core;
10
+ return "\n font-family: ".concat(core.fontFamily.bodyBold.native, ";\n ");
11
11
  });
@@ -4,7 +4,7 @@ import { FieldProps } from '../Field';
4
4
  export declare const TextField: import("react").ForwardRefExoticComponent<Omit<FieldProps, "children"> & import("react-native").TextInputProps & {
5
5
  invalid?: boolean | undefined;
6
6
  stretch?: boolean | undefined;
7
- iconLeft?: import("../../providers").IconNameExtended | undefined;
8
- iconRight?: import("../../providers").IconNameExtended | undefined;
7
+ iconLeft?: string | undefined;
8
+ iconRight?: string | undefined;
9
9
  rightSlot?: import("react").ReactNode;
10
10
  } & import("react").RefAttributes<NativeTextInput>>;
@@ -3,8 +3,8 @@ import { TextInput as RNTextInput } from 'react-native';
3
3
  declare const TextInput: import("react").ForwardRefExoticComponent<import("react-native").TextInputProps & {
4
4
  invalid?: boolean | undefined;
5
5
  stretch?: boolean | undefined;
6
- iconLeft?: import("../../providers").IconNameExtended | undefined;
7
- iconRight?: import("../../providers").IconNameExtended | undefined;
6
+ iconLeft?: string | undefined;
7
+ iconRight?: string | undefined;
8
8
  rightSlot?: import("react").ReactNode;
9
9
  } & import("react").RefAttributes<RNTextInput>>;
10
10
  export { TextInput };
@@ -4,8 +4,8 @@ import { FieldProps } from '../Field';
4
4
  export declare const TextareaField: import("react").ForwardRefExoticComponent<Omit<FieldProps, "children"> & import("react-native").TextInputProps & {
5
5
  invalid?: boolean | undefined;
6
6
  stretch?: boolean | undefined;
7
- iconLeft?: import("../../providers").IconNameExtended | undefined;
8
- iconRight?: import("../../providers").IconNameExtended | undefined;
7
+ iconLeft?: string | undefined;
8
+ iconRight?: string | undefined;
9
9
  rightSlot?: import("react").ReactNode;
10
10
  } & {
11
11
  rows?: number | undefined;
@@ -7,8 +7,8 @@ type TextareaInputProps = InputProps & {
7
7
  declare const TextareaInput: import("react").ForwardRefExoticComponent<import("react-native").TextInputProps & {
8
8
  invalid?: boolean | undefined;
9
9
  stretch?: boolean | undefined;
10
- iconLeft?: import("../../providers").IconNameExtended | undefined;
11
- iconRight?: import("../../providers").IconNameExtended | undefined;
10
+ iconLeft?: string | undefined;
11
+ iconRight?: string | undefined;
12
12
  rightSlot?: import("react").ReactNode;
13
13
  } & {
14
14
  rows?: number | undefined;
@@ -1,14 +1,3 @@
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
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
2
  import { numToPx } from '@ovotech/element-core';
14
3
  import MaskedView from '@react-native-masked-view/masked-view';
@@ -18,13 +7,7 @@ import { Action, CTAButton, Heading2, Heading3, Icon, Margin, Stack, } from '../
18
7
  import styled, { ThemeContext } from '../../styled.native';
19
8
  import { P } from '../P';
20
9
  import { IndicatorIconShape } from './IndicatorIconShape';
21
- var StyledPressableCard = styled.Pressable(function (_a) {
22
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, inline = _a.inline, inverted = _a.inverted, reducedBottomPadding = _a.reducedBottomPadding;
23
- var paddingVal = inline ? core.space[4] : core.space[6];
24
- var reducedBottomPaddingVal = inline ? core.space[3] : core.space[5];
25
- return "\n border-radius: ".concat(inline ? numToPx(core.space[6]) : 0, ";\n background-color: ").concat(inverted ? semantic.inverted.surface : semantic.surface.elevated, ";\n padding: ").concat(numToPx(paddingVal), ";\n padding-bottom: ").concat(numToPx(reducedBottomPadding ? reducedBottomPaddingVal : paddingVal), ";\n overflow: hidden;\n border-width: 0;\n width: 100%;\n ");
26
- });
27
- var StyledCard = styled.View(function (_a) {
10
+ var StyledCard = styled.Pressable(function (_a) {
28
11
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, inline = _a.inline, inverted = _a.inverted, reducedBottomPadding = _a.reducedBottomPadding;
29
12
  var paddingVal = inline ? core.space[4] : core.space[6];
30
13
  var reducedBottomPaddingVal = inline ? core.space[3] : core.space[5];
@@ -46,9 +29,6 @@ export var ActionCard = function (_a) {
46
29
  var cardAction = hasSingleAction
47
30
  ? onPressActionButton || onPressIndicator
48
31
  : null;
49
- var RootContainer = hasSingleAction
50
- ? StyledPressableCard
51
- : StyledCard;
52
32
  useEffect(function () {
53
33
  if (onMount) {
54
34
  onMount();
@@ -57,7 +37,7 @@ export var ActionCard = function (_a) {
57
37
  var Heading = inline ? Heading3 : Heading2;
58
38
  var cardPadding = core.space[inline ? 4 : 6];
59
39
  var negativeMarginAdjustment = -cardPadding;
60
- return (_jsxs(RootContainer, __assign({}, (cardAction ? { onPress: cardAction } : {}), { inline: inline, inverted: inverted, reducedBottomPadding: Boolean(buttonTitle && !ctaVariant), testID: "".concat(testID, "-card"), accessibilityRole: cardAction ? 'button' : 'none', children: [_jsxs(View, { style: { flexDirection: 'row' }, children: [_jsx(View, { style: { flex: 1 }, children: _jsxs(Stack, { spaceBetween: 2, children: [_jsx(Heading, { style: {
40
+ return (_jsxs(StyledCard, { onPress: cardAction, inline: inline, inverted: inverted, reducedBottomPadding: Boolean(buttonTitle && !ctaVariant), testID: "".concat(testID, "-card"), children: [_jsxs(View, { style: { flexDirection: 'row' }, children: [_jsx(View, { style: { flex: 1 }, children: _jsxs(Stack, { spaceBetween: 2, children: [_jsx(Heading, { style: {
61
41
  color: inverted
62
42
  ? semantic.inverted.message.link
63
43
  : semantic.message.branded,
@@ -97,5 +77,5 @@ export var ActionCard = function (_a) {
97
77
  position: 'absolute',
98
78
  right: core.space[2],
99
79
  top: core.space[2],
100
- }, onPress: onPressCloseButton, testID: "".concat(testID, "-close-button"), children: _jsx(CloseIconWrapper, { inverted: inverted, children: _jsx(Icon, { name: "cross", size: "16", color: semantic.message.base }) }) })) : null] })));
80
+ }, onPress: onPressCloseButton, testID: "".concat(testID, "-close-button"), children: _jsx(CloseIconWrapper, { inverted: inverted, children: _jsx(Icon, { name: "cross", size: "16", color: semantic.message.base }) }) })) : null] }));
101
81
  };
@@ -43,12 +43,12 @@ var ActionList = function (_a) {
43
43
  }) })));
44
44
  };
45
45
  var ActionWrapper = forwardRef(function (_a, ref) {
46
- 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, _f = _a.standalone, standalone = _f === void 0 ? false : _f, rest = __rest(_a, ["children", "accessibilityRole", "activeOpacity", "fullWidth", "hasBorder", "inverted", "inline", "inList", "onPress", "testID", "standalone"]);
47
- return (_jsx(StyledActionWrapper, __assign({ ref: ref, hasBorder: hasBorder, inverted: inverted, testID: testID }, rest, { children: _jsx(TouchableOpacity, { hitSlop: inline ? 14 : null, activeOpacity: activeOpacity, accessible: true, accessibilityRole: accessibilityRole, onPress: onPress, children: _jsx(StyledActionInner, { fullWidth: fullWidth, inList: inList, inline: inline, standalone: standalone, children: children }) }) })));
46
+ 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"]);
47
+ return (_jsx(StyledActionWrapper, __assign({ ref: ref, hasBorder: hasBorder, inverted: inverted, testID: testID }, rest, { children: _jsx(TouchableOpacity, { hitSlop: inline ? 14 : null, activeOpacity: activeOpacity, accessible: true, accessibilityRole: accessibilityRole, onPress: onPress, children: _jsx(StyledActionInner, { fullWidth: fullWidth, inList: inList, inline: inline, children: children }) }) })));
48
48
  });
49
49
  var Action = forwardRef(function (_a, ref) {
50
- var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'link' : _b, children = _a.children, _c = _a.fullWidth, fullWidth = _c === void 0 ? false : _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, _f = _a.standalone, standalone = _f === void 0 ? false : _f, rest = __rest(_a, ["accessibilityRole", "children", "fullWidth", "inverted", "inline", "onPress", "testID", "iconLeft", "iconRight", "standalone"]);
50
+ var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'link' : _b, children = _a.children, _c = _a.fullWidth, fullWidth = _c === void 0 ? false : _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"]);
51
51
  var smallAndUp = useBreakpoint().smallAndUp;
52
- return (_jsxs(ActionWrapper, __assign({ ref: ref, accessible: true, accessibilityRole: accessibilityRole, fullWidth: fullWidth, inverted: inverted, inline: inline, onPress: onPress, testID: testID, standalone: standalone }, rest, { children: [iconLeft ? (_jsx(StyledLeftIcon, { inverted: inverted, name: iconLeft, size: 16 })) : null, typeof children === 'string' ? (_jsx(StyledActionText, { smallAndUp: smallAndUp, inverted: inverted, inList: rest === null || rest === void 0 ? void 0 : rest.inList, children: children })) : (_jsx(StyledActionNodeWrapper, { children: children })), iconRight ? (_jsx(StyledRightIcon, { inverted: inverted, name: iconRight, size: 16 })) : null] })));
52
+ return (_jsxs(ActionWrapper, __assign({ ref: ref, accessible: true, accessibilityRole: accessibilityRole, fullWidth: fullWidth, inverted: inverted, inline: inline, onPress: onPress, testID: testID }, rest, { children: [iconLeft ? (_jsx(StyledLeftIcon, { inverted: inverted, name: iconLeft, size: 16 })) : null, typeof children === 'string' ? (_jsx(StyledActionText, { smallAndUp: smallAndUp, inverted: inverted, inList: rest === null || rest === void 0 ? void 0 : rest.inList, children: children })) : (_jsx(StyledActionNodeWrapper, { children: children })), iconRight ? (_jsx(StyledRightIcon, { inverted: inverted, name: iconRight, size: 16 })) : null] })));
53
53
  });
54
54
  export { ActionList, Action };
@@ -16,8 +16,8 @@ export var StyledActionWrapper = styled.View(function (_a) {
16
16
  return "\n width: 100%;\n align-self: flex-start;\n border-bottom-width: ".concat(hasBorder ? numToPx(core.borderWidth.small) : 0, ";\n border-bottom-style: solid;\n border-bottom-color: ").concat(inverted ? semantic.inverted.border : semantic.border.graphic, ";\n");
17
17
  });
18
18
  export var StyledActionInner = styled.View(function (_a) {
19
- var fullWidth = _a.fullWidth, inline = _a.inline, standalone = _a.standalone;
20
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n min-height: ", ";\n "], ["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n min-height: ", ";\n "])), fullWidth ? 'space-between' : 'flex-start', inline || standalone ? '' : '44px');
19
+ var fullWidth = _a.fullWidth, inline = _a.inline;
20
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n ", ";\n "], ["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n ", ";\n "])), fullWidth ? 'space-between' : 'flex-start', !inline ? 'min-height: 44px' : '');
21
21
  });
22
22
  export var StyledActionText = styled.Text(function (_a) {
23
23
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, _c = _a.inverted, inverted = _c === void 0 ? false : _c, _d = _a.inList, inList = _d === void 0 ? false : _d;
@@ -50,7 +50,7 @@ export var FilterSelect = function (_a) {
50
50
  right: Dimensions.get('window').width - (x + width),
51
51
  });
52
52
  });
53
- }, accessibilityRole: "dropdown", children: [_jsx(P, { children: _jsx(Strong, { children: selected.value === 'default'
53
+ }, children: [_jsx(P, { children: _jsx(Strong, { children: selected.value === 'default'
54
54
  ? ''
55
55
  : (_b = selected.collapsedLabel) !== null && _b !== void 0 ? _b : selected.label }) }), _jsx(Icon, { name: "caret-arrow-down", size: 14, style: { marginLeft: 2 } })] }, String(isOpen)), rightText ? _jsxs(P, { children: [" ", rightText] }) : null, _jsx(Modal, { transparent: true, visible: isOpen, animationType: "fade", onRequestClose: function () { return setOpen(false); }, children: _jsx(DropdownWrapper, { children: _jsx(DropdownContainer, { style: {
56
56
  top: measure === null || measure === void 0 ? void 0 : measure.top,
@@ -10,7 +10,7 @@ export var IconButton = function (_a) {
10
10
  if (!rightActionConfig || !(rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.iconName)) {
11
11
  return null;
12
12
  }
13
- return (_jsx(Pressable, { hitSlop: theme.core.space[2], pressRetentionOffset: theme.core.space[2], onPress: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.onActionPress, accessibilityRole: "button", accessibilityLabel: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.accessibilityLabel, accessibilityHint: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.accessibilityHint, 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) {
14
14
  var pressed = _a.pressed;
15
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 }) }));
16
16
  } }));
@@ -61,6 +61,6 @@ export var Select = function (_a) {
61
61
  label: "-- ".concat(noOptionMessage, " --"),
62
62
  value: 'default',
63
63
  };
64
- return (_jsxs(View, { children: [_jsxs(SelectInput, { testID: testID, hasError: hasError, onPress: function () { return setOpen(!isOpen); }, children: [_jsx(P, { style: { marginTop: 0, marginBottom: 0 }, children: selected.value === 'default' ? '' : selected.label }), _jsx(Icon, { name: "chevron-down", size: 16, style: { marginLeft: 'auto' } })] }), _jsx(Modal, { transparent: true, visible: isOpen, animationType: "fade", onRequestClose: function () { return setOpen(false); }, children: _jsx(DropdownWrapper, { children: _jsx(DropdownContainer, { children: _jsxs(ScrollView, { nestedScrollEnabled: true, testID: "".concat(testID, "-OptionsScrollView"), children: [_jsxs(SelectOption, { accessible: true, accessibilityRole: "radio", onPress: function () { return handleOptionPress(requiredOption); }, children: [_jsx(StyledP, { children: _jsx(Strong, { children: requiredOption.label }) }), _jsx(Radio, { isChecked: selected.value === requiredOption.value, children: _jsx(RadioDot, { isChecked: selected.value === requiredOption.value }) })] }), Object.keys(optionsByCategories).map(function (category) { return (_jsxs(Fragment, { children: [category !== 'undefined' ? (_jsx(StyledCategory, { children: category })) : null, optionsByCategories[category].map(function (option, i) { return (_jsxs(SelectOption, { accessible: true, accessibilityRole: "radio", isLastOption: i === optionsByCategories[category].length - 1, onPress: function () { return handleOptionPress(option); }, children: [_jsx(StyledP, { children: _jsx(Strong, { children: option.label }) }), _jsx(Radio, { isChecked: selected.value === option.value, children: _jsx(RadioDot, { isChecked: selected.value === option.value }) })] }, option.label)); })] }, category)); })] }) }) }) })] }));
64
+ return (_jsxs(View, { children: [_jsxs(SelectInput, { testID: testID, hasError: hasError, onPress: function () { return setOpen(!isOpen); }, children: [_jsx(P, { style: { marginTop: 0, marginBottom: 0 }, children: selected.value === 'default' ? '' : selected.label }), _jsx(Icon, { name: "chevron-down", size: 16, style: { marginLeft: 'auto' } })] }), _jsx(Modal, { transparent: true, visible: isOpen, animationType: "fade", onRequestClose: function () { return setOpen(false); }, children: _jsx(DropdownWrapper, { children: _jsx(DropdownContainer, { children: _jsxs(ScrollView, { nestedScrollEnabled: true, children: [_jsxs(SelectOption, { accessible: true, accessibilityRole: "radio", onPress: function () { return handleOptionPress(requiredOption); }, children: [_jsx(StyledP, { children: _jsx(Strong, { children: requiredOption.label }) }), _jsx(Radio, { isChecked: selected.value === requiredOption.value, children: _jsx(RadioDot, { isChecked: selected.value === requiredOption.value }) })] }), Object.keys(optionsByCategories).map(function (category) { return (_jsxs(Fragment, { children: [category !== 'undefined' ? (_jsx(StyledCategory, { children: category })) : null, optionsByCategories[category].map(function (option, i) { return (_jsxs(SelectOption, { accessible: true, accessibilityRole: "radio", isLastOption: i === optionsByCategories[category].length - 1, onPress: function () { return handleOptionPress(option); }, children: [_jsx(StyledP, { children: _jsx(Strong, { children: option.label }) }), _jsx(Radio, { isChecked: selected.value === option.value, children: _jsx(RadioDot, { isChecked: selected.value === option.value }) })] }, option.label)); })] }, category)); })] }) }) }) })] }));
65
65
  };
66
66
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
@@ -1,5 +1,5 @@
1
1
  import styled from '../../styled.native';
2
2
  export var Strong = styled.Text(function (_a) {
3
- var _b = _a.theme, core = _b.core, semantic = _b.semantic;
4
- return "\n font-family: ".concat(core.fontFamily.bodyBold.native, ";\n color: color ?? ").concat(semantic.message.base, "\n ");
3
+ var core = _a.theme.core;
4
+ return "\n font-family: ".concat(core.fontFamily.bodyBold.native, ";\n ");
5
5
  });
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent } from 'react';
2
2
  import { SvgProps } from 'react-native-svg';
3
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' | 'caret-down' | 'caret-left' | 'caret-right' | 'caret-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' | 'circle' | '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
- export type IconNameExtended = IconName | (string & {});
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.2.0-canary-e1006e1-298",
3
+ "version": "4.2.0",
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.1.0-canary-e1006e1-298",
18
17
  "deepmerge": "^4.2.2",
19
18
  "lodash.groupby": "^4.6.0",
20
- "react-native-reanimated-carousel": "^3.5.1"
19
+ "react-native-reanimated-carousel": "^3.5.1",
20
+ "@ovotech/element-core": "3.1.0"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@babel/core": "^7.11.5",