@ovotech/element-native 5.1.1 → 5.2.0-canary-9460c0f-363

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 (31) hide show
  1. package/dist/components/Accordion/styles.d.ts +12 -12
  2. package/dist/components/ActionList/styled.d.ts +40 -40
  3. package/dist/components/Badge/Badge.d.ts +4 -4
  4. package/dist/components/Button/Button.d.ts +1 -1
  5. package/dist/components/Button/Button.styles.d.ts +16 -16
  6. package/dist/components/DataTable/styles.d.ts +52 -52
  7. package/dist/components/Em/Em.d.ts +4 -4
  8. package/dist/components/ErrorText/ErrorText.d.ts +4 -4
  9. package/dist/components/Grid/Col.d.ts +4 -4
  10. package/dist/components/Grid/Row.d.ts +4 -4
  11. package/dist/components/HintText/HintText.d.ts +4 -4
  12. package/dist/components/LabelText/LabelText.d.ts +4 -4
  13. package/dist/components/LineThrough/LineThrough.d.ts +4 -4
  14. package/dist/components/List/styled.d.ts +16 -16
  15. package/dist/components/Margin/Margin.d.ts +4 -4
  16. package/dist/components/NavHeader/NavHeader.styles.d.ts +28 -28
  17. package/dist/components/Notification/Notification.d.ts +8 -8
  18. package/dist/components/PasswordInput/PasswordInput.styled.d.ts +4 -4
  19. package/dist/components/SelectField/Select.d.ts +4 -4
  20. package/dist/components/Stack/Stack.d.ts +4 -5
  21. package/dist/components/Stack/Stack.js +13 -14
  22. package/dist/components/Strong/Strong.d.ts +4 -4
  23. package/dist/components/SubLabelText/SubLabelText.d.ts +4 -4
  24. package/dist/components/Toggle/styles.d.ts +16 -16
  25. package/dist/components/index.d.ts +8 -8
  26. package/dist/components/index.js +8 -8
  27. package/dist/esm/components/Button/Button.js +1 -1
  28. package/dist/esm/components/Stack/Stack.js +13 -14
  29. package/dist/esm/components/index.js +8 -8
  30. package/dist/styled.native.d.ts +24 -24
  31. package/package.json +3 -3
@@ -2,10 +2,9 @@ export * from './Accordion';
2
2
  export * from './ActionCard';
3
3
  export * from './ActionList';
4
4
  export * from './Badge';
5
+ export * from './Button';
5
6
  export * from './Card';
6
7
  export * from './Checkbox';
7
- export * from './Button';
8
- export * from './Link';
9
8
  export * from './CurrencyField';
10
9
  export * from './CurrencyInput';
11
10
  export * from './DataTable';
@@ -21,6 +20,7 @@ export * from './Grid';
21
20
  export * from './Heading';
22
21
  export * from './Icon';
23
22
  export * from './LineThrough';
23
+ export * from './Link';
24
24
  export * from './List';
25
25
  export * from './Margin';
26
26
  export * from './NavHeader';
@@ -32,22 +32,22 @@ export * from './PasswordField';
32
32
  export * from './PasswordInput';
33
33
  export * from './PhoneField';
34
34
  export * from './PhoneInput';
35
+ export * from './Pictogram';
35
36
  export * from './Radio';
37
+ export * from './RadioCard';
36
38
  export * from './SegmentedControls';
37
39
  export * from './SelectField';
38
- export * from './SkeletonCircle';
39
40
  export * from './SkeletonButton';
41
+ export * from './SkeletonCircle';
40
42
  export * from './SkeletonHeading';
41
43
  export * from './SkeletonText';
42
44
  export * from './Spinner';
43
45
  export * from './Stack';
44
46
  export * from './Strong';
45
47
  export * from './Tabs';
46
- export * from './TextareaField';
47
- export * from './TextareaInput';
48
48
  export * from './TextField';
49
49
  export * from './TextInput';
50
- export * from './Toggle';
50
+ export * from './TextareaField';
51
+ export * from './TextareaInput';
51
52
  export * from './Toast';
