@ornikar/kitt-universal 2.2.0 → 3.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +131 -0
- package/dist/definitions/Avatar/Avatar.d.ts.map +1 -1
- package/dist/definitions/Button/Button.d.ts +5 -2
- package/dist/definitions/Button/Button.d.ts.map +1 -1
- package/dist/definitions/Button/ButtonContent.d.ts.map +1 -1
- package/dist/definitions/Button/ButtonPressable.d.ts +13 -0
- package/dist/definitions/Button/ButtonPressable.d.ts.map +1 -0
- package/dist/definitions/Card/Card.d.ts.map +1 -1
- package/dist/definitions/Emoji/Emoji.d.ts +8 -0
- package/dist/definitions/Emoji/Emoji.d.ts.map +1 -0
- package/dist/definitions/ExternalLink/ExternalLink.d.ts +18 -0
- package/dist/definitions/ExternalLink/ExternalLink.d.ts.map +1 -0
- package/dist/definitions/ExternalLink/ExternalLink.web.d.ts +4 -0
- package/dist/definitions/ExternalLink/ExternalLink.web.d.ts.map +1 -0
- package/dist/definitions/ExternalLink/ExternalLinkOpenLinkBehavior.d.ts +24 -0
- package/dist/definitions/ExternalLink/ExternalLinkOpenLinkBehavior.d.ts.map +1 -0
- package/dist/definitions/FullScreenModal/Body.d.ts.map +1 -1
- package/dist/definitions/FullScreenModal/FullScreenModal.d.ts.map +1 -1
- package/dist/definitions/FullScreenModal/Header.d.ts.map +1 -1
- package/dist/definitions/Icon/Icon.d.ts.map +1 -1
- package/dist/definitions/Icon/SpinningIcon.web.d.ts +3 -2
- package/dist/definitions/Icon/SpinningIcon.web.d.ts.map +1 -1
- package/dist/definitions/IconButton/IconButton.d.ts.map +1 -1
- package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts.map +1 -1
- package/dist/definitions/IconButton/PressableAnimatedContainer.web.d.ts.map +1 -1
- package/dist/definitions/IconButton/PressableIconButton.d.ts +4 -4
- package/dist/definitions/IconButton/PressableIconButton.d.ts.map +1 -1
- package/dist/definitions/ListItem/ListItem.d.ts +3 -4
- package/dist/definitions/ListItem/ListItem.d.ts.map +1 -1
- package/dist/definitions/ListItem/ListItemContent.d.ts +2 -2
- package/dist/definitions/ListItem/ListItemContent.d.ts.map +1 -1
- package/dist/definitions/ListItem/ListItemSideContent.d.ts +3 -4
- package/dist/definitions/ListItem/ListItemSideContent.d.ts.map +1 -1
- package/dist/definitions/Loader/LargeLoader.d.ts.map +1 -1
- package/dist/definitions/Loader/LargeLoader.web.d.ts.map +1 -1
- package/dist/definitions/Loader/Loader.d.ts.map +1 -1
- package/dist/definitions/Loader/Loader.web.d.ts.map +1 -1
- package/dist/definitions/Message/Message.d.ts.map +1 -1
- package/dist/definitions/Modal/Body.d.ts.map +1 -1
- package/dist/definitions/Modal/Footer.d.ts.map +1 -1
- package/dist/definitions/Modal/Header.d.ts.map +1 -1
- package/dist/definitions/Modal/Modal.d.ts.map +1 -1
- package/dist/definitions/Notification/Notification.d.ts.map +1 -1
- package/dist/definitions/Overlay/Overlay.d.ts +2 -2
- package/dist/definitions/Overlay/Overlay.d.ts.map +1 -1
- package/dist/definitions/Tag/Tag.d.ts.map +1 -1
- package/dist/definitions/TimePicker/ModalDateTimePicker.d.ts +12 -0
- package/dist/definitions/TimePicker/ModalDateTimePicker.d.ts.map +1 -0
- package/dist/definitions/TimePicker/TimePicker.d.ts +15 -0
- package/dist/definitions/TimePicker/TimePicker.d.ts.map +1 -0
- package/dist/definitions/TimePicker/TimePicker.web.d.ts +3 -0
- package/dist/definitions/TimePicker/TimePicker.web.d.ts.map +1 -0
- package/dist/definitions/TimePicker/useTimePicker.d.ts +14 -0
- package/dist/definitions/TimePicker/useTimePicker.d.ts.map +1 -0
- package/dist/definitions/Tooltip/Tooltip.d.ts +23 -3
- package/dist/definitions/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/definitions/Tooltip/Tooltip.web.d.ts +8 -0
- package/dist/definitions/Tooltip/Tooltip.web.d.ts.map +1 -0
- package/dist/definitions/Tooltip/TooltipView.d.ts +8 -0
- package/dist/definitions/Tooltip/TooltipView.d.ts.map +1 -0
- package/dist/definitions/Tooltip/tooltipUtils.d.ts +5 -0
- package/dist/definitions/Tooltip/tooltipUtils.d.ts.map +1 -0
- package/dist/definitions/forms/InputFeedback/InputFeedback.d.ts.map +1 -1
- package/dist/definitions/forms/InputField/InputField.d.ts.map +1 -1
- package/dist/definitions/forms/InputText/InputText.d.ts +3 -2
- package/dist/definitions/forms/InputText/InputText.d.ts.map +1 -1
- package/dist/definitions/forms/Label/Label.d.ts.map +1 -1
- package/dist/definitions/forms/Radio/Radio.d.ts.map +1 -1
- package/dist/definitions/forms/TextArea/TextArea.d.ts.map +1 -1
- package/dist/definitions/index.d.ts +9 -13
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/story-components/Flex.d.ts +2 -2
- package/dist/definitions/story-components/Flex.d.ts.map +1 -1
- package/dist/definitions/story-components/Story.d.ts.map +1 -1
- package/dist/definitions/story-components/StoryBlock.d.ts +1 -2
- package/dist/definitions/story-components/StoryBlock.d.ts.map +1 -1
- package/dist/definitions/story-components/StoryContainer.d.ts.map +1 -1
- package/dist/definitions/story-components/StoryContainer.web.d.ts.map +1 -1
- package/dist/definitions/story-components/StoryDecorator.d.ts +3 -3
- package/dist/definitions/story-components/StoryDecorator.d.ts.map +1 -1
- package/dist/definitions/story-components/StoryGrid.d.ts.map +1 -1
- package/dist/definitions/story-components/StorySection.d.ts +7 -9
- package/dist/definitions/story-components/StorySection.d.ts.map +1 -1
- package/dist/definitions/story-components/StoryTitle.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +3 -6
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/colorsLateOceanTheme.d.ts +1 -0
- package/dist/definitions/themes/late-ocean/colorsLateOceanTheme.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/tooltip.d.ts +10 -0
- package/dist/definitions/themes/late-ocean/tooltip.d.ts.map +1 -0
- package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts +6 -8
- package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts.map +1 -1
- package/dist/definitions/typography/Typography.d.ts +19 -7
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/definitions/typography/TypographyEmoji.d.ts +7 -0
- package/dist/definitions/typography/TypographyEmoji.d.ts.map +1 -0
- package/dist/definitions/typography/TypographyIcon.d.ts.map +1 -1
- package/dist/definitions/typography/TypographyLink.d.ts +9 -9
- package/dist/definitions/typography/TypographyLink.d.ts.map +1 -1
- package/dist/definitions/useKittTheme.d.ts +8 -1
- package/dist/definitions/useKittTheme.d.ts.map +1 -1
- package/dist/definitions/utils/StyleWebWrapper.d.ts +7 -0
- package/dist/definitions/utils/StyleWebWrapper.d.ts.map +1 -0
- package/dist/definitions/utils/storybook/{decorators/KittThemeDecorator.d.ts → KittThemeDecorator.d.ts} +1 -1
- package/dist/definitions/utils/storybook/KittThemeDecorator.d.ts.map +1 -0
- package/dist/definitions/utils/tests/renderWithProvidersUtils.d.ts +2 -2
- package/dist/definitions/utils/tests/renderWithProvidersUtils.d.ts.map +1 -1
- package/dist/definitions/utils/tests/styled-component-typing-test.d.ts +1 -0
- package/dist/definitions/utils/tests/styled-component-typing-test.d.ts.map +1 -1
- package/dist/definitions/utils/windowSize/MatchWindowSize.d.ts.map +1 -1
- package/dist/definitions/utils/windowSize/createWindowSizeHelper.d.ts +2 -2
- package/dist/definitions/utils/withTheme.d.ts +7 -0
- package/dist/definitions/utils/withTheme.d.ts.map +1 -0
- package/dist/index-browser-all.es.android.js +1437 -652
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.css +2 -0
- package/dist/index-browser-all.es.ios.js +1437 -652
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +1403 -724
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +1249 -837
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.css +2 -0
- package/dist/index-node-14.17.cjs.js +1244 -634
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/styles.css +4 -0
- package/dist/tsbuildinfo +1 -1
- package/package.json +19 -7
- package/translations/es-ES.json +3 -0
- package/translations/fr-FR.json +3 -0
- package/dist/definitions/Button/ButtonContainer.d.ts +0 -12
- package/dist/definitions/Button/ButtonContainer.d.ts.map +0 -1
- package/dist/definitions/Button/useButton.d.ts +0 -6
- package/dist/definitions/Button/useButton.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveLink.d.ts +0 -11
- package/dist/definitions/primitives/PrimitiveLink.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveLink.web.d.ts +0 -4
- package/dist/definitions/primitives/PrimitiveLink.web.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitivePressable.d.ts +0 -16
- package/dist/definitions/primitives/PrimitivePressable.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitivePressable.web.d.ts +0 -4
- package/dist/definitions/primitives/PrimitivePressable.web.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveScrollView.d.ts +0 -8
- package/dist/definitions/primitives/PrimitiveScrollView.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveScrollView.web.d.ts +0 -4
- package/dist/definitions/primitives/PrimitiveScrollView.web.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveText.d.ts +0 -14
- package/dist/definitions/primitives/PrimitiveText.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveText.web.d.ts +0 -6
- package/dist/definitions/primitives/PrimitiveText.web.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveView.d.ts +0 -21
- package/dist/definitions/primitives/PrimitiveView.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveView.web.d.ts +0 -23
- package/dist/definitions/primitives/PrimitiveView.web.d.ts.map +0 -1
- package/dist/definitions/primitives/helpers.d.ts +0 -7
- package/dist/definitions/primitives/helpers.d.ts.map +0 -1
- package/dist/definitions/primitives/reset.d.ts +0 -2
- package/dist/definitions/primitives/reset.d.ts.map +0 -1
- package/dist/definitions/utils/storybook/decorators/KittThemeDecorator.d.ts.map +0 -1
- package/dist/definitions/utils/storybook/decorators/SafeAreaProviderDecorator.d.ts +0 -2
- package/dist/definitions/utils/storybook/decorators/SafeAreaProviderDecorator.d.ts.map +0 -1
- package/dist/definitions/utils/storybook/setup-global-decorators.d.ts +0 -2
- package/dist/definitions/utils/storybook/setup-global-decorators.d.ts.map +0 -1
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
-
import _taggedTemplateLiteral from '@babel/runtime/helpers/taggedTemplateLiteral';
|
|
4
3
|
import { UserIcon, EyeIcon, EyeOffIcon, XIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon } from '@ornikar/kitt-icons';
|
|
5
4
|
export * from '@ornikar/kitt-icons';
|
|
6
|
-
import
|
|
7
|
-
import { View, Animated, Easing, Text as Text$1, Image, Pressable, TextInput, useWindowDimensions, ActivityIndicator, TouchableOpacity, StyleSheet, ScrollView, Modal as Modal$1 } from 'react-native';
|
|
5
|
+
import { Animated, Easing, useWindowDimensions, Image, Platform, Linking, TextInput, Pressable, ActivityIndicator, TouchableOpacity, View, StyleSheet, ScrollView, Modal as Modal$1, Text as Text$1 } from 'react-native';
|
|
8
6
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
9
|
-
import styled, { useTheme, css, ThemeProvider } from 'styled-components';
|
|
7
|
+
import styled, { useTheme, css, ThemeProvider } from 'styled-components/native';
|
|
8
|
+
import { useRef, useEffect, cloneElement, useContext, createContext, useState, useMemo, forwardRef, Fragment, Children } from 'react';
|
|
9
|
+
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
10
10
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
11
|
-
import {
|
|
11
|
+
import { parse } from 'twemoji-parser';
|
|
12
|
+
import { openBrowserAsync } from 'expo-web-browser';
|
|
13
|
+
import _extends from '@babel/runtime/helpers/extends';
|
|
14
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
12
15
|
import Animated$1, { useSharedValue, useAnimatedStyle, withSpring } from 'react-native-reanimated';
|
|
13
|
-
import
|
|
16
|
+
import DateTimePicker from '@react-native-community/datetimepicker';
|
|
17
|
+
import { FormattedMessage } from 'react-intl';
|
|
18
|
+
import { useFloating, offset, shift, flip } from '@floating-ui/react-native';
|
|
14
19
|
import { makeDecorator } from '@storybook/addons';
|
|
15
20
|
|
|
16
|
-
var PrimitiveView = View;
|
|
17
|
-
|
|
18
21
|
function SpinningIcon(_ref) {
|
|
19
22
|
var children = _ref.children;
|
|
20
23
|
var animationRef = useRef(new Animated.Value(0));
|
|
@@ -37,17 +40,19 @@ function SpinningIcon(_ref) {
|
|
|
37
40
|
return undefined;
|
|
38
41
|
};
|
|
39
42
|
}, []);
|
|
40
|
-
return /*#__PURE__*/
|
|
43
|
+
return /*#__PURE__*/jsx(Animated.View, {
|
|
41
44
|
style: {
|
|
42
45
|
transform: [{
|
|
43
46
|
rotate: rotation
|
|
44
47
|
}]
|
|
45
|
-
}
|
|
46
|
-
|
|
48
|
+
},
|
|
49
|
+
children: children
|
|
50
|
+
});
|
|
47
51
|
}
|
|
48
52
|
|
|
49
|
-
var
|
|
50
|
-
|
|
53
|
+
var IconContainer$2 = /*#__PURE__*/styled.View.withConfig({
|
|
54
|
+
displayName: "Icon__IconContainer"
|
|
55
|
+
})(["color:", ";width:", "px;height:", "px;align-self:", ";"], function (_ref) {
|
|
51
56
|
var color = _ref.color;
|
|
52
57
|
return color;
|
|
53
58
|
}, function (_ref2) {
|
|
@@ -68,92 +73,172 @@ function Icon(_ref5) {
|
|
|
68
73
|
spin = _ref5.spin,
|
|
69
74
|
align = _ref5.align,
|
|
70
75
|
color = _ref5.color;
|
|
71
|
-
var clonedIcon = /*#__PURE__*/
|
|
76
|
+
var clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
72
77
|
color: color
|
|
73
78
|
});
|
|
74
|
-
return /*#__PURE__*/
|
|
79
|
+
return /*#__PURE__*/jsx(IconContainer$2, {
|
|
75
80
|
align: align,
|
|
76
81
|
size: size,
|
|
77
|
-
color: color
|
|
78
|
-
|
|
82
|
+
color: color,
|
|
83
|
+
children: spin ? /*#__PURE__*/jsx(SpinningIcon, {
|
|
84
|
+
children: clonedIcon
|
|
85
|
+
}) : clonedIcon
|
|
86
|
+
});
|
|
79
87
|
}
|
|
80
88
|
|
|
81
|
-
var
|
|
89
|
+
var KittBreakpoints = {
|
|
90
|
+
/**
|
|
91
|
+
* min-width: 0
|
|
92
|
+
*/
|
|
93
|
+
BASE: 0,
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* min-width: 480px
|
|
97
|
+
*/
|
|
98
|
+
SMALL: 480,
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* min-width: 768px
|
|
102
|
+
*/
|
|
103
|
+
MEDIUM: 768,
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* min-width: 1024px
|
|
107
|
+
*/
|
|
108
|
+
LARGE: 1024,
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* min-width: 1280px
|
|
112
|
+
*/
|
|
113
|
+
WIDE: 1280
|
|
114
|
+
};
|
|
115
|
+
var KittBreakpointsMax = {
|
|
116
|
+
/**
|
|
117
|
+
* max-width: 479px
|
|
118
|
+
*/
|
|
119
|
+
BASE: KittBreakpoints.SMALL - 1,
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* max-width: 767px
|
|
123
|
+
*/
|
|
124
|
+
SMALL: KittBreakpoints.MEDIUM - 1,
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* max-width: 1023px
|
|
128
|
+
*/
|
|
129
|
+
MEDIUM: KittBreakpoints.LARGE - 1,
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* max-width: 1279px
|
|
133
|
+
*/
|
|
134
|
+
LARGE: KittBreakpoints.WIDE - 1
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
var _excluded$c = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
|
|
82
138
|
|
|
83
|
-
|
|
139
|
+
function ownKeys$h(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
84
140
|
|
|
85
|
-
var
|
|
86
|
-
var
|
|
141
|
+
function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$h(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$h(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
142
|
+
var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
|
|
87
143
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
88
144
|
function useTypographyColor() {
|
|
89
145
|
return useContext(TypographyColorContext);
|
|
90
146
|
}
|
|
91
|
-
var
|
|
92
|
-
var
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
headers = _theme$kitt$typograph.headers,
|
|
98
|
-
bodies = _theme$kitt$typograph.bodies;
|
|
99
|
-
return "\n /* type */\n ".concat(!type ? '' : "\n font-family: ".concat(isHeader ? headers.fontFamily[variant] : bodies.fontFamily[variant], ";\n font-size: ").concat(isHeader ? headers.configs[type].baseAndSmall.fontSize : bodies.configs[type].baseAndSmall.fontSize, ";\n line-height: ").concat(isHeader ? headers.configs[type].baseAndSmall.lineHeight : bodies.configs[type].baseAndSmall.lineHeight, ";\n "), "\n\n /* variant */\n font-weight: ").concat(isHeader ? headers.fontWeight : bodies.fontWeight[variant], ";\n font-style: ").concat(isHeader ? headers.fontStyle : bodies.fontStyle[variant], ";\n ");
|
|
100
|
-
}, function (_ref2) {
|
|
101
|
-
var theme = _ref2.theme,
|
|
102
|
-
color = _ref2.color;
|
|
103
|
-
return !color ? '' : "\n color: ".concat(theme.kitt.typography.colors[color], ";\n text-decoration-color: ").concat(theme.kitt.typography.colors[color], ";\n ");
|
|
104
|
-
});
|
|
147
|
+
var getTypographyTypeConfigKey = function (theme) {
|
|
148
|
+
var isMediumOrAbove = theme.responsive.matchWindowSize({
|
|
149
|
+
minWidth: KittBreakpoints.MEDIUM
|
|
150
|
+
});
|
|
151
|
+
return isMediumOrAbove ? 'mediumAndWide' : 'baseAndSmall';
|
|
152
|
+
};
|
|
105
153
|
|
|
106
154
|
var isTypeHeader = function (type) {
|
|
107
155
|
return type.startsWith('header');
|
|
108
156
|
};
|
|
109
157
|
|
|
110
|
-
var isTypographyHeader = function (
|
|
111
|
-
if (
|
|
112
|
-
if (
|
|
158
|
+
var isTypographyHeader = function (type, typographyIsHeaderInContext) {
|
|
159
|
+
if (type) return isTypeHeader(type);
|
|
160
|
+
if (typographyIsHeaderInContext != null) return typographyIsHeaderInContext;
|
|
113
161
|
throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
|
|
114
162
|
};
|
|
163
|
+
function getTypographyTypeConfig(type, theme) {
|
|
164
|
+
if (isTypographyHeader(type, undefined)) {
|
|
165
|
+
return theme.kitt.typography.types.headers.configs[type];
|
|
166
|
+
}
|
|
115
167
|
|
|
168
|
+
return theme.kitt.typography.types.bodies.configs[type];
|
|
169
|
+
}
|
|
170
|
+
var StyledTypography = /*#__PURE__*/styled.Text.withConfig({
|
|
171
|
+
displayName: "Typography__StyledTypography"
|
|
172
|
+
})(["", " ", ""], function (_ref) {
|
|
173
|
+
var theme = _ref.theme,
|
|
174
|
+
$isHeader = _ref.$isHeader,
|
|
175
|
+
$typeForCurrentWindowSize = _ref.$typeForCurrentWindowSize,
|
|
176
|
+
$variant = _ref.$variant;
|
|
177
|
+
var _theme$kitt$typograph = theme.kitt.typography.types,
|
|
178
|
+
headers = _theme$kitt$typograph.headers,
|
|
179
|
+
bodies = _theme$kitt$typograph.bodies;
|
|
180
|
+
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
181
|
+
return "\n /* type */\n ".concat(!$typeForCurrentWindowSize ? '' : "\n font-family: ".concat($isHeader ? headers.fontFamily[$variant] : bodies.fontFamily[$variant], ";\n font-size: ").concat($isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize, ";\n line-height: ").concat($isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight, ";\n "), "\n\n /* variant */\n font-weight: ").concat($isHeader ? headers.fontWeight : bodies.fontWeight[$variant], ";\n font-style: ").concat($isHeader ? headers.fontStyle : bodies.fontStyle[$variant], ";\n ");
|
|
182
|
+
}, function (_ref2) {
|
|
183
|
+
var theme = _ref2.theme,
|
|
184
|
+
$color = _ref2.$color;
|
|
185
|
+
return !$color ? '' : "\n color: ".concat(theme.kitt.typography.colors[$color], ";\n text-decoration-color: ").concat(theme.kitt.typography.colors[$color], ";\n ");
|
|
186
|
+
});
|
|
187
|
+
function useTypographyTypeForCurrentWindowSize(base, small, medium, large) {
|
|
188
|
+
var _useWindowDimensions = useWindowDimensions(),
|
|
189
|
+
width = _useWindowDimensions.width;
|
|
190
|
+
|
|
191
|
+
if (large && width >= KittBreakpoints.LARGE) return large;
|
|
192
|
+
if (medium && width >= KittBreakpoints.MEDIUM) return medium;
|
|
193
|
+
if (small && width >= KittBreakpoints.SMALL) return small;
|
|
194
|
+
return base;
|
|
195
|
+
}
|
|
116
196
|
function Typography(_ref3) {
|
|
117
197
|
var accessibilityRole = _ref3.accessibilityRole,
|
|
118
198
|
base = _ref3.base,
|
|
199
|
+
small = _ref3.small,
|
|
200
|
+
medium = _ref3.medium,
|
|
201
|
+
large = _ref3.large,
|
|
119
202
|
variant = _ref3.variant,
|
|
120
203
|
color = _ref3.color,
|
|
121
|
-
otherProps = _objectWithoutProperties(_ref3, _excluded$
|
|
122
|
-
|
|
123
|
-
var
|
|
124
|
-
var
|
|
125
|
-
var
|
|
126
|
-
var
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
value:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
204
|
+
otherProps = _objectWithoutProperties(_ref3, _excluded$c);
|
|
205
|
+
|
|
206
|
+
var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
|
|
207
|
+
var typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(base, small, medium, large);
|
|
208
|
+
var isHeader = isTypographyHeader(typeForCurrentWindowSize, isHeaderTypographyInContext);
|
|
209
|
+
var nonNullableVariant = variant !== null && variant !== void 0 ? variant : isHeader ? 'bold' : 'regular'; // if isHeaderTypographyInContext exists, it means we are inside another typography so we don't want to
|
|
210
|
+
// redefine the color, just inherit from it
|
|
211
|
+
|
|
212
|
+
var colorWithDefaultToBlack = color !== null && color !== void 0 ? color : isHeaderTypographyInContext !== undefined ? undefined : 'black';
|
|
213
|
+
var content = base ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
|
|
214
|
+
value: isHeader,
|
|
215
|
+
children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$h({
|
|
216
|
+
$color: colorWithDefaultToBlack,
|
|
217
|
+
$isHeader: isHeader,
|
|
218
|
+
$typeForCurrentWindowSize: typeForCurrentWindowSize,
|
|
219
|
+
$variant: nonNullableVariant,
|
|
220
|
+
accessibilityRole: accessibilityRole || undefined
|
|
221
|
+
}, otherProps))
|
|
222
|
+
}) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$h({
|
|
223
|
+
$color: colorWithDefaultToBlack,
|
|
224
|
+
$isHeader: isHeader,
|
|
225
|
+
$variant: nonNullableVariant,
|
|
142
226
|
accessibilityRole: accessibilityRole || undefined
|
|
143
227
|
}, otherProps));
|
|
144
|
-
return color ? /*#__PURE__*/
|
|
145
|
-
value: color
|
|
146
|
-
|
|
228
|
+
return color ? /*#__PURE__*/jsx(TypographyColorContext.Provider, {
|
|
229
|
+
value: color,
|
|
230
|
+
children: content
|
|
231
|
+
}) : content;
|
|
147
232
|
}
|
|
148
233
|
|
|
149
234
|
function TypographyText(props) {
|
|
150
|
-
return /*#__PURE__*/
|
|
235
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$h({
|
|
151
236
|
accessibilityRole: null
|
|
152
237
|
}, props));
|
|
153
238
|
}
|
|
154
239
|
|
|
155
240
|
function TypographyParagraph(props) {
|
|
156
|
-
return /*#__PURE__*/
|
|
241
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$h({
|
|
157
242
|
accessibilityRole: "paragraph"
|
|
158
243
|
}, props));
|
|
159
244
|
}
|
|
@@ -161,10 +246,10 @@ function TypographyParagraph(props) {
|
|
|
161
246
|
var createHeading = function (level, defaultBase) {
|
|
162
247
|
// https://github.com/necolas/react-native-web/issues/401
|
|
163
248
|
function TypographyHeading(props) {
|
|
164
|
-
return /*#__PURE__*/
|
|
249
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$h(_objectSpread$h({
|
|
165
250
|
accessibilityRole: "header",
|
|
166
251
|
base: defaultBase
|
|
167
|
-
}, props, {
|
|
252
|
+
}, props), {}, {
|
|
168
253
|
accessibilityLevel: level
|
|
169
254
|
}));
|
|
170
255
|
}
|
|
@@ -197,9 +282,11 @@ Typography.h4 = createHeading(4, 'header4');
|
|
|
197
282
|
|
|
198
283
|
Typography.h5 = createHeading(5, 'header5');
|
|
199
284
|
|
|
200
|
-
var _excluded$
|
|
285
|
+
var _excluded$b = ["size"];
|
|
286
|
+
|
|
287
|
+
function ownKeys$g(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
201
288
|
|
|
202
|
-
var
|
|
289
|
+
function _objectSpread$g(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$g(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$g(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
203
290
|
|
|
204
291
|
var getFirstCharacter = function (string) {
|
|
205
292
|
return string ? string[0] : '';
|
|
@@ -209,7 +296,9 @@ var getInitials = function (firstname, lastname) {
|
|
|
209
296
|
return (getFirstCharacter(firstname) + getFirstCharacter(lastname)).toUpperCase();
|
|
210
297
|
};
|
|
211
298
|
|
|
212
|
-
var StyledAvatarView = styled(
|
|
299
|
+
var StyledAvatarView = /*#__PURE__*/styled.View.withConfig({
|
|
300
|
+
displayName: "Avatar__StyledAvatarView"
|
|
301
|
+
})(["border-radius:", "px;background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], function (_ref) {
|
|
213
302
|
var round = _ref.round,
|
|
214
303
|
size = _ref.size;
|
|
215
304
|
return round ? size / 2 : 10;
|
|
@@ -234,7 +323,7 @@ function AvatarContent(_ref5) {
|
|
|
234
323
|
light = _ref5.light;
|
|
235
324
|
|
|
236
325
|
if (src) {
|
|
237
|
-
return /*#__PURE__*/
|
|
326
|
+
return /*#__PURE__*/jsx(Image, {
|
|
238
327
|
source: {
|
|
239
328
|
uri: src
|
|
240
329
|
},
|
|
@@ -246,15 +335,16 @@ function AvatarContent(_ref5) {
|
|
|
246
335
|
}
|
|
247
336
|
|
|
248
337
|
if (firstname && lastname) {
|
|
249
|
-
return /*#__PURE__*/
|
|
338
|
+
return /*#__PURE__*/jsx(Typography.Text, {
|
|
250
339
|
base: "body-small",
|
|
251
340
|
variant: "bold",
|
|
252
|
-
color: light ? 'black' : 'white'
|
|
253
|
-
|
|
341
|
+
color: light ? 'black' : 'white',
|
|
342
|
+
children: getInitials(firstname, lastname)
|
|
343
|
+
});
|
|
254
344
|
}
|
|
255
345
|
|
|
256
|
-
return /*#__PURE__*/
|
|
257
|
-
icon: /*#__PURE__*/
|
|
346
|
+
return /*#__PURE__*/jsx(Icon, {
|
|
347
|
+
icon: /*#__PURE__*/jsx(UserIcon, {}),
|
|
258
348
|
color: light ? 'black' : 'white',
|
|
259
349
|
size: size / 2
|
|
260
350
|
});
|
|
@@ -263,75 +353,37 @@ function AvatarContent(_ref5) {
|
|
|
263
353
|
function Avatar(_ref6) {
|
|
264
354
|
var _ref6$size = _ref6.size,
|
|
265
355
|
size = _ref6$size === void 0 ? 40 : _ref6$size,
|
|
266
|
-
rest = _objectWithoutProperties(_ref6, _excluded$
|
|
356
|
+
rest = _objectWithoutProperties(_ref6, _excluded$b);
|
|
267
357
|
|
|
268
|
-
return /*#__PURE__*/
|
|
269
|
-
size: size
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
358
|
+
return /*#__PURE__*/jsx(StyledAvatarView, _objectSpread$g(_objectSpread$g({}, rest), {}, {
|
|
359
|
+
size: size,
|
|
360
|
+
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$g(_objectSpread$g({}, rest), {}, {
|
|
361
|
+
size: size
|
|
362
|
+
}))
|
|
363
|
+
}));
|
|
273
364
|
}
|
|
274
365
|
|
|
275
|
-
var
|
|
276
|
-
|
|
277
|
-
var _templateObject$r;
|
|
278
|
-
var ButtonContainer = styled(PrimitivePressable)(_templateObject$r || (_templateObject$r = _taggedTemplateLiteral(["\n min-width: ", ";\n max-width: ", ";\n width: ", ";\n min-height: ", ";\n background-color: ", ";\n padding: ", ";\n flex-direction: row;\n\n /* Emulate inline-* css display by making the button taking only its necessary space */\n align-self: flex-start;\n border-radius: ", ";\n border-color: ", ";\n border-width: ", ";\n"])), function (_ref) {
|
|
279
|
-
var theme = _ref.theme;
|
|
280
|
-
return theme.kitt.button.minWidth;
|
|
281
|
-
}, function (_ref2) {
|
|
282
|
-
var theme = _ref2.theme,
|
|
283
|
-
stretch = _ref2.stretch;
|
|
284
|
-
return stretch ? 'auto' : theme.kitt.button.maxWidth;
|
|
285
|
-
}, function (_ref3) {
|
|
286
|
-
var stretch = _ref3.stretch;
|
|
287
|
-
return stretch ? '100%' : 'auto';
|
|
288
|
-
}, function (_ref4) {
|
|
289
|
-
var theme = _ref4.theme;
|
|
290
|
-
return theme.kitt.button.minHeight;
|
|
291
|
-
}, function (_ref5) {
|
|
292
|
-
var theme = _ref5.theme,
|
|
293
|
-
isPressed = _ref5.isPressed,
|
|
294
|
-
disabled = _ref5.disabled,
|
|
295
|
-
type = _ref5.type;
|
|
296
|
-
|
|
297
|
-
if (disabled) {
|
|
298
|
-
return theme.kitt.button[type].disabledBackgroundColor;
|
|
299
|
-
}
|
|
366
|
+
var _excluded$a = ["color"],
|
|
367
|
+
_excluded2$2 = ["color"];
|
|
300
368
|
|
|
301
|
-
|
|
302
|
-
}, function (_ref6) {
|
|
303
|
-
var theme = _ref6.theme;
|
|
304
|
-
return theme.kitt.button.contentPadding["default"];
|
|
305
|
-
}, function (_ref7) {
|
|
306
|
-
var theme = _ref7.theme;
|
|
307
|
-
return theme.kitt.button.borderRadius;
|
|
308
|
-
}, function (_ref8) {
|
|
309
|
-
var theme = _ref8.theme,
|
|
310
|
-
disabled = _ref8.disabled,
|
|
311
|
-
type = _ref8.type;
|
|
312
|
-
return disabled ? theme.kitt.button[type].disabledBorderColor : 'transparent';
|
|
313
|
-
}, function (_ref9) {
|
|
314
|
-
var theme = _ref9.theme;
|
|
315
|
-
return theme.kitt.button.borderWidth;
|
|
316
|
-
});
|
|
369
|
+
function ownKeys$f(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
317
370
|
|
|
318
|
-
|
|
319
|
-
_excluded2$2 = ["color"];
|
|
371
|
+
function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$f(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$f(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
320
372
|
|
|
321
373
|
function TypographyIconInheritColor(props) {
|
|
322
374
|
var color = useTypographyColor();
|
|
323
|
-
var theme = useTheme();
|
|
324
|
-
return /*#__PURE__*/
|
|
375
|
+
var theme = /*#__PURE__*/useTheme();
|
|
376
|
+
return /*#__PURE__*/jsx(Icon, _objectSpread$f(_objectSpread$f({}, props), {}, {
|
|
325
377
|
color: theme.kitt.typography.colors[color]
|
|
326
378
|
}));
|
|
327
379
|
}
|
|
328
380
|
|
|
329
381
|
function TypographyIconSpecifiedColor(_ref) {
|
|
330
382
|
var color = _ref.color,
|
|
331
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
383
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$a);
|
|
332
384
|
|
|
333
|
-
var theme = useTheme();
|
|
334
|
-
return /*#__PURE__*/
|
|
385
|
+
var theme = /*#__PURE__*/useTheme();
|
|
386
|
+
return /*#__PURE__*/jsx(Icon, _objectSpread$f(_objectSpread$f({}, otherProps), {}, {
|
|
335
387
|
color: theme.kitt.typography.colors[color]
|
|
336
388
|
}));
|
|
337
389
|
}
|
|
@@ -341,15 +393,17 @@ function TypographyIcon(_ref2) {
|
|
|
341
393
|
otherProps = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
342
394
|
|
|
343
395
|
if (color) {
|
|
344
|
-
return /*#__PURE__*/
|
|
396
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$f({
|
|
345
397
|
color: color
|
|
346
398
|
}, otherProps));
|
|
347
399
|
}
|
|
348
400
|
|
|
349
|
-
return /*#__PURE__*/
|
|
401
|
+
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$f({}, otherProps));
|
|
350
402
|
}
|
|
351
403
|
|
|
352
|
-
|
|
404
|
+
function ownKeys$e(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
405
|
+
|
|
406
|
+
function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$e(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$e(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
353
407
|
|
|
354
408
|
var getTextColorByType = function (type, isPressed, disabled) {
|
|
355
409
|
if (disabled) return 'black-light';
|
|
@@ -370,13 +424,19 @@ var getTextColorByType = function (type, isPressed, disabled) {
|
|
|
370
424
|
}
|
|
371
425
|
};
|
|
372
426
|
|
|
373
|
-
var ButtonText = styled(Typography.Text)(
|
|
374
|
-
|
|
427
|
+
var ButtonText = /*#__PURE__*/styled(Typography.Text).withConfig({
|
|
428
|
+
displayName: "ButtonContent__ButtonText"
|
|
429
|
+
})(["text-align:center;"]);
|
|
430
|
+
var Content$1 = /*#__PURE__*/styled.View.withConfig({
|
|
431
|
+
displayName: "ButtonContent__Content"
|
|
432
|
+
})(["flex-direction:row;align-items:center;justify-content:center;flex:", ";"], function (_ref) {
|
|
375
433
|
var stretch = _ref.stretch,
|
|
376
434
|
iconOnly = _ref.iconOnly;
|
|
377
435
|
return "".concat(stretch || iconOnly ? 1 : 0, " 1 auto");
|
|
378
436
|
});
|
|
379
|
-
var IconContainer$1 = styled(
|
|
437
|
+
var IconContainer$1 = /*#__PURE__*/styled.View.withConfig({
|
|
438
|
+
displayName: "ButtonContent__IconContainer"
|
|
439
|
+
})(["", ""], function (_ref2) {
|
|
380
440
|
var theme = _ref2.theme,
|
|
381
441
|
iconPosition = _ref2.iconPosition;
|
|
382
442
|
var value = theme.kitt.spacing * 3;
|
|
@@ -395,15 +455,16 @@ function ButtonIcon(_ref3) {
|
|
|
395
455
|
size = _ref3.size,
|
|
396
456
|
iconPosition = _ref3.iconPosition,
|
|
397
457
|
testID = _ref3.testID;
|
|
398
|
-
return /*#__PURE__*/
|
|
399
|
-
iconPosition: iconPosition
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
458
|
+
return /*#__PURE__*/jsx(IconContainer$1, {
|
|
459
|
+
iconPosition: iconPosition,
|
|
460
|
+
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
461
|
+
icon: icon,
|
|
462
|
+
spin: spin,
|
|
463
|
+
color: color,
|
|
464
|
+
size: size,
|
|
465
|
+
testID: testID
|
|
466
|
+
})
|
|
467
|
+
});
|
|
407
468
|
}
|
|
408
469
|
|
|
409
470
|
function ButtonContent(_ref4) {
|
|
@@ -416,7 +477,7 @@ function ButtonContent(_ref4) {
|
|
|
416
477
|
disabled = _ref4.disabled,
|
|
417
478
|
children = _ref4.children;
|
|
418
479
|
var color = getTextColorByType(type, Boolean(isPressed), Boolean(disabled));
|
|
419
|
-
var theme = useTheme();
|
|
480
|
+
var theme = /*#__PURE__*/useTheme();
|
|
420
481
|
var sharedIconProps = {
|
|
421
482
|
spin: iconSpin,
|
|
422
483
|
color: color,
|
|
@@ -430,47 +491,78 @@ function ButtonContent(_ref4) {
|
|
|
430
491
|
}
|
|
431
492
|
|
|
432
493
|
if (!children) {
|
|
433
|
-
return /*#__PURE__*/
|
|
494
|
+
return /*#__PURE__*/jsx(Content$1, {
|
|
434
495
|
iconOnly: true,
|
|
435
|
-
stretch: stretch
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
496
|
+
stretch: stretch,
|
|
497
|
+
children: /*#__PURE__*/jsx(TypographyIcon, _objectSpread$e(_objectSpread$e({}, sharedIconProps), {}, {
|
|
498
|
+
icon: icon
|
|
499
|
+
}))
|
|
500
|
+
});
|
|
439
501
|
}
|
|
440
502
|
|
|
441
|
-
return /*#__PURE__*/
|
|
442
|
-
stretch: stretch
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
icon
|
|
453
|
-
|
|
454
|
-
|
|
503
|
+
return /*#__PURE__*/jsxs(Content$1, {
|
|
504
|
+
stretch: stretch,
|
|
505
|
+
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$e(_objectSpread$e({}, sharedIconProps), {}, {
|
|
506
|
+
icon: icon,
|
|
507
|
+
iconPosition: iconPosition,
|
|
508
|
+
testID: "button-left-icon"
|
|
509
|
+
})) : null, /*#__PURE__*/jsx(ButtonText, {
|
|
510
|
+
base: "body",
|
|
511
|
+
color: color,
|
|
512
|
+
variant: "bold",
|
|
513
|
+
children: children
|
|
514
|
+
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$e(_objectSpread$e({}, sharedIconProps), {}, {
|
|
515
|
+
icon: icon,
|
|
516
|
+
iconPosition: iconPosition
|
|
517
|
+
})) : null]
|
|
518
|
+
});
|
|
455
519
|
}
|
|
456
520
|
|
|
457
|
-
var
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
521
|
+
var ButtonPressable = /*#__PURE__*/styled.Pressable.withConfig({
|
|
522
|
+
displayName: "ButtonPressable"
|
|
523
|
+
})(["min-width:", ";max-width:", ";width:", ";min-height:", ";background-color:", ";padding:", ";flex-direction:row;align-self:flex-start;border-radius:", ";border-color:", ";border-width:", ";"], function (_ref) {
|
|
524
|
+
var theme = _ref.theme;
|
|
525
|
+
return theme.kitt.button.minWidth;
|
|
526
|
+
}, function (_ref2) {
|
|
527
|
+
var theme = _ref2.theme,
|
|
528
|
+
stretch = _ref2.stretch;
|
|
529
|
+
return stretch ? 'auto' : theme.kitt.button.maxWidth;
|
|
530
|
+
}, function (_ref3) {
|
|
531
|
+
var stretch = _ref3.stretch;
|
|
532
|
+
return stretch ? '100%' : 'auto';
|
|
533
|
+
}, function (_ref4) {
|
|
534
|
+
var theme = _ref4.theme;
|
|
535
|
+
return theme.kitt.button.minHeight;
|
|
536
|
+
}, function (_ref5) {
|
|
537
|
+
var theme = _ref5.theme,
|
|
538
|
+
isPressed = _ref5.isPressed,
|
|
539
|
+
disabled = _ref5.disabled,
|
|
540
|
+
type = _ref5.type;
|
|
462
541
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
542
|
+
if (disabled) {
|
|
543
|
+
return theme.kitt.button[type].disabledBackgroundColor;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
return isPressed ? theme.kitt.button[type].pressedBackgroundColor : theme.kitt.button[type].backgroundColor;
|
|
547
|
+
}, function (_ref6) {
|
|
548
|
+
var theme = _ref6.theme;
|
|
549
|
+
return theme.kitt.button.contentPadding["default"];
|
|
550
|
+
}, function (_ref7) {
|
|
551
|
+
var theme = _ref7.theme;
|
|
552
|
+
return theme.kitt.button.borderRadius;
|
|
553
|
+
}, function (_ref8) {
|
|
554
|
+
var theme = _ref8.theme,
|
|
555
|
+
disabled = _ref8.disabled,
|
|
556
|
+
type = _ref8.type;
|
|
557
|
+
return disabled ? theme.kitt.button[type].disabledBorderColor : 'transparent';
|
|
558
|
+
}, function (_ref9) {
|
|
559
|
+
var theme = _ref9.theme;
|
|
560
|
+
return theme.kitt.button.borderWidth;
|
|
561
|
+
});
|
|
473
562
|
|
|
563
|
+
function ownKeys$d(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
564
|
+
|
|
565
|
+
function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$d(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$d(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
474
566
|
function Button(_ref) {
|
|
475
567
|
var children = _ref.children,
|
|
476
568
|
_ref$type = _ref.type,
|
|
@@ -481,38 +573,49 @@ function Button(_ref) {
|
|
|
481
573
|
iconSpin = _ref.iconSpin,
|
|
482
574
|
stretch = _ref.stretch,
|
|
483
575
|
disabled = _ref.disabled,
|
|
484
|
-
|
|
485
|
-
|
|
576
|
+
testID = _ref.testID,
|
|
577
|
+
href = _ref.href,
|
|
578
|
+
hrefAttrs = _ref.hrefAttrs,
|
|
579
|
+
onPress = _ref.onPress;
|
|
486
580
|
|
|
487
|
-
var
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
581
|
+
var _useState = useState(false),
|
|
582
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
583
|
+
isPressed = _useState2[0],
|
|
584
|
+
setIsPressed = _useState2[1];
|
|
491
585
|
|
|
492
586
|
var sharedProps = {
|
|
493
587
|
type: type,
|
|
494
588
|
stretch: stretch,
|
|
495
589
|
disabled: disabled
|
|
496
590
|
};
|
|
497
|
-
return /*#__PURE__*/
|
|
591
|
+
return /*#__PURE__*/jsx(ButtonPressable // eslint-disable-next-line unicorn/expiring-todo-comments
|
|
498
592
|
// TODO: When designs are defined, update with the proper onPress styles to mimic TouchableHighlight
|
|
499
593
|
// underlayColor={globalTheme.button[type].pressedBackgroundColor}
|
|
500
|
-
,
|
|
594
|
+
, _objectSpread$d(_objectSpread$d({}, sharedProps), {}, {
|
|
501
595
|
isPressed: isPressed,
|
|
502
596
|
accessibilityRole: "button",
|
|
503
597
|
testID: testID,
|
|
598
|
+
href: href,
|
|
599
|
+
hrefAttrs: hrefAttrs,
|
|
504
600
|
onPress: onPress,
|
|
505
|
-
onPressIn: handleButtonPressIn
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
601
|
+
onPressIn: function handleButtonPressIn() {
|
|
602
|
+
return setIsPressed(true);
|
|
603
|
+
},
|
|
604
|
+
onPressOut: function handleButtonPressOut() {
|
|
605
|
+
return setIsPressed(false);
|
|
606
|
+
},
|
|
607
|
+
children: /*#__PURE__*/jsx(ButtonContent, _objectSpread$d(_objectSpread$d({}, sharedProps), {}, {
|
|
608
|
+
icon: icon,
|
|
609
|
+
iconPosition: iconPosition,
|
|
610
|
+
iconSpin: iconSpin,
|
|
611
|
+
children: children
|
|
612
|
+
}))
|
|
613
|
+
}));
|
|
512
614
|
}
|
|
513
615
|
|
|
514
|
-
var
|
|
515
|
-
|
|
616
|
+
var Container$6 = /*#__PURE__*/styled.View.withConfig({
|
|
617
|
+
displayName: "Card__Container"
|
|
618
|
+
})(["background-color:", ";padding:", ";border-radius:", ";border-width:", ";border-color:", ";"], function (_ref) {
|
|
516
619
|
var theme = _ref.theme,
|
|
517
620
|
type = _ref.type;
|
|
518
621
|
return theme.kitt.card[type].backgroundColor;
|
|
@@ -533,93 +636,135 @@ var Container$5 = styled(PrimitiveView)(_templateObject$p || (_templateObject$p
|
|
|
533
636
|
function Card(_ref6) {
|
|
534
637
|
var children = _ref6.children,
|
|
535
638
|
type = _ref6.type;
|
|
536
|
-
return /*#__PURE__*/
|
|
537
|
-
type: type
|
|
538
|
-
|
|
639
|
+
return /*#__PURE__*/jsx(Container$6, {
|
|
640
|
+
type: type,
|
|
641
|
+
children: children
|
|
642
|
+
});
|
|
539
643
|
}
|
|
540
644
|
|
|
541
|
-
var
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
645
|
+
var StyledEmoji = /*#__PURE__*/styled.Image.withConfig({
|
|
646
|
+
displayName: "Emoji__StyledEmoji"
|
|
647
|
+
})(["width:", "px;height:", "px;"], function (_ref) {
|
|
648
|
+
var size = _ref.size;
|
|
649
|
+
return size;
|
|
650
|
+
}, function (_ref2) {
|
|
651
|
+
var size = _ref2.size;
|
|
652
|
+
return size;
|
|
653
|
+
});
|
|
654
|
+
function Emoji(_ref3) {
|
|
655
|
+
var emoji = _ref3.emoji,
|
|
656
|
+
size = _ref3.size,
|
|
657
|
+
style = _ref3.style;
|
|
545
658
|
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
659
|
+
var _useMemo = useMemo(function () {
|
|
660
|
+
return parse(emoji, {
|
|
661
|
+
// on native plaforms, you can't display svg as Image
|
|
662
|
+
assetType: Platform.OS === 'web' ? 'svg' : 'png'
|
|
663
|
+
});
|
|
664
|
+
}, [emoji]),
|
|
665
|
+
_useMemo2 = _slicedToArray(_useMemo, 1),
|
|
666
|
+
emojiData = _useMemo2[0];
|
|
550
667
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
}
|
|
668
|
+
if (!emojiData) return null;
|
|
669
|
+
return /*#__PURE__*/jsx(StyledEmoji, {
|
|
670
|
+
size: size,
|
|
671
|
+
accessibilityLabel: emojiData.text,
|
|
672
|
+
source: {
|
|
673
|
+
uri: emojiData.url
|
|
674
|
+
},
|
|
675
|
+
style: style
|
|
676
|
+
});
|
|
560
677
|
}
|
|
561
678
|
|
|
562
|
-
var
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
BASE: 0,
|
|
567
|
-
|
|
568
|
-
/**
|
|
569
|
-
* min-width: 480px
|
|
570
|
-
*/
|
|
571
|
-
SMALL: 480,
|
|
679
|
+
var defaultOpenLinkBehavior = {
|
|
680
|
+
"native": 'openInModal',
|
|
681
|
+
web: 'targetBlank'
|
|
682
|
+
};
|
|
572
683
|
|
|
573
|
-
|
|
574
|
-
* min-width: 768px
|
|
575
|
-
*/
|
|
576
|
-
MEDIUM: 768,
|
|
684
|
+
var _excluded$9 = ["as", "href", "openLinkBehavior", "onPress"];
|
|
577
685
|
|
|
578
|
-
|
|
579
|
-
* min-width: 1024px
|
|
580
|
-
*/
|
|
581
|
-
LARGE: 1024,
|
|
686
|
+
function ownKeys$c(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
582
687
|
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
688
|
+
function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$c(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$c(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
689
|
+
function ExternalLink(_ref) {
|
|
690
|
+
var Component = _ref.as,
|
|
691
|
+
href = _ref.href,
|
|
692
|
+
_ref$openLinkBehavior = _ref.openLinkBehavior,
|
|
693
|
+
openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
|
|
694
|
+
onPress = _ref.onPress,
|
|
695
|
+
rest = _objectWithoutProperties(_ref, _excluded$9);
|
|
696
|
+
|
|
697
|
+
return /*#__PURE__*/jsx(Component, _objectSpread$c(_objectSpread$c({}, rest), {}, {
|
|
698
|
+
onPress: function handleOnPress() {
|
|
699
|
+
if (onPress) onPress();
|
|
700
|
+
if (!href) return;
|
|
701
|
+
|
|
702
|
+
switch (openLinkBehavior["native"]) {
|
|
703
|
+
case 'openInModal':
|
|
704
|
+
case undefined:
|
|
705
|
+
openBrowserAsync(href)["catch"](function (err) {
|
|
706
|
+
console.error("An error occurred while opening ".concat(href), err);
|
|
707
|
+
});
|
|
708
|
+
break;
|
|
709
|
+
|
|
710
|
+
case 'openBrowserApp':
|
|
711
|
+
Linking.openURL(href)["catch"](function (err) {
|
|
712
|
+
console.error("An error occurred while opening ".concat(href), err);
|
|
713
|
+
});
|
|
714
|
+
break;
|
|
715
|
+
|
|
716
|
+
default:
|
|
717
|
+
if ((process.env.NODE_ENV !== "production")) {
|
|
718
|
+
throw new Error("Invalid ExternalLink native behavior: ".concat(openLinkBehavior["native"]));
|
|
719
|
+
}
|
|
593
720
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
}));
|
|
724
|
+
}
|
|
598
725
|
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
726
|
+
var getColorFromState = function (state) {
|
|
727
|
+
switch (state) {
|
|
728
|
+
case 'invalid':
|
|
729
|
+
return 'danger';
|
|
603
730
|
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
LARGE: KittBreakpoints.WIDE - 1
|
|
731
|
+
default:
|
|
732
|
+
return 'black-light';
|
|
733
|
+
}
|
|
608
734
|
};
|
|
609
735
|
|
|
610
|
-
|
|
611
|
-
var
|
|
612
|
-
|
|
736
|
+
function InputFeedback(_ref) {
|
|
737
|
+
var state = _ref.state,
|
|
738
|
+
testID = _ref.testID,
|
|
739
|
+
children = _ref.children;
|
|
740
|
+
return /*#__PURE__*/jsx(Typography.Text, {
|
|
741
|
+
base: "body-small",
|
|
742
|
+
color: getColorFromState(state),
|
|
743
|
+
testID: testID,
|
|
744
|
+
children: children
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
var FieldContainer = /*#__PURE__*/styled.View.withConfig({
|
|
749
|
+
displayName: "InputField__FieldContainer"
|
|
750
|
+
})(["padding:5px 0 10px;"]);
|
|
751
|
+
var FeedbackContainer = /*#__PURE__*/styled.View.withConfig({
|
|
752
|
+
displayName: "InputField__FeedbackContainer"
|
|
753
|
+
})(["", ";"], function (_ref) {
|
|
613
754
|
var theme = _ref.theme;
|
|
614
755
|
return theme.responsive.ifWindowSizeMatches({
|
|
615
756
|
minWidth: KittBreakpoints.SMALL
|
|
616
757
|
}, 'padding-top: 10px', 'padding-top: 5px');
|
|
617
758
|
});
|
|
618
|
-
var FieldLabelContainer = styled(
|
|
759
|
+
var FieldLabelContainer = /*#__PURE__*/styled.View.withConfig({
|
|
760
|
+
displayName: "InputField__FieldLabelContainer"
|
|
761
|
+
})(["flex-direction:row;align-items:center;padding-bottom:", "px;"], function (_ref2) {
|
|
619
762
|
var theme = _ref2.theme;
|
|
620
763
|
return theme.kitt.forms.inputField.labelContainerPaddingBottom;
|
|
621
764
|
});
|
|
622
|
-
var LabelContainer = styled(
|
|
765
|
+
var LabelContainer = /*#__PURE__*/styled.View.withConfig({
|
|
766
|
+
displayName: "InputField__LabelContainer"
|
|
767
|
+
})(["margin-right:", "px;"], function (_ref3) {
|
|
623
768
|
var theme = _ref3.theme;
|
|
624
769
|
return theme.kitt.forms.inputField.iconMarginLeft;
|
|
625
770
|
});
|
|
@@ -628,7 +773,15 @@ function InputField(_ref4) {
|
|
|
628
773
|
labelFeedback = _ref4.labelFeedback,
|
|
629
774
|
input = _ref4.input,
|
|
630
775
|
feedback = _ref4.feedback;
|
|
631
|
-
return /*#__PURE__*/
|
|
776
|
+
return /*#__PURE__*/jsxs(FieldContainer, {
|
|
777
|
+
children: [label ? /*#__PURE__*/jsxs(FieldLabelContainer, {
|
|
778
|
+
children: [/*#__PURE__*/jsx(LabelContainer, {
|
|
779
|
+
children: label
|
|
780
|
+
}), labelFeedback]
|
|
781
|
+
}) : null, input, feedback ? /*#__PURE__*/jsx(FeedbackContainer, {
|
|
782
|
+
children: feedback
|
|
783
|
+
}) : null]
|
|
784
|
+
});
|
|
632
785
|
}
|
|
633
786
|
|
|
634
787
|
var useInputText = function () {
|
|
@@ -659,10 +812,12 @@ var useInputText = function () {
|
|
|
659
812
|
};
|
|
660
813
|
};
|
|
661
814
|
|
|
662
|
-
var _excluded$
|
|
815
|
+
var _excluded$8 = ["id", "minHeight", "type", "state", "internalForceState", "disabled", "onFocus", "onBlur"];
|
|
816
|
+
|
|
817
|
+
function ownKeys$b(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
663
818
|
|
|
664
|
-
var
|
|
665
|
-
var styledTextInputMixin = css(
|
|
819
|
+
function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$b(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$b(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
820
|
+
var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width:", ";border-radius:", ";border-color:", ";font-size:", ";color:", ";font-family:", ";"], function (_ref) {
|
|
666
821
|
var theme = _ref.theme,
|
|
667
822
|
state = _ref.state;
|
|
668
823
|
return state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states["default"].backgroundColor;
|
|
@@ -678,7 +833,8 @@ var styledTextInputMixin = css(_templateObject$n || (_templateObject$n = _tagged
|
|
|
678
833
|
return theme.kitt.forms.input.states[state].borderColor;
|
|
679
834
|
}, function (_ref5) {
|
|
680
835
|
var theme = _ref5.theme;
|
|
681
|
-
|
|
836
|
+
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
837
|
+
return theme.kitt.typography.types.bodies.configs.body[typeConfigKey].fontSize;
|
|
682
838
|
}, function (_ref6) {
|
|
683
839
|
var theme = _ref6.theme,
|
|
684
840
|
state = _ref6.state;
|
|
@@ -687,26 +843,34 @@ var styledTextInputMixin = css(_templateObject$n || (_templateObject$n = _tagged
|
|
|
687
843
|
var theme = _ref7.theme;
|
|
688
844
|
return theme.kitt.typography.types.bodies.fontFamily.regular;
|
|
689
845
|
});
|
|
690
|
-
var Input = styled(TextInput)(
|
|
846
|
+
var Input = /*#__PURE__*/styled(TextInput).withConfig({
|
|
847
|
+
displayName: "InputText__Input"
|
|
848
|
+
})(["", " padding:", ";line-height:", ";min-height:", "px;"], styledTextInputMixin, function (_ref8) {
|
|
691
849
|
var theme = _ref8.theme,
|
|
692
850
|
multiline = _ref8.multiline;
|
|
693
|
-
return !multiline &&
|
|
851
|
+
return !multiline && Platform.OS === 'ios' ? theme.kitt.forms.input.paddingSingleLineIOS : theme.kitt.forms.input.padding;
|
|
694
852
|
}, function (_ref9) {
|
|
695
853
|
var theme = _ref9.theme,
|
|
696
854
|
multiline = _ref9.multiline;
|
|
697
|
-
|
|
855
|
+
if (!multiline && Platform.OS === 'ios') return 0;
|
|
856
|
+
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
857
|
+
return theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight;
|
|
698
858
|
}, function (_ref10) {
|
|
699
859
|
var minHeight = _ref10.minHeight;
|
|
700
860
|
return minHeight;
|
|
701
861
|
});
|
|
702
|
-
var Container$
|
|
862
|
+
var Container$5 = /*#__PURE__*/styled.View.withConfig({
|
|
863
|
+
displayName: "InputText__Container"
|
|
864
|
+
})(["margin-top:", ";margin-bottom:", ";"], function (_ref11) {
|
|
703
865
|
var theme = _ref11.theme;
|
|
704
866
|
return theme.kitt.forms.input.marginTop;
|
|
705
867
|
}, function (_ref12) {
|
|
706
868
|
var theme = _ref12.theme;
|
|
707
869
|
return theme.kitt.forms.input.marginBottom;
|
|
708
870
|
});
|
|
709
|
-
var PasswordButtonContainer = styled(
|
|
871
|
+
var PasswordButtonContainer = /*#__PURE__*/styled.Pressable.withConfig({
|
|
872
|
+
displayName: "InputText__PasswordButtonContainer"
|
|
873
|
+
})(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:", "px;"], function (_ref13) {
|
|
710
874
|
var theme = _ref13.theme;
|
|
711
875
|
return theme.kitt.forms.input.passwordButtonIconSize / 2;
|
|
712
876
|
});
|
|
@@ -756,7 +920,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref15, ref) {
|
|
|
756
920
|
disabled = _ref15$disabled === void 0 ? false : _ref15$disabled,
|
|
757
921
|
_onFocus = _ref15.onFocus,
|
|
758
922
|
_onBlur = _ref15.onBlur,
|
|
759
|
-
props = _objectWithoutProperties(_ref15, _excluded$
|
|
923
|
+
props = _objectWithoutProperties(_ref15, _excluded$8);
|
|
760
924
|
|
|
761
925
|
var _useInputText = useInputText(),
|
|
762
926
|
isFocused = _useInputText.isFocused,
|
|
@@ -765,54 +929,62 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref15, ref) {
|
|
|
765
929
|
isPasswordVisible = _useInputText.isPasswordVisible,
|
|
766
930
|
togglePasswordVisibility = _useInputText.togglePasswordVisibility;
|
|
767
931
|
|
|
768
|
-
var theme = useTheme();
|
|
932
|
+
var theme = /*#__PURE__*/useTheme();
|
|
769
933
|
var state = internalForceState || getInputState({
|
|
770
934
|
isFocused: isFocused,
|
|
771
935
|
isDisabled: disabled,
|
|
772
936
|
formState: formState
|
|
773
937
|
});
|
|
774
|
-
return /*#__PURE__*/
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
938
|
+
return /*#__PURE__*/jsxs(Container$5, {
|
|
939
|
+
children: [/*#__PURE__*/jsx(Input, _objectSpread$b(_objectSpread$b({
|
|
940
|
+
ref: ref,
|
|
941
|
+
nativeID: id,
|
|
942
|
+
editable: !disabled,
|
|
943
|
+
keyboardType: keyboardTypeByTextInputType[type],
|
|
944
|
+
autoCompleteType: autoCompleteTypeByType[type],
|
|
945
|
+
autoCorrect: autoCorrectByType[type],
|
|
946
|
+
minHeight: minHeight,
|
|
947
|
+
textContentType: textContentTypeByType[type],
|
|
948
|
+
placeholderTextColor: theme.kitt.typography.colors[theme.kitt.forms.input.placeholderColor],
|
|
949
|
+
selectionColor: theme.kitt.forms.input.selectionColor,
|
|
950
|
+
secureTextEntry: type === 'password' && !isPasswordVisible
|
|
951
|
+
}, props), {}, {
|
|
952
|
+
state: state,
|
|
953
|
+
onFocus: function onFocus(e) {
|
|
954
|
+
handleInputFocus();
|
|
955
|
+
if (_onFocus) _onFocus(e);
|
|
956
|
+
},
|
|
957
|
+
onBlur: function onBlur(e) {
|
|
958
|
+
handleInputBlur();
|
|
959
|
+
if (_onBlur) _onBlur(e);
|
|
960
|
+
}
|
|
961
|
+
})), type === 'password' && !disabled && /*#__PURE__*/jsx(PasswordButtonContainer, {
|
|
962
|
+
accessibilityRole: "button",
|
|
963
|
+
onPress: togglePasswordVisibility,
|
|
964
|
+
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
965
|
+
icon: isPasswordVisible ? /*#__PURE__*/jsx(EyeIcon, {}) : /*#__PURE__*/jsx(EyeOffIcon, {}),
|
|
966
|
+
size: theme.kitt.forms.input.passwordButtonIconSize,
|
|
967
|
+
color: theme.kitt.forms.input.states[state].passwordButtonIconColor
|
|
968
|
+
})
|
|
969
|
+
})]
|
|
970
|
+
});
|
|
804
971
|
});
|
|
805
972
|
|
|
806
973
|
function Label(_ref) {
|
|
807
|
-
_ref.htmlFor
|
|
808
|
-
|
|
809
|
-
return /*#__PURE__*/
|
|
810
|
-
base: "body"
|
|
811
|
-
|
|
974
|
+
var htmlFor = _ref.htmlFor,
|
|
975
|
+
children = _ref.children;
|
|
976
|
+
return /*#__PURE__*/jsx(Typography.Text, {
|
|
977
|
+
base: "body",
|
|
978
|
+
children: Platform.OS === 'web' ? /*#__PURE__*/jsx("label", {
|
|
979
|
+
htmlFor: htmlFor,
|
|
980
|
+
children: children
|
|
981
|
+
}) : children
|
|
982
|
+
});
|
|
812
983
|
}
|
|
813
984
|
|
|
814
|
-
var
|
|
815
|
-
|
|
985
|
+
var OuterRadio = /*#__PURE__*/styled.View.withConfig({
|
|
986
|
+
displayName: "Radio__OuterRadio"
|
|
987
|
+
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;border-width:", ";border-color:", ";"], function (_ref) {
|
|
816
988
|
var theme = _ref.theme,
|
|
817
989
|
disabled = _ref.disabled;
|
|
818
990
|
return theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].backgroundColor;
|
|
@@ -833,7 +1005,9 @@ var OuterRadio = styled(PrimitiveView)(_templateObject$m || (_templateObject$m =
|
|
|
833
1005
|
disabled = _ref6.disabled;
|
|
834
1006
|
return theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].borderColor;
|
|
835
1007
|
});
|
|
836
|
-
var SelectedOuterRadio = styled(
|
|
1008
|
+
var SelectedOuterRadio = /*#__PURE__*/styled.View.withConfig({
|
|
1009
|
+
displayName: "Radio__SelectedOuterRadio"
|
|
1010
|
+
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;justify-content:center;align-items:center;"], function (_ref7) {
|
|
837
1011
|
var theme = _ref7.theme;
|
|
838
1012
|
return theme.kitt.forms.radio.checked.backgroundColor;
|
|
839
1013
|
}, function (_ref8) {
|
|
@@ -846,7 +1020,9 @@ var SelectedOuterRadio = styled(PrimitiveView)(_templateObject2$9 || (_templateO
|
|
|
846
1020
|
var theme = _ref10.theme;
|
|
847
1021
|
return theme.kitt.forms.radio.size / 2;
|
|
848
1022
|
});
|
|
849
|
-
var SelectedInnerRadio = styled(
|
|
1023
|
+
var SelectedInnerRadio = /*#__PURE__*/styled.View.withConfig({
|
|
1024
|
+
displayName: "Radio__SelectedInnerRadio"
|
|
1025
|
+
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;"], function (_ref11) {
|
|
850
1026
|
var theme = _ref11.theme;
|
|
851
1027
|
return theme.kitt.forms.radio.checked.innerBackgroundColor;
|
|
852
1028
|
}, function (_ref12) {
|
|
@@ -859,8 +1035,12 @@ var SelectedInnerRadio = styled(PrimitiveView)(_templateObject3$5 || (_templateO
|
|
|
859
1035
|
var theme = _ref14.theme;
|
|
860
1036
|
return theme.kitt.forms.radio.checked.innerSize / 2;
|
|
861
1037
|
});
|
|
862
|
-
var Container$
|
|
863
|
-
|
|
1038
|
+
var Container$4 = /*#__PURE__*/styled.Pressable.withConfig({
|
|
1039
|
+
displayName: "Radio__Container"
|
|
1040
|
+
})(["flex-direction:row;align-items:center;"]);
|
|
1041
|
+
var Text = /*#__PURE__*/styled(Typography.Text).withConfig({
|
|
1042
|
+
displayName: "Radio__Text"
|
|
1043
|
+
})(["margin-left:", "px;"], function (_ref15) {
|
|
864
1044
|
var theme = _ref15.theme;
|
|
865
1045
|
return theme.kitt.spacing * 2;
|
|
866
1046
|
});
|
|
@@ -872,7 +1052,7 @@ function Radio(_ref16) {
|
|
|
872
1052
|
_ref16$disabled = _ref16.disabled,
|
|
873
1053
|
disabled = _ref16$disabled === void 0 ? false : _ref16$disabled,
|
|
874
1054
|
children = _ref16.children;
|
|
875
|
-
return /*#__PURE__*/
|
|
1055
|
+
return /*#__PURE__*/jsxs(Container$4, {
|
|
876
1056
|
nativeID: id,
|
|
877
1057
|
disabled: disabled,
|
|
878
1058
|
accessibilityRole: "radio",
|
|
@@ -880,29 +1060,37 @@ function Radio(_ref16) {
|
|
|
880
1060
|
focusable: checked && !disabled,
|
|
881
1061
|
onPress: function handlePress() {
|
|
882
1062
|
onChange(value);
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
1063
|
+
},
|
|
1064
|
+
children: [checked && !disabled ? /*#__PURE__*/jsx(SelectedOuterRadio, {
|
|
1065
|
+
children: /*#__PURE__*/jsx(SelectedInnerRadio, {})
|
|
1066
|
+
}) : /*#__PURE__*/jsx(OuterRadio, {
|
|
1067
|
+
disabled: disabled
|
|
1068
|
+
}), /*#__PURE__*/jsx(Text, {
|
|
1069
|
+
base: "body",
|
|
1070
|
+
color: disabled ? 'black-light' : 'black',
|
|
1071
|
+
children: children
|
|
1072
|
+
})]
|
|
1073
|
+
});
|
|
890
1074
|
}
|
|
891
1075
|
|
|
1076
|
+
function ownKeys$a(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1077
|
+
|
|
1078
|
+
function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$a(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$a(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
892
1079
|
function TextArea(_ref) {
|
|
893
1080
|
var props = _extends({}, _ref);
|
|
894
1081
|
|
|
895
|
-
var theme = useTheme();
|
|
896
|
-
return /*#__PURE__*/
|
|
1082
|
+
var theme = /*#__PURE__*/useTheme();
|
|
1083
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$a(_objectSpread$a({
|
|
897
1084
|
multiline: true
|
|
898
|
-
}, props, {
|
|
1085
|
+
}, props), {}, {
|
|
899
1086
|
type: "text",
|
|
900
1087
|
minHeight: theme.kitt.forms.input.textAreaMinHeight
|
|
901
1088
|
}));
|
|
902
1089
|
}
|
|
903
1090
|
|
|
904
|
-
var
|
|
905
|
-
|
|
1091
|
+
var Body = /*#__PURE__*/styled.View.withConfig({
|
|
1092
|
+
displayName: "Body"
|
|
1093
|
+
})(["", " background-color:", ";flex:1;"], function (_ref) {
|
|
906
1094
|
var theme = _ref.theme;
|
|
907
1095
|
return theme.responsive.ifWindowSizeMatches({
|
|
908
1096
|
minWidth: KittBreakpoints.MEDIUM
|
|
@@ -913,11 +1101,14 @@ var Body = styled(PrimitiveView)(_templateObject$l || (_templateObject$l = _tagg
|
|
|
913
1101
|
});
|
|
914
1102
|
function FullScreenModalBody(_ref3) {
|
|
915
1103
|
var children = _ref3.children;
|
|
916
|
-
return /*#__PURE__*/
|
|
1104
|
+
return /*#__PURE__*/jsx(Body, {
|
|
1105
|
+
children: children
|
|
1106
|
+
});
|
|
917
1107
|
}
|
|
918
1108
|
|
|
919
|
-
var
|
|
920
|
-
|
|
1109
|
+
var SideContainer = /*#__PURE__*/styled.View.withConfig({
|
|
1110
|
+
displayName: "Header__SideContainer"
|
|
1111
|
+
})(["", ""], function (_ref) {
|
|
921
1112
|
var theme = _ref.theme,
|
|
922
1113
|
_ref$side = _ref.side,
|
|
923
1114
|
side = _ref$side === void 0 ? 'left' : _ref$side;
|
|
@@ -934,7 +1125,9 @@ function getHeaderHorizontalMediumPadding(spacing) {
|
|
|
934
1125
|
return spacing * 6;
|
|
935
1126
|
}
|
|
936
1127
|
|
|
937
|
-
var Header = styled(
|
|
1128
|
+
var Header = /*#__PURE__*/styled.View.withConfig({
|
|
1129
|
+
displayName: "Header"
|
|
1130
|
+
})(["", ";border-bottom-color:", ";border-bottom-width:1px;flex-direction:row;align-items:center;"], function (_ref2) {
|
|
938
1131
|
var theme = _ref2.theme,
|
|
939
1132
|
_ref2$insetTop = _ref2.insetTop,
|
|
940
1133
|
insetTop = _ref2$insetTop === void 0 ? 0 : _ref2$insetTop;
|
|
@@ -949,7 +1142,9 @@ var Header = styled(PrimitiveView)(_templateObject2$8 || (_templateObject2$8 = _
|
|
|
949
1142
|
var theme = _ref3.theme;
|
|
950
1143
|
return theme.kitt.fullScreenModal.header.borderColor;
|
|
951
1144
|
});
|
|
952
|
-
var HeaderContent = styled(
|
|
1145
|
+
var HeaderContent = /*#__PURE__*/styled.View.withConfig({
|
|
1146
|
+
displayName: "Header__HeaderContent"
|
|
1147
|
+
})(["", ";", ";justify-content:center;align-items:center;"], function (_ref4) {
|
|
953
1148
|
var theme = _ref4.theme,
|
|
954
1149
|
leftWidth = _ref4.leftWidth,
|
|
955
1150
|
rightWidth = _ref4.rightWidth,
|
|
@@ -1014,38 +1209,68 @@ function FullScreenModalHeader(_ref6) {
|
|
|
1014
1209
|
setRightWidth(event.nativeEvent.layout.width);
|
|
1015
1210
|
};
|
|
1016
1211
|
|
|
1017
|
-
return /*#__PURE__*/
|
|
1018
|
-
insetTop: top
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1212
|
+
return /*#__PURE__*/jsxs(Header, {
|
|
1213
|
+
insetTop: Platform.OS === 'ios' ? undefined : top,
|
|
1214
|
+
children: [left ? /*#__PURE__*/jsx(SideContainer, {
|
|
1215
|
+
onLayout: function onLayout(e) {
|
|
1216
|
+
return handleLayoutChange(e, 'left');
|
|
1217
|
+
},
|
|
1218
|
+
children: left
|
|
1219
|
+
}) : null, /*#__PURE__*/jsx(HeaderContent, {
|
|
1220
|
+
windowWidth: dimensions.width,
|
|
1221
|
+
leftWidth: leftWidth,
|
|
1222
|
+
rightWidth: rightWidth,
|
|
1223
|
+
children: children
|
|
1224
|
+
}), right ? /*#__PURE__*/jsx(SideContainer, {
|
|
1225
|
+
side: "right",
|
|
1226
|
+
onLayout: function onLayout(e) {
|
|
1227
|
+
return handleLayoutChange(e, 'right');
|
|
1228
|
+
},
|
|
1229
|
+
children: right
|
|
1230
|
+
}) : null]
|
|
1231
|
+
});
|
|
1033
1232
|
}
|
|
1034
1233
|
|
|
1035
|
-
var
|
|
1036
|
-
|
|
1234
|
+
var Container$3 = /*#__PURE__*/styled.View.withConfig({
|
|
1235
|
+
displayName: "FullScreenModal__Container"
|
|
1236
|
+
})(["flex:1;background-color:", ";"], function (_ref) {
|
|
1037
1237
|
var theme = _ref.theme;
|
|
1038
1238
|
return theme.kitt.colors.uiBackground;
|
|
1039
1239
|
});
|
|
1040
1240
|
function FullScreenModal(_ref2) {
|
|
1041
1241
|
var children = _ref2.children;
|
|
1042
|
-
return /*#__PURE__*/
|
|
1242
|
+
return /*#__PURE__*/jsx(Container$3, {
|
|
1243
|
+
children: children
|
|
1244
|
+
});
|
|
1043
1245
|
}
|
|
1044
1246
|
FullScreenModal.Header = FullScreenModalHeader;
|
|
1045
1247
|
FullScreenModal.Body = FullScreenModalBody;
|
|
1046
1248
|
|
|
1047
|
-
var
|
|
1048
|
-
|
|
1249
|
+
var _excluded$7 = ["as", "children"];
|
|
1250
|
+
|
|
1251
|
+
function ownKeys$9(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1252
|
+
|
|
1253
|
+
function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$9(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$9(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1254
|
+
function StyleWebWrapper(_ref) {
|
|
1255
|
+
var as = _ref.as,
|
|
1256
|
+
children = _ref.children,
|
|
1257
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
1258
|
+
|
|
1259
|
+
if (Platform.OS !== 'web') return children;
|
|
1260
|
+
return /*#__PURE__*/jsx(as || 'div', _objectSpread$9(_objectSpread$9({}, props), {}, {
|
|
1261
|
+
children: children
|
|
1262
|
+
}));
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
var _excluded$6 = ["color"];
|
|
1266
|
+
|
|
1267
|
+
function ownKeys$8(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1268
|
+
|
|
1269
|
+
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$8(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1270
|
+
var PressableIconButtonWebWrapper = undefined;
|
|
1271
|
+
var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
|
|
1272
|
+
displayName: "PressableIconButton__StyledPressableIconButton"
|
|
1273
|
+
})(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref) {
|
|
1049
1274
|
var theme = _ref.theme;
|
|
1050
1275
|
return theme.kitt.iconButton.borderRadius;
|
|
1051
1276
|
}, function (_ref2) {
|
|
@@ -1055,15 +1280,36 @@ var PressableIconButton = styled(PrimitivePressable)(_templateObject$i || (_temp
|
|
|
1055
1280
|
var theme = _ref3.theme;
|
|
1056
1281
|
return theme.kitt.iconButton.height;
|
|
1057
1282
|
}, function (_ref4) {
|
|
1058
|
-
var theme = _ref4.theme
|
|
1059
|
-
_ref4.
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1283
|
+
var theme = _ref4.theme,
|
|
1284
|
+
disabled = _ref4.disabled;
|
|
1285
|
+
var iconButton = theme.kitt.iconButton;
|
|
1286
|
+
|
|
1287
|
+
if (Platform.OS !== 'web') {
|
|
1288
|
+
return undefined;
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
var transition = iconButton.transition;
|
|
1292
|
+
|
|
1293
|
+
if (disabled) {
|
|
1294
|
+
return "\n background-color: ".concat(iconButton.disabled.backgroundColor, ";\n ");
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n ");
|
|
1063
1298
|
});
|
|
1299
|
+
function PressableIconButton(_ref5) {
|
|
1300
|
+
var color = _ref5.color,
|
|
1301
|
+
props = _objectWithoutProperties(_ref5, _excluded$6);
|
|
1302
|
+
|
|
1303
|
+
return /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
1304
|
+
as: PressableIconButtonWebWrapper,
|
|
1305
|
+
"data-color-white": color === 'white',
|
|
1306
|
+
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread$8({}, props))
|
|
1307
|
+
});
|
|
1308
|
+
}
|
|
1064
1309
|
|
|
1065
|
-
var
|
|
1066
|
-
|
|
1310
|
+
var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated$1.View).withConfig({
|
|
1311
|
+
displayName: "PressableAnimatedContainer__AnimatedIconButtonBackground"
|
|
1312
|
+
})(["background-color:", ";border-radius:", "px;width:", "px;height:", "px;position:absolute;bottom:0;left:0;"], function (_ref) {
|
|
1067
1313
|
var theme = _ref.theme,
|
|
1068
1314
|
color = _ref.color,
|
|
1069
1315
|
disabled = _ref.disabled;
|
|
@@ -1081,14 +1327,16 @@ var AnimatedIconButtonBackground = styled(Animated$1.View)(_templateObject$h ||
|
|
|
1081
1327
|
var theme = _ref4.theme;
|
|
1082
1328
|
return theme.kitt.iconButton.height;
|
|
1083
1329
|
});
|
|
1084
|
-
var AnimatedViewContainer = styled(Animated$1.View)(
|
|
1330
|
+
var AnimatedViewContainer = /*#__PURE__*/styled(Animated$1.View).withConfig({
|
|
1331
|
+
displayName: "PressableAnimatedContainer__AnimatedViewContainer"
|
|
1332
|
+
})(["position:relative;align-items:center;justify-content:center;width:100%;height:100%;"]);
|
|
1085
1333
|
function PressableAnimatedContainer(_ref5) {
|
|
1086
1334
|
var disabled = _ref5.disabled,
|
|
1087
1335
|
_ref5$color = _ref5.color,
|
|
1088
1336
|
color = _ref5$color === void 0 ? 'black' : _ref5$color,
|
|
1089
1337
|
children = _ref5.children,
|
|
1090
1338
|
onPress = _ref5.onPress;
|
|
1091
|
-
var theme = useTheme();
|
|
1339
|
+
var theme = /*#__PURE__*/useTheme();
|
|
1092
1340
|
var pressed = useSharedValue(false);
|
|
1093
1341
|
var opacityStyles = useAnimatedStyle(function () {
|
|
1094
1342
|
var _f = function () {
|
|
@@ -1103,7 +1351,7 @@ function PressableAnimatedContainer(_ref5) {
|
|
|
1103
1351
|
};
|
|
1104
1352
|
_f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
|
|
1105
1353
|
_f.__workletHash = 10645190329247;
|
|
1106
|
-
_f.__location = "/home/
|
|
1354
|
+
_f.__location = "/home/chris/ornikar/kitt/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (54:41)";
|
|
1107
1355
|
_f.__optimalization = 2;
|
|
1108
1356
|
|
|
1109
1357
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -1137,14 +1385,14 @@ function PressableAnimatedContainer(_ref5) {
|
|
|
1137
1385
|
};
|
|
1138
1386
|
_f.asString = "function _f(){const{withSpring,pressed,theme}=jsThis._closure;{return{transform:[{scale:withSpring(pressed.value?theme.kitt.iconButton.scale.base.active:theme.kitt.iconButton.scale.base.default)}]};}}";
|
|
1139
1387
|
_f.__workletHash = 13861998831411;
|
|
1140
|
-
_f.__location = "/home/
|
|
1388
|
+
_f.__location = "/home/chris/ornikar/kitt/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (60:39)";
|
|
1141
1389
|
_f.__optimalization = 2;
|
|
1142
1390
|
|
|
1143
1391
|
global.__reanimatedWorkletInit(_f);
|
|
1144
1392
|
|
|
1145
1393
|
return _f;
|
|
1146
1394
|
}());
|
|
1147
|
-
return /*#__PURE__*/
|
|
1395
|
+
return /*#__PURE__*/jsx(PressableIconButton, {
|
|
1148
1396
|
accessibilityRole: "button",
|
|
1149
1397
|
disabled: disabled,
|
|
1150
1398
|
color: color,
|
|
@@ -1154,24 +1402,27 @@ function PressableAnimatedContainer(_ref5) {
|
|
|
1154
1402
|
},
|
|
1155
1403
|
onPressOut: function onPressOut() {
|
|
1156
1404
|
pressed.value = false;
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1405
|
+
},
|
|
1406
|
+
children: /*#__PURE__*/jsxs(AnimatedViewContainer, {
|
|
1407
|
+
style: disabled ? [{
|
|
1408
|
+
transform: [{
|
|
1409
|
+
scale: 1
|
|
1410
|
+
}]
|
|
1411
|
+
}] : [scaleStyles],
|
|
1412
|
+
children: [/*#__PURE__*/jsx(AnimatedIconButtonBackground, {
|
|
1413
|
+
disabled: disabled,
|
|
1414
|
+
color: color,
|
|
1415
|
+
style: disabled ? [{
|
|
1416
|
+
opacity: 1
|
|
1417
|
+
}] : [opacityStyles]
|
|
1418
|
+
}), children]
|
|
1419
|
+
})
|
|
1420
|
+
});
|
|
1171
1421
|
}
|
|
1172
1422
|
|
|
1173
|
-
var
|
|
1174
|
-
|
|
1423
|
+
var IconButtonContentBorder = /*#__PURE__*/styled.View.withConfig({
|
|
1424
|
+
displayName: "IconButton__IconButtonContentBorder"
|
|
1425
|
+
})(["border:", ";border-color:", ";width:", "px;height:", "px;align-items:center;justify-content:center;border-radius:", "px;"], function (_ref) {
|
|
1175
1426
|
var theme = _ref.theme;
|
|
1176
1427
|
return "".concat(theme.kitt.iconButton.borderWidth, "px solid");
|
|
1177
1428
|
}, function (_ref2) {
|
|
@@ -1193,12 +1444,13 @@ function IconButtonContent(_ref6) {
|
|
|
1193
1444
|
var disabled = _ref6.disabled,
|
|
1194
1445
|
color = _ref6.color,
|
|
1195
1446
|
icon = _ref6.icon;
|
|
1196
|
-
return /*#__PURE__*/
|
|
1197
|
-
disabled: disabled
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1447
|
+
return /*#__PURE__*/jsx(IconButtonContentBorder, {
|
|
1448
|
+
disabled: disabled,
|
|
1449
|
+
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
1450
|
+
color: disabled ? 'black-light' : color,
|
|
1451
|
+
icon: icon
|
|
1452
|
+
})
|
|
1453
|
+
});
|
|
1202
1454
|
}
|
|
1203
1455
|
|
|
1204
1456
|
function IconButton(_ref7) {
|
|
@@ -1206,33 +1458,44 @@ function IconButton(_ref7) {
|
|
|
1206
1458
|
color = _ref7.color,
|
|
1207
1459
|
disabled = _ref7.disabled,
|
|
1208
1460
|
onPress = _ref7.onPress;
|
|
1209
|
-
return /*#__PURE__*/
|
|
1461
|
+
return /*#__PURE__*/jsx(PressableAnimatedContainer, {
|
|
1210
1462
|
color: color,
|
|
1211
1463
|
disabled: disabled,
|
|
1212
|
-
onPress: onPress
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1464
|
+
onPress: onPress,
|
|
1465
|
+
children: /*#__PURE__*/jsx(IconButtonContent, {
|
|
1466
|
+
disabled: disabled,
|
|
1467
|
+
color: color,
|
|
1468
|
+
icon: icon
|
|
1469
|
+
})
|
|
1470
|
+
});
|
|
1218
1471
|
}
|
|
1219
1472
|
|
|
1220
1473
|
var _excluded$5 = ["children"];
|
|
1221
1474
|
|
|
1222
|
-
var
|
|
1223
|
-
|
|
1475
|
+
function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1476
|
+
|
|
1477
|
+
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1478
|
+
var ContentView$1 = /*#__PURE__*/styled.View.withConfig({
|
|
1479
|
+
displayName: "ListItemContent__ContentView"
|
|
1480
|
+
})(["flex:1 0 0%;align-self:center;"]);
|
|
1224
1481
|
function ListItemContent(_ref) {
|
|
1225
1482
|
var children = _ref.children,
|
|
1226
1483
|
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
1227
1484
|
|
|
1228
|
-
return /*#__PURE__*/
|
|
1485
|
+
return /*#__PURE__*/jsx(ContentView$1, _objectSpread$7(_objectSpread$7({}, rest), {}, {
|
|
1486
|
+
children: children
|
|
1487
|
+
}));
|
|
1229
1488
|
}
|
|
1230
1489
|
|
|
1231
1490
|
var _excluded$4 = ["children", "side"],
|
|
1232
1491
|
_excluded2$1 = ["children", "align"];
|
|
1233
1492
|
|
|
1234
|
-
|
|
1235
|
-
|
|
1493
|
+
function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1494
|
+
|
|
1495
|
+
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1496
|
+
var SideContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
1497
|
+
displayName: "ListItemSideContent__SideContainerView"
|
|
1498
|
+
})(["flex-direction:row;margin-left:", ";margin-right:", ";"], function (_ref) {
|
|
1236
1499
|
var theme = _ref.theme,
|
|
1237
1500
|
side = _ref.side;
|
|
1238
1501
|
return side === 'right' ? theme.kitt.listItem.innerMargin : 0;
|
|
@@ -1248,11 +1511,15 @@ function ListItemSideContainer(_ref3) {
|
|
|
1248
1511
|
side = _ref3$side === void 0 ? 'left' : _ref3$side,
|
|
1249
1512
|
rest = _objectWithoutProperties(_ref3, _excluded$4);
|
|
1250
1513
|
|
|
1251
|
-
return /*#__PURE__*/
|
|
1514
|
+
return /*#__PURE__*/jsx(SideContainerView, _objectSpread$6(_objectSpread$6({
|
|
1252
1515
|
side: side
|
|
1253
|
-
}, rest),
|
|
1516
|
+
}, rest), {}, {
|
|
1517
|
+
children: children
|
|
1518
|
+
}));
|
|
1254
1519
|
}
|
|
1255
|
-
var SideContentView = styled(
|
|
1520
|
+
var SideContentView = /*#__PURE__*/styled.View.withConfig({
|
|
1521
|
+
displayName: "ListItemSideContent__SideContentView"
|
|
1522
|
+
})(["align-self:", ";"], function (_ref4) {
|
|
1256
1523
|
var align = _ref4.align;
|
|
1257
1524
|
return align;
|
|
1258
1525
|
});
|
|
@@ -1262,19 +1529,21 @@ function ListItemSideContent(_ref5) {
|
|
|
1262
1529
|
align = _ref5$align === void 0 ? 'auto' : _ref5$align,
|
|
1263
1530
|
rest = _objectWithoutProperties(_ref5, _excluded2$1);
|
|
1264
1531
|
|
|
1265
|
-
return /*#__PURE__*/
|
|
1532
|
+
return /*#__PURE__*/jsx(SideContentView, _objectSpread$6(_objectSpread$6({
|
|
1266
1533
|
align: align
|
|
1267
|
-
}, rest),
|
|
1534
|
+
}, rest), {}, {
|
|
1535
|
+
children: children
|
|
1536
|
+
}));
|
|
1268
1537
|
}
|
|
1269
1538
|
|
|
1270
1539
|
var _excluded$3 = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
1271
1540
|
|
|
1272
|
-
var
|
|
1541
|
+
function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1273
1542
|
|
|
1274
|
-
function
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1543
|
+
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1544
|
+
var ContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
1545
|
+
displayName: "ListItem__ContainerView"
|
|
1546
|
+
})(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], function (_ref) {
|
|
1278
1547
|
var withPadding = _ref.withPadding,
|
|
1279
1548
|
theme = _ref.theme;
|
|
1280
1549
|
return withPadding ? theme.kitt.listItem.padding : 0;
|
|
@@ -1312,27 +1581,36 @@ function ListItem(_ref5) {
|
|
|
1312
1581
|
onPress = _ref5.onPress,
|
|
1313
1582
|
rest = _objectWithoutProperties(_ref5, _excluded$3);
|
|
1314
1583
|
|
|
1315
|
-
var Wrapper = onPress ?
|
|
1316
|
-
var wrapperProps = onPress ? _objectSpread$
|
|
1584
|
+
var Wrapper = onPress ? Pressable : Fragment;
|
|
1585
|
+
var wrapperProps = onPress ? _objectSpread$5({
|
|
1317
1586
|
accessibilityRole: 'button',
|
|
1318
1587
|
onPress: onPress
|
|
1319
1588
|
}, rest) : undefined;
|
|
1320
1589
|
var containerProps = onPress ? undefined : rest;
|
|
1321
|
-
return /*#__PURE__*/
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1590
|
+
return /*#__PURE__*/jsx(Wrapper, _objectSpread$5(_objectSpread$5({}, wrapperProps), {}, {
|
|
1591
|
+
children: /*#__PURE__*/jsxs(ContainerView, _objectSpread$5(_objectSpread$5({
|
|
1592
|
+
withPadding: withPadding,
|
|
1593
|
+
borders: borders
|
|
1594
|
+
}, containerProps), {}, {
|
|
1595
|
+
children: [left ? /*#__PURE__*/jsx(ListItemSideContainer, {
|
|
1596
|
+
side: "left",
|
|
1597
|
+
children: left
|
|
1598
|
+
}) : null, /*#__PURE__*/jsx(ListItemContent, {
|
|
1599
|
+
children: children
|
|
1600
|
+
}), right ? /*#__PURE__*/jsx(ListItemSideContainer, {
|
|
1601
|
+
side: "right",
|
|
1602
|
+
children: right
|
|
1603
|
+
}) : null]
|
|
1604
|
+
}))
|
|
1605
|
+
}));
|
|
1329
1606
|
}
|
|
1330
1607
|
ListItem.Content = ListItemContent;
|
|
1331
1608
|
ListItem.SideContent = ListItemSideContent;
|
|
1332
1609
|
ListItem.SideContainer = ListItemSideContainer;
|
|
1333
1610
|
|
|
1334
1611
|
function getActivityIndicatorSize(size) {
|
|
1335
|
-
return size;
|
|
1612
|
+
if (Platform.OS === 'android') return size;
|
|
1613
|
+
return size < 36 ? 'small' : 'large';
|
|
1336
1614
|
}
|
|
1337
1615
|
|
|
1338
1616
|
function Loader(_ref) {
|
|
@@ -1340,9 +1618,9 @@ function Loader(_ref) {
|
|
|
1340
1618
|
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
1341
1619
|
_ref$size = _ref.size,
|
|
1342
1620
|
size = _ref$size === void 0 ? 20 : _ref$size;
|
|
1343
|
-
var theme = useTheme();
|
|
1621
|
+
var theme = /*#__PURE__*/useTheme();
|
|
1344
1622
|
var colorHex = theme.kitt.typography.colors[color];
|
|
1345
|
-
return /*#__PURE__*/
|
|
1623
|
+
return /*#__PURE__*/jsx(ActivityIndicator, {
|
|
1346
1624
|
testID: "ActivityIndicator",
|
|
1347
1625
|
color: colorHex,
|
|
1348
1626
|
size: getActivityIndicatorSize(size)
|
|
@@ -1352,16 +1630,17 @@ function Loader(_ref) {
|
|
|
1352
1630
|
function LargeLoader(_ref) {
|
|
1353
1631
|
var _ref$color = _ref.color,
|
|
1354
1632
|
color = _ref$color === void 0 ? 'primary' : _ref$color;
|
|
1355
|
-
return /*#__PURE__*/
|
|
1633
|
+
return /*#__PURE__*/jsx(Loader, {
|
|
1356
1634
|
color: color,
|
|
1357
1635
|
size: 60
|
|
1358
1636
|
});
|
|
1359
1637
|
}
|
|
1360
1638
|
|
|
1361
|
-
var _templateObject$c, _templateObject2$5, _templateObject3$3, _templateObject4$3;
|
|
1362
1639
|
var xIconSize = 14;
|
|
1363
1640
|
var mainIconSize = 20;
|
|
1364
|
-
var Container$
|
|
1641
|
+
var Container$2 = /*#__PURE__*/styled.View.withConfig({
|
|
1642
|
+
displayName: "Message__Container"
|
|
1643
|
+
})(["border-radius:", "px;background-color:", ";padding-bottom:", "px;padding-left:", "px;padding-right:", "px;padding-top:", "px;flex-direction:row;align-items:flex-start;justify-content:space-between;"], function (_ref) {
|
|
1365
1644
|
var theme = _ref.theme,
|
|
1366
1645
|
noRadius = _ref.noRadius;
|
|
1367
1646
|
return noRadius ? 0 : theme.kitt.spacing * 5;
|
|
@@ -1385,18 +1664,24 @@ var Container$1 = styled(PrimitiveView)(_templateObject$c || (_templateObject$c
|
|
|
1385
1664
|
insets = _ref6.insets;
|
|
1386
1665
|
return ((_insets$top = insets === null || insets === void 0 ? void 0 : insets.top) !== null && _insets$top !== void 0 ? _insets$top : 0) + theme.kitt.spacing * 4;
|
|
1387
1666
|
});
|
|
1388
|
-
var CloseContainer = styled(TouchableOpacity)(
|
|
1667
|
+
var CloseContainer = /*#__PURE__*/styled(TouchableOpacity).withConfig({
|
|
1668
|
+
displayName: "Message__CloseContainer"
|
|
1669
|
+
})(["margin-left:", "px;padding:", "px;"], function (_ref7) {
|
|
1389
1670
|
var theme = _ref7.theme;
|
|
1390
1671
|
return theme.kitt.spacing * 4;
|
|
1391
1672
|
}, function (_ref8) {
|
|
1392
1673
|
var theme = _ref8.theme;
|
|
1393
1674
|
return theme.kitt.spacing;
|
|
1394
1675
|
});
|
|
1395
|
-
var IconContainer = styled(
|
|
1676
|
+
var IconContainer = /*#__PURE__*/styled.View.withConfig({
|
|
1677
|
+
displayName: "Message__IconContainer"
|
|
1678
|
+
})(["margin-right:", "px;"], function (_ref9) {
|
|
1396
1679
|
var theme = _ref9.theme;
|
|
1397
1680
|
return theme.kitt.spacing * 4;
|
|
1398
1681
|
});
|
|
1399
|
-
var Content = styled(
|
|
1682
|
+
var Content = /*#__PURE__*/styled.Text.withConfig({
|
|
1683
|
+
displayName: "Message__Content"
|
|
1684
|
+
})(["text-align:", ";flex:1;"], function (_ref10) {
|
|
1400
1685
|
var centeredText = _ref10.centeredText;
|
|
1401
1686
|
return centeredText ? 'center' : 'left';
|
|
1402
1687
|
});
|
|
@@ -1418,16 +1703,16 @@ var getColorByType = function (type) {
|
|
|
1418
1703
|
function getIconContent(type) {
|
|
1419
1704
|
switch (type) {
|
|
1420
1705
|
case 'warning':
|
|
1421
|
-
return /*#__PURE__*/
|
|
1706
|
+
return /*#__PURE__*/jsx(AlertCircleIcon, {});
|
|
1422
1707
|
|
|
1423
1708
|
case 'success':
|
|
1424
|
-
return /*#__PURE__*/
|
|
1709
|
+
return /*#__PURE__*/jsx(CheckIcon, {});
|
|
1425
1710
|
|
|
1426
1711
|
case 'danger':
|
|
1427
|
-
return /*#__PURE__*/
|
|
1712
|
+
return /*#__PURE__*/jsx(AlertTriangleIcon, {});
|
|
1428
1713
|
|
|
1429
1714
|
default:
|
|
1430
|
-
return /*#__PURE__*/
|
|
1715
|
+
return /*#__PURE__*/jsx(InfoIcon, {});
|
|
1431
1716
|
}
|
|
1432
1717
|
}
|
|
1433
1718
|
|
|
@@ -1442,50 +1727,58 @@ function Message(_ref11) {
|
|
|
1442
1727
|
onDismiss = _ref11.onDismiss,
|
|
1443
1728
|
insets = _ref11.insets;
|
|
1444
1729
|
var color = getColorByType(type);
|
|
1445
|
-
return /*#__PURE__*/
|
|
1730
|
+
return /*#__PURE__*/jsxs(Container$2, {
|
|
1446
1731
|
type: type,
|
|
1447
1732
|
noRadius: noRadius,
|
|
1448
|
-
insets: insets
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1733
|
+
insets: insets,
|
|
1734
|
+
children: [!centeredText ? /*#__PURE__*/jsx(IconContainer, {
|
|
1735
|
+
children: /*#__PURE__*/jsx(Icon, {
|
|
1736
|
+
size: mainIconSize,
|
|
1737
|
+
color: color,
|
|
1738
|
+
icon: getIconContent(type)
|
|
1739
|
+
})
|
|
1740
|
+
}) : null, /*#__PURE__*/jsx(Content, {
|
|
1741
|
+
type: type,
|
|
1742
|
+
centeredText: centeredText,
|
|
1743
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
1744
|
+
base: "body-small",
|
|
1745
|
+
color: color,
|
|
1746
|
+
children: children
|
|
1747
|
+
})
|
|
1748
|
+
}), onDismiss ? /*#__PURE__*/jsx(CloseContainer, {
|
|
1749
|
+
onPress: onDismiss,
|
|
1750
|
+
children: /*#__PURE__*/jsx(Icon, {
|
|
1751
|
+
icon: /*#__PURE__*/jsx(XIcon, {}),
|
|
1752
|
+
size: xIconSize,
|
|
1753
|
+
color: color
|
|
1754
|
+
})
|
|
1755
|
+
}) : null]
|
|
1756
|
+
});
|
|
1466
1757
|
}
|
|
1467
1758
|
|
|
1468
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1759
|
+
function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1469
1760
|
|
|
1470
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1471
|
-
var OverlayPressable = styled(
|
|
1761
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1762
|
+
var OverlayPressable = /*#__PURE__*/styled.Pressable.withConfig({
|
|
1763
|
+
displayName: "Overlay__OverlayPressable"
|
|
1764
|
+
})(function (_ref) {
|
|
1472
1765
|
var theme = _ref.theme;
|
|
1473
|
-
return _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {
|
|
1766
|
+
return _objectSpread$4(_objectSpread$4({}, StyleSheet.absoluteFillObject), {}, {
|
|
1474
1767
|
backgroundColor: theme.kitt.colors.overlay.dark
|
|
1475
1768
|
});
|
|
1476
1769
|
});
|
|
1477
1770
|
function Overlay(_ref2) {
|
|
1478
1771
|
var onPress = _ref2.onPress;
|
|
1479
|
-
return /*#__PURE__*/
|
|
1772
|
+
return /*#__PURE__*/jsx(OverlayPressable, {
|
|
1480
1773
|
accessibilityRole: "none",
|
|
1481
|
-
onPress: onPress
|
|
1482
|
-
|
|
1774
|
+
onPress: onPress,
|
|
1775
|
+
children: /*#__PURE__*/jsx(View, {})
|
|
1776
|
+
});
|
|
1483
1777
|
}
|
|
1484
1778
|
|
|
1485
|
-
var
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
var BodyView = styled(PrimitiveView)(_templateObject$b || (_templateObject$b = _taggedTemplateLiteral(["\n padding: ", "px ", "px;\n"])), function (_ref) {
|
|
1779
|
+
var BodyView = /*#__PURE__*/styled.View.withConfig({
|
|
1780
|
+
displayName: "Body__BodyView"
|
|
1781
|
+
})(["padding:", "px ", "px;"], function (_ref) {
|
|
1489
1782
|
var theme = _ref.theme;
|
|
1490
1783
|
return theme.kitt.spacing * 6;
|
|
1491
1784
|
}, function (_ref2) {
|
|
@@ -1494,11 +1787,16 @@ var BodyView = styled(PrimitiveView)(_templateObject$b || (_templateObject$b = _
|
|
|
1494
1787
|
});
|
|
1495
1788
|
function ModalBody(_ref3) {
|
|
1496
1789
|
var children = _ref3.children;
|
|
1497
|
-
return /*#__PURE__*/
|
|
1790
|
+
return /*#__PURE__*/jsx(ScrollView, {
|
|
1791
|
+
children: /*#__PURE__*/jsx(BodyView, {
|
|
1792
|
+
children: children
|
|
1793
|
+
})
|
|
1794
|
+
});
|
|
1498
1795
|
}
|
|
1499
1796
|
|
|
1500
|
-
var
|
|
1501
|
-
|
|
1797
|
+
var FooterView = /*#__PURE__*/styled.View.withConfig({
|
|
1798
|
+
displayName: "Footer__FooterView"
|
|
1799
|
+
})(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], function (_ref) {
|
|
1502
1800
|
var theme = _ref.theme;
|
|
1503
1801
|
return theme.kitt.spacing * 4;
|
|
1504
1802
|
}, function (_ref2) {
|
|
@@ -1507,28 +1805,37 @@ var FooterView = styled(PrimitiveView)(_templateObject$a || (_templateObject$a =
|
|
|
1507
1805
|
});
|
|
1508
1806
|
function ModalFooter(_ref3) {
|
|
1509
1807
|
var children = _ref3.children;
|
|
1510
|
-
return /*#__PURE__*/
|
|
1808
|
+
return /*#__PURE__*/jsx(FooterView, {
|
|
1809
|
+
children: children
|
|
1810
|
+
});
|
|
1511
1811
|
}
|
|
1512
1812
|
|
|
1513
1813
|
var OnCloseContext = /*#__PURE__*/createContext(function () {});
|
|
1514
1814
|
|
|
1515
|
-
var
|
|
1516
|
-
|
|
1815
|
+
var HeaderView = /*#__PURE__*/styled.View.withConfig({
|
|
1816
|
+
displayName: "Header__HeaderView"
|
|
1817
|
+
})(["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) {
|
|
1517
1818
|
var theme = _ref.theme;
|
|
1518
1819
|
return theme.kitt.spacing * 2;
|
|
1519
1820
|
}, function (_ref2) {
|
|
1520
1821
|
var theme = _ref2.theme;
|
|
1521
1822
|
return theme.kitt.colors.separator;
|
|
1522
1823
|
});
|
|
1523
|
-
var LeftIconView = styled(
|
|
1824
|
+
var LeftIconView = /*#__PURE__*/styled.View.withConfig({
|
|
1825
|
+
displayName: "Header__LeftIconView"
|
|
1826
|
+
})(["align-self:flex-start;margin-right:", "px;"], function (_ref3) {
|
|
1524
1827
|
var theme = _ref3.theme;
|
|
1525
1828
|
return theme.kitt.spacing * 2;
|
|
1526
1829
|
});
|
|
1527
|
-
var RightIconView = styled(
|
|
1830
|
+
var RightIconView = /*#__PURE__*/styled.View.withConfig({
|
|
1831
|
+
displayName: "Header__RightIconView"
|
|
1832
|
+
})(["align-self:flex-start;margin-left:", "px;"], function (_ref4) {
|
|
1528
1833
|
var theme = _ref4.theme;
|
|
1529
1834
|
return theme.kitt.spacing * 2;
|
|
1530
1835
|
});
|
|
1531
|
-
var TitleView = styled(
|
|
1836
|
+
var TitleView = /*#__PURE__*/styled.View.withConfig({
|
|
1837
|
+
displayName: "Header__TitleView"
|
|
1838
|
+
})(["padding-left:", "px;flex-shrink:1;"], function (_ref5) {
|
|
1532
1839
|
var theme = _ref5.theme,
|
|
1533
1840
|
isIconLeft = _ref5.isIconLeft;
|
|
1534
1841
|
return isIconLeft ? 0 : theme.kitt.spacing * 2;
|
|
@@ -1539,24 +1846,34 @@ function ModalHeader(_ref6) {
|
|
|
1539
1846
|
children = _ref6.children;
|
|
1540
1847
|
var onClose = useContext(OnCloseContext);
|
|
1541
1848
|
var isIconLeft = !!left;
|
|
1542
|
-
return /*#__PURE__*/
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1849
|
+
return /*#__PURE__*/jsxs(HeaderView, {
|
|
1850
|
+
children: [isIconLeft && /*#__PURE__*/jsx(LeftIconView, {
|
|
1851
|
+
children: left
|
|
1852
|
+
}), /*#__PURE__*/jsx(TitleView, {
|
|
1853
|
+
isIconLeft: isIconLeft,
|
|
1854
|
+
children: children
|
|
1855
|
+
}), right !== undefined ? right : /*#__PURE__*/jsx(RightIconView, {
|
|
1856
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
1857
|
+
type: "subtle-dark",
|
|
1858
|
+
icon: /*#__PURE__*/jsx(XIcon, {}),
|
|
1859
|
+
onPress: onClose
|
|
1860
|
+
})
|
|
1861
|
+
})]
|
|
1862
|
+
});
|
|
1549
1863
|
}
|
|
1550
1864
|
|
|
1551
|
-
var
|
|
1552
|
-
|
|
1865
|
+
var ModalView = /*#__PURE__*/styled.View.withConfig({
|
|
1866
|
+
displayName: "Modal__ModalView"
|
|
1867
|
+
})(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], function (_ref) {
|
|
1553
1868
|
var theme = _ref.theme;
|
|
1554
1869
|
return theme.kitt.spacing * 20;
|
|
1555
1870
|
}, function (_ref2) {
|
|
1556
1871
|
var theme = _ref2.theme;
|
|
1557
1872
|
return theme.kitt.spacing * 4;
|
|
1558
1873
|
});
|
|
1559
|
-
var ContentView = styled(
|
|
1874
|
+
var ContentView = /*#__PURE__*/styled.View.withConfig({
|
|
1875
|
+
displayName: "Modal__ContentView"
|
|
1876
|
+
})(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", ";background-color:", ";"], function (_ref3) {
|
|
1560
1877
|
var theme = _ref3.theme;
|
|
1561
1878
|
return theme.kitt.card.borderRadius;
|
|
1562
1879
|
}, function (_ref4) {
|
|
@@ -1569,18 +1886,24 @@ function Modal(_ref5) {
|
|
|
1569
1886
|
onClose = _ref5.onClose,
|
|
1570
1887
|
onEntered = _ref5.onEntered,
|
|
1571
1888
|
onExited = _ref5.onExited;
|
|
1572
|
-
return /*#__PURE__*/
|
|
1573
|
-
value: onClose
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1889
|
+
return /*#__PURE__*/jsx(OnCloseContext.Provider, {
|
|
1890
|
+
value: onClose,
|
|
1891
|
+
children: /*#__PURE__*/jsx(Modal$1, {
|
|
1892
|
+
transparent: true,
|
|
1893
|
+
animationType: "fade",
|
|
1894
|
+
visible: visible,
|
|
1895
|
+
onShow: onEntered,
|
|
1896
|
+
onDismiss: onExited,
|
|
1897
|
+
onRequestClose: onClose,
|
|
1898
|
+
children: /*#__PURE__*/jsxs(ModalView, {
|
|
1899
|
+
children: [/*#__PURE__*/jsx(Overlay, {
|
|
1900
|
+
onPress: onClose
|
|
1901
|
+
}), /*#__PURE__*/jsx(ContentView, {
|
|
1902
|
+
children: children
|
|
1903
|
+
})]
|
|
1904
|
+
})
|
|
1905
|
+
})
|
|
1906
|
+
});
|
|
1584
1907
|
}
|
|
1585
1908
|
Modal.Header = ModalHeader;
|
|
1586
1909
|
Modal.Body = ModalBody;
|
|
@@ -1595,25 +1918,25 @@ function Notification(_ref) {
|
|
|
1595
1918
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
1596
1919
|
top = _useSafeAreaInsets.top;
|
|
1597
1920
|
|
|
1598
|
-
return /*#__PURE__*/
|
|
1921
|
+
return /*#__PURE__*/jsx(Message, {
|
|
1599
1922
|
noRadius: true,
|
|
1600
1923
|
type: type,
|
|
1601
1924
|
centeredText: centeredText,
|
|
1602
1925
|
insets: {
|
|
1603
1926
|
top: top
|
|
1604
1927
|
},
|
|
1605
|
-
onDismiss: onDelete
|
|
1606
|
-
|
|
1928
|
+
onDismiss: onDelete,
|
|
1929
|
+
children: children
|
|
1930
|
+
});
|
|
1607
1931
|
}
|
|
1608
1932
|
|
|
1609
|
-
var
|
|
1610
|
-
|
|
1611
|
-
var _templateObject$7;
|
|
1612
|
-
var Flex = styled(PrimitiveView).withConfig({
|
|
1933
|
+
var Flex = /*#__PURE__*/styled.View.withConfig({
|
|
1613
1934
|
shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {
|
|
1614
1935
|
return !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop);
|
|
1615
1936
|
}
|
|
1616
|
-
})(
|
|
1937
|
+
}).withConfig({
|
|
1938
|
+
displayName: "Flex"
|
|
1939
|
+
})(["display:flex;flex-direction:", ";flex-wrap:wrap;padding:", "px;"], function (_ref) {
|
|
1617
1940
|
var direction = _ref.direction;
|
|
1618
1941
|
return direction;
|
|
1619
1942
|
}, function (_ref2) {
|
|
@@ -1625,8 +1948,6 @@ var Flex = styled(PrimitiveView).withConfig({
|
|
|
1625
1948
|
|
|
1626
1949
|
var storyPadding = 16;
|
|
1627
1950
|
|
|
1628
|
-
var _templateObject$6;
|
|
1629
|
-
|
|
1630
1951
|
var getBackgroundColorFromBlockColor = function (theme) {
|
|
1631
1952
|
var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'transparent';
|
|
1632
1953
|
|
|
@@ -1665,7 +1986,9 @@ var useStoryBlockColor = function (color) {
|
|
|
1665
1986
|
var storyBlockColor = useContext(StoryBlockColorContext);
|
|
1666
1987
|
return color || storyBlockColor;
|
|
1667
1988
|
};
|
|
1668
|
-
var StyledStoryBlockView = styled(
|
|
1989
|
+
var StyledStoryBlockView = /*#__PURE__*/styled.View.withConfig({
|
|
1990
|
+
displayName: "StoryBlock__StyledStoryBlockView"
|
|
1991
|
+
})(["padding:16px ", "px 0;margin:0 -", "px;background:", ";"], storyPadding, storyPadding, function (_ref) {
|
|
1669
1992
|
var theme = _ref.theme,
|
|
1670
1993
|
background = _ref.background;
|
|
1671
1994
|
return getBackgroundColorFromBlockColor(theme, background);
|
|
@@ -1673,40 +1996,52 @@ var StyledStoryBlockView = styled(PrimitiveView)(_templateObject$6 || (_template
|
|
|
1673
1996
|
function StoryBlock(_ref2) {
|
|
1674
1997
|
var children = _ref2.children,
|
|
1675
1998
|
background = _ref2.background;
|
|
1676
|
-
return /*#__PURE__*/
|
|
1677
|
-
background: background
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
}
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1999
|
+
return /*#__PURE__*/jsx(StyledStoryBlockView, {
|
|
2000
|
+
background: background,
|
|
2001
|
+
children: /*#__PURE__*/jsx(StoryBlockColorContext.Provider, {
|
|
2002
|
+
value: getTypographyColorFromBlockColor(background),
|
|
2003
|
+
children: /*#__PURE__*/jsx(StoryBlockBackgroundContext.Provider, {
|
|
2004
|
+
value: background,
|
|
2005
|
+
children: children
|
|
2006
|
+
})
|
|
2007
|
+
})
|
|
2008
|
+
});
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
var StoryTitleContainer = /*#__PURE__*/styled.View.withConfig({
|
|
2012
|
+
displayName: "StoryTitle__StoryTitleContainer"
|
|
2013
|
+
})(["margin-bottom:30px;"]);
|
|
2014
|
+
var StorySubTitleContainer = /*#__PURE__*/styled.View.withConfig({
|
|
2015
|
+
displayName: "StoryTitle__StorySubTitleContainer"
|
|
2016
|
+
})(["margin-bottom:10px;"]);
|
|
1688
2017
|
function StoryTitle(_ref) {
|
|
1689
2018
|
var color = _ref.color,
|
|
1690
2019
|
children = _ref.children,
|
|
1691
2020
|
numberOfLines = _ref.numberOfLines;
|
|
1692
|
-
return /*#__PURE__*/
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
2021
|
+
return /*#__PURE__*/jsx(StoryTitleContainer, {
|
|
2022
|
+
children: /*#__PURE__*/jsx(Typography.Header1, {
|
|
2023
|
+
variant: "bold",
|
|
2024
|
+
base: "header1",
|
|
2025
|
+
color: useStoryBlockColor(color),
|
|
2026
|
+
numberOfLines: numberOfLines,
|
|
2027
|
+
children: children
|
|
2028
|
+
})
|
|
2029
|
+
});
|
|
1698
2030
|
}
|
|
1699
2031
|
|
|
1700
2032
|
function StoryTitleLevel2(_ref2) {
|
|
1701
2033
|
var color = _ref2.color,
|
|
1702
2034
|
children = _ref2.children,
|
|
1703
2035
|
numberOfLines = _ref2.numberOfLines;
|
|
1704
|
-
return /*#__PURE__*/
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
2036
|
+
return /*#__PURE__*/jsx(StoryTitleContainer, {
|
|
2037
|
+
children: /*#__PURE__*/jsx(Typography.Header2, {
|
|
2038
|
+
variant: "bold",
|
|
2039
|
+
base: "header2",
|
|
2040
|
+
color: useStoryBlockColor(color),
|
|
2041
|
+
numberOfLines: numberOfLines,
|
|
2042
|
+
children: children
|
|
2043
|
+
})
|
|
2044
|
+
});
|
|
1710
2045
|
}
|
|
1711
2046
|
|
|
1712
2047
|
StoryTitleLevel2.displayName = 'StoryTitle.Level2';
|
|
@@ -1715,13 +2050,16 @@ function StoryTitleLevel3(_ref3) {
|
|
|
1715
2050
|
var color = _ref3.color,
|
|
1716
2051
|
children = _ref3.children,
|
|
1717
2052
|
numberOfLines = _ref3.numberOfLines;
|
|
1718
|
-
return /*#__PURE__*/
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
2053
|
+
return /*#__PURE__*/jsx(StorySubTitleContainer, {
|
|
2054
|
+
children: /*#__PURE__*/jsx(Typography.Header3, {
|
|
2055
|
+
variant: "bold",
|
|
2056
|
+
base: "header3",
|
|
2057
|
+
medium: "header4",
|
|
2058
|
+
color: useStoryBlockColor(color),
|
|
2059
|
+
numberOfLines: numberOfLines,
|
|
2060
|
+
children: children
|
|
2061
|
+
})
|
|
2062
|
+
});
|
|
1725
2063
|
}
|
|
1726
2064
|
|
|
1727
2065
|
StoryTitleLevel3.displayName = 'StoryTitle.Level3';
|
|
@@ -1730,13 +2068,16 @@ function StoryTitleLevel4(_ref4) {
|
|
|
1730
2068
|
var color = _ref4.color,
|
|
1731
2069
|
children = _ref4.children,
|
|
1732
2070
|
numberOfLines = _ref4.numberOfLines;
|
|
1733
|
-
return /*#__PURE__*/
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
2071
|
+
return /*#__PURE__*/jsx(StorySubTitleContainer, {
|
|
2072
|
+
children: /*#__PURE__*/jsx(Typography.Header4, {
|
|
2073
|
+
variant: "bold",
|
|
2074
|
+
base: "header4",
|
|
2075
|
+
medium: "header5",
|
|
2076
|
+
color: useStoryBlockColor(color),
|
|
2077
|
+
numberOfLines: numberOfLines,
|
|
2078
|
+
children: children
|
|
2079
|
+
})
|
|
2080
|
+
});
|
|
1740
2081
|
}
|
|
1741
2082
|
|
|
1742
2083
|
StoryTitleLevel4.displayName = 'StoryTitle.Level3';
|
|
@@ -1744,63 +2085,89 @@ StoryTitle.Level2 = StoryTitleLevel2;
|
|
|
1744
2085
|
StoryTitle.Level3 = StoryTitleLevel3;
|
|
1745
2086
|
StoryTitle.Level4 = StoryTitleLevel4;
|
|
1746
2087
|
|
|
1747
|
-
var
|
|
1748
|
-
|
|
2088
|
+
var StoryContainer$1 = /*#__PURE__*/styled.ScrollView.withConfig({
|
|
2089
|
+
displayName: "Story__StoryContainer"
|
|
2090
|
+
})(["padding:", "px;"], storyPadding);
|
|
1749
2091
|
function Story(_ref) {
|
|
1750
2092
|
var title = _ref.title,
|
|
1751
2093
|
contentContainerStyle = _ref.contentContainerStyle,
|
|
1752
2094
|
children = _ref.children;
|
|
1753
|
-
return /*#__PURE__*/
|
|
1754
|
-
contentContainerStyle: contentContainerStyle
|
|
1755
|
-
|
|
2095
|
+
return /*#__PURE__*/jsxs(StoryContainer$1, {
|
|
2096
|
+
contentContainerStyle: contentContainerStyle,
|
|
2097
|
+
children: [/*#__PURE__*/jsx(StoryTitle, {
|
|
2098
|
+
children: title
|
|
2099
|
+
}), children]
|
|
2100
|
+
});
|
|
1756
2101
|
}
|
|
1757
2102
|
|
|
1758
|
-
var _excluded$2 = ["title", "
|
|
1759
|
-
_excluded2 = ["title", "
|
|
1760
|
-
_excluded3 = ["title", "
|
|
2103
|
+
var _excluded$2 = ["title", "children", "internalIsDemoSection"],
|
|
2104
|
+
_excluded2 = ["title", "children"],
|
|
2105
|
+
_excluded3 = ["title", "children"];
|
|
1761
2106
|
|
|
1762
|
-
|
|
1763
|
-
|
|
2107
|
+
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2108
|
+
|
|
2109
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2110
|
+
var StyledSection = /*#__PURE__*/styled.View.withConfig({
|
|
2111
|
+
displayName: "StorySection__StyledSection"
|
|
2112
|
+
})(["margin-bottom:32px;"]);
|
|
1764
2113
|
function StorySection(_ref) {
|
|
1765
|
-
var title = _ref.title
|
|
1766
|
-
_ref.
|
|
1767
|
-
var children = _ref.children,
|
|
2114
|
+
var title = _ref.title,
|
|
2115
|
+
children = _ref.children,
|
|
1768
2116
|
internalIsDemoSection = _ref.internalIsDemoSection,
|
|
1769
2117
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
1770
2118
|
|
|
1771
2119
|
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
1772
|
-
return /*#__PURE__*/
|
|
2120
|
+
return /*#__PURE__*/jsxs(StyledSection, _objectSpread$3(_objectSpread$3({}, props), {}, {
|
|
2121
|
+
children: [/*#__PURE__*/jsx(StoryTitle.Level2, {
|
|
2122
|
+
children: title
|
|
2123
|
+
}), children]
|
|
2124
|
+
}));
|
|
1773
2125
|
}
|
|
1774
|
-
var StyledSubSection = styled(
|
|
2126
|
+
var StyledSubSection = /*#__PURE__*/styled.View.withConfig({
|
|
2127
|
+
displayName: "StorySection__StyledSubSection"
|
|
2128
|
+
})(["margin-bottom:16px;"]);
|
|
1775
2129
|
|
|
1776
2130
|
function SubSection(_ref2) {
|
|
1777
|
-
var title = _ref2.title
|
|
1778
|
-
_ref2.
|
|
1779
|
-
var children = _ref2.children,
|
|
2131
|
+
var title = _ref2.title,
|
|
2132
|
+
children = _ref2.children,
|
|
1780
2133
|
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
1781
2134
|
|
|
1782
|
-
return /*#__PURE__*/
|
|
2135
|
+
return /*#__PURE__*/jsxs(StyledSubSection, _objectSpread$3(_objectSpread$3({}, props), {}, {
|
|
2136
|
+
children: [/*#__PURE__*/jsx(StoryTitle.Level3, {
|
|
2137
|
+
children: title
|
|
2138
|
+
}), children]
|
|
2139
|
+
}));
|
|
1783
2140
|
}
|
|
1784
2141
|
|
|
1785
|
-
var StyledBlockSection = styled(
|
|
2142
|
+
var StyledBlockSection = /*#__PURE__*/styled.View.withConfig({
|
|
2143
|
+
displayName: "StorySection__StyledBlockSection"
|
|
2144
|
+
})(["margin-bottom:16px;"]);
|
|
1786
2145
|
|
|
1787
2146
|
function BlockSection(_ref3) {
|
|
1788
|
-
var title = _ref3.title
|
|
1789
|
-
_ref3.
|
|
1790
|
-
var children = _ref3.children,
|
|
2147
|
+
var title = _ref3.title,
|
|
2148
|
+
children = _ref3.children,
|
|
1791
2149
|
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
1792
2150
|
|
|
1793
|
-
return /*#__PURE__*/
|
|
2151
|
+
return /*#__PURE__*/jsxs(StyledBlockSection, _objectSpread$3(_objectSpread$3({}, props), {}, {
|
|
2152
|
+
children: [/*#__PURE__*/jsx(StoryTitle.Level4, {
|
|
2153
|
+
children: title
|
|
2154
|
+
}), children]
|
|
2155
|
+
}));
|
|
1794
2156
|
}
|
|
1795
2157
|
|
|
1796
|
-
var StyledDemoSection = styled(
|
|
2158
|
+
var StyledDemoSection = /*#__PURE__*/styled.View.withConfig({
|
|
2159
|
+
displayName: "StorySection__StyledDemoSection"
|
|
2160
|
+
})(["margin-bottom:64px;"]);
|
|
1797
2161
|
|
|
1798
2162
|
function DemoSection(_ref4) {
|
|
1799
2163
|
var children = _ref4.children;
|
|
1800
|
-
return /*#__PURE__*/
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
2164
|
+
return /*#__PURE__*/jsx(StyledDemoSection, {
|
|
2165
|
+
children: /*#__PURE__*/jsx(StorySection, {
|
|
2166
|
+
internalIsDemoSection: true,
|
|
2167
|
+
title: "Demo",
|
|
2168
|
+
children: children
|
|
2169
|
+
})
|
|
2170
|
+
});
|
|
1804
2171
|
}
|
|
1805
2172
|
|
|
1806
2173
|
StorySection.SubSection = SubSection;
|
|
@@ -1821,23 +2188,32 @@ function StoryContainer(_ref) {
|
|
|
1821
2188
|
_ref$platform = _ref.platform,
|
|
1822
2189
|
platform = _ref$platform === void 0 ? 'all' : _ref$platform;
|
|
1823
2190
|
if (platform === 'web') return null;
|
|
1824
|
-
return /*#__PURE__*/
|
|
2191
|
+
return /*#__PURE__*/jsx(StorySection.BlockSection, {
|
|
1825
2192
|
testID: state,
|
|
1826
|
-
title: title
|
|
1827
|
-
|
|
2193
|
+
title: title,
|
|
2194
|
+
children: children
|
|
2195
|
+
});
|
|
1828
2196
|
}
|
|
1829
2197
|
|
|
1830
2198
|
function StoryDecorator(storyFn, context) {
|
|
1831
|
-
return /*#__PURE__*/
|
|
1832
|
-
title: context.name
|
|
1833
|
-
|
|
2199
|
+
return /*#__PURE__*/jsx(Story, {
|
|
2200
|
+
title: context.name,
|
|
2201
|
+
children: storyFn()
|
|
2202
|
+
});
|
|
1834
2203
|
}
|
|
1835
2204
|
|
|
1836
|
-
var
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
var
|
|
1840
|
-
|
|
2205
|
+
var SmallScreenRow = /*#__PURE__*/styled.View.withConfig({
|
|
2206
|
+
displayName: "StoryGrid__SmallScreenRow"
|
|
2207
|
+
})(["flex-direction:column;margin:0;"]);
|
|
2208
|
+
var SmallScreenCol = /*#__PURE__*/styled.View.withConfig({
|
|
2209
|
+
displayName: "StoryGrid__SmallScreenCol"
|
|
2210
|
+
})(["padding:8px 0 16px;"]);
|
|
2211
|
+
var FlexRow = /*#__PURE__*/styled.View.withConfig({
|
|
2212
|
+
displayName: "StoryGrid__FlexRow"
|
|
2213
|
+
})(["flex-direction:row;margin:0 -4px 16px;"]);
|
|
2214
|
+
var FlexCol = /*#__PURE__*/styled.View.withConfig({
|
|
2215
|
+
displayName: "StoryGrid__FlexCol"
|
|
2216
|
+
})(["flex-grow:1;flex-basis:0;margin:0 8px;"]);
|
|
1841
2217
|
|
|
1842
2218
|
function StoryGridRow(_ref) {
|
|
1843
2219
|
var children = _ref.children,
|
|
@@ -1852,14 +2228,22 @@ function StoryGridRow(_ref) {
|
|
|
1852
2228
|
var breakpointValue = breakpoint === 'small' ? 480 : 768;
|
|
1853
2229
|
|
|
1854
2230
|
if (width < breakpointValue) {
|
|
1855
|
-
return /*#__PURE__*/
|
|
1856
|
-
|
|
1857
|
-
|
|
2231
|
+
return /*#__PURE__*/jsx(SmallScreenRow, {
|
|
2232
|
+
children: Children.map(children, function (child) {
|
|
2233
|
+
return /*#__PURE__*/jsx(SmallScreenCol, {
|
|
2234
|
+
children: child
|
|
2235
|
+
});
|
|
2236
|
+
})
|
|
2237
|
+
});
|
|
1858
2238
|
}
|
|
1859
2239
|
|
|
1860
|
-
return /*#__PURE__*/
|
|
1861
|
-
|
|
1862
|
-
|
|
2240
|
+
return /*#__PURE__*/jsx(FlexRow, {
|
|
2241
|
+
children: Children.map(children, function (child) {
|
|
2242
|
+
return /*#__PURE__*/jsx(FlexCol, {
|
|
2243
|
+
children: child
|
|
2244
|
+
});
|
|
2245
|
+
})
|
|
2246
|
+
});
|
|
1863
2247
|
}
|
|
1864
2248
|
|
|
1865
2249
|
function StoryGridCol(_ref2) {
|
|
@@ -1868,15 +2252,23 @@ function StoryGridCol(_ref2) {
|
|
|
1868
2252
|
children = _ref2.children,
|
|
1869
2253
|
_ref2$platform = _ref2.platform,
|
|
1870
2254
|
platform = _ref2$platform === void 0 ? 'all' : _ref2$platform;
|
|
2255
|
+
var isNative = Platform.OS === 'ios' || Platform.OS === 'android';
|
|
2256
|
+
|
|
2257
|
+
if (Platform.OS === 'web' && platform === 'native') {
|
|
2258
|
+
return null;
|
|
2259
|
+
}
|
|
1871
2260
|
|
|
1872
|
-
if (platform === 'web') {
|
|
2261
|
+
if (isNative && platform === 'web') {
|
|
1873
2262
|
return null;
|
|
1874
2263
|
}
|
|
1875
2264
|
|
|
1876
|
-
return /*#__PURE__*/
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
2265
|
+
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
2266
|
+
children: [title ? /*#__PURE__*/jsx(StoryTitle.Level4, {
|
|
2267
|
+
numberOfLines: 1,
|
|
2268
|
+
color: titleColor,
|
|
2269
|
+
children: title
|
|
2270
|
+
}) : null, children]
|
|
2271
|
+
});
|
|
1880
2272
|
}
|
|
1881
2273
|
|
|
1882
2274
|
var StoryGrid = {
|
|
@@ -1884,8 +2276,9 @@ var StoryGrid = {
|
|
|
1884
2276
|
Col: StoryGridCol
|
|
1885
2277
|
};
|
|
1886
2278
|
|
|
1887
|
-
var
|
|
1888
|
-
|
|
2279
|
+
var Container$1 = /*#__PURE__*/styled.View.withConfig({
|
|
2280
|
+
displayName: "Tag__Container"
|
|
2281
|
+
})(["background-color:", ";border-width:", ";border-color:", ";padding:", ";border-radius:", ";align-self:flex-start;"], function (_ref) {
|
|
1889
2282
|
var theme = _ref.theme,
|
|
1890
2283
|
type = _ref.type,
|
|
1891
2284
|
variant = _ref.variant;
|
|
@@ -1936,13 +2329,15 @@ function Tag(_ref6) {
|
|
|
1936
2329
|
type = _ref6$type === void 0 ? 'default' : _ref6$type,
|
|
1937
2330
|
_ref6$variant = _ref6.variant,
|
|
1938
2331
|
variant = _ref6$variant === void 0 ? 'fill' : _ref6$variant;
|
|
1939
|
-
return /*#__PURE__*/
|
|
2332
|
+
return /*#__PURE__*/jsx(Container$1, {
|
|
1940
2333
|
type: type,
|
|
1941
|
-
variant: variant
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
2334
|
+
variant: variant,
|
|
2335
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
2336
|
+
base: "body-xsmall",
|
|
2337
|
+
color: getLabelColor(type, variant),
|
|
2338
|
+
children: label
|
|
2339
|
+
})
|
|
2340
|
+
});
|
|
1946
2341
|
}
|
|
1947
2342
|
|
|
1948
2343
|
var lateOceanColorPalette = {
|
|
@@ -2051,6 +2446,7 @@ var colorsLateOceanTheme = {
|
|
|
2051
2446
|
danger: lateOceanColorPalette.englishVermillon,
|
|
2052
2447
|
separator: lateOceanColorPalette.black100,
|
|
2053
2448
|
hover: lateOceanColorPalette.black100,
|
|
2449
|
+
black: lateOceanColorPalette.black1000,
|
|
2054
2450
|
uiBackground: lateOceanColorPalette.black25,
|
|
2055
2451
|
uiBackgroundLight: lateOceanColorPalette.white,
|
|
2056
2452
|
overlay: {
|
|
@@ -2236,6 +2632,15 @@ var tagLateOceanTheme = {
|
|
|
2236
2632
|
}
|
|
2237
2633
|
};
|
|
2238
2634
|
|
|
2635
|
+
var tooltip = {
|
|
2636
|
+
backgroundColor: colorsLateOceanTheme.black,
|
|
2637
|
+
borderRadius: 10,
|
|
2638
|
+
opacity: 0.95,
|
|
2639
|
+
horizontalPadding: 16,
|
|
2640
|
+
verticalPadding: 4,
|
|
2641
|
+
floatingPadding: 8
|
|
2642
|
+
};
|
|
2643
|
+
|
|
2239
2644
|
var calcLineHeight = function (fontSize, lineHeightMultiplier) {
|
|
2240
2645
|
return Math.round(fontSize * lineHeightMultiplier);
|
|
2241
2646
|
};
|
|
@@ -2268,8 +2673,8 @@ var typographyLateOceanTheme = {
|
|
|
2268
2673
|
types: {
|
|
2269
2674
|
headers: {
|
|
2270
2675
|
fontFamily: {
|
|
2271
|
-
regular: 'Moderat-Extended-Bold',
|
|
2272
|
-
bold: 'Moderat-Extended-Bold'
|
|
2676
|
+
regular: Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold',
|
|
2677
|
+
bold: Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold'
|
|
2273
2678
|
},
|
|
2274
2679
|
fontWeight: 400,
|
|
2275
2680
|
fontStyle: 'normal',
|
|
@@ -2288,8 +2693,8 @@ var typographyLateOceanTheme = {
|
|
|
2288
2693
|
},
|
|
2289
2694
|
bodies: {
|
|
2290
2695
|
fontFamily: {
|
|
2291
|
-
regular: 'NotoSans',
|
|
2292
|
-
bold: 'NotoSans-Bold'
|
|
2696
|
+
regular: Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans',
|
|
2697
|
+
bold: Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans-Bold'
|
|
2293
2698
|
},
|
|
2294
2699
|
fontWeight: {
|
|
2295
2700
|
regular: 400,
|
|
@@ -2352,45 +2757,430 @@ var theme = {
|
|
|
2352
2757
|
shadows: shadowsLateOceanTheme,
|
|
2353
2758
|
fullScreenModal: fullScreenModalLateOceanTheme,
|
|
2354
2759
|
iconButton: iconButton,
|
|
2355
|
-
listItem: listItemLateOceanTheme
|
|
2760
|
+
listItem: listItemLateOceanTheme,
|
|
2761
|
+
tooltip: tooltip
|
|
2356
2762
|
};
|
|
2357
2763
|
|
|
2358
|
-
function
|
|
2764
|
+
function Title(_ref) {
|
|
2359
2765
|
var children = _ref.children;
|
|
2360
|
-
return /*#__PURE__*/
|
|
2766
|
+
return /*#__PURE__*/jsx(Modal.Header, {
|
|
2767
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
2768
|
+
base: "body",
|
|
2769
|
+
variant: "bold",
|
|
2770
|
+
children: children
|
|
2771
|
+
})
|
|
2772
|
+
});
|
|
2773
|
+
}
|
|
2774
|
+
|
|
2775
|
+
function ModalDateTimePicker(_ref2) {
|
|
2776
|
+
var title = _ref2.title,
|
|
2777
|
+
visible = _ref2.visible,
|
|
2778
|
+
value = _ref2.value,
|
|
2779
|
+
validateButtonLabel = _ref2.validateButtonLabel,
|
|
2780
|
+
onChange = _ref2.onChange,
|
|
2781
|
+
onClose = _ref2.onClose;
|
|
2782
|
+
|
|
2783
|
+
var _useState = useState(value),
|
|
2784
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2785
|
+
currentValue = _useState2[0],
|
|
2786
|
+
setCurrentValue = _useState2[1]; // Prevent unsynced value between the modal and its parent state
|
|
2787
|
+
|
|
2788
|
+
|
|
2789
|
+
return /*#__PURE__*/jsx(Modal, {
|
|
2790
|
+
visible: Boolean(visible),
|
|
2791
|
+
onClose: function handleClose() {
|
|
2792
|
+
setCurrentValue(value);
|
|
2793
|
+
onClose();
|
|
2794
|
+
},
|
|
2795
|
+
children: visible ? /*#__PURE__*/jsxs(Fragment$1, {
|
|
2796
|
+
children: [title ? /*#__PURE__*/jsx(Title, {
|
|
2797
|
+
children: title
|
|
2798
|
+
}) : null, /*#__PURE__*/jsx(Modal.Body, {
|
|
2799
|
+
children: /*#__PURE__*/jsx(DateTimePicker, {
|
|
2800
|
+
is24Hour: true,
|
|
2801
|
+
testID: "date-picker-native-element",
|
|
2802
|
+
value: currentValue,
|
|
2803
|
+
mode: "time",
|
|
2804
|
+
display: Platform.OS === 'ios' ? 'spinner' : 'default',
|
|
2805
|
+
onChange: function (_event, date) {
|
|
2806
|
+
return setCurrentValue(function (prev) {
|
|
2807
|
+
return date || prev;
|
|
2808
|
+
});
|
|
2809
|
+
}
|
|
2810
|
+
})
|
|
2811
|
+
}), /*#__PURE__*/jsx(Modal.Footer, {
|
|
2812
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
2813
|
+
stretch: true,
|
|
2814
|
+
type: "primary",
|
|
2815
|
+
onPress: function handleSubmit() {
|
|
2816
|
+
onChange(currentValue);
|
|
2817
|
+
},
|
|
2818
|
+
children: validateButtonLabel ? /*#__PURE__*/jsx(Text$1, {
|
|
2819
|
+
children: validateButtonLabel
|
|
2820
|
+
}) : /*#__PURE__*/jsx(FormattedMessage, {
|
|
2821
|
+
id: "kitt-universal.ModalDateTimePicker.confirm"
|
|
2822
|
+
})
|
|
2823
|
+
})
|
|
2824
|
+
})]
|
|
2825
|
+
}) : null
|
|
2826
|
+
});
|
|
2827
|
+
}
|
|
2828
|
+
|
|
2829
|
+
var timePickerPlaceholder = '--:--';
|
|
2830
|
+
var useTimePicker = function (value, onChange, onBlur, disabled, defaultValue) {
|
|
2831
|
+
var _useState = useState(false),
|
|
2832
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2833
|
+
isTimePickerModalVisible = _useState2[0],
|
|
2834
|
+
setIsTimePickerModalVisible = _useState2[1];
|
|
2835
|
+
|
|
2836
|
+
var todayAtNoon = useMemo(function () {
|
|
2837
|
+
var now = new Date(2000, 0, 1, 12);
|
|
2838
|
+
return new Date(now.getFullYear(), now.getMonth(), now.getDay(), 12);
|
|
2839
|
+
}, []);
|
|
2840
|
+
var defaultDate = defaultValue || todayAtNoon;
|
|
2841
|
+
var dateTimePickerValue = value || defaultDate;
|
|
2842
|
+
var displayedValue = value === null ? timePickerPlaceholder : Intl.DateTimeFormat('fr-FR', {
|
|
2843
|
+
minute: 'numeric',
|
|
2844
|
+
hour: 'numeric'
|
|
2845
|
+
}).format(dateTimePickerValue);
|
|
2846
|
+
var timePickerState = isTimePickerModalVisible ? 'focus' : 'default';
|
|
2847
|
+
return {
|
|
2848
|
+
dateTimePickerValue: dateTimePickerValue,
|
|
2849
|
+
displayedValue: displayedValue,
|
|
2850
|
+
timePickerState: timePickerState,
|
|
2851
|
+
isTimePickerModalVisible: isTimePickerModalVisible,
|
|
2852
|
+
handleInputPress: function handleInputPress() {
|
|
2853
|
+
if (disabled) {
|
|
2854
|
+
return;
|
|
2855
|
+
}
|
|
2856
|
+
|
|
2857
|
+
setIsTimePickerModalVisible(true);
|
|
2858
|
+
},
|
|
2859
|
+
handleTimeChange: function handleTimeChange(date) {
|
|
2860
|
+
setIsTimePickerModalVisible(false);
|
|
2861
|
+
onChange(date || defaultDate);
|
|
2862
|
+
onBlur();
|
|
2863
|
+
},
|
|
2864
|
+
handleModalClose: function handleModalClose() {
|
|
2865
|
+
return setIsTimePickerModalVisible(false);
|
|
2866
|
+
}
|
|
2867
|
+
};
|
|
2868
|
+
};
|
|
2869
|
+
|
|
2870
|
+
var Container = /*#__PURE__*/styled.Pressable.withConfig({
|
|
2871
|
+
displayName: "TimePicker__Container"
|
|
2872
|
+
})(["", " width:100px;height:40px;justify-content:center;align-items:center;"], styledTextInputMixin);
|
|
2873
|
+
function TimePicker(_ref) {
|
|
2874
|
+
var title = _ref.title,
|
|
2875
|
+
_ref$state = _ref.state,
|
|
2876
|
+
state = _ref$state === void 0 ? 'default' : _ref$state,
|
|
2877
|
+
_ref$disabled = _ref.disabled,
|
|
2878
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
2879
|
+
forceDefaultValue = _ref.forceDefaultValue,
|
|
2880
|
+
value = _ref.value,
|
|
2881
|
+
validateButtonLabel = _ref.validateButtonLabel,
|
|
2882
|
+
onChange = _ref.onChange,
|
|
2883
|
+
onBlur = _ref.onBlur;
|
|
2884
|
+
|
|
2885
|
+
var _useTimePicker = useTimePicker(value || null, onChange, onBlur, disabled, forceDefaultValue),
|
|
2886
|
+
dateTimePickerValue = _useTimePicker.dateTimePickerValue,
|
|
2887
|
+
displayedValue = _useTimePicker.displayedValue,
|
|
2888
|
+
timePickerState = _useTimePicker.timePickerState,
|
|
2889
|
+
handleInputPress = _useTimePicker.handleInputPress,
|
|
2890
|
+
handleModalClose = _useTimePicker.handleModalClose,
|
|
2891
|
+
handleTimeChange = _useTimePicker.handleTimeChange,
|
|
2892
|
+
isTimePickerModalVisible = _useTimePicker.isTimePickerModalVisible;
|
|
2893
|
+
|
|
2894
|
+
return /*#__PURE__*/jsxs(Container, {
|
|
2895
|
+
state: timePickerState === 'default' ? state : timePickerState,
|
|
2896
|
+
accessibilityRole: "button",
|
|
2897
|
+
onPress: handleInputPress,
|
|
2898
|
+
children: [/*#__PURE__*/jsx(Typography.Text, {
|
|
2899
|
+
base: "body",
|
|
2900
|
+
color: displayedValue === timePickerPlaceholder ? 'black-light' : 'black',
|
|
2901
|
+
children: displayedValue
|
|
2902
|
+
}), Platform.OS === 'android' && isTimePickerModalVisible ? /*#__PURE__*/jsx(DateTimePicker, {
|
|
2903
|
+
is24Hour: true,
|
|
2904
|
+
testID: "date-picker-native-element",
|
|
2905
|
+
value: dateTimePickerValue,
|
|
2906
|
+
mode: "time",
|
|
2907
|
+
display: "default",
|
|
2908
|
+
onChange: function (_event, date) {
|
|
2909
|
+
return handleTimeChange(date);
|
|
2910
|
+
}
|
|
2911
|
+
}) : null, Platform.OS !== 'android' ? /*#__PURE__*/jsx(ModalDateTimePicker, {
|
|
2912
|
+
title: title,
|
|
2913
|
+
visible: isTimePickerModalVisible,
|
|
2914
|
+
value: dateTimePickerValue,
|
|
2915
|
+
validateButtonLabel: validateButtonLabel,
|
|
2916
|
+
onChange: handleTimeChange,
|
|
2917
|
+
onClose: handleModalClose
|
|
2918
|
+
}) : null]
|
|
2919
|
+
});
|
|
2920
|
+
}
|
|
2921
|
+
|
|
2922
|
+
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2923
|
+
|
|
2924
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2925
|
+
|
|
2926
|
+
var Arrow = function (props) {
|
|
2927
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$2(_objectSpread$2({}, props), {}, {
|
|
2928
|
+
children: /*#__PURE__*/jsx("path", {
|
|
2929
|
+
fillRule: "evenodd",
|
|
2930
|
+
clipRule: "evenodd",
|
|
2931
|
+
d: "M22.399 6.128C20.939 7.722 19.767 9 18 9s-2.938-1.278-4.399-2.872C11.187 3.494 7.984 0 0 0h36c-7.984 0-11.187 3.494-13.601 6.128z",
|
|
2932
|
+
fill: "currentColor"
|
|
2933
|
+
})
|
|
2934
|
+
}));
|
|
2935
|
+
};
|
|
2936
|
+
|
|
2937
|
+
Arrow.defaultProps = {
|
|
2938
|
+
width: "36",
|
|
2939
|
+
height: "8",
|
|
2940
|
+
viewBox: "0 0 36 9",
|
|
2941
|
+
fill: "none",
|
|
2942
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2943
|
+
};
|
|
2944
|
+
var StyledTooltipView = /*#__PURE__*/styled.View.withConfig({
|
|
2945
|
+
displayName: "TooltipView__StyledTooltipView"
|
|
2946
|
+
})(["align-items:center;"]);
|
|
2947
|
+
var StyledTooltipContent = /*#__PURE__*/styled.View.withConfig({
|
|
2948
|
+
displayName: "TooltipView__StyledTooltipContent"
|
|
2949
|
+
})(["background-color:", ";border-radius:", "px;opacity:", ";padding:", ";"], function (_ref) {
|
|
2950
|
+
var theme = _ref.theme;
|
|
2951
|
+
return theme.kitt.tooltip.backgroundColor;
|
|
2952
|
+
}, function (_ref2) {
|
|
2953
|
+
var theme = _ref2.theme;
|
|
2954
|
+
return theme.kitt.tooltip.borderRadius;
|
|
2955
|
+
}, function (_ref3) {
|
|
2956
|
+
var theme = _ref3.theme;
|
|
2957
|
+
return theme.kitt.tooltip.opacity;
|
|
2958
|
+
}, function (_ref4) {
|
|
2959
|
+
var theme = _ref4.theme;
|
|
2960
|
+
return "".concat(theme.kitt.tooltip.verticalPadding, "px ").concat(theme.kitt.tooltip.horizontalPadding, "px");
|
|
2961
|
+
});
|
|
2962
|
+
|
|
2963
|
+
function ArrowView(props) {
|
|
2964
|
+
var theme = /*#__PURE__*/useTheme();
|
|
2965
|
+
return /*#__PURE__*/jsx(View, _objectSpread$2(_objectSpread$2({}, props), {}, {
|
|
2966
|
+
children: /*#__PURE__*/jsx(Arrow, {
|
|
2967
|
+
color: theme.kitt.tooltip.backgroundColor
|
|
2968
|
+
})
|
|
2969
|
+
}));
|
|
2361
2970
|
}
|
|
2362
2971
|
|
|
2363
|
-
var
|
|
2972
|
+
var StyledArrow = /*#__PURE__*/styled(ArrowView).withConfig({
|
|
2973
|
+
displayName: "TooltipView__StyledArrow"
|
|
2974
|
+
})(["color:", ";transform:", ";"], function (_ref5) {
|
|
2975
|
+
var theme = _ref5.theme;
|
|
2976
|
+
return theme.kitt.tooltip.backgroundColor;
|
|
2977
|
+
}, function (_ref6) {
|
|
2978
|
+
var $position = _ref6.$position;
|
|
2979
|
+
return "rotate(".concat($position === 'bottom' ? 180 : 0, "deg)");
|
|
2980
|
+
});
|
|
2981
|
+
function TooltipView(_ref7) {
|
|
2982
|
+
var children = _ref7.children,
|
|
2983
|
+
position = _ref7.position;
|
|
2984
|
+
return /*#__PURE__*/jsxs(StyledTooltipView, {
|
|
2985
|
+
children: [position === 'bottom' ? /*#__PURE__*/jsx(StyledArrow, {
|
|
2986
|
+
$position: position
|
|
2987
|
+
}) : null, /*#__PURE__*/jsx(StyledTooltipContent, {
|
|
2988
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
2989
|
+
base: "body",
|
|
2990
|
+
color: "white",
|
|
2991
|
+
children: children
|
|
2992
|
+
})
|
|
2993
|
+
}), position === 'top' ? /*#__PURE__*/jsx(StyledArrow, {
|
|
2994
|
+
$position: position
|
|
2995
|
+
}) : null]
|
|
2996
|
+
});
|
|
2997
|
+
}
|
|
2998
|
+
|
|
2999
|
+
var tooltipDefaultPosition = 'top';
|
|
3000
|
+
|
|
3001
|
+
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3002
|
+
|
|
3003
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3004
|
+
// Since the tooltip use absolute positionning, we need a parent to provide the relative root
|
|
3005
|
+
var TooltipContainer = /*#__PURE__*/styled.View.withConfig({
|
|
3006
|
+
displayName: "Tooltip__TooltipContainer"
|
|
3007
|
+
})(["position:relative;align-self:baseline;"]);
|
|
3008
|
+
// eslint-disable-next-line unicorn/expiring-todo-comments
|
|
3009
|
+
// TODO : update position on scroll in future iteration
|
|
3010
|
+
function Tooltip(_ref) {
|
|
3011
|
+
var children = _ref.children,
|
|
3012
|
+
defaultVisible = _ref.defaultVisible,
|
|
3013
|
+
_ref$position = _ref.position,
|
|
3014
|
+
position = _ref$position === void 0 ? tooltipDefaultPosition : _ref$position,
|
|
3015
|
+
content = _ref.content,
|
|
3016
|
+
floatingPadding = _ref.floatingPadding,
|
|
3017
|
+
onUpdate = _ref.onUpdate;
|
|
3018
|
+
var theme = /*#__PURE__*/useTheme();
|
|
3019
|
+
var padding = floatingPadding || theme.kitt.tooltip.floatingPadding;
|
|
3020
|
+
var pressed = useSharedValue(defaultVisible);
|
|
3021
|
+
var opacityStyles = useAnimatedStyle(function () {
|
|
3022
|
+
var _f = function () {
|
|
3023
|
+
return {
|
|
3024
|
+
opacity: withSpring(pressed.value ? theme.kitt.tooltip.opacity : 0)
|
|
3025
|
+
};
|
|
3026
|
+
};
|
|
3027
|
+
|
|
3028
|
+
_f._closure = {
|
|
3029
|
+
withSpring: withSpring,
|
|
3030
|
+
pressed: pressed,
|
|
3031
|
+
theme: {
|
|
3032
|
+
kitt: {
|
|
3033
|
+
tooltip: {
|
|
3034
|
+
opacity: theme.kitt.tooltip.opacity
|
|
3035
|
+
}
|
|
3036
|
+
}
|
|
3037
|
+
}
|
|
3038
|
+
};
|
|
3039
|
+
_f.asString = "function _f(){const{withSpring,pressed,theme}=jsThis._closure;{return{opacity:withSpring(pressed.value?theme.kitt.tooltip.opacity:0)};}}";
|
|
3040
|
+
_f.__workletHash = 15953928507970;
|
|
3041
|
+
_f.__location = "/home/chris/ornikar/kitt/@ornikar/kitt-universal/src/Tooltip/Tooltip.tsx (57:41)";
|
|
3042
|
+
_f.__optimalization = 2;
|
|
3043
|
+
|
|
3044
|
+
global.__reanimatedWorkletInit(_f);
|
|
3045
|
+
|
|
3046
|
+
return _f;
|
|
3047
|
+
}());
|
|
3048
|
+
|
|
3049
|
+
var _useFloating = useFloating({
|
|
3050
|
+
placement: position,
|
|
3051
|
+
middleware: [offset(padding), shift(), flip({
|
|
3052
|
+
padding: padding
|
|
3053
|
+
})]
|
|
3054
|
+
}),
|
|
3055
|
+
x = _useFloating.x,
|
|
3056
|
+
y = _useFloating.y,
|
|
3057
|
+
reference = _useFloating.reference,
|
|
3058
|
+
floating = _useFloating.floating,
|
|
3059
|
+
update = _useFloating.update,
|
|
3060
|
+
refs = _useFloating.refs,
|
|
3061
|
+
middlewareData = _useFloating.middlewareData;
|
|
3062
|
+
|
|
3063
|
+
useEffect(function () {
|
|
3064
|
+
if (!onUpdate) return;
|
|
3065
|
+
onUpdate({
|
|
3066
|
+
x: x,
|
|
3067
|
+
y: y,
|
|
3068
|
+
reference: reference,
|
|
3069
|
+
floating: floating,
|
|
3070
|
+
strategy: 'absolute',
|
|
3071
|
+
update: update,
|
|
3072
|
+
refs: refs,
|
|
3073
|
+
middlewareData: middlewareData
|
|
3074
|
+
});
|
|
3075
|
+
}, [x, y, reference, floating, update, refs, middlewareData, onUpdate]);
|
|
3076
|
+
return /*#__PURE__*/jsxs(TooltipContainer, {
|
|
3077
|
+
children: [/*#__PURE__*/jsx(View, {
|
|
3078
|
+
ref: reference,
|
|
3079
|
+
children: /*#__PURE__*/jsx(Pressable, {
|
|
3080
|
+
accessibilityRole: "button",
|
|
3081
|
+
onPress: function handlePress() {
|
|
3082
|
+
pressed.value = !pressed.value;
|
|
3083
|
+
},
|
|
3084
|
+
children: children
|
|
3085
|
+
})
|
|
3086
|
+
}), /*#__PURE__*/jsx(View, {
|
|
3087
|
+
ref: floating,
|
|
3088
|
+
accessibilityElementsHidden: !pressed.value,
|
|
3089
|
+
importantForAccessibility: pressed.value === true ? 'auto' : 'no-hide-descendants',
|
|
3090
|
+
style: _objectSpread$1(_objectSpread$1({}, StyleSheet.absoluteFillObject), {}, {
|
|
3091
|
+
top: y && position === 'bottom' ? y : undefined,
|
|
3092
|
+
bottom: y && position === 'top' ? y : undefined,
|
|
3093
|
+
left: x !== null && x !== void 0 ? x : 0
|
|
3094
|
+
}),
|
|
3095
|
+
children: /*#__PURE__*/jsx(Animated$1.View, {
|
|
3096
|
+
style: [opacityStyles],
|
|
3097
|
+
children: /*#__PURE__*/jsx(TooltipView, {
|
|
3098
|
+
position: position,
|
|
3099
|
+
children: content
|
|
3100
|
+
})
|
|
3101
|
+
})
|
|
3102
|
+
})]
|
|
3103
|
+
});
|
|
3104
|
+
}
|
|
3105
|
+
Tooltip.View = TooltipView;
|
|
3106
|
+
|
|
3107
|
+
var StyledTypographyEmoji = /*#__PURE__*/styled(Emoji).withConfig({
|
|
3108
|
+
displayName: "TypographyEmoji__StyledTypographyEmoji"
|
|
3109
|
+
})(["align-self:center;", ""], function (_ref) {
|
|
3110
|
+
var size = _ref.size;
|
|
3111
|
+
if (Platform.OS !== 'web') return undefined;
|
|
3112
|
+
/* Style Twemoji: https://github.com/twitter/twemoji#inline-styles */
|
|
2364
3113
|
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
3114
|
+
return "\n margin: 0 ".concat(size / 20, "px 0 ").concat(size / 10, "px;\n transform: translateY(").concat(size / 10 * 2, "px);\n ");
|
|
3115
|
+
});
|
|
3116
|
+
function TypographyEmoji(_ref2) {
|
|
3117
|
+
var emoji = _ref2.emoji,
|
|
3118
|
+
base = _ref2.base,
|
|
3119
|
+
small = _ref2.small,
|
|
3120
|
+
medium = _ref2.medium,
|
|
3121
|
+
large = _ref2.large;
|
|
3122
|
+
var theme = /*#__PURE__*/useTheme();
|
|
3123
|
+
var typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(base, small, medium, large);
|
|
3124
|
+
var typeConfig = getTypographyTypeConfig(typeForCurrentWindowSize || 'body', theme);
|
|
3125
|
+
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
3126
|
+
var fontSize = typeConfig[typeConfigKey].fontSize;
|
|
3127
|
+
|
|
3128
|
+
if ((process.env.NODE_ENV !== "production")) {
|
|
3129
|
+
if (!fontSize.endsWith('px')) throw new Error("Unexpected font-size value: ".concat(fontSize));
|
|
2369
3130
|
}
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
3131
|
+
|
|
3132
|
+
return /*#__PURE__*/jsx(StyledTypographyEmoji, {
|
|
3133
|
+
size: parseInt(fontSize.slice(0, -2), 10),
|
|
3134
|
+
emoji: emoji
|
|
3135
|
+
});
|
|
3136
|
+
}
|
|
3137
|
+
|
|
3138
|
+
var _excluded$1 = ["children", "disabled", "noUnderline", "href", "hrefAttrs", "onPress"];
|
|
3139
|
+
|
|
3140
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3141
|
+
|
|
3142
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3143
|
+
var TypographyLinkWebWrapper = undefined;
|
|
3144
|
+
var StyledLink = /*#__PURE__*/styled.Text.withConfig({
|
|
3145
|
+
displayName: "TypographyLink__StyledLink"
|
|
3146
|
+
})(["text-decoration:", ";", ";", ";"], function (_ref) {
|
|
3147
|
+
var $noUnderline = _ref.$noUnderline;
|
|
3148
|
+
return $noUnderline ? 'none' : 'underline';
|
|
2373
3149
|
}, function (_ref2) {
|
|
2374
|
-
var disabled = _ref2
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
3150
|
+
var $disabled = _ref2.$disabled;
|
|
3151
|
+
if (Platform.OS !== 'web') return undefined;
|
|
3152
|
+
return "\n text-decoration-color: inherit;\n transition: color 0.2s ease-in-out;\n cursor: ".concat($disabled ? 'not-allowed' : 'pointer', ";\n ");
|
|
3153
|
+
}, function (_ref3) {
|
|
3154
|
+
var $disabled = _ref3.$disabled,
|
|
3155
|
+
theme = _ref3.theme;
|
|
3156
|
+
if (!$disabled) return undefined;
|
|
3157
|
+
return "color: ".concat(theme.kitt.typography.link.disabledColor, ";");
|
|
2378
3158
|
});
|
|
2379
|
-
function TypographyLink(
|
|
2380
|
-
var children =
|
|
2381
|
-
disabled =
|
|
2382
|
-
noUnderline =
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
3159
|
+
function TypographyLink(_ref4) {
|
|
3160
|
+
var children = _ref4.children,
|
|
3161
|
+
disabled = _ref4.disabled,
|
|
3162
|
+
noUnderline = _ref4.noUnderline,
|
|
3163
|
+
href = _ref4.href,
|
|
3164
|
+
hrefAttrs = _ref4.hrefAttrs,
|
|
3165
|
+
onPress = _ref4.onPress,
|
|
3166
|
+
otherProps = _objectWithoutProperties(_ref4, _excluded$1);
|
|
3167
|
+
|
|
3168
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
3169
|
+
accessibilityRole: "none",
|
|
3170
|
+
children: /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
3171
|
+
as: TypographyLinkWebWrapper,
|
|
3172
|
+
"data-nounderline": noUnderline,
|
|
3173
|
+
children: /*#__PURE__*/jsx(StyledLink, {
|
|
3174
|
+
$disabled: disabled,
|
|
3175
|
+
$noUnderline: noUnderline,
|
|
3176
|
+
href: href,
|
|
3177
|
+
hrefAttrs: hrefAttrs,
|
|
3178
|
+
accessibilityRole: "link",
|
|
3179
|
+
onPress: disabled ? undefined : onPress,
|
|
3180
|
+
children: children
|
|
3181
|
+
})
|
|
3182
|
+
})
|
|
3183
|
+
}));
|
|
2394
3184
|
}
|
|
2395
3185
|
|
|
2396
3186
|
function matchWindowSize(currentWidth, _ref) {
|
|
@@ -2462,9 +3252,10 @@ function useKittTheme() {
|
|
|
2462
3252
|
function KittThemeProvider(_ref) {
|
|
2463
3253
|
var children = _ref.children;
|
|
2464
3254
|
var theme = useKittTheme();
|
|
2465
|
-
return /*#__PURE__*/
|
|
2466
|
-
theme: theme
|
|
2467
|
-
|
|
3255
|
+
return /*#__PURE__*/jsx(ThemeProvider, {
|
|
3256
|
+
theme: theme,
|
|
3257
|
+
children: children
|
|
3258
|
+
});
|
|
2468
3259
|
}
|
|
2469
3260
|
var KittThemeDecorator = makeDecorator({
|
|
2470
3261
|
name: 'ThemeDecorator',
|
|
@@ -2472,17 +3263,9 @@ var KittThemeDecorator = makeDecorator({
|
|
|
2472
3263
|
wrapper: function wrapper(storyFn, context, _ref2) {
|
|
2473
3264
|
_ref2.options;
|
|
2474
3265
|
_ref2.parameters;
|
|
2475
|
-
return /*#__PURE__*/
|
|
2476
|
-
|
|
2477
|
-
});
|
|
2478
|
-
|
|
2479
|
-
var SafeAreaProviderDecorator = makeDecorator({
|
|
2480
|
-
name: 'SafeAreaProviderDecorator',
|
|
2481
|
-
parameterName: 'safeAreaProvider',
|
|
2482
|
-
wrapper: function wrapper(storyFn, context, _ref) {
|
|
2483
|
-
_ref.options;
|
|
2484
|
-
_ref.parameters;
|
|
2485
|
-
return /*#__PURE__*/React.createElement(SafeAreaProvider, null, storyFn(context));
|
|
3266
|
+
return /*#__PURE__*/jsx(KittThemeProvider, {
|
|
3267
|
+
children: storyFn(context)
|
|
3268
|
+
});
|
|
2486
3269
|
}
|
|
2487
3270
|
});
|
|
2488
3271
|
|
|
@@ -2493,8 +3276,10 @@ function MatchWindowSize(_ref) {
|
|
|
2493
3276
|
|
|
2494
3277
|
var match = useMatchWindowSize(matchWindowSizeOptions);
|
|
2495
3278
|
if (!match) return null;
|
|
2496
|
-
return /*#__PURE__*/
|
|
3279
|
+
return /*#__PURE__*/jsx(Fragment$1, {
|
|
3280
|
+
children: children
|
|
3281
|
+
});
|
|
2497
3282
|
}
|
|
2498
3283
|
|
|
2499
|
-
export { Avatar, Button, Card, Flex, FullScreenModal, Icon, IconButton, InputFeedback, InputField, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification,
|
|
3284
|
+
export { Avatar, Button, Card, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputFeedback, InputField, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, Radio, DeprecatedSection as Section, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor };
|
|
2500
3285
|
//# sourceMappingURL=index-browser-all.es.android.js.map
|