@ornikar/kitt-universal 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -12
- package/dist/definitions/Avatar/Avatar.d.ts.map +1 -1
- package/dist/definitions/Button/Button.d.ts +1 -1
- package/dist/definitions/Button/Button.d.ts.map +1 -1
- package/dist/definitions/Button/ButtonContainer.d.ts +3 -3
- package/dist/definitions/Button/ButtonContainer.d.ts.map +1 -1
- package/dist/definitions/Button/ButtonContent.d.ts +1 -2
- package/dist/definitions/Button/ButtonContent.d.ts.map +1 -1
- package/dist/definitions/Card/Card.d.ts.map +1 -1
- package/dist/definitions/FullScreenModal/Body.d.ts.map +1 -1
- package/dist/definitions/FullScreenModal/FullScreenModal.d.ts.map +1 -1
- package/dist/definitions/FullScreenModal/Header.d.ts.map +1 -1
- package/dist/definitions/Icon/Icon.d.ts.map +1 -1
- package/dist/definitions/Icon/SpinningIcon.web.d.ts +5 -2
- package/dist/definitions/Icon/SpinningIcon.web.d.ts.map +1 -1
- package/dist/definitions/ListItem/ListItem.d.ts +3 -5
- package/dist/definitions/ListItem/ListItem.d.ts.map +1 -1
- package/dist/definitions/ListItem/ListItemContent.d.ts +2 -2
- package/dist/definitions/ListItem/ListItemContent.d.ts.map +1 -1
- package/dist/definitions/ListItem/ListItemSideContent.d.ts +3 -4
- package/dist/definitions/ListItem/ListItemSideContent.d.ts.map +1 -1
- package/dist/definitions/Loader/LargeLoader.web.d.ts.map +1 -1
- package/dist/definitions/Message/Message.d.ts.map +1 -1
- package/dist/definitions/Modal/Body.d.ts +4 -2
- package/dist/definitions/Modal/Body.d.ts.map +1 -1
- package/dist/definitions/Modal/Footer.d.ts.map +1 -1
- package/dist/definitions/Modal/Header.d.ts.map +1 -1
- package/dist/definitions/Modal/Modal.d.ts +2 -2
- package/dist/definitions/Modal/Modal.d.ts.map +1 -1
- package/dist/definitions/Overlay/Overlay.d.ts +2 -2
- package/dist/definitions/Overlay/Overlay.d.ts.map +1 -1
- package/dist/definitions/Tag/Tag.d.ts.map +1 -1
- package/dist/definitions/forms/InputField/InputField.d.ts.map +1 -1
- package/dist/definitions/forms/InputText/InputText.d.ts +1 -0
- package/dist/definitions/forms/InputText/InputText.d.ts.map +1 -1
- package/dist/definitions/forms/Radio/Radio.d.ts.map +1 -1
- package/dist/definitions/index.d.ts +1 -15
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/story-components/Section.d.ts +18 -0
- package/dist/definitions/story-components/Section.d.ts.map +1 -0
- package/dist/definitions/story-components/Story.d.ts.map +1 -1
- package/dist/definitions/story-components/StoryGrid.d.ts +1 -2
- package/dist/definitions/story-components/StoryGrid.d.ts.map +1 -1
- package/dist/definitions/story-components/StoryTitle.d.ts.map +1 -1
- package/dist/definitions/story-components/index.d.ts +1 -10
- package/dist/definitions/story-components/index.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +0 -34
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/buttonLateOceanTheme.d.ts +0 -8
- package/dist/definitions/themes/late-ocean/buttonLateOceanTheme.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts +0 -3
- package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts.map +1 -1
- package/dist/definitions/typography/Typography.d.ts +3 -9
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/definitions/typography/TypographyLink.d.ts +4 -6
- package/dist/definitions/typography/TypographyLink.d.ts.map +1 -1
- package/dist/definitions/utils/windowSize/createWindowSizeHelper.d.ts +2 -2
- package/dist/index-browser-all.es.android.js +143 -578
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +143 -578
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +134 -613
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +163 -723
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +122 -640
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/styles.css +117 -0
- package/dist/tsbuildinfo +1 -1
- package/package.json +3 -9
- package/dist/definitions/IconButton/IconButton.d.ts +0 -11
- package/dist/definitions/IconButton/IconButton.d.ts.map +0 -1
- package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts +0 -13
- package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts.map +0 -1
- package/dist/definitions/IconButton/PressableIconButton.d.ts +0 -8
- package/dist/definitions/IconButton/PressableIconButton.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveLink.d.ts +0 -11
- package/dist/definitions/primitives/PrimitiveLink.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveLink.web.d.ts +0 -4
- package/dist/definitions/primitives/PrimitiveLink.web.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitivePressable.d.ts +0 -16
- package/dist/definitions/primitives/PrimitivePressable.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitivePressable.web.d.ts +0 -4
- package/dist/definitions/primitives/PrimitivePressable.web.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveScrollView.d.ts +0 -8
- package/dist/definitions/primitives/PrimitiveScrollView.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveScrollView.web.d.ts +0 -4
- package/dist/definitions/primitives/PrimitiveScrollView.web.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveText.d.ts +0 -14
- package/dist/definitions/primitives/PrimitiveText.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveText.web.d.ts +0 -6
- package/dist/definitions/primitives/PrimitiveText.web.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveView.d.ts +0 -21
- package/dist/definitions/primitives/PrimitiveView.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveView.web.d.ts +0 -23
- package/dist/definitions/primitives/PrimitiveView.web.d.ts.map +0 -1
- package/dist/definitions/primitives/helpers.d.ts +0 -7
- package/dist/definitions/primitives/helpers.d.ts.map +0 -1
- package/dist/definitions/primitives/reset.d.ts +0 -2
- package/dist/definitions/primitives/reset.d.ts.map +0 -1
- package/dist/definitions/story-components/Flex.d.ts +0 -9
- package/dist/definitions/story-components/Flex.d.ts.map +0 -1
- package/dist/definitions/story-components/StoryBlock.d.ts +0 -11
- package/dist/definitions/story-components/StoryBlock.d.ts.map +0 -1
- package/dist/definitions/story-components/StoryContainer.d.ts +0 -9
- package/dist/definitions/story-components/StoryContainer.d.ts.map +0 -1
- package/dist/definitions/story-components/StoryContainer.web.d.ts +0 -4
- package/dist/definitions/story-components/StoryContainer.web.d.ts.map +0 -1
- package/dist/definitions/story-components/StorySection.d.ts +0 -23
- package/dist/definitions/story-components/StorySection.d.ts.map +0 -1
- package/dist/definitions/story-components/theme.d.ts +0 -2
- package/dist/definitions/story-components/theme.d.ts.map +0 -1
- package/dist/definitions/themes/late-ocean/iconButton.d.ts +0 -36
- package/dist/definitions/themes/late-ocean/iconButton.d.ts.map +0 -1
- package/dist/definitions/utils/tests/styled-component-typing-test.d.ts +0 -18
- package/dist/definitions/utils/tests/styled-component-typing-test.d.ts.map +0 -1
|
@@ -2,129 +2,24 @@ import _extends from '@babel/runtime/helpers/extends';
|
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import { UserIcon, EyeIcon, EyeOffIcon, LoaderIcon, XIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon } from '@ornikar/kitt-icons';
|
|
4
4
|
export * from '@ornikar/kitt-icons';
|
|
5
|
-
import React, {
|
|
6
|
-
import { Image,
|
|
5
|
+
import React, { useContext, createContext, useState, forwardRef, useMemo } from 'react';
|
|
6
|
+
import { Image, useWindowDimensions, Pressable, View, StyleSheet, ScrollView, Modal as Modal$1 } from 'react-native';
|
|
7
7
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
8
|
-
import styled, {
|
|
8
|
+
import styled, { useTheme, css } from 'styled-components/native';
|
|
9
9
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
10
|
-
import { useSafeAreaInsets
|
|
11
|
-
import 'react-native-reanimated';
|
|
10
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
12
11
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
13
|
-
import { makeDecorator } from '@storybook/addons';
|
|
14
12
|
|
|
15
|
-
var
|
|
13
|
+
var styles$1 = {"SpinningIcon":"kitt-universal_SpinningIcon_3-FWq","spin":"kitt-universal_spin_3gv6_"};
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
var PrimitiveTextAncestorContext = /*#__PURE__*/createContext(false);
|
|
23
|
-
var PrimitiveTextWithClassName$1 = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
24
|
-
var children = _ref.children,
|
|
25
|
-
className = _ref.className,
|
|
26
|
-
accessibilityRole = _ref.accessibilityRole,
|
|
27
|
-
accessibilityRoleDescription = _ref.accessibilityRoleDescription,
|
|
28
|
-
accessibilityLevel = _ref.accessibilityLevel;
|
|
29
|
-
_ref.selectable;
|
|
30
|
-
_ref.numberOfLines;
|
|
31
|
-
var hasTextAncestor = React.useContext(PrimitiveTextAncestorContext);
|
|
32
|
-
var Component = hasTextAncestor ? 'span' : 'div';
|
|
33
|
-
|
|
34
|
-
if (accessibilityRole === 'header' && accessibilityLevel && accessibilityLevel < 7) {
|
|
35
|
-
Component = "h".concat(accessibilityLevel); // eslint-disable-next-line no-param-reassign
|
|
36
|
-
|
|
37
|
-
accessibilityRole = undefined; // eslint-disable-next-line no-param-reassign
|
|
38
|
-
|
|
39
|
-
accessibilityLevel = undefined;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
var element = /*#__PURE__*/React.createElement(Component, {
|
|
43
|
-
ref: ref,
|
|
44
|
-
className: className,
|
|
45
|
-
role: accessibilityRole ? mapAccessibilityRoleToAriaRole[accessibilityRole] : undefined,
|
|
46
|
-
"aria-roledescription": accessibilityRoleDescription,
|
|
47
|
-
"aria-level": accessibilityLevel
|
|
15
|
+
function SpinningIcon(_ref) {
|
|
16
|
+
var children = _ref.children;
|
|
17
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
18
|
+
className: styles$1.SpinningIcon
|
|
48
19
|
}, children);
|
|
49
|
-
return hasTextAncestor ? element : /*#__PURE__*/React.createElement(PrimitiveTextAncestorContext.Provider, {
|
|
50
|
-
value: true
|
|
51
|
-
}, element);
|
|
52
|
-
});
|
|
53
|
-
var textResetMixin = /*#__PURE__*/css(["", " display:inline;white-space:pre-wrap;word-wrap:break-word;color:inherit;font:inherit;"], resetMixin);
|
|
54
|
-
var PrimitiveText = /*#__PURE__*/styled(PrimitiveTextWithClassName$1).withConfig({
|
|
55
|
-
displayName: "PrimitiveTextweb__PrimitiveText",
|
|
56
|
-
componentId: "kitt-universal__sc-8bfguf-0"
|
|
57
|
-
})(["", " ", ";", ""], textResetMixin, function (_ref2) {
|
|
58
|
-
var selectable = _ref2.selectable;
|
|
59
|
-
return selectable == null ? undefined : "user-select: ".concat(selectable ? 'text' : 'none');
|
|
60
|
-
}, function (_ref3) {
|
|
61
|
-
var numberOfLines = _ref3.numberOfLines;
|
|
62
|
-
return numberOfLines ? "\n display: -webkit-box;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-line-clamp: ".concat(numberOfLines, ";\n -webkit-box-orient: vertical;\n line-clamp: ").concat(numberOfLines, ";\n ") : '';
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
function createPressClickHandler(onPress) {
|
|
66
|
-
if (!onPress) return undefined;
|
|
67
|
-
return function (event) {
|
|
68
|
-
event.stopPropagation();
|
|
69
|
-
onPress(event);
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
var isValidKeyPress = function (_ref) {
|
|
74
|
-
var key = _ref.key,
|
|
75
|
-
target = _ref.target;
|
|
76
|
-
var role = target.getAttribute('role');
|
|
77
|
-
return key === 'Enter' || (key === ' ' || key === 'Spacebar') && role === 'button';
|
|
78
|
-
}; // https://github.com/necolas/react-native-web/blob/b2eb3ca03ffc4b8570591b6c2082c6e4edae0e7f/packages/react-native-web/src/modules/usePressEvents/PressResponder.js#L300-L322
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
function createPressKeyUpHandler(onPress) {
|
|
82
|
-
if (!onPress) return undefined;
|
|
83
|
-
return function (event) {
|
|
84
|
-
if (isValidKeyPress(event)) {
|
|
85
|
-
onPress(event);
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
20
|
}
|
|
89
21
|
|
|
90
|
-
var
|
|
91
|
-
displayName: "PrimitiveViewweb__StyledDiv",
|
|
92
|
-
componentId: "kitt-universal__sc-1t2oiuz-0"
|
|
93
|
-
})(["", " align-items:stretch;display:", ";flex-basis:auto;flex-direction:column;flex-shrink:0;min-height:0;min-width:0;position:'relative';z-index:0;"], resetMixin, function (_ref) {
|
|
94
|
-
var hasTextAncestor = _ref.hasTextAncestor;
|
|
95
|
-
return hasTextAncestor ? 'inline-flex' : 'flex';
|
|
96
|
-
});
|
|
97
|
-
var PrimitiveView = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
98
|
-
var children = _ref2.children,
|
|
99
|
-
className = _ref2.className,
|
|
100
|
-
style = _ref2.style,
|
|
101
|
-
accessibilityRole = _ref2.accessibilityRole,
|
|
102
|
-
nativeID = _ref2.nativeID,
|
|
103
|
-
testID = _ref2.testID,
|
|
104
|
-
tabIndex = _ref2.tabIndex,
|
|
105
|
-
onPress = _ref2.onPress;
|
|
106
|
-
var hasTextAncestor = React.useContext(PrimitiveTextAncestorContext);
|
|
107
|
-
return /*#__PURE__*/React.createElement(StyledDiv, {
|
|
108
|
-
ref: ref,
|
|
109
|
-
hasTextAncestor: hasTextAncestor,
|
|
110
|
-
id: nativeID,
|
|
111
|
-
className: className,
|
|
112
|
-
style: style,
|
|
113
|
-
"data-testid": testID,
|
|
114
|
-
role: accessibilityRole,
|
|
115
|
-
tabIndex: tabIndex,
|
|
116
|
-
onClick: createPressClickHandler(onPress),
|
|
117
|
-
onKeyUp: createPressKeyUpHandler(onPress)
|
|
118
|
-
}, children);
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
var spin = /*#__PURE__*/keyframes(["0%{transform:rotate(-1deg);}100%{transform:rotate(359deg);}"]);
|
|
122
|
-
var SpinningIcon = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
123
|
-
displayName: "SpinningIconweb__SpinningIcon",
|
|
124
|
-
componentId: "kitt-universal__sc-xgsnek-0"
|
|
125
|
-
})(["animation:", " 1.1s infinite linear;"], spin);
|
|
126
|
-
|
|
127
|
-
var IconContainer$2 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
22
|
+
var IconContainer$2 = /*#__PURE__*/styled.View.withConfig({
|
|
128
23
|
displayName: "Icon__IconContainer",
|
|
129
24
|
componentId: "kitt-universal__sc-usm0ol-0"
|
|
130
25
|
})(["color:", ";width:", "px;height:", "px;align-self:", ";"], function (_ref) {
|
|
@@ -158,13 +53,13 @@ function Icon(_ref5) {
|
|
|
158
53
|
}, spin ? /*#__PURE__*/React.createElement(SpinningIcon, null, clonedIcon) : clonedIcon);
|
|
159
54
|
}
|
|
160
55
|
|
|
161
|
-
var _excluded$
|
|
56
|
+
var _excluded$9 = ["accessibilityRole", "base", "variant", "color"];
|
|
162
57
|
var TypographyTypeContext = /*#__PURE__*/createContext(undefined);
|
|
163
58
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
164
59
|
function useTypographyColor() {
|
|
165
60
|
return useContext(TypographyColorContext);
|
|
166
61
|
}
|
|
167
|
-
var StyledTypography = /*#__PURE__*/styled
|
|
62
|
+
var StyledTypography = /*#__PURE__*/styled.Text.withConfig({
|
|
168
63
|
displayName: "Typography__StyledTypography",
|
|
169
64
|
componentId: "kitt-universal__sc-1dz700q-0"
|
|
170
65
|
})(["", " ", ""], function (_ref) {
|
|
@@ -193,11 +88,11 @@ var isTypographyHeader = function (base, typeInContext) {
|
|
|
193
88
|
};
|
|
194
89
|
|
|
195
90
|
function Typography(_ref3) {
|
|
196
|
-
|
|
197
|
-
base = _ref3.base,
|
|
91
|
+
_ref3.accessibilityRole;
|
|
92
|
+
var base = _ref3.base,
|
|
198
93
|
variant = _ref3.variant,
|
|
199
94
|
color = _ref3.color,
|
|
200
|
-
otherProps = _objectWithoutProperties(_ref3, _excluded$
|
|
95
|
+
otherProps = _objectWithoutProperties(_ref3, _excluded$9);
|
|
201
96
|
|
|
202
97
|
var typeInContext = useContext(TypographyTypeContext);
|
|
203
98
|
var isHeader = isTypographyHeader(base, typeInContext);
|
|
@@ -212,13 +107,11 @@ function Typography(_ref3) {
|
|
|
212
107
|
color: colorWithDefaultToBlack,
|
|
213
108
|
isHeader: isHeader,
|
|
214
109
|
type: base,
|
|
215
|
-
variant: nonNullableVariant
|
|
216
|
-
accessibilityRole: accessibilityRole || undefined
|
|
110
|
+
variant: nonNullableVariant
|
|
217
111
|
}, otherProps))) : /*#__PURE__*/React.createElement(StyledTypography, _extends({
|
|
218
112
|
color: colorWithDefaultToBlack,
|
|
219
113
|
isHeader: isHeader,
|
|
220
|
-
variant: nonNullableVariant
|
|
221
|
-
accessibilityRole: accessibilityRole || undefined
|
|
114
|
+
variant: nonNullableVariant
|
|
222
115
|
}, otherProps));
|
|
223
116
|
return color ? /*#__PURE__*/React.createElement(TypographyColorContext.Provider, {
|
|
224
117
|
value: color
|
|
@@ -232,19 +125,19 @@ function TypographyText(props) {
|
|
|
232
125
|
}
|
|
233
126
|
|
|
234
127
|
function TypographyParagraph(props) {
|
|
128
|
+
// @ts-expect-error paragraph is not allowed in react-native but exists in react-native-web
|
|
235
129
|
return /*#__PURE__*/React.createElement(Typography, _extends({
|
|
236
130
|
accessibilityRole: "paragraph"
|
|
237
131
|
}, props));
|
|
238
132
|
}
|
|
239
133
|
|
|
240
|
-
var createHeading = function (level
|
|
134
|
+
var createHeading = function (level) {
|
|
241
135
|
// https://github.com/necolas/react-native-web/issues/401
|
|
242
136
|
function TypographyHeading(props) {
|
|
243
137
|
return /*#__PURE__*/React.createElement(Typography, _extends({
|
|
244
|
-
accessibilityRole: "header"
|
|
245
|
-
base: defaultBase
|
|
138
|
+
accessibilityRole: "header"
|
|
246
139
|
}, props, {
|
|
247
|
-
|
|
140
|
+
"aria-level": level
|
|
248
141
|
}));
|
|
249
142
|
}
|
|
250
143
|
|
|
@@ -254,29 +147,13 @@ var createHeading = function (level, defaultBase) {
|
|
|
254
147
|
|
|
255
148
|
Typography.Text = TypographyText;
|
|
256
149
|
Typography.Paragraph = TypographyParagraph;
|
|
257
|
-
Typography.
|
|
258
|
-
Typography.
|
|
259
|
-
Typography.
|
|
260
|
-
Typography.
|
|
261
|
-
Typography.
|
|
262
|
-
Typography.Header6 = createHeading(6);
|
|
263
|
-
/** @deprecated use Typography.Header1 */
|
|
150
|
+
Typography.h1 = createHeading('1');
|
|
151
|
+
Typography.h2 = createHeading('2');
|
|
152
|
+
Typography.h3 = createHeading('3');
|
|
153
|
+
Typography.h4 = createHeading('4');
|
|
154
|
+
Typography.h5 = createHeading('5');
|
|
264
155
|
|
|
265
|
-
|
|
266
|
-
/** @deprecated use Typography.Header2 */
|
|
267
|
-
|
|
268
|
-
Typography.h2 = createHeading(2, 'header2');
|
|
269
|
-
/** @deprecated use Typography.Header3 */
|
|
270
|
-
|
|
271
|
-
Typography.h3 = createHeading(3, 'header3');
|
|
272
|
-
/** @deprecated use Typography.Header4 */
|
|
273
|
-
|
|
274
|
-
Typography.h4 = createHeading(4, 'header4');
|
|
275
|
-
/** @deprecated use Typography.Header6 */
|
|
276
|
-
|
|
277
|
-
Typography.h5 = createHeading(5, 'header5');
|
|
278
|
-
|
|
279
|
-
var _excluded$9 = ["size"];
|
|
156
|
+
var _excluded$8 = ["size"];
|
|
280
157
|
|
|
281
158
|
var getFirstCharacter = function (string) {
|
|
282
159
|
return string ? string[0] : '';
|
|
@@ -286,7 +163,7 @@ var getInitials = function (firstname, lastname) {
|
|
|
286
163
|
return (getFirstCharacter(firstname) + getFirstCharacter(lastname)).toUpperCase();
|
|
287
164
|
};
|
|
288
165
|
|
|
289
|
-
var StyledAvatarView = /*#__PURE__*/styled
|
|
166
|
+
var StyledAvatarView = /*#__PURE__*/styled.View.withConfig({
|
|
290
167
|
displayName: "Avatar__StyledAvatarView",
|
|
291
168
|
componentId: "kitt-universal__sc-9miubv-0"
|
|
292
169
|
})(["border-radius:", "px;background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], function (_ref) {
|
|
@@ -343,7 +220,7 @@ function AvatarContent(_ref5) {
|
|
|
343
220
|
function Avatar(_ref6) {
|
|
344
221
|
var _ref6$size = _ref6.size,
|
|
345
222
|
size = _ref6$size === void 0 ? 40 : _ref6$size,
|
|
346
|
-
rest = _objectWithoutProperties(_ref6, _excluded$
|
|
223
|
+
rest = _objectWithoutProperties(_ref6, _excluded$8);
|
|
347
224
|
|
|
348
225
|
return /*#__PURE__*/React.createElement(StyledAvatarView, _extends({}, rest, {
|
|
349
226
|
size: size
|
|
@@ -352,55 +229,7 @@ function Avatar(_ref6) {
|
|
|
352
229
|
})));
|
|
353
230
|
}
|
|
354
231
|
|
|
355
|
-
var
|
|
356
|
-
var focusable = _ref.focusable,
|
|
357
|
-
disabled = _ref.disabled;
|
|
358
|
-
if (disabled) return -1;
|
|
359
|
-
if (focusable === false) return -1;
|
|
360
|
-
return 0;
|
|
361
|
-
};
|
|
362
|
-
|
|
363
|
-
var handlePressPreventDefault = function (e) {
|
|
364
|
-
e.preventDefault();
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
var PrimitivePressableWithClassName = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
368
|
-
var disabled = _ref2.disabled,
|
|
369
|
-
focusable = _ref2.focusable,
|
|
370
|
-
children = _ref2.children,
|
|
371
|
-
className = _ref2.className,
|
|
372
|
-
accessibilityRole = _ref2.accessibilityRole,
|
|
373
|
-
nativeID = _ref2.nativeID,
|
|
374
|
-
testID = _ref2.testID,
|
|
375
|
-
onPress = _ref2.onPress;
|
|
376
|
-
return /*#__PURE__*/React.createElement(PrimitiveView, {
|
|
377
|
-
ref: ref,
|
|
378
|
-
nativeID: nativeID,
|
|
379
|
-
testID: testID,
|
|
380
|
-
className: className,
|
|
381
|
-
"aria-disabled": !!disabled,
|
|
382
|
-
accessibilityRole: accessibilityRole
|
|
383
|
-
/* https://necolas.github.io/react-native-web/docs/accessibility/#keyboard-focus */
|
|
384
|
-
,
|
|
385
|
-
tabIndex: getTabIndex({
|
|
386
|
-
focusable: focusable,
|
|
387
|
-
disabled: disabled
|
|
388
|
-
}),
|
|
389
|
-
onPress: disabled ? handlePressPreventDefault : onPress
|
|
390
|
-
}, children);
|
|
391
|
-
});
|
|
392
|
-
var PrimitivePressable = /*#__PURE__*/styled(PrimitivePressableWithClassName).withConfig({
|
|
393
|
-
displayName: "PrimitivePressableweb__PrimitivePressable",
|
|
394
|
-
componentId: "kitt-universal__sc-1pzco2e-0"
|
|
395
|
-
})(["cursor:", ";touch-action:", ";"], function (_ref3) {
|
|
396
|
-
var disabled = _ref3.disabled;
|
|
397
|
-
return disabled ? 'not-allowed' : 'pointer';
|
|
398
|
-
}, function (_ref4) {
|
|
399
|
-
var disabled = _ref4.disabled;
|
|
400
|
-
return disabled ? 'none' : 'manipulation';
|
|
401
|
-
});
|
|
402
|
-
|
|
403
|
-
var ButtonContainer = /*#__PURE__*/styled(PrimitivePressable).withConfig({
|
|
232
|
+
var ButtonContainer = /*#__PURE__*/styled.Pressable.withConfig({
|
|
404
233
|
displayName: "ButtonContainer",
|
|
405
234
|
componentId: "kitt-universal__sc-ofbpwm-0"
|
|
406
235
|
})(["min-width:", ";max-width:", ";width:", ";min-height:", ";background-color:", ";padding:", ";flex-direction:row;align-self:flex-start;border-radius:", ";border-color:", ";border-width:", ";"], function (_ref) {
|
|
@@ -443,7 +272,7 @@ var ButtonContainer = /*#__PURE__*/styled(PrimitivePressable).withConfig({
|
|
|
443
272
|
return theme.kitt.button.borderWidth;
|
|
444
273
|
});
|
|
445
274
|
|
|
446
|
-
var _excluded$
|
|
275
|
+
var _excluded$7 = ["color"],
|
|
447
276
|
_excluded2$2 = ["color"];
|
|
448
277
|
|
|
449
278
|
function TypographyIconInheritColor(props) {
|
|
@@ -456,7 +285,7 @@ function TypographyIconInheritColor(props) {
|
|
|
456
285
|
|
|
457
286
|
function TypographyIconSpecifiedColor(_ref) {
|
|
458
287
|
var color = _ref.color,
|
|
459
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
288
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$7);
|
|
460
289
|
|
|
461
290
|
var theme = /*#__PURE__*/useTheme();
|
|
462
291
|
return /*#__PURE__*/React.createElement(Icon, _extends({}, otherProps, {
|
|
@@ -500,7 +329,7 @@ var ButtonText = /*#__PURE__*/styled(Typography.Text).withConfig({
|
|
|
500
329
|
displayName: "ButtonContent__ButtonText",
|
|
501
330
|
componentId: "kitt-universal__sc-dnyw3n-0"
|
|
502
331
|
})(["text-align:center;"]);
|
|
503
|
-
var Content$1 = /*#__PURE__*/styled
|
|
332
|
+
var Content$1 = /*#__PURE__*/styled.View.withConfig({
|
|
504
333
|
displayName: "ButtonContent__Content",
|
|
505
334
|
componentId: "kitt-universal__sc-dnyw3n-1"
|
|
506
335
|
})(["flex-direction:row;align-items:center;justify-content:center;flex:", ";"], function (_ref) {
|
|
@@ -508,7 +337,7 @@ var Content$1 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
508
337
|
iconOnly = _ref.iconOnly;
|
|
509
338
|
return "".concat(stretch || iconOnly ? 1 : 0, " 1 auto");
|
|
510
339
|
});
|
|
511
|
-
var IconContainer$1 = /*#__PURE__*/styled
|
|
340
|
+
var IconContainer$1 = /*#__PURE__*/styled.View.withConfig({
|
|
512
341
|
displayName: "ButtonContent__IconContainer",
|
|
513
342
|
componentId: "kitt-universal__sc-dnyw3n-2"
|
|
514
343
|
})(["", ""], function (_ref2) {
|
|
@@ -558,7 +387,7 @@ function ButtonContent(_ref4) {
|
|
|
558
387
|
size: theme.kitt.button.iconSize
|
|
559
388
|
};
|
|
560
389
|
|
|
561
|
-
if (
|
|
390
|
+
if (process.env.NODE_ENV !== "production") {
|
|
562
391
|
if (!(children || icon)) {
|
|
563
392
|
throw new Error('kitt(Button): You should provide at least a children or a icon');
|
|
564
393
|
}
|
|
@@ -646,7 +475,7 @@ function Button(_ref) {
|
|
|
646
475
|
}), children));
|
|
647
476
|
}
|
|
648
477
|
|
|
649
|
-
var Container$5 = /*#__PURE__*/styled
|
|
478
|
+
var Container$5 = /*#__PURE__*/styled.View.withConfig({
|
|
650
479
|
displayName: "Card__Container",
|
|
651
480
|
componentId: "kitt-universal__sc-1n9psug-0"
|
|
652
481
|
})(["background-color:", ";padding:", ";border-radius:", ";border-width:", ";border-color:", ";"], function (_ref) {
|
|
@@ -744,11 +573,11 @@ var KittBreakpointsMax = {
|
|
|
744
573
|
LARGE: KittBreakpoints.WIDE - 1
|
|
745
574
|
};
|
|
746
575
|
|
|
747
|
-
var FieldContainer = /*#__PURE__*/styled
|
|
576
|
+
var FieldContainer = /*#__PURE__*/styled.View.withConfig({
|
|
748
577
|
displayName: "InputField__FieldContainer",
|
|
749
578
|
componentId: "kitt-universal__sc-13fkixs-0"
|
|
750
579
|
})(["padding:5px 0 10px;"]);
|
|
751
|
-
var FeedbackContainer = /*#__PURE__*/styled
|
|
580
|
+
var FeedbackContainer = /*#__PURE__*/styled.View.withConfig({
|
|
752
581
|
displayName: "InputField__FeedbackContainer",
|
|
753
582
|
componentId: "kitt-universal__sc-13fkixs-1"
|
|
754
583
|
})(["", ";"], function (_ref) {
|
|
@@ -757,14 +586,14 @@ var FeedbackContainer = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
757
586
|
minWidth: KittBreakpoints.SMALL
|
|
758
587
|
}, 'padding-top: 10px', 'padding-top: 5px');
|
|
759
588
|
});
|
|
760
|
-
var FieldLabelContainer = /*#__PURE__*/styled
|
|
589
|
+
var FieldLabelContainer = /*#__PURE__*/styled.View.withConfig({
|
|
761
590
|
displayName: "InputField__FieldLabelContainer",
|
|
762
591
|
componentId: "kitt-universal__sc-13fkixs-2"
|
|
763
592
|
})(["flex-direction:row;align-items:center;padding-bottom:", "px;"], function (_ref2) {
|
|
764
593
|
var theme = _ref2.theme;
|
|
765
594
|
return theme.kitt.forms.inputField.labelContainerPaddingBottom;
|
|
766
595
|
});
|
|
767
|
-
var LabelContainer = /*#__PURE__*/styled
|
|
596
|
+
var LabelContainer = /*#__PURE__*/styled.View.withConfig({
|
|
768
597
|
displayName: "InputField__LabelContainer",
|
|
769
598
|
componentId: "kitt-universal__sc-13fkixs-3"
|
|
770
599
|
})(["margin-right:", "px;"], function (_ref3) {
|
|
@@ -807,7 +636,7 @@ var useInputText = function () {
|
|
|
807
636
|
};
|
|
808
637
|
};
|
|
809
638
|
|
|
810
|
-
var _excluded$
|
|
639
|
+
var _excluded$6 = ["id", "minHeight", "type", "state", "internalForceState", "disabled", "onFocus", "onBlur"];
|
|
811
640
|
var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width:", ";border-radius:", ";border-color:", ";font-size:", ";color:", ";font-family:", ";"], function (_ref) {
|
|
812
641
|
var theme = _ref.theme,
|
|
813
642
|
state = _ref.state;
|
|
@@ -833,7 +662,7 @@ var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width
|
|
|
833
662
|
var theme = _ref7.theme;
|
|
834
663
|
return theme.kitt.typography.types.bodies.fontFamily.regular;
|
|
835
664
|
});
|
|
836
|
-
var Input = /*#__PURE__*/styled
|
|
665
|
+
var Input = /*#__PURE__*/styled.TextInput.withConfig({
|
|
837
666
|
displayName: "InputText__Input",
|
|
838
667
|
componentId: "kitt-universal__sc-uke279-0"
|
|
839
668
|
})(["", " padding:", ";line-height:", ";min-height:", "px;"], styledTextInputMixin, function (_ref8) {
|
|
@@ -848,7 +677,7 @@ var Input = /*#__PURE__*/styled(TextInput).withConfig({
|
|
|
848
677
|
var minHeight = _ref10.minHeight;
|
|
849
678
|
return minHeight;
|
|
850
679
|
});
|
|
851
|
-
var Container$4 = /*#__PURE__*/styled
|
|
680
|
+
var Container$4 = /*#__PURE__*/styled.View.withConfig({
|
|
852
681
|
displayName: "InputText__Container",
|
|
853
682
|
componentId: "kitt-universal__sc-uke279-1"
|
|
854
683
|
})(["margin-top:", ";margin-bottom:", ";"], function (_ref11) {
|
|
@@ -858,7 +687,7 @@ var Container$4 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
858
687
|
var theme = _ref12.theme;
|
|
859
688
|
return theme.kitt.forms.input.marginBottom;
|
|
860
689
|
});
|
|
861
|
-
var PasswordButtonContainer = /*#__PURE__*/styled
|
|
690
|
+
var PasswordButtonContainer = /*#__PURE__*/styled.Pressable.withConfig({
|
|
862
691
|
displayName: "InputText__PasswordButtonContainer",
|
|
863
692
|
componentId: "kitt-universal__sc-uke279-2"
|
|
864
693
|
})(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:", "px;"], function (_ref13) {
|
|
@@ -911,7 +740,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref15, ref) {
|
|
|
911
740
|
disabled = _ref15$disabled === void 0 ? false : _ref15$disabled,
|
|
912
741
|
_onFocus = _ref15.onFocus,
|
|
913
742
|
_onBlur = _ref15.onBlur,
|
|
914
|
-
props = _objectWithoutProperties(_ref15, _excluded$
|
|
743
|
+
props = _objectWithoutProperties(_ref15, _excluded$6);
|
|
915
744
|
|
|
916
745
|
var _useInputText = useInputText(),
|
|
917
746
|
isFocused = _useInputText.isFocused,
|
|
@@ -949,7 +778,6 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref15, ref) {
|
|
|
949
778
|
if (_onBlur) _onBlur(e);
|
|
950
779
|
}
|
|
951
780
|
})), type === 'password' && !disabled && /*#__PURE__*/React.createElement(PasswordButtonContainer, {
|
|
952
|
-
accessibilityRole: "button",
|
|
953
781
|
onPress: togglePasswordVisibility
|
|
954
782
|
}, /*#__PURE__*/React.createElement(TypographyIcon, {
|
|
955
783
|
icon: isPasswordVisible ? /*#__PURE__*/React.createElement(EyeIcon, null) : /*#__PURE__*/React.createElement(EyeOffIcon, null),
|
|
@@ -968,7 +796,7 @@ function Label(_ref) {
|
|
|
968
796
|
}, children));
|
|
969
797
|
}
|
|
970
798
|
|
|
971
|
-
var OuterRadio = /*#__PURE__*/styled
|
|
799
|
+
var OuterRadio = /*#__PURE__*/styled.View.withConfig({
|
|
972
800
|
displayName: "Radio__OuterRadio",
|
|
973
801
|
componentId: "kitt-universal__sc-1mdgr2o-0"
|
|
974
802
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;border-width:", ";border-color:", ";"], function (_ref) {
|
|
@@ -992,7 +820,7 @@ var OuterRadio = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
992
820
|
disabled = _ref6.disabled;
|
|
993
821
|
return theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].borderColor;
|
|
994
822
|
});
|
|
995
|
-
var SelectedOuterRadio = /*#__PURE__*/styled
|
|
823
|
+
var SelectedOuterRadio = /*#__PURE__*/styled.View.withConfig({
|
|
996
824
|
displayName: "Radio__SelectedOuterRadio",
|
|
997
825
|
componentId: "kitt-universal__sc-1mdgr2o-1"
|
|
998
826
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;justify-content:center;align-items:center;"], function (_ref7) {
|
|
@@ -1008,7 +836,7 @@ var SelectedOuterRadio = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1008
836
|
var theme = _ref10.theme;
|
|
1009
837
|
return theme.kitt.forms.radio.size / 2;
|
|
1010
838
|
});
|
|
1011
|
-
var SelectedInnerRadio = /*#__PURE__*/styled
|
|
839
|
+
var SelectedInnerRadio = /*#__PURE__*/styled.View.withConfig({
|
|
1012
840
|
displayName: "Radio__SelectedInnerRadio",
|
|
1013
841
|
componentId: "kitt-universal__sc-1mdgr2o-2"
|
|
1014
842
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;"], function (_ref11) {
|
|
@@ -1024,7 +852,7 @@ var SelectedInnerRadio = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1024
852
|
var theme = _ref14.theme;
|
|
1025
853
|
return theme.kitt.forms.radio.checked.innerSize / 2;
|
|
1026
854
|
});
|
|
1027
|
-
var Container$3 = /*#__PURE__*/styled
|
|
855
|
+
var Container$3 = /*#__PURE__*/styled.Pressable.withConfig({
|
|
1028
856
|
displayName: "Radio__Container",
|
|
1029
857
|
componentId: "kitt-universal__sc-1mdgr2o-3"
|
|
1030
858
|
})(["flex-direction:row;align-items:center;"]);
|
|
@@ -1048,7 +876,7 @@ function Radio(_ref16) {
|
|
|
1048
876
|
disabled: disabled,
|
|
1049
877
|
accessibilityRole: "radio",
|
|
1050
878
|
"aria-checked": checked,
|
|
1051
|
-
|
|
879
|
+
accessible: checked && !disabled,
|
|
1052
880
|
onPress: function handlePress() {
|
|
1053
881
|
onChange(value);
|
|
1054
882
|
}
|
|
@@ -1072,7 +900,7 @@ function TextArea(_ref) {
|
|
|
1072
900
|
}));
|
|
1073
901
|
}
|
|
1074
902
|
|
|
1075
|
-
var Body = /*#__PURE__*/styled
|
|
903
|
+
var Body = /*#__PURE__*/styled.View.withConfig({
|
|
1076
904
|
displayName: "Body",
|
|
1077
905
|
componentId: "kitt-universal__sc-1ofncfn-0"
|
|
1078
906
|
})(["", " background-color:", ";flex:1;"], function (_ref) {
|
|
@@ -1089,7 +917,7 @@ function FullScreenModalBody(_ref3) {
|
|
|
1089
917
|
return /*#__PURE__*/React.createElement(Body, null, children);
|
|
1090
918
|
}
|
|
1091
919
|
|
|
1092
|
-
var SideContainer = /*#__PURE__*/styled
|
|
920
|
+
var SideContainer = /*#__PURE__*/styled.View.withConfig({
|
|
1093
921
|
displayName: "Header__SideContainer",
|
|
1094
922
|
componentId: "kitt-universal__sc-dfmxi1-0"
|
|
1095
923
|
})(["", ""], function (_ref) {
|
|
@@ -1109,7 +937,7 @@ function getHeaderHorizontalMediumPadding(spacing) {
|
|
|
1109
937
|
return spacing * 6;
|
|
1110
938
|
}
|
|
1111
939
|
|
|
1112
|
-
var Header = /*#__PURE__*/styled
|
|
940
|
+
var Header = /*#__PURE__*/styled.View.withConfig({
|
|
1113
941
|
displayName: "Header",
|
|
1114
942
|
componentId: "kitt-universal__sc-dfmxi1-1"
|
|
1115
943
|
})(["", ";border-bottom-color:", ";border-bottom-width:1px;flex-direction:row;align-items:center;"], function (_ref2) {
|
|
@@ -1127,7 +955,7 @@ var Header = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1127
955
|
var theme = _ref3.theme;
|
|
1128
956
|
return theme.kitt.fullScreenModal.header.borderColor;
|
|
1129
957
|
});
|
|
1130
|
-
var HeaderContent = /*#__PURE__*/styled
|
|
958
|
+
var HeaderContent = /*#__PURE__*/styled.View.withConfig({
|
|
1131
959
|
displayName: "Header__HeaderContent",
|
|
1132
960
|
componentId: "kitt-universal__sc-dfmxi1-2"
|
|
1133
961
|
})(["", ";", ";justify-content:center;align-items:center;"], function (_ref4) {
|
|
@@ -1213,7 +1041,7 @@ function FullScreenModalHeader(_ref6) {
|
|
|
1213
1041
|
}, right) : null);
|
|
1214
1042
|
}
|
|
1215
1043
|
|
|
1216
|
-
var Container$2 = /*#__PURE__*/styled
|
|
1044
|
+
var Container$2 = /*#__PURE__*/styled.View.withConfig({
|
|
1217
1045
|
displayName: "FullScreenModal__Container",
|
|
1218
1046
|
componentId: "kitt-universal__sc-11qpbe3-0"
|
|
1219
1047
|
})(["flex:1;background-color:", ";"], function (_ref) {
|
|
@@ -1227,112 +1055,21 @@ function FullScreenModal(_ref2) {
|
|
|
1227
1055
|
FullScreenModal.Header = FullScreenModalHeader;
|
|
1228
1056
|
FullScreenModal.Body = FullScreenModalBody;
|
|
1229
1057
|
|
|
1230
|
-
var
|
|
1231
|
-
|
|
1232
|
-
componentId: "kitt-universal__sc-1m6jo3s-0"
|
|
1233
|
-
})(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref) {
|
|
1234
|
-
var theme = _ref.theme;
|
|
1235
|
-
return theme.kitt.iconButton.borderRadius;
|
|
1236
|
-
}, function (_ref2) {
|
|
1237
|
-
var theme = _ref2.theme;
|
|
1238
|
-
return theme.kitt.iconButton.width;
|
|
1239
|
-
}, function (_ref3) {
|
|
1240
|
-
var theme = _ref3.theme;
|
|
1241
|
-
return theme.kitt.iconButton.height;
|
|
1242
|
-
}, function (_ref4) {
|
|
1243
|
-
var theme = _ref4.theme,
|
|
1244
|
-
color = _ref4.color,
|
|
1245
|
-
disabled = _ref4.disabled;
|
|
1246
|
-
var iconButton = theme.kitt.iconButton;
|
|
1247
|
-
var transition = iconButton.transition,
|
|
1248
|
-
scale = iconButton.scale;
|
|
1249
|
-
|
|
1250
|
-
if (disabled) {
|
|
1251
|
-
return "\n background-color: ".concat(iconButton.disabled.backgroundColor, ";\n ");
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n\n &:hover,\n .kitt-hover & {\n @media (hover: none) and (pointer: coarse) {\n transform: scale(").concat(scale.base.hover, ");\n }\n\n @media(").concat(theme.breakpoints.min.mediumBreakpoint, ") {\n transform: scale(").concat(scale.medium.hover, ");\n }\n }\n\n &:active,\n .kitt-active & {\n transform: scale(").concat(scale.base.active, ");\n }\n\n &:hover,\n .kitt-hover &,\n &:focus,\n .kitt-focus &,\n &:active,\n .kitt-active & {\n background-color: ").concat(color === 'white' ? iconButton.white.pressedBackgroundColor : iconButton["default"].pressedBackgroundColor, ";\n }\n ");
|
|
1255
|
-
});
|
|
1256
|
-
|
|
1257
|
-
function WebAnimatedContainer(_ref) {
|
|
1258
|
-
var children = _ref.children,
|
|
1259
|
-
color = _ref.color,
|
|
1260
|
-
disabled = _ref.disabled,
|
|
1261
|
-
onPress = _ref.onPress;
|
|
1262
|
-
return /*#__PURE__*/React.createElement(PressableIconButton, {
|
|
1263
|
-
accessibilityRole: "button",
|
|
1264
|
-
color: color,
|
|
1265
|
-
disabled: disabled,
|
|
1266
|
-
onPress: onPress
|
|
1267
|
-
}, children);
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
var PressableAnimatedContainer = WebAnimatedContainer;
|
|
1271
|
-
|
|
1272
|
-
var IconButtonContentBorder = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1273
|
-
displayName: "IconButton__IconButtonContentBorder",
|
|
1274
|
-
componentId: "kitt-universal__sc-swelbf-0"
|
|
1275
|
-
})(["border:", ";border-color:", ";width:", "px;height:", "px;align-items:center;justify-content:center;border-radius:", "px;"], function (_ref) {
|
|
1276
|
-
var theme = _ref.theme;
|
|
1277
|
-
return "".concat(theme.kitt.iconButton.borderWidth, "px solid");
|
|
1278
|
-
}, function (_ref2) {
|
|
1279
|
-
var theme = _ref2.theme,
|
|
1280
|
-
disabled = _ref2.disabled;
|
|
1281
|
-
return disabled ? theme.kitt.iconButton.disabled.borderColor : theme.kitt.iconButton.borderColor;
|
|
1282
|
-
}, function (_ref3) {
|
|
1283
|
-
var theme = _ref3.theme;
|
|
1284
|
-
return theme.kitt.iconButton.width - theme.kitt.iconButton.borderWidth;
|
|
1285
|
-
}, function (_ref4) {
|
|
1286
|
-
var theme = _ref4.theme;
|
|
1287
|
-
return theme.kitt.iconButton.height - theme.kitt.iconButton.borderWidth;
|
|
1288
|
-
}, function (_ref5) {
|
|
1289
|
-
var theme = _ref5.theme;
|
|
1290
|
-
return theme.kitt.iconButton.borderRadius;
|
|
1291
|
-
});
|
|
1292
|
-
|
|
1293
|
-
function IconButtonContent(_ref6) {
|
|
1294
|
-
var disabled = _ref6.disabled,
|
|
1295
|
-
color = _ref6.color,
|
|
1296
|
-
icon = _ref6.icon;
|
|
1297
|
-
return /*#__PURE__*/React.createElement(IconButtonContentBorder, {
|
|
1298
|
-
disabled: disabled
|
|
1299
|
-
}, /*#__PURE__*/React.createElement(TypographyIcon, {
|
|
1300
|
-
color: disabled ? 'black-light' : color,
|
|
1301
|
-
icon: icon
|
|
1302
|
-
}));
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
function IconButton(_ref7) {
|
|
1306
|
-
var icon = _ref7.icon,
|
|
1307
|
-
color = _ref7.color,
|
|
1308
|
-
disabled = _ref7.disabled,
|
|
1309
|
-
onPress = _ref7.onPress;
|
|
1310
|
-
return /*#__PURE__*/React.createElement(PressableAnimatedContainer, {
|
|
1311
|
-
color: color,
|
|
1312
|
-
disabled: disabled,
|
|
1313
|
-
onPress: onPress
|
|
1314
|
-
}, /*#__PURE__*/React.createElement(IconButtonContent, {
|
|
1315
|
-
disabled: disabled,
|
|
1316
|
-
color: color,
|
|
1317
|
-
icon: icon
|
|
1318
|
-
}));
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
|
-
var _excluded$6 = ["children"];
|
|
1322
|
-
var ContentView$1 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1058
|
+
var _excluded$5 = ["children"];
|
|
1059
|
+
var ContentView$1 = /*#__PURE__*/styled.View.withConfig({
|
|
1323
1060
|
displayName: "ListItemContent__ContentView",
|
|
1324
1061
|
componentId: "kitt-universal__sc-57q0u9-0"
|
|
1325
1062
|
})(["flex:1 0 0%;align-self:center;"]);
|
|
1326
1063
|
function ListItemContent(_ref) {
|
|
1327
1064
|
var children = _ref.children,
|
|
1328
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
1065
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
1329
1066
|
|
|
1330
1067
|
return /*#__PURE__*/React.createElement(ContentView$1, rest, children);
|
|
1331
1068
|
}
|
|
1332
1069
|
|
|
1333
|
-
var _excluded$
|
|
1070
|
+
var _excluded$4 = ["children", "side"],
|
|
1334
1071
|
_excluded2$1 = ["children", "align"];
|
|
1335
|
-
var SideContainerView = /*#__PURE__*/styled
|
|
1072
|
+
var SideContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
1336
1073
|
displayName: "ListItemSideContent__SideContainerView",
|
|
1337
1074
|
componentId: "kitt-universal__sc-1vajiw-0"
|
|
1338
1075
|
})(["flex-direction:row;margin-left:", ";margin-right:", ";"], function (_ref) {
|
|
@@ -1349,13 +1086,13 @@ function ListItemSideContainer(_ref3) {
|
|
|
1349
1086
|
var children = _ref3.children,
|
|
1350
1087
|
_ref3$side = _ref3.side,
|
|
1351
1088
|
side = _ref3$side === void 0 ? 'left' : _ref3$side,
|
|
1352
|
-
rest = _objectWithoutProperties(_ref3, _excluded$
|
|
1089
|
+
rest = _objectWithoutProperties(_ref3, _excluded$4);
|
|
1353
1090
|
|
|
1354
1091
|
return /*#__PURE__*/React.createElement(SideContainerView, _extends({
|
|
1355
1092
|
side: side
|
|
1356
1093
|
}, rest), children);
|
|
1357
1094
|
}
|
|
1358
|
-
var SideContentView = /*#__PURE__*/styled
|
|
1095
|
+
var SideContentView = /*#__PURE__*/styled.View.withConfig({
|
|
1359
1096
|
displayName: "ListItemSideContent__SideContentView",
|
|
1360
1097
|
componentId: "kitt-universal__sc-1vajiw-1"
|
|
1361
1098
|
})(["align-self:", ";"], function (_ref4) {
|
|
@@ -1373,12 +1110,8 @@ function ListItemSideContent(_ref5) {
|
|
|
1373
1110
|
}, rest), children);
|
|
1374
1111
|
}
|
|
1375
1112
|
|
|
1376
|
-
var _excluded$
|
|
1377
|
-
|
|
1378
|
-
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
1379
|
-
|
|
1380
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
1381
|
-
var ContainerView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1113
|
+
var _excluded$3 = ["children", "withPadding", "borders", "left", "right"];
|
|
1114
|
+
var ContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
1382
1115
|
displayName: "ListItem__ContainerView",
|
|
1383
1116
|
componentId: "kitt-universal__sc-2afp9s-0"
|
|
1384
1117
|
})(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], function (_ref) {
|
|
@@ -1416,19 +1149,12 @@ function ListItem(_ref5) {
|
|
|
1416
1149
|
borders = _ref5.borders,
|
|
1417
1150
|
left = _ref5.left,
|
|
1418
1151
|
right = _ref5.right,
|
|
1419
|
-
|
|
1420
|
-
rest = _objectWithoutProperties(_ref5, _excluded$4);
|
|
1152
|
+
rest = _objectWithoutProperties(_ref5, _excluded$3);
|
|
1421
1153
|
|
|
1422
|
-
|
|
1423
|
-
var wrapperProps = onPress ? _objectSpread$1({
|
|
1424
|
-
accessibilityRole: 'button',
|
|
1425
|
-
onPress: onPress
|
|
1426
|
-
}, rest) : undefined;
|
|
1427
|
-
var containerProps = onPress ? undefined : rest;
|
|
1428
|
-
return /*#__PURE__*/React.createElement(Wrapper, wrapperProps, /*#__PURE__*/React.createElement(ContainerView, _extends({
|
|
1154
|
+
return /*#__PURE__*/React.createElement(Pressable, rest, /*#__PURE__*/React.createElement(ContainerView, {
|
|
1429
1155
|
withPadding: withPadding,
|
|
1430
1156
|
borders: borders
|
|
1431
|
-
},
|
|
1157
|
+
}, left ? /*#__PURE__*/React.createElement(ListItemSideContainer, {
|
|
1432
1158
|
side: "left"
|
|
1433
1159
|
}, left) : null, /*#__PURE__*/React.createElement(ListItemContent, null, children), right ? /*#__PURE__*/React.createElement(ListItemSideContainer, {
|
|
1434
1160
|
side: "right"
|
|
@@ -1438,43 +1164,24 @@ ListItem.Content = ListItemContent;
|
|
|
1438
1164
|
ListItem.SideContent = ListItemSideContent;
|
|
1439
1165
|
ListItem.SideContainer = ListItemSideContainer;
|
|
1440
1166
|
|
|
1441
|
-
var
|
|
1442
|
-
|
|
1443
|
-
var rotate = /*#__PURE__*/keyframes(["0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}"]);
|
|
1444
|
-
var LargeLoaderContainer = /*#__PURE__*/styled.div.withConfig({
|
|
1445
|
-
displayName: "LargeLoaderweb__LargeLoaderContainer",
|
|
1446
|
-
componentId: "kitt-universal__sc-18y4z3t-0"
|
|
1447
|
-
})(["width:60px;height:60px;transform:scale(-1) rotate(90deg);"]);
|
|
1448
|
-
var LargeLoaderCircleMixin = /*#__PURE__*/css(["transform-origin:center center;stroke-width:3px;stroke-dasharray:169.64px;stroke-dashoffset:169.64px;stroke-linecap:round;"]);
|
|
1449
|
-
var LargeLoaderFill = /*#__PURE__*/styled.g.withConfig({
|
|
1450
|
-
displayName: "LargeLoaderweb__LargeLoaderFill",
|
|
1451
|
-
componentId: "kitt-universal__sc-18y4z3t-1"
|
|
1452
|
-
})(["transform-origin:center center;animation:", " 1.8s linear 0.5s infinite;"], rotate);
|
|
1453
|
-
var LargeLoaderBase = /*#__PURE__*/styled.g.withConfig({
|
|
1454
|
-
displayName: "LargeLoaderweb__LargeLoaderBase",
|
|
1455
|
-
componentId: "kitt-universal__sc-18y4z3t-2"
|
|
1456
|
-
})(["transform-origin:center center;"]);
|
|
1457
|
-
var LargeLoaderBaseCircle = /*#__PURE__*/styled.circle.withConfig({
|
|
1458
|
-
displayName: "LargeLoaderweb__LargeLoaderBaseCircle",
|
|
1459
|
-
componentId: "kitt-universal__sc-18y4z3t-3"
|
|
1460
|
-
})(["", " stroke:#ccc;animation:", " 1s cubic-bezier(0.39,0.575,0.565,1) 0.5s forwards;"], LargeLoaderCircleMixin, init);
|
|
1461
|
-
var LargeLoaderFillCircle = /*#__PURE__*/styled.circle.withConfig({
|
|
1462
|
-
displayName: "LargeLoaderweb__LargeLoaderFillCircle",
|
|
1463
|
-
componentId: "kitt-universal__sc-18y4z3t-4"
|
|
1464
|
-
})(["", " stroke:", ";animation:", " 1.8s cubic-bezier(0.39,0.575,0.565,1) 0.5s infinite alternate,", " 2.16s linear 0.5s infinite;"], LargeLoaderCircleMixin, function (_ref) {
|
|
1465
|
-
var theme = _ref.theme;
|
|
1466
|
-
return theme.kitt.colors.primary;
|
|
1467
|
-
}, offset, rotate);
|
|
1167
|
+
var styles = {"LargeLoader":"kitt-universal_LargeLoader_2A0eh","LargeLoaderFill":"kitt-universal_LargeLoaderFill_Djwa0","LargeLoaderRotation":"kitt-universal_LargeLoaderRotation_2o_Qn","LargeLoaderOffset":"kitt-universal_LargeLoaderOffset_2BAlg","LargeLoaderBase":"kitt-universal_LargeLoaderBase_2OJIP","LargeLoaderInit":"kitt-universal_LargeLoaderInit_3jmWG","rotation":"kitt-universal_rotation_3DR0L"};
|
|
1168
|
+
|
|
1468
1169
|
function LargeLoader() {
|
|
1469
|
-
return /*#__PURE__*/React.createElement(
|
|
1170
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1171
|
+
className: styles.LargeLoader
|
|
1172
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
1470
1173
|
width: "60",
|
|
1471
1174
|
height: "60"
|
|
1472
|
-
}, /*#__PURE__*/React.createElement(
|
|
1175
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
1176
|
+
className: styles.LargeLoaderBase
|
|
1177
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
1473
1178
|
cx: "30",
|
|
1474
1179
|
cy: "30",
|
|
1475
1180
|
r: "27",
|
|
1476
1181
|
fill: "none"
|
|
1477
|
-
})), /*#__PURE__*/React.createElement(
|
|
1182
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
1183
|
+
className: styles.LargeLoaderFill
|
|
1184
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
1478
1185
|
cx: "30",
|
|
1479
1186
|
cy: "30",
|
|
1480
1187
|
r: "27",
|
|
@@ -1497,7 +1204,7 @@ function Loader(_ref) {
|
|
|
1497
1204
|
|
|
1498
1205
|
var xIconSize = 14;
|
|
1499
1206
|
var mainIconSize = 20;
|
|
1500
|
-
var Container$1 = /*#__PURE__*/styled
|
|
1207
|
+
var Container$1 = /*#__PURE__*/styled.View.withConfig({
|
|
1501
1208
|
displayName: "Message__Container",
|
|
1502
1209
|
componentId: "kitt-universal__sc-c6400e-0"
|
|
1503
1210
|
})(["border-radius:", "px;background-color:", ";padding-bottom:", "px;padding-left:", "px;padding-right:", "px;padding-top:", "px;flex-direction:row;align-items:flex-start;justify-content:space-between;"], function (_ref) {
|
|
@@ -1524,7 +1231,7 @@ var Container$1 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1524
1231
|
insets = _ref6.insets;
|
|
1525
1232
|
return ((_insets$top = insets === null || insets === void 0 ? void 0 : insets.top) !== null && _insets$top !== void 0 ? _insets$top : 0) + theme.kitt.spacing * 4;
|
|
1526
1233
|
});
|
|
1527
|
-
var CloseContainer = /*#__PURE__*/styled
|
|
1234
|
+
var CloseContainer = /*#__PURE__*/styled.TouchableOpacity.withConfig({
|
|
1528
1235
|
displayName: "Message__CloseContainer",
|
|
1529
1236
|
componentId: "kitt-universal__sc-c6400e-1"
|
|
1530
1237
|
})(["margin-left:", "px;padding:", "px;"], function (_ref7) {
|
|
@@ -1534,14 +1241,14 @@ var CloseContainer = /*#__PURE__*/styled(TouchableOpacity).withConfig({
|
|
|
1534
1241
|
var theme = _ref8.theme;
|
|
1535
1242
|
return theme.kitt.spacing;
|
|
1536
1243
|
});
|
|
1537
|
-
var IconContainer = /*#__PURE__*/styled
|
|
1244
|
+
var IconContainer = /*#__PURE__*/styled.View.withConfig({
|
|
1538
1245
|
displayName: "Message__IconContainer",
|
|
1539
1246
|
componentId: "kitt-universal__sc-c6400e-2"
|
|
1540
1247
|
})(["margin-right:", "px;"], function (_ref9) {
|
|
1541
1248
|
var theme = _ref9.theme;
|
|
1542
1249
|
return theme.kitt.spacing * 4;
|
|
1543
1250
|
});
|
|
1544
|
-
var Content = /*#__PURE__*/styled
|
|
1251
|
+
var Content = /*#__PURE__*/styled.Text.withConfig({
|
|
1545
1252
|
displayName: "Message__Content",
|
|
1546
1253
|
componentId: "kitt-universal__sc-c6400e-3"
|
|
1547
1254
|
})(["text-align:", ";flex:1;"], function (_ref10) {
|
|
@@ -1616,7 +1323,7 @@ function Message(_ref11) {
|
|
|
1616
1323
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
1617
1324
|
|
|
1618
1325
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
1619
|
-
var OverlayPressable = /*#__PURE__*/styled
|
|
1326
|
+
var OverlayPressable = /*#__PURE__*/styled.Pressable.withConfig({
|
|
1620
1327
|
displayName: "Overlay__OverlayPressable",
|
|
1621
1328
|
componentId: "kitt-universal__sc-1cz1gbr-0"
|
|
1622
1329
|
})(function (_ref) {
|
|
@@ -1628,25 +1335,11 @@ var OverlayPressable = /*#__PURE__*/styled(PrimitivePressable).withConfig({
|
|
|
1628
1335
|
function Overlay(_ref2) {
|
|
1629
1336
|
var onPress = _ref2.onPress;
|
|
1630
1337
|
return /*#__PURE__*/React.createElement(OverlayPressable, {
|
|
1631
|
-
accessibilityRole: "none",
|
|
1632
1338
|
onPress: onPress
|
|
1633
|
-
}, /*#__PURE__*/React.createElement(
|
|
1339
|
+
}, /*#__PURE__*/React.createElement(View, null));
|
|
1634
1340
|
}
|
|
1635
1341
|
|
|
1636
|
-
var
|
|
1637
|
-
var PrimitiveScrollView = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1638
|
-
var contentContainerStyle = _ref.contentContainerStyle,
|
|
1639
|
-
children = _ref.children,
|
|
1640
|
-
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
1641
|
-
|
|
1642
|
-
return /*#__PURE__*/React.createElement(PrimitiveView, _extends({
|
|
1643
|
-
ref: ref
|
|
1644
|
-
}, props), /*#__PURE__*/React.createElement(PrimitiveView, {
|
|
1645
|
-
style: contentContainerStyle
|
|
1646
|
-
}, children));
|
|
1647
|
-
});
|
|
1648
|
-
|
|
1649
|
-
var BodyView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1342
|
+
var BodyView = /*#__PURE__*/styled.View.withConfig({
|
|
1650
1343
|
displayName: "Body__BodyView",
|
|
1651
1344
|
componentId: "kitt-universal__sc-17fwpo4-0"
|
|
1652
1345
|
})(["padding:", "px ", "px;"], function (_ref) {
|
|
@@ -1656,12 +1349,14 @@ var BodyView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1656
1349
|
var theme = _ref2.theme;
|
|
1657
1350
|
return theme.kitt.spacing * 4;
|
|
1658
1351
|
});
|
|
1659
|
-
|
|
1352
|
+
var ModalBody = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
1660
1353
|
var children = _ref3.children;
|
|
1661
|
-
return /*#__PURE__*/React.createElement(
|
|
1662
|
-
|
|
1354
|
+
return /*#__PURE__*/React.createElement(ScrollView, {
|
|
1355
|
+
ref: ref
|
|
1356
|
+
}, /*#__PURE__*/React.createElement(BodyView, null, children));
|
|
1357
|
+
});
|
|
1663
1358
|
|
|
1664
|
-
var FooterView = /*#__PURE__*/styled
|
|
1359
|
+
var FooterView = /*#__PURE__*/styled.View.withConfig({
|
|
1665
1360
|
displayName: "Footer__FooterView",
|
|
1666
1361
|
componentId: "kitt-universal__sc-1ujq2dc-0"
|
|
1667
1362
|
})(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], function (_ref) {
|
|
@@ -1678,7 +1373,7 @@ function ModalFooter(_ref3) {
|
|
|
1678
1373
|
|
|
1679
1374
|
var OnCloseContext = /*#__PURE__*/createContext(function () {});
|
|
1680
1375
|
|
|
1681
|
-
var HeaderView = /*#__PURE__*/styled
|
|
1376
|
+
var HeaderView = /*#__PURE__*/styled.View.withConfig({
|
|
1682
1377
|
displayName: "Header__HeaderView",
|
|
1683
1378
|
componentId: "kitt-universal__sc-1iwabch-0"
|
|
1684
1379
|
})(["position:relative;padding:", "px;display:flex;flex:0 0 auto;flex-direction:row;justify-content:space-between;align-items:center;border-bottom-width:1px;border-bottom-color:", ";min-height:57px;"], function (_ref) {
|
|
@@ -1688,21 +1383,21 @@ var HeaderView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1688
1383
|
var theme = _ref2.theme;
|
|
1689
1384
|
return theme.kitt.colors.separator;
|
|
1690
1385
|
});
|
|
1691
|
-
var LeftIconView = /*#__PURE__*/styled
|
|
1386
|
+
var LeftIconView = /*#__PURE__*/styled.View.withConfig({
|
|
1692
1387
|
displayName: "Header__LeftIconView",
|
|
1693
1388
|
componentId: "kitt-universal__sc-1iwabch-1"
|
|
1694
1389
|
})(["align-self:flex-start;margin-right:", "px;"], function (_ref3) {
|
|
1695
1390
|
var theme = _ref3.theme;
|
|
1696
1391
|
return theme.kitt.spacing * 2;
|
|
1697
1392
|
});
|
|
1698
|
-
var RightIconView = /*#__PURE__*/styled
|
|
1393
|
+
var RightIconView = /*#__PURE__*/styled.View.withConfig({
|
|
1699
1394
|
displayName: "Header__RightIconView",
|
|
1700
1395
|
componentId: "kitt-universal__sc-1iwabch-2"
|
|
1701
1396
|
})(["align-self:flex-start;margin-left:", "px;"], function (_ref4) {
|
|
1702
1397
|
var theme = _ref4.theme;
|
|
1703
1398
|
return theme.kitt.spacing * 2;
|
|
1704
1399
|
});
|
|
1705
|
-
var TitleView = /*#__PURE__*/styled
|
|
1400
|
+
var TitleView = /*#__PURE__*/styled.View.withConfig({
|
|
1706
1401
|
displayName: "Header__TitleView",
|
|
1707
1402
|
componentId: "kitt-universal__sc-1iwabch-3"
|
|
1708
1403
|
})(["padding-left:", "px;flex-shrink:1;"], function (_ref5) {
|
|
@@ -1725,7 +1420,7 @@ function ModalHeader(_ref6) {
|
|
|
1725
1420
|
})));
|
|
1726
1421
|
}
|
|
1727
1422
|
|
|
1728
|
-
var ModalView = /*#__PURE__*/styled
|
|
1423
|
+
var ModalView = /*#__PURE__*/styled.View.withConfig({
|
|
1729
1424
|
displayName: "Modal__ModalView",
|
|
1730
1425
|
componentId: "kitt-universal__sc-1xy2w5u-0"
|
|
1731
1426
|
})(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], function (_ref) {
|
|
@@ -1735,7 +1430,7 @@ var ModalView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1735
1430
|
var theme = _ref2.theme;
|
|
1736
1431
|
return theme.kitt.spacing * 4;
|
|
1737
1432
|
});
|
|
1738
|
-
var ContentView = /*#__PURE__*/styled
|
|
1433
|
+
var ContentView = /*#__PURE__*/styled.View.withConfig({
|
|
1739
1434
|
displayName: "Modal__ContentView",
|
|
1740
1435
|
componentId: "kitt-universal__sc-1xy2w5u-1"
|
|
1741
1436
|
})(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", ";background-color:", ";"], function (_ref3) {
|
|
@@ -1788,120 +1483,11 @@ function Notification(_ref) {
|
|
|
1788
1483
|
}, children);
|
|
1789
1484
|
}
|
|
1790
1485
|
|
|
1791
|
-
var
|
|
1792
|
-
var children = _ref.children,
|
|
1793
|
-
className = _ref.className,
|
|
1794
|
-
onPress = _ref.onPress;
|
|
1795
|
-
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md
|
|
1796
|
-
// if (href) {
|
|
1797
|
-
// return (
|
|
1798
|
-
// <a ref={ref} href={href} className={className}>
|
|
1799
|
-
// {children}
|
|
1800
|
-
// </a>
|
|
1801
|
-
// );
|
|
1802
|
-
// }
|
|
1803
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
1804
|
-
ref: ref,
|
|
1805
|
-
role: "button",
|
|
1806
|
-
className: className,
|
|
1807
|
-
tabIndex: onPress ? 0 : -1,
|
|
1808
|
-
onClick: createPressClickHandler(onPress),
|
|
1809
|
-
onKeyUp: createPressKeyUpHandler(onPress)
|
|
1810
|
-
}, children);
|
|
1811
|
-
});
|
|
1812
|
-
var PrimitiveLink = /*#__PURE__*/styled(PrimitiveTextWithClassName).withConfig({
|
|
1813
|
-
displayName: "PrimitiveLinkweb__PrimitiveLink",
|
|
1814
|
-
componentId: "kitt-universal__sc-24w4og-0"
|
|
1815
|
-
})(["", " background-color:transparent;color:inherit;font:inherit;list-style:none;text-align:inherit;text-decoration:none;", ";", ";"], textResetMixin, function (_ref2) {
|
|
1816
|
-
var selectable = _ref2.selectable;
|
|
1817
|
-
return selectable == null ? undefined : "user-select: ".concat(selectable ? 'none' : 'text');
|
|
1818
|
-
}, function (_ref3) {
|
|
1819
|
-
var onPress = _ref3.onPress;
|
|
1820
|
-
return onPress ? 'cursor: pointer;' : undefined;
|
|
1821
|
-
});
|
|
1822
|
-
|
|
1823
|
-
var Flex = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1824
|
-
shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {
|
|
1825
|
-
return !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop);
|
|
1826
|
-
}
|
|
1827
|
-
}).withConfig({
|
|
1828
|
-
displayName: "Flex",
|
|
1829
|
-
componentId: "kitt-universal__sc-15q3v3h-0"
|
|
1830
|
-
})(["display:flex;flex-direction:", ";flex-wrap:wrap;padding:", "px;"], function (_ref) {
|
|
1831
|
-
var direction = _ref.direction;
|
|
1832
|
-
return direction;
|
|
1833
|
-
}, function (_ref2) {
|
|
1834
|
-
var theme = _ref2.theme,
|
|
1835
|
-
_ref2$padding = _ref2.padding,
|
|
1836
|
-
padding = _ref2$padding === void 0 ? 0 : _ref2$padding;
|
|
1837
|
-
return padding * theme.kitt.spacing;
|
|
1838
|
-
});
|
|
1839
|
-
|
|
1840
|
-
var storyPadding = 16;
|
|
1841
|
-
|
|
1842
|
-
var getBackgroundColorFromBlockColor = function (theme) {
|
|
1843
|
-
var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'transparent';
|
|
1844
|
-
|
|
1845
|
-
switch (color) {
|
|
1846
|
-
case 'dark':
|
|
1847
|
-
return '#293033';
|
|
1848
|
-
|
|
1849
|
-
case 'light':
|
|
1850
|
-
return '#ffffff';
|
|
1851
|
-
|
|
1852
|
-
case 'primary':
|
|
1853
|
-
return theme.kitt.palettes.lateOcean.lateOcean;
|
|
1854
|
-
|
|
1855
|
-
default:
|
|
1856
|
-
return 'transparent';
|
|
1857
|
-
}
|
|
1858
|
-
};
|
|
1859
|
-
|
|
1860
|
-
var getTypographyColorFromBlockColor = function () {
|
|
1861
|
-
var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transparent';
|
|
1862
|
-
|
|
1863
|
-
switch (color) {
|
|
1864
|
-
case 'dark':
|
|
1865
|
-
case 'primary':
|
|
1866
|
-
return 'white';
|
|
1867
|
-
|
|
1868
|
-
case 'light':
|
|
1869
|
-
default:
|
|
1870
|
-
return 'black';
|
|
1871
|
-
}
|
|
1872
|
-
};
|
|
1873
|
-
|
|
1874
|
-
var StoryBlockBackgroundContext = /*#__PURE__*/createContext('transparent');
|
|
1875
|
-
var StoryBlockColorContext = /*#__PURE__*/createContext('black');
|
|
1876
|
-
var useStoryBlockColor = function (color) {
|
|
1877
|
-
var storyBlockColor = useContext(StoryBlockColorContext);
|
|
1878
|
-
return color || storyBlockColor;
|
|
1879
|
-
};
|
|
1880
|
-
var StyledStoryBlockView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1881
|
-
displayName: "StoryBlock__StyledStoryBlockView",
|
|
1882
|
-
componentId: "kitt-universal__sc-3w4hdm-0"
|
|
1883
|
-
})(["padding:16px ", "px 0;margin:0 -", "px;background:", ";"], storyPadding, storyPadding, function (_ref) {
|
|
1884
|
-
var theme = _ref.theme,
|
|
1885
|
-
background = _ref.background;
|
|
1886
|
-
return getBackgroundColorFromBlockColor(theme, background);
|
|
1887
|
-
});
|
|
1888
|
-
function StoryBlock(_ref2) {
|
|
1889
|
-
var children = _ref2.children,
|
|
1890
|
-
background = _ref2.background;
|
|
1891
|
-
return /*#__PURE__*/React.createElement(StyledStoryBlockView, {
|
|
1892
|
-
background: background
|
|
1893
|
-
}, /*#__PURE__*/React.createElement(StoryBlockColorContext.Provider, {
|
|
1894
|
-
value: getTypographyColorFromBlockColor(background)
|
|
1895
|
-
}, /*#__PURE__*/React.createElement(StoryBlockBackgroundContext.Provider, {
|
|
1896
|
-
value: background
|
|
1897
|
-
}, children)));
|
|
1898
|
-
}
|
|
1899
|
-
|
|
1900
|
-
var StoryTitleContainer = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1486
|
+
var StoryTitleContainer = /*#__PURE__*/styled.View.withConfig({
|
|
1901
1487
|
displayName: "StoryTitle__StoryTitleContainer",
|
|
1902
1488
|
componentId: "kitt-universal__sc-sic7hb-0"
|
|
1903
1489
|
})(["margin-bottom:30px;"]);
|
|
1904
|
-
var StorySubTitleContainer = /*#__PURE__*/styled
|
|
1490
|
+
var StorySubTitleContainer = /*#__PURE__*/styled.View.withConfig({
|
|
1905
1491
|
displayName: "StoryTitle__StorySubTitleContainer",
|
|
1906
1492
|
componentId: "kitt-universal__sc-sic7hb-1"
|
|
1907
1493
|
})(["margin-bottom:10px;"]);
|
|
@@ -1909,10 +1495,10 @@ function StoryTitle(_ref) {
|
|
|
1909
1495
|
var color = _ref.color,
|
|
1910
1496
|
children = _ref.children,
|
|
1911
1497
|
numberOfLines = _ref.numberOfLines;
|
|
1912
|
-
return /*#__PURE__*/React.createElement(StoryTitleContainer, null, /*#__PURE__*/React.createElement(Typography.
|
|
1498
|
+
return /*#__PURE__*/React.createElement(StoryTitleContainer, null, /*#__PURE__*/React.createElement(Typography.h1, {
|
|
1913
1499
|
variant: "bold",
|
|
1914
1500
|
base: "header1",
|
|
1915
|
-
color:
|
|
1501
|
+
color: color,
|
|
1916
1502
|
numberOfLines: numberOfLines
|
|
1917
1503
|
}, children));
|
|
1918
1504
|
}
|
|
@@ -1921,10 +1507,10 @@ function StoryTitleLevel2(_ref2) {
|
|
|
1921
1507
|
var color = _ref2.color,
|
|
1922
1508
|
children = _ref2.children,
|
|
1923
1509
|
numberOfLines = _ref2.numberOfLines;
|
|
1924
|
-
return /*#__PURE__*/React.createElement(StoryTitleContainer, null, /*#__PURE__*/React.createElement(Typography.
|
|
1510
|
+
return /*#__PURE__*/React.createElement(StoryTitleContainer, null, /*#__PURE__*/React.createElement(Typography.h2, {
|
|
1925
1511
|
variant: "bold",
|
|
1926
1512
|
base: "header2",
|
|
1927
|
-
color:
|
|
1513
|
+
color: color,
|
|
1928
1514
|
numberOfLines: numberOfLines
|
|
1929
1515
|
}, children));
|
|
1930
1516
|
}
|
|
@@ -1935,11 +1521,11 @@ function StoryTitleLevel3(_ref3) {
|
|
|
1935
1521
|
var color = _ref3.color,
|
|
1936
1522
|
children = _ref3.children,
|
|
1937
1523
|
numberOfLines = _ref3.numberOfLines;
|
|
1938
|
-
return /*#__PURE__*/React.createElement(StorySubTitleContainer, null, /*#__PURE__*/React.createElement(Typography.
|
|
1524
|
+
return /*#__PURE__*/React.createElement(StorySubTitleContainer, null, /*#__PURE__*/React.createElement(Typography.h3, {
|
|
1939
1525
|
variant: "bold",
|
|
1940
1526
|
base: "header3",
|
|
1941
1527
|
medium: "header4",
|
|
1942
|
-
color:
|
|
1528
|
+
color: color,
|
|
1943
1529
|
numberOfLines: numberOfLines
|
|
1944
1530
|
}, children));
|
|
1945
1531
|
}
|
|
@@ -1950,11 +1536,11 @@ function StoryTitleLevel4(_ref4) {
|
|
|
1950
1536
|
var color = _ref4.color,
|
|
1951
1537
|
children = _ref4.children,
|
|
1952
1538
|
numberOfLines = _ref4.numberOfLines;
|
|
1953
|
-
return /*#__PURE__*/React.createElement(StorySubTitleContainer, null, /*#__PURE__*/React.createElement(Typography.
|
|
1539
|
+
return /*#__PURE__*/React.createElement(StorySubTitleContainer, null, /*#__PURE__*/React.createElement(Typography.h4, {
|
|
1954
1540
|
variant: "bold",
|
|
1955
1541
|
base: "header4",
|
|
1956
1542
|
medium: "header5",
|
|
1957
|
-
color:
|
|
1543
|
+
color: color,
|
|
1958
1544
|
numberOfLines: numberOfLines
|
|
1959
1545
|
}, children));
|
|
1960
1546
|
}
|
|
@@ -1964,40 +1550,24 @@ StoryTitle.Level2 = StoryTitleLevel2;
|
|
|
1964
1550
|
StoryTitle.Level3 = StoryTitleLevel3;
|
|
1965
1551
|
StoryTitle.Level4 = StoryTitleLevel4;
|
|
1966
1552
|
|
|
1967
|
-
var
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
children = _ref.children;
|
|
1975
|
-
return /*#__PURE__*/React.createElement(StoryContainer$1, {
|
|
1976
|
-
contentContainerStyle: contentContainerStyle
|
|
1977
|
-
}, /*#__PURE__*/React.createElement(StoryTitle, null, title), children);
|
|
1978
|
-
}
|
|
1979
|
-
|
|
1980
|
-
var _excluded$2 = ["title", "className", "children", "internalIsDemoSection"],
|
|
1981
|
-
_excluded2 = ["title", "className", "children"],
|
|
1982
|
-
_excluded3 = ["title", "className", "children"];
|
|
1983
|
-
var StyledSection = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1984
|
-
displayName: "StorySection__StyledSection",
|
|
1985
|
-
componentId: "kitt-universal__sc-1b3liv5-0"
|
|
1986
|
-
})(["margin-bottom:32px;"]);
|
|
1987
|
-
function StorySection(_ref) {
|
|
1553
|
+
var _excluded$2 = ["title", "className", "children"],
|
|
1554
|
+
_excluded2 = ["title", "className", "children"];
|
|
1555
|
+
var StyledSection = /*#__PURE__*/styled.View.withConfig({
|
|
1556
|
+
displayName: "Section__StyledSection",
|
|
1557
|
+
componentId: "kitt-universal__sc-x4z1s-0"
|
|
1558
|
+
})(["margin-bottom:30px;"]);
|
|
1559
|
+
function Section(_ref) {
|
|
1988
1560
|
var title = _ref.title;
|
|
1989
1561
|
_ref.className;
|
|
1990
1562
|
var children = _ref.children,
|
|
1991
|
-
internalIsDemoSection = _ref.internalIsDemoSection,
|
|
1992
1563
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
1993
1564
|
|
|
1994
|
-
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
1995
1565
|
return /*#__PURE__*/React.createElement(StyledSection, props, /*#__PURE__*/React.createElement(StoryTitle.Level2, null, title), children);
|
|
1996
1566
|
}
|
|
1997
|
-
var StyledSubSection = /*#__PURE__*/styled
|
|
1998
|
-
displayName: "
|
|
1999
|
-
componentId: "kitt-universal__sc-
|
|
2000
|
-
})(["margin-bottom:
|
|
1567
|
+
var StyledSubSection = /*#__PURE__*/styled.View.withConfig({
|
|
1568
|
+
displayName: "Section__StyledSubSection",
|
|
1569
|
+
componentId: "kitt-universal__sc-x4z1s-1"
|
|
1570
|
+
})(["margin-bottom:20px;"]);
|
|
2001
1571
|
|
|
2002
1572
|
function SubSection(_ref2) {
|
|
2003
1573
|
var title = _ref2.title;
|
|
@@ -2008,55 +1578,32 @@ function SubSection(_ref2) {
|
|
|
2008
1578
|
return /*#__PURE__*/React.createElement(StyledSubSection, props, /*#__PURE__*/React.createElement(StoryTitle.Level3, null, title), children);
|
|
2009
1579
|
}
|
|
2010
1580
|
|
|
2011
|
-
var
|
|
2012
|
-
displayName: "
|
|
2013
|
-
componentId: "kitt-universal__sc-
|
|
2014
|
-
})(["margin-bottom:
|
|
2015
|
-
|
|
2016
|
-
function BlockSection(_ref3) {
|
|
2017
|
-
var title = _ref3.title;
|
|
2018
|
-
_ref3.className;
|
|
2019
|
-
var children = _ref3.children,
|
|
2020
|
-
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
2021
|
-
|
|
2022
|
-
return /*#__PURE__*/React.createElement(StyledBlockSection, props, /*#__PURE__*/React.createElement(StoryTitle.Level4, null, title), children);
|
|
2023
|
-
}
|
|
1581
|
+
var StyledDemoSection = /*#__PURE__*/styled.View.withConfig({
|
|
1582
|
+
displayName: "Section__StyledDemoSection",
|
|
1583
|
+
componentId: "kitt-universal__sc-x4z1s-2"
|
|
1584
|
+
})(["margin-bottom:90px;"]);
|
|
2024
1585
|
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
})(["margin-bottom:64px;"]);
|
|
2029
|
-
|
|
2030
|
-
function DemoSection(_ref4) {
|
|
2031
|
-
var children = _ref4.children;
|
|
2032
|
-
return /*#__PURE__*/React.createElement(StyledDemoSection, null, /*#__PURE__*/React.createElement(StorySection, {
|
|
2033
|
-
internalIsDemoSection: true,
|
|
1586
|
+
function DemoSection(_ref3) {
|
|
1587
|
+
var children = _ref3.children;
|
|
1588
|
+
return /*#__PURE__*/React.createElement(StyledDemoSection, null, /*#__PURE__*/React.createElement(Section, {
|
|
2034
1589
|
title: "Demo"
|
|
2035
1590
|
}, children));
|
|
2036
1591
|
}
|
|
2037
1592
|
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
/** @deprecated use StorySection.Demo instead */
|
|
2041
|
-
|
|
2042
|
-
StorySection.DemoSection = DemoSection;
|
|
2043
|
-
StorySection.Demo = DemoSection;
|
|
2044
|
-
/** @deprecated use StorySection instead */
|
|
1593
|
+
Section.SubSection = SubSection;
|
|
1594
|
+
Section.DemoSection = DemoSection;
|
|
2045
1595
|
|
|
2046
|
-
var
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
return /*#__PURE__*/React.createElement(
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2058
|
-
className: state ? "kitt-".concat(state) : undefined
|
|
2059
|
-
}, children));
|
|
1596
|
+
var StoryContainer = /*#__PURE__*/styled.ScrollView.withConfig({
|
|
1597
|
+
displayName: "Story__StoryContainer",
|
|
1598
|
+
componentId: "kitt-universal__sc-1kwdg2p-0"
|
|
1599
|
+
})(["padding:10px;"]);
|
|
1600
|
+
function Story(_ref) {
|
|
1601
|
+
var title = _ref.title,
|
|
1602
|
+
contentContainerStyle = _ref.contentContainerStyle,
|
|
1603
|
+
children = _ref.children;
|
|
1604
|
+
return /*#__PURE__*/React.createElement(StoryContainer, {
|
|
1605
|
+
contentContainerStyle: contentContainerStyle
|
|
1606
|
+
}, /*#__PURE__*/React.createElement(StoryTitle, null, title), children);
|
|
2060
1607
|
}
|
|
2061
1608
|
|
|
2062
1609
|
function StoryDecorator(storyFn, context) {
|
|
@@ -2065,22 +1612,22 @@ function StoryDecorator(storyFn, context) {
|
|
|
2065
1612
|
}, storyFn());
|
|
2066
1613
|
}
|
|
2067
1614
|
|
|
2068
|
-
var SmallScreenRow = /*#__PURE__*/styled
|
|
1615
|
+
var SmallScreenRow = /*#__PURE__*/styled.View.withConfig({
|
|
2069
1616
|
displayName: "StoryGrid__SmallScreenRow",
|
|
2070
1617
|
componentId: "kitt-universal__sc-4z5new-0"
|
|
2071
1618
|
})(["flex-direction:column;margin:0;"]);
|
|
2072
|
-
var SmallScreenCol = /*#__PURE__*/styled
|
|
1619
|
+
var SmallScreenCol = /*#__PURE__*/styled.View.withConfig({
|
|
2073
1620
|
displayName: "StoryGrid__SmallScreenCol",
|
|
2074
1621
|
componentId: "kitt-universal__sc-4z5new-1"
|
|
2075
|
-
})(["padding:
|
|
2076
|
-
var FlexRow = /*#__PURE__*/styled
|
|
1622
|
+
})(["padding:10px 0 20px;"]);
|
|
1623
|
+
var FlexRow = /*#__PURE__*/styled.View.withConfig({
|
|
2077
1624
|
displayName: "StoryGrid__FlexRow",
|
|
2078
1625
|
componentId: "kitt-universal__sc-4z5new-2"
|
|
2079
|
-
})(["flex-direction:row;margin:0 -
|
|
2080
|
-
var FlexCol = /*#__PURE__*/styled
|
|
1626
|
+
})(["flex-direction:row;margin:0 -5px 20px;"]);
|
|
1627
|
+
var FlexCol = /*#__PURE__*/styled.View.withConfig({
|
|
2081
1628
|
displayName: "StoryGrid__FlexCol",
|
|
2082
1629
|
componentId: "kitt-universal__sc-4z5new-3"
|
|
2083
|
-
})(["flex-grow:1;flex-basis:0;margin:0
|
|
1630
|
+
})(["flex-grow:1;flex-basis:0;margin:0 5px 10px;"]);
|
|
2084
1631
|
|
|
2085
1632
|
function StoryGridRow(_ref) {
|
|
2086
1633
|
var children = _ref.children,
|
|
@@ -2108,14 +1655,7 @@ function StoryGridRow(_ref) {
|
|
|
2108
1655
|
function StoryGridCol(_ref2) {
|
|
2109
1656
|
var title = _ref2.title,
|
|
2110
1657
|
titleColor = _ref2.titleColor,
|
|
2111
|
-
children = _ref2.children
|
|
2112
|
-
_ref2$platform = _ref2.platform,
|
|
2113
|
-
platform = _ref2$platform === void 0 ? 'all' : _ref2$platform;
|
|
2114
|
-
|
|
2115
|
-
if (platform === 'native') {
|
|
2116
|
-
return null;
|
|
2117
|
-
}
|
|
2118
|
-
|
|
1658
|
+
children = _ref2.children;
|
|
2119
1659
|
return /*#__PURE__*/React.createElement(React.Fragment, null, title ? /*#__PURE__*/React.createElement(StoryTitle.Level4, {
|
|
2120
1660
|
numberOfLines: 1,
|
|
2121
1661
|
color: titleColor
|
|
@@ -2127,7 +1667,7 @@ var StoryGrid = {
|
|
|
2127
1667
|
Col: StoryGridCol
|
|
2128
1668
|
};
|
|
2129
1669
|
|
|
2130
|
-
var Container = /*#__PURE__*/styled
|
|
1670
|
+
var Container = /*#__PURE__*/styled.View.withConfig({
|
|
2131
1671
|
displayName: "Tag__Container",
|
|
2132
1672
|
componentId: "kitt-universal__sc-19jmowi-0"
|
|
2133
1673
|
})(["background-color:", ";border-width:", ";border-color:", ";padding:", ";border-radius:", ";align-self:flex-start;"], function (_ref) {
|
|
@@ -2255,14 +1795,6 @@ var buttonLateOceanTheme = {
|
|
|
2255
1795
|
disabledBackgroundColor: lateOceanColorPalette.transparent,
|
|
2256
1796
|
pressedBackgroundColor: lateOceanColorPalette.transparent,
|
|
2257
1797
|
disabledBorderColor: lateOceanColorPalette.transparent
|
|
2258
|
-
},
|
|
2259
|
-
white: {
|
|
2260
|
-
backgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
2261
|
-
disabledBackgroundColor: lateOceanColorPalette.transparent,
|
|
2262
|
-
hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
2263
|
-
pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
2264
|
-
focusBorderColor: 'rgba(255, 255, 255, 0.1)',
|
|
2265
|
-
disabledBorderColor: lateOceanColorPalette.transparent
|
|
2266
1798
|
}
|
|
2267
1799
|
};
|
|
2268
1800
|
|
|
@@ -2391,41 +1923,6 @@ var fullScreenModalLateOceanTheme = {
|
|
|
2391
1923
|
}
|
|
2392
1924
|
};
|
|
2393
1925
|
|
|
2394
|
-
var iconButton = {
|
|
2395
|
-
backgroundColor: 'transparent',
|
|
2396
|
-
width: 40,
|
|
2397
|
-
height: 40,
|
|
2398
|
-
borderRadius: 20,
|
|
2399
|
-
borderWidth: 2,
|
|
2400
|
-
borderColor: 'transparent',
|
|
2401
|
-
transition: {
|
|
2402
|
-
property: 'all',
|
|
2403
|
-
duration: '200ms',
|
|
2404
|
-
timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1);'
|
|
2405
|
-
},
|
|
2406
|
-
scale: {
|
|
2407
|
-
base: {
|
|
2408
|
-
"default": 1,
|
|
2409
|
-
hover: 0.95,
|
|
2410
|
-
active: 0.95
|
|
2411
|
-
},
|
|
2412
|
-
medium: {
|
|
2413
|
-
hover: 1.05
|
|
2414
|
-
}
|
|
2415
|
-
},
|
|
2416
|
-
disabled: {
|
|
2417
|
-
scale: 1,
|
|
2418
|
-
backgroundColor: buttonLateOceanTheme.secondary.disabledBackgroundColor,
|
|
2419
|
-
borderColor: buttonLateOceanTheme.secondary.disabledBorderColor
|
|
2420
|
-
},
|
|
2421
|
-
"default": {
|
|
2422
|
-
pressedBackgroundColor: buttonLateOceanTheme.secondary.pressedBackgroundColor
|
|
2423
|
-
},
|
|
2424
|
-
white: {
|
|
2425
|
-
pressedBackgroundColor: buttonLateOceanTheme.white.hoverBackgroundColor
|
|
2426
|
-
}
|
|
2427
|
-
};
|
|
2428
|
-
|
|
2429
1926
|
var listItemLateOceanTheme = {
|
|
2430
1927
|
padding: '12px 16px',
|
|
2431
1928
|
borderColor: colorsLateOceanTheme.separator,
|
|
@@ -2555,33 +2052,9 @@ var typographyLateOceanTheme = {
|
|
|
2555
2052
|
'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
|
|
2556
2053
|
}
|
|
2557
2054
|
}
|
|
2558
|
-
},
|
|
2559
|
-
link: {
|
|
2560
|
-
disabledColor: lateOceanColorPalette.black200
|
|
2561
2055
|
}
|
|
2562
2056
|
};
|
|
2563
2057
|
|
|
2564
|
-
var breakpoints = {
|
|
2565
|
-
values: {
|
|
2566
|
-
base: 0,
|
|
2567
|
-
small: 480,
|
|
2568
|
-
medium: 768,
|
|
2569
|
-
large: 1024,
|
|
2570
|
-
wide: 1280
|
|
2571
|
-
},
|
|
2572
|
-
min: {
|
|
2573
|
-
smallBreakpoint: 'min-width: 480px',
|
|
2574
|
-
mediumBreakpoint: 'min-width: 768px',
|
|
2575
|
-
largeBreakpoint: 'min-width: 1024px',
|
|
2576
|
-
wideBreakpoint: 'min-width: 1280px'
|
|
2577
|
-
},
|
|
2578
|
-
max: {
|
|
2579
|
-
smallBreakpoint: 'max-width: 479px',
|
|
2580
|
-
mediumBreakpoint: 'max-width: 767px',
|
|
2581
|
-
largeBreakpoint: 'max-width: 1023px',
|
|
2582
|
-
wideBreakpoint: 'max-width: 1279px'
|
|
2583
|
-
}
|
|
2584
|
-
};
|
|
2585
2058
|
var theme = {
|
|
2586
2059
|
spacing: 4,
|
|
2587
2060
|
colors: colorsLateOceanTheme,
|
|
@@ -2597,47 +2070,42 @@ var theme = {
|
|
|
2597
2070
|
tag: tagLateOceanTheme,
|
|
2598
2071
|
shadows: shadowsLateOceanTheme,
|
|
2599
2072
|
fullScreenModal: fullScreenModalLateOceanTheme,
|
|
2600
|
-
iconButton: iconButton,
|
|
2601
2073
|
listItem: listItemLateOceanTheme
|
|
2602
2074
|
};
|
|
2603
2075
|
|
|
2604
2076
|
function Tooltip(_ref) {
|
|
2605
2077
|
var children = _ref.children;
|
|
2606
|
-
return /*#__PURE__*/React.createElement(
|
|
2078
|
+
return /*#__PURE__*/React.createElement(View, null, children);
|
|
2607
2079
|
}
|
|
2608
2080
|
|
|
2609
|
-
var _excluded$1 = ["
|
|
2610
|
-
var StyledLink = /*#__PURE__*/styled(
|
|
2081
|
+
var _excluded$1 = ["disabled", "noUnderline", "variant"];
|
|
2082
|
+
var StyledLink = /*#__PURE__*/styled(Typography).withConfig({
|
|
2611
2083
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2612
2084
|
return !['disabled', 'noUnderline'].includes(prop);
|
|
2613
2085
|
}
|
|
2614
2086
|
}).withConfig({
|
|
2615
2087
|
displayName: "TypographyLink__StyledLink",
|
|
2616
2088
|
componentId: "kitt-universal__sc-1o1zy30-0"
|
|
2617
|
-
})(["text-decoration:", ";", ""], function (_ref) {
|
|
2089
|
+
})(["text-decoration:", ";", ";margin:0;"], function (_ref) {
|
|
2618
2090
|
var noUnderline = _ref.noUnderline;
|
|
2619
2091
|
return noUnderline ? 'none' : 'underline';
|
|
2620
2092
|
}, function (_ref2) {
|
|
2621
|
-
var disabled = _ref2.disabled
|
|
2622
|
-
|
|
2623
|
-
noUnderline = _ref2.noUnderline;
|
|
2624
|
-
return "\n ".concat(disabled ? "color: ".concat(theme.kitt.typography.link.disabledColor, ";") : '', "\n ").concat("\n text-decoration-color: inherit;\n transition: color 0.2s ease-in-out;\n cursor: ".concat(disabled ? 'not-allowed' : 'pointer', ";\n\n\n &:hover, &:active, .kitt-hover & {\n text-decoration: ").concat(noUnderline ? 'underline' : 'none', ";\n }\n "));
|
|
2093
|
+
var disabled = _ref2.disabled;
|
|
2094
|
+
return "\n text-decoration-color: inherit;\n transition: color 0.2s ease-in-out;\n cursor: ".concat(disabled ? 'not-allowed' : 'pointer', ";\n ");
|
|
2625
2095
|
});
|
|
2626
2096
|
function TypographyLink(_ref3) {
|
|
2627
|
-
var
|
|
2628
|
-
disabled = _ref3.disabled,
|
|
2097
|
+
var disabled = _ref3.disabled,
|
|
2629
2098
|
noUnderline = _ref3.noUnderline,
|
|
2630
|
-
|
|
2099
|
+
_ref3$variant = _ref3.variant,
|
|
2100
|
+
variant = _ref3$variant === void 0 ? 'bold' : _ref3$variant,
|
|
2631
2101
|
otherProps = _objectWithoutProperties(_ref3, _excluded$1);
|
|
2632
2102
|
|
|
2633
|
-
return /*#__PURE__*/React.createElement(
|
|
2634
|
-
accessibilityRole: "none"
|
|
2635
|
-
}), /*#__PURE__*/React.createElement(StyledLink, {
|
|
2103
|
+
return /*#__PURE__*/React.createElement(StyledLink, _extends({
|
|
2636
2104
|
disabled: disabled,
|
|
2637
2105
|
noUnderline: noUnderline,
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
},
|
|
2106
|
+
variant: variant,
|
|
2107
|
+
accessibilityRole: "link"
|
|
2108
|
+
}, otherProps));
|
|
2641
2109
|
}
|
|
2642
2110
|
|
|
2643
2111
|
function matchWindowSize(currentWidth, _ref) {
|
|
@@ -2665,7 +2133,7 @@ function createWindowSizeHelper(currentWidth) {
|
|
|
2665
2133
|
widthList[_key] = arguments[_key];
|
|
2666
2134
|
}
|
|
2667
2135
|
|
|
2668
|
-
if (
|
|
2136
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2669
2137
|
widthList.slice(1).forEach(function (_ref, index) {
|
|
2670
2138
|
var _ref2 = _slicedToArray(_ref, 1),
|
|
2671
2139
|
minWidth = _ref2[0];
|
|
@@ -2700,39 +2168,11 @@ function useKittTheme() {
|
|
|
2700
2168
|
return useMemo(function () {
|
|
2701
2169
|
return {
|
|
2702
2170
|
kitt: theme,
|
|
2703
|
-
responsive: createWindowSizeHelper(width)
|
|
2704
|
-
breakpoints: breakpoints
|
|
2171
|
+
responsive: createWindowSizeHelper(width)
|
|
2705
2172
|
};
|
|
2706
2173
|
}, [width]);
|
|
2707
2174
|
}
|
|
2708
2175
|
|
|
2709
|
-
function KittThemeProvider(_ref) {
|
|
2710
|
-
var children = _ref.children;
|
|
2711
|
-
var theme = useKittTheme();
|
|
2712
|
-
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
2713
|
-
theme: theme
|
|
2714
|
-
}, children);
|
|
2715
|
-
}
|
|
2716
|
-
var KittThemeDecorator = makeDecorator({
|
|
2717
|
-
name: 'ThemeDecorator',
|
|
2718
|
-
parameterName: 'theme',
|
|
2719
|
-
wrapper: function wrapper(storyFn, context, _ref2) {
|
|
2720
|
-
_ref2.options;
|
|
2721
|
-
_ref2.parameters;
|
|
2722
|
-
return /*#__PURE__*/React.createElement(KittThemeProvider, null, storyFn(context));
|
|
2723
|
-
}
|
|
2724
|
-
});
|
|
2725
|
-
|
|
2726
|
-
var SafeAreaProviderDecorator = makeDecorator({
|
|
2727
|
-
name: 'SafeAreaProviderDecorator',
|
|
2728
|
-
parameterName: 'safeAreaProvider',
|
|
2729
|
-
wrapper: function wrapper(storyFn, context, _ref) {
|
|
2730
|
-
_ref.options;
|
|
2731
|
-
_ref.parameters;
|
|
2732
|
-
return /*#__PURE__*/React.createElement(SafeAreaProvider, null, storyFn(context));
|
|
2733
|
-
}
|
|
2734
|
-
});
|
|
2735
|
-
|
|
2736
2176
|
var _excluded = ["children"];
|
|
2737
2177
|
function MatchWindowSize(_ref) {
|
|
2738
2178
|
var children = _ref.children,
|
|
@@ -2743,5 +2183,5 @@ function MatchWindowSize(_ref) {
|
|
|
2743
2183
|
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
2744
2184
|
}
|
|
2745
2185
|
|
|
2746
|
-
export { Avatar, Button, Card,
|
|
2186
|
+
export { Avatar, Button, Card, FullScreenModal, Icon, InputFeedback, InputField, InputText, KittBreakpoints, KittBreakpointsMax, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, Radio, Section, Story, StoryDecorator, StoryGrid, StoryTitle, Tag, TextArea, Tooltip, Typography, TypographyIcon, TypographyLink, createWindowSizeHelper, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize };
|
|
2747
2187
|
//# sourceMappingURL=index-browser-all.es.web.js.map
|