52
- export * from './RadioCard';
53
- export * from './Pictogram';
53
+ export * from './Toggle';
@@ -18,10 +18,9 @@ __exportStar(require("./Accordion"), exports);
18
18
  __exportStar(require("./ActionCard"), exports);
19
19
  __exportStar(require("./ActionList"), exports);
20
20
  __exportStar(require("./Badge"), exports);
21
+ __exportStar(require("./Button"), exports);
21
22
  __exportStar(require("./Card"), exports);
22
23
  __exportStar(require("./Checkbox"), exports);
23
- __exportStar(require("./Button"), exports);
24
- __exportStar(require("./Link"), exports);
25
24
  __exportStar(require("./CurrencyField"), exports);
26
25
  __exportStar(require("./CurrencyInput"), exports);
27
26
  __exportStar(require("./DataTable"), exports);
@@ -37,6 +36,7 @@ __exportStar(require("./Grid"), exports);
37
36
  __exportStar(require("./Heading"), exports);
38
37
  __exportStar(require("./Icon"), exports);
39
38
  __exportStar(require("./LineThrough"), exports);
39
+ __exportStar(require("./Link"), exports);
40
40
  __exportStar(require("./List"), exports);
41
41
  __exportStar(require("./Margin"), exports);
42
42
  __exportStar(require("./NavHeader"), exports);
@@ -48,22 +48,22 @@ __exportStar(require("./PasswordField"), exports);
48
48
  __exportStar(require("./PasswordInput"), exports);
49
49
  __exportStar(require("./PhoneField"), exports);
50
50
  __exportStar(require("./PhoneInput"), exports);
51
+ __exportStar(require("./Pictogram"), exports);
51
52
  __exportStar(require("./Radio"), exports);
53
+ __exportStar(require("./RadioCard"), exports);
52
54
  __exportStar(require("./SegmentedControls"), exports);
53
55
  __exportStar(require("./SelectField"), exports);
54
- __exportStar(require("./SkeletonCircle"), exports);
55
56
  __exportStar(require("./SkeletonButton"), exports);
57
+ __exportStar(require("./SkeletonCircle"), exports);
56
58
  __exportStar(require("./SkeletonHeading"), exports);
57
59
  __exportStar(require("./SkeletonText"), exports);
58
60
  __exportStar(require("./Spinner"), exports);
59
61
  __exportStar(require("./Stack"), exports);
60
62
  __exportStar(require("./Strong"), exports);
61
63
  __exportStar(require("./Tabs"), exports);
62
- __exportStar(require("./TextareaField"), exports);
63
- __exportStar(require("./TextareaInput"), exports);
64
64
  __exportStar(require("./TextField"), exports);
65
65
  __exportStar(require("./TextInput"), exports);
66
- __exportStar(require("./Toggle"), exports);
66
+ __exportStar(require("./TextareaField"), exports);
67
+ __exportStar(require("./TextareaInput"), exports);
67
68
  __exportStar(require("./Toast"), exports);
68
- __exportStar(require("./RadioCard"), exports);
69
- __exportStar(require("./Pictogram"), exports);
69
+ __exportStar(require("./Toggle"), exports);
@@ -24,7 +24,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
24
  import { numToPx } from '@ovotech/element-core';
25
25
  import { forwardRef } from 'react';
26
26
  import { useBreakpoint } from '../../hooks';
