@ovotech/element-native 3.4.1 → 3.5.0-canary-8ac6eb7-155

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 (62) hide show
  1. package/dist/components/Accordion/styles.d.ts +12 -0
  2. package/dist/components/ActionCard/ActionCard.js +1 -1
  3. package/dist/components/ActionList/ActionList.d.ts +2 -1
  4. package/dist/components/ActionList/ActionList.js +4 -4
  5. package/dist/components/ActionList/styled.d.ts +263 -2
  6. package/dist/components/ActionList/styled.js +12 -10
  7. package/dist/components/Badge/Badge.d.ts +4 -0
  8. package/dist/components/Card/Card.d.ts +4 -0
  9. package/dist/components/DataTable/TableRow.js +7 -1
  10. package/dist/components/DataTable/styles.d.ts +510 -0
  11. package/dist/components/DataTable/styles.js +16 -5
  12. package/dist/components/DataTable/types.d.ts +8 -2
  13. package/dist/components/DescriptionList/styled.d.ts +4 -0
  14. package/dist/components/Em/Em.d.ts +4 -0
  15. package/dist/components/ErrorText/ErrorText.d.ts +4 -0
  16. package/dist/components/FilterSelect/FilterSelect.d.ts +14 -0
  17. package/dist/components/FilterSelect/FilterSelect.js +89 -0
  18. package/dist/components/FilterSelect/index.d.ts +1 -0
  19. package/dist/components/FilterSelect/index.js +5 -0
  20. package/dist/components/Grid/Col.d.ts +4 -0
  21. package/dist/components/Grid/Row.d.ts +4 -0
  22. package/dist/components/HintText/HintText.d.ts +4 -0
  23. package/dist/components/LabelText/LabelText.d.ts +4 -0
  24. package/dist/components/LineThrough/LineThrough.d.ts +4 -0
  25. package/dist/components/List/List.d.ts +4 -0
  26. package/dist/components/List/List.js +30 -24
  27. package/dist/components/List/styled.d.ts +24 -0
  28. package/dist/components/List/styled.js +2 -2
  29. package/dist/components/Margin/Margin.d.ts +4 -0
  30. package/dist/components/NavHeader/NavHeader.styles.d.ts +28 -0
  31. package/dist/components/Notification/Notification.d.ts +8 -0
  32. package/dist/components/P/P.d.ts +4 -0
  33. package/dist/components/PasswordInput/PasswordInput.styled.d.ts +4 -0
  34. package/dist/components/SelectField/Select.d.ts +4 -0
  35. package/dist/components/Small/Small.d.ts +4 -0
  36. package/dist/components/Strong/Strong.d.ts +4 -0
  37. package/dist/components/SubLabelText/SubLabelText.d.ts +4 -0
  38. package/dist/components/index.d.ts +1 -0
  39. package/dist/components/index.js +1 -0
  40. package/dist/esm/components/ActionCard/ActionCard.js +1 -1
  41. package/dist/esm/components/ActionList/ActionList.js +4 -4
  42. package/dist/esm/components/ActionList/styled.js +12 -10
  43. package/dist/esm/components/DataTable/TableRow.js +8 -2
  44. package/dist/esm/components/DataTable/styles.js +15 -4
  45. package/dist/esm/components/FilterSelect/FilterSelect.js +62 -0
  46. package/dist/esm/components/FilterSelect/index.js +1 -0
  47. package/dist/esm/components/List/List.js +31 -25
  48. package/dist/esm/components/List/styled.js +2 -2
  49. package/dist/esm/components/index.js +1 -0
  50. package/dist/esm/providers/IconsProvider.js +2 -1
  51. package/dist/esm/providers/icons/Logo.js +3 -3
  52. package/dist/esm/providers/icons/Torch.js +14 -0
  53. package/dist/esm/providers/icons/index.js +1 -0
  54. package/dist/providers/IconsProvider.js +1 -0
  55. package/dist/providers/icons/Logo.js +1 -1
  56. package/dist/providers/icons/Torch.d.ts +2 -0
  57. package/dist/providers/icons/Torch.js +41 -0
  58. package/dist/providers/icons/index.d.ts +1 -0
  59. package/dist/providers/icons/index.js +1 -0
  60. package/dist/providers/types.d.ts +1 -1
  61. package/dist/styled.native.d.ts +24 -0
  62. package/package.json +2 -2
@@ -9,15 +9,21 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
12
  import { createElement as _createElement } from "react";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import { isElement as isReactElement } from 'react-is';
15
+ import { Dimensions } from 'react-native';
15
16
  import { useBreakpoint } from '../../hooks';
