@ovotech/element-native 4.4.7 → 4.4.8-canary-27fcd9d-331
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.
|
@@ -78,11 +78,11 @@ var FilterSelect = function (_a) {
|
|
|
78
78
|
});
|
|
79
79
|
}, accessible: true, accessibilityRole: "combobox", accessibilityHint: accessibilityHint, 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
|
-
: (_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
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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)(react_native_1.TouchableWithoutFeedback, { onPress: function () { return setOpen(false); }, children: (0, jsx_runtime_1.jsx)(DropdownWrapper, { children: (0, jsx_runtime_1.jsx)(DropdownContainer, { style: {
|
|
82
|
+
top: measure === null || measure === void 0 ? void 0 : measure.top,
|
|
83
|
+
left: dropdownDirection === 'right' ? measure === null || measure === void 0 ? void 0 : measure.left : undefined,
|
|
84
|
+
right: dropdownDirection === 'left' ? measure === null || measure === void 0 ? void 0 : measure.right : undefined,
|
|
85
|
+
}, children: (0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { nestedScrollEnabled: true, children: options.map(function (option, i) { return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SelectOption, { accessible: true, accessibilityRole: "button", onPress: function () { return handleOptionPress(option); }, children: (0, jsx_runtime_1.jsx)(Margin_1.Margin, { vertical: 3, children: (0, jsx_runtime_1.jsx)(P_1.P, { children: (0, jsx_runtime_1.jsx)(Strong_1.Strong, { children: option.label }) }) }) }), i === options.length - 1 ? null : ((0, jsx_runtime_1.jsx)(Divider_1.Divider, { type: "differentiated" }))] }, option.label)); }) }) }) }) }) })] }));
|
|
86
86
|
};
|
|
87
87
|
exports.FilterSelect = FilterSelect;
|
|
88
88
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -43,7 +43,7 @@ var Strong_1 = require("../Strong");
|
|
|
43
43
|
var SelectInput = styled_native_1.default.TouchableOpacity(function (_a) {
|
|
44
44
|
var _b = _a.theme, semantic = _b.semantic, core = _b.core, hasError = _a.hasError;
|
|
45
45
|
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n align-items: center;\n background-color: transparent;\n border-color: ", ";\n border-width: ", ";\n border-radius: ", ";\n padding: ", ";\n padding-right: 14px;\n height: 44px;\n "], ["\n flex-direction: row;\n align-items: center;\n background-color: transparent;\n border-color: ", ";\n border-width: ", ";\n border-radius: ", ";\n padding: ", ";\n padding-right: 14px;\n height: 44px;\n "])), hasError
|
|
46
|
-
? semantic.error.
|
|
46
|
+
? semantic.error.message
|
|
47
47
|
: semantic.border.functional, (0, element_core_1.numToPx)(core.borderWidth.small), (0, element_core_1.numToPx)(core.radius.small), (0, element_core_1.numToPx)(core.space[2]));
|
|
48
48
|
});
|
|
49
49
|
var DropdownWrapper = styled_native_1.default.View(function (_a) {
|
|
@@ -5,7 +5,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
5
5
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
import { numToPx } from '@ovotech/element-core';
|
|
7
7
|
import { Fragment, useRef, useState } from 'react';
|
|
8
|
-
import { Dimensions, Modal, ScrollView, View, } from 'react-native';
|
|
8
|
+
import { Dimensions, Modal, ScrollView, TouchableWithoutFeedback, View, } from 'react-native';
|
|
9
9
|
import styled, { css, useTheme } from '../../styled.native';
|
|
10
10
|
import { Divider } from '../Divider';
|
|
11
11
|
import { Icon } from '../Icon';
|
|
@@ -52,10 +52,10 @@ export var FilterSelect = function (_a) {
|
|
|
52
52
|
});
|
|
53
53
|
}, accessible: true, accessibilityRole: "combobox", accessibilityHint: accessibilityHint, children: [_jsx(P, { children: _jsx(Strong, { children: selected.value === 'default'
|
|
54
54
|
? ''
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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(TouchableWithoutFeedback, { onPress: function () { return setOpen(false); }, children: _jsx(DropdownWrapper, { children: _jsx(DropdownContainer, { style: {
|
|
56
|
+
top: measure === null || measure === void 0 ? void 0 : measure.top,
|
|
57
|
+
left: dropdownDirection === 'right' ? measure === null || measure === void 0 ? void 0 : measure.left : undefined,
|
|
58
|
+
right: dropdownDirection === 'left' ? measure === null || measure === void 0 ? void 0 : measure.right : undefined,
|
|
59
|
+
}, children: _jsx(ScrollView, { nestedScrollEnabled: true, children: options.map(function (option, i) { return (_jsxs(Fragment, { children: [_jsx(SelectOption, { accessible: true, accessibilityRole: "button", onPress: function () { return handleOptionPress(option); }, children: _jsx(Margin, { vertical: 3, children: _jsx(P, { children: _jsx(Strong, { children: option.label }) }) }) }), i === options.length - 1 ? null : (_jsx(Divider, { type: "differentiated" }))] }, option.label)); }) }) }) }) }) })] }));
|
|
60
60
|
};
|
|
61
61
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -14,7 +14,7 @@ import { Strong } from '../Strong';
|
|
|
14
14
|
var SelectInput = styled.TouchableOpacity(function (_a) {
|
|
15
15
|
var _b = _a.theme, semantic = _b.semantic, core = _b.core, hasError = _a.hasError;
|
|
16
16
|
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n align-items: center;\n background-color: transparent;\n border-color: ", ";\n border-width: ", ";\n border-radius: ", ";\n padding: ", ";\n padding-right: 14px;\n height: 44px;\n "], ["\n flex-direction: row;\n align-items: center;\n background-color: transparent;\n border-color: ", ";\n border-width: ", ";\n border-radius: ", ";\n padding: ", ";\n padding-right: 14px;\n height: 44px;\n "])), hasError
|
|
17
|
-
? semantic.error.
|
|
17
|
+
? semantic.error.message
|
|
18
18
|
: semantic.border.functional, numToPx(core.borderWidth.small), numToPx(core.radius.small), numToPx(core.space[2]));
|
|
19
19
|
});
|
|
20
20
|
var DropdownWrapper = styled.View(function (_a) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ovotech/element-native",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.8-canary-27fcd9d-331",
|
|
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.2.1-canary-27fcd9d-331",
|
|
17
18
|
"deepmerge": "^4.2.2",
|
|
18
19
|
"lodash.groupby": "^4.6.0",
|
|
19
|
-
"react-native-reanimated-carousel": "^3.5.1"
|
|
20
|
-
"@ovotech/element-core": "3.2.1"
|
|
20
|
+
"react-native-reanimated-carousel": "^3.5.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@babel/core": "^7.11.5",
|