27
- import { StyledButtonWrapper, StyledInner, StyledButtonIcon, StyledButtonText, } from './Button.styles';
27
+ import { StyledButtonIcon, StyledButtonText, StyledButtonWrapper, StyledInner, } from './Button.styles';
28
28
  var ButtonWrapper = function (_a) {
29
29
  var children = _a.children, _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'button' : _b, _c = _a.activeOpacity, activeOpacity = _c === void 0 ? 0.8 : _c, rest = __rest(_a, ["children", "accessibilityRole", "activeOpacity"]);
30
30
  return (_jsx(StyledButtonWrapper, __assign({ accessible: true, accessibilityRole: accessibilityRole, activeOpacity: activeOpacity }, rest, { children: children })));
@@ -22,24 +22,23 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import { numToPx } from '@ovotech/element-core';
25
- import { Children } from 'react';
26
25
  import { View } from 'react-native';
27
- import styled from '../../styled.native';
28
- import { getValidChildren, responsiveStyle, styledComponentWithBreakpoints, } from '../../utils';
26
+ import styled from 'styled-components';
27
+ import { useBreakpoint } from '../../hooks';
28
+ import { useTheme } from '../../styled.native';
29
+ import { responsiveStyle } from '../../utils';
30
+ var StyledStack = styled(View)(function (_a) {
31
+ var gapStyle = _a.gapStyle;
32
+ return "\n ".concat(gapStyle, "\n");
33
+ });
29
34
  var Stack = function (_a) {
30
35
  var children = _a.children, spaceBetween = _a.spaceBetween, rest = __rest(_a, ["children", "spaceBetween"]);
31
- var validChildren = getValidChildren(children);
32
- return (_jsx(View, __assign({}, rest, { children: Children.map(validChildren, function (child, index) {
33
- return index === 0 ? (child) : (_jsx(StackItem, { spaceBetween: spaceBetween, children: child }));
34
- }) })));
35
- };
36
- var StyledStackItem = styled.View(function (_a) {
37
- var theme = _a.theme, spaceBetween = _a.spaceBetween, smallAndUp = _a.smallAndUp, mediumAndUp = _a.mediumAndUp, largeAndUp = _a.largeAndUp;
36
+ var breakpoints = useBreakpoint();
37
+ var theme = useTheme();
38
38
  var formatter = function (spaceKey) {
39
39
  return numToPx(theme.space[String(spaceKey * 100)]);
40
40
  };
41
- var breakpoints = { smallAndUp: smallAndUp, mediumAndUp: mediumAndUp, largeAndUp: largeAndUp };
42
- return responsiveStyle('margin-top', spaceBetween, breakpoints, formatter);
43
- });
44
- var StackItem = styledComponentWithBreakpoints(StyledStackItem);
41
+ var gapStyle = responsiveStyle('gap', spaceBetween, breakpoints, formatter);
42
+ return (_jsx(StyledStack, __assign({ gapStyle: gapStyle }, rest, { children: children })));
43
+ };
45
44
  export { Stack };
@@ -2,10 +2,9 @@ export * from './Accordion';
2
2
  export * from './ActionCard';
3
3
  export * from './ActionList';
4
4
  export * from './Badge';
5
+ export * from './Button';
5
6
  export * from './Card';
6
7
  export * from './Checkbox';
7
- export * from './Button';
8
- export * from './Link';
9
8
  export * from './CurrencyField';
10
9
  export * from './CurrencyInput';
11
10
  export * from './DataTable';
@@ -21,6 +20,7 @@ export * from './Grid';
21
20
  export * from './Heading';
22
21
  export * from './Icon';
23
22
  export * from './LineThrough';
23
+ export * from './Link';
24
24
  export * from './List';
25
25
  export * from './Margin';
26
26
  export * from './NavHeader';
@@ -32,22 +32,22 @@ export * from './PasswordField';
32
32
  export * from './PasswordInput';
33
33
  export * from './PhoneField';
34
34
  export * from './PhoneInput';
35
+ export * from './Pictogram';
35
36
  export * from './Radio';
37
+ export * from './RadioCard';
36
38
  export * from './SegmentedControls';
37
39
  export * from './SelectField';
38
- export * from './SkeletonCircle';
39
40
  export * from './SkeletonButton';
41
+ export * from './SkeletonCircle';
40
42
  export * from './SkeletonHeading';
41
43
  export * from './SkeletonText';
42
44
  export * from './Spinner';
43
45
  export * from './Stack';
44
46
  export * from './Strong';
45
47
  export * from './Tabs';
46
- export * from './TextareaField';
47
- export * from './TextareaInput';
48
48
  export * from './TextField';
49
49
  export * from './TextInput';
50
- export * from './Toggle';
50
+ export * from './TextareaField';
51
+ export * from './TextareaInput';
51
52
  export * from './Toast';
