@ovotech/element-native 3.7.0 → 3.8.0-canary-9bfdab2-202
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/styles.d.ts +33 -6
- package/dist/components/ActionCard/ActionCard.js +1 -1
- package/dist/components/ActionList/ActionList.d.ts +1 -1
- package/dist/components/ActionList/ActionList.js +2 -1
- package/dist/components/ActionList/styled.d.ts +66 -12
- package/dist/components/Badge/Badge.d.ts +12 -3
- package/dist/components/Card/Card.d.ts +14 -3
- package/dist/components/Card/Card.js +2 -4
- package/dist/components/DataTable/styles.d.ts +143 -26
- package/dist/components/DescriptionList/styled.d.ts +11 -2
- package/dist/components/Em/Em.d.ts +11 -2
- package/dist/components/ErrorText/ErrorText.d.ts +11 -2
- package/dist/components/Grid/Col.d.ts +11 -2
- package/dist/components/Grid/Row.d.ts +11 -2
- package/dist/components/Heading1/Heading1.d.ts +3 -1
- package/dist/components/Heading1/Heading1.js +4 -2
- package/dist/components/Heading2/Heading2.d.ts +3 -1
- package/dist/components/Heading2/Heading2.js +4 -2
- package/dist/components/Heading3/Heading3.d.ts +3 -1
- package/dist/components/Heading3/Heading3.js +4 -2
- package/dist/components/Heading4/Heading4.d.ts +3 -1
- package/dist/components/Heading4/Heading4.js +4 -2
- package/dist/components/HintText/HintText.d.ts +11 -2
- package/dist/components/HorizontalCarousel/HorizontalCarousel.d.ts +13 -0
- package/dist/components/HorizontalCarousel/HorizontalCarousel.js +92 -0
- package/dist/components/HorizontalCarousel/NavigationDots.d.ts +5 -0
- package/dist/components/HorizontalCarousel/NavigationDots.js +88 -0
- package/dist/components/HorizontalCarousel/index.d.ts +1 -0
- package/dist/components/HorizontalCarousel/index.js +17 -0
- package/dist/components/Label/Label.d.ts +5 -241
- package/dist/components/Label/Label.js +16 -4
- package/dist/components/LabelText/LabelText.d.ts +11 -2
- package/dist/components/Lead/Lead.d.ts +5 -241
- package/dist/components/Lead/Lead.js +18 -4
- package/dist/components/LineThrough/LineThrough.d.ts +11 -2
- package/dist/components/List/styled.d.ts +44 -8
- package/dist/components/Margin/Margin.d.ts +11 -2
- package/dist/components/NavHeader/NavHeader.styles.d.ts +88 -16
- package/dist/components/Notification/Notification.d.ts +23 -5
- package/dist/components/Notification/Notification.js +14 -14
- package/dist/components/P/P.d.ts +2 -0
- package/dist/components/P/P.js +2 -2
- package/dist/components/PasswordInput/PasswordInput.styled.d.ts +11 -2
- package/dist/components/SelectField/Select.d.ts +11 -2
- package/dist/components/Small/Small.d.ts +11 -2
- package/dist/components/Strong/Strong.d.ts +11 -2
- package/dist/components/SubLabelText/SubLabelText.d.ts +11 -2
- package/dist/components/Tabs/Tab.js +6 -6
- package/dist/components/Toggle/styles.d.ts +44 -8
- package/dist/esm/components/ActionCard/ActionCard.js +1 -1
- package/dist/esm/components/ActionList/ActionList.js +2 -1
- package/dist/esm/components/Card/Card.js +2 -4
- package/dist/esm/components/Heading1/Heading1.js +4 -2
- package/dist/esm/components/Heading2/Heading2.js +4 -2
- package/dist/esm/components/Heading3/Heading3.js +4 -2
- package/dist/esm/components/Heading4/Heading4.js +4 -2
- package/dist/esm/components/HorizontalCarousel/HorizontalCarousel.js +62 -0
- package/dist/esm/components/HorizontalCarousel/NavigationDots.js +61 -0
- package/dist/esm/components/HorizontalCarousel/index.js +1 -0
- package/dist/esm/components/Label/Label.js +16 -4
- package/dist/esm/components/Lead/Lead.js +18 -4
- package/dist/esm/components/Notification/Notification.js +14 -14
- package/dist/esm/components/P/P.js +2 -2
- package/dist/esm/components/Tabs/Tab.js +7 -7
- package/dist/esm/index.js +1 -0
- package/dist/esm/theme/index.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/styled.native.d.ts +66 -12
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/index.js +17 -0
- package/package.json +4 -3
|
@@ -58,9 +58,11 @@ var calculateLetterSpacing = function (fontSize, letterSpacing) {
|
|
|
58
58
|
return (0, utils_1.numToPx)((0, utils_1.pxToNumber)(fontSize) * letterSpacing);
|
|
59
59
|
};
|
|
60
60
|
var StyledHeading3 = styled_native_1.default.Text(function (_a) {
|
|
61
|
-
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
|
|
61
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, inverted = _a.inverted;
|
|
62
62
|
var fontSize = core.fontSize.heading3[smallAndUp ? 'large' : 'small'];
|
|
63
|
-
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "])), core.fontFamily.bodyBold.native, fontSize, core.lineHeight.heading3[smallAndUp ? 'large' : 'small'], calculateLetterSpacing(fontSize, core.letterSpacing.compressed),
|
|
63
|
+
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "])), core.fontFamily.bodyBold.native, fontSize, core.lineHeight.heading3[smallAndUp ? 'large' : 'small'], calculateLetterSpacing(fontSize, core.letterSpacing.compressed), inverted
|
|
64
|
+
? semantic.inverted.message.link
|
|
65
|
+
: semantic.message.branded);
|
|
64
66
|
});
|
|
65
67
|
var Heading3 = function (_a) {
|
|
66
68
|
var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'header' : _b, rest = __rest(_a, ["accessibilityRole"]);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { TextProps } from 'react-native';
|
|
3
|
-
export declare const Heading4: ({ accessibilityRole, ...rest }: PropsWithChildren<TextProps
|
|
3
|
+
export declare const Heading4: ({ accessibilityRole, ...rest }: PropsWithChildren<TextProps & {
|
|
4
|
+
inverted?: boolean;
|
|
5
|
+
}>) => JSX.Element;
|
|
@@ -58,9 +58,11 @@ var calculateLetterSpacing = function (fontSize, letterSpacing) {
|
|
|
58
58
|
return (0, utils_1.numToPx)((0, utils_1.pxToNumber)(fontSize) * letterSpacing);
|
|
59
59
|
};
|
|
60
60
|
var StyledHeading4 = styled_native_1.default.Text(function (_a) {
|
|
61
|
-
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
|
|
61
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, inverted = _a.inverted;
|
|
62
62
|
var fontSize = core.fontSize.heading4[smallAndUp ? 'large' : 'small'];
|
|
63
|
-
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "])), core.fontFamily.bodyBold.native, fontSize, core.lineHeight.heading4[smallAndUp ? 'large' : 'small'], calculateLetterSpacing(fontSize, core.letterSpacing.compressed),
|
|
63
|
+
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "])), core.fontFamily.bodyBold.native, fontSize, core.lineHeight.heading4[smallAndUp ? 'large' : 'small'], calculateLetterSpacing(fontSize, core.letterSpacing.compressed), inverted
|
|
64
|
+
? semantic.inverted.message.link
|
|
65
|
+
: semantic.message.branded);
|
|
64
66
|
});
|
|
65
67
|
var Heading4 = function (_a) {
|
|
66
68
|
var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'header' : _b, rest = __rest(_a, ["accessibilityRole"]);
|
|
@@ -11,6 +11,7 @@ declare const HintText: import("react").ForwardRefExoticComponent<Pick<Omit<{
|
|
|
11
11
|
borderWidth: Record<"small" | "medium" | "large", string>;
|
|
12
12
|
breakpoint: Record<"small" | "medium" | "large", string | number>;
|
|
13
13
|
mediaQuery: Record<"small" | "medium" | "large", string>;
|
|
14
|
+
customMediaQuery: Record<"small-and-up" | "medium-and-up" | "large-and-up", string>;
|
|
14
15
|
space: Record<0 | 2 | 1 | 3 | 4 | 5 | 10 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15, string>;
|
|
15
16
|
transition: Record<"medium" | "slow" | "fast", string>;
|
|
16
17
|
opacity: Record<"solid" | "transparent" | "translucent", string | number>;
|
|
@@ -42,12 +43,20 @@ declare const HintText: import("react").ForwardRefExoticComponent<Pick<Omit<{
|
|
|
42
43
|
};
|
|
43
44
|
semantic: {
|
|
44
45
|
surface: Record<"base" | "cutout" | "elevated", string>;
|
|
45
|
-
message: Record<"base" | "link" | "secondary" | "
|
|
46
|
+
message: Record<"base" | "link" | "secondary" | "branded" | "error", string>;
|
|
47
|
+
branded: Record<"message" | "heading" | "surface", string>;
|
|
46
48
|
border: Record<"graphic" | "differentiated" | "functional", string>;
|
|
47
49
|
focus: Record<"surface" | "outline" | "hover", string>;
|
|
48
|
-
inverted: Record<"surface" | "border", string> & {
|
|
50
|
+
inverted: Record<"surface" | "surfaceAlt" | "border" | "borderAlt", string> & {
|
|
49
51
|
message: Record<"base" | "link" | "secondary" | "branded", string>;
|
|
50
52
|
};
|
|
53
|
+
neutral: {
|
|
54
|
+
border: string;
|
|
55
|
+
surface: string;
|
|
56
|
+
surfaceEmphasis: string;
|
|
57
|
+
message: string;
|
|
58
|
+
messageOnEmphasis: string;
|
|
59
|
+
};
|
|
51
60
|
success: {
|
|
52
61
|
border: string;
|
|
53
62
|
surface: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface HorizontalCarouselProps<T> {
|
|
2
|
+
data: T[];
|
|
3
|
+
children: (item: T) => JSX.Element;
|
|
4
|
+
width?: number;
|
|
5
|
+
height: number;
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
showArrows?: boolean;
|
|
8
|
+
showDots?: boolean;
|
|
9
|
+
loop?: boolean;
|
|
10
|
+
arrowsDistanceFromTop?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function HorizontalCarousel<T>({ data, children, width, height, fullWidth, showArrows, showDots, loop, arrowsDistanceFromTop, }: HorizontalCarouselProps<T>): JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
|
+
};
|
|
43
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
+
exports.HorizontalCarousel = void 0;
|
|
45
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
46
|
+
var react_1 = require("react");
|
|
47
|
+
var react_native_1 = require("react-native");
|
|
48
|
+
var react_native_reanimated_1 = require("react-native-reanimated");
|
|
49
|
+
var react_native_reanimated_carousel_1 = __importDefault(require("react-native-reanimated-carousel"));
|
|
50
|
+
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
51
|
+
var Icon_1 = require("../Icon");
|
|
52
|
+
var NavigationDots_1 = require("./NavigationDots");
|
|
53
|
+
function HorizontalCarousel(_a) {
|
|
54
|
+
var data = _a.data, children = _a.children, width = _a.width, height = _a.height, fullWidth = _a.fullWidth, _b = _a.showArrows, showArrows = _b === void 0 ? true : _b, _c = _a.showDots, showDots = _c === void 0 ? true : _c, _d = _a.loop, loop = _d === void 0 ? true : _d, arrowsDistanceFromTop = _a.arrowsDistanceFromTop;
|
|
55
|
+
var theme = (0, styled_native_1.useTheme)();
|
|
56
|
+
var carouselRef = (0, react_1.useRef)(null);
|
|
57
|
+
var progressValue = (0, react_native_reanimated_1.useSharedValue)(0);
|
|
58
|
+
var windowWidth = (0, react_native_1.useWindowDimensions)().width;
|
|
59
|
+
var carouselWidth = fullWidth ? windowWidth : width || windowWidth;
|
|
60
|
+
return ((0, jsx_runtime_1.jsxs)(SCarouselContainer, { children: [(0, jsx_runtime_1.jsx)(react_native_reanimated_carousel_1.default, { ref: carouselRef, data: data, renderItem: function (_a) {
|
|
61
|
+
var item = _a.item;
|
|
62
|
+
return ((0, jsx_runtime_1.jsx)(SItemContainer, __assign({ "$itemWidth": carouselWidth }, { children: children(item) })));
|
|
63
|
+
}, vertical: false, width: carouselWidth, height: height, onProgressChange: function (_, absoluteProgress) {
|
|
64
|
+
return (progressValue.value = absoluteProgress);
|
|
65
|
+
}, panGestureHandlerProps: {
|
|
66
|
+
activeOffsetX: [-20, 20],
|
|
67
|
+
}, loop: loop, testID: "carousel" }), showArrows && data.length > 1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SActionPressable, __assign({ onPress: function () { var _a; return (_a = carouselRef.current) === null || _a === void 0 ? void 0 : _a.prev(); }, "$top": arrowsDistanceFromTop, hitSlop: {
|
|
68
|
+
top: 32,
|
|
69
|
+
bottom: 32,
|
|
70
|
+
left: 16,
|
|
71
|
+
right: 16,
|
|
72
|
+
} }, { children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: "arrow-left", size: 16, color: theme.core.color.brand.white }) })), (0, jsx_runtime_1.jsx)(SActionPressable, __assign({ "$next": true, onPress: function () { var _a; return (_a = carouselRef.current) === null || _a === void 0 ? void 0 : _a.next(); }, "$top": arrowsDistanceFromTop, hitSlop: {
|
|
73
|
+
top: 32,
|
|
74
|
+
bottom: 32,
|
|
75
|
+
left: 16,
|
|
76
|
+
right: 16,
|
|
77
|
+
} }, { children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: "arrow-right", size: 16, color: theme.core.color.brand.white }) }))] })), showDots && data.length > 1 && ((0, jsx_runtime_1.jsx)(NavigationDots_1.NavigationDots, { data: data, animatedValue: progressValue }))] }));
|
|
78
|
+
}
|
|
79
|
+
exports.HorizontalCarousel = HorizontalCarousel;
|
|
80
|
+
var SCarouselContainer = styled_native_1.default.View(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n"], ["\n align-items: center;\n"])));
|
|
81
|
+
var SItemContainer = styled_native_1.default.View(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n width: ", "px;\n height: 100%;\n justify-content: center;\n align-items: center;\n"], ["\n position: relative;\n width: ", "px;\n height: 100%;\n justify-content: center;\n align-items: center;\n"])), function (_a) {
|
|
82
|
+
var $itemWidth = _a.$itemWidth;
|
|
83
|
+
return $itemWidth;
|
|
84
|
+
});
|
|
85
|
+
var SActionPressable = styled_native_1.default.Pressable(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n top: ", ";\n ", ";\n"], ["\n position: absolute;\n top: ", ";\n ", ";\n"])), function (_a) {
|
|
86
|
+
var $top = _a.$top;
|
|
87
|
+
return ($top ? "".concat($top, "px") : '50%');
|
|
88
|
+
}, function (_a) {
|
|
89
|
+
var theme = _a.theme, $next = _a.$next;
|
|
90
|
+
return $next ? "right: ".concat(theme.core.space[6]) : "left: ".concat(theme.core.space[6]);
|
|
91
|
+
});
|
|
92
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.NavigationDots = void 0;
|
|
42
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
43
|
+
var react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
|
|
44
|
+
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
45
|
+
function NavigationDots(_a) {
|
|
46
|
+
var data = _a.data, animatedValue = _a.animatedValue;
|
|
47
|
+
return ((0, jsx_runtime_1.jsx)(SDotsContainer, { children: data.map(function (_, index) { return ((0, jsx_runtime_1.jsx)(Dot, { index: index, length: data.length, animatedValue: animatedValue }, index)); }) }));
|
|
48
|
+
}
|
|
49
|
+
exports.NavigationDots = NavigationDots;
|
|
50
|
+
var Dot = function (_a) {
|
|
51
|
+
var animatedValue = _a.animatedValue, index = _a.index, length = _a.length, _b = _a.width, width = _b === void 0 ? 10 : _b;
|
|
52
|
+
var theme = (0, styled_native_1.useTheme)();
|
|
53
|
+
var animatedStyle = (0, react_native_reanimated_1.useAnimatedStyle)(function () {
|
|
54
|
+
var inputRange = [index - 1, index, index + 1];
|
|
55
|
+
var outputRange = [-width, 0, width];
|
|
56
|
+
if (index === 0 && (animatedValue === null || animatedValue === void 0 ? void 0 : animatedValue.value) > length - 1) {
|
|
57
|
+
inputRange = [length - 1, length, length + 1];
|
|
58
|
+
outputRange = [-width, 0, width];
|
|
59
|
+
}
|
|
60
|
+
var backgroundColor = (0, react_native_reanimated_1.interpolateColor)(animatedValue === null || animatedValue === void 0 ? void 0 : animatedValue.value, inputRange, [
|
|
61
|
+
theme.core.color.brand.forest,
|
|
62
|
+
theme.core.color.brand.energised,
|
|
63
|
+
theme.core.color.brand.forest,
|
|
64
|
+
]);
|
|
65
|
+
return {
|
|
66
|
+
transform: [
|
|
67
|
+
{
|
|
68
|
+
translateX: (0, react_native_reanimated_1.interpolate)(animatedValue === null || animatedValue === void 0 ? void 0 : animatedValue.value, inputRange, outputRange, react_native_reanimated_1.Extrapolate.CLAMP),
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
backgroundColor: backgroundColor,
|
|
72
|
+
};
|
|
73
|
+
}, [animatedValue, index, length]);
|
|
74
|
+
return ((0, jsx_runtime_1.jsx)(SDot, __assign({ "$width": width }, { children: (0, jsx_runtime_1.jsx)(SAnimatedDot, { style: animatedStyle }) })));
|
|
75
|
+
};
|
|
76
|
+
var SDotsContainer = styled_native_1.default.View(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n bottom: 20px;\n flex-direction: row;\n gap: 10px;\n"], ["\n position: absolute;\n bottom: 20px;\n flex-direction: row;\n gap: 10px;\n"])));
|
|
77
|
+
var SDot = styled_native_1.default.View(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n width: ", "px;\n height: ", "px;\n border-radius: 50px;\n overflow: hidden;\n"], ["\n background-color: ", ";\n width: ", "px;\n height: ", "px;\n border-radius: 50px;\n overflow: hidden;\n"])), function (_a) {
|
|
78
|
+
var theme = _a.theme;
|
|
79
|
+
return theme.core.color.brand.forest;
|
|
80
|
+
}, function (_a) {
|
|
81
|
+
var $width = _a.$width;
|
|
82
|
+
return $width;
|
|
83
|
+
}, function (_a) {
|
|
84
|
+
var $width = _a.$width;
|
|
85
|
+
return $width;
|
|
86
|
+
});
|
|
87
|
+
var SAnimatedDot = (0, styled_native_1.default)(react_native_reanimated_1.default.View)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-radius: 20px;\n flex: 1;\n"], ["\n border-radius: 20px;\n flex: 1;\n"])));
|
|
88
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './HorizontalCarousel';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./HorizontalCarousel"), exports);
|
|
@@ -1,243 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export declare const Label: import("react").ForwardRefExoticComponent<
|
|
4
|
-
|
|
5
|
-
[x: number]: any;
|
|
6
|
-
[x: symbol]: any;
|
|
2
|
+
import { TextProps } from 'react-native';
|
|
3
|
+
export declare const Label: import("react").ForwardRefExoticComponent<TextProps & {
|
|
4
|
+
inverted?: boolean | undefined;
|
|
7
5
|
} & {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
radius: Record<"small" | "medium" | "large" | "max", string>;
|
|
11
|
-
borderWidth: Record<"small" | "medium" | "large", string>;
|
|
12
|
-
breakpoint: Record<"small" | "medium" | "large", string | number>;
|
|
13
|
-
mediaQuery: Record<"small" | "medium" | "large", string>;
|
|
14
|
-
space: Record<0 | 2 | 1 | 3 | 4 | 5 | 10 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15, string>;
|
|
15
|
-
transition: Record<"medium" | "slow" | "fast", string>;
|
|
16
|
-
opacity: Record<"solid" | "transparent" | "translucent", string | number>;
|
|
17
|
-
color: Record<"neutral" | "red" | "orange" | "yellow" | "green" | "blue", {
|
|
18
|
-
lightest: string;
|
|
19
|
-
lighter: string;
|
|
20
|
-
light: string;
|
|
21
|
-
base: string;
|
|
22
|
-
dark: string;
|
|
23
|
-
darker: string;
|
|
24
|
-
darkest: string;
|
|
25
|
-
}> & {
|
|
26
|
-
brand: Record<string, string>;
|
|
27
|
-
};
|
|
28
|
-
fontFamily: Record<"body" | "mono" | "heading" | "bodyBold", {
|
|
29
|
-
native: string;
|
|
30
|
-
web: string;
|
|
31
|
-
}>;
|
|
32
|
-
fontWeight: Record<"bold" | "book" | "black", string | number>;
|
|
33
|
-
fontSize: Record<"small" | "body" | "label" | "heading1" | "heading2" | "heading3" | "heading4" | "lead", {
|
|
34
|
-
small: string | number;
|
|
35
|
-
large: string | number;
|
|
36
|
-
}>;
|
|
37
|
-
lineHeight: Record<"small" | "body" | "label" | "heading1" | "heading2" | "heading3" | "heading4" | "lead", {
|
|
38
|
-
small: string | number;
|
|
39
|
-
large: string | number;
|
|
40
|
-
}>;
|
|
41
|
-
letterSpacing: Record<"base" | "compressed" | "extraCompressed", number>;
|
|
42
|
-
};
|
|
43
|
-
semantic: {
|
|
44
|
-
surface: Record<"base" | "cutout" | "elevated", string>;
|
|
45
|
-
message: Record<"base" | "link" | "secondary" | "error" | "branded", string>;
|
|
46
|
-
border: Record<"graphic" | "differentiated" | "functional", string>;
|
|
47
|
-
focus: Record<"surface" | "outline" | "hover", string>;
|
|
48
|
-
inverted: Record<"surface" | "border", string> & {
|
|
49
|
-
message: Record<"base" | "link" | "secondary" | "branded", string>;
|
|
50
|
-
};
|
|
51
|
-
success: {
|
|
52
|
-
border: string;
|
|
53
|
-
surface: string;
|
|
54
|
-
surfaceEmphasis: string;
|
|
55
|
-
message: string;
|
|
56
|
-
messageOnEmphasis: string;
|
|
57
|
-
};
|
|
58
|
-
warning: {
|
|
59
|
-
border: string;
|
|
60
|
-
surface: string;
|
|
61
|
-
surfaceEmphasis: string;
|
|
62
|
-
message: string;
|
|
63
|
-
messageOnEmphasis: string;
|
|
64
|
-
};
|
|
65
|
-
error: {
|
|
66
|
-
border: string;
|
|
67
|
-
surface: string;
|
|
68
|
-
surfaceEmphasis: string;
|
|
69
|
-
message: string;
|
|
70
|
-
messageOnEmphasis: string;
|
|
71
|
-
};
|
|
72
|
-
info: {
|
|
73
|
-
border: string;
|
|
74
|
-
surface: string;
|
|
75
|
-
surfaceEmphasis: string;
|
|
76
|
-
message: string;
|
|
77
|
-
messageOnEmphasis: string;
|
|
78
|
-
};
|
|
79
|
-
data: Record<"branded" | "gas" | "electric", Record<2 | 1 | 3 | 4, string>>;
|
|
80
|
-
};
|
|
81
|
-
component: {
|
|
82
|
-
heading1: {
|
|
83
|
-
fontFamily: string;
|
|
84
|
-
fontWeight: string | number;
|
|
85
|
-
fontSize: {
|
|
86
|
-
small: string | number;
|
|
87
|
-
large: string | number;
|
|
88
|
-
};
|
|
89
|
-
lineHeight: {
|
|
90
|
-
small: string | number;
|
|
91
|
-
large: string | number;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
heading2: {
|
|
95
|
-
fontFamily: string;
|
|
96
|
-
fontWeight: string | number;
|
|
97
|
-
fontSize: {
|
|
98
|
-
small: string | number;
|
|
99
|
-
large: string | number;
|
|
100
|
-
};
|
|
101
|
-
lineHeight: {
|
|
102
|
-
small: string | number;
|
|
103
|
-
large: string | number;
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
heading3: {
|
|
107
|
-
fontFamily: string;
|
|
108
|
-
fontWeight: string | number;
|
|
109
|
-
fontSize: {
|
|
110
|
-
small: string | number;
|
|
111
|
-
large: string | number;
|
|
112
|
-
};
|
|
113
|
-
lineHeight: {
|
|
114
|
-
small: string | number;
|
|
115
|
-
large: string | number;
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
heading4: {
|
|
119
|
-
fontFamily: string;
|
|
120
|
-
fontWeight: string | number;
|
|
121
|
-
fontSize: {
|
|
122
|
-
small: string | number;
|
|
123
|
-
large: string | number;
|
|
124
|
-
};
|
|
125
|
-
lineHeight: {
|
|
126
|
-
small: string | number;
|
|
127
|
-
large: string | number;
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
lead: {
|
|
131
|
-
fontFamily: string;
|
|
132
|
-
fontWeight: string | number;
|
|
133
|
-
fontSize: {
|
|
134
|
-
small: string | number;
|
|
135
|
-
large: string | number;
|
|
136
|
-
};
|
|
137
|
-
lineHeight: {
|
|
138
|
-
small: string | number;
|
|
139
|
-
large: string | number;
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
body: {
|
|
143
|
-
fontFamily: string;
|
|
144
|
-
fontWeight: string | number;
|
|
145
|
-
fontSize: {
|
|
146
|
-
small: string | number;
|
|
147
|
-
large: string | number;
|
|
148
|
-
};
|
|
149
|
-
lineHeight: {
|
|
150
|
-
small: string | number;
|
|
151
|
-
large: string | number;
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
small: {
|
|
155
|
-
fontFamily: string;
|
|
156
|
-
fontWeight: string | number;
|
|
157
|
-
fontSize: {
|
|
158
|
-
small: string | number;
|
|
159
|
-
large: string | number;
|
|
160
|
-
};
|
|
161
|
-
lineHeight: {
|
|
162
|
-
small: string | number;
|
|
163
|
-
large: string | number;
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
label: {
|
|
167
|
-
fontFamily: string;
|
|
168
|
-
fontWeight: string | number;
|
|
169
|
-
fontSize: {
|
|
170
|
-
small: string | number;
|
|
171
|
-
large: string | number;
|
|
172
|
-
};
|
|
173
|
-
lineHeight: {
|
|
174
|
-
small: string | number;
|
|
175
|
-
large: string | number;
|
|
176
|
-
};
|
|
177
|
-
};
|
|
178
|
-
cta: {
|
|
179
|
-
primary: {
|
|
180
|
-
message: string;
|
|
181
|
-
surface: string;
|
|
182
|
-
messageHover: string;
|
|
183
|
-
surfaceHover: string;
|
|
184
|
-
messageFocused: string;
|
|
185
|
-
surfaceFocused: string;
|
|
186
|
-
outlineFocused: string;
|
|
187
|
-
backgroundFocused: string;
|
|
188
|
-
};
|
|
189
|
-
secondary: {
|
|
190
|
-
message: string;
|
|
191
|
-
surface: string;
|
|
192
|
-
messageHover: string;
|
|
193
|
-
surfaceHover: string;
|
|
194
|
-
messageFocused: string;
|
|
195
|
-
surfaceFocused: string;
|
|
196
|
-
outlineFocused: string;
|
|
197
|
-
backgroundFocused: string;
|
|
198
|
-
};
|
|
199
|
-
destructive: {
|
|
200
|
-
message: string;
|
|
201
|
-
surface: string;
|
|
202
|
-
messageHover: string;
|
|
203
|
-
surfaceHover: string;
|
|
204
|
-
messageFocused: string;
|
|
205
|
-
surfaceFocused: string;
|
|
206
|
-
outlineFocused: string;
|
|
207
|
-
backgroundFocused: string;
|
|
208
|
-
};
|
|
209
|
-
};
|
|
210
|
-
badge: {
|
|
211
|
-
variants: {
|
|
212
|
-
neutral: {
|
|
213
|
-
foreground: string;
|
|
214
|
-
background: string;
|
|
215
|
-
};
|
|
216
|
-
red: {
|
|
217
|
-
foreground: string;
|
|
218
|
-
background: string;
|
|
219
|
-
};
|
|
220
|
-
orange: {
|
|
221
|
-
foreground: string;
|
|
222
|
-
background: string;
|
|
223
|
-
};
|
|
224
|
-
yellow: {
|
|
225
|
-
foreground: string;
|
|
226
|
-
background: string;
|
|
227
|
-
};
|
|
228
|
-
green: {
|
|
229
|
-
foreground: string;
|
|
230
|
-
background: string;
|
|
231
|
-
};
|
|
232
|
-
blue: {
|
|
233
|
-
foreground: string;
|
|
234
|
-
background: string;
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
|
-
};
|
|
239
|
-
} | undefined;
|
|
240
|
-
} & {
|
|
241
|
-
as?: string | import("react").ComponentType<any> | undefined;
|
|
242
|
-
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
243
|
-
}, import("../../hooks").BreakpointNames>, string | number | symbol> & import("react").RefAttributes<Text>>;
|
|
6
|
+
children?: import("react").ReactNode;
|
|
7
|
+
} & import("react").RefAttributes<unknown>>;
|
|
@@ -3,6 +3,17 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
3
3
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
4
|
return cooked;
|
|
5
5
|
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
6
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
18
|
if (k2 === undefined) k2 = k;
|
|
8
19
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -28,11 +39,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
28
39
|
};
|
|
29
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
41
|
exports.Label = void 0;
|
|
42
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
43
|
+
var react_1 = require("react");
|
|
31
44
|
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
32
|
-
var utils_1 = require("../../utils");
|
|
33
45
|
var StyledLabel = styled_native_1.default.Text(function (_a) {
|
|
34
|
-
var
|
|
35
|
-
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n "])), core.fontFamily.body.native, core.fontSize.label[smallAndUp ? 'large' : 'small'], core.lineHeight.label[smallAndUp ? 'large' : 'small']);
|
|
46
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, inverted = _a.inverted;
|
|
47
|
+
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "])), core.fontFamily.body.native, core.fontSize.label[smallAndUp ? 'large' : 'small'], core.lineHeight.label[smallAndUp ? 'large' : 'small'], inverted ? semantic.inverted.message.base : semantic.message.base);
|
|
36
48
|
});
|
|
37
|
-
exports.Label = (0,
|
|
49
|
+
exports.Label = (0, react_1.forwardRef)(function (props, ref) { return ((0, jsx_runtime_1.jsx)(StyledLabel, __assign({}, props, { ref: ref }))); });
|
|
38
50
|
var templateObject_1;
|
|
@@ -11,6 +11,7 @@ declare const LabelText: import("react").ForwardRefExoticComponent<Pick<Omit<{
|
|
|
11
11
|
borderWidth: Record<"small" | "medium" | "large", string>;
|
|
12
12
|
breakpoint: Record<"small" | "medium" | "large", string | number>;
|
|
13
13
|
mediaQuery: Record<"small" | "medium" | "large", string>;
|
|
14
|
+
customMediaQuery: Record<"small-and-up" | "medium-and-up" | "large-and-up", string>;
|
|
14
15
|
space: Record<0 | 2 | 1 | 3 | 4 | 5 | 10 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15, string>;
|
|
15
16
|
transition: Record<"medium" | "slow" | "fast", string>;
|
|
16
17
|
opacity: Record<"solid" | "transparent" | "translucent", string | number>;
|
|
@@ -42,12 +43,20 @@ declare const LabelText: import("react").ForwardRefExoticComponent<Pick<Omit<{
|
|
|
42
43
|
};
|
|
43
44
|
semantic: {
|
|
44
45
|
surface: Record<"base" | "cutout" | "elevated", string>;
|
|
45
|
-
message: Record<"base" | "link" | "secondary" | "
|
|
46
|
+
message: Record<"base" | "link" | "secondary" | "branded" | "error", string>;
|
|
47
|
+
branded: Record<"message" | "heading" | "surface", string>;
|
|
46
48
|
border: Record<"graphic" | "differentiated" | "functional", string>;
|
|
47
49
|
focus: Record<"surface" | "outline" | "hover", string>;
|
|
48
|
-
inverted: Record<"surface" | "border", string> & {
|
|
50
|
+
inverted: Record<"surface" | "surfaceAlt" | "border" | "borderAlt", string> & {
|
|
49
51
|
message: Record<"base" | "link" | "secondary" | "branded", string>;
|
|
50
52
|
};
|
|
53
|
+
neutral: {
|
|
54
|
+
border: string;
|
|
55
|
+
surface: string;
|
|
56
|
+
surfaceEmphasis: string;
|
|
57
|
+
message: string;
|
|
58
|
+
messageOnEmphasis: string;
|
|
59
|
+
};
|
|
51
60
|
success: {
|
|
52
61
|
border: string;
|
|
53
62
|
surface: string;
|