@ornikar/kitt-universal 9.3.2 → 9.6.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/dist/definitions/Actions/Actions.d.ts +13 -0
- package/dist/definitions/Actions/Actions.d.ts.map +1 -0
- package/dist/definitions/Actions/ActionsButton.d.ts +9 -0
- package/dist/definitions/Actions/ActionsButton.d.ts.map +1 -0
- package/dist/definitions/Actions/ActionsItem.d.ts +12 -0
- package/dist/definitions/Actions/ActionsItem.d.ts.map +1 -0
- package/dist/definitions/Choices/ChoiceItem.d.ts +38 -0
- package/dist/definitions/Choices/ChoiceItem.d.ts.map +1 -0
- package/dist/definitions/Choices/ChoiceItemContainer.d.ts +10 -0
- package/dist/definitions/Choices/ChoiceItemContainer.d.ts.map +1 -0
- package/dist/definitions/Choices/Choices.d.ts +33 -0
- package/dist/definitions/Choices/Choices.d.ts.map +1 -0
- package/dist/definitions/Choices/hooks/useNativeAnimation.d.ts +14 -0
- package/dist/definitions/Choices/hooks/useNativeAnimation.d.ts.map +1 -0
- package/dist/definitions/Choices/hooks/useNativeAnimation.web.d.ts +7 -0
- package/dist/definitions/Choices/hooks/useNativeAnimation.web.d.ts.map +1 -0
- package/dist/definitions/IconButton/IconButton.d.ts +1 -1
- package/dist/definitions/IconButton/IconButton.d.ts.map +1 -1
- package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts +1 -1
- package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts.map +1 -1
- package/dist/definitions/forms/InputField/InputField.d.ts.map +1 -1
- package/dist/definitions/forms/InputText/InputTextContainer.web.d.ts +1 -1
- package/dist/definitions/index.d.ts +7 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +15 -15
- package/dist/definitions/story-components/StoryBlock.d.ts +1 -1
- package/dist/definitions/test-utils/TestWrapper.d.ts +7 -0
- package/dist/definitions/test-utils/TestWrapper.d.ts.map +1 -0
- package/dist/definitions/themes/default.d.ts +8 -1
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/choices.d.ts +35 -0
- package/dist/definitions/themes/late-ocean/choices.d.ts.map +1 -0
- package/dist/definitions/themes/late-ocean/forms.d.ts +7 -1
- package/dist/definitions/themes/late-ocean/forms.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/inputField.d.ts +7 -1
- package/dist/definitions/themes/late-ocean/inputField.d.ts.map +1 -1
- package/dist/definitions/typography/Typography.d.ts +1 -0
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/definitions/typography/TypographyLink.d.ts +1 -1
- package/dist/definitions/typography/TypographyLink.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +917 -432
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +917 -432
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +917 -432
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +995 -591
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +933 -477
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.css +1 -1
- package/dist/index-node-14.17.cjs.web.js +824 -449
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +41 -1
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +41 -1
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +41 -1
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +41 -1
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +41 -1
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +41 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +27 -2
|
@@ -1,59 +1,249 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
-
import {
|
|
3
|
+
import { Stack as Stack$1, VStack as VStack$1, HStack as HStack$1, Text as Text$1, View as View$2, ScrollView as ScrollView$1, Pressable as Pressable$2, Image as Image$1, NativeBaseProvider, extendTheme } from 'native-base';
|
|
4
|
+
import _extends from '@babel/runtime/helpers/extends';
|
|
5
|
+
import { forwardRef, useContext, createContext, cloneElement, useState, useRef, useEffect, Children, useMemo, Fragment } from 'react';
|
|
6
|
+
import { styled } from '@linaria/react';
|
|
7
|
+
import { Pressable as Pressable$1, View as View$1, useWindowDimensions, Image, StyleSheet, ScrollView as ScrollView$2, Linking, TextInput, Modal as Modal$1, Text as Text$2 } from 'react-native';
|
|
4
8
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
5
|
-
import
|
|
6
|
-
export * from '@ornikar/kitt-icons';
|
|
7
|
-
import styled, { useTheme, css, ThemeProvider } from 'styled-components/native';
|
|
8
|
-
import { cloneElement, useContext, createContext, forwardRef, useMemo, useState, Fragment, useEffect, Children } from 'react';
|
|
9
|
+
import styled$1, { useTheme, css, ThemeProvider } from 'styled-components/native';
|
|
9
10
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
10
11
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
11
|
-
import { Text as Text$1, Image as Image$1, NativeBaseProvider, extendTheme, Stack as Stack$1, VStack as VStack$1, HStack as HStack$1, View as View$2, ScrollView as ScrollView$2, Pressable as Pressable$2 } from 'native-base';
|
|
12
|
-
import { styled as styled$1 } from '@linaria/react';
|
|
13
|
-
import { parse } from 'twemoji-parser';
|
|
14
12
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
15
13
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
16
|
-
import
|
|
14
|
+
import { ArcIcon, UserIcon, CheckboxMark, EyeOffIcon, EyeIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, XIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
|
|
15
|
+
export * from '@ornikar/kitt-icons';
|
|
16
|
+
import { parse } from 'twemoji-parser';
|
|
17
17
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
18
18
|
import { Portal } from 'react-portal';
|
|
19
19
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
20
20
|
import { useFloating, offset, shift, flip, getScrollParents } from '@floating-ui/react-dom';
|
|
21
21
|
import { makeDecorator } from '@storybook/addons';
|
|
22
22
|
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
var Stack = Stack$1;
|
|
24
|
+
var VStack = VStack$1;
|
|
25
|
+
var HStack = HStack$1;
|
|
26
|
+
|
|
27
|
+
function warn(message) {
|
|
28
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
29
|
+
console.warn(message);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function deprecatedMessage(symbol, deprecation, replaceBy) {
|
|
33
|
+
var replaceMessage = replaceBy === undefined ? '' : ", please use ".concat(replaceBy, " instead");
|
|
34
|
+
warn("[Deprecation] in ".concat(symbol, ": ").concat(deprecation, " is deprecated").concat(replaceMessage, "."));
|
|
35
|
+
}
|
|
36
|
+
function deprecatedInComponent(component, deprecation, replaceBy) {
|
|
37
|
+
deprecatedMessage("<".concat(component, " />"), deprecation, replaceBy);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// type $Without<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
|
|
41
|
+
// type $DeepPartial<T> = { [P in keyof T]?: $DeepPartial<T[P]> };
|
|
42
|
+
// export function withTheme<Props extends { theme: DefaultTheme }, C>(
|
|
43
|
+
// WrappedComponent: ComponentType<Props> & C,
|
|
44
|
+
// ): ComponentType<SetOptional<Props, 'theme'>> & hoistNonReactStatics.NonReactStatics<typeof WrappedComponent> {
|
|
45
|
+
// return function ThemedComponent(props) {
|
|
46
|
+
// const theme = useTheme();
|
|
47
|
+
// return (<WrappedComponent theme={theme} {...(props as any)} />) as any;
|
|
48
|
+
// };
|
|
49
|
+
// }
|
|
50
|
+
function withTheme(WrappedComponent) {
|
|
51
|
+
// eslint-disable-next-line prefer-arrow-callback
|
|
52
|
+
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
53
|
+
var theme = /*#__PURE__*/useTheme();
|
|
54
|
+
return /*#__PURE__*/jsx(WrappedComponent, _objectSpread({
|
|
55
|
+
ref: ref,
|
|
56
|
+
theme: theme
|
|
57
|
+
}, props));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
var hasVariant = function (button, variant) {
|
|
62
|
+
return variant in button;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
function getVariantValuesIfExist(theme, type, variant) {
|
|
66
|
+
var button = theme.kitt.button[type];
|
|
67
|
+
|
|
68
|
+
if (hasVariant(button, variant)) {
|
|
69
|
+
return button[variant];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return theme.kitt.button[type]["default"];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function isSubtle(type) {
|
|
76
|
+
return type.startsWith('subtle');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
var _excluded$m = ["$type", "$variant", "$isStretch", "disabled"];
|
|
80
|
+
var AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/styled("div")({
|
|
81
|
+
name: "AnimatedButtonPressableContainer",
|
|
82
|
+
"class": "kitt-u_AnimatedButtonPressableContainer_a1vkj3mh",
|
|
83
|
+
vars: {
|
|
84
|
+
"a1vkj3mh-0": [function (_ref) {
|
|
85
|
+
var $isStretch = _ref.$isStretch;
|
|
86
|
+
return $isStretch ? 'inherit' : 'inline-flex';
|
|
87
|
+
}],
|
|
88
|
+
"a1vkj3mh-1": [function (_ref2) {
|
|
89
|
+
var $isStretch = _ref2.$isStretch;
|
|
90
|
+
return $isStretch ? 'stretch' : 'baseline';
|
|
91
|
+
}],
|
|
92
|
+
"a1vkj3mh-3": [function (_ref3) {
|
|
93
|
+
var theme = _ref3.theme;
|
|
94
|
+
return theme.kitt.button.scale.medium.hover;
|
|
95
|
+
}],
|
|
96
|
+
"a1vkj3mh-4": [function (_ref4) {
|
|
97
|
+
var theme = _ref4.theme,
|
|
98
|
+
$isDisabled = _ref4.$isDisabled;
|
|
99
|
+
return "scale(".concat($isDisabled ? 1 : theme.kitt.button.scale.base.active, ")");
|
|
100
|
+
}],
|
|
101
|
+
"a1vkj3mh-5": [function (_ref5) {
|
|
102
|
+
var theme = _ref5.theme,
|
|
103
|
+
$type = _ref5.$type,
|
|
104
|
+
$variant = _ref5.$variant,
|
|
105
|
+
$isDisabled = _ref5.$isDisabled;
|
|
106
|
+
if ($isDisabled) return theme.kitt.button.disabled["default"].hoverBackgroundColor;
|
|
107
|
+
return getVariantValuesIfExist(theme, $type, $variant).hoverBackgroundColor;
|
|
108
|
+
}],
|
|
109
|
+
"a1vkj3mh-6": [function (_ref6) {
|
|
110
|
+
var theme = _ref6.theme;
|
|
111
|
+
var _theme$kitt$button$tr = theme.kitt.button.transition,
|
|
112
|
+
duration = _theme$kitt$button$tr.duration,
|
|
113
|
+
timingFunction = _theme$kitt$button$tr.timingFunction;
|
|
114
|
+
return "color, background, border-color, ".concat(duration, " ").concat(timingFunction);
|
|
115
|
+
}],
|
|
116
|
+
"a1vkj3mh-7": [function (_ref7) {
|
|
117
|
+
var theme = _ref7.theme;
|
|
118
|
+
return theme.kitt.button.borderRadius;
|
|
119
|
+
}, "px"],
|
|
120
|
+
"a1vkj3mh-8": [function (_ref8) {
|
|
121
|
+
var theme = _ref8.theme;
|
|
122
|
+
return "opacity ".concat(theme.kitt.button.transition.duration, " ").concat(theme.kitt.button.transition.timingFunction);
|
|
123
|
+
}],
|
|
124
|
+
"a1vkj3mh-9": [function (_ref9) {
|
|
125
|
+
var $isDisabled = _ref9.$isDisabled;
|
|
126
|
+
return $isDisabled ? 1 : 0;
|
|
127
|
+
}],
|
|
128
|
+
"a1vkj3mh-10": [function (_ref10) {
|
|
129
|
+
var theme = _ref10.theme;
|
|
130
|
+
return "-".concat(theme.kitt.button.borderWidth.disabled, "px");
|
|
131
|
+
}],
|
|
132
|
+
"a1vkj3mh-12": [function (_ref11) {
|
|
133
|
+
var theme = _ref11.theme;
|
|
134
|
+
return "calc(100% - ".concat(theme.kitt.button.borderWidth.disabled * 0.5, "px)");
|
|
135
|
+
}],
|
|
136
|
+
"a1vkj3mh-14": [function (_ref12) {
|
|
137
|
+
var theme = _ref12.theme;
|
|
138
|
+
return "".concat(theme.kitt.button.borderWidth.disabled, "px solid ").concat(theme.kitt.button.disabled["default"].borderColor);
|
|
139
|
+
}],
|
|
140
|
+
"a1vkj3mh-15": [function (_ref13) {
|
|
141
|
+
var theme = _ref13.theme,
|
|
142
|
+
$type = _ref13.$type,
|
|
143
|
+
$variant = _ref13.$variant;
|
|
144
|
+
return "".concat(theme.kitt.button.borderWidth.focus, "px solid ").concat(getVariantValuesIfExist(theme, $type, $variant).focusBorderColor);
|
|
145
|
+
}],
|
|
146
|
+
"a1vkj3mh-16": [function (_ref14) {
|
|
147
|
+
var theme = _ref14.theme;
|
|
148
|
+
return "-".concat(theme.kitt.button.borderWidth.focus, "px");
|
|
149
|
+
}],
|
|
150
|
+
"a1vkj3mh-18": [function (_ref15) {
|
|
151
|
+
var theme = _ref15.theme,
|
|
152
|
+
$type = _ref15.$type,
|
|
153
|
+
$isDisabled = _ref15.$isDisabled;
|
|
154
|
+
if ($isDisabled) return theme.kitt.typography.colors['black-light'];
|
|
155
|
+
|
|
156
|
+
if (isSubtle($type)) {
|
|
157
|
+
return theme.kitt.button[$type]["default"].color;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return 'inherit';
|
|
161
|
+
}],
|
|
162
|
+
"a1vkj3mh-19": [function (_ref16) {
|
|
163
|
+
var theme = _ref16.theme,
|
|
164
|
+
$type = _ref16.$type,
|
|
165
|
+
$isDisabled = _ref16.$isDisabled;
|
|
166
|
+
if ($isDisabled) return theme.kitt.typography.colors['black-light'];
|
|
167
|
+
|
|
168
|
+
if (isSubtle($type)) {
|
|
169
|
+
return theme.kitt.button[$type]["default"].hoverColor;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return 'inherit';
|
|
173
|
+
}],
|
|
174
|
+
"a1vkj3mh-20": [function (_ref17) {
|
|
175
|
+
var theme = _ref17.theme,
|
|
176
|
+
$type = _ref17.$type,
|
|
177
|
+
$isDisabled = _ref17.$isDisabled;
|
|
178
|
+
if ($isDisabled) return theme.kitt.typography.colors['black-light'];
|
|
179
|
+
|
|
180
|
+
if (isSubtle($type)) {
|
|
181
|
+
return theme.kitt.button[$type]["default"].activeColor;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return 'inherit';
|
|
185
|
+
}]
|
|
186
|
+
}
|
|
187
|
+
}));
|
|
188
|
+
var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref18, ref) {
|
|
189
|
+
var $type = _ref18.$type,
|
|
190
|
+
$variant = _ref18.$variant,
|
|
191
|
+
$isStretch = _ref18.$isStretch,
|
|
192
|
+
disabled = _ref18.disabled,
|
|
193
|
+
props = _objectWithoutProperties(_ref18, _excluded$m);
|
|
194
|
+
|
|
195
|
+
return /*#__PURE__*/jsx(AnimatedButtonPressableContainer, {
|
|
196
|
+
ref: ref,
|
|
197
|
+
$type: $type,
|
|
198
|
+
$variant: $variant,
|
|
199
|
+
$isDisabled: !!disabled,
|
|
200
|
+
$isStretch: $isStretch,
|
|
201
|
+
children: /*#__PURE__*/jsx(Pressable$1, _objectSpread({
|
|
202
|
+
disabled: disabled
|
|
203
|
+
}, props))
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
var BaseStyledButtonPressable = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
208
|
+
displayName: "BaseStyledButtonPressable",
|
|
209
|
+
componentId: "kitt-universal__sc-4k8lse-0"
|
|
210
|
+
})(["position:relative;min-width:", "px;max-width:", ";width:", ";min-height:", "px;border-radius:", "px;flex-direction:row;align-items:center;justify-content:center;align-self:flex-start;background-color:", ";padding:", ";"], function (_ref) {
|
|
211
|
+
var theme = _ref.theme;
|
|
212
|
+
return theme.kitt.button.minWidth;
|
|
30
213
|
}, function (_ref2) {
|
|
31
|
-
var
|
|
32
|
-
|
|
214
|
+
var theme = _ref2.theme,
|
|
215
|
+
$isStretch = _ref2.$isStretch;
|
|
216
|
+
return $isStretch ? '100%' : "".concat(theme.kitt.button.maxWidth, "px");
|
|
33
217
|
}, function (_ref3) {
|
|
34
|
-
var $
|
|
35
|
-
return $
|
|
218
|
+
var $isStretch = _ref3.$isStretch;
|
|
219
|
+
return $isStretch ? '100%' : 'auto';
|
|
36
220
|
}, function (_ref4) {
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
221
|
+
var theme = _ref4.theme;
|
|
222
|
+
return theme.kitt.button.minHeight;
|
|
223
|
+
}, function (_ref5) {
|
|
224
|
+
var theme = _ref5.theme;
|
|
225
|
+
return theme.kitt.button.borderRadius;
|
|
226
|
+
}, function (_ref6) {
|
|
227
|
+
var theme = _ref6.theme,
|
|
228
|
+
$isDisabled = _ref6.$isDisabled,
|
|
229
|
+
$type = _ref6.$type,
|
|
230
|
+
$variant = _ref6.$variant;
|
|
231
|
+
if ($isDisabled) return theme.kitt.button.disabled["default"].backgroundColor;
|
|
232
|
+
return getVariantValuesIfExist(theme, $type, $variant).backgroundColor;
|
|
233
|
+
}, function (_ref7) {
|
|
234
|
+
var theme = _ref7.theme,
|
|
235
|
+
$size = _ref7.$size,
|
|
236
|
+
$isDisabled = _ref7.$isDisabled;
|
|
237
|
+
var _theme$kitt$button$co = theme.kitt.button.contentPadding,
|
|
238
|
+
large = _theme$kitt$button$co.large,
|
|
239
|
+
defaultPadding = _theme$kitt$button$co["default"],
|
|
240
|
+
disabledPadding = _theme$kitt$button$co.disabled,
|
|
241
|
+
xLarge = _theme$kitt$button$co.xLarge;
|
|
242
|
+
if ($size === 'large') return large;
|
|
243
|
+
if ($size === 'xlarge') return xLarge;
|
|
244
|
+
if ($isDisabled) return disabledPadding;
|
|
245
|
+
return defaultPadding;
|
|
40
246
|
});
|
|
41
|
-
function Icon(_ref5) {
|
|
42
|
-
var icon = _ref5.icon,
|
|
43
|
-
_ref5$size = _ref5.size,
|
|
44
|
-
size = _ref5$size === void 0 ? defaultIconSize : _ref5$size,
|
|
45
|
-
align = _ref5.align,
|
|
46
|
-
color = _ref5.color;
|
|
47
|
-
var clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
48
|
-
color: color
|
|
49
|
-
});
|
|
50
|
-
return /*#__PURE__*/jsx(IconContainer$1, {
|
|
51
|
-
$align: align,
|
|
52
|
-
$size: size,
|
|
53
|
-
$color: color,
|
|
54
|
-
children: clonedIcon
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
247
|
|
|
58
248
|
var KittBreakpoints = {
|
|
59
249
|
/**
|
|
@@ -112,14 +302,20 @@ var KittBreakpointNameEnum;
|
|
|
112
302
|
KittBreakpointNameEnum["WIDE"] = "wide";
|
|
113
303
|
})(KittBreakpointNameEnum || (KittBreakpointNameEnum = {}));
|
|
114
304
|
|
|
115
|
-
var _excluded$
|
|
305
|
+
var _excluded$l = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
|
|
116
306
|
var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
|
|
117
307
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
118
308
|
function useTypographyColor() {
|
|
119
309
|
return useContext(TypographyColorContext);
|
|
120
310
|
}
|
|
311
|
+
var TypographyDefaultColorContext = /*#__PURE__*/createContext(undefined);
|
|
312
|
+
|
|
313
|
+
function useTypographyDefaultColor() {
|
|
314
|
+
return useContext(TypographyDefaultColorContext);
|
|
315
|
+
}
|
|
121
316
|
/** @deprecated use native-base instead for SSR compatibility */
|
|
122
317
|
|
|
318
|
+
|
|
123
319
|
var getTypographyTypeConfigKey = function (theme) {
|
|
124
320
|
var isMediumOrAbove = theme.responsive.matchWindowSize({
|
|
125
321
|
minWidth: KittBreakpoints.MEDIUM
|
|
@@ -154,6 +350,11 @@ function createNativeBaseFontSize(type) {
|
|
|
154
350
|
});
|
|
155
351
|
return fontSizeForNativeBase;
|
|
156
352
|
}
|
|
353
|
+
|
|
354
|
+
function getNBThemeColorFromColorProps(colorName) {
|
|
355
|
+
return colorName ? "kitt.typography.".concat(colorName) : undefined;
|
|
356
|
+
}
|
|
357
|
+
|
|
157
358
|
function Typography(_ref) {
|
|
158
359
|
var _type$base;
|
|
159
360
|
|
|
@@ -173,9 +374,10 @@ function Typography(_ref) {
|
|
|
173
374
|
} : _ref$type,
|
|
174
375
|
variant = _ref.variant,
|
|
175
376
|
color = _ref.color,
|
|
176
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
377
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$l);
|
|
177
378
|
|
|
178
379
|
var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
|
|
380
|
+
var defaultColor = useTypographyDefaultColor();
|
|
179
381
|
var hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
|
|
180
382
|
var baseOrDefaultToBody = hasTypographyAncestor ? type.base : (_type$base = type.base) !== null && _type$base !== void 0 ? _type$base : 'body';
|
|
181
383
|
var isHeader = isTypographyHeader(baseOrDefaultToBody, isHeaderTypographyInContext);
|
|
@@ -196,14 +398,16 @@ function Typography(_ref) {
|
|
|
196
398
|
});
|
|
197
399
|
}
|
|
198
400
|
|
|
401
|
+
var currentColor = !color && !hasTypographyAncestor ? defaultColor : color;
|
|
402
|
+
|
|
199
403
|
var text = /*#__PURE__*/jsx(Text$1, _objectSpread({
|
|
200
404
|
accessibilityRole: accessibilityRole || undefined,
|
|
201
405
|
fontSize: fontSizeForNativeBase,
|
|
202
406
|
lineHeight: hasTypographyAncestor ? undefined : fontSizeForNativeBase,
|
|
203
407
|
fontWeight: isHeader ? "headers.".concat(nonNullableVariant) : "bodies.".concat(nonNullableVariant),
|
|
204
408
|
fontFamily: isHeader ? "headers.".concat(nonNullableVariant) : "bodies.".concat(nonNullableVariant),
|
|
205
|
-
color:
|
|
206
|
-
textDecorationColor:
|
|
409
|
+
color: getNBThemeColorFromColorProps(currentColor),
|
|
410
|
+
textDecorationColor: getNBThemeColorFromColorProps(currentColor)
|
|
207
411
|
}, otherProps));
|
|
208
412
|
|
|
209
413
|
var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
|
|
@@ -244,6 +448,7 @@ var createHeading = function (level, defaultBase) {
|
|
|
244
448
|
return TypographyHeading;
|
|
245
449
|
};
|
|
246
450
|
|
|
451
|
+
Typography.SetDefaultColor = TypographyDefaultColorContext.Provider;
|
|
247
452
|
Typography.Text = TypographyText;
|
|
248
453
|
Typography.Paragraph = TypographyParagraph;
|
|
249
454
|
Typography.Header1 = createHeading(1);
|
|
@@ -261,327 +466,54 @@ Typography.h2 = createHeading(2, 'header2');
|
|
|
261
466
|
/** @deprecated use Typography.Header3 */
|
|
262
467
|
|
|
263
468
|
Typography.h3 = createHeading(3, 'header3');
|
|
264
|
-
/** @deprecated use Typography.Header4 */
|
|
265
|
-
|
|
266
|
-
Typography.h4 = createHeading(4, 'header4');
|
|
267
|
-
/** @deprecated use Typography.Header6 */
|
|
268
|
-
|
|
269
|
-
Typography.h5 = createHeading(5, 'header5');
|
|
270
|
-
|
|
271
|
-
var _excluded$i = ["size", "round", "light", "sizeVariant"];
|
|
272
|
-
|
|
273
|
-
var getInitials = function (firstname, lastname) {
|
|
274
|
-
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
var StyledAvatarView = /*#__PURE__*/styled(View$1).withConfig({
|
|
278
|
-
displayName: "Avatar__StyledAvatarView",
|
|
279
|
-
componentId: "kitt-universal__sc-9miubv-0"
|
|
280
|
-
})(["border-radius:", ";background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], function (_ref) {
|
|
281
|
-
var theme = _ref.theme,
|
|
282
|
-
$isRound = _ref.$isRound,
|
|
283
|
-
$size = _ref.$size,
|
|
284
|
-
$sizeVariant = _ref.$sizeVariant;
|
|
285
|
-
if ($isRound) return "".concat($size / 2, "px");
|
|
286
|
-
return "".concat($sizeVariant === 'large' ? theme.kitt.avatar.large.borderRadius : theme.kitt.avatar.borderRadius, "px");
|
|
287
|
-
}, function (_ref2) {
|
|
288
|
-
var theme = _ref2.theme,
|
|
289
|
-
$isLight = _ref2.$isLight;
|
|
290
|
-
return $isLight ? theme.kitt.avatar.light.backgroundColor : theme.kitt.avatar["default"].backgroundColor;
|
|
291
|
-
}, function (_ref3) {
|
|
292
|
-
var $size = _ref3.$size;
|
|
293
|
-
return $size;
|
|
294
|
-
}, function (_ref4) {
|
|
295
|
-
var $size = _ref4.$size;
|
|
296
|
-
return $size;
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
function AvatarContent(_ref5) {
|
|
300
|
-
var size = _ref5.size,
|
|
301
|
-
src = _ref5.src,
|
|
302
|
-
firstname = _ref5.firstname,
|
|
303
|
-
lastname = _ref5.lastname,
|
|
304
|
-
alt = _ref5.alt,
|
|
305
|
-
isLight = _ref5.isLight,
|
|
306
|
-
sizeVariant = _ref5.sizeVariant;
|
|
307
|
-
|
|
308
|
-
if (src) {
|
|
309
|
-
return /*#__PURE__*/jsx(Image, {
|
|
310
|
-
source: {
|
|
311
|
-
uri: src
|
|
312
|
-
},
|
|
313
|
-
style: {
|
|
314
|
-
width: size,
|
|
315
|
-
height: size
|
|
316
|
-
},
|
|
317
|
-
accessibilityLabel: alt
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
if (firstname && lastname) {
|
|
322
|
-
return /*#__PURE__*/jsx(Typography.Text, {
|
|
323
|
-
base: sizeVariant === 'large' ? 'body-large' : 'body-small',
|
|
324
|
-
variant: sizeVariant === 'large' ? 'bold' : 'regular',
|
|
325
|
-
color: isLight ? 'black' : 'white',
|
|
326
|
-
children: getInitials(firstname, lastname)
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
return /*#__PURE__*/jsx(Icon, {
|
|
331
|
-
icon: /*#__PURE__*/jsx(UserIcon, {}),
|
|
332
|
-
color: isLight ? 'black' : 'white',
|
|
333
|
-
size: size / 2
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
function Avatar(_ref6) {
|
|
338
|
-
var _ref6$size = _ref6.size,
|
|
339
|
-
size = _ref6$size === void 0 ? 40 : _ref6$size,
|
|
340
|
-
round = _ref6.round,
|
|
341
|
-
light = _ref6.light,
|
|
342
|
-
sizeVariant = _ref6.sizeVariant,
|
|
343
|
-
props = _objectWithoutProperties(_ref6, _excluded$i);
|
|
344
|
-
|
|
345
|
-
return /*#__PURE__*/jsx(StyledAvatarView, {
|
|
346
|
-
$size: size,
|
|
347
|
-
$isRound: round,
|
|
348
|
-
$isLight: light,
|
|
349
|
-
$sizeVariant: sizeVariant,
|
|
350
|
-
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread({
|
|
351
|
-
size: size,
|
|
352
|
-
isLight: light,
|
|
353
|
-
sizeVariant: sizeVariant
|
|
354
|
-
}, props))
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
function warn(message) {
|
|
359
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
360
|
-
console.warn(message);
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
function deprecatedMessage(symbol, deprecation, replaceBy) {
|
|
364
|
-
var replaceMessage = replaceBy === undefined ? '' : ", please use ".concat(replaceBy, " instead");
|
|
365
|
-
warn("[Deprecation] in ".concat(symbol, ": ").concat(deprecation, " is deprecated").concat(replaceMessage, "."));
|
|
366
|
-
}
|
|
367
|
-
function deprecatedInComponent(component, deprecation, replaceBy) {
|
|
368
|
-
deprecatedMessage("<".concat(component, " />"), deprecation, replaceBy);
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
// type $Without<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
|
|
372
|
-
// type $DeepPartial<T> = { [P in keyof T]?: $DeepPartial<T[P]> };
|
|
373
|
-
// export function withTheme<Props extends { theme: DefaultTheme }, C>(
|
|
374
|
-
// WrappedComponent: ComponentType<Props> & C,
|
|
375
|
-
// ): ComponentType<SetOptional<Props, 'theme'>> & hoistNonReactStatics.NonReactStatics<typeof WrappedComponent> {
|
|
376
|
-
// return function ThemedComponent(props) {
|
|
377
|
-
// const theme = useTheme();
|
|
378
|
-
// return (<WrappedComponent theme={theme} {...(props as any)} />) as any;
|
|
379
|
-
// };
|
|
380
|
-
// }
|
|
381
|
-
function withTheme(WrappedComponent) {
|
|
382
|
-
// eslint-disable-next-line prefer-arrow-callback
|
|
383
|
-
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
384
|
-
var theme = /*#__PURE__*/useTheme();
|
|
385
|
-
return /*#__PURE__*/jsx(WrappedComponent, _objectSpread({
|
|
386
|
-
ref: ref,
|
|
387
|
-
theme: theme
|
|
388
|
-
}, props));
|
|
389
|
-
});
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
var hasVariant = function (button, variant) {
|
|
393
|
-
return variant in button;
|
|
394
|
-
};
|
|
395
|
-
|
|
396
|
-
function getVariantValuesIfExist(theme, type, variant) {
|
|
397
|
-
var button = theme.kitt.button[type];
|
|
398
|
-
|
|
399
|
-
if (hasVariant(button, variant)) {
|
|
400
|
-
return button[variant];
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
return theme.kitt.button[type]["default"];
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
function isSubtle(type) {
|
|
407
|
-
return type.startsWith('subtle');
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
var _excluded$h = ["$type", "$variant", "$isStretch", "disabled"];
|
|
411
|
-
var AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/styled$1("div")({
|
|
412
|
-
name: "AnimatedButtonPressableContainer",
|
|
413
|
-
"class": "kitt-u_AnimatedButtonPressableContainer_a1vkj3mh",
|
|
414
|
-
vars: {
|
|
415
|
-
"a1vkj3mh-0": [function (_ref) {
|
|
416
|
-
var $isStretch = _ref.$isStretch;
|
|
417
|
-
return $isStretch ? 'inherit' : 'inline-flex';
|
|
418
|
-
}],
|
|
419
|
-
"a1vkj3mh-1": [function (_ref2) {
|
|
420
|
-
var $isStretch = _ref2.$isStretch;
|
|
421
|
-
return $isStretch ? 'stretch' : 'baseline';
|
|
422
|
-
}],
|
|
423
|
-
"a1vkj3mh-3": [function (_ref3) {
|
|
424
|
-
var theme = _ref3.theme;
|
|
425
|
-
return theme.kitt.button.scale.medium.hover;
|
|
426
|
-
}],
|
|
427
|
-
"a1vkj3mh-4": [function (_ref4) {
|
|
428
|
-
var theme = _ref4.theme,
|
|
429
|
-
$isDisabled = _ref4.$isDisabled;
|
|
430
|
-
return "scale(".concat($isDisabled ? 1 : theme.kitt.button.scale.base.active, ")");
|
|
431
|
-
}],
|
|
432
|
-
"a1vkj3mh-5": [function (_ref5) {
|
|
433
|
-
var theme = _ref5.theme,
|
|
434
|
-
$type = _ref5.$type,
|
|
435
|
-
$variant = _ref5.$variant,
|
|
436
|
-
$isDisabled = _ref5.$isDisabled;
|
|
437
|
-
if ($isDisabled) return theme.kitt.button.disabled["default"].hoverBackgroundColor;
|
|
438
|
-
return getVariantValuesIfExist(theme, $type, $variant).hoverBackgroundColor;
|
|
439
|
-
}],
|
|
440
|
-
"a1vkj3mh-6": [function (_ref6) {
|
|
441
|
-
var theme = _ref6.theme;
|
|
442
|
-
var _theme$kitt$button$tr = theme.kitt.button.transition,
|
|
443
|
-
duration = _theme$kitt$button$tr.duration,
|
|
444
|
-
timingFunction = _theme$kitt$button$tr.timingFunction;
|
|
445
|
-
return "color, background, border-color, ".concat(duration, " ").concat(timingFunction);
|
|
446
|
-
}],
|
|
447
|
-
"a1vkj3mh-7": [function (_ref7) {
|
|
448
|
-
var theme = _ref7.theme;
|
|
449
|
-
return theme.kitt.button.borderRadius;
|
|
450
|
-
}, "px"],
|
|
451
|
-
"a1vkj3mh-8": [function (_ref8) {
|
|
452
|
-
var theme = _ref8.theme;
|
|
453
|
-
return "opacity ".concat(theme.kitt.button.transition.duration, " ").concat(theme.kitt.button.transition.timingFunction);
|
|
454
|
-
}],
|
|
455
|
-
"a1vkj3mh-9": [function (_ref9) {
|
|
456
|
-
var $isDisabled = _ref9.$isDisabled;
|
|
457
|
-
return $isDisabled ? 1 : 0;
|
|
458
|
-
}],
|
|
459
|
-
"a1vkj3mh-10": [function (_ref10) {
|
|
460
|
-
var theme = _ref10.theme;
|
|
461
|
-
return "-".concat(theme.kitt.button.borderWidth.disabled, "px");
|
|
462
|
-
}],
|
|
463
|
-
"a1vkj3mh-12": [function (_ref11) {
|
|
464
|
-
var theme = _ref11.theme;
|
|
465
|
-
return "calc(100% - ".concat(theme.kitt.button.borderWidth.disabled * 0.5, "px)");
|
|
466
|
-
}],
|
|
467
|
-
"a1vkj3mh-14": [function (_ref12) {
|
|
468
|
-
var theme = _ref12.theme;
|
|
469
|
-
return "".concat(theme.kitt.button.borderWidth.disabled, "px solid ").concat(theme.kitt.button.disabled["default"].borderColor);
|
|
470
|
-
}],
|
|
471
|
-
"a1vkj3mh-15": [function (_ref13) {
|
|
472
|
-
var theme = _ref13.theme,
|
|
473
|
-
$type = _ref13.$type,
|
|
474
|
-
$variant = _ref13.$variant;
|
|
475
|
-
return "".concat(theme.kitt.button.borderWidth.focus, "px solid ").concat(getVariantValuesIfExist(theme, $type, $variant).focusBorderColor);
|
|
476
|
-
}],
|
|
477
|
-
"a1vkj3mh-16": [function (_ref14) {
|
|
478
|
-
var theme = _ref14.theme;
|
|
479
|
-
return "-".concat(theme.kitt.button.borderWidth.focus, "px");
|
|
480
|
-
}],
|
|
481
|
-
"a1vkj3mh-18": [function (_ref15) {
|
|
482
|
-
var theme = _ref15.theme,
|
|
483
|
-
$type = _ref15.$type,
|
|
484
|
-
$isDisabled = _ref15.$isDisabled;
|
|
485
|
-
if ($isDisabled) return theme.kitt.typography.colors['black-light'];
|
|
486
|
-
|
|
487
|
-
if (isSubtle($type)) {
|
|
488
|
-
return theme.kitt.button[$type]["default"].color;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
return 'inherit';
|
|
492
|
-
}],
|
|
493
|
-
"a1vkj3mh-19": [function (_ref16) {
|
|
494
|
-
var theme = _ref16.theme,
|
|
495
|
-
$type = _ref16.$type,
|
|
496
|
-
$isDisabled = _ref16.$isDisabled;
|
|
497
|
-
if ($isDisabled) return theme.kitt.typography.colors['black-light'];
|
|
498
|
-
|
|
499
|
-
if (isSubtle($type)) {
|
|
500
|
-
return theme.kitt.button[$type]["default"].hoverColor;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
return 'inherit';
|
|
504
|
-
}],
|
|
505
|
-
"a1vkj3mh-20": [function (_ref17) {
|
|
506
|
-
var theme = _ref17.theme,
|
|
507
|
-
$type = _ref17.$type,
|
|
508
|
-
$isDisabled = _ref17.$isDisabled;
|
|
509
|
-
if ($isDisabled) return theme.kitt.typography.colors['black-light'];
|
|
510
|
-
|
|
511
|
-
if (isSubtle($type)) {
|
|
512
|
-
return theme.kitt.button[$type]["default"].activeColor;
|
|
513
|
-
}
|
|
469
|
+
/** @deprecated use Typography.Header4 */
|
|
514
470
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
}
|
|
518
|
-
}));
|
|
519
|
-
var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref18, ref) {
|
|
520
|
-
var $type = _ref18.$type,
|
|
521
|
-
$variant = _ref18.$variant,
|
|
522
|
-
$isStretch = _ref18.$isStretch,
|
|
523
|
-
disabled = _ref18.disabled,
|
|
524
|
-
props = _objectWithoutProperties(_ref18, _excluded$h);
|
|
471
|
+
Typography.h4 = createHeading(4, 'header4');
|
|
472
|
+
/** @deprecated use Typography.Header6 */
|
|
525
473
|
|
|
526
|
-
|
|
527
|
-
ref: ref,
|
|
528
|
-
$type: $type,
|
|
529
|
-
$variant: $variant,
|
|
530
|
-
$isDisabled: !!disabled,
|
|
531
|
-
$isStretch: $isStretch,
|
|
532
|
-
children: /*#__PURE__*/jsx(Pressable$1, _objectSpread({
|
|
533
|
-
disabled: disabled
|
|
534
|
-
}, props))
|
|
535
|
-
});
|
|
536
|
-
});
|
|
474
|
+
Typography.h5 = createHeading(5, 'header5');
|
|
537
475
|
|
|
538
|
-
var
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
476
|
+
var defaultIconSize = 20;
|
|
477
|
+
var IconContainer$1 = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
478
|
+
displayName: "Icon__IconContainer",
|
|
479
|
+
componentId: "kitt-universal__sc-usm0ol-0"
|
|
480
|
+
})(["color:", ";width:", "px;height:", "px;align-self:", ";"], function (_ref) {
|
|
481
|
+
var $color = _ref.$color;
|
|
482
|
+
return $color;
|
|
544
483
|
}, function (_ref2) {
|
|
545
|
-
var
|
|
546
|
-
|
|
547
|
-
return $isStretch ? '100%' : "".concat(theme.kitt.button.maxWidth, "px");
|
|
484
|
+
var $size = _ref2.$size;
|
|
485
|
+
return $size;
|
|
548
486
|
}, function (_ref3) {
|
|
549
|
-
var $
|
|
550
|
-
return $
|
|
487
|
+
var $size = _ref3.$size;
|
|
488
|
+
return $size;
|
|
551
489
|
}, function (_ref4) {
|
|
552
|
-
var
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
var theme = _ref5.theme;
|
|
556
|
-
return theme.kitt.button.borderRadius;
|
|
557
|
-
}, function (_ref6) {
|
|
558
|
-
var theme = _ref6.theme,
|
|
559
|
-
$isDisabled = _ref6.$isDisabled,
|
|
560
|
-
$type = _ref6.$type,
|
|
561
|
-
$variant = _ref6.$variant;
|
|
562
|
-
if ($isDisabled) return theme.kitt.button.disabled["default"].backgroundColor;
|
|
563
|
-
return getVariantValuesIfExist(theme, $type, $variant).backgroundColor;
|
|
564
|
-
}, function (_ref7) {
|
|
565
|
-
var theme = _ref7.theme,
|
|
566
|
-
$size = _ref7.$size,
|
|
567
|
-
$isDisabled = _ref7.$isDisabled;
|
|
568
|
-
var _theme$kitt$button$co = theme.kitt.button.contentPadding,
|
|
569
|
-
large = _theme$kitt$button$co.large,
|
|
570
|
-
defaultPadding = _theme$kitt$button$co["default"],
|
|
571
|
-
disabledPadding = _theme$kitt$button$co.disabled,
|
|
572
|
-
xLarge = _theme$kitt$button$co.xLarge;
|
|
573
|
-
if ($size === 'large') return large;
|
|
574
|
-
if ($size === 'xlarge') return xLarge;
|
|
575
|
-
if ($isDisabled) return disabledPadding;
|
|
576
|
-
return defaultPadding;
|
|
490
|
+
var _ref4$$align = _ref4.$align,
|
|
491
|
+
$align = _ref4$$align === void 0 ? 'auto' : _ref4$$align;
|
|
492
|
+
return $align;
|
|
577
493
|
});
|
|
494
|
+
function Icon(_ref5) {
|
|
495
|
+
var icon = _ref5.icon,
|
|
496
|
+
_ref5$size = _ref5.size,
|
|
497
|
+
size = _ref5$size === void 0 ? defaultIconSize : _ref5$size,
|
|
498
|
+
align = _ref5.align,
|
|
499
|
+
color = _ref5.color;
|
|
500
|
+
var clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
501
|
+
color: color
|
|
502
|
+
});
|
|
503
|
+
return /*#__PURE__*/jsx(IconContainer$1, {
|
|
504
|
+
$align: align,
|
|
505
|
+
$size: size,
|
|
506
|
+
$color: color,
|
|
507
|
+
children: clonedIcon
|
|
508
|
+
});
|
|
509
|
+
}
|
|
578
510
|
|
|
579
|
-
var _excluded$
|
|
511
|
+
var _excluded$k = ["color"],
|
|
580
512
|
_excluded2$3 = ["color"];
|
|
581
513
|
|
|
582
514
|
function TypographyIconSpecifiedColor(_ref) {
|
|
583
515
|
var color = _ref.color,
|
|
584
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
516
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
585
517
|
|
|
586
518
|
var theme = /*#__PURE__*/useTheme();
|
|
587
519
|
return /*#__PURE__*/jsx(Icon, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -609,7 +541,7 @@ function TypographyIcon(_ref2) {
|
|
|
609
541
|
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread({}, props));
|
|
610
542
|
}
|
|
611
543
|
|
|
612
|
-
var _excluded$
|
|
544
|
+
var _excluded$j = ["type", "variant", "isDisabled", "$isStretch", "icon", "children"];
|
|
613
545
|
|
|
614
546
|
var getTextColorByType = function (type, variant) {
|
|
615
547
|
switch (type) {
|
|
@@ -633,7 +565,7 @@ var getTextColorByType = function (type, variant) {
|
|
|
633
565
|
}
|
|
634
566
|
};
|
|
635
567
|
|
|
636
|
-
var StyledButtonText = /*#__PURE__*/styled(Typography.Text).withConfig({
|
|
568
|
+
var StyledButtonText = /*#__PURE__*/styled$1(Typography.Text).withConfig({
|
|
637
569
|
displayName: "ButtonContent__StyledButtonText",
|
|
638
570
|
componentId: "kitt-universal__sc-dnyw3n-0"
|
|
639
571
|
})(["text-align:center;", " ", ""], function () {
|
|
@@ -651,7 +583,7 @@ var StyledButtonText = /*#__PURE__*/styled(Typography.Text).withConfig({
|
|
|
651
583
|
if ($isDisabled || !isSubtle($type)) return undefined;
|
|
652
584
|
return 'color: inherit';
|
|
653
585
|
});
|
|
654
|
-
var StyledIconContainer$1 = /*#__PURE__*/styled(View$1).withConfig({
|
|
586
|
+
var StyledIconContainer$1 = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
655
587
|
displayName: "ButtonContent__StyledIconContainer",
|
|
656
588
|
componentId: "kitt-universal__sc-dnyw3n-1"
|
|
657
589
|
})(["", ""], function (_ref2) {
|
|
@@ -681,7 +613,7 @@ function ButtonIcon(_ref3) {
|
|
|
681
613
|
});
|
|
682
614
|
}
|
|
683
615
|
|
|
684
|
-
var StyledChildrenWithIcon = /*#__PURE__*/styled(View$1).withConfig({
|
|
616
|
+
var StyledChildrenWithIcon = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
685
617
|
displayName: "ButtonContent__StyledChildrenWithIcon",
|
|
686
618
|
componentId: "kitt-universal__sc-dnyw3n-2"
|
|
687
619
|
})(["align-items:center;justify-content:center;flex-direction:row;"]);
|
|
@@ -716,7 +648,7 @@ function ButtonContentChildren(_ref4) {
|
|
|
716
648
|
};
|
|
717
649
|
return /*#__PURE__*/jsxs(StyledChildrenWithIcon, {
|
|
718
650
|
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread(_objectSpread({}, buttonIconSharedProps), {}, {
|
|
719
|
-
testID: "button
|
|
651
|
+
testID: "button.ButtonContent.leftButtonIcon",
|
|
720
652
|
icon: icon
|
|
721
653
|
})) : null, /*#__PURE__*/jsx(StyledButtonText, {
|
|
722
654
|
base: "body",
|
|
@@ -731,7 +663,7 @@ function ButtonContentChildren(_ref4) {
|
|
|
731
663
|
})) : null]
|
|
732
664
|
});
|
|
733
665
|
}
|
|
734
|
-
var ButtonContentContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
666
|
+
var ButtonContentContainer = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
735
667
|
displayName: "ButtonContent__ButtonContentContainer",
|
|
736
668
|
componentId: "kitt-universal__sc-dnyw3n-3"
|
|
737
669
|
})(["line-height:16px;", " ", ";"], function (_ref5) {
|
|
@@ -751,7 +683,7 @@ function ButtonContent(_ref7) {
|
|
|
751
683
|
$isStretch = _ref7.$isStretch,
|
|
752
684
|
icon = _ref7.icon,
|
|
753
685
|
children = _ref7.children,
|
|
754
|
-
props = _objectWithoutProperties(_ref7, _excluded$
|
|
686
|
+
props = _objectWithoutProperties(_ref7, _excluded$j);
|
|
755
687
|
|
|
756
688
|
var color = isDisabled ? 'black-light' : getTextColorByType(type, variant);
|
|
757
689
|
return /*#__PURE__*/jsx(ButtonContentContainer, {
|
|
@@ -780,72 +712,326 @@ var getButtonSize = function (_ref) {
|
|
|
780
712
|
return size;
|
|
781
713
|
};
|
|
782
714
|
|
|
783
|
-
var Button = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
784
|
-
var children = _ref2.children,
|
|
785
|
-
_ref2$type = _ref2.type,
|
|
786
|
-
type = _ref2$type === void 0 ? 'default' : _ref2$type,
|
|
787
|
-
_ref2$variant = _ref2.variant,
|
|
788
|
-
variant = _ref2$variant === void 0 ? 'default' : _ref2$variant,
|
|
789
|
-
disabled = _ref2.disabled,
|
|
790
|
-
stretch = _ref2.stretch,
|
|
791
|
-
large = _ref2.large,
|
|
792
|
-
xLarge = _ref2.xLarge,
|
|
793
|
-
icon = _ref2.icon,
|
|
794
|
-
sizeProp = _ref2.size,
|
|
795
|
-
_ref2$iconPosition = _ref2.iconPosition,
|
|
796
|
-
iconPosition = _ref2$iconPosition === void 0 ? 'left' : _ref2$iconPosition,
|
|
797
|
-
testID = _ref2.testID,
|
|
798
|
-
href = _ref2.href,
|
|
799
|
-
hrefAttrs = _ref2.hrefAttrs,
|
|
800
|
-
_ref2$accessibilityRo = _ref2.accessibilityRole,
|
|
801
|
-
accessibilityRole = _ref2$accessibilityRo === void 0 ? 'button' : _ref2$accessibilityRo,
|
|
802
|
-
onPress = _ref2.onPress;
|
|
715
|
+
var Button = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
716
|
+
var children = _ref2.children,
|
|
717
|
+
_ref2$type = _ref2.type,
|
|
718
|
+
type = _ref2$type === void 0 ? 'default' : _ref2$type,
|
|
719
|
+
_ref2$variant = _ref2.variant,
|
|
720
|
+
variant = _ref2$variant === void 0 ? 'default' : _ref2$variant,
|
|
721
|
+
disabled = _ref2.disabled,
|
|
722
|
+
stretch = _ref2.stretch,
|
|
723
|
+
large = _ref2.large,
|
|
724
|
+
xLarge = _ref2.xLarge,
|
|
725
|
+
icon = _ref2.icon,
|
|
726
|
+
sizeProp = _ref2.size,
|
|
727
|
+
_ref2$iconPosition = _ref2.iconPosition,
|
|
728
|
+
iconPosition = _ref2$iconPosition === void 0 ? 'left' : _ref2$iconPosition,
|
|
729
|
+
testID = _ref2.testID,
|
|
730
|
+
href = _ref2.href,
|
|
731
|
+
hrefAttrs = _ref2.hrefAttrs,
|
|
732
|
+
_ref2$accessibilityRo = _ref2.accessibilityRole,
|
|
733
|
+
accessibilityRole = _ref2$accessibilityRo === void 0 ? 'button' : _ref2$accessibilityRo,
|
|
734
|
+
onPress = _ref2.onPress;
|
|
735
|
+
|
|
736
|
+
if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && !allowedGhostTypes.includes(type)) {
|
|
737
|
+
throw new Error('variant=ghost is only allowed with type=primary or default');
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
if (large || xLarge) {
|
|
741
|
+
var deprecatedProp = large ? 'large' : 'xLarge';
|
|
742
|
+
deprecatedInComponent('Button', "".concat(deprecatedProp, " prop"), 'size');
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
var size = getButtonSize({
|
|
746
|
+
large: large,
|
|
747
|
+
xLarge: xLarge,
|
|
748
|
+
size: sizeProp
|
|
749
|
+
});
|
|
750
|
+
return /*#__PURE__*/jsx(AnimatedButtonPressable, {
|
|
751
|
+
ref: ref,
|
|
752
|
+
accessibilityRole: accessibilityRole,
|
|
753
|
+
testID: testID,
|
|
754
|
+
href: href,
|
|
755
|
+
hrefAttrs: hrefAttrs,
|
|
756
|
+
disabled: disabled,
|
|
757
|
+
$isStretch: stretch,
|
|
758
|
+
$type: type,
|
|
759
|
+
$variant: variant,
|
|
760
|
+
onPress: onPress,
|
|
761
|
+
children: /*#__PURE__*/jsxs(BaseStyledButtonPressable, {
|
|
762
|
+
$type: type,
|
|
763
|
+
$variant: variant,
|
|
764
|
+
$isStretch: stretch,
|
|
765
|
+
$size: size,
|
|
766
|
+
$isDisabled: disabled,
|
|
767
|
+
children: [/*#__PURE__*/jsx(ButtonContent, {
|
|
768
|
+
type: type,
|
|
769
|
+
variant: variant,
|
|
770
|
+
$isStretch: stretch,
|
|
771
|
+
isDisabled: disabled,
|
|
772
|
+
icon: icon,
|
|
773
|
+
iconPosition: iconPosition,
|
|
774
|
+
children: children
|
|
775
|
+
}), null]
|
|
776
|
+
})
|
|
777
|
+
});
|
|
778
|
+
});
|
|
779
|
+
|
|
780
|
+
var StyledSpinningIconContainer = withTheme( /*#__PURE__*/styled("div")({
|
|
781
|
+
name: "StyledSpinningIconContainer",
|
|
782
|
+
"class": "kitt-u_StyledSpinningIconContainer_ssn8o83"
|
|
783
|
+
}));
|
|
784
|
+
function SpinningIcon(_ref) {
|
|
785
|
+
var icon = _ref.icon,
|
|
786
|
+
color = _ref.color;
|
|
787
|
+
var clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
788
|
+
color: color
|
|
789
|
+
});
|
|
790
|
+
return /*#__PURE__*/jsx(StyledSpinningIconContainer, {
|
|
791
|
+
children: clonedIcon
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
function LoaderIcon(_ref) {
|
|
796
|
+
var color = _ref.color;
|
|
797
|
+
return /*#__PURE__*/jsx(SpinningIcon, {
|
|
798
|
+
color: color,
|
|
799
|
+
icon: /*#__PURE__*/jsx(ArcIcon, {})
|
|
800
|
+
});
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
var View = View$2;
|
|
804
|
+
var ScrollView = ScrollView$1;
|
|
805
|
+
var Pressable = Pressable$2;
|
|
806
|
+
|
|
807
|
+
function matchWindowSize(_ref, _ref2) {
|
|
808
|
+
var width = _ref.width,
|
|
809
|
+
height = _ref.height;
|
|
810
|
+
var minWidth = _ref2.minWidth,
|
|
811
|
+
maxWidth = _ref2.maxWidth,
|
|
812
|
+
minHeight = _ref2.minHeight,
|
|
813
|
+
maxHeight = _ref2.maxHeight;
|
|
814
|
+
var hasWidthMatched = width ? (!minWidth || width >= minWidth) && (!maxWidth || width <= maxWidth) : true;
|
|
815
|
+
var hasHeightMatched = height ? (!minHeight || height >= minHeight) && (!maxHeight || height <= maxHeight) : true;
|
|
816
|
+
return hasWidthMatched && hasHeightMatched;
|
|
817
|
+
}
|
|
818
|
+
function useMatchWindowSize(options) {
|
|
819
|
+
var _useWindowDimensions = useWindowDimensions(),
|
|
820
|
+
width = _useWindowDimensions.width,
|
|
821
|
+
height = _useWindowDimensions.height;
|
|
822
|
+
|
|
823
|
+
return matchWindowSize({
|
|
824
|
+
width: width,
|
|
825
|
+
height: height
|
|
826
|
+
}, options);
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
var _excluded$i = ["as", "onPress", "disabled", "icon"];
|
|
830
|
+
function ActionsItem(_ref) {
|
|
831
|
+
var as = _ref.as,
|
|
832
|
+
onPress = _ref.onPress,
|
|
833
|
+
disabled = _ref.disabled,
|
|
834
|
+
icon = _ref.icon,
|
|
835
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
836
|
+
|
|
837
|
+
var isMedium = useMatchWindowSize({
|
|
838
|
+
minWidth: KittBreakpoints.MEDIUM
|
|
839
|
+
});
|
|
840
|
+
|
|
841
|
+
var _useState = useState(false),
|
|
842
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
843
|
+
isLoading = _useState2[0],
|
|
844
|
+
setIsLoading = _useState2[1];
|
|
845
|
+
|
|
846
|
+
var mountedRef = useRef(false); // effect just for tracking mounted state, as onPress can unmount the ActionButton
|
|
847
|
+
|
|
848
|
+
useEffect(function () {
|
|
849
|
+
mountedRef.current = true;
|
|
850
|
+
return function () {
|
|
851
|
+
mountedRef.current = false;
|
|
852
|
+
};
|
|
853
|
+
}, []);
|
|
854
|
+
return /*#__PURE__*/jsx(View, {
|
|
855
|
+
children: /*#__PURE__*/jsx(as, _objectSpread(_objectSpread({}, props), {}, {
|
|
856
|
+
stretch: !isMedium ? true : undefined,
|
|
857
|
+
disabled: isLoading ? true : disabled,
|
|
858
|
+
icon: isLoading ? /*#__PURE__*/jsx(LoaderIcon, {}) : icon,
|
|
859
|
+
onPress: function handlePress(e) {
|
|
860
|
+
var callPressAndUpdateLoadingState = /*#__PURE__*/function () {
|
|
861
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
862
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
863
|
+
while (1) {
|
|
864
|
+
switch (_context.prev = _context.next) {
|
|
865
|
+
case 0:
|
|
866
|
+
if (onPress) {
|
|
867
|
+
_context.next = 2;
|
|
868
|
+
break;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
return _context.abrupt("return");
|
|
872
|
+
|
|
873
|
+
case 2:
|
|
874
|
+
setIsLoading(true);
|
|
875
|
+
_context.prev = 3;
|
|
876
|
+
_context.next = 6;
|
|
877
|
+
return onPress(e);
|
|
878
|
+
|
|
879
|
+
case 6:
|
|
880
|
+
if (mountedRef.current) {
|
|
881
|
+
setIsLoading(false);
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
_context.next = 13;
|
|
885
|
+
break;
|
|
886
|
+
|
|
887
|
+
case 9:
|
|
888
|
+
_context.prev = 9;
|
|
889
|
+
_context.t0 = _context["catch"](3);
|
|
890
|
+
|
|
891
|
+
if (mountedRef.current) {
|
|
892
|
+
setIsLoading(false);
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
throw _context.t0;
|
|
896
|
+
|
|
897
|
+
case 13:
|
|
898
|
+
case "end":
|
|
899
|
+
return _context.stop();
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
}, _callee, null, [[3, 9]]);
|
|
903
|
+
}));
|
|
904
|
+
|
|
905
|
+
return function () {
|
|
906
|
+
return _ref2.apply(this, arguments);
|
|
907
|
+
};
|
|
908
|
+
}();
|
|
909
|
+
|
|
910
|
+
callPressAndUpdateLoadingState();
|
|
911
|
+
}
|
|
912
|
+
}))
|
|
913
|
+
});
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
function ActionsButton(_ref) {
|
|
917
|
+
var props = _extends({}, _ref);
|
|
918
|
+
|
|
919
|
+
return /*#__PURE__*/jsx(ActionsItem, _objectSpread({
|
|
920
|
+
as: Button
|
|
921
|
+
}, props));
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
var _excluded$h = ["children"];
|
|
925
|
+
function Actions(_ref) {
|
|
926
|
+
var children = _ref.children,
|
|
927
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
928
|
+
|
|
929
|
+
return /*#__PURE__*/jsx(Stack, _objectSpread(_objectSpread({
|
|
930
|
+
alignItems: {
|
|
931
|
+
base: 'stretch',
|
|
932
|
+
medium: 'center'
|
|
933
|
+
},
|
|
934
|
+
direction: {
|
|
935
|
+
base: 'column',
|
|
936
|
+
medium: 'row'
|
|
937
|
+
},
|
|
938
|
+
flex: 1
|
|
939
|
+
}, props), {}, {
|
|
940
|
+
space: "kitt.3",
|
|
941
|
+
children: children
|
|
942
|
+
}));
|
|
943
|
+
}
|
|
944
|
+
Actions.Button = ActionsButton;
|
|
945
|
+
Actions.Item = ActionsItem;
|
|
946
|
+
|
|
947
|
+
var _excluded$g = ["size", "round", "light", "sizeVariant"];
|
|
948
|
+
|
|
949
|
+
var getInitials = function (firstname, lastname) {
|
|
950
|
+
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
951
|
+
};
|
|
952
|
+
|
|
953
|
+
var StyledAvatarView = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
954
|
+
displayName: "Avatar__StyledAvatarView",
|
|
955
|
+
componentId: "kitt-universal__sc-9miubv-0"
|
|
956
|
+
})(["border-radius:", ";background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], function (_ref) {
|
|
957
|
+
var theme = _ref.theme,
|
|
958
|
+
$isRound = _ref.$isRound,
|
|
959
|
+
$size = _ref.$size,
|
|
960
|
+
$sizeVariant = _ref.$sizeVariant;
|
|
961
|
+
if ($isRound) return "".concat($size / 2, "px");
|
|
962
|
+
return "".concat($sizeVariant === 'large' ? theme.kitt.avatar.large.borderRadius : theme.kitt.avatar.borderRadius, "px");
|
|
963
|
+
}, function (_ref2) {
|
|
964
|
+
var theme = _ref2.theme,
|
|
965
|
+
$isLight = _ref2.$isLight;
|
|
966
|
+
return $isLight ? theme.kitt.avatar.light.backgroundColor : theme.kitt.avatar["default"].backgroundColor;
|
|
967
|
+
}, function (_ref3) {
|
|
968
|
+
var $size = _ref3.$size;
|
|
969
|
+
return $size;
|
|
970
|
+
}, function (_ref4) {
|
|
971
|
+
var $size = _ref4.$size;
|
|
972
|
+
return $size;
|
|
973
|
+
});
|
|
974
|
+
|
|
975
|
+
function AvatarContent(_ref5) {
|
|
976
|
+
var size = _ref5.size,
|
|
977
|
+
src = _ref5.src,
|
|
978
|
+
firstname = _ref5.firstname,
|
|
979
|
+
lastname = _ref5.lastname,
|
|
980
|
+
alt = _ref5.alt,
|
|
981
|
+
isLight = _ref5.isLight,
|
|
982
|
+
sizeVariant = _ref5.sizeVariant;
|
|
803
983
|
|
|
804
|
-
if (
|
|
805
|
-
|
|
984
|
+
if (src) {
|
|
985
|
+
return /*#__PURE__*/jsx(Image, {
|
|
986
|
+
source: {
|
|
987
|
+
uri: src
|
|
988
|
+
},
|
|
989
|
+
style: {
|
|
990
|
+
width: size,
|
|
991
|
+
height: size
|
|
992
|
+
},
|
|
993
|
+
accessibilityLabel: alt
|
|
994
|
+
});
|
|
806
995
|
}
|
|
807
996
|
|
|
808
|
-
if (
|
|
809
|
-
|
|
810
|
-
|
|
997
|
+
if (firstname && lastname) {
|
|
998
|
+
return /*#__PURE__*/jsx(Typography.Text, {
|
|
999
|
+
base: sizeVariant === 'large' ? 'body-large' : 'body-small',
|
|
1000
|
+
variant: sizeVariant === 'large' ? 'bold' : 'regular',
|
|
1001
|
+
color: isLight ? 'black' : 'white',
|
|
1002
|
+
children: getInitials(firstname, lastname)
|
|
1003
|
+
});
|
|
811
1004
|
}
|
|
812
1005
|
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
size:
|
|
1006
|
+
return /*#__PURE__*/jsx(Icon, {
|
|
1007
|
+
icon: /*#__PURE__*/jsx(UserIcon, {}),
|
|
1008
|
+
color: isLight ? 'black' : 'white',
|
|
1009
|
+
size: size / 2
|
|
817
1010
|
});
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
$isStretch: stretch,
|
|
839
|
-
isDisabled: disabled,
|
|
840
|
-
icon: icon,
|
|
841
|
-
iconPosition: iconPosition,
|
|
842
|
-
children: children
|
|
843
|
-
}), null]
|
|
844
|
-
})
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
function Avatar(_ref6) {
|
|
1014
|
+
var _ref6$size = _ref6.size,
|
|
1015
|
+
size = _ref6$size === void 0 ? 40 : _ref6$size,
|
|
1016
|
+
round = _ref6.round,
|
|
1017
|
+
light = _ref6.light,
|
|
1018
|
+
sizeVariant = _ref6.sizeVariant,
|
|
1019
|
+
props = _objectWithoutProperties(_ref6, _excluded$g);
|
|
1020
|
+
|
|
1021
|
+
return /*#__PURE__*/jsx(StyledAvatarView, {
|
|
1022
|
+
$size: size,
|
|
1023
|
+
$isRound: round,
|
|
1024
|
+
$isLight: light,
|
|
1025
|
+
$sizeVariant: sizeVariant,
|
|
1026
|
+
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread({
|
|
1027
|
+
size: size,
|
|
1028
|
+
isLight: light,
|
|
1029
|
+
sizeVariant: sizeVariant
|
|
1030
|
+
}, props))
|
|
845
1031
|
});
|
|
846
|
-
}
|
|
1032
|
+
}
|
|
847
1033
|
|
|
848
|
-
var Container$3 = /*#__PURE__*/styled(View$1).withConfig({
|
|
1034
|
+
var Container$3 = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
849
1035
|
displayName: "Card__Container",
|
|
850
1036
|
componentId: "kitt-universal__sc-1n9psug-0"
|
|
851
1037
|
})(["background-color:", ";padding:", "px;border-radius:", "px;border-width:", "px;border-color:", ";"], function (_ref) {
|
|
@@ -875,6 +1061,256 @@ function Card(_ref6) {
|
|
|
875
1061
|
});
|
|
876
1062
|
}
|
|
877
1063
|
|
|
1064
|
+
var useNativeAnimation = function () {
|
|
1065
|
+
return {
|
|
1066
|
+
onPressIn: function onPressIn() {},
|
|
1067
|
+
onPressOut: function onPressOut() {},
|
|
1068
|
+
backgroundStyles: undefined
|
|
1069
|
+
};
|
|
1070
|
+
};
|
|
1071
|
+
|
|
1072
|
+
function getCurrentTextColor(_ref) {
|
|
1073
|
+
var isDisabled = _ref.isDisabled,
|
|
1074
|
+
isSelected = _ref.isSelected,
|
|
1075
|
+
isPressed = _ref.isPressed,
|
|
1076
|
+
isHovered = _ref.isHovered;
|
|
1077
|
+
if (isDisabled) return 'black-light';
|
|
1078
|
+
if (isSelected && isHovered) return 'white';
|
|
1079
|
+
if (isSelected || isPressed) return 'white';
|
|
1080
|
+
return 'black';
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
function getBorderRadius(defaultRadius, variant) {
|
|
1084
|
+
// The clean way to have the rounded effect would have been to know the children height since radius >= height * 0.5
|
|
1085
|
+
// We don't control over the height of the rendered children we just go with a arbitrary really high value
|
|
1086
|
+
if (variant === 'rounded') return 800;
|
|
1087
|
+
return defaultRadius;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
var DisabledBorder = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
1091
|
+
displayName: "ChoiceItem__DisabledBorder",
|
|
1092
|
+
componentId: "kitt-universal__sc-wuv3y6-0"
|
|
1093
|
+
})(["border-radius:", "px;", ";"], function (_ref2) {
|
|
1094
|
+
var theme = _ref2.theme,
|
|
1095
|
+
$variant = _ref2.$variant;
|
|
1096
|
+
return getBorderRadius(theme.kitt.choices.item.borderRadius, $variant);
|
|
1097
|
+
}, function (_ref3) {
|
|
1098
|
+
var theme = _ref3.theme;
|
|
1099
|
+
var _theme$kitt$choices$i = theme.kitt.choices.item.disabled.border,
|
|
1100
|
+
width = _theme$kitt$choices$i.width,
|
|
1101
|
+
color = _theme$kitt$choices$i.color;
|
|
1102
|
+
return css(["border:", "px solid ", ";"], width, color);
|
|
1103
|
+
});
|
|
1104
|
+
var ChoiceItemView = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
1105
|
+
displayName: "ChoiceItem__ChoiceItemView",
|
|
1106
|
+
componentId: "kitt-universal__sc-wuv3y6-1"
|
|
1107
|
+
})(["position:relative;border-radius:", "px;background-color:", ";", ";", ""], function (_ref4) {
|
|
1108
|
+
var theme = _ref4.theme,
|
|
1109
|
+
$variant = _ref4.$variant;
|
|
1110
|
+
return getBorderRadius(theme.kitt.choices.item.borderRadius, $variant);
|
|
1111
|
+
}, function (_ref5) {
|
|
1112
|
+
var theme = _ref5.theme,
|
|
1113
|
+
$isHovered = _ref5.$isHovered,
|
|
1114
|
+
$isPressed = _ref5.$isPressed,
|
|
1115
|
+
$isDisabled = _ref5.$isDisabled,
|
|
1116
|
+
$isSelected = _ref5.$isSelected;
|
|
1117
|
+
var _theme$kitt$choices$i2 = theme.kitt.choices.item.backgroundColor,
|
|
1118
|
+
hoverWhenSelected = _theme$kitt$choices$i2.hoverWhenSelected,
|
|
1119
|
+
hover = _theme$kitt$choices$i2.hover,
|
|
1120
|
+
disabled = _theme$kitt$choices$i2.disabled,
|
|
1121
|
+
selected = _theme$kitt$choices$i2.selected,
|
|
1122
|
+
pressed = _theme$kitt$choices$i2.pressed,
|
|
1123
|
+
defaultBackground = _theme$kitt$choices$i2["default"];
|
|
1124
|
+
if ($isDisabled) return disabled;
|
|
1125
|
+
if ($isSelected && $isHovered) return hoverWhenSelected;
|
|
1126
|
+
if ($isPressed) return pressed;
|
|
1127
|
+
if ($isHovered) return hover;
|
|
1128
|
+
if ($isSelected) return selected;
|
|
1129
|
+
return defaultBackground;
|
|
1130
|
+
}, function (_ref6) {
|
|
1131
|
+
var theme = _ref6.theme;
|
|
1132
|
+
var _theme$kitt$choices$i3 = theme.kitt.choices.item.padding,
|
|
1133
|
+
base = _theme$kitt$choices$i3.base,
|
|
1134
|
+
small = _theme$kitt$choices$i3.small;
|
|
1135
|
+
return theme.responsive.ifWindowSizeMatches({
|
|
1136
|
+
minWidth: KittBreakpoints.SMALL
|
|
1137
|
+
}, css(["padding:", "px;"], small), css(["padding:", "px;"], base));
|
|
1138
|
+
}, function (_ref7) {
|
|
1139
|
+
var theme = _ref7.theme;
|
|
1140
|
+
var _theme$kitt$choices$i4 = theme.kitt.choices.item.transition,
|
|
1141
|
+
property = _theme$kitt$choices$i4.property,
|
|
1142
|
+
duration = _theme$kitt$choices$i4.duration,
|
|
1143
|
+
timingFunction = _theme$kitt$choices$i4.timingFunction;
|
|
1144
|
+
return css(["transition:", " ", "ms ", ";"], property, duration, timingFunction);
|
|
1145
|
+
});
|
|
1146
|
+
function ChoiceItem(_ref8) {
|
|
1147
|
+
var _ref8$type = _ref8.type,
|
|
1148
|
+
type = _ref8$type === void 0 ? 'button' : _ref8$type,
|
|
1149
|
+
value = _ref8.value,
|
|
1150
|
+
selected = _ref8.selected,
|
|
1151
|
+
disabled = _ref8.disabled,
|
|
1152
|
+
variant = _ref8.variant,
|
|
1153
|
+
_children = _ref8.children,
|
|
1154
|
+
isPressedInternal = _ref8.isPressedInternal,
|
|
1155
|
+
isHoveredInternal = _ref8.isHoveredInternal,
|
|
1156
|
+
onPress = _ref8.onPress,
|
|
1157
|
+
onChange = _ref8.onChange,
|
|
1158
|
+
onBlur = _ref8.onBlur,
|
|
1159
|
+
onFocus = _ref8.onFocus;
|
|
1160
|
+
|
|
1161
|
+
var _useNativeAnimation = useNativeAnimation(),
|
|
1162
|
+
onPressIn = _useNativeAnimation.onPressIn,
|
|
1163
|
+
onPressOut = _useNativeAnimation.onPressOut;
|
|
1164
|
+
|
|
1165
|
+
var handleChange = function () {
|
|
1166
|
+
if (!onChange) return; // Checkbox can be toggled
|
|
1167
|
+
|
|
1168
|
+
if (type === 'checkbox') {
|
|
1169
|
+
onChange(selected ? undefined : value);
|
|
1170
|
+
return;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
onChange(value);
|
|
1174
|
+
};
|
|
1175
|
+
|
|
1176
|
+
return /*#__PURE__*/jsx(Pressable, {
|
|
1177
|
+
disabled: disabled,
|
|
1178
|
+
accessibilityRole: type,
|
|
1179
|
+
accessibilityState: {
|
|
1180
|
+
checked: selected
|
|
1181
|
+
},
|
|
1182
|
+
onBlur: onBlur,
|
|
1183
|
+
onFocus: onFocus,
|
|
1184
|
+
onPress: function handlePress(e) {
|
|
1185
|
+
if (onFocus) onFocus(e);
|
|
1186
|
+
if (onPress) onPress();
|
|
1187
|
+
handleChange();
|
|
1188
|
+
if (onBlur) onBlur(e);
|
|
1189
|
+
},
|
|
1190
|
+
onPressIn: onPressIn,
|
|
1191
|
+
onPressOut: onPressOut,
|
|
1192
|
+
children: function children(_ref9) {
|
|
1193
|
+
var isHovered = _ref9.isHovered,
|
|
1194
|
+
isPressed = _ref9.isPressed;
|
|
1195
|
+
return /*#__PURE__*/jsxs(ChoiceItemView, {
|
|
1196
|
+
style: undefined,
|
|
1197
|
+
$isHovered: isHovered || isHoveredInternal,
|
|
1198
|
+
$isDisabled: disabled,
|
|
1199
|
+
$isSelected: selected,
|
|
1200
|
+
$isPressed: isPressed || isPressedInternal,
|
|
1201
|
+
$variant: variant,
|
|
1202
|
+
children: [/*#__PURE__*/jsx(Typography.SetDefaultColor, {
|
|
1203
|
+
value: getCurrentTextColor({
|
|
1204
|
+
isDisabled: disabled,
|
|
1205
|
+
isSelected: selected || isPressedInternal,
|
|
1206
|
+
isPressed: isPressed,
|
|
1207
|
+
isHovered: isHovered || isHoveredInternal
|
|
1208
|
+
}),
|
|
1209
|
+
children: _children
|
|
1210
|
+
}), disabled ? /*#__PURE__*/jsx(DisabledBorder, {
|
|
1211
|
+
$variant: variant,
|
|
1212
|
+
style: StyleSheet.absoluteFillObject
|
|
1213
|
+
}) : null]
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
var ChoiceItemContainer = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
1220
|
+
displayName: "ChoiceItemContainer",
|
|
1221
|
+
componentId: "kitt-universal__sc-17uuimx-0"
|
|
1222
|
+
})(["", ""], function (_ref) {
|
|
1223
|
+
var theme = _ref.theme,
|
|
1224
|
+
$isLast = _ref.$isLast,
|
|
1225
|
+
$direction = _ref.$direction;
|
|
1226
|
+
var _theme$kitt$choices$s = theme.kitt.choices.spacing,
|
|
1227
|
+
row = _theme$kitt$choices$s.row,
|
|
1228
|
+
column = _theme$kitt$choices$s.column;
|
|
1229
|
+
|
|
1230
|
+
if ($direction === 'row') {
|
|
1231
|
+
return css(["margin-right:", "px;"], $isLast ? 0 : row);
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
return css(["margin-bottom:", "px;"], $isLast ? 0 : column);
|
|
1235
|
+
});
|
|
1236
|
+
|
|
1237
|
+
var _excluded$f = ["direction"];
|
|
1238
|
+
|
|
1239
|
+
function ChoicesContainer(_ref) {
|
|
1240
|
+
var direction = _ref.direction,
|
|
1241
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
1242
|
+
|
|
1243
|
+
if (direction === 'row') {
|
|
1244
|
+
return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
|
|
1245
|
+
horizontal: true
|
|
1246
|
+
}, props));
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
return /*#__PURE__*/jsx(View$1, _objectSpread({}, props));
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
function Choices(_ref2) {
|
|
1253
|
+
var id = _ref2.id,
|
|
1254
|
+
testID = _ref2.testID,
|
|
1255
|
+
type = _ref2.type,
|
|
1256
|
+
_ref2$direction = _ref2.direction,
|
|
1257
|
+
direction = _ref2$direction === void 0 ? 'column' : _ref2$direction,
|
|
1258
|
+
disabled = _ref2.disabled,
|
|
1259
|
+
children = _ref2.children,
|
|
1260
|
+
value = _ref2.value,
|
|
1261
|
+
variant = _ref2.variant,
|
|
1262
|
+
onPress = _ref2.onPress,
|
|
1263
|
+
onChange = _ref2.onChange,
|
|
1264
|
+
onFocus = _ref2.onFocus,
|
|
1265
|
+
onBlur = _ref2.onBlur;
|
|
1266
|
+
|
|
1267
|
+
var _useState = useState(value),
|
|
1268
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1269
|
+
currentValue = _useState2[0],
|
|
1270
|
+
setCurrentValue = _useState2[1];
|
|
1271
|
+
|
|
1272
|
+
var isForm = type && ['radio', 'checkbox'].includes(type);
|
|
1273
|
+
var childrenArray = Children.toArray(children);
|
|
1274
|
+
var sharedProps = {
|
|
1275
|
+
type: type,
|
|
1276
|
+
disabled: disabled,
|
|
1277
|
+
variant: variant,
|
|
1278
|
+
onPress: !isForm ? onPress : undefined,
|
|
1279
|
+
onChange: isForm ? function handleChange(newValue) {
|
|
1280
|
+
setCurrentValue(newValue);
|
|
1281
|
+
if (onChange) onChange(newValue);
|
|
1282
|
+
} : undefined,
|
|
1283
|
+
onFocus: onFocus,
|
|
1284
|
+
onBlur: onBlur
|
|
1285
|
+
};
|
|
1286
|
+
return /*#__PURE__*/jsx(ChoicesContainer, {
|
|
1287
|
+
direction: direction,
|
|
1288
|
+
testID: testID,
|
|
1289
|
+
nativeID: id,
|
|
1290
|
+
children: childrenArray.map(function (child, index) {
|
|
1291
|
+
var element = /*#__PURE__*/cloneElement(child, _objectSpread({
|
|
1292
|
+
selected: isForm ? child.props.value === currentValue : undefined
|
|
1293
|
+
}, sharedProps));
|
|
1294
|
+
return /*#__PURE__*/jsx(ChoiceItemContainer, {
|
|
1295
|
+
$direction: direction,
|
|
1296
|
+
$isLast: index === childrenArray.length - 1,
|
|
1297
|
+
children: element
|
|
1298
|
+
}, child.key);
|
|
1299
|
+
})
|
|
1300
|
+
});
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
Choices.Item = ChoiceItem;
|
|
1304
|
+
function createChoicesComponent() {
|
|
1305
|
+
return Choices;
|
|
1306
|
+
}
|
|
1307
|
+
var ButtonChoices = createChoicesComponent();
|
|
1308
|
+
Choices.ButtonChoices = ButtonChoices;
|
|
1309
|
+
var ChoicesElements = {
|
|
1310
|
+
Item: ChoiceItem,
|
|
1311
|
+
ButtonChoices: ButtonChoices
|
|
1312
|
+
};
|
|
1313
|
+
|
|
878
1314
|
function Emoji(_ref) {
|
|
879
1315
|
var emoji = _ref.emoji,
|
|
880
1316
|
size = _ref.size,
|
|
@@ -1236,6 +1672,39 @@ var card = {
|
|
|
1236
1672
|
}
|
|
1237
1673
|
};
|
|
1238
1674
|
|
|
1675
|
+
var choices = {
|
|
1676
|
+
spacing: {
|
|
1677
|
+
row: 12,
|
|
1678
|
+
column: 12
|
|
1679
|
+
},
|
|
1680
|
+
item: {
|
|
1681
|
+
borderRadius: 10,
|
|
1682
|
+
padding: {
|
|
1683
|
+
base: 16,
|
|
1684
|
+
small: 24
|
|
1685
|
+
},
|
|
1686
|
+
backgroundColor: {
|
|
1687
|
+
"default": lateOceanColorPalette.black50,
|
|
1688
|
+
disabled: colors.disabled,
|
|
1689
|
+
selected: colors.primary,
|
|
1690
|
+
pressed: lateOceanColorPalette.lateOceanLight1,
|
|
1691
|
+
hover: lateOceanColorPalette.black100,
|
|
1692
|
+
hoverWhenSelected: lateOceanColorPalette.lateOceanLight1
|
|
1693
|
+
},
|
|
1694
|
+
disabled: {
|
|
1695
|
+
border: {
|
|
1696
|
+
width: 2,
|
|
1697
|
+
color: lateOceanColorPalette.black100
|
|
1698
|
+
}
|
|
1699
|
+
},
|
|
1700
|
+
transition: {
|
|
1701
|
+
property: 'all',
|
|
1702
|
+
duration: 300,
|
|
1703
|
+
timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
};
|
|
1707
|
+
|
|
1239
1708
|
var feedbackMessage = {
|
|
1240
1709
|
danger: {
|
|
1241
1710
|
backgroundColor: colors.danger
|
|
@@ -1411,8 +1880,14 @@ var input = {
|
|
|
1411
1880
|
};
|
|
1412
1881
|
|
|
1413
1882
|
var inputField = {
|
|
1883
|
+
containerPaddingTop: 5,
|
|
1884
|
+
containerPaddingBottom: 10,
|
|
1885
|
+
feedbackPaddingTop: {
|
|
1886
|
+
base: 5,
|
|
1887
|
+
small: 10
|
|
1888
|
+
},
|
|
1414
1889
|
labelContainerPaddingBottom: 5,
|
|
1415
|
-
|
|
1890
|
+
labelFeedbackMarginLeft: 6
|
|
1416
1891
|
};
|
|
1417
1892
|
|
|
1418
1893
|
var inputTag = {
|
|
@@ -1653,6 +2128,7 @@ var theme = {
|
|
|
1653
2128
|
breakpoints: breakpoints,
|
|
1654
2129
|
button: button,
|
|
1655
2130
|
card: card,
|
|
2131
|
+
choices: choices,
|
|
1656
2132
|
feedbackMessage: feedbackMessage,
|
|
1657
2133
|
forms: forms,
|
|
1658
2134
|
fullScreenModal: fullScreenModal,
|
|
@@ -1668,28 +2144,6 @@ var theme = {
|
|
|
1668
2144
|
navigationModal: navigationModal
|
|
1669
2145
|
};
|
|
1670
2146
|
|
|
1671
|
-
function matchWindowSize(_ref, _ref2) {
|
|
1672
|
-
var width = _ref.width,
|
|
1673
|
-
height = _ref.height;
|
|
1674
|
-
var minWidth = _ref2.minWidth,
|
|
1675
|
-
maxWidth = _ref2.maxWidth,
|
|
1676
|
-
minHeight = _ref2.minHeight,
|
|
1677
|
-
maxHeight = _ref2.maxHeight;
|
|
1678
|
-
var hasWidthMatched = width ? (!minWidth || width >= minWidth) && (!maxWidth || width <= maxWidth) : true;
|
|
1679
|
-
var hasHeightMatched = height ? (!minHeight || height >= minHeight) && (!maxHeight || height <= maxHeight) : true;
|
|
1680
|
-
return hasWidthMatched && hasHeightMatched;
|
|
1681
|
-
}
|
|
1682
|
-
function useMatchWindowSize(options) {
|
|
1683
|
-
var _useWindowDimensions = useWindowDimensions(),
|
|
1684
|
-
width = _useWindowDimensions.width,
|
|
1685
|
-
height = _useWindowDimensions.height;
|
|
1686
|
-
|
|
1687
|
-
return matchWindowSize({
|
|
1688
|
-
width: width,
|
|
1689
|
-
height: height
|
|
1690
|
-
}, options);
|
|
1691
|
-
}
|
|
1692
|
-
|
|
1693
2147
|
function createWindowSizeHelper(dimensions) {
|
|
1694
2148
|
return {
|
|
1695
2149
|
matchWindowSize: function matchWindowSize$1(options) {
|
|
@@ -1741,11 +2195,11 @@ function useKittTheme() {
|
|
|
1741
2195
|
}, [dimensions]);
|
|
1742
2196
|
}
|
|
1743
2197
|
|
|
1744
|
-
var CheckboxAndLabelPressableWrapper = /*#__PURE__*/styled(Pressable$1).withConfig({
|
|
2198
|
+
var CheckboxAndLabelPressableWrapper = /*#__PURE__*/styled$1(Pressable$1).withConfig({
|
|
1745
2199
|
displayName: "Checkbox__CheckboxAndLabelPressableWrapper",
|
|
1746
2200
|
componentId: "kitt-universal__sc-1sav1n6-0"
|
|
1747
2201
|
})(["display:flex;flex-direction:row;"]);
|
|
1748
|
-
var CheckboxContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
2202
|
+
var CheckboxContainer = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
1749
2203
|
displayName: "Checkbox__CheckboxContainer",
|
|
1750
2204
|
componentId: "kitt-universal__sc-1sav1n6-1"
|
|
1751
2205
|
})(["display:flex;flex-direction:row;align-items:center;justify-content:center;height:", "px;width:", "px;position:relative;border-radius:", "px;", " margin-right:", ";"], function (_ref) {
|
|
@@ -1850,11 +2304,11 @@ var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width
|
|
|
1850
2304
|
return theme.kitt.typography.types.bodies.fontFamily.regular;
|
|
1851
2305
|
});
|
|
1852
2306
|
|
|
1853
|
-
var StyledTypographyText = /*#__PURE__*/styled(Typography.Text).withConfig({
|
|
2307
|
+
var StyledTypographyText = /*#__PURE__*/styled$1(Typography.Text).withConfig({
|
|
1854
2308
|
displayName: "DatePickerInputPart__StyledTypographyText",
|
|
1855
2309
|
componentId: "kitt-universal__sc-11fmlmi-0"
|
|
1856
2310
|
})(["text-align:center;"]);
|
|
1857
|
-
var ViewInput = /*#__PURE__*/styled(View$1).withConfig({
|
|
2311
|
+
var ViewInput = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
1858
2312
|
displayName: "DatePickerInputPart__ViewInput",
|
|
1859
2313
|
componentId: "kitt-universal__sc-11fmlmi-1"
|
|
1860
2314
|
})(["", " padding:", ";min-height:", "px;min-width:", ";"], styledTextInputMixin, function (_ref) {
|
|
@@ -1893,7 +2347,7 @@ function prefixWithZero(value) {
|
|
|
1893
2347
|
return "".concat(value).padStart(2, '0');
|
|
1894
2348
|
}
|
|
1895
2349
|
|
|
1896
|
-
var PartContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
2350
|
+
var PartContainer = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
1897
2351
|
displayName: "DatePickerInputs__PartContainer",
|
|
1898
2352
|
componentId: "kitt-universal__sc-j9hin5-0"
|
|
1899
2353
|
})(["margin-right:", ";", ";"], function (_ref) {
|
|
@@ -1904,7 +2358,7 @@ var PartContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
|
1904
2358
|
var $isStretch = _ref2.$isStretch;
|
|
1905
2359
|
return $isStretch ? css(["flex:0.33;flex-grow:1;"]) : undefined;
|
|
1906
2360
|
});
|
|
1907
|
-
var DatePickerPressable = /*#__PURE__*/styled(Pressable$1).withConfig({
|
|
2361
|
+
var DatePickerPressable = /*#__PURE__*/styled$1(Pressable$1).withConfig({
|
|
1908
2362
|
displayName: "DatePickerInputs__DatePickerPressable",
|
|
1909
2363
|
componentId: "kitt-universal__sc-j9hin5-1"
|
|
1910
2364
|
})(["display:flex;flex-direction:row;", ";"], function (_ref3) {
|
|
@@ -1982,7 +2436,7 @@ function DatePicker(_ref) {
|
|
|
1982
2436
|
}, props));
|
|
1983
2437
|
}
|
|
1984
2438
|
|
|
1985
|
-
var InputTextContainer = withTheme( /*#__PURE__*/styled
|
|
2439
|
+
var InputTextContainer = withTheme( /*#__PURE__*/styled("div")({
|
|
1986
2440
|
name: "InputTextContainer",
|
|
1987
2441
|
"class": "kitt-u_InputTextContainer_i1encr9g",
|
|
1988
2442
|
vars: {
|
|
@@ -2014,7 +2468,7 @@ var InputTextContainer = withTheme( /*#__PURE__*/styled$1("div")({
|
|
|
2014
2468
|
}));
|
|
2015
2469
|
|
|
2016
2470
|
var _excluded$b = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "keyboardType", "multiline", "onSubmitEditing", "onFocus", "onBlur"];
|
|
2017
|
-
var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
|
|
2471
|
+
var StyledTextInput = /*#__PURE__*/styled$1(TextInput).withConfig({
|
|
2018
2472
|
displayName: "InputText__StyledTextInput",
|
|
2019
2473
|
componentId: "kitt-universal__sc-uke279-0"
|
|
2020
2474
|
})(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
|
|
@@ -2033,7 +2487,7 @@ var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
|
|
|
2033
2487
|
$minHeight = _ref3$$minHeight === void 0 ? theme.kitt.forms.input.minHeight : _ref3$$minHeight;
|
|
2034
2488
|
return $minHeight;
|
|
2035
2489
|
});
|
|
2036
|
-
var RightInputContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
2490
|
+
var RightInputContainer = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2037
2491
|
displayName: "InputText__RightInputContainer",
|
|
2038
2492
|
componentId: "kitt-universal__sc-uke279-1"
|
|
2039
2493
|
})(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:10px;"]);
|
|
@@ -2136,44 +2590,25 @@ function InputFeedback(_ref) {
|
|
|
2136
2590
|
});
|
|
2137
2591
|
}
|
|
2138
2592
|
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
componentId: "kitt-universal__sc-13fkixs-2"
|
|
2155
|
-
})(["flex-direction:row;align-items:center;padding-bottom:", "px;"], function (_ref2) {
|
|
2156
|
-
var theme = _ref2.theme;
|
|
2157
|
-
return theme.kitt.forms.inputField.labelContainerPaddingBottom;
|
|
2158
|
-
});
|
|
2159
|
-
var LabelContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
2160
|
-
displayName: "InputField__LabelContainer",
|
|
2161
|
-
componentId: "kitt-universal__sc-13fkixs-3"
|
|
2162
|
-
})(["margin-right:", "px;"], function (_ref3) {
|
|
2163
|
-
var theme = _ref3.theme;
|
|
2164
|
-
return theme.kitt.forms.inputField.iconMarginLeft;
|
|
2165
|
-
});
|
|
2166
|
-
function InputField(_ref4) {
|
|
2167
|
-
var label = _ref4.label,
|
|
2168
|
-
labelFeedback = _ref4.labelFeedback,
|
|
2169
|
-
input = _ref4.input,
|
|
2170
|
-
feedback = _ref4.feedback;
|
|
2171
|
-
return /*#__PURE__*/jsxs(FieldContainer, {
|
|
2172
|
-
children: [label ? /*#__PURE__*/jsxs(FieldLabelContainer, {
|
|
2173
|
-
children: [/*#__PURE__*/jsx(LabelContainer, {
|
|
2593
|
+
function InputField(_ref) {
|
|
2594
|
+
var label = _ref.label,
|
|
2595
|
+
labelFeedback = _ref.labelFeedback,
|
|
2596
|
+
input = _ref.input,
|
|
2597
|
+
feedback = _ref.feedback;
|
|
2598
|
+
var theme = /*#__PURE__*/useTheme();
|
|
2599
|
+
return /*#__PURE__*/jsxs(View, {
|
|
2600
|
+
paddingTop: theme.kitt.forms.inputField.containerPaddingTop,
|
|
2601
|
+
paddingBottom: theme.kitt.forms.inputField.containerPaddingBottom,
|
|
2602
|
+
children: [label ? /*#__PURE__*/jsxs(View, {
|
|
2603
|
+
flexDirection: "row",
|
|
2604
|
+
alignItems: "center",
|
|
2605
|
+
paddingBottom: theme.kitt.forms.inputField.labelContainerPaddingBottom,
|
|
2606
|
+
children: [/*#__PURE__*/jsx(View, {
|
|
2607
|
+
marginRight: theme.kitt.forms.inputField.labelFeedbackMarginLeft,
|
|
2174
2608
|
children: label
|
|
2175
2609
|
}), labelFeedback]
|
|
2176
|
-
}) : null, input, feedback ? /*#__PURE__*/jsx(
|
|
2610
|
+
}) : null, input, feedback ? /*#__PURE__*/jsx(View, {
|
|
2611
|
+
paddingTop: theme.kitt.forms.inputField.feedbackPaddingTop,
|
|
2177
2612
|
children: feedback
|
|
2178
2613
|
}) : null]
|
|
2179
2614
|
});
|
|
@@ -2256,7 +2691,7 @@ var getTypographyColor = function (type) {
|
|
|
2256
2691
|
return type ? 'white' : 'black';
|
|
2257
2692
|
};
|
|
2258
2693
|
|
|
2259
|
-
var InputTagContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
2694
|
+
var InputTagContainer = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2260
2695
|
displayName: "InputTag__InputTagContainer",
|
|
2261
2696
|
componentId: "kitt-universal__sc-1511dsf-0"
|
|
2262
2697
|
})(["align-items:center;justify-content:center;flex-direction:row;align-self:flex-start;overflow:hidden;padding-horizontal:", "px;background-color:", ";border-radius:", "px;"], function (_ref) {
|
|
@@ -2279,7 +2714,7 @@ var InputTagContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
|
2279
2714
|
var theme = _ref3.theme;
|
|
2280
2715
|
return theme.kitt.forms.inputTag.borderRadius;
|
|
2281
2716
|
});
|
|
2282
|
-
var IconContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
2717
|
+
var IconContainer = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2283
2718
|
displayName: "InputTag__IconContainer",
|
|
2284
2719
|
componentId: "kitt-universal__sc-1511dsf-1"
|
|
2285
2720
|
})(["margin-right:", "px;"], function (_ref4) {
|
|
@@ -2320,7 +2755,7 @@ function Label(_ref) {
|
|
|
2320
2755
|
});
|
|
2321
2756
|
}
|
|
2322
2757
|
|
|
2323
|
-
var OuterRadio = /*#__PURE__*/styled(View$1).withConfig({
|
|
2758
|
+
var OuterRadio = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2324
2759
|
displayName: "Radio__OuterRadio",
|
|
2325
2760
|
componentId: "kitt-universal__sc-1mdgr2o-0"
|
|
2326
2761
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;border-width:", "px;border-color:", ";"], function (_ref) {
|
|
@@ -2344,7 +2779,7 @@ var OuterRadio = /*#__PURE__*/styled(View$1).withConfig({
|
|
|
2344
2779
|
disabled = _ref6.disabled;
|
|
2345
2780
|
return theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].borderColor;
|
|
2346
2781
|
});
|
|
2347
|
-
var SelectedOuterRadio = /*#__PURE__*/styled(View$1).withConfig({
|
|
2782
|
+
var SelectedOuterRadio = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2348
2783
|
displayName: "Radio__SelectedOuterRadio",
|
|
2349
2784
|
componentId: "kitt-universal__sc-1mdgr2o-1"
|
|
2350
2785
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;justify-content:center;align-items:center;"], function (_ref7) {
|
|
@@ -2360,7 +2795,7 @@ var SelectedOuterRadio = /*#__PURE__*/styled(View$1).withConfig({
|
|
|
2360
2795
|
var theme = _ref10.theme;
|
|
2361
2796
|
return theme.kitt.forms.radio.size / 2;
|
|
2362
2797
|
});
|
|
2363
|
-
var SelectedInnerRadio = /*#__PURE__*/styled(View$1).withConfig({
|
|
2798
|
+
var SelectedInnerRadio = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2364
2799
|
displayName: "Radio__SelectedInnerRadio",
|
|
2365
2800
|
componentId: "kitt-universal__sc-1mdgr2o-2"
|
|
2366
2801
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;"], function (_ref11) {
|
|
@@ -2376,11 +2811,11 @@ var SelectedInnerRadio = /*#__PURE__*/styled(View$1).withConfig({
|
|
|
2376
2811
|
var theme = _ref14.theme;
|
|
2377
2812
|
return theme.kitt.forms.radio.checked.innerSize / 2;
|
|
2378
2813
|
});
|
|
2379
|
-
var Container$2 = /*#__PURE__*/styled(Pressable$1).withConfig({
|
|
2814
|
+
var Container$2 = /*#__PURE__*/styled$1(Pressable$1).withConfig({
|
|
2380
2815
|
displayName: "Radio__Container",
|
|
2381
2816
|
componentId: "kitt-universal__sc-1mdgr2o-3"
|
|
2382
2817
|
})(["flex-direction:row;align-items:center;"]);
|
|
2383
|
-
var Text = /*#__PURE__*/styled(Typography.Text).withConfig({
|
|
2818
|
+
var Text = /*#__PURE__*/styled$1(Typography.Text).withConfig({
|
|
2384
2819
|
displayName: "Radio__Text",
|
|
2385
2820
|
componentId: "kitt-universal__sc-1mdgr2o-4"
|
|
2386
2821
|
})(["margin-left:", "px;"], function (_ref15) {
|
|
@@ -2427,7 +2862,7 @@ function TextArea(_ref) {
|
|
|
2427
2862
|
}, props));
|
|
2428
2863
|
}
|
|
2429
2864
|
|
|
2430
|
-
var Body$1 = /*#__PURE__*/styled(View$1).withConfig({
|
|
2865
|
+
var Body$1 = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2431
2866
|
displayName: "Body",
|
|
2432
2867
|
componentId: "kitt-universal__sc-1ofncfn-0"
|
|
2433
2868
|
})(["", " background-color:", ";flex:1;"], function (_ref) {
|
|
@@ -2446,7 +2881,7 @@ function FullScreenModalBody(_ref3) {
|
|
|
2446
2881
|
});
|
|
2447
2882
|
}
|
|
2448
2883
|
|
|
2449
|
-
var SideContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
2884
|
+
var SideContainer = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2450
2885
|
displayName: "Header__SideContainer",
|
|
2451
2886
|
componentId: "kitt-universal__sc-dfmxi1-0"
|
|
2452
2887
|
})(["", ""], function (_ref) {
|
|
@@ -2466,7 +2901,7 @@ function getHeaderHorizontalMediumPadding(spacing) {
|
|
|
2466
2901
|
return spacing * 6;
|
|
2467
2902
|
}
|
|
2468
2903
|
|
|
2469
|
-
var Header$1 = /*#__PURE__*/styled(View$1).withConfig({
|
|
2904
|
+
var Header$1 = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2470
2905
|
displayName: "Header",
|
|
2471
2906
|
componentId: "kitt-universal__sc-dfmxi1-1"
|
|
2472
2907
|
})(["", ";border-bottom-color:", ";border-bottom-width:1px;flex-direction:row;align-items:center;"], function (_ref2) {
|
|
@@ -2484,7 +2919,7 @@ var Header$1 = /*#__PURE__*/styled(View$1).withConfig({
|
|
|
2484
2919
|
var theme = _ref3.theme;
|
|
2485
2920
|
return theme.kitt.fullScreenModal.header.borderColor;
|
|
2486
2921
|
});
|
|
2487
|
-
var HeaderContent = /*#__PURE__*/styled(View$1).withConfig({
|
|
2922
|
+
var HeaderContent = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2488
2923
|
displayName: "Header__HeaderContent",
|
|
2489
2924
|
componentId: "kitt-universal__sc-dfmxi1-2"
|
|
2490
2925
|
})(["", ";", ";justify-content:center;align-items:center;"], function (_ref4) {
|
|
@@ -2574,7 +3009,7 @@ function FullScreenModalHeader(_ref6) {
|
|
|
2574
3009
|
});
|
|
2575
3010
|
}
|
|
2576
3011
|
|
|
2577
|
-
var Container$1 = /*#__PURE__*/styled(View$1).withConfig({
|
|
3012
|
+
var Container$1 = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2578
3013
|
displayName: "FullScreenModal__Container",
|
|
2579
3014
|
componentId: "kitt-universal__sc-11qpbe3-0"
|
|
2580
3015
|
})(["flex:1;background-color:", ";"], function (_ref) {
|
|
@@ -2590,21 +3025,6 @@ function FullScreenModal(_ref2) {
|
|
|
2590
3025
|
FullScreenModal.Header = FullScreenModalHeader;
|
|
2591
3026
|
FullScreenModal.Body = FullScreenModalBody;
|
|
2592
3027
|
|
|
2593
|
-
var StyledSpinningIconContainer = withTheme( /*#__PURE__*/styled$1("div")({
|
|
2594
|
-
name: "StyledSpinningIconContainer",
|
|
2595
|
-
"class": "kitt-u_StyledSpinningIconContainer_ssn8o83"
|
|
2596
|
-
}));
|
|
2597
|
-
function SpinningIcon(_ref) {
|
|
2598
|
-
var icon = _ref.icon,
|
|
2599
|
-
color = _ref.color;
|
|
2600
|
-
var clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
2601
|
-
color: color
|
|
2602
|
-
});
|
|
2603
|
-
return /*#__PURE__*/jsx(StyledSpinningIconContainer, {
|
|
2604
|
-
children: clonedIcon
|
|
2605
|
-
});
|
|
2606
|
-
}
|
|
2607
|
-
|
|
2608
3028
|
var _excluded$9 = ["as", "children"];
|
|
2609
3029
|
function StyleWebWrapper(_ref) {
|
|
2610
3030
|
var as = _ref.as,
|
|
@@ -2618,7 +3038,7 @@ function StyleWebWrapper(_ref) {
|
|
|
2618
3038
|
}
|
|
2619
3039
|
|
|
2620
3040
|
var _excluded$8 = ["color", "disabled"];
|
|
2621
|
-
var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled
|
|
3041
|
+
var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled("div")({
|
|
2622
3042
|
name: "PressableIconButtonWebWrapper",
|
|
2623
3043
|
"class": "kitt-u_PressableIconButtonWebWrapper_p1nlccvg",
|
|
2624
3044
|
vars: {
|
|
@@ -2650,7 +3070,7 @@ var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled$1("div")({
|
|
|
2650
3070
|
}]
|
|
2651
3071
|
}
|
|
2652
3072
|
}));
|
|
2653
|
-
var StyledPressableIconButton = /*#__PURE__*/styled(Pressable$1).withConfig({
|
|
3073
|
+
var StyledPressableIconButton = /*#__PURE__*/styled$1(Pressable$1).withConfig({
|
|
2654
3074
|
displayName: "PressableIconButton__StyledPressableIconButton",
|
|
2655
3075
|
componentId: "kitt-universal__sc-1m6jo3s-0"
|
|
2656
3076
|
})(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref5) {
|
|
@@ -2703,7 +3123,7 @@ function PressableAnimatedContainer(_ref) {
|
|
|
2703
3123
|
});
|
|
2704
3124
|
}
|
|
2705
3125
|
|
|
2706
|
-
var IconButtonContentBorder = /*#__PURE__*/styled(View$1).withConfig({
|
|
3126
|
+
var IconButtonContentBorder = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2707
3127
|
displayName: "IconButton__IconButtonContentBorder",
|
|
2708
3128
|
componentId: "kitt-universal__sc-swelbf-0"
|
|
2709
3129
|
})(["border:", ";border-color:", ";width:", "px;height:", "px;align-items:center;justify-content:center;border-radius:", "px;"], function (_ref) {
|
|
@@ -2761,7 +3181,7 @@ function IconButton(_ref7) {
|
|
|
2761
3181
|
}
|
|
2762
3182
|
|
|
2763
3183
|
var _excluded$7 = ["children"];
|
|
2764
|
-
var ContentView$1 = /*#__PURE__*/styled(View$1).withConfig({
|
|
3184
|
+
var ContentView$1 = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2765
3185
|
displayName: "ListItemContent__ContentView",
|
|
2766
3186
|
componentId: "kitt-universal__sc-57q0u9-0"
|
|
2767
3187
|
})(["flex:1 0 0%;align-self:center;"]);
|
|
@@ -2776,7 +3196,7 @@ function ListItemContent(_ref) {
|
|
|
2776
3196
|
|
|
2777
3197
|
var _excluded$6 = ["children", "side"],
|
|
2778
3198
|
_excluded2$1 = ["children", "align"];
|
|
2779
|
-
var SideContainerView = /*#__PURE__*/styled(View$1).withConfig({
|
|
3199
|
+
var SideContainerView = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2780
3200
|
displayName: "ListItemSideContent__SideContainerView",
|
|
2781
3201
|
componentId: "kitt-universal__sc-1vajiw-0"
|
|
2782
3202
|
})(["flex-direction:row;margin-left:", ";margin-right:", ";"], function (_ref) {
|
|
@@ -2801,7 +3221,7 @@ function ListItemSideContainer(_ref3) {
|
|
|
2801
3221
|
children: children
|
|
2802
3222
|
}));
|
|
2803
3223
|
}
|
|
2804
|
-
var SideContentView = /*#__PURE__*/styled(View$1).withConfig({
|
|
3224
|
+
var SideContentView = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2805
3225
|
displayName: "ListItemSideContent__SideContentView",
|
|
2806
3226
|
componentId: "kitt-universal__sc-1vajiw-1"
|
|
2807
3227
|
})(["align-self:", ";"], function (_ref4) {
|
|
@@ -2822,7 +3242,7 @@ function ListItemSideContent(_ref5) {
|
|
|
2822
3242
|
}
|
|
2823
3243
|
|
|
2824
3244
|
var _excluded$5 = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
2825
|
-
var ContainerView = /*#__PURE__*/styled(View$1).withConfig({
|
|
3245
|
+
var ContainerView = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2826
3246
|
displayName: "ListItem__ContainerView",
|
|
2827
3247
|
componentId: "kitt-universal__sc-2afp9s-0"
|
|
2828
3248
|
})(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], function (_ref) {
|
|
@@ -2890,14 +3310,6 @@ ListItem.Content = ListItemContent;
|
|
|
2890
3310
|
ListItem.SideContent = ListItemSideContent;
|
|
2891
3311
|
ListItem.SideContainer = ListItemSideContainer;
|
|
2892
3312
|
|
|
2893
|
-
function LoaderIcon(_ref) {
|
|
2894
|
-
var color = _ref.color;
|
|
2895
|
-
return /*#__PURE__*/jsx(SpinningIcon, {
|
|
2896
|
-
color: color,
|
|
2897
|
-
icon: /*#__PURE__*/jsx(ArcIcon, {})
|
|
2898
|
-
});
|
|
2899
|
-
}
|
|
2900
|
-
|
|
2901
3313
|
function IconContent(_ref) {
|
|
2902
3314
|
var type = _ref.type,
|
|
2903
3315
|
color = _ref.color;
|
|
@@ -2950,7 +3362,7 @@ var getIconButtonColor = function (messageType) {
|
|
|
2950
3362
|
}
|
|
2951
3363
|
};
|
|
2952
3364
|
|
|
2953
|
-
var StyledMessageContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
3365
|
+
var StyledMessageContainer = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2954
3366
|
displayName: "BaseMessage__StyledMessageContainer",
|
|
2955
3367
|
componentId: "kitt-universal__sc-eepeiz-0"
|
|
2956
3368
|
})(["flex-direction:row;align-items:flex-start;justify-content:space-between;min-height:60px;padding-top:", "px;border-radius:", "px;background-color:", ";"], function (_ref) {
|
|
@@ -2967,7 +3379,7 @@ var StyledMessageContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
|
2967
3379
|
$type = _ref3.$type;
|
|
2968
3380
|
return theme.kitt.feedbackMessage[$type].backgroundColor;
|
|
2969
3381
|
});
|
|
2970
|
-
var StyledDismissWrapper = /*#__PURE__*/styled(View$1).withConfig({
|
|
3382
|
+
var StyledDismissWrapper = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2971
3383
|
displayName: "BaseMessage__StyledDismissWrapper",
|
|
2972
3384
|
componentId: "kitt-universal__sc-eepeiz-1"
|
|
2973
3385
|
})(["align-items:center;align-items:flex-start;margin:", ";"], function (_ref4) {
|
|
@@ -2975,7 +3387,7 @@ var StyledDismissWrapper = /*#__PURE__*/styled(View$1).withConfig({
|
|
|
2975
3387
|
var spacing = theme.kitt.spacing;
|
|
2976
3388
|
return "".concat(spacing * 2.5, "px ").concat(spacing * 2, "px 0 ").concat(spacing * 5, "px");
|
|
2977
3389
|
});
|
|
2978
|
-
var StyledIconContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
3390
|
+
var StyledIconContainer = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2979
3391
|
displayName: "BaseMessage__StyledIconContainer",
|
|
2980
3392
|
componentId: "kitt-universal__sc-eepeiz-2"
|
|
2981
3393
|
})(["margin:", ";"], function (_ref5) {
|
|
@@ -2983,14 +3395,14 @@ var StyledIconContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
|
2983
3395
|
var spacing = theme.kitt.spacing;
|
|
2984
3396
|
return "".concat(spacing, "px ").concat(spacing * 5, "px 0 0");
|
|
2985
3397
|
});
|
|
2986
|
-
var StyledTextContent = /*#__PURE__*/styled(Typography.Text).withConfig({
|
|
3398
|
+
var StyledTextContent = /*#__PURE__*/styled$1(Typography.Text).withConfig({
|
|
2987
3399
|
displayName: "BaseMessage__StyledTextContent",
|
|
2988
3400
|
componentId: "kitt-universal__sc-eepeiz-3"
|
|
2989
3401
|
})(["flex:1;text-align:", ";"], function (_ref6) {
|
|
2990
3402
|
var $isCenteredText = _ref6.$isCenteredText;
|
|
2991
3403
|
return $isCenteredText ? 'center' : 'left';
|
|
2992
3404
|
});
|
|
2993
|
-
var StyledMessageContent = /*#__PURE__*/styled(View$1).withConfig({
|
|
3405
|
+
var StyledMessageContent = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
2994
3406
|
displayName: "BaseMessage__StyledMessageContent",
|
|
2995
3407
|
componentId: "kitt-universal__sc-eepeiz-4"
|
|
2996
3408
|
})(["display:flex;flex-direction:row;flex-grow:1;align-self:center;align-items:flex-start;flex-shrink:1;padding:", ";"], function (_ref7) {
|
|
@@ -3055,7 +3467,7 @@ function Message(_ref) {
|
|
|
3055
3467
|
}
|
|
3056
3468
|
|
|
3057
3469
|
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
3058
|
-
var OverlayPressable = /*#__PURE__*/styled(Pressable$1).withConfig({
|
|
3470
|
+
var OverlayPressable = /*#__PURE__*/styled$1(Pressable$1).withConfig({
|
|
3059
3471
|
displayName: "Overlay__OverlayPressable",
|
|
3060
3472
|
componentId: "kitt-universal__sc-1cz1gbr-0"
|
|
3061
3473
|
})(function (_ref) {
|
|
@@ -3072,7 +3484,7 @@ function Overlay(_ref2) {
|
|
|
3072
3484
|
});
|
|
3073
3485
|
}
|
|
3074
3486
|
|
|
3075
|
-
var BodyView = /*#__PURE__*/styled(View$1).withConfig({
|
|
3487
|
+
var BodyView = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3076
3488
|
displayName: "Body__BodyView",
|
|
3077
3489
|
componentId: "kitt-universal__sc-17fwpo4-0"
|
|
3078
3490
|
})(["padding:", "px ", "px;"], function (_ref) {
|
|
@@ -3084,14 +3496,14 @@ var BodyView = /*#__PURE__*/styled(View$1).withConfig({
|
|
|
3084
3496
|
});
|
|
3085
3497
|
function ModalBody(_ref3) {
|
|
3086
3498
|
var children = _ref3.children;
|
|
3087
|
-
return /*#__PURE__*/jsx(ScrollView$
|
|
3499
|
+
return /*#__PURE__*/jsx(ScrollView$2, {
|
|
3088
3500
|
children: /*#__PURE__*/jsx(BodyView, {
|
|
3089
3501
|
children: children
|
|
3090
3502
|
})
|
|
3091
3503
|
});
|
|
3092
3504
|
}
|
|
3093
3505
|
|
|
3094
|
-
var FooterView = /*#__PURE__*/styled(View$1).withConfig({
|
|
3506
|
+
var FooterView = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3095
3507
|
displayName: "Footer__FooterView",
|
|
3096
3508
|
componentId: "kitt-universal__sc-1ujq2dc-0"
|
|
3097
3509
|
})(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], function (_ref) {
|
|
@@ -3110,7 +3522,7 @@ function ModalFooter(_ref3) {
|
|
|
3110
3522
|
|
|
3111
3523
|
var OnCloseContext$1 = /*#__PURE__*/createContext(function () {});
|
|
3112
3524
|
|
|
3113
|
-
var HeaderView = /*#__PURE__*/styled(View$1).withConfig({
|
|
3525
|
+
var HeaderView = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3114
3526
|
displayName: "Header__HeaderView",
|
|
3115
3527
|
componentId: "kitt-universal__sc-1iwabch-0"
|
|
3116
3528
|
})(["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) {
|
|
@@ -3120,21 +3532,21 @@ var HeaderView = /*#__PURE__*/styled(View$1).withConfig({
|
|
|
3120
3532
|
var theme = _ref2.theme;
|
|
3121
3533
|
return theme.kitt.colors.separator;
|
|
3122
3534
|
});
|
|
3123
|
-
var LeftIconView = /*#__PURE__*/styled(View$1).withConfig({
|
|
3535
|
+
var LeftIconView = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3124
3536
|
displayName: "Header__LeftIconView",
|
|
3125
3537
|
componentId: "kitt-universal__sc-1iwabch-1"
|
|
3126
3538
|
})(["align-self:flex-start;margin-right:", "px;"], function (_ref3) {
|
|
3127
3539
|
var theme = _ref3.theme;
|
|
3128
3540
|
return theme.kitt.spacing * 2;
|
|
3129
3541
|
});
|
|
3130
|
-
var RightIconView = /*#__PURE__*/styled(View$1).withConfig({
|
|
3542
|
+
var RightIconView = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3131
3543
|
displayName: "Header__RightIconView",
|
|
3132
3544
|
componentId: "kitt-universal__sc-1iwabch-2"
|
|
3133
3545
|
})(["align-self:flex-start;margin-left:", "px;"], function (_ref4) {
|
|
3134
3546
|
var theme = _ref4.theme;
|
|
3135
3547
|
return theme.kitt.spacing * 2;
|
|
3136
3548
|
});
|
|
3137
|
-
var TitleView = /*#__PURE__*/styled(View$1).withConfig({
|
|
3549
|
+
var TitleView = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3138
3550
|
displayName: "Header__TitleView",
|
|
3139
3551
|
componentId: "kitt-universal__sc-1iwabch-3"
|
|
3140
3552
|
})(["padding-left:", "px;flex-shrink:1;"], function (_ref5) {
|
|
@@ -3163,7 +3575,7 @@ function ModalHeader(_ref6) {
|
|
|
3163
3575
|
});
|
|
3164
3576
|
}
|
|
3165
3577
|
|
|
3166
|
-
var ModalView = /*#__PURE__*/styled(View$1).withConfig({
|
|
3578
|
+
var ModalView = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3167
3579
|
displayName: "Modal__ModalView",
|
|
3168
3580
|
componentId: "kitt-universal__sc-1xy2w5u-0"
|
|
3169
3581
|
})(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], function (_ref) {
|
|
@@ -3173,7 +3585,7 @@ var ModalView = /*#__PURE__*/styled(View$1).withConfig({
|
|
|
3173
3585
|
var theme = _ref2.theme;
|
|
3174
3586
|
return theme.kitt.spacing * 4;
|
|
3175
3587
|
});
|
|
3176
|
-
var ContentView = /*#__PURE__*/styled(View$1).withConfig({
|
|
3588
|
+
var ContentView = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3177
3589
|
displayName: "Modal__ContentView",
|
|
3178
3590
|
componentId: "kitt-universal__sc-1xy2w5u-1"
|
|
3179
3591
|
})(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", "px;background-color:", ";"], function (_ref3) {
|
|
@@ -3259,7 +3671,7 @@ function CloseButton(_ref) {
|
|
|
3259
3671
|
});
|
|
3260
3672
|
}
|
|
3261
3673
|
|
|
3262
|
-
var ModalBehaviourContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
3674
|
+
var ModalBehaviourContainer = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3263
3675
|
displayName: "ModalBehaviour__ModalBehaviourContainer",
|
|
3264
3676
|
componentId: "kitt-universal__sc-tj3606-0"
|
|
3265
3677
|
})(["", ""], function () {
|
|
@@ -3426,16 +3838,8 @@ function KittNativeBaseProvider(_ref) {
|
|
|
3426
3838
|
});
|
|
3427
3839
|
}
|
|
3428
3840
|
|
|
3429
|
-
var Stack = Stack$1;
|
|
3430
|
-
var VStack = VStack$1;
|
|
3431
|
-
var HStack = HStack$1;
|
|
3432
|
-
|
|
3433
|
-
var View = View$2;
|
|
3434
|
-
var ScrollView = ScrollView$2;
|
|
3435
|
-
var Pressable = Pressable$2;
|
|
3436
|
-
|
|
3437
3841
|
var _excluded$4 = ["children"];
|
|
3438
|
-
var ViewWithPadding = /*#__PURE__*/styled(View$1).withConfig({
|
|
3842
|
+
var ViewWithPadding = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3439
3843
|
displayName: "ContentPadding__ViewWithPadding",
|
|
3440
3844
|
componentId: "kitt-universal__sc-1rprqcv-0"
|
|
3441
3845
|
})(["padding:", ";"], function (_ref) {
|
|
@@ -3452,7 +3856,7 @@ function ContentPadding(_ref2) {
|
|
|
3452
3856
|
}
|
|
3453
3857
|
|
|
3454
3858
|
var _excluded$3 = ["children", "shouldHandleBottomNotch", "style"];
|
|
3455
|
-
var StyledViewWithPadding = /*#__PURE__*/styled(ContentPadding).withConfig({
|
|
3859
|
+
var StyledViewWithPadding = /*#__PURE__*/styled$1(ContentPadding).withConfig({
|
|
3456
3860
|
displayName: "Body__StyledViewWithPadding",
|
|
3457
3861
|
componentId: "kitt-universal__sc-oc39vn-0"
|
|
3458
3862
|
})(["padding-top:", "px;padding-bottom:", "px;"], function (_ref) {
|
|
@@ -3480,7 +3884,7 @@ function Body(_ref3) {
|
|
|
3480
3884
|
}));
|
|
3481
3885
|
}
|
|
3482
3886
|
|
|
3483
|
-
var FooterContainer = /*#__PURE__*/styled(ContentPadding).withConfig({
|
|
3887
|
+
var FooterContainer = /*#__PURE__*/styled$1(ContentPadding).withConfig({
|
|
3484
3888
|
displayName: "Footer__FooterContainer",
|
|
3485
3889
|
componentId: "kitt-universal__sc-1yjprfg-0"
|
|
3486
3890
|
})(["padding-top:", "px;padding-bottom:", "px;", ";"], function (_ref) {
|
|
@@ -3518,7 +3922,7 @@ function Footer(_ref5) {
|
|
|
3518
3922
|
});
|
|
3519
3923
|
}
|
|
3520
3924
|
|
|
3521
|
-
var HeaderContainer = /*#__PURE__*/styled(ContentPadding).withConfig({
|
|
3925
|
+
var HeaderContainer = /*#__PURE__*/styled$1(ContentPadding).withConfig({
|
|
3522
3926
|
displayName: "Header__HeaderContainer",
|
|
3523
3927
|
componentId: "kitt-universal__sc-1g7sbq-0"
|
|
3524
3928
|
})(["height:", "px;width:100%;justify-content:center;background-color:", ";padding-right:", "px;padding-left:", "px;", ";"], function (_ref) {
|
|
@@ -3545,7 +3949,7 @@ var HeaderContainer = /*#__PURE__*/styled(ContentPadding).withConfig({
|
|
|
3545
3949
|
return theme.kitt.colors.separator;
|
|
3546
3950
|
});
|
|
3547
3951
|
});
|
|
3548
|
-
var Row = /*#__PURE__*/styled(View$1).withConfig({
|
|
3952
|
+
var Row = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3549
3953
|
displayName: "Header__Row",
|
|
3550
3954
|
componentId: "kitt-universal__sc-1g7sbq-1"
|
|
3551
3955
|
})(["flex-direction:row;justify-content:", ";align-items:center;"], function (_ref7) {
|
|
@@ -3553,14 +3957,14 @@ var Row = /*#__PURE__*/styled(View$1).withConfig({
|
|
|
3553
3957
|
$hasLeft = _ref7.$hasLeft;
|
|
3554
3958
|
return !$hasContent && !$hasLeft ? 'flex-end' : 'space-between';
|
|
3555
3959
|
});
|
|
3556
|
-
var ButtonContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
3960
|
+
var ButtonContainer = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3557
3961
|
displayName: "Header__ButtonContainer",
|
|
3558
3962
|
componentId: "kitt-universal__sc-1g7sbq-2"
|
|
3559
3963
|
})(["width:", "px;"], function (_ref8) {
|
|
3560
3964
|
var theme = _ref8.theme;
|
|
3561
3965
|
return theme.kitt.iconButton.width;
|
|
3562
3966
|
});
|
|
3563
|
-
var ChildrenComponent = /*#__PURE__*/styled(View$1).withConfig({
|
|
3967
|
+
var ChildrenComponent = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3564
3968
|
displayName: "Header__ChildrenComponent",
|
|
3565
3969
|
componentId: "kitt-universal__sc-1g7sbq-3"
|
|
3566
3970
|
})(["flex:1;align-items:center;", ";"], function (_ref9) {
|
|
@@ -3570,7 +3974,7 @@ var ChildrenComponent = /*#__PURE__*/styled(View$1).withConfig({
|
|
|
3570
3974
|
var paddingHorizontal = theme.kitt.spacing * 2;
|
|
3571
3975
|
return css(["padding-right:", "px;padding-left:", "px;"], $hasRight ? paddingHorizontal : 0, $hasLeft ? paddingHorizontal : 0);
|
|
3572
3976
|
});
|
|
3573
|
-
var HeaderTitle = /*#__PURE__*/styled(Typography.Text).withConfig({
|
|
3977
|
+
var HeaderTitle = /*#__PURE__*/styled$1(Typography.Text).withConfig({
|
|
3574
3978
|
displayName: "Header__HeaderTitle",
|
|
3575
3979
|
componentId: "kitt-universal__sc-1g7sbq-4"
|
|
3576
3980
|
})(["flex:1;text-align:", ";", ";"], function (_ref10) {
|
|
@@ -3621,7 +4025,7 @@ function Header(_ref12) {
|
|
|
3621
4025
|
});
|
|
3622
4026
|
}
|
|
3623
4027
|
|
|
3624
|
-
var NavigationModalContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
4028
|
+
var NavigationModalContainer = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3625
4029
|
displayName: "NavigationModalContainer",
|
|
3626
4030
|
componentId: "kitt-universal__sc-n0bwvk-0"
|
|
3627
4031
|
})(["position:relative;background-color:", ";flex:1;", ""], function (_ref) {
|
|
@@ -3632,7 +4036,7 @@ var NavigationModalContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
|
3632
4036
|
return css(["min-height:100vh;"]);
|
|
3633
4037
|
});
|
|
3634
4038
|
|
|
3635
|
-
var ContainerWithoutHeader = /*#__PURE__*/styled(View$1).withConfig({
|
|
4039
|
+
var ContainerWithoutHeader = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3636
4040
|
displayName: "NavigationModal__ContainerWithoutHeader",
|
|
3637
4041
|
componentId: "kitt-universal__sc-ls8t24-0"
|
|
3638
4042
|
})(["justify-content:space-between;flex:1;"]);
|
|
@@ -3646,7 +4050,7 @@ function NavigationModal(_ref) {
|
|
|
3646
4050
|
children: [header ? /*#__PURE__*/jsx(View$1, {
|
|
3647
4051
|
children: header
|
|
3648
4052
|
}) : null, /*#__PURE__*/jsxs(ContainerWithoutHeader, {
|
|
3649
|
-
children: [/*#__PURE__*/jsx(ScrollView$
|
|
4053
|
+
children: [/*#__PURE__*/jsx(ScrollView$2, {
|
|
3650
4054
|
bounces: false,
|
|
3651
4055
|
contentContainerStyle: {
|
|
3652
4056
|
flexGrow: 1,
|
|
@@ -3686,7 +4090,7 @@ function Notification(_ref) {
|
|
|
3686
4090
|
});
|
|
3687
4091
|
}
|
|
3688
4092
|
|
|
3689
|
-
var PageLoaderContainer = withTheme( /*#__PURE__*/styled
|
|
4093
|
+
var PageLoaderContainer = withTheme( /*#__PURE__*/styled("div")({
|
|
3690
4094
|
name: "PageLoaderContainer",
|
|
3691
4095
|
"class": "kitt-u_PageLoaderContainer_ptkwz2j",
|
|
3692
4096
|
vars: {
|
|
@@ -3784,7 +4188,7 @@ function Picker() {
|
|
|
3784
4188
|
});
|
|
3785
4189
|
}
|
|
3786
4190
|
|
|
3787
|
-
var StyledSkeleton = withTheme( /*#__PURE__*/styled
|
|
4191
|
+
var StyledSkeleton = withTheme( /*#__PURE__*/styled("div")({
|
|
3788
4192
|
name: "StyledSkeleton",
|
|
3789
4193
|
"class": "kitt-u_StyledSkeleton_sc3upcl",
|
|
3790
4194
|
vars: {
|
|
@@ -3810,7 +4214,7 @@ function SkeletonContent(_ref4) {
|
|
|
3810
4214
|
});
|
|
3811
4215
|
}
|
|
3812
4216
|
|
|
3813
|
-
var SkeletonContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
4217
|
+
var SkeletonContainer = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3814
4218
|
displayName: "Skeleton__SkeletonContainer",
|
|
3815
4219
|
componentId: "kitt-universal__sc-1w5cm3i-0"
|
|
3816
4220
|
})(["overflow:hidden;"]);
|
|
@@ -3835,7 +4239,7 @@ function Skeleton(_ref) {
|
|
|
3835
4239
|
})
|
|
3836
4240
|
});
|
|
3837
4241
|
}
|
|
3838
|
-
var Bar = /*#__PURE__*/styled(Skeleton).withConfig({
|
|
4242
|
+
var Bar = /*#__PURE__*/styled$1(Skeleton).withConfig({
|
|
3839
4243
|
displayName: "Skeleton__Bar",
|
|
3840
4244
|
componentId: "kitt-universal__sc-1w5cm3i-1"
|
|
3841
4245
|
})(["width:100%;height:", "px;border-radius:", "px;"], function (_ref3) {
|
|
@@ -3845,7 +4249,7 @@ var Bar = /*#__PURE__*/styled(Skeleton).withConfig({
|
|
|
3845
4249
|
var theme = _ref4.theme;
|
|
3846
4250
|
return theme.kitt.spacing * 2;
|
|
3847
4251
|
});
|
|
3848
|
-
var Circle = /*#__PURE__*/styled(Skeleton).withConfig({
|
|
4252
|
+
var Circle = /*#__PURE__*/styled$1(Skeleton).withConfig({
|
|
3849
4253
|
displayName: "Skeleton__Circle",
|
|
3850
4254
|
componentId: "kitt-universal__sc-1w5cm3i-2"
|
|
3851
4255
|
})(["width:", "px;height:", "px;border-radius:", "px;"], function (_ref5) {
|
|
@@ -3858,7 +4262,7 @@ var Circle = /*#__PURE__*/styled(Skeleton).withConfig({
|
|
|
3858
4262
|
var theme = _ref7.theme;
|
|
3859
4263
|
return theme.kitt.spacing * 6;
|
|
3860
4264
|
});
|
|
3861
|
-
var Square = /*#__PURE__*/styled(Skeleton).withConfig({
|
|
4265
|
+
var Square = /*#__PURE__*/styled$1(Skeleton).withConfig({
|
|
3862
4266
|
displayName: "Skeleton__Square",
|
|
3863
4267
|
componentId: "kitt-universal__sc-1w5cm3i-3"
|
|
3864
4268
|
})(["width:", "px;height:", "px;border-radius:", "px;"], function (_ref8) {
|
|
@@ -3875,7 +4279,7 @@ Skeleton.Bar = Bar;
|
|
|
3875
4279
|
Skeleton.Circle = Circle;
|
|
3876
4280
|
Skeleton.Square = Square;
|
|
3877
4281
|
|
|
3878
|
-
var Flex = /*#__PURE__*/styled(View$1).withConfig({
|
|
4282
|
+
var Flex = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3879
4283
|
shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {
|
|
3880
4284
|
return !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop);
|
|
3881
4285
|
}
|
|
@@ -3932,7 +4336,7 @@ var useStoryBlockColor = function (color) {
|
|
|
3932
4336
|
var storyBlockColor = useContext(StoryBlockColorContext);
|
|
3933
4337
|
return color || storyBlockColor;
|
|
3934
4338
|
};
|
|
3935
|
-
var StyledStoryBlockView = /*#__PURE__*/styled(View$1).withConfig({
|
|
4339
|
+
var StyledStoryBlockView = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3936
4340
|
displayName: "StoryBlock__StyledStoryBlockView",
|
|
3937
4341
|
componentId: "kitt-universal__sc-3w4hdm-0"
|
|
3938
4342
|
})(["padding:16px ", "px 0;margin:0 -", "px;background:", ";"], storyPadding, storyPadding, function (_ref) {
|
|
@@ -3955,11 +4359,11 @@ function StoryBlock(_ref2) {
|
|
|
3955
4359
|
});
|
|
3956
4360
|
}
|
|
3957
4361
|
|
|
3958
|
-
var StoryTitleContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
4362
|
+
var StoryTitleContainer = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3959
4363
|
displayName: "StoryTitle__StoryTitleContainer",
|
|
3960
4364
|
componentId: "kitt-universal__sc-sic7hb-0"
|
|
3961
4365
|
})(["margin-bottom:30px;"]);
|
|
3962
|
-
var StorySubTitleContainer = /*#__PURE__*/styled(View$1).withConfig({
|
|
4366
|
+
var StorySubTitleContainer = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
3963
4367
|
displayName: "StoryTitle__StorySubTitleContainer",
|
|
3964
4368
|
componentId: "kitt-universal__sc-sic7hb-1"
|
|
3965
4369
|
})(["margin-bottom:10px;"]);
|
|
@@ -4034,7 +4438,7 @@ StoryTitle.Level2 = StoryTitleLevel2;
|
|
|
4034
4438
|
StoryTitle.Level3 = StoryTitleLevel3;
|
|
4035
4439
|
StoryTitle.Level4 = StoryTitleLevel4;
|
|
4036
4440
|
|
|
4037
|
-
var StoryContainer$1 = /*#__PURE__*/styled(ScrollView$
|
|
4441
|
+
var StoryContainer$1 = /*#__PURE__*/styled$1(ScrollView$2).withConfig({
|
|
4038
4442
|
displayName: "Story__StoryContainer",
|
|
4039
4443
|
componentId: "kitt-universal__sc-1kwdg2p-0"
|
|
4040
4444
|
})(["padding:", "px;"], storyPadding);
|
|
@@ -4053,7 +4457,7 @@ function Story(_ref) {
|
|
|
4053
4457
|
var _excluded$2 = ["title", "children", "internalIsDemoSection"],
|
|
4054
4458
|
_excluded2 = ["title", "children"],
|
|
4055
4459
|
_excluded3 = ["title", "children"];
|
|
4056
|
-
var StyledSection = /*#__PURE__*/styled(View$1).withConfig({
|
|
4460
|
+
var StyledSection = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
4057
4461
|
displayName: "StorySection__StyledSection",
|
|
4058
4462
|
componentId: "kitt-universal__sc-1b3liv5-0"
|
|
4059
4463
|
})(["margin-bottom:32px;"]);
|
|
@@ -4070,7 +4474,7 @@ function StorySection(_ref) {
|
|
|
4070
4474
|
}), children]
|
|
4071
4475
|
}));
|
|
4072
4476
|
}
|
|
4073
|
-
var StyledSubSection = /*#__PURE__*/styled(View$1).withConfig({
|
|
4477
|
+
var StyledSubSection = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
4074
4478
|
displayName: "StorySection__StyledSubSection",
|
|
4075
4479
|
componentId: "kitt-universal__sc-1b3liv5-1"
|
|
4076
4480
|
})(["margin-bottom:16px;"]);
|
|
@@ -4087,7 +4491,7 @@ function SubSection(_ref2) {
|
|
|
4087
4491
|
}));
|
|
4088
4492
|
}
|
|
4089
4493
|
|
|
4090
|
-
var StyledBlockSection = /*#__PURE__*/styled(View$1).withConfig({
|
|
4494
|
+
var StyledBlockSection = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
4091
4495
|
displayName: "StorySection__StyledBlockSection",
|
|
4092
4496
|
componentId: "kitt-universal__sc-1b3liv5-2"
|
|
4093
4497
|
})(["margin-bottom:16px;"]);
|
|
@@ -4104,7 +4508,7 @@ function BlockSection(_ref3) {
|
|
|
4104
4508
|
}));
|
|
4105
4509
|
}
|
|
4106
4510
|
|
|
4107
|
-
var StyledDemoSection = /*#__PURE__*/styled(View$1).withConfig({
|
|
4511
|
+
var StyledDemoSection = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
4108
4512
|
displayName: "StorySection__StyledDemoSection",
|
|
4109
4513
|
componentId: "kitt-universal__sc-1b3liv5-3"
|
|
4110
4514
|
})(["margin-bottom:64px;"]);
|
|
@@ -4153,19 +4557,19 @@ function StoryDecorator(storyFn, context) {
|
|
|
4153
4557
|
});
|
|
4154
4558
|
}
|
|
4155
4559
|
|
|
4156
|
-
var SmallScreenRow = /*#__PURE__*/styled(View$1).withConfig({
|
|
4560
|
+
var SmallScreenRow = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
4157
4561
|
displayName: "StoryGrid__SmallScreenRow",
|
|
4158
4562
|
componentId: "kitt-universal__sc-4z5new-0"
|
|
4159
4563
|
})(["flex-direction:column;margin:0;"]);
|
|
4160
|
-
var SmallScreenCol = /*#__PURE__*/styled(View$1).withConfig({
|
|
4564
|
+
var SmallScreenCol = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
4161
4565
|
displayName: "StoryGrid__SmallScreenCol",
|
|
4162
4566
|
componentId: "kitt-universal__sc-4z5new-1"
|
|
4163
4567
|
})(["padding:8px 0 16px;"]);
|
|
4164
|
-
var FlexRow = /*#__PURE__*/styled(View$1).withConfig({
|
|
4568
|
+
var FlexRow = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
4165
4569
|
displayName: "StoryGrid__FlexRow",
|
|
4166
4570
|
componentId: "kitt-universal__sc-4z5new-2"
|
|
4167
4571
|
})(["flex-direction:row;margin:0 -4px 16px;"]);
|
|
4168
|
-
var FlexCol = /*#__PURE__*/styled(View$1).withConfig({
|
|
4572
|
+
var FlexCol = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
4169
4573
|
displayName: "StoryGrid__FlexCol",
|
|
4170
4574
|
componentId: "kitt-universal__sc-4z5new-3"
|
|
4171
4575
|
})(["flex-grow:1;flex-basis:0;margin:0 8px;"]);
|
|
@@ -4226,7 +4630,7 @@ var StoryGrid = {
|
|
|
4226
4630
|
Col: StoryGridCol
|
|
4227
4631
|
};
|
|
4228
4632
|
|
|
4229
|
-
var Container = /*#__PURE__*/styled(View$1).withConfig({
|
|
4633
|
+
var Container = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
4230
4634
|
displayName: "Tag__Container",
|
|
4231
4635
|
componentId: "kitt-universal__sc-19jmowi-0"
|
|
4232
4636
|
})(["background-color:", ";border-width:", "px;border-color:", ";padding:", ";border-radius:", "px;align-self:flex-start;"], function (_ref) {
|
|
@@ -4298,11 +4702,11 @@ function TimePicker() {
|
|
|
4298
4702
|
});
|
|
4299
4703
|
}
|
|
4300
4704
|
|
|
4301
|
-
var StyledTooltipView = /*#__PURE__*/styled(View$1).withConfig({
|
|
4705
|
+
var StyledTooltipView = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
4302
4706
|
displayName: "TooltipView__StyledTooltipView",
|
|
4303
4707
|
componentId: "kitt-universal__sc-156zm6m-0"
|
|
4304
4708
|
})(["align-items:center;"]);
|
|
4305
|
-
var StyledTooltipContent = /*#__PURE__*/styled(View$1).withConfig({
|
|
4709
|
+
var StyledTooltipContent = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
4306
4710
|
displayName: "TooltipView__StyledTooltipContent",
|
|
4307
4711
|
componentId: "kitt-universal__sc-156zm6m-1"
|
|
4308
4712
|
})(["background-color:", ";border-radius:", "px;opacity:", ";padding:", ";"], function (_ref) {
|
|
@@ -4328,7 +4732,7 @@ function ArrowView(props) {
|
|
|
4328
4732
|
}));
|
|
4329
4733
|
}
|
|
4330
4734
|
|
|
4331
|
-
var StyledArrow = /*#__PURE__*/styled(ArrowView).withConfig({
|
|
4735
|
+
var StyledArrow = /*#__PURE__*/styled$1(ArrowView).withConfig({
|
|
4332
4736
|
displayName: "TooltipView__StyledArrow",
|
|
4333
4737
|
componentId: "kitt-universal__sc-156zm6m-2"
|
|
4334
4738
|
})(["color:", ";transform:", ";"], function (_ref5) {
|
|
@@ -4361,11 +4765,11 @@ var tooltipDefaultFloatingStrategy = {
|
|
|
4361
4765
|
web: 'absolute'
|
|
4362
4766
|
};
|
|
4363
4767
|
|
|
4364
|
-
var StyledTooltipTrigger = /*#__PURE__*/styled(Pressable$1).withConfig({
|
|
4768
|
+
var StyledTooltipTrigger = /*#__PURE__*/styled$1(Pressable$1).withConfig({
|
|
4365
4769
|
displayName: "Tooltipweb__StyledTooltipTrigger",
|
|
4366
4770
|
componentId: "kitt-universal__sc-zn1y6f-0"
|
|
4367
4771
|
})(["display:inline-flex;align-self:baseline;"]);
|
|
4368
|
-
var WebAnimatedTooltip = /*#__PURE__*/styled(View$1).withConfig({
|
|
4772
|
+
var WebAnimatedTooltip = /*#__PURE__*/styled$1(View$1).withConfig({
|
|
4369
4773
|
displayName: "Tooltipweb__WebAnimatedTooltip",
|
|
4370
4774
|
componentId: "kitt-universal__sc-zn1y6f-1"
|
|
4371
4775
|
})(["opacity:", ";transition:opacity 200ms;visibility:", ";"], function (_ref) {
|
|
@@ -4494,7 +4898,7 @@ function Tooltip(_ref3) {
|
|
|
4494
4898
|
}
|
|
4495
4899
|
Tooltip.View = TooltipView;
|
|
4496
4900
|
|
|
4497
|
-
var EmojiWebWrapper = withTheme( /*#__PURE__*/styled
|
|
4901
|
+
var EmojiWebWrapper = withTheme( /*#__PURE__*/styled("span")({
|
|
4498
4902
|
name: "EmojiWebWrapper",
|
|
4499
4903
|
"class": "kitt-u_EmojiWebWrapper_ej7a4r3"
|
|
4500
4904
|
}));
|
|
@@ -4593,7 +4997,7 @@ function TypographyEmoji(_ref3) {
|
|
|
4593
4997
|
}
|
|
4594
4998
|
|
|
4595
4999
|
var _excluded$1 = ["children", "disabled", "noUnderline", "href", "hrefAttrs", "onPress"];
|
|
4596
|
-
var TypographyLinkWebWrapper = withTheme( /*#__PURE__*/styled
|
|
5000
|
+
var TypographyLinkWebWrapper = withTheme( /*#__PURE__*/styled("span")({
|
|
4597
5001
|
name: "TypographyLinkWebWrapper",
|
|
4598
5002
|
"class": "kitt-u_TypographyLinkWebWrapper_tcwz3nt",
|
|
4599
5003
|
vars: {
|
|
@@ -4603,7 +5007,7 @@ var TypographyLinkWebWrapper = withTheme( /*#__PURE__*/styled$1("span")({
|
|
|
4603
5007
|
}]
|
|
4604
5008
|
}
|
|
4605
5009
|
}));
|
|
4606
|
-
var StyledLink = /*#__PURE__*/styled(Text$2).withConfig({
|
|
5010
|
+
var StyledLink = /*#__PURE__*/styled$1(Text$2).withConfig({
|
|
4607
5011
|
displayName: "TypographyLink__StyledLink",
|
|
4608
5012
|
componentId: "kitt-universal__sc-1o1zy30-0"
|
|
4609
5013
|
})(["text-decoration:", ";", ";", ";"], function (_ref2) {
|
|
@@ -4697,5 +5101,5 @@ function MatchWindowSize(_ref) {
|
|
|
4697
5101
|
return children;
|
|
4698
5102
|
}
|
|
4699
5103
|
|
|
4700
|
-
export { Avatar, Button, Card, Checkbox, DatePicker, Emoji, ExternalAppLink, ExternalLink, Flex, FullScreenModal, HStack, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpoints, KittBreakpointsMax, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MatchWindowSize, Message, Modal, ModalBehaviour, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, Radio, ScrollView, DeprecatedSection as Section, Skeleton, SpinningIcon, Stack, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, View, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
|
|
5104
|
+
export { Actions, Avatar, Button, Card, Checkbox, ChoicesElements, DatePicker, Emoji, ExternalAppLink, ExternalLink, Flex, FullScreenModal, HStack, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpoints, KittBreakpointsMax, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MatchWindowSize, Message, Modal, ModalBehaviour, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, Radio, ScrollView, DeprecatedSection as Section, Skeleton, SpinningIcon, Stack, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, View, createChoicesComponent, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
|
|
4701
5105
|
//# sourceMappingURL=index-browser-all.es.web.js.map
|