52
- export * from './RadioCard';
53
- export * from './Pictogram';
53
+ export * from './Toggle';
@@ -54,10 +54,6 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
54
54
  "60": string;
55
55
  "70": string;
56
56
  };
57
- outline: {
58
- outer: string;
59
- inner: string;
60
- };
61
57
  alert: {
62
58
  success: string;
63
59
  successTint: string;
@@ -94,6 +90,10 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
94
90
  onBrandVariant: string;
95
91
  };
96
92
  };
93
+ outline: {
94
+ outer: string;
95
+ inner: string;
96
+ };
97
97
  surface: {
98
98
  surface: string;
99
99
  bright: string;
@@ -620,10 +620,6 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
620
620
  "60": string;
621
621
  "70": string;
622
622
  };
623
- outline: {
624
- outer: string;
625
- inner: string;
626
- };
627
623
  alert: {
628
624
  success: string;
629
625
  successTint: string;
@@ -660,6 +656,10 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
660
656
  onBrandVariant: string;
661
657
  };
662
658
  };
659
+ outline: {
660
+ outer: string;
661
+ inner: string;
662
+ };
663
663
  surface: {
664
664
  surface: string;
665
665
  bright: string;
@@ -1186,10 +1186,6 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
1186
1186
  "60": string;
1187
1187
  "70": string;
1188
1188
  };
1189
- outline: {
1190
- outer: string;
1191
- inner: string;
1192
- };
1193
1189
  alert: {
1194
1190
  success: string;
1195
1191
  successTint: string;
@@ -1226,6 +1222,10 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
1226
1222
  onBrandVariant: string;
1227
1223
  };
1228
1224
  };
1225
+ outline: {
1226
+ outer: string;
1227
+ inner: string;
1228
+ };
1229
1229
  surface: {
1230
1230
  surface: string;
1231
1231
  bright: string;
@@ -1752,10 +1752,6 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
1752
1752
  "60": string;
1753
1753
  "70": string;
1754
1754
  };
1755
- outline: {
1756
- outer: string;
1757
- inner: string;
1758
- };
1759
1755
  alert: {
1760
1756
  success: string;
1761
1757
  successTint: string;
@@ -1792,6 +1788,10 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
1792
1788
  onBrandVariant: string;
1793
1789
  };
1794
1790
  };
1791
+ outline: {
1792
+ outer: string;
1793
+ inner: string;
1794
+ };
1795
1795
  surface: {
1796
1796
  surface: string;
1797
1797
  bright: string;
@@ -2318,10 +2318,6 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
2318
2318
  "60": string;
2319
2319
  "70": string;
2320
2320
  };
2321
- outline: {
2322
- outer: string;
2323
- inner: string;
2324
- };
2325
2321
  alert: {
2326
2322
  success: string;
2327
2323
  successTint: string;
@@ -2358,6 +2354,10 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
2358
2354
  onBrandVariant: string;
2359
2355
  };
2360
2356
  };
2357
+ outline: {
2358
+ outer: string;
2359
+ inner: string;
2360
+ };
2361
2361
  surface: {
2362
2362
  surface: string;
2363
2363
  bright: string;
@@ -2884,10 +2884,6 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
2884
2884
  "60": string;
2885
2885
  "70": string;
2886
2886
  };
2887
- outline: {
2888
- outer: string;
2889
- inner: string;
2890
- };
2891
2887
  alert: {
2892
2888
  success: string;
2893
2889
  successTint: string;
@@ -2924,6 +2920,10 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
2924
2920
  onBrandVariant: string;
2925
2921
  };
2926
2922
  };
2923
+ outline: {
2924
+ outer: string;
2925
+ inner: string;
2926
+ };
2927
2927
  surface: {
2928
2928
  surface: string;
2929
2929
  bright: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ovotech/element-native",
3
- "version": "5.1.1",
3
+ "version": "5.2.0-canary-9460c0f-363",
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": "4.1.0-canary-9460c0f-363",
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": "4.0.1"
20
+ "react-native-reanimated-carousel": "^3.5.1"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@babel/core": "^7.11.5",