16
- import { CellText, RowHeading, TableCell, TableHeaderText, TableRow as StyledTableRow, } from './styles';
17
+ import { CellText, RowHeading, TableCell, TableHeaderText, TableRow as StyledTableRow, SeparatorRowText, StyledSeparatorRow, } from './styles';
17
18
  export var TableRow = function (_a) {
18
19
  var data = _a.data, index = _a.index, striped = _a.striped, rowHeadings = _a.rowHeadings, columnWidths = _a.columnWidths;
19
20
  var breakpoints = useBreakpoint();
20
21
  var cells = data.map(function (cellData, i) {
22
+ if (typeof cellData === 'object' &&
23
+ (cellData === null || cellData === void 0 ? void 0 : cellData.hasOwnProperty('isSeparator')) &&
24
+ (cellData === null || cellData === void 0 ? void 0 : cellData.hasOwnProperty('content'))) {
25
+ return (_jsx(StyledSeparatorRow, __assign({ testID: "separatorRow", width: Dimensions.get('window').width }, { children: _jsx(SeparatorRowText, __assign({}, breakpoints, { children: cellData === null || cellData === void 0 ? void 0 : cellData.content })) }), i));
26
+ }
21
27
  if (rowHeadings && i === 0) {
22
28
  return (_createElement(RowHeading, __assign({}, breakpoints, { key: i, testID: "rowHeader", cellWidth: columnWidths[i] }), isReactElement(cellData) ? (cellData) : (_jsx(TableHeaderText, __assign({}, breakpoints, { children: cellData })))));
23
29
  }
@@ -21,11 +21,11 @@ export var TableCaptionText = styled.Text(function (_a) {
21
21
  });
22
22
  export var CellText = styled.Text(function (_a) {
23
23
  var core = _a.theme.core, smallAndUp = _a.smallAndUp;
24
- return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n\n font-size: ", ";\n "], ["\n font-family: ", ";\n line-height: ", ";\n\n font-size: ", ";\n "])), core.fontFamily.body.native, core.lineHeight.body.large, core.fontSize.body[smallAndUp ? 'large' : 'small']);
24
+ return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n "], ["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n "])), core.fontFamily.body.native, core.lineHeight.body.large, core.fontSize.body[smallAndUp ? 'large' : 'small']);
25
25
  });
26
26
  export var TableCaption = styled.View(function (_a) {
27
27
  var core = _a.theme.core;
28
- return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n padding: ", " ", ";\n "], ["\n padding: ", " ", ";\n "])), core.space[4], core.space[1]);
28
+ return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n padding: ", " ", ";\n "], ["\n padding: ", " ", ";\n "])), core.space[4], core.space[2]);
29
29
  });
30
30
  export var TableRow = styled.View(function (_a) {
31
31
  var _b = _a.theme, semantic = _b.semantic, core = _b.core, stripe = _a.stripe;
@@ -42,10 +42,21 @@ export var TableRowHeading = styled.View(function (_a) {
42
42
  export var TableBody = styled.View(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n flex-direction: column;\n flex-wrap: nowrap;\n"], ["\n flex-direction: column;\n flex-wrap: nowrap;\n"])));
43
43
  export var TableCell = styled.View(function (_a) {
44
44
  var core = _a.theme.core, cellWidth = _a.cellWidth, smallAndUp = _a.smallAndUp;
45
- return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n padding: ", " ", ";\n width: ", ";\n flex: ", ";\n "], ["\n padding: ", " ", ";\n width: ", ";\n flex: ", ";\n "])), core.space[smallAndUp ? 3 : 2], core.space[1], cellWidth, cellWidth === 'auto' ? 1 : 0);
45
+ return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n padding: ", " ", ";\n width: ", ";\n flex: ", ";\n "], ["\n padding: ", " ", ";\n width: ", ";\n flex: ", ";\n "])), core.space[smallAndUp ? 3 : 2], core.space[2], cellWidth, cellWidth === 'auto' ? 1 : 0);
46
46
  });
47
47
  export var RowHeading = styled.View(function (_a) {
48
48
  var core = _a.theme.core, cellWidth = _a.cellWidth, smallAndUp = _a.smallAndUp;
49
- return css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n padding: ", " ", ";\n width: ", ";\n flex: ", ";\n "], ["\n padding: ", " ", ";\n width: ", ";\n flex: ", ";\n "])), core.space[smallAndUp ? 3 : 2], core.space[1], cellWidth, cellWidth === 'auto' ? 1 : 0);
49
+ return css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n padding: ", " ", ";\n width: ", ";\n flex: ", ";\n "], ["\n padding: ", " ", ";\n width: ", ";\n flex: ", ";\n "])), core.space[smallAndUp ? 3 : 2], core.space[2], cellWidth, cellWidth === 'auto' ? 1 : 0);
50
+ });
51
+ export var StyledSeparatorRow = styled.View(function (_a) {
52
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, width = _a.width;
53
+ var minWidth = width
54
+ ? "".concat(width - parseInt(core.space[2]) * 2, "px")
55
+ : '100%';
56
+ return "\n min-width: ".concat(minWidth, ";\n flex: 1;\n flex-direction: row;\n background-color: ").concat(semantic.surface.elevated, ";\n padding: ").concat(core.space[1], " ").concat(core.space[2], ";\n ");
57
+ });
58
+ export var SeparatorRowText = styled.Text(function (_a) {
59
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
60
+ return "\n flex: 1;\n font-family: ".concat(core.fontFamily.body.native, ";\n font-size: ").concat(core.fontSize.small[smallAndUp ? 'large' : 'small'], ";\n line-height: ").concat(core.lineHeight.small[smallAndUp ? 'large' : 'small'], ";\n color: ").concat(semantic.message.secondary, ";\n");
50
61
  });
51
62
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
@@ -0,0 +1,62 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
17
+ import { Fragment, useRef, useState } from 'react';
18
+ import { Modal, ScrollView, View } from 'react-native';
19
+ import styled, { css } from '../../styled.native';
20
+ import { Divider } from '../Divider';
21
+ import { Icon } from '../Icon';
22
+ import { Margin } from '../Margin';
23
+ import { P } from '../P';
24
+ import { Strong } from '../Strong';
25
+ var SelectInput = styled.TouchableOpacity(function (_a) {
26
+ var core = _a.theme.core;
27
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "], ["\n flex-direction: row;\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "])), core.color.brand.white, core.radius.max, core.space[2], core.space[1]);
28
+ });
29
+ var DropdownWrapper = styled.View(function (_a) {
30
+ var core = _a.theme.core;
31
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n // 40 is an opacity for hex https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4\n background-color: ", "40;\n "], ["\n width: 100%;\n height: 100%;\n // 40 is an opacity for hex https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4\n background-color: ", "40;\n "])), core.color.neutral.darkest);
32
+ });
33
+ var DropdownContainer = styled.View(function (_a) {
34
+ var core = _a.theme.core;
35
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex: 1;\n min-width: 25%;\n max-height: 100%;\n border-radius: ", ";\n background-color: ", ";\n position: absolute;\n "], ["\n flex: 1;\n min-width: 25%;\n max-height: 100%;\n border-radius: ", ";\n background-color: ", ";\n position: absolute;\n "])), core.radius.large, core.color.brand.white);
36
+ });
37
+ var SelectOption = styled.TouchableOpacity(function (_a) {
38
+ var core = _a.theme.core;
39
+ return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n flex-direction: row;\n align-items: center;\n padding-horizontal: ", ";\n "], ["\n flex-direction: row;\n align-items: center;\n padding-horizontal: ", ";\n "])), core.space[2]);
40
+ });
41
+ export var FilterSelect = function (_a) {
42
+ var _b = _a.options, options = _b === void 0 ? [] : _b, _c = _a.defaultSelected, defaultSelected = _c === void 0 ? { label: '', value: 'default' } : _c, _d = _a.onSelected, onSelected = _d === void 0 ? function () { return null; } : _d, _e = _a.testID, testID = _e === void 0 ? 'select' : _e, rightText = _a.rightText, leftText = _a.leftText;
43
+ var selectRef = useRef(null);
44
+ var _f = useState(false), isOpen = _f[0], setOpen = _f[1];
45
+ var _g = useState(defaultSelected), selected = _g[0], setSelected = _g[1];
46
+ var _h = useState(null), measure = _h[0], setMeasure = _h[1];
47
+ var handleOptionPress = function (val) {
48
+ onSelected(val);
49
+ setOpen(false);
50
+ setSelected(val);
51
+ };
52
+ return (_jsxs(View, __assign({ style: { flexDirection: 'row' } }, { children: [leftText ? _jsxs(P, { children: [leftText, " "] }) : null, _jsxs(SelectInput, __assign({ ref: selectRef, testID: testID, onPress: function () { return setOpen(!isOpen); }, onLayout: function () {
53
+ var _a;
54
+ (_a = selectRef.current) === null || _a === void 0 ? void 0 : _a.measureInWindow(function (x, y) {
55
+ setMeasure({ top: y - 12, left: x });
56
+ });
57
+ } }, { children: [_jsx(P, { children: _jsx(Strong, { children: selected.value === 'default' ? '' : selected.label }) }), _jsx(Icon, { name: "caret-down", size: 14, style: { marginLeft: 2 } })] }), String(isOpen)), rightText ? _jsxs(P, { children: [" ", rightText] }) : null, _jsx(Modal, __assign({ transparent: true, visible: isOpen, animationType: "fade", onRequestClose: function () { return setOpen(false); } }, { children: _jsx(DropdownWrapper, { children: _jsx(DropdownContainer, __assign({ style: {
58
+ top: measure === null || measure === void 0 ? void 0 : measure.top,
59
+ left: measure === null || measure === void 0 ? void 0 : measure.left,
60
+ } }, { children: _jsx(ScrollView, __assign({ nestedScrollEnabled: true }, { children: options.map(function (option, i) { return (_jsxs(Fragment, { children: [_jsx(SelectOption, __assign({ accessible: true, accessibilityRole: "option", onPress: function () { return handleOptionPress(option); } }, { children: _jsx(Margin, __assign({ vertical: 3 }, { children: _jsx(P, { children: _jsx(Strong, { children: option.label }) }) })) })), i === options.length - 1 ? null : (_jsx(Divider, { type: "differentiated" }))] }, option.label)); }) })) })) }) }))] })));
61
+ };
62
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -0,0 +1 @@
1
+ export { FilterSelect } from './FilterSelect';
@@ -20,9 +20,10 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
24
24
  import { Children } from 'react';
25
25
  import { styledComponentWithBreakpoints } from '../../utils';
26
+ import { P } from '../P';
26
27
  import { Stack } from '../Stack';
27
28
  import { StyledBullet, StyledLi, StyledList, StyledOlItem, StyledUlItem, UlBullet, } from './styled';
28
29
  var Bullet = styledComponentWithBreakpoints(StyledBullet);
@@ -38,33 +39,38 @@ var ListNumberedItem = function (_a) {
38
39
  var renderList = function (_a) {
39
40
  var arrayChildren = _a.arrayChildren, _b = _a.level, level = _b === void 0 ? 0 : _b, showBullets = _a.showBullets, listType = _a.listType;
40
41
  return Children.map(arrayChildren, function (child, index) {
41
- var _a, _b, _c, _d;
42
- // Checking if there are any child types, i.e. nodes
43
- if (
44
- // @ts-ignore
45
- Array.isArray((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.children) &&
46
- // @ts-ignore
47
- (child.type.name === 'Ul' || child.type.name === 'Ol')) {
48
- var lvl = level;
49
- var PADDING = 3;
50
- lvl = lvl + PADDING;
51
- return renderList({
52
- // @ts-ignore It complains that child props doesn't exist. Weird.
53
- arrayChildren: (_b = child === null || child === void 0 ? void 0 : child.props) === null || _b === void 0 ? void 0 : _b.children,
54
- // @ts-ignore It complains that child props doesn't exist. Weird.
55
- listType: (_d = (_c = child === null || child === void 0 ? void 0 : child.type) === null || _c === void 0 ? void 0 : _c.name) === null || _d === void 0 ? void 0 : _d.toLowerCase(),
56
- showBullets: showBullets,
57
- level: lvl,
58
- });
59
- }
60
- else {
61
- if (listType === 'ul') {
62
- return (_jsx(ListBulletItem, __assign({ showBullets: showBullets, level: level }, { children: child })));
42
+ var _a;
43
+ var lvl = level;
44
+ var PADDING = 3;
45
+ lvl = lvl + PADDING;
46
+ // @ts-ignore doesn't recognise child props.
47
+ var nestedChildren = ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.children) || {};
48
+ var nestedLists = [];
49
+ var childrenToRender = Array.from(nestedChildren).filter(function (ch) {
50
+ var _a, _b;
51
+ if (typeof ch == 'object' &&
52
+ // @ts-ignore Missing types for React Children
53
+ (((_a = ch === null || ch === void 0 ? void 0 : ch.type) === null || _a === void 0 ? void 0 : _a.name) === 'Ul' || ((_b = ch === null || ch === void 0 ? void 0 : ch.type) === null || _b === void 0 ? void 0 : _b.name) === 'Ol')) {
54
+ nestedLists.push(ch);
55
+ return false;
63
56
  }
64
57
  else {
65
- return (_jsx(ListNumberedItem, __assign({ level: level, prefix: "".concat(index + 1, ".") }, { children: child })));
58
+ return true;
66
59
  }
67
- }
60
+ });
61
+ return (_jsxs(_Fragment, { children: [childrenToRender.length > 0 && listType === 'ul' ? (_jsx(ListBulletItem, __assign({ showBullets: showBullets, level: level }, { children: _jsx(P, { children: childrenToRender }) }))) : null, childrenToRender.length > 0 && listType === 'ol' ? (_jsx(ListNumberedItem, __assign({ level: level, prefix: "".concat(index + 1, ".") }, { children: _jsx(P, { children: childrenToRender }) }))) : null, nestedLists.length > 0
62
+ ? nestedLists.map(function (obj) {
63
+ var _a, _b, _c, _d;
64
+ return renderList({
65
+ //@ts-ignore
66
+ arrayChildren: (_b = (_a = obj === null || obj === void 0 ? void 0 : obj.props) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : obj,
67
+ level: lvl,
68
+ showBullets: showBullets,
69
+ //@ts-ignore
70
+ listType: (_d = (_c = obj.type) === null || _c === void 0 ? void 0 : _c.name) === null || _d === void 0 ? void 0 : _d.toLowerCase(),
71
+ });
72
+ })
73
+ : null] }));
68
74
  });
69
75
  };
70
76
  var Li = function (_a) {
@@ -20,11 +20,11 @@ export var StyledBullet = styled.Text(function (_a) {
20
20
  var lineHeight = smallAndUp
21
21
  ? core.lineHeight.body.large
22
22
  : core.lineHeight.body.small;
23
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n margin-right: ", ";\n width: ", ";\n text-align: right;\n "], ["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n margin-right: ", ";\n width: ", ";\n text-align: right;\n "])), core.fontFamily.body.native, lineHeight, semantic.message.base, fontSize, core.space[2], core.space[4]);
23
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n margin-right: ", ";\n text-align: left;\n "], ["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n margin-right: ", ";\n text-align: left;\n "])), core.fontFamily.body.native, lineHeight, semantic.message.base, fontSize, core.space[1]);
24
24
  });
25
25
  export var StyledUlItem = styled.View(function (_a) {
26
26
  var core = _a.theme.core, level = _a.level;
27
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-direction: row;\n align-items: flex-start;\n justify-content: center;\n padding-left: ", ";\n "], ["\n flex-direction: row;\n align-items: flex-start;\n justify-content: center;\n padding-left: ", ";\n "])), core.space[level]);
27
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-direction: row;\n align-items: flex-start;\n justify-content: flex-start;\n padding-left: ", ";\n "], ["\n flex-direction: row;\n align-items: flex-start;\n justify-content: flex-start;\n padding-left: ", ";\n "])), core.space[level]);
28
28
  });
29
29
  export var StyledOlItem = StyledUlItem;
30
30
  export var StyledList = styled.View(function (_a) {
@@ -52,3 +52,4 @@ export * from './SkeletonCircle';
52
52
  export * from './SkeletonCTA';
53
53
  export * from './SkeletonHeading';
54
54
  export * from './SkeletonText';
55
+ export * from './FilterSelect';
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { createContext, useContext } from 'react';
14
- import { Address, Advice, Archive, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Award, Battery, Cal, CalBook, CaretDown, CaretLeft, CaretRight, CaretUp, Chart, ChartFilled, Check, CheckCircle, ChevronDown, ChevronLeft, ChevronLeftSmall, ChevronLeftSmallFirst, ChevronRight, ChevronRightSmall, ChevronRightSmallLast, ChevronUp, Circle, CloseCircle, Cross, Doc, Dollar, Download, Eco, EcoHome, Edit, ElectricCar, ElectricHome, Electricity, EnergyAdvice, Equals, Euro, Gas, GlobeAddress, Help, Hide, Home, HomeFilled, HydroPower, Info, Link, Logo, Mail, MailOpen, Menu, Message, MessageFilled, Minus, Mobile, NewWindow, PaymentCard, Phone, Plus, Pound, Pricing, Search, Security, Show, SmartHome, SmartMeter, Solar, Star, Sun, Trees, Tune, User, UserFilled, Wallet, WalletFilled, WarmHome, Warning, WebAddress, WindPower, } from './icons';
14
+ import { Address, Advice, Archive, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Award, Battery, Cal, CalBook, CaretDown, CaretLeft, CaretRight, CaretUp, Chart, ChartFilled, Check, CheckCircle, ChevronDown, ChevronLeft, ChevronLeftSmall, ChevronLeftSmallFirst, ChevronRight, ChevronRightSmall, ChevronRightSmallLast, ChevronUp, Circle, CloseCircle, Cross, Doc, Dollar, Download, Eco, EcoHome, Edit, ElectricCar, ElectricHome, Electricity, EnergyAdvice, Equals, Euro, Gas, GlobeAddress, Help, Hide, Home, HomeFilled, HydroPower, Info, Link, Logo, Mail, MailOpen, Menu, Message, MessageFilled, Minus, Mobile, NewWindow, PaymentCard, Phone, Plus, Pound, Pricing, Search, Security, Show, SmartHome, SmartMeter, Solar, Star, Sun, Torch, Trees, Tune, User, UserFilled, Wallet, WalletFilled, WarmHome, Warning, WebAddress, WindPower, } from './icons';
15
15
  var defaultIcons = {
16
16
  address: Address,
17
17
  advice: Advice,
@@ -86,6 +86,7 @@ var defaultIcons = {
86
86
  solar: Solar,
87
87
  star: Star,
88
88
  sun: Sun,
89
+ torch: Torch,
89
90
  trees: Trees,
90
91
  tune: Tune,
91
92
  user: User,
@@ -9,6 +9,6 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { Path, Svg, ClipPath, Defs } from 'react-native-svg';
14
- export var Logo = function (props) { return (_jsxs(Svg, __assign({ viewBox: "0 0 48 48", width: 48, height: 48 }, props, { children: [_jsx(Path, { fill: "#0A9828", d: "M14.316 16.104c-1.837-1.34-4.186-2.084-6.733-2.084-2.262 0-4.364.589-6.1 1.66L0 10.143 37.861 0l3.767 14.063a12.37 12.37 0 00-1.054-.045c-2.562 0-4.924.752-6.771 2.109l.697-1.803h-7.311l-2.562 8.771c-.278.95-.565 1.982-.565 1.982l-.557-1.982-2.56-8.77h-7.316l.687 1.779zm22.654 8.023c0-2.05 1.382-3.76 3.606-3.76 1.711 0 2.919 1.013 3.387 2.414l.127.472c.058.28.092.57.092.873 0 2.2-1.484 3.71-3.606 3.71s-3.606-1.51-3.606-3.71zm-25.781 0c0-2.05-1.384-3.76-3.606-3.76-2.224 0-3.61 1.71-3.61 3.76 0 2.2 1.489 3.71 3.61 3.71 2.122 0 3.606-1.51 3.606-3.71zm18.866 1.69c.835 5.104 5.232 8.101 10.521 8.101 2.209 0 4.265-.52 5.972-1.5l1.456 5.44L10.143 48 6.357 33.865c.401.036.814.055 1.226.055 5.27 0 9.659-2.98 10.515-8.057l3 7.753h5.934l3.023-7.8z" }), _jsx(Defs, { children: _jsx(ClipPath, __assign({ id: "a" }, { children: _jsx(Path, { fill: "#fff", d: "M0 0h48v48H0z" }) })) })] }))); };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { Path, Svg } from 'react-native-svg';
14
+ export var Logo = function (props) { return (_jsx(Svg, __assign({ viewBox: "0 0 48 48", width: 48, height: 48 }, props, { children: _jsx(Path, { fill: "#0A9828", d: "M14.316 16.104c-1.837-1.34-4.186-2.084-6.733-2.084-2.262 0-4.364.589-6.1 1.66L0 10.143 37.861 0l3.767 14.063a12.37 12.37 0 00-1.054-.045c-2.562 0-4.924.752-6.771 2.109l.697-1.803h-7.311l-2.562 8.771c-.278.95-.565 1.982-.565 1.982l-.557-1.982-2.56-8.77h-7.316l.687 1.779zm22.654 8.023c0-2.05 1.382-3.76 3.606-3.76 1.711 0 2.919 1.013 3.387 2.414l.127.472c.058.28.092.57.092.873 0 2.2-1.484 3.71-3.606 3.71s-3.606-1.51-3.606-3.71zm-25.781 0c0-2.05-1.384-3.76-3.606-3.76-2.224 0-3.61 1.71-3.61 3.76 0 2.2 1.489 3.71 3.61 3.71 2.122 0 3.606-1.51 3.606-3.71zm18.866 1.69c.835 5.104 5.232 8.101 10.521 8.101 2.209 0 4.265-.52 5.972-1.5l1.456 5.44L10.143 48 6.357 33.865c.401.036.814.055 1.226.055 5.27 0 9.659-2.98 10.515-8.057l3 7.753h5.934l3.023-7.8z" }) }))); };
@@ -0,0 +1,14 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import Svg, { Path } from 'react-native-svg';
14
+ export var Torch = function (props) { return (_jsxs(Svg, __assign({ viewBox: "0 0 16 16" }, props, { children: [_jsx(Path, { fill: "currentColor", d: "M4.728 14V6.714L3.016 5.012 3 1h10v4.012L11.273 6.73v6.173l-1.5-.402L9.37 14H4.726ZM11.5 3.494V2.5H4.506l.004.994h6.99ZM9.773 12.5V6.105l.442-.44.675-.671H5.124l.66.656.442.44v6.41h3.547Z" }), _jsx(Path, { fill: "currentColor", d: "M7 10V8h2v2H7Z" })] }))); };
@@ -71,6 +71,7 @@ export * from './SmartMeter';
71
71
  export * from './Solar';
72
72
  export * from './Star';
73
73
  export * from './Sun';
74
+ export * from './Torch';
74
75
  export * from './Trees';
75
76
  export * from './Tune';
76
77
  export * from './User';
@@ -89,6 +89,7 @@ var defaultIcons = {
89
89
  solar: icons_1.Solar,
90
90
  star: icons_1.Star,
91
91
  sun: icons_1.Sun,
92
+ torch: icons_1.Torch,
92
93
  trees: icons_1.Trees,
93
94
  tune: icons_1.Tune,
94
95
  user: icons_1.User,
@@ -14,5 +14,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.Logo = void 0;
15
15
  var jsx_runtime_1 = require("react/jsx-runtime");
16
16
  var react_native_svg_1 = require("react-native-svg");
17
- var Logo = function (props) { return ((0, jsx_runtime_1.jsxs)(react_native_svg_1.Svg, __assign({ viewBox: "0 0 48 48", width: 48, height: 48 }, props, { children: [(0, jsx_runtime_1.jsx)(react_native_svg_1.Path, { fill: "#0A9828", d: "M14.316 16.104c-1.837-1.34-4.186-2.084-6.733-2.084-2.262 0-4.364.589-6.1 1.66L0 10.143 37.861 0l3.767 14.063a12.37 12.37 0 00-1.054-.045c-2.562 0-4.924.752-6.771 2.109l.697-1.803h-7.311l-2.562 8.771c-.278.95-.565 1.982-.565 1.982l-.557-1.982-2.56-8.77h-7.316l.687 1.779zm22.654 8.023c0-2.05 1.382-3.76 3.606-3.76 1.711 0 2.919 1.013 3.387 2.414l.127.472c.058.28.092.57.092.873 0 2.2-1.484 3.71-3.606 3.71s-3.606-1.51-3.606-3.71zm-25.781 0c0-2.05-1.384-3.76-3.606-3.76-2.224 0-3.61 1.71-3.61 3.76 0 2.2 1.489 3.71 3.61 3.71 2.122 0 3.606-1.51 3.606-3.71zm18.866 1.69c.835 5.104 5.232 8.101 10.521 8.101 2.209 0 4.265-.52 5.972-1.5l1.456 5.44L10.143 48 6.357 33.865c.401.036.814.055 1.226.055 5.27 0 9.659-2.98 10.515-8.057l3 7.753h5.934l3.023-7.8z" }), (0, jsx_runtime_1.jsx)(react_native_svg_1.Defs, { children: (0, jsx_runtime_1.jsx)(react_native_svg_1.ClipPath, __assign({ id: "a" }, { children: (0, jsx_runtime_1.jsx)(react_native_svg_1.Path, { fill: "#fff", d: "M0 0h48v48H0z" }) })) })] }))); };
17
+ var Logo = function (props) { return ((0, jsx_runtime_1.jsx)(react_native_svg_1.Svg, __assign({ viewBox: "0 0 48 48", width: 48, height: 48 }, props, { children: (0, jsx_runtime_1.jsx)(react_native_svg_1.Path, { fill: "#0A9828", d: "M14.316 16.104c-1.837-1.34-4.186-2.084-6.733-2.084-2.262 0-4.364.589-6.1 1.66L0 10.143 37.861 0l3.767 14.063a12.37 12.37 0 00-1.054-.045c-2.562 0-4.924.752-6.771 2.109l.697-1.803h-7.311l-2.562 8.771c-.278.95-.565 1.982-.565 1.982l-.557-1.982-2.56-8.77h-7.316l.687 1.779zm22.654 8.023c0-2.05 1.382-3.76 3.606-3.76 1.711 0 2.919 1.013 3.387 2.414l.127.472c.058.28.092.57.092.873 0 2.2-1.484 3.71-3.606 3.71s-3.606-1.51-3.606-3.71zm-25.781 0c0-2.05-1.384-3.76-3.606-3.76-2.224 0-3.61 1.71-3.61 3.76 0 2.2 1.489 3.71 3.61 3.71 2.122 0 3.606-1.51 3.606-3.71zm18.866 1.69c.835 5.104 5.232 8.101 10.521 8.101 2.209 0 4.265-.52 5.972-1.5l1.456 5.44L10.143 48 6.357 33.865c.401.036.814.055 1.226.055 5.27 0 9.659-2.98 10.515-8.057l3 7.753h5.934l3.023-7.8z" }) }))); };
18
18
  exports.Logo = Logo;
@@ -0,0 +1,2 @@
1
+ import { SvgProps } from 'react-native-svg';
2
+ export declare const Torch: (props: SvgProps) => JSX.Element;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.Torch = void 0;
38
+ var jsx_runtime_1 = require("react/jsx-runtime");
39
+ var react_native_svg_1 = __importStar(require("react-native-svg"));
40
+ var Torch = function (props) { return ((0, jsx_runtime_1.jsxs)(react_native_svg_1.default, __assign({ viewBox: "0 0 16 16" }, props, { children: [(0, jsx_runtime_1.jsx)(react_native_svg_1.Path, { fill: "currentColor", d: "M4.728 14V6.714L3.016 5.012 3 1h10v4.012L11.273 6.73v6.173l-1.5-.402L9.37 14H4.726ZM11.5 3.494V2.5H4.506l.004.994h6.99ZM9.773 12.5V6.105l.442-.44.675-.671H5.124l.66.656.442.44v6.41h3.547Z" }), (0, jsx_runtime_1.jsx)(react_native_svg_1.Path, { fill: "currentColor", d: "M7 10V8h2v2H7Z" })] }))); };
41
+ exports.Torch = Torch;
@@ -71,6 +71,7 @@ export * from './SmartMeter';
71
71
  export * from './Solar';
72
72
  export * from './Star';
73
73
  export * from './Sun';
74
+ export * from './Torch';
74
75
  export * from './Trees';
75
76
  export * from './Tune';
76
77
  export * from './User';
@@ -87,6 +87,7 @@ __exportStar(require("./SmartMeter"), exports);
87
87
  __exportStar(require("./Solar"), exports);
88
88
  __exportStar(require("./Star"), exports);
89
89
  __exportStar(require("./Sun"), exports);
90
+ __exportStar(require("./Torch"), exports);
90
91
  __exportStar(require("./Trees"), exports);
91
92
  __exportStar(require("./Tune"), exports);
92
93
  __exportStar(require("./User"), exports);
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent } from 'react';
2
2
  import { SvgProps } from 'react-native-svg';
3
- export declare type IconName = 'address' | 'advice' | 'archive' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'award' | 'battery' | 'cal' | 'cal-book' | 'caret-down' | 'caret-left' | 'caret-right' | 'caret-up' | 'chart' | 'chart-filled' | 'check' | 'check-circle' | 'chevron-down' | 'chevron-left' | 'chevron-left-small' | 'chevron-left-small-first' | 'chevron-right' | 'chevron-right-small' | 'chevron-right-small-last' | 'chevron-up' | 'circle' | 'close-circle' | 'cross' | 'doc' | 'dollar' | 'download' | 'eco' | 'eco-home' | 'edit' | 'electric-car' | 'electric-home' | 'electricity' | 'energy-advice' | 'equals' | 'euro' | 'gas' | 'globe-address' | 'help' | 'hide' | 'home' | 'home-filled' | 'hydro-power' | 'info' | 'link' | 'logo' | 'mail' | 'mail-open' | 'menu' | 'message' | 'message-filled' | 'minus' | 'mobile' | 'new-window' | 'payment-card' | 'phone' | 'plus' | 'pound' | 'pricing' | 'search' | 'security' | 'show' | 'smart-home' | 'smart-meter' | 'solar' | 'star' | 'sun' | 'trees' | 'tune' | 'user' | 'user-filled' | 'wallet' | 'wallet-filled' | 'warm-home' | 'warning' | 'web-address' | 'wind-power';
3
+ export declare type IconName = 'address' | 'advice' | 'archive' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'award' | 'battery' | 'cal' | 'cal-book' | 'caret-down' | 'caret-left' | 'caret-right' | 'caret-up' | 'chart' | 'chart-filled' | 'check' | 'check-circle' | 'chevron-down' | 'chevron-left' | 'chevron-left-small' | 'chevron-left-small-first' | 'chevron-right' | 'chevron-right-small' | 'chevron-right-small-last' | 'chevron-up' | 'circle' | 'close-circle' | 'cross' | 'doc' | 'dollar' | 'download' | 'eco' | 'eco-home' | 'edit' | 'electric-car' | 'electric-home' | 'electricity' | 'energy-advice' | 'equals' | 'euro' | 'gas' | 'globe-address' | 'help' | 'hide' | 'home' | 'home-filled' | 'hydro-power' | 'info' | 'link' | 'logo' | 'mail' | 'mail-open' | 'menu' | 'message' | 'message-filled' | 'minus' | 'mobile' | 'new-window' | 'payment-card' | 'phone' | 'plus' | 'pound' | 'pricing' | 'search' | 'security' | 'show' | 'smart-home' | 'smart-meter' | 'solar' | 'star' | 'sun' | 'torch' | 'trees' | 'tune' | 'user' | 'user-filled' | 'wallet' | 'wallet-filled' | 'warm-home' | 'warning' | 'web-address' | 'wind-power';
4
4
  export declare type IconNameExtended = IconName | string;
5
5
  export declare type IconsType = Record<string, FunctionComponent<SvgProps>>;
@@ -205,6 +205,10 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
205
205
  };
206
206
  badge: {
207
207
  variants: {
208
+ neutral: {
209
+ foreground: string;
210
+ background: string;
211
+ };
208
212
  red: {
209
213
  foreground: string;
210
214
  background: string;
@@ -432,6 +436,10 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
432
436
  };
433
437
  badge: {
434
438
  variants: {
439
+ neutral: {
440
+ foreground: string;
441
+ background: string;
442
+ };
435
443
  red: {
436
444
  foreground: string;
437
445
  background: string;
@@ -659,6 +667,10 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
659
667
  };
660
668
  badge: {
661
669
  variants: {
670
+ neutral: {
671
+ foreground: string;
672
+ background: string;
673
+ };
662
674
  red: {
663
675
  foreground: string;
664
676
  background: string;
@@ -886,6 +898,10 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
886
898
  };
887
899
  badge: {
888
900
  variants: {
901
+ neutral: {
902
+ foreground: string;
903
+ background: string;
904
+ };
889
905
  red: {
890
906
  foreground: string;
891
907
  background: string;
@@ -1113,6 +1129,10 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
1113
1129
  };
1114
1130
  badge: {
1115
1131
  variants: {
1132
+ neutral: {
1133
+ foreground: string;
1134
+ background: string;
1135
+ };
1116
1136
  red: {
1117
1137
  foreground: string;
1118
1138
  background: string;
@@ -1340,6 +1360,10 @@ declare const styled: styledComponents.ReactNativeStyledInterface<{
1340
1360
  };
1341
1361
  badge: {
1342
1362
  variants: {
1363
+ neutral: {
1364
+ foreground: string;
1365
+ background: string;
1366
+ };
1343
1367
  red: {
1344
1368
  foreground: string;
1345
1369
  background: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ovotech/element-native",
3
- "version": "3.4.1",
3
+ "version": "3.5.0-canary-8ac6eb7-155",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  "url": "@ovotech/element"
14
14
  },
15
15
  "dependencies": {
16
- "@ovotech/element-core": "^2.1.0",
16
+ "@ovotech/element-core": "^2.2.0-canary-8ac6eb7-155",
17
17
  "deepmerge": "^4.2.2",
18
18
  "lodash.groupby": "^4.6.0"
19
19
  },