@ornikar/kitt-universal 2.3.0 → 3.0.0-beta.1
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 +4 -4
- 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 +4 -3
- package/dist/definitions/Button/ButtonPressable.d.ts.map +1 -1
- 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 +3 -3
- package/dist/definitions/ExternalLink/ExternalLink.d.ts.map +1 -1
- package/dist/definitions/ExternalLink/ExternalLink.web.d.ts.map +1 -1
- package/dist/definitions/FullScreenModal/Body.d.ts.map +1 -1
- package/dist/definitions/FullScreenModal/FullScreenModal.d.ts.map +1 -1
- package/dist/definitions/FullScreenModal/Header.d.ts.map +1 -1
- package/dist/definitions/Icon/Icon.d.ts.map +1 -1
- package/dist/definitions/Icon/SpinningIcon.web.d.ts +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 +7 -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 +6 -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 +1347 -595
- 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 +1348 -596
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +1318 -672
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +1173 -812
- 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 +1168 -591
- 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 +18 -7
- package/translations/es-ES.json +3 -0
- package/translations/fr-FR.json +3 -0
- package/dist/definitions/primitives/PrimitiveLink.d.ts +0 -13
- 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 -18
- 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 -23
- package/dist/definitions/primitives/PrimitiveView.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveView.web.d.ts +0 -27
- 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,157 +1,56 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
+
import { View, Text as Text$1, useWindowDimensions, Image, Pressable, TextInput, TouchableOpacity, StyleSheet, ScrollView, Modal as Modal$1 } from 'react-native';
|
|
4
|
+
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
3
5
|
import { UserIcon, EyeIcon, EyeOffIcon, LoaderIcon, XIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon } from '@ornikar/kitt-icons';
|
|
4
6
|
export * from '@ornikar/kitt-icons';
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
import
|
|
7
|
+
import styled$1, { useTheme, css, ThemeProvider } from 'styled-components/native';
|
|
8
|
+
import { cloneElement, useContext, createContext, useState, useMemo, forwardRef, Fragment, Children, useEffect } from 'react';
|
|
9
|
+
import { styled } from '@linaria/react';
|
|
10
|
+
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
9
11
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
+
import { parse } from 'twemoji-parser';
|
|
13
|
+
import _extends from '@babel/runtime/helpers/extends';
|
|
14
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
15
|
+
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
16
|
+
import { useFloating, offset, shift, flip, getScrollParents } from '@floating-ui/react-dom';
|
|
12
17
|
import { makeDecorator } from '@storybook/addons';
|
|
13
18
|
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Component = "h".concat(accessibilityLevel); // eslint-disable-next-line no-param-reassign
|
|
35
|
-
|
|
36
|
-
accessibilityRole = undefined; // eslint-disable-next-line no-param-reassign
|
|
37
|
-
|
|
38
|
-
accessibilityLevel = undefined;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
var element = /*#__PURE__*/React.createElement(Component, {
|
|
42
|
-
ref: ref,
|
|
43
|
-
className: className,
|
|
44
|
-
role: accessibilityRole ? mapAccessibilityRoleToAriaRole[accessibilityRole] : undefined,
|
|
45
|
-
"aria-roledescription": accessibilityRoleDescription,
|
|
46
|
-
"aria-level": accessibilityLevel
|
|
47
|
-
}, children);
|
|
48
|
-
return hasTextAncestor ? element : /*#__PURE__*/React.createElement(PrimitiveTextAncestorContext.Provider, {
|
|
49
|
-
value: true
|
|
50
|
-
}, element);
|
|
51
|
-
});
|
|
52
|
-
var textResetMixin = /*#__PURE__*/css(["", " display:inline;white-space:pre-wrap;word-wrap:break-word;color:inherit;font:inherit;"], resetMixin);
|
|
53
|
-
var PrimitiveText = /*#__PURE__*/styled(PrimitiveTextWithClassName).withConfig({
|
|
54
|
-
displayName: "PrimitiveTextweb__PrimitiveText",
|
|
55
|
-
componentId: "kitt-universal__sc-8bfguf-0"
|
|
56
|
-
})(["", " ", ";", ""], textResetMixin, function (_ref2) {
|
|
57
|
-
var selectable = _ref2.selectable;
|
|
58
|
-
return selectable == null ? undefined : "user-select: ".concat(selectable ? 'text' : 'none');
|
|
59
|
-
}, function (_ref3) {
|
|
60
|
-
var numberOfLines = _ref3.numberOfLines;
|
|
61
|
-
return numberOfLines ? "\n display: -webkit-box;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-line-clamp: ".concat(numberOfLines, ";\n -webkit-box-orient: vertical;\n line-clamp: ").concat(numberOfLines, ";\n ") : '';
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
function createPressClickHandler(onPress) {
|
|
65
|
-
if (!onPress) return undefined;
|
|
66
|
-
return function (event) {
|
|
67
|
-
event.stopPropagation();
|
|
68
|
-
onPress(event);
|
|
19
|
+
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; }
|
|
20
|
+
|
|
21
|
+
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; }
|
|
22
|
+
// type $Without<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
|
|
23
|
+
// type $DeepPartial<T> = { [P in keyof T]?: $DeepPartial<T[P]> };
|
|
24
|
+
// export function withTheme<Props extends { theme: DefaultTheme }, C>(
|
|
25
|
+
// WrappedComponent: ComponentType<Props> & C,
|
|
26
|
+
// ): ComponentType<SetOptional<Props, 'theme'>> & hoistNonReactStatics.NonReactStatics<typeof WrappedComponent> {
|
|
27
|
+
// return function ThemedComponent(props) {
|
|
28
|
+
// const theme = useTheme();
|
|
29
|
+
// return (<WrappedComponent theme={theme} {...(props as any)} />) as any;
|
|
30
|
+
// };
|
|
31
|
+
// }
|
|
32
|
+
function withTheme( // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
33
|
+
WrappedComponent) {
|
|
34
|
+
return function (props) {
|
|
35
|
+
var theme = /*#__PURE__*/useTheme();
|
|
36
|
+
return /*#__PURE__*/jsx(WrappedComponent, _objectSpread$h({
|
|
37
|
+
theme: theme
|
|
38
|
+
}, props));
|
|
69
39
|
};
|
|
70
40
|
}
|
|
71
41
|
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if (!onPress) return undefined;
|
|
82
|
-
return function (event) {
|
|
83
|
-
if (isValidKeyPress(event)) {
|
|
84
|
-
onPress(event);
|
|
85
|
-
}
|
|
86
|
-
};
|
|
42
|
+
var StyledSpinningIconContainer = withTheme( /*#__PURE__*/styled("div")({
|
|
43
|
+
name: "StyledSpinningIconContainer",
|
|
44
|
+
"class": "ssn8o83"
|
|
45
|
+
}));
|
|
46
|
+
function SpinningIcon(_ref) {
|
|
47
|
+
var children = _ref.children;
|
|
48
|
+
return /*#__PURE__*/jsx(StyledSpinningIconContainer, {
|
|
49
|
+
children: children
|
|
50
|
+
});
|
|
87
51
|
}
|
|
88
52
|
|
|
89
|
-
var
|
|
90
|
-
var StyledDiv = /*#__PURE__*/styled('div').withConfig({
|
|
91
|
-
displayName: "PrimitiveViewweb__StyledDiv",
|
|
92
|
-
componentId: "kitt-universal__sc-1t2oiuz-0"
|
|
93
|
-
})(["", " display:", ";"], resetPrimitiveViewMixin, function (_ref) {
|
|
94
|
-
var hasTextAncestor = _ref.hasTextAncestor;
|
|
95
|
-
return hasTextAncestor ? 'inline-flex' : 'flex';
|
|
96
|
-
});
|
|
97
|
-
var StyledAnchor = /*#__PURE__*/styled('a').withConfig({
|
|
98
|
-
displayName: "PrimitiveViewweb__StyledAnchor",
|
|
99
|
-
componentId: "kitt-universal__sc-1t2oiuz-1"
|
|
100
|
-
})(["", " display:", ";text-decoration:none;"], resetPrimitiveViewMixin, function (_ref2) {
|
|
101
|
-
var hasTextAncestor = _ref2.hasTextAncestor;
|
|
102
|
-
return hasTextAncestor ? 'inline-flex' : 'flex';
|
|
103
|
-
});
|
|
104
|
-
var PrimitiveView = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
105
|
-
var children = _ref3.children,
|
|
106
|
-
className = _ref3.className,
|
|
107
|
-
style = _ref3.style,
|
|
108
|
-
accessibilityRole = _ref3.accessibilityRole,
|
|
109
|
-
nativeID = _ref3.nativeID,
|
|
110
|
-
testID = _ref3.testID,
|
|
111
|
-
tabIndex = _ref3.tabIndex,
|
|
112
|
-
href = _ref3.href,
|
|
113
|
-
hrefAttrs = _ref3.hrefAttrs,
|
|
114
|
-
onPress = _ref3.onPress;
|
|
115
|
-
var hasTextAncestor = React.useContext(PrimitiveTextAncestorContext);
|
|
116
|
-
|
|
117
|
-
if (href != null) {
|
|
118
|
-
return /*#__PURE__*/React.createElement(StyledAnchor, _extends({
|
|
119
|
-
ref: ref,
|
|
120
|
-
hasTextAncestor: hasTextAncestor,
|
|
121
|
-
id: nativeID,
|
|
122
|
-
className: className,
|
|
123
|
-
style: style,
|
|
124
|
-
"data-testid": testID,
|
|
125
|
-
role: accessibilityRole,
|
|
126
|
-
tabIndex: tabIndex,
|
|
127
|
-
href: href
|
|
128
|
-
}, hrefAttrs, {
|
|
129
|
-
onClick: createPressClickHandler(onPress),
|
|
130
|
-
onKeyUp: createPressKeyUpHandler(onPress)
|
|
131
|
-
}), children);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
return /*#__PURE__*/React.createElement(StyledDiv, {
|
|
135
|
-
ref: ref,
|
|
136
|
-
hasTextAncestor: hasTextAncestor,
|
|
137
|
-
id: nativeID,
|
|
138
|
-
className: className,
|
|
139
|
-
style: style,
|
|
140
|
-
"data-testid": testID,
|
|
141
|
-
role: accessibilityRole,
|
|
142
|
-
tabIndex: tabIndex,
|
|
143
|
-
onClick: createPressClickHandler(onPress),
|
|
144
|
-
onKeyUp: createPressKeyUpHandler(onPress)
|
|
145
|
-
}, children);
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
var spin = /*#__PURE__*/keyframes(["0%{transform:rotate(-1deg);}100%{transform:rotate(359deg);}"]);
|
|
149
|
-
var SpinningIcon = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
150
|
-
displayName: "SpinningIconweb__SpinningIcon",
|
|
151
|
-
componentId: "kitt-universal__sc-xgsnek-0"
|
|
152
|
-
})(["animation:", " 1.1s infinite linear;"], spin);
|
|
153
|
-
|
|
154
|
-
var IconContainer$2 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
53
|
+
var IconContainer$2 = /*#__PURE__*/styled$1(View).withConfig({
|
|
155
54
|
displayName: "Icon__IconContainer",
|
|
156
55
|
componentId: "kitt-universal__sc-usm0ol-0"
|
|
157
56
|
})(["color:", ";width:", "px;height:", "px;align-self:", ";"], function (_ref) {
|
|
@@ -175,91 +74,173 @@ function Icon(_ref5) {
|
|
|
175
74
|
spin = _ref5.spin,
|
|
176
75
|
align = _ref5.align,
|
|
177
76
|
color = _ref5.color;
|
|
178
|
-
var clonedIcon = /*#__PURE__*/
|
|
77
|
+
var clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
179
78
|
color: color
|
|
180
79
|
});
|
|
181
|
-
return /*#__PURE__*/
|
|
80
|
+
return /*#__PURE__*/jsx(IconContainer$2, {
|
|
182
81
|
align: align,
|
|
183
82
|
size: size,
|
|
184
|
-
color: color
|
|
185
|
-
|
|
83
|
+
color: color,
|
|
84
|
+
children: spin ? /*#__PURE__*/jsx(SpinningIcon, {
|
|
85
|
+
children: clonedIcon
|
|
86
|
+
}) : clonedIcon
|
|
87
|
+
});
|
|
186
88
|
}
|
|
187
89
|
|
|
188
|
-
var
|
|
189
|
-
|
|
90
|
+
var KittBreakpoints = {
|
|
91
|
+
/**
|
|
92
|
+
* min-width: 0
|
|
93
|
+
*/
|
|
94
|
+
BASE: 0,
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* min-width: 480px
|
|
98
|
+
*/
|
|
99
|
+
SMALL: 480,
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* min-width: 768px
|
|
103
|
+
*/
|
|
104
|
+
MEDIUM: 768,
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* min-width: 1024px
|
|
108
|
+
*/
|
|
109
|
+
LARGE: 1024,
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* min-width: 1280px
|
|
113
|
+
*/
|
|
114
|
+
WIDE: 1280
|
|
115
|
+
};
|
|
116
|
+
var KittBreakpointsMax = {
|
|
117
|
+
/**
|
|
118
|
+
* max-width: 479px
|
|
119
|
+
*/
|
|
120
|
+
BASE: KittBreakpoints.SMALL - 1,
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* max-width: 767px
|
|
124
|
+
*/
|
|
125
|
+
SMALL: KittBreakpoints.MEDIUM - 1,
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* max-width: 1023px
|
|
129
|
+
*/
|
|
130
|
+
MEDIUM: KittBreakpoints.LARGE - 1,
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* max-width: 1279px
|
|
134
|
+
*/
|
|
135
|
+
LARGE: KittBreakpoints.WIDE - 1
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
var _excluded$c = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
|
|
139
|
+
|
|
140
|
+
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; }
|
|
141
|
+
|
|
142
|
+
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; }
|
|
143
|
+
var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
|
|
190
144
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
191
145
|
function useTypographyColor() {
|
|
192
146
|
return useContext(TypographyColorContext);
|
|
193
147
|
}
|
|
194
|
-
var
|
|
148
|
+
var getTypographyTypeConfigKey = function (theme) {
|
|
149
|
+
var isMediumOrAbove = theme.responsive.matchWindowSize({
|
|
150
|
+
minWidth: KittBreakpoints.MEDIUM
|
|
151
|
+
});
|
|
152
|
+
return isMediumOrAbove ? 'mediumAndWide' : 'baseAndSmall';
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
var isTypeHeader = function (type) {
|
|
156
|
+
return type.startsWith('header');
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
var isTypographyHeader = function (type, typographyIsHeaderInContext) {
|
|
160
|
+
if (type) return isTypeHeader(type);
|
|
161
|
+
if (typographyIsHeaderInContext != null) return typographyIsHeaderInContext;
|
|
162
|
+
throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
|
|
163
|
+
};
|
|
164
|
+
function getTypographyTypeConfig(type, theme) {
|
|
165
|
+
if (isTypographyHeader(type, undefined)) {
|
|
166
|
+
return theme.kitt.typography.types.headers.configs[type];
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return theme.kitt.typography.types.bodies.configs[type];
|
|
170
|
+
}
|
|
171
|
+
var StyledTypography = /*#__PURE__*/styled$1(Text$1).withConfig({
|
|
195
172
|
displayName: "Typography__StyledTypography",
|
|
196
173
|
componentId: "kitt-universal__sc-1dz700q-0"
|
|
197
174
|
})(["", " ", ""], function (_ref) {
|
|
198
175
|
var theme = _ref.theme,
|
|
199
|
-
isHeader = _ref
|
|
200
|
-
|
|
201
|
-
variant = _ref
|
|
176
|
+
$isHeader = _ref.$isHeader,
|
|
177
|
+
$typeForCurrentWindowSize = _ref.$typeForCurrentWindowSize,
|
|
178
|
+
$variant = _ref.$variant;
|
|
202
179
|
var _theme$kitt$typograph = theme.kitt.typography.types,
|
|
203
180
|
headers = _theme$kitt$typograph.headers,
|
|
204
181
|
bodies = _theme$kitt$typograph.bodies;
|
|
205
|
-
|
|
182
|
+
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
183
|
+
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 ");
|
|
206
184
|
}, function (_ref2) {
|
|
207
185
|
var theme = _ref2.theme,
|
|
208
|
-
color = _ref2
|
|
209
|
-
return
|
|
186
|
+
$color = _ref2.$color;
|
|
187
|
+
return !$color ? '' : "\n color: ".concat(theme.kitt.typography.colors[$color], ";\n text-decoration-color: ").concat(theme.kitt.typography.colors[$color], ";\n ");
|
|
210
188
|
});
|
|
189
|
+
function useTypographyTypeForCurrentWindowSize(base, small, medium, large) {
|
|
190
|
+
var _useWindowDimensions = useWindowDimensions(),
|
|
191
|
+
width = _useWindowDimensions.width;
|
|
211
192
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
if (base) return isTypeHeader(base);
|
|
218
|
-
if (typeInContext) return isTypeHeader(typeInContext);
|
|
219
|
-
throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
|
|
220
|
-
};
|
|
221
|
-
|
|
193
|
+
if (large && width >= KittBreakpoints.LARGE) return large;
|
|
194
|
+
if (medium && width >= KittBreakpoints.MEDIUM) return medium;
|
|
195
|
+
if (small && width >= KittBreakpoints.SMALL) return small;
|
|
196
|
+
return base;
|
|
197
|
+
}
|
|
222
198
|
function Typography(_ref3) {
|
|
223
199
|
var accessibilityRole = _ref3.accessibilityRole,
|
|
224
200
|
base = _ref3.base,
|
|
201
|
+
small = _ref3.small,
|
|
202
|
+
medium = _ref3.medium,
|
|
203
|
+
large = _ref3.large,
|
|
225
204
|
variant = _ref3.variant,
|
|
226
205
|
color = _ref3.color,
|
|
227
|
-
otherProps = _objectWithoutProperties(_ref3, _excluded$
|
|
228
|
-
|
|
229
|
-
var
|
|
230
|
-
var
|
|
231
|
-
var
|
|
232
|
-
var
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
value:
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
206
|
+
otherProps = _objectWithoutProperties(_ref3, _excluded$c);
|
|
207
|
+
|
|
208
|
+
var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
|
|
209
|
+
var typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(base, small, medium, large);
|
|
210
|
+
var isHeader = isTypographyHeader(typeForCurrentWindowSize, isHeaderTypographyInContext);
|
|
211
|
+
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
|
|
212
|
+
// redefine the color, just inherit from it
|
|
213
|
+
|
|
214
|
+
var colorWithDefaultToBlack = color !== null && color !== void 0 ? color : isHeaderTypographyInContext !== undefined ? undefined : 'black';
|
|
215
|
+
var content = base ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
|
|
216
|
+
value: isHeader,
|
|
217
|
+
children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$g({
|
|
218
|
+
$color: colorWithDefaultToBlack,
|
|
219
|
+
$isHeader: isHeader,
|
|
220
|
+
$typeForCurrentWindowSize: typeForCurrentWindowSize,
|
|
221
|
+
$variant: nonNullableVariant,
|
|
222
|
+
accessibilityRole: accessibilityRole || undefined
|
|
223
|
+
}, otherProps))
|
|
224
|
+
}) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$g({
|
|
225
|
+
$color: colorWithDefaultToBlack,
|
|
226
|
+
$isHeader: isHeader,
|
|
227
|
+
$variant: nonNullableVariant,
|
|
248
228
|
accessibilityRole: accessibilityRole || undefined
|
|
249
229
|
}, otherProps));
|
|
250
|
-
return color ? /*#__PURE__*/
|
|
251
|
-
value: color
|
|
252
|
-
|
|
230
|
+
return color ? /*#__PURE__*/jsx(TypographyColorContext.Provider, {
|
|
231
|
+
value: color,
|
|
232
|
+
children: content
|
|
233
|
+
}) : content;
|
|
253
234
|
}
|
|
254
235
|
|
|
255
236
|
function TypographyText(props) {
|
|
256
|
-
return /*#__PURE__*/
|
|
237
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$g({
|
|
257
238
|
accessibilityRole: null
|
|
258
239
|
}, props));
|
|
259
240
|
}
|
|
260
241
|
|
|
261
242
|
function TypographyParagraph(props) {
|
|
262
|
-
return /*#__PURE__*/
|
|
243
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$g({
|
|
263
244
|
accessibilityRole: "paragraph"
|
|
264
245
|
}, props));
|
|
265
246
|
}
|
|
@@ -267,10 +248,10 @@ function TypographyParagraph(props) {
|
|
|
267
248
|
var createHeading = function (level, defaultBase) {
|
|
268
249
|
// https://github.com/necolas/react-native-web/issues/401
|
|
269
250
|
function TypographyHeading(props) {
|
|
270
|
-
return /*#__PURE__*/
|
|
251
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$g(_objectSpread$g({
|
|
271
252
|
accessibilityRole: "header",
|
|
272
253
|
base: defaultBase
|
|
273
|
-
}, props, {
|
|
254
|
+
}, props), {}, {
|
|
274
255
|
accessibilityLevel: level
|
|
275
256
|
}));
|
|
276
257
|
}
|
|
@@ -303,7 +284,11 @@ Typography.h4 = createHeading(4, 'header4');
|
|
|
303
284
|
|
|
304
285
|
Typography.h5 = createHeading(5, 'header5');
|
|
305
286
|
|
|
306
|
-
var _excluded$
|
|
287
|
+
var _excluded$b = ["size"];
|
|
288
|
+
|
|
289
|
+
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; }
|
|
290
|
+
|
|
291
|
+
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; }
|
|
307
292
|
|
|
308
293
|
var getFirstCharacter = function (string) {
|
|
309
294
|
return string ? string[0] : '';
|
|
@@ -313,7 +298,7 @@ var getInitials = function (firstname, lastname) {
|
|
|
313
298
|
return (getFirstCharacter(firstname) + getFirstCharacter(lastname)).toUpperCase();
|
|
314
299
|
};
|
|
315
300
|
|
|
316
|
-
var StyledAvatarView = /*#__PURE__*/styled(
|
|
301
|
+
var StyledAvatarView = /*#__PURE__*/styled$1(View).withConfig({
|
|
317
302
|
displayName: "Avatar__StyledAvatarView",
|
|
318
303
|
componentId: "kitt-universal__sc-9miubv-0"
|
|
319
304
|
})(["border-radius:", "px;background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], function (_ref) {
|
|
@@ -341,7 +326,7 @@ function AvatarContent(_ref5) {
|
|
|
341
326
|
light = _ref5.light;
|
|
342
327
|
|
|
343
328
|
if (src) {
|
|
344
|
-
return /*#__PURE__*/
|
|
329
|
+
return /*#__PURE__*/jsx(Image, {
|
|
345
330
|
source: {
|
|
346
331
|
uri: src
|
|
347
332
|
},
|
|
@@ -353,15 +338,16 @@ function AvatarContent(_ref5) {
|
|
|
353
338
|
}
|
|
354
339
|
|
|
355
340
|
if (firstname && lastname) {
|
|
356
|
-
return /*#__PURE__*/
|
|
341
|
+
return /*#__PURE__*/jsx(Typography.Text, {
|
|
357
342
|
base: "body-small",
|
|
358
343
|
variant: "bold",
|
|
359
|
-
color: light ? 'black' : 'white'
|
|
360
|
-
|
|
344
|
+
color: light ? 'black' : 'white',
|
|
345
|
+
children: getInitials(firstname, lastname)
|
|
346
|
+
});
|
|
361
347
|
}
|
|
362
348
|
|
|
363
|
-
return /*#__PURE__*/
|
|
364
|
-
icon: /*#__PURE__*/
|
|
349
|
+
return /*#__PURE__*/jsx(Icon, {
|
|
350
|
+
icon: /*#__PURE__*/jsx(UserIcon, {}),
|
|
365
351
|
color: light ? 'black' : 'white',
|
|
366
352
|
size: size / 2
|
|
367
353
|
});
|
|
@@ -370,32 +356,37 @@ function AvatarContent(_ref5) {
|
|
|
370
356
|
function Avatar(_ref6) {
|
|
371
357
|
var _ref6$size = _ref6.size,
|
|
372
358
|
size = _ref6$size === void 0 ? 40 : _ref6$size,
|
|
373
|
-
rest = _objectWithoutProperties(_ref6, _excluded$
|
|
359
|
+
rest = _objectWithoutProperties(_ref6, _excluded$b);
|
|
374
360
|
|
|
375
|
-
return /*#__PURE__*/
|
|
376
|
-
size: size
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
361
|
+
return /*#__PURE__*/jsx(StyledAvatarView, _objectSpread$f(_objectSpread$f({}, rest), {}, {
|
|
362
|
+
size: size,
|
|
363
|
+
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$f(_objectSpread$f({}, rest), {}, {
|
|
364
|
+
size: size
|
|
365
|
+
}))
|
|
366
|
+
}));
|
|
380
367
|
}
|
|
381
368
|
|
|
382
|
-
var _excluded$
|
|
369
|
+
var _excluded$a = ["color"],
|
|
383
370
|
_excluded2$2 = ["color"];
|
|
384
371
|
|
|
372
|
+
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; }
|
|
373
|
+
|
|
374
|
+
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; }
|
|
375
|
+
|
|
385
376
|
function TypographyIconInheritColor(props) {
|
|
386
377
|
var color = useTypographyColor();
|
|
387
378
|
var theme = /*#__PURE__*/useTheme();
|
|
388
|
-
return /*#__PURE__*/
|
|
379
|
+
return /*#__PURE__*/jsx(Icon, _objectSpread$e(_objectSpread$e({}, props), {}, {
|
|
389
380
|
color: theme.kitt.typography.colors[color]
|
|
390
381
|
}));
|
|
391
382
|
}
|
|
392
383
|
|
|
393
384
|
function TypographyIconSpecifiedColor(_ref) {
|
|
394
385
|
var color = _ref.color,
|
|
395
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
386
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$a);
|
|
396
387
|
|
|
397
388
|
var theme = /*#__PURE__*/useTheme();
|
|
398
|
-
return /*#__PURE__*/
|
|
389
|
+
return /*#__PURE__*/jsx(Icon, _objectSpread$e(_objectSpread$e({}, otherProps), {}, {
|
|
399
390
|
color: theme.kitt.typography.colors[color]
|
|
400
391
|
}));
|
|
401
392
|
}
|
|
@@ -405,14 +396,18 @@ function TypographyIcon(_ref2) {
|
|
|
405
396
|
otherProps = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
406
397
|
|
|
407
398
|
if (color) {
|
|
408
|
-
return /*#__PURE__*/
|
|
399
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$e({
|
|
409
400
|
color: color
|
|
410
401
|
}, otherProps));
|
|
411
402
|
}
|
|
412
403
|
|
|
413
|
-
return /*#__PURE__*/
|
|
404
|
+
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$e({}, otherProps));
|
|
414
405
|
}
|
|
415
406
|
|
|
407
|
+
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; }
|
|
408
|
+
|
|
409
|
+
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; }
|
|
410
|
+
|
|
416
411
|
var getTextColorByType = function (type, isPressed, disabled) {
|
|
417
412
|
if (disabled) return 'black-light';
|
|
418
413
|
|
|
@@ -432,11 +427,11 @@ var getTextColorByType = function (type, isPressed, disabled) {
|
|
|
432
427
|
}
|
|
433
428
|
};
|
|
434
429
|
|
|
435
|
-
var ButtonText = /*#__PURE__*/styled(Typography.Text).withConfig({
|
|
430
|
+
var ButtonText = /*#__PURE__*/styled$1(Typography.Text).withConfig({
|
|
436
431
|
displayName: "ButtonContent__ButtonText",
|
|
437
432
|
componentId: "kitt-universal__sc-dnyw3n-0"
|
|
438
433
|
})(["text-align:center;"]);
|
|
439
|
-
var Content$1 = /*#__PURE__*/styled(
|
|
434
|
+
var Content$1 = /*#__PURE__*/styled$1(View).withConfig({
|
|
440
435
|
displayName: "ButtonContent__Content",
|
|
441
436
|
componentId: "kitt-universal__sc-dnyw3n-1"
|
|
442
437
|
})(["flex-direction:row;align-items:center;justify-content:center;flex:", ";"], function (_ref) {
|
|
@@ -444,7 +439,7 @@ var Content$1 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
444
439
|
iconOnly = _ref.iconOnly;
|
|
445
440
|
return "".concat(stretch || iconOnly ? 1 : 0, " 1 auto");
|
|
446
441
|
});
|
|
447
|
-
var IconContainer$1 = /*#__PURE__*/styled(
|
|
442
|
+
var IconContainer$1 = /*#__PURE__*/styled$1(View).withConfig({
|
|
448
443
|
displayName: "ButtonContent__IconContainer",
|
|
449
444
|
componentId: "kitt-universal__sc-dnyw3n-2"
|
|
450
445
|
})(["", ""], function (_ref2) {
|
|
@@ -466,15 +461,16 @@ function ButtonIcon(_ref3) {
|
|
|
466
461
|
size = _ref3.size,
|
|
467
462
|
iconPosition = _ref3.iconPosition,
|
|
468
463
|
testID = _ref3.testID;
|
|
469
|
-
return /*#__PURE__*/
|
|
470
|
-
iconPosition: iconPosition
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
464
|
+
return /*#__PURE__*/jsx(IconContainer$1, {
|
|
465
|
+
iconPosition: iconPosition,
|
|
466
|
+
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
467
|
+
icon: icon,
|
|
468
|
+
spin: spin,
|
|
469
|
+
color: color,
|
|
470
|
+
size: size,
|
|
471
|
+
testID: testID
|
|
472
|
+
})
|
|
473
|
+
});
|
|
478
474
|
}
|
|
479
475
|
|
|
480
476
|
function ButtonContent(_ref4) {
|
|
@@ -501,83 +497,34 @@ function ButtonContent(_ref4) {
|
|
|
501
497
|
}
|
|
502
498
|
|
|
503
499
|
if (!children) {
|
|
504
|
-
return /*#__PURE__*/
|
|
500
|
+
return /*#__PURE__*/jsx(Content$1, {
|
|
505
501
|
iconOnly: true,
|
|
506
|
-
stretch: stretch
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
502
|
+
stretch: stretch,
|
|
503
|
+
children: /*#__PURE__*/jsx(TypographyIcon, _objectSpread$d(_objectSpread$d({}, sharedIconProps), {}, {
|
|
504
|
+
icon: icon
|
|
505
|
+
}))
|
|
506
|
+
});
|
|
510
507
|
}
|
|
511
508
|
|
|
512
|
-
return /*#__PURE__*/
|
|
513
|
-
stretch: stretch
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
icon
|
|
524
|
-
|
|
525
|
-
|
|
509
|
+
return /*#__PURE__*/jsxs(Content$1, {
|
|
510
|
+
stretch: stretch,
|
|
511
|
+
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$d(_objectSpread$d({}, sharedIconProps), {}, {
|
|
512
|
+
icon: icon,
|
|
513
|
+
iconPosition: iconPosition,
|
|
514
|
+
testID: "button-left-icon"
|
|
515
|
+
})) : null, /*#__PURE__*/jsx(ButtonText, {
|
|
516
|
+
base: "body",
|
|
517
|
+
color: color,
|
|
518
|
+
variant: "bold",
|
|
519
|
+
children: children
|
|
520
|
+
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$d(_objectSpread$d({}, sharedIconProps), {}, {
|
|
521
|
+
icon: icon,
|
|
522
|
+
iconPosition: iconPosition
|
|
523
|
+
})) : null]
|
|
524
|
+
});
|
|
526
525
|
}
|
|
527
526
|
|
|
528
|
-
var
|
|
529
|
-
var focusable = _ref.focusable,
|
|
530
|
-
disabled = _ref.disabled;
|
|
531
|
-
if (disabled) return -1;
|
|
532
|
-
if (focusable === false) return -1;
|
|
533
|
-
return 0;
|
|
534
|
-
};
|
|
535
|
-
|
|
536
|
-
var handlePressPreventDefault = function (e) {
|
|
537
|
-
e.preventDefault();
|
|
538
|
-
};
|
|
539
|
-
|
|
540
|
-
var PrimitivePressableWithClassName = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
541
|
-
var disabled = _ref2.disabled,
|
|
542
|
-
focusable = _ref2.focusable,
|
|
543
|
-
children = _ref2.children,
|
|
544
|
-
className = _ref2.className,
|
|
545
|
-
accessibilityRole = _ref2.accessibilityRole,
|
|
546
|
-
nativeID = _ref2.nativeID,
|
|
547
|
-
testID = _ref2.testID,
|
|
548
|
-
href = _ref2.href,
|
|
549
|
-
hrefAttrs = _ref2.hrefAttrs,
|
|
550
|
-
onPress = _ref2.onPress;
|
|
551
|
-
return /*#__PURE__*/React.createElement(PrimitiveView, {
|
|
552
|
-
ref: ref,
|
|
553
|
-
nativeID: nativeID,
|
|
554
|
-
testID: testID,
|
|
555
|
-
className: className,
|
|
556
|
-
href: href,
|
|
557
|
-
hrefAttrs: hrefAttrs,
|
|
558
|
-
accessibilityRole: accessibilityRole,
|
|
559
|
-
"aria-disabled": !!disabled
|
|
560
|
-
/* https://necolas.github.io/react-native-web/docs/accessibility/#keyboard-focus */
|
|
561
|
-
,
|
|
562
|
-
tabIndex: getTabIndex({
|
|
563
|
-
focusable: focusable,
|
|
564
|
-
disabled: disabled
|
|
565
|
-
}),
|
|
566
|
-
onPress: disabled ? handlePressPreventDefault : onPress
|
|
567
|
-
}, children);
|
|
568
|
-
});
|
|
569
|
-
var PrimitivePressable = /*#__PURE__*/styled(PrimitivePressableWithClassName).withConfig({
|
|
570
|
-
displayName: "PrimitivePressableweb__PrimitivePressable",
|
|
571
|
-
componentId: "kitt-universal__sc-1pzco2e-0"
|
|
572
|
-
})(["cursor:", ";touch-action:", ";"], function (_ref3) {
|
|
573
|
-
var disabled = _ref3.disabled;
|
|
574
|
-
return disabled ? 'not-allowed' : 'pointer';
|
|
575
|
-
}, function (_ref4) {
|
|
576
|
-
var disabled = _ref4.disabled;
|
|
577
|
-
return disabled ? 'none' : 'manipulation';
|
|
578
|
-
});
|
|
579
|
-
|
|
580
|
-
var ButtonPressable = /*#__PURE__*/styled(PrimitivePressable).withConfig({
|
|
527
|
+
var ButtonPressable = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
581
528
|
displayName: "ButtonPressable",
|
|
582
529
|
componentId: "kitt-universal__sc-7ckel6-0"
|
|
583
530
|
})(["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) {
|
|
@@ -620,6 +567,9 @@ var ButtonPressable = /*#__PURE__*/styled(PrimitivePressable).withConfig({
|
|
|
620
567
|
return theme.kitt.button.borderWidth;
|
|
621
568
|
});
|
|
622
569
|
|
|
570
|
+
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; }
|
|
571
|
+
|
|
572
|
+
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; }
|
|
623
573
|
function Button(_ref) {
|
|
624
574
|
var children = _ref.children,
|
|
625
575
|
_ref$type = _ref.type,
|
|
@@ -645,10 +595,10 @@ function Button(_ref) {
|
|
|
645
595
|
stretch: stretch,
|
|
646
596
|
disabled: disabled
|
|
647
597
|
};
|
|
648
|
-
return /*#__PURE__*/
|
|
598
|
+
return /*#__PURE__*/jsx(ButtonPressable // eslint-disable-next-line unicorn/expiring-todo-comments
|
|
649
599
|
// TODO: When designs are defined, update with the proper onPress styles to mimic TouchableHighlight
|
|
650
600
|
// underlayColor={globalTheme.button[type].pressedBackgroundColor}
|
|
651
|
-
,
|
|
601
|
+
, _objectSpread$c(_objectSpread$c({}, sharedProps), {}, {
|
|
652
602
|
isPressed: isPressed,
|
|
653
603
|
accessibilityRole: "button",
|
|
654
604
|
testID: testID,
|
|
@@ -660,15 +610,17 @@ function Button(_ref) {
|
|
|
660
610
|
},
|
|
661
611
|
onPressOut: function handleButtonPressOut() {
|
|
662
612
|
return setIsPressed(false);
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
613
|
+
},
|
|
614
|
+
children: /*#__PURE__*/jsx(ButtonContent, _objectSpread$c(_objectSpread$c({}, sharedProps), {}, {
|
|
615
|
+
icon: icon,
|
|
616
|
+
iconPosition: iconPosition,
|
|
617
|
+
iconSpin: iconSpin,
|
|
618
|
+
children: children
|
|
619
|
+
}))
|
|
620
|
+
}));
|
|
669
621
|
}
|
|
670
622
|
|
|
671
|
-
var Container$5 = /*#__PURE__*/styled(
|
|
623
|
+
var Container$5 = /*#__PURE__*/styled$1(View).withConfig({
|
|
672
624
|
displayName: "Card__Container",
|
|
673
625
|
componentId: "kitt-universal__sc-1n9psug-0"
|
|
674
626
|
})(["background-color:", ";padding:", ";border-radius:", ";border-width:", ";border-color:", ";"], function (_ref) {
|
|
@@ -692,9 +644,45 @@ var Container$5 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
692
644
|
function Card(_ref6) {
|
|
693
645
|
var children = _ref6.children,
|
|
694
646
|
type = _ref6.type;
|
|
695
|
-
return /*#__PURE__*/
|
|
696
|
-
type: type
|
|
697
|
-
|
|
647
|
+
return /*#__PURE__*/jsx(Container$5, {
|
|
648
|
+
type: type,
|
|
649
|
+
children: children
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
var StyledEmoji = /*#__PURE__*/styled$1(Image).withConfig({
|
|
654
|
+
displayName: "Emoji__StyledEmoji",
|
|
655
|
+
componentId: "kitt-universal__sc-ggl6wj-0"
|
|
656
|
+
})(["width:", "px;height:", "px;"], function (_ref) {
|
|
657
|
+
var size = _ref.size;
|
|
658
|
+
return size;
|
|
659
|
+
}, function (_ref2) {
|
|
660
|
+
var size = _ref2.size;
|
|
661
|
+
return size;
|
|
662
|
+
});
|
|
663
|
+
function Emoji(_ref3) {
|
|
664
|
+
var emoji = _ref3.emoji,
|
|
665
|
+
size = _ref3.size,
|
|
666
|
+
style = _ref3.style;
|
|
667
|
+
|
|
668
|
+
var _useMemo = useMemo(function () {
|
|
669
|
+
return parse(emoji, {
|
|
670
|
+
// on native plaforms, you can't display svg as Image
|
|
671
|
+
assetType: 'svg'
|
|
672
|
+
});
|
|
673
|
+
}, [emoji]),
|
|
674
|
+
_useMemo2 = _slicedToArray(_useMemo, 1),
|
|
675
|
+
emojiData = _useMemo2[0];
|
|
676
|
+
|
|
677
|
+
if (!emojiData) return null;
|
|
678
|
+
return /*#__PURE__*/jsx(StyledEmoji, {
|
|
679
|
+
size: size,
|
|
680
|
+
accessibilityLabel: emojiData.text,
|
|
681
|
+
source: {
|
|
682
|
+
uri: emojiData.url
|
|
683
|
+
},
|
|
684
|
+
style: style
|
|
685
|
+
});
|
|
698
686
|
}
|
|
699
687
|
|
|
700
688
|
var defaultOpenLinkBehavior = {
|
|
@@ -702,16 +690,20 @@ var defaultOpenLinkBehavior = {
|
|
|
702
690
|
web: 'targetBlank'
|
|
703
691
|
};
|
|
704
692
|
|
|
705
|
-
var _excluded$
|
|
693
|
+
var _excluded$9 = ["as", "href", "openLinkBehavior", "onPress"];
|
|
694
|
+
|
|
695
|
+
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; }
|
|
696
|
+
|
|
697
|
+
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; }
|
|
706
698
|
function ExternalLink(_ref) {
|
|
707
699
|
var Component = _ref.as,
|
|
708
700
|
href = _ref.href,
|
|
709
701
|
_ref$openLinkBehavior = _ref.openLinkBehavior,
|
|
710
702
|
openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
|
|
711
703
|
onPress = _ref.onPress,
|
|
712
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
704
|
+
rest = _objectWithoutProperties(_ref, _excluded$9);
|
|
713
705
|
|
|
714
|
-
return /*#__PURE__*/
|
|
706
|
+
return /*#__PURE__*/jsx(Component, _objectSpread$b(_objectSpread$b({}, rest), {}, {
|
|
715
707
|
href: href,
|
|
716
708
|
hrefAttrs: (openLinkBehavior === null || openLinkBehavior === void 0 ? void 0 : openLinkBehavior.web) === 'targetSelf' ? undefined : {
|
|
717
709
|
target: '_blank',
|
|
@@ -735,66 +727,19 @@ function InputFeedback(_ref) {
|
|
|
735
727
|
var state = _ref.state,
|
|
736
728
|
testID = _ref.testID,
|
|
737
729
|
children = _ref.children;
|
|
738
|
-
return /*#__PURE__*/
|
|
730
|
+
return /*#__PURE__*/jsx(Typography.Text, {
|
|
739
731
|
base: "body-small",
|
|
740
732
|
color: getColorFromState(state),
|
|
741
|
-
testID: testID
|
|
742
|
-
|
|
733
|
+
testID: testID,
|
|
734
|
+
children: children
|
|
735
|
+
});
|
|
743
736
|
}
|
|
744
737
|
|
|
745
|
-
var
|
|
746
|
-
/**
|
|
747
|
-
* min-width: 0
|
|
748
|
-
*/
|
|
749
|
-
BASE: 0,
|
|
750
|
-
|
|
751
|
-
/**
|
|
752
|
-
* min-width: 480px
|
|
753
|
-
*/
|
|
754
|
-
SMALL: 480,
|
|
755
|
-
|
|
756
|
-
/**
|
|
757
|
-
* min-width: 768px
|
|
758
|
-
*/
|
|
759
|
-
MEDIUM: 768,
|
|
760
|
-
|
|
761
|
-
/**
|
|
762
|
-
* min-width: 1024px
|
|
763
|
-
*/
|
|
764
|
-
LARGE: 1024,
|
|
765
|
-
|
|
766
|
-
/**
|
|
767
|
-
* min-width: 1280px
|
|
768
|
-
*/
|
|
769
|
-
WIDE: 1280
|
|
770
|
-
};
|
|
771
|
-
var KittBreakpointsMax = {
|
|
772
|
-
/**
|
|
773
|
-
* max-width: 479px
|
|
774
|
-
*/
|
|
775
|
-
BASE: KittBreakpoints.SMALL - 1,
|
|
776
|
-
|
|
777
|
-
/**
|
|
778
|
-
* max-width: 767px
|
|
779
|
-
*/
|
|
780
|
-
SMALL: KittBreakpoints.MEDIUM - 1,
|
|
781
|
-
|
|
782
|
-
/**
|
|
783
|
-
* max-width: 1023px
|
|
784
|
-
*/
|
|
785
|
-
MEDIUM: KittBreakpoints.LARGE - 1,
|
|
786
|
-
|
|
787
|
-
/**
|
|
788
|
-
* max-width: 1279px
|
|
789
|
-
*/
|
|
790
|
-
LARGE: KittBreakpoints.WIDE - 1
|
|
791
|
-
};
|
|
792
|
-
|
|
793
|
-
var FieldContainer = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
738
|
+
var FieldContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
794
739
|
displayName: "InputField__FieldContainer",
|
|
795
740
|
componentId: "kitt-universal__sc-13fkixs-0"
|
|
796
741
|
})(["padding:5px 0 10px;"]);
|
|
797
|
-
var FeedbackContainer = /*#__PURE__*/styled(
|
|
742
|
+
var FeedbackContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
798
743
|
displayName: "InputField__FeedbackContainer",
|
|
799
744
|
componentId: "kitt-universal__sc-13fkixs-1"
|
|
800
745
|
})(["", ";"], function (_ref) {
|
|
@@ -803,14 +748,14 @@ var FeedbackContainer = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
803
748
|
minWidth: KittBreakpoints.SMALL
|
|
804
749
|
}, 'padding-top: 10px', 'padding-top: 5px');
|
|
805
750
|
});
|
|
806
|
-
var FieldLabelContainer = /*#__PURE__*/styled(
|
|
751
|
+
var FieldLabelContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
807
752
|
displayName: "InputField__FieldLabelContainer",
|
|
808
753
|
componentId: "kitt-universal__sc-13fkixs-2"
|
|
809
754
|
})(["flex-direction:row;align-items:center;padding-bottom:", "px;"], function (_ref2) {
|
|
810
755
|
var theme = _ref2.theme;
|
|
811
756
|
return theme.kitt.forms.inputField.labelContainerPaddingBottom;
|
|
812
757
|
});
|
|
813
|
-
var LabelContainer = /*#__PURE__*/styled(
|
|
758
|
+
var LabelContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
814
759
|
displayName: "InputField__LabelContainer",
|
|
815
760
|
componentId: "kitt-universal__sc-13fkixs-3"
|
|
816
761
|
})(["margin-right:", "px;"], function (_ref3) {
|
|
@@ -822,7 +767,15 @@ function InputField(_ref4) {
|
|
|
822
767
|
labelFeedback = _ref4.labelFeedback,
|
|
823
768
|
input = _ref4.input,
|
|
824
769
|
feedback = _ref4.feedback;
|
|
825
|
-
return /*#__PURE__*/
|
|
770
|
+
return /*#__PURE__*/jsxs(FieldContainer, {
|
|
771
|
+
children: [label ? /*#__PURE__*/jsxs(FieldLabelContainer, {
|
|
772
|
+
children: [/*#__PURE__*/jsx(LabelContainer, {
|
|
773
|
+
children: label
|
|
774
|
+
}), labelFeedback]
|
|
775
|
+
}) : null, input, feedback ? /*#__PURE__*/jsx(FeedbackContainer, {
|
|
776
|
+
children: feedback
|
|
777
|
+
}) : null]
|
|
778
|
+
});
|
|
826
779
|
}
|
|
827
780
|
|
|
828
781
|
var useInputText = function () {
|
|
@@ -853,7 +806,11 @@ var useInputText = function () {
|
|
|
853
806
|
};
|
|
854
807
|
};
|
|
855
808
|
|
|
856
|
-
var _excluded$
|
|
809
|
+
var _excluded$8 = ["id", "minHeight", "type", "state", "internalForceState", "disabled", "onFocus", "onBlur"];
|
|
810
|
+
|
|
811
|
+
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; }
|
|
812
|
+
|
|
813
|
+
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; }
|
|
857
814
|
var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width:", ";border-radius:", ";border-color:", ";font-size:", ";color:", ";font-family:", ";"], function (_ref) {
|
|
858
815
|
var theme = _ref.theme,
|
|
859
816
|
state = _ref.state;
|
|
@@ -870,7 +827,8 @@ var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width
|
|
|
870
827
|
return theme.kitt.forms.input.states[state].borderColor;
|
|
871
828
|
}, function (_ref5) {
|
|
872
829
|
var theme = _ref5.theme;
|
|
873
|
-
|
|
830
|
+
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
831
|
+
return theme.kitt.typography.types.bodies.configs.body[typeConfigKey].fontSize;
|
|
874
832
|
}, function (_ref6) {
|
|
875
833
|
var theme = _ref6.theme,
|
|
876
834
|
state = _ref6.state;
|
|
@@ -879,7 +837,7 @@ var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width
|
|
|
879
837
|
var theme = _ref7.theme;
|
|
880
838
|
return theme.kitt.typography.types.bodies.fontFamily.regular;
|
|
881
839
|
});
|
|
882
|
-
var Input = /*#__PURE__*/styled(TextInput).withConfig({
|
|
840
|
+
var Input = /*#__PURE__*/styled$1(TextInput).withConfig({
|
|
883
841
|
displayName: "InputText__Input",
|
|
884
842
|
componentId: "kitt-universal__sc-uke279-0"
|
|
885
843
|
})(["", " padding:", ";line-height:", ";min-height:", "px;"], styledTextInputMixin, function (_ref8) {
|
|
@@ -889,12 +847,14 @@ var Input = /*#__PURE__*/styled(TextInput).withConfig({
|
|
|
889
847
|
}, function (_ref9) {
|
|
890
848
|
var theme = _ref9.theme,
|
|
891
849
|
multiline = _ref9.multiline;
|
|
892
|
-
|
|
850
|
+
if (!multiline && "web" === 'ios') return 0;
|
|
851
|
+
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
852
|
+
return theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight;
|
|
893
853
|
}, function (_ref10) {
|
|
894
854
|
var minHeight = _ref10.minHeight;
|
|
895
855
|
return minHeight;
|
|
896
856
|
});
|
|
897
|
-
var Container$4 = /*#__PURE__*/styled(
|
|
857
|
+
var Container$4 = /*#__PURE__*/styled$1(View).withConfig({
|
|
898
858
|
displayName: "InputText__Container",
|
|
899
859
|
componentId: "kitt-universal__sc-uke279-1"
|
|
900
860
|
})(["margin-top:", ";margin-bottom:", ";"], function (_ref11) {
|
|
@@ -904,7 +864,7 @@ var Container$4 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
904
864
|
var theme = _ref12.theme;
|
|
905
865
|
return theme.kitt.forms.input.marginBottom;
|
|
906
866
|
});
|
|
907
|
-
var PasswordButtonContainer = /*#__PURE__*/styled(
|
|
867
|
+
var PasswordButtonContainer = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
908
868
|
displayName: "InputText__PasswordButtonContainer",
|
|
909
869
|
componentId: "kitt-universal__sc-uke279-2"
|
|
910
870
|
})(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:", "px;"], function (_ref13) {
|
|
@@ -957,7 +917,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref15, ref) {
|
|
|
957
917
|
disabled = _ref15$disabled === void 0 ? false : _ref15$disabled,
|
|
958
918
|
_onFocus = _ref15.onFocus,
|
|
959
919
|
_onBlur = _ref15.onBlur,
|
|
960
|
-
props = _objectWithoutProperties(_ref15, _excluded$
|
|
920
|
+
props = _objectWithoutProperties(_ref15, _excluded$8);
|
|
961
921
|
|
|
962
922
|
var _useInputText = useInputText(),
|
|
963
923
|
isFocused = _useInputText.isFocused,
|
|
@@ -972,49 +932,54 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref15, ref) {
|
|
|
972
932
|
isDisabled: disabled,
|
|
973
933
|
formState: formState
|
|
974
934
|
});
|
|
975
|
-
return /*#__PURE__*/
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
935
|
+
return /*#__PURE__*/jsxs(Container$4, {
|
|
936
|
+
children: [/*#__PURE__*/jsx(Input, _objectSpread$a(_objectSpread$a({
|
|
937
|
+
ref: ref,
|
|
938
|
+
nativeID: id,
|
|
939
|
+
editable: !disabled,
|
|
940
|
+
keyboardType: keyboardTypeByTextInputType[type],
|
|
941
|
+
autoCompleteType: autoCompleteTypeByType[type],
|
|
942
|
+
autoCorrect: autoCorrectByType[type],
|
|
943
|
+
minHeight: minHeight,
|
|
944
|
+
textContentType: textContentTypeByType[type],
|
|
945
|
+
placeholderTextColor: theme.kitt.typography.colors[theme.kitt.forms.input.placeholderColor],
|
|
946
|
+
selectionColor: theme.kitt.forms.input.selectionColor,
|
|
947
|
+
secureTextEntry: type === 'password' && !isPasswordVisible
|
|
948
|
+
}, props), {}, {
|
|
949
|
+
state: state,
|
|
950
|
+
onFocus: function onFocus(e) {
|
|
951
|
+
handleInputFocus();
|
|
952
|
+
if (_onFocus) _onFocus(e);
|
|
953
|
+
},
|
|
954
|
+
onBlur: function onBlur(e) {
|
|
955
|
+
handleInputBlur();
|
|
956
|
+
if (_onBlur) _onBlur(e);
|
|
957
|
+
}
|
|
958
|
+
})), type === 'password' && !disabled && /*#__PURE__*/jsx(PasswordButtonContainer, {
|
|
959
|
+
accessibilityRole: "button",
|
|
960
|
+
onPress: togglePasswordVisibility,
|
|
961
|
+
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
962
|
+
icon: isPasswordVisible ? /*#__PURE__*/jsx(EyeIcon, {}) : /*#__PURE__*/jsx(EyeOffIcon, {}),
|
|
963
|
+
size: theme.kitt.forms.input.passwordButtonIconSize,
|
|
964
|
+
color: theme.kitt.forms.input.states[state].passwordButtonIconColor
|
|
965
|
+
})
|
|
966
|
+
})]
|
|
967
|
+
});
|
|
1005
968
|
});
|
|
1006
969
|
|
|
1007
970
|
function Label(_ref) {
|
|
1008
971
|
var htmlFor = _ref.htmlFor,
|
|
1009
972
|
children = _ref.children;
|
|
1010
|
-
return /*#__PURE__*/
|
|
1011
|
-
base: "body"
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
973
|
+
return /*#__PURE__*/jsx(Typography.Text, {
|
|
974
|
+
base: "body",
|
|
975
|
+
children: /*#__PURE__*/jsx("label", {
|
|
976
|
+
htmlFor: htmlFor,
|
|
977
|
+
children: children
|
|
978
|
+
})
|
|
979
|
+
});
|
|
1015
980
|
}
|
|
1016
981
|
|
|
1017
|
-
var OuterRadio = /*#__PURE__*/styled(
|
|
982
|
+
var OuterRadio = /*#__PURE__*/styled$1(View).withConfig({
|
|
1018
983
|
displayName: "Radio__OuterRadio",
|
|
1019
984
|
componentId: "kitt-universal__sc-1mdgr2o-0"
|
|
1020
985
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;border-width:", ";border-color:", ";"], function (_ref) {
|
|
@@ -1038,7 +1003,7 @@ var OuterRadio = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1038
1003
|
disabled = _ref6.disabled;
|
|
1039
1004
|
return theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].borderColor;
|
|
1040
1005
|
});
|
|
1041
|
-
var SelectedOuterRadio = /*#__PURE__*/styled(
|
|
1006
|
+
var SelectedOuterRadio = /*#__PURE__*/styled$1(View).withConfig({
|
|
1042
1007
|
displayName: "Radio__SelectedOuterRadio",
|
|
1043
1008
|
componentId: "kitt-universal__sc-1mdgr2o-1"
|
|
1044
1009
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;justify-content:center;align-items:center;"], function (_ref7) {
|
|
@@ -1054,7 +1019,7 @@ var SelectedOuterRadio = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1054
1019
|
var theme = _ref10.theme;
|
|
1055
1020
|
return theme.kitt.forms.radio.size / 2;
|
|
1056
1021
|
});
|
|
1057
|
-
var SelectedInnerRadio = /*#__PURE__*/styled(
|
|
1022
|
+
var SelectedInnerRadio = /*#__PURE__*/styled$1(View).withConfig({
|
|
1058
1023
|
displayName: "Radio__SelectedInnerRadio",
|
|
1059
1024
|
componentId: "kitt-universal__sc-1mdgr2o-2"
|
|
1060
1025
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;"], function (_ref11) {
|
|
@@ -1070,11 +1035,11 @@ var SelectedInnerRadio = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1070
1035
|
var theme = _ref14.theme;
|
|
1071
1036
|
return theme.kitt.forms.radio.checked.innerSize / 2;
|
|
1072
1037
|
});
|
|
1073
|
-
var Container$3 = /*#__PURE__*/styled(
|
|
1038
|
+
var Container$3 = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
1074
1039
|
displayName: "Radio__Container",
|
|
1075
1040
|
componentId: "kitt-universal__sc-1mdgr2o-3"
|
|
1076
1041
|
})(["flex-direction:row;align-items:center;"]);
|
|
1077
|
-
var Text = /*#__PURE__*/styled(Typography.Text).withConfig({
|
|
1042
|
+
var Text = /*#__PURE__*/styled$1(Typography.Text).withConfig({
|
|
1078
1043
|
displayName: "Radio__Text",
|
|
1079
1044
|
componentId: "kitt-universal__sc-1mdgr2o-4"
|
|
1080
1045
|
})(["margin-left:", "px;"], function (_ref15) {
|
|
@@ -1089,7 +1054,7 @@ function Radio(_ref16) {
|
|
|
1089
1054
|
_ref16$disabled = _ref16.disabled,
|
|
1090
1055
|
disabled = _ref16$disabled === void 0 ? false : _ref16$disabled,
|
|
1091
1056
|
children = _ref16.children;
|
|
1092
|
-
return /*#__PURE__*/
|
|
1057
|
+
return /*#__PURE__*/jsxs(Container$3, {
|
|
1093
1058
|
nativeID: id,
|
|
1094
1059
|
disabled: disabled,
|
|
1095
1060
|
accessibilityRole: "radio",
|
|
@@ -1097,28 +1062,35 @@ function Radio(_ref16) {
|
|
|
1097
1062
|
focusable: checked && !disabled,
|
|
1098
1063
|
onPress: function handlePress() {
|
|
1099
1064
|
onChange(value);
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1065
|
+
},
|
|
1066
|
+
children: [checked && !disabled ? /*#__PURE__*/jsx(SelectedOuterRadio, {
|
|
1067
|
+
children: /*#__PURE__*/jsx(SelectedInnerRadio, {})
|
|
1068
|
+
}) : /*#__PURE__*/jsx(OuterRadio, {
|
|
1069
|
+
disabled: disabled
|
|
1070
|
+
}), /*#__PURE__*/jsx(Text, {
|
|
1071
|
+
base: "body",
|
|
1072
|
+
color: disabled ? 'black-light' : 'black',
|
|
1073
|
+
children: children
|
|
1074
|
+
})]
|
|
1075
|
+
});
|
|
1107
1076
|
}
|
|
1108
1077
|
|
|
1078
|
+
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; }
|
|
1079
|
+
|
|
1080
|
+
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; }
|
|
1109
1081
|
function TextArea(_ref) {
|
|
1110
1082
|
var props = _extends({}, _ref);
|
|
1111
1083
|
|
|
1112
1084
|
var theme = /*#__PURE__*/useTheme();
|
|
1113
|
-
return /*#__PURE__*/
|
|
1085
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$9(_objectSpread$9({
|
|
1114
1086
|
multiline: true
|
|
1115
|
-
}, props, {
|
|
1087
|
+
}, props), {}, {
|
|
1116
1088
|
type: "text",
|
|
1117
1089
|
minHeight: theme.kitt.forms.input.textAreaMinHeight
|
|
1118
1090
|
}));
|
|
1119
1091
|
}
|
|
1120
1092
|
|
|
1121
|
-
var Body = /*#__PURE__*/styled(
|
|
1093
|
+
var Body = /*#__PURE__*/styled$1(View).withConfig({
|
|
1122
1094
|
displayName: "Body",
|
|
1123
1095
|
componentId: "kitt-universal__sc-1ofncfn-0"
|
|
1124
1096
|
})(["", " background-color:", ";flex:1;"], function (_ref) {
|
|
@@ -1132,10 +1104,12 @@ var Body = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1132
1104
|
});
|
|
1133
1105
|
function FullScreenModalBody(_ref3) {
|
|
1134
1106
|
var children = _ref3.children;
|
|
1135
|
-
return /*#__PURE__*/
|
|
1107
|
+
return /*#__PURE__*/jsx(Body, {
|
|
1108
|
+
children: children
|
|
1109
|
+
});
|
|
1136
1110
|
}
|
|
1137
1111
|
|
|
1138
|
-
var SideContainer = /*#__PURE__*/styled(
|
|
1112
|
+
var SideContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
1139
1113
|
displayName: "Header__SideContainer",
|
|
1140
1114
|
componentId: "kitt-universal__sc-dfmxi1-0"
|
|
1141
1115
|
})(["", ""], function (_ref) {
|
|
@@ -1155,7 +1129,7 @@ function getHeaderHorizontalMediumPadding(spacing) {
|
|
|
1155
1129
|
return spacing * 6;
|
|
1156
1130
|
}
|
|
1157
1131
|
|
|
1158
|
-
var Header = /*#__PURE__*/styled(
|
|
1132
|
+
var Header = /*#__PURE__*/styled$1(View).withConfig({
|
|
1159
1133
|
displayName: "Header",
|
|
1160
1134
|
componentId: "kitt-universal__sc-dfmxi1-1"
|
|
1161
1135
|
})(["", ";border-bottom-color:", ";border-bottom-width:1px;flex-direction:row;align-items:center;"], function (_ref2) {
|
|
@@ -1173,7 +1147,7 @@ var Header = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1173
1147
|
var theme = _ref3.theme;
|
|
1174
1148
|
return theme.kitt.fullScreenModal.header.borderColor;
|
|
1175
1149
|
});
|
|
1176
|
-
var HeaderContent = /*#__PURE__*/styled(
|
|
1150
|
+
var HeaderContent = /*#__PURE__*/styled$1(View).withConfig({
|
|
1177
1151
|
displayName: "Header__HeaderContent",
|
|
1178
1152
|
componentId: "kitt-universal__sc-dfmxi1-2"
|
|
1179
1153
|
})(["", ";", ";justify-content:center;align-items:center;"], function (_ref4) {
|
|
@@ -1241,25 +1215,29 @@ function FullScreenModalHeader(_ref6) {
|
|
|
1241
1215
|
setRightWidth(event.nativeEvent.layout.width);
|
|
1242
1216
|
};
|
|
1243
1217
|
|
|
1244
|
-
return /*#__PURE__*/
|
|
1245
|
-
insetTop: top
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1218
|
+
return /*#__PURE__*/jsxs(Header, {
|
|
1219
|
+
insetTop: top,
|
|
1220
|
+
children: [left ? /*#__PURE__*/jsx(SideContainer, {
|
|
1221
|
+
onLayout: function onLayout(e) {
|
|
1222
|
+
return handleLayoutChange(e, 'left');
|
|
1223
|
+
},
|
|
1224
|
+
children: left
|
|
1225
|
+
}) : null, /*#__PURE__*/jsx(HeaderContent, {
|
|
1226
|
+
windowWidth: dimensions.width,
|
|
1227
|
+
leftWidth: leftWidth,
|
|
1228
|
+
rightWidth: rightWidth,
|
|
1229
|
+
children: children
|
|
1230
|
+
}), right ? /*#__PURE__*/jsx(SideContainer, {
|
|
1231
|
+
side: "right",
|
|
1232
|
+
onLayout: function onLayout(e) {
|
|
1233
|
+
return handleLayoutChange(e, 'right');
|
|
1234
|
+
},
|
|
1235
|
+
children: right
|
|
1236
|
+
}) : null]
|
|
1237
|
+
});
|
|
1260
1238
|
}
|
|
1261
1239
|
|
|
1262
|
-
var Container$2 = /*#__PURE__*/styled(
|
|
1240
|
+
var Container$2 = /*#__PURE__*/styled$1(View).withConfig({
|
|
1263
1241
|
displayName: "FullScreenModal__Container",
|
|
1264
1242
|
componentId: "kitt-universal__sc-11qpbe3-0"
|
|
1265
1243
|
})(["flex:1;background-color:", ";"], function (_ref) {
|
|
@@ -1268,52 +1246,114 @@ var Container$2 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1268
1246
|
});
|
|
1269
1247
|
function FullScreenModal(_ref2) {
|
|
1270
1248
|
var children = _ref2.children;
|
|
1271
|
-
return /*#__PURE__*/
|
|
1249
|
+
return /*#__PURE__*/jsx(Container$2, {
|
|
1250
|
+
children: children
|
|
1251
|
+
});
|
|
1272
1252
|
}
|
|
1273
1253
|
FullScreenModal.Header = FullScreenModalHeader;
|
|
1274
1254
|
FullScreenModal.Body = FullScreenModalBody;
|
|
1275
1255
|
|
|
1276
|
-
var
|
|
1277
|
-
|
|
1256
|
+
var _excluded$7 = ["as", "children"];
|
|
1257
|
+
|
|
1258
|
+
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; }
|
|
1259
|
+
|
|
1260
|
+
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; }
|
|
1261
|
+
function StyleWebWrapper(_ref) {
|
|
1262
|
+
var as = _ref.as,
|
|
1263
|
+
children = _ref.children,
|
|
1264
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
1265
|
+
|
|
1266
|
+
// as or default to div. If as is undefined, T is div but typescript is not sure
|
|
1267
|
+
return /*#__PURE__*/jsx(as || 'div', _objectSpread$8(_objectSpread$8({}, props), {}, {
|
|
1268
|
+
children: children
|
|
1269
|
+
}));
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
var _excluded$6 = ["color"];
|
|
1273
|
+
|
|
1274
|
+
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; }
|
|
1275
|
+
|
|
1276
|
+
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; }
|
|
1277
|
+
var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled("div")({
|
|
1278
|
+
name: "PressableIconButtonWebWrapper",
|
|
1279
|
+
"class": "p1nlccvg",
|
|
1280
|
+
vars: {
|
|
1281
|
+
"p1nlccvg-0": [function (_ref) {
|
|
1282
|
+
var theme = _ref.theme;
|
|
1283
|
+
return theme.kitt.iconButton.scale.base.hover;
|
|
1284
|
+
}],
|
|
1285
|
+
"p1nlccvg-1": [function (_ref2) {
|
|
1286
|
+
var theme = _ref2.theme;
|
|
1287
|
+
return theme.breakpoints.min.mediumBreakpoint;
|
|
1288
|
+
}],
|
|
1289
|
+
"p1nlccvg-2": [function (_ref3) {
|
|
1290
|
+
var theme = _ref3.theme;
|
|
1291
|
+
return theme.kitt.iconButton.scale.medium.hover;
|
|
1292
|
+
}],
|
|
1293
|
+
"p1nlccvg-3": [function (_ref4) {
|
|
1294
|
+
var theme = _ref4.theme;
|
|
1295
|
+
return theme.kitt.iconButton.scale.base.active;
|
|
1296
|
+
}],
|
|
1297
|
+
"p1nlccvg-4": [function (_ref5) {
|
|
1298
|
+
var theme = _ref5.theme;
|
|
1299
|
+
return theme.kitt.iconButton["default"].pressedBackgroundColor;
|
|
1300
|
+
}],
|
|
1301
|
+
"p1nlccvg-5": [function (_ref6) {
|
|
1302
|
+
var theme = _ref6.theme;
|
|
1303
|
+
return theme.kitt.iconButton.white.pressedBackgroundColor;
|
|
1304
|
+
}]
|
|
1305
|
+
}
|
|
1306
|
+
}));
|
|
1307
|
+
var StyledPressableIconButton = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
1308
|
+
displayName: "PressableIconButton__StyledPressableIconButton",
|
|
1278
1309
|
componentId: "kitt-universal__sc-1m6jo3s-0"
|
|
1279
|
-
})(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (
|
|
1280
|
-
var theme =
|
|
1310
|
+
})(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref7) {
|
|
1311
|
+
var theme = _ref7.theme;
|
|
1281
1312
|
return theme.kitt.iconButton.borderRadius;
|
|
1282
|
-
}, function (
|
|
1283
|
-
var theme =
|
|
1313
|
+
}, function (_ref8) {
|
|
1314
|
+
var theme = _ref8.theme;
|
|
1284
1315
|
return theme.kitt.iconButton.width;
|
|
1285
|
-
}, function (
|
|
1286
|
-
var theme =
|
|
1316
|
+
}, function (_ref9) {
|
|
1317
|
+
var theme = _ref9.theme;
|
|
1287
1318
|
return theme.kitt.iconButton.height;
|
|
1288
|
-
}, function (
|
|
1289
|
-
var theme =
|
|
1290
|
-
|
|
1291
|
-
disabled = _ref4.disabled;
|
|
1319
|
+
}, function (_ref10) {
|
|
1320
|
+
var theme = _ref10.theme,
|
|
1321
|
+
disabled = _ref10.disabled;
|
|
1292
1322
|
var iconButton = theme.kitt.iconButton;
|
|
1293
|
-
var transition = iconButton.transition
|
|
1294
|
-
scale = iconButton.scale;
|
|
1323
|
+
var transition = iconButton.transition;
|
|
1295
1324
|
|
|
1296
1325
|
if (disabled) {
|
|
1297
1326
|
return "\n background-color: ".concat(iconButton.disabled.backgroundColor, ";\n ");
|
|
1298
1327
|
}
|
|
1299
1328
|
|
|
1300
|
-
return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n
|
|
1329
|
+
return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n ");
|
|
1301
1330
|
});
|
|
1331
|
+
function PressableIconButton(_ref11) {
|
|
1332
|
+
var color = _ref11.color,
|
|
1333
|
+
props = _objectWithoutProperties(_ref11, _excluded$6);
|
|
1334
|
+
|
|
1335
|
+
return /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
1336
|
+
as: PressableIconButtonWebWrapper,
|
|
1337
|
+
"data-color-white": color === 'white' ? true : undefined,
|
|
1338
|
+
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread$7({}, props))
|
|
1339
|
+
});
|
|
1340
|
+
}
|
|
1302
1341
|
|
|
1303
1342
|
function PressableAnimatedContainer(_ref) {
|
|
1304
1343
|
var children = _ref.children,
|
|
1305
1344
|
color = _ref.color,
|
|
1306
1345
|
disabled = _ref.disabled,
|
|
1307
1346
|
onPress = _ref.onPress;
|
|
1308
|
-
return /*#__PURE__*/
|
|
1347
|
+
return /*#__PURE__*/jsx(PressableIconButton, {
|
|
1309
1348
|
accessibilityRole: "button",
|
|
1310
1349
|
color: color,
|
|
1311
1350
|
disabled: disabled,
|
|
1312
|
-
onPress: onPress
|
|
1313
|
-
|
|
1351
|
+
onPress: onPress,
|
|
1352
|
+
children: children
|
|
1353
|
+
});
|
|
1314
1354
|
}
|
|
1315
1355
|
|
|
1316
|
-
var IconButtonContentBorder = /*#__PURE__*/styled(
|
|
1356
|
+
var IconButtonContentBorder = /*#__PURE__*/styled$1(View).withConfig({
|
|
1317
1357
|
displayName: "IconButton__IconButtonContentBorder",
|
|
1318
1358
|
componentId: "kitt-universal__sc-swelbf-0"
|
|
1319
1359
|
})(["border:", ";border-color:", ";width:", "px;height:", "px;align-items:center;justify-content:center;border-radius:", "px;"], function (_ref) {
|
|
@@ -1338,12 +1378,13 @@ function IconButtonContent(_ref6) {
|
|
|
1338
1378
|
var disabled = _ref6.disabled,
|
|
1339
1379
|
color = _ref6.color,
|
|
1340
1380
|
icon = _ref6.icon;
|
|
1341
|
-
return /*#__PURE__*/
|
|
1342
|
-
disabled: disabled
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1381
|
+
return /*#__PURE__*/jsx(IconButtonContentBorder, {
|
|
1382
|
+
disabled: disabled,
|
|
1383
|
+
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
1384
|
+
color: disabled ? 'black-light' : color,
|
|
1385
|
+
icon: icon
|
|
1386
|
+
})
|
|
1387
|
+
});
|
|
1347
1388
|
}
|
|
1348
1389
|
|
|
1349
1390
|
function IconButton(_ref7) {
|
|
@@ -1351,32 +1392,43 @@ function IconButton(_ref7) {
|
|
|
1351
1392
|
color = _ref7.color,
|
|
1352
1393
|
disabled = _ref7.disabled,
|
|
1353
1394
|
onPress = _ref7.onPress;
|
|
1354
|
-
return /*#__PURE__*/
|
|
1395
|
+
return /*#__PURE__*/jsx(PressableAnimatedContainer, {
|
|
1355
1396
|
color: color,
|
|
1356
1397
|
disabled: disabled,
|
|
1357
|
-
onPress: onPress
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1398
|
+
onPress: onPress,
|
|
1399
|
+
children: /*#__PURE__*/jsx(IconButtonContent, {
|
|
1400
|
+
disabled: disabled,
|
|
1401
|
+
color: color,
|
|
1402
|
+
icon: icon
|
|
1403
|
+
})
|
|
1404
|
+
});
|
|
1363
1405
|
}
|
|
1364
1406
|
|
|
1365
|
-
var _excluded$
|
|
1366
|
-
|
|
1407
|
+
var _excluded$5 = ["children"];
|
|
1408
|
+
|
|
1409
|
+
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; }
|
|
1410
|
+
|
|
1411
|
+
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; }
|
|
1412
|
+
var ContentView$1 = /*#__PURE__*/styled$1(View).withConfig({
|
|
1367
1413
|
displayName: "ListItemContent__ContentView",
|
|
1368
1414
|
componentId: "kitt-universal__sc-57q0u9-0"
|
|
1369
1415
|
})(["flex:1 0 0%;align-self:center;"]);
|
|
1370
1416
|
function ListItemContent(_ref) {
|
|
1371
1417
|
var children = _ref.children,
|
|
1372
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
1418
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
1373
1419
|
|
|
1374
|
-
return /*#__PURE__*/
|
|
1420
|
+
return /*#__PURE__*/jsx(ContentView$1, _objectSpread$6(_objectSpread$6({}, rest), {}, {
|
|
1421
|
+
children: children
|
|
1422
|
+
}));
|
|
1375
1423
|
}
|
|
1376
1424
|
|
|
1377
|
-
var _excluded$
|
|
1425
|
+
var _excluded$4 = ["children", "side"],
|
|
1378
1426
|
_excluded2$1 = ["children", "align"];
|
|
1379
|
-
|
|
1427
|
+
|
|
1428
|
+
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; }
|
|
1429
|
+
|
|
1430
|
+
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; }
|
|
1431
|
+
var SideContainerView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1380
1432
|
displayName: "ListItemSideContent__SideContainerView",
|
|
1381
1433
|
componentId: "kitt-universal__sc-1vajiw-0"
|
|
1382
1434
|
})(["flex-direction:row;margin-left:", ";margin-right:", ";"], function (_ref) {
|
|
@@ -1393,13 +1445,15 @@ function ListItemSideContainer(_ref3) {
|
|
|
1393
1445
|
var children = _ref3.children,
|
|
1394
1446
|
_ref3$side = _ref3.side,
|
|
1395
1447
|
side = _ref3$side === void 0 ? 'left' : _ref3$side,
|
|
1396
|
-
rest = _objectWithoutProperties(_ref3, _excluded$
|
|
1448
|
+
rest = _objectWithoutProperties(_ref3, _excluded$4);
|
|
1397
1449
|
|
|
1398
|
-
return /*#__PURE__*/
|
|
1450
|
+
return /*#__PURE__*/jsx(SideContainerView, _objectSpread$5(_objectSpread$5({
|
|
1399
1451
|
side: side
|
|
1400
|
-
}, rest),
|
|
1452
|
+
}, rest), {}, {
|
|
1453
|
+
children: children
|
|
1454
|
+
}));
|
|
1401
1455
|
}
|
|
1402
|
-
var SideContentView = /*#__PURE__*/styled(
|
|
1456
|
+
var SideContentView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1403
1457
|
displayName: "ListItemSideContent__SideContentView",
|
|
1404
1458
|
componentId: "kitt-universal__sc-1vajiw-1"
|
|
1405
1459
|
})(["align-self:", ";"], function (_ref4) {
|
|
@@ -1412,17 +1466,19 @@ function ListItemSideContent(_ref5) {
|
|
|
1412
1466
|
align = _ref5$align === void 0 ? 'auto' : _ref5$align,
|
|
1413
1467
|
rest = _objectWithoutProperties(_ref5, _excluded2$1);
|
|
1414
1468
|
|
|
1415
|
-
return /*#__PURE__*/
|
|
1469
|
+
return /*#__PURE__*/jsx(SideContentView, _objectSpread$5(_objectSpread$5({
|
|
1416
1470
|
align: align
|
|
1417
|
-
}, rest),
|
|
1471
|
+
}, rest), {}, {
|
|
1472
|
+
children: children
|
|
1473
|
+
}));
|
|
1418
1474
|
}
|
|
1419
1475
|
|
|
1420
|
-
var _excluded$
|
|
1476
|
+
var _excluded$3 = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
1421
1477
|
|
|
1422
|
-
function ownKeys$
|
|
1478
|
+
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; }
|
|
1423
1479
|
|
|
1424
|
-
function _objectSpread$
|
|
1425
|
-
var ContainerView = /*#__PURE__*/styled(
|
|
1480
|
+
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; }
|
|
1481
|
+
var ContainerView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1426
1482
|
displayName: "ListItem__ContainerView",
|
|
1427
1483
|
componentId: "kitt-universal__sc-2afp9s-0"
|
|
1428
1484
|
})(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], function (_ref) {
|
|
@@ -1461,69 +1517,73 @@ function ListItem(_ref5) {
|
|
|
1461
1517
|
left = _ref5.left,
|
|
1462
1518
|
right = _ref5.right,
|
|
1463
1519
|
onPress = _ref5.onPress,
|
|
1464
|
-
rest = _objectWithoutProperties(_ref5, _excluded$
|
|
1520
|
+
rest = _objectWithoutProperties(_ref5, _excluded$3);
|
|
1465
1521
|
|
|
1466
|
-
var Wrapper = onPress ?
|
|
1467
|
-
var wrapperProps = onPress ? _objectSpread$
|
|
1522
|
+
var Wrapper = onPress ? Pressable : Fragment;
|
|
1523
|
+
var wrapperProps = onPress ? _objectSpread$4({
|
|
1468
1524
|
accessibilityRole: 'button',
|
|
1469
1525
|
onPress: onPress
|
|
1470
1526
|
}, rest) : undefined;
|
|
1471
1527
|
var containerProps = onPress ? undefined : rest;
|
|
1472
|
-
return /*#__PURE__*/
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1528
|
+
return /*#__PURE__*/jsx(Wrapper, _objectSpread$4(_objectSpread$4({}, wrapperProps), {}, {
|
|
1529
|
+
children: /*#__PURE__*/jsxs(ContainerView, _objectSpread$4(_objectSpread$4({
|
|
1530
|
+
withPadding: withPadding,
|
|
1531
|
+
borders: borders
|
|
1532
|
+
}, containerProps), {}, {
|
|
1533
|
+
children: [left ? /*#__PURE__*/jsx(ListItemSideContainer, {
|
|
1534
|
+
side: "left",
|
|
1535
|
+
children: left
|
|
1536
|
+
}) : null, /*#__PURE__*/jsx(ListItemContent, {
|
|
1537
|
+
children: children
|
|
1538
|
+
}), right ? /*#__PURE__*/jsx(ListItemSideContainer, {
|
|
1539
|
+
side: "right",
|
|
1540
|
+
children: right
|
|
1541
|
+
}) : null]
|
|
1542
|
+
}))
|
|
1543
|
+
}));
|
|
1480
1544
|
}
|
|
1481
1545
|
ListItem.Content = ListItemContent;
|
|
1482
1546
|
ListItem.SideContent = ListItemSideContent;
|
|
1483
1547
|
ListItem.SideContainer = ListItemSideContainer;
|
|
1484
1548
|
|
|
1485
|
-
var
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
componentId: "kitt-universal__sc-18y4z3t-2"
|
|
1500
|
-
})(["transform-origin:center center;"]);
|
|
1501
|
-
var LargeLoaderBaseCircle = /*#__PURE__*/styled.circle.withConfig({
|
|
1502
|
-
displayName: "LargeLoaderweb__LargeLoaderBaseCircle",
|
|
1503
|
-
componentId: "kitt-universal__sc-18y4z3t-3"
|
|
1504
|
-
})(["", " stroke:#ccc;animation:", " 1s cubic-bezier(0.39,0.575,0.565,1) 0.5s forwards;"], LargeLoaderCircleMixin, init);
|
|
1505
|
-
var LargeLoaderFillCircle = /*#__PURE__*/styled.circle.withConfig({
|
|
1506
|
-
displayName: "LargeLoaderweb__LargeLoaderFillCircle",
|
|
1507
|
-
componentId: "kitt-universal__sc-18y4z3t-4"
|
|
1508
|
-
})(["", " stroke:", ";animation:", " 1.8s cubic-bezier(0.39,0.575,0.565,1) 0.5s infinite alternate,", " 2.16s linear 0.5s infinite;"], LargeLoaderCircleMixin, function (_ref) {
|
|
1509
|
-
var theme = _ref.theme;
|
|
1510
|
-
return theme.kitt.colors.primary;
|
|
1511
|
-
}, offset, rotate);
|
|
1549
|
+
var LargeLoaderContainer = withTheme( /*#__PURE__*/styled("div")({
|
|
1550
|
+
name: "LargeLoaderContainer",
|
|
1551
|
+
"class": "l2im3sa",
|
|
1552
|
+
vars: {
|
|
1553
|
+
"l2im3sa-0": [function (_ref) {
|
|
1554
|
+
var theme = _ref.theme;
|
|
1555
|
+
return theme.kitt.colors.separator;
|
|
1556
|
+
}],
|
|
1557
|
+
"l2im3sa-1": [function (_ref2) {
|
|
1558
|
+
var theme = _ref2.theme;
|
|
1559
|
+
return theme.kitt.colors.primary;
|
|
1560
|
+
}]
|
|
1561
|
+
}
|
|
1562
|
+
}));
|
|
1512
1563
|
function LargeLoader() {
|
|
1513
|
-
return /*#__PURE__*/
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1564
|
+
return /*#__PURE__*/jsx(LargeLoaderContainer, {
|
|
1565
|
+
children: /*#__PURE__*/jsxs("svg", {
|
|
1566
|
+
width: "60",
|
|
1567
|
+
height: "60",
|
|
1568
|
+
children: [/*#__PURE__*/jsx("g", {
|
|
1569
|
+
"data-large-loader": "base",
|
|
1570
|
+
children: /*#__PURE__*/jsx("circle", {
|
|
1571
|
+
cx: "30",
|
|
1572
|
+
cy: "30",
|
|
1573
|
+
r: "27",
|
|
1574
|
+
fill: "none"
|
|
1575
|
+
})
|
|
1576
|
+
}), /*#__PURE__*/jsx("g", {
|
|
1577
|
+
"data-large-loader": "fill",
|
|
1578
|
+
children: /*#__PURE__*/jsx("circle", {
|
|
1579
|
+
cx: "30",
|
|
1580
|
+
cy: "30",
|
|
1581
|
+
r: "27",
|
|
1582
|
+
fill: "none"
|
|
1583
|
+
})
|
|
1584
|
+
})]
|
|
1585
|
+
})
|
|
1586
|
+
});
|
|
1527
1587
|
}
|
|
1528
1588
|
|
|
1529
1589
|
function Loader(_ref) {
|
|
@@ -1531,17 +1591,17 @@ function Loader(_ref) {
|
|
|
1531
1591
|
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
1532
1592
|
_ref$size = _ref.size,
|
|
1533
1593
|
size = _ref$size === void 0 ? 20 : _ref$size;
|
|
1534
|
-
return /*#__PURE__*/
|
|
1594
|
+
return /*#__PURE__*/jsx(TypographyIcon, {
|
|
1535
1595
|
spin: true,
|
|
1536
1596
|
color: color,
|
|
1537
1597
|
size: size,
|
|
1538
|
-
icon: /*#__PURE__*/
|
|
1598
|
+
icon: /*#__PURE__*/jsx(LoaderIcon, {})
|
|
1539
1599
|
});
|
|
1540
1600
|
}
|
|
1541
1601
|
|
|
1542
1602
|
var xIconSize = 14;
|
|
1543
1603
|
var mainIconSize = 20;
|
|
1544
|
-
var Container$1 = /*#__PURE__*/styled(
|
|
1604
|
+
var Container$1 = /*#__PURE__*/styled$1(View).withConfig({
|
|
1545
1605
|
displayName: "Message__Container",
|
|
1546
1606
|
componentId: "kitt-universal__sc-c6400e-0"
|
|
1547
1607
|
})(["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) {
|
|
@@ -1568,7 +1628,7 @@ var Container$1 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1568
1628
|
insets = _ref6.insets;
|
|
1569
1629
|
return ((_insets$top = insets === null || insets === void 0 ? void 0 : insets.top) !== null && _insets$top !== void 0 ? _insets$top : 0) + theme.kitt.spacing * 4;
|
|
1570
1630
|
});
|
|
1571
|
-
var CloseContainer = /*#__PURE__*/styled(TouchableOpacity).withConfig({
|
|
1631
|
+
var CloseContainer = /*#__PURE__*/styled$1(TouchableOpacity).withConfig({
|
|
1572
1632
|
displayName: "Message__CloseContainer",
|
|
1573
1633
|
componentId: "kitt-universal__sc-c6400e-1"
|
|
1574
1634
|
})(["margin-left:", "px;padding:", "px;"], function (_ref7) {
|
|
@@ -1578,14 +1638,14 @@ var CloseContainer = /*#__PURE__*/styled(TouchableOpacity).withConfig({
|
|
|
1578
1638
|
var theme = _ref8.theme;
|
|
1579
1639
|
return theme.kitt.spacing;
|
|
1580
1640
|
});
|
|
1581
|
-
var IconContainer = /*#__PURE__*/styled(
|
|
1641
|
+
var IconContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
1582
1642
|
displayName: "Message__IconContainer",
|
|
1583
1643
|
componentId: "kitt-universal__sc-c6400e-2"
|
|
1584
1644
|
})(["margin-right:", "px;"], function (_ref9) {
|
|
1585
1645
|
var theme = _ref9.theme;
|
|
1586
1646
|
return theme.kitt.spacing * 4;
|
|
1587
1647
|
});
|
|
1588
|
-
var Content = /*#__PURE__*/styled(
|
|
1648
|
+
var Content = /*#__PURE__*/styled$1(Text$1).withConfig({
|
|
1589
1649
|
displayName: "Message__Content",
|
|
1590
1650
|
componentId: "kitt-universal__sc-c6400e-3"
|
|
1591
1651
|
})(["text-align:", ";flex:1;"], function (_ref10) {
|
|
@@ -1610,16 +1670,16 @@ var getColorByType = function (type) {
|
|
|
1610
1670
|
function getIconContent(type) {
|
|
1611
1671
|
switch (type) {
|
|
1612
1672
|
case 'warning':
|
|
1613
|
-
return /*#__PURE__*/
|
|
1673
|
+
return /*#__PURE__*/jsx(AlertCircleIcon, {});
|
|
1614
1674
|
|
|
1615
1675
|
case 'success':
|
|
1616
|
-
return /*#__PURE__*/
|
|
1676
|
+
return /*#__PURE__*/jsx(CheckIcon, {});
|
|
1617
1677
|
|
|
1618
1678
|
case 'danger':
|
|
1619
|
-
return /*#__PURE__*/
|
|
1679
|
+
return /*#__PURE__*/jsx(AlertTriangleIcon, {});
|
|
1620
1680
|
|
|
1621
1681
|
default:
|
|
1622
|
-
return /*#__PURE__*/
|
|
1682
|
+
return /*#__PURE__*/jsx(InfoIcon, {});
|
|
1623
1683
|
}
|
|
1624
1684
|
}
|
|
1625
1685
|
|
|
@@ -1634,63 +1694,58 @@ function Message(_ref11) {
|
|
|
1634
1694
|
onDismiss = _ref11.onDismiss,
|
|
1635
1695
|
insets = _ref11.insets;
|
|
1636
1696
|
var color = getColorByType(type);
|
|
1637
|
-
return /*#__PURE__*/
|
|
1697
|
+
return /*#__PURE__*/jsxs(Container$1, {
|
|
1638
1698
|
type: type,
|
|
1639
1699
|
noRadius: noRadius,
|
|
1640
|
-
insets: insets
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1700
|
+
insets: insets,
|
|
1701
|
+
children: [!centeredText ? /*#__PURE__*/jsx(IconContainer, {
|
|
1702
|
+
children: /*#__PURE__*/jsx(Icon, {
|
|
1703
|
+
size: mainIconSize,
|
|
1704
|
+
color: color,
|
|
1705
|
+
icon: getIconContent(type)
|
|
1706
|
+
})
|
|
1707
|
+
}) : null, /*#__PURE__*/jsx(Content, {
|
|
1708
|
+
type: type,
|
|
1709
|
+
centeredText: centeredText,
|
|
1710
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
1711
|
+
base: "body-small",
|
|
1712
|
+
color: color,
|
|
1713
|
+
children: children
|
|
1714
|
+
})
|
|
1715
|
+
}), onDismiss ? /*#__PURE__*/jsx(CloseContainer, {
|
|
1716
|
+
onPress: onDismiss,
|
|
1717
|
+
children: /*#__PURE__*/jsx(Icon, {
|
|
1718
|
+
icon: /*#__PURE__*/jsx(XIcon, {}),
|
|
1719
|
+
size: xIconSize,
|
|
1720
|
+
color: color
|
|
1721
|
+
})
|
|
1722
|
+
}) : null]
|
|
1723
|
+
});
|
|
1658
1724
|
}
|
|
1659
1725
|
|
|
1660
|
-
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; }
|
|
1726
|
+
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; }
|
|
1661
1727
|
|
|
1662
|
-
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; }
|
|
1663
|
-
|
|
1728
|
+
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; }
|
|
1729
|
+
// Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
|
|
1730
|
+
var OverlayPressable = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
1664
1731
|
displayName: "Overlay__OverlayPressable",
|
|
1665
1732
|
componentId: "kitt-universal__sc-1cz1gbr-0"
|
|
1666
1733
|
})(function (_ref) {
|
|
1667
1734
|
var theme = _ref.theme;
|
|
1668
|
-
return _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {
|
|
1735
|
+
return _objectSpread$3(_objectSpread$3({}, StyleSheet.absoluteFillObject), {}, {
|
|
1669
1736
|
backgroundColor: theme.kitt.colors.overlay.dark
|
|
1670
1737
|
});
|
|
1671
1738
|
});
|
|
1672
1739
|
function Overlay(_ref2) {
|
|
1673
1740
|
var onPress = _ref2.onPress;
|
|
1674
|
-
return /*#__PURE__*/
|
|
1741
|
+
return /*#__PURE__*/jsx(OverlayPressable, {
|
|
1675
1742
|
accessibilityRole: "none",
|
|
1676
|
-
onPress: onPress
|
|
1677
|
-
|
|
1743
|
+
onPress: onPress,
|
|
1744
|
+
children: /*#__PURE__*/jsx(View, {})
|
|
1745
|
+
});
|
|
1678
1746
|
}
|
|
1679
1747
|
|
|
1680
|
-
var
|
|
1681
|
-
var PrimitiveScrollView = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1682
|
-
var contentContainerStyle = _ref.contentContainerStyle,
|
|
1683
|
-
children = _ref.children,
|
|
1684
|
-
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
1685
|
-
|
|
1686
|
-
return /*#__PURE__*/React.createElement(PrimitiveView, _extends({
|
|
1687
|
-
ref: ref
|
|
1688
|
-
}, props), /*#__PURE__*/React.createElement(PrimitiveView, {
|
|
1689
|
-
style: contentContainerStyle
|
|
1690
|
-
}, children));
|
|
1691
|
-
});
|
|
1692
|
-
|
|
1693
|
-
var BodyView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1748
|
+
var BodyView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1694
1749
|
displayName: "Body__BodyView",
|
|
1695
1750
|
componentId: "kitt-universal__sc-17fwpo4-0"
|
|
1696
1751
|
})(["padding:", "px ", "px;"], function (_ref) {
|
|
@@ -1702,10 +1757,14 @@ var BodyView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1702
1757
|
});
|
|
1703
1758
|
function ModalBody(_ref3) {
|
|
1704
1759
|
var children = _ref3.children;
|
|
1705
|
-
return /*#__PURE__*/
|
|
1760
|
+
return /*#__PURE__*/jsx(ScrollView, {
|
|
1761
|
+
children: /*#__PURE__*/jsx(BodyView, {
|
|
1762
|
+
children: children
|
|
1763
|
+
})
|
|
1764
|
+
});
|
|
1706
1765
|
}
|
|
1707
1766
|
|
|
1708
|
-
var FooterView = /*#__PURE__*/styled(
|
|
1767
|
+
var FooterView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1709
1768
|
displayName: "Footer__FooterView",
|
|
1710
1769
|
componentId: "kitt-universal__sc-1ujq2dc-0"
|
|
1711
1770
|
})(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], function (_ref) {
|
|
@@ -1717,12 +1776,14 @@ var FooterView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1717
1776
|
});
|
|
1718
1777
|
function ModalFooter(_ref3) {
|
|
1719
1778
|
var children = _ref3.children;
|
|
1720
|
-
return /*#__PURE__*/
|
|
1779
|
+
return /*#__PURE__*/jsx(FooterView, {
|
|
1780
|
+
children: children
|
|
1781
|
+
});
|
|
1721
1782
|
}
|
|
1722
1783
|
|
|
1723
1784
|
var OnCloseContext = /*#__PURE__*/createContext(function () {});
|
|
1724
1785
|
|
|
1725
|
-
var HeaderView = /*#__PURE__*/styled(
|
|
1786
|
+
var HeaderView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1726
1787
|
displayName: "Header__HeaderView",
|
|
1727
1788
|
componentId: "kitt-universal__sc-1iwabch-0"
|
|
1728
1789
|
})(["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) {
|
|
@@ -1732,21 +1793,21 @@ var HeaderView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1732
1793
|
var theme = _ref2.theme;
|
|
1733
1794
|
return theme.kitt.colors.separator;
|
|
1734
1795
|
});
|
|
1735
|
-
var LeftIconView = /*#__PURE__*/styled(
|
|
1796
|
+
var LeftIconView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1736
1797
|
displayName: "Header__LeftIconView",
|
|
1737
1798
|
componentId: "kitt-universal__sc-1iwabch-1"
|
|
1738
1799
|
})(["align-self:flex-start;margin-right:", "px;"], function (_ref3) {
|
|
1739
1800
|
var theme = _ref3.theme;
|
|
1740
1801
|
return theme.kitt.spacing * 2;
|
|
1741
1802
|
});
|
|
1742
|
-
var RightIconView = /*#__PURE__*/styled(
|
|
1803
|
+
var RightIconView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1743
1804
|
displayName: "Header__RightIconView",
|
|
1744
1805
|
componentId: "kitt-universal__sc-1iwabch-2"
|
|
1745
1806
|
})(["align-self:flex-start;margin-left:", "px;"], function (_ref4) {
|
|
1746
1807
|
var theme = _ref4.theme;
|
|
1747
1808
|
return theme.kitt.spacing * 2;
|
|
1748
1809
|
});
|
|
1749
|
-
var TitleView = /*#__PURE__*/styled(
|
|
1810
|
+
var TitleView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1750
1811
|
displayName: "Header__TitleView",
|
|
1751
1812
|
componentId: "kitt-universal__sc-1iwabch-3"
|
|
1752
1813
|
})(["padding-left:", "px;flex-shrink:1;"], function (_ref5) {
|
|
@@ -1760,16 +1821,23 @@ function ModalHeader(_ref6) {
|
|
|
1760
1821
|
children = _ref6.children;
|
|
1761
1822
|
var onClose = useContext(OnCloseContext);
|
|
1762
1823
|
var isIconLeft = !!left;
|
|
1763
|
-
return /*#__PURE__*/
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1824
|
+
return /*#__PURE__*/jsxs(HeaderView, {
|
|
1825
|
+
children: [isIconLeft && /*#__PURE__*/jsx(LeftIconView, {
|
|
1826
|
+
children: left
|
|
1827
|
+
}), /*#__PURE__*/jsx(TitleView, {
|
|
1828
|
+
isIconLeft: isIconLeft,
|
|
1829
|
+
children: children
|
|
1830
|
+
}), right !== undefined ? right : /*#__PURE__*/jsx(RightIconView, {
|
|
1831
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
1832
|
+
type: "subtle-dark",
|
|
1833
|
+
icon: /*#__PURE__*/jsx(XIcon, {}),
|
|
1834
|
+
onPress: onClose
|
|
1835
|
+
})
|
|
1836
|
+
})]
|
|
1837
|
+
});
|
|
1770
1838
|
}
|
|
1771
1839
|
|
|
1772
|
-
var ModalView = /*#__PURE__*/styled(
|
|
1840
|
+
var ModalView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1773
1841
|
displayName: "Modal__ModalView",
|
|
1774
1842
|
componentId: "kitt-universal__sc-1xy2w5u-0"
|
|
1775
1843
|
})(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], function (_ref) {
|
|
@@ -1779,7 +1847,7 @@ var ModalView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1779
1847
|
var theme = _ref2.theme;
|
|
1780
1848
|
return theme.kitt.spacing * 4;
|
|
1781
1849
|
});
|
|
1782
|
-
var ContentView = /*#__PURE__*/styled(
|
|
1850
|
+
var ContentView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1783
1851
|
displayName: "Modal__ContentView",
|
|
1784
1852
|
componentId: "kitt-universal__sc-1xy2w5u-1"
|
|
1785
1853
|
})(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", ";background-color:", ";"], function (_ref3) {
|
|
@@ -1795,18 +1863,24 @@ function Modal(_ref5) {
|
|
|
1795
1863
|
onClose = _ref5.onClose,
|
|
1796
1864
|
onEntered = _ref5.onEntered,
|
|
1797
1865
|
onExited = _ref5.onExited;
|
|
1798
|
-
return /*#__PURE__*/
|
|
1799
|
-
value: onClose
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1866
|
+
return /*#__PURE__*/jsx(OnCloseContext.Provider, {
|
|
1867
|
+
value: onClose,
|
|
1868
|
+
children: /*#__PURE__*/jsx(Modal$1, {
|
|
1869
|
+
transparent: true,
|
|
1870
|
+
animationType: "fade",
|
|
1871
|
+
visible: visible,
|
|
1872
|
+
onShow: onEntered,
|
|
1873
|
+
onDismiss: onExited,
|
|
1874
|
+
onRequestClose: onClose,
|
|
1875
|
+
children: /*#__PURE__*/jsxs(ModalView, {
|
|
1876
|
+
children: [/*#__PURE__*/jsx(Overlay, {
|
|
1877
|
+
onPress: onClose
|
|
1878
|
+
}), /*#__PURE__*/jsx(ContentView, {
|
|
1879
|
+
children: children
|
|
1880
|
+
})]
|
|
1881
|
+
})
|
|
1882
|
+
})
|
|
1883
|
+
});
|
|
1810
1884
|
}
|
|
1811
1885
|
Modal.Header = ModalHeader;
|
|
1812
1886
|
Modal.Body = ModalBody;
|
|
@@ -1821,56 +1895,19 @@ function Notification(_ref) {
|
|
|
1821
1895
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
1822
1896
|
top = _useSafeAreaInsets.top;
|
|
1823
1897
|
|
|
1824
|
-
return /*#__PURE__*/
|
|
1898
|
+
return /*#__PURE__*/jsx(Message, {
|
|
1825
1899
|
noRadius: true,
|
|
1826
1900
|
type: type,
|
|
1827
1901
|
centeredText: centeredText,
|
|
1828
1902
|
insets: {
|
|
1829
1903
|
top: top
|
|
1830
1904
|
},
|
|
1831
|
-
onDismiss: onDelete
|
|
1832
|
-
|
|
1905
|
+
onDismiss: onDelete,
|
|
1906
|
+
children: children
|
|
1907
|
+
});
|
|
1833
1908
|
}
|
|
1834
1909
|
|
|
1835
|
-
var
|
|
1836
|
-
var children = _ref.children,
|
|
1837
|
-
className = _ref.className,
|
|
1838
|
-
href = _ref.href,
|
|
1839
|
-
hrefAttrs = _ref.hrefAttrs,
|
|
1840
|
-
onPress = _ref.onPress;
|
|
1841
|
-
|
|
1842
|
-
if (href != null) {
|
|
1843
|
-
return /*#__PURE__*/React.createElement("a", _extends({
|
|
1844
|
-
ref: ref,
|
|
1845
|
-
href: href
|
|
1846
|
-
}, hrefAttrs, {
|
|
1847
|
-
className: className,
|
|
1848
|
-
onClick: createPressClickHandler(onPress),
|
|
1849
|
-
onKeyUp: createPressKeyUpHandler(onPress)
|
|
1850
|
-
}), children);
|
|
1851
|
-
}
|
|
1852
|
-
|
|
1853
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
1854
|
-
ref: ref,
|
|
1855
|
-
role: "button",
|
|
1856
|
-
className: className,
|
|
1857
|
-
tabIndex: onPress ? 0 : -1,
|
|
1858
|
-
onClick: createPressClickHandler(onPress),
|
|
1859
|
-
onKeyUp: createPressKeyUpHandler(onPress)
|
|
1860
|
-
}, children);
|
|
1861
|
-
});
|
|
1862
|
-
var PrimitiveLink = /*#__PURE__*/styled(PrimitiveLinkWithClassName).withConfig({
|
|
1863
|
-
displayName: "PrimitiveLinkweb__PrimitiveLink",
|
|
1864
|
-
componentId: "kitt-universal__sc-24w4og-0"
|
|
1865
|
-
})(["", " background-color:transparent;color:inherit;font:inherit !important;list-style:none;text-align:inherit;text-decoration:none;", ";", ";"], textResetMixin, function (_ref2) {
|
|
1866
|
-
var selectable = _ref2.selectable;
|
|
1867
|
-
return selectable == null ? undefined : "user-select: ".concat(selectable ? 'text' : 'none');
|
|
1868
|
-
}, function (_ref3) {
|
|
1869
|
-
var onPress = _ref3.onPress;
|
|
1870
|
-
return onPress ? 'cursor: pointer;' : undefined;
|
|
1871
|
-
});
|
|
1872
|
-
|
|
1873
|
-
var Flex = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1910
|
+
var Flex = /*#__PURE__*/styled$1(View).withConfig({
|
|
1874
1911
|
shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {
|
|
1875
1912
|
return !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop);
|
|
1876
1913
|
}
|
|
@@ -1927,7 +1964,7 @@ var useStoryBlockColor = function (color) {
|
|
|
1927
1964
|
var storyBlockColor = useContext(StoryBlockColorContext);
|
|
1928
1965
|
return color || storyBlockColor;
|
|
1929
1966
|
};
|
|
1930
|
-
var StyledStoryBlockView = /*#__PURE__*/styled(
|
|
1967
|
+
var StyledStoryBlockView = /*#__PURE__*/styled$1(View).withConfig({
|
|
1931
1968
|
displayName: "StoryBlock__StyledStoryBlockView",
|
|
1932
1969
|
componentId: "kitt-universal__sc-3w4hdm-0"
|
|
1933
1970
|
})(["padding:16px ", "px 0;margin:0 -", "px;background:", ";"], storyPadding, storyPadding, function (_ref) {
|
|
@@ -1938,20 +1975,23 @@ var StyledStoryBlockView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1938
1975
|
function StoryBlock(_ref2) {
|
|
1939
1976
|
var children = _ref2.children,
|
|
1940
1977
|
background = _ref2.background;
|
|
1941
|
-
return /*#__PURE__*/
|
|
1942
|
-
background: background
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1978
|
+
return /*#__PURE__*/jsx(StyledStoryBlockView, {
|
|
1979
|
+
background: background,
|
|
1980
|
+
children: /*#__PURE__*/jsx(StoryBlockColorContext.Provider, {
|
|
1981
|
+
value: getTypographyColorFromBlockColor(background),
|
|
1982
|
+
children: /*#__PURE__*/jsx(StoryBlockBackgroundContext.Provider, {
|
|
1983
|
+
value: background,
|
|
1984
|
+
children: children
|
|
1985
|
+
})
|
|
1986
|
+
})
|
|
1987
|
+
});
|
|
1948
1988
|
}
|
|
1949
1989
|
|
|
1950
|
-
var StoryTitleContainer = /*#__PURE__*/styled(
|
|
1990
|
+
var StoryTitleContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
1951
1991
|
displayName: "StoryTitle__StoryTitleContainer",
|
|
1952
1992
|
componentId: "kitt-universal__sc-sic7hb-0"
|
|
1953
1993
|
})(["margin-bottom:30px;"]);
|
|
1954
|
-
var StorySubTitleContainer = /*#__PURE__*/styled(
|
|
1994
|
+
var StorySubTitleContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
1955
1995
|
displayName: "StoryTitle__StorySubTitleContainer",
|
|
1956
1996
|
componentId: "kitt-universal__sc-sic7hb-1"
|
|
1957
1997
|
})(["margin-bottom:10px;"]);
|
|
@@ -1959,24 +1999,30 @@ function StoryTitle(_ref) {
|
|
|
1959
1999
|
var color = _ref.color,
|
|
1960
2000
|
children = _ref.children,
|
|
1961
2001
|
numberOfLines = _ref.numberOfLines;
|
|
1962
|
-
return /*#__PURE__*/
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
2002
|
+
return /*#__PURE__*/jsx(StoryTitleContainer, {
|
|
2003
|
+
children: /*#__PURE__*/jsx(Typography.Header1, {
|
|
2004
|
+
variant: "bold",
|
|
2005
|
+
base: "header1",
|
|
2006
|
+
color: useStoryBlockColor(color),
|
|
2007
|
+
numberOfLines: numberOfLines,
|
|
2008
|
+
children: children
|
|
2009
|
+
})
|
|
2010
|
+
});
|
|
1968
2011
|
}
|
|
1969
2012
|
|
|
1970
2013
|
function StoryTitleLevel2(_ref2) {
|
|
1971
2014
|
var color = _ref2.color,
|
|
1972
2015
|
children = _ref2.children,
|
|
1973
2016
|
numberOfLines = _ref2.numberOfLines;
|
|
1974
|
-
return /*#__PURE__*/
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
2017
|
+
return /*#__PURE__*/jsx(StoryTitleContainer, {
|
|
2018
|
+
children: /*#__PURE__*/jsx(Typography.Header2, {
|
|
2019
|
+
variant: "bold",
|
|
2020
|
+
base: "header2",
|
|
2021
|
+
color: useStoryBlockColor(color),
|
|
2022
|
+
numberOfLines: numberOfLines,
|
|
2023
|
+
children: children
|
|
2024
|
+
})
|
|
2025
|
+
});
|
|
1980
2026
|
}
|
|
1981
2027
|
|
|
1982
2028
|
StoryTitleLevel2.displayName = 'StoryTitle.Level2';
|
|
@@ -1985,13 +2031,16 @@ function StoryTitleLevel3(_ref3) {
|
|
|
1985
2031
|
var color = _ref3.color,
|
|
1986
2032
|
children = _ref3.children,
|
|
1987
2033
|
numberOfLines = _ref3.numberOfLines;
|
|
1988
|
-
return /*#__PURE__*/
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
2034
|
+
return /*#__PURE__*/jsx(StorySubTitleContainer, {
|
|
2035
|
+
children: /*#__PURE__*/jsx(Typography.Header3, {
|
|
2036
|
+
variant: "bold",
|
|
2037
|
+
base: "header3",
|
|
2038
|
+
medium: "header4",
|
|
2039
|
+
color: useStoryBlockColor(color),
|
|
2040
|
+
numberOfLines: numberOfLines,
|
|
2041
|
+
children: children
|
|
2042
|
+
})
|
|
2043
|
+
});
|
|
1995
2044
|
}
|
|
1996
2045
|
|
|
1997
2046
|
StoryTitleLevel3.displayName = 'StoryTitle.Level3';
|
|
@@ -2000,13 +2049,16 @@ function StoryTitleLevel4(_ref4) {
|
|
|
2000
2049
|
var color = _ref4.color,
|
|
2001
2050
|
children = _ref4.children,
|
|
2002
2051
|
numberOfLines = _ref4.numberOfLines;
|
|
2003
|
-
return /*#__PURE__*/
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2052
|
+
return /*#__PURE__*/jsx(StorySubTitleContainer, {
|
|
2053
|
+
children: /*#__PURE__*/jsx(Typography.Header4, {
|
|
2054
|
+
variant: "bold",
|
|
2055
|
+
base: "header4",
|
|
2056
|
+
medium: "header5",
|
|
2057
|
+
color: useStoryBlockColor(color),
|
|
2058
|
+
numberOfLines: numberOfLines,
|
|
2059
|
+
children: children
|
|
2060
|
+
})
|
|
2061
|
+
});
|
|
2010
2062
|
}
|
|
2011
2063
|
|
|
2012
2064
|
StoryTitleLevel4.displayName = 'StoryTitle.Level3';
|
|
@@ -2014,7 +2066,7 @@ StoryTitle.Level2 = StoryTitleLevel2;
|
|
|
2014
2066
|
StoryTitle.Level3 = StoryTitleLevel3;
|
|
2015
2067
|
StoryTitle.Level4 = StoryTitleLevel4;
|
|
2016
2068
|
|
|
2017
|
-
var StoryContainer$1 = /*#__PURE__*/styled(
|
|
2069
|
+
var StoryContainer$1 = /*#__PURE__*/styled$1(ScrollView).withConfig({
|
|
2018
2070
|
displayName: "Story__StoryContainer",
|
|
2019
2071
|
componentId: "kitt-universal__sc-1kwdg2p-0"
|
|
2020
2072
|
})(["padding:", "px;"], storyPadding);
|
|
@@ -2022,67 +2074,86 @@ function Story(_ref) {
|
|
|
2022
2074
|
var title = _ref.title,
|
|
2023
2075
|
contentContainerStyle = _ref.contentContainerStyle,
|
|
2024
2076
|
children = _ref.children;
|
|
2025
|
-
return /*#__PURE__*/
|
|
2026
|
-
contentContainerStyle: contentContainerStyle
|
|
2027
|
-
|
|
2077
|
+
return /*#__PURE__*/jsxs(StoryContainer$1, {
|
|
2078
|
+
contentContainerStyle: contentContainerStyle,
|
|
2079
|
+
children: [/*#__PURE__*/jsx(StoryTitle, {
|
|
2080
|
+
children: title
|
|
2081
|
+
}), children]
|
|
2082
|
+
});
|
|
2028
2083
|
}
|
|
2029
2084
|
|
|
2030
|
-
var _excluded$2 = ["title", "
|
|
2031
|
-
_excluded2 = ["title", "
|
|
2032
|
-
_excluded3 = ["title", "
|
|
2033
|
-
|
|
2085
|
+
var _excluded$2 = ["title", "children", "internalIsDemoSection"],
|
|
2086
|
+
_excluded2 = ["title", "children"],
|
|
2087
|
+
_excluded3 = ["title", "children"];
|
|
2088
|
+
|
|
2089
|
+
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; }
|
|
2090
|
+
|
|
2091
|
+
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; }
|
|
2092
|
+
var StyledSection = /*#__PURE__*/styled$1(View).withConfig({
|
|
2034
2093
|
displayName: "StorySection__StyledSection",
|
|
2035
2094
|
componentId: "kitt-universal__sc-1b3liv5-0"
|
|
2036
2095
|
})(["margin-bottom:32px;"]);
|
|
2037
2096
|
function StorySection(_ref) {
|
|
2038
|
-
var title = _ref.title
|
|
2039
|
-
_ref.
|
|
2040
|
-
var children = _ref.children,
|
|
2097
|
+
var title = _ref.title,
|
|
2098
|
+
children = _ref.children,
|
|
2041
2099
|
internalIsDemoSection = _ref.internalIsDemoSection,
|
|
2042
2100
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
2043
2101
|
|
|
2044
2102
|
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
2045
|
-
return /*#__PURE__*/
|
|
2103
|
+
return /*#__PURE__*/jsxs(StyledSection, _objectSpread$2(_objectSpread$2({}, props), {}, {
|
|
2104
|
+
children: [/*#__PURE__*/jsx(StoryTitle.Level2, {
|
|
2105
|
+
children: title
|
|
2106
|
+
}), children]
|
|
2107
|
+
}));
|
|
2046
2108
|
}
|
|
2047
|
-
var StyledSubSection = /*#__PURE__*/styled(
|
|
2109
|
+
var StyledSubSection = /*#__PURE__*/styled$1(View).withConfig({
|
|
2048
2110
|
displayName: "StorySection__StyledSubSection",
|
|
2049
2111
|
componentId: "kitt-universal__sc-1b3liv5-1"
|
|
2050
2112
|
})(["margin-bottom:16px;"]);
|
|
2051
2113
|
|
|
2052
2114
|
function SubSection(_ref2) {
|
|
2053
|
-
var title = _ref2.title
|
|
2054
|
-
_ref2.
|
|
2055
|
-
var children = _ref2.children,
|
|
2115
|
+
var title = _ref2.title,
|
|
2116
|
+
children = _ref2.children,
|
|
2056
2117
|
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
2057
2118
|
|
|
2058
|
-
return /*#__PURE__*/
|
|
2119
|
+
return /*#__PURE__*/jsxs(StyledSubSection, _objectSpread$2(_objectSpread$2({}, props), {}, {
|
|
2120
|
+
children: [/*#__PURE__*/jsx(StoryTitle.Level3, {
|
|
2121
|
+
children: title
|
|
2122
|
+
}), children]
|
|
2123
|
+
}));
|
|
2059
2124
|
}
|
|
2060
2125
|
|
|
2061
|
-
var StyledBlockSection = /*#__PURE__*/styled(
|
|
2126
|
+
var StyledBlockSection = /*#__PURE__*/styled$1(View).withConfig({
|
|
2062
2127
|
displayName: "StorySection__StyledBlockSection",
|
|
2063
2128
|
componentId: "kitt-universal__sc-1b3liv5-2"
|
|
2064
2129
|
})(["margin-bottom:16px;"]);
|
|
2065
2130
|
|
|
2066
2131
|
function BlockSection(_ref3) {
|
|
2067
|
-
var title = _ref3.title
|
|
2068
|
-
_ref3.
|
|
2069
|
-
var children = _ref3.children,
|
|
2132
|
+
var title = _ref3.title,
|
|
2133
|
+
children = _ref3.children,
|
|
2070
2134
|
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
2071
2135
|
|
|
2072
|
-
return /*#__PURE__*/
|
|
2136
|
+
return /*#__PURE__*/jsxs(StyledBlockSection, _objectSpread$2(_objectSpread$2({}, props), {}, {
|
|
2137
|
+
children: [/*#__PURE__*/jsx(StoryTitle.Level4, {
|
|
2138
|
+
children: title
|
|
2139
|
+
}), children]
|
|
2140
|
+
}));
|
|
2073
2141
|
}
|
|
2074
2142
|
|
|
2075
|
-
var StyledDemoSection = /*#__PURE__*/styled(
|
|
2143
|
+
var StyledDemoSection = /*#__PURE__*/styled$1(View).withConfig({
|
|
2076
2144
|
displayName: "StorySection__StyledDemoSection",
|
|
2077
2145
|
componentId: "kitt-universal__sc-1b3liv5-3"
|
|
2078
2146
|
})(["margin-bottom:64px;"]);
|
|
2079
2147
|
|
|
2080
2148
|
function DemoSection(_ref4) {
|
|
2081
2149
|
var children = _ref4.children;
|
|
2082
|
-
return /*#__PURE__*/
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2150
|
+
return /*#__PURE__*/jsx(StyledDemoSection, {
|
|
2151
|
+
children: /*#__PURE__*/jsx(StorySection, {
|
|
2152
|
+
internalIsDemoSection: true,
|
|
2153
|
+
title: "Demo",
|
|
2154
|
+
children: children
|
|
2155
|
+
})
|
|
2156
|
+
});
|
|
2086
2157
|
}
|
|
2087
2158
|
|
|
2088
2159
|
StorySection.SubSection = SubSection;
|
|
@@ -2101,33 +2172,36 @@ function StoryContainer(_ref) {
|
|
|
2101
2172
|
title = _ref.title,
|
|
2102
2173
|
platform = _ref.platform;
|
|
2103
2174
|
if (platform === 'native') return null;
|
|
2104
|
-
return /*#__PURE__*/
|
|
2175
|
+
return /*#__PURE__*/jsx(StorySection.BlockSection, {
|
|
2105
2176
|
testID: state,
|
|
2106
|
-
title: title
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2177
|
+
title: title,
|
|
2178
|
+
children: /*#__PURE__*/jsx("div", {
|
|
2179
|
+
className: state ? "kitt-".concat(state) : undefined,
|
|
2180
|
+
children: children
|
|
2181
|
+
})
|
|
2182
|
+
});
|
|
2110
2183
|
}
|
|
2111
2184
|
|
|
2112
2185
|
function StoryDecorator(storyFn, context) {
|
|
2113
|
-
return /*#__PURE__*/
|
|
2114
|
-
title: context.name
|
|
2115
|
-
|
|
2186
|
+
return /*#__PURE__*/jsx(Story, {
|
|
2187
|
+
title: context.name,
|
|
2188
|
+
children: storyFn()
|
|
2189
|
+
});
|
|
2116
2190
|
}
|
|
2117
2191
|
|
|
2118
|
-
var SmallScreenRow = /*#__PURE__*/styled(
|
|
2192
|
+
var SmallScreenRow = /*#__PURE__*/styled$1(View).withConfig({
|
|
2119
2193
|
displayName: "StoryGrid__SmallScreenRow",
|
|
2120
2194
|
componentId: "kitt-universal__sc-4z5new-0"
|
|
2121
2195
|
})(["flex-direction:column;margin:0;"]);
|
|
2122
|
-
var SmallScreenCol = /*#__PURE__*/styled(
|
|
2196
|
+
var SmallScreenCol = /*#__PURE__*/styled$1(View).withConfig({
|
|
2123
2197
|
displayName: "StoryGrid__SmallScreenCol",
|
|
2124
2198
|
componentId: "kitt-universal__sc-4z5new-1"
|
|
2125
2199
|
})(["padding:8px 0 16px;"]);
|
|
2126
|
-
var FlexRow = /*#__PURE__*/styled(
|
|
2200
|
+
var FlexRow = /*#__PURE__*/styled$1(View).withConfig({
|
|
2127
2201
|
displayName: "StoryGrid__FlexRow",
|
|
2128
2202
|
componentId: "kitt-universal__sc-4z5new-2"
|
|
2129
2203
|
})(["flex-direction:row;margin:0 -4px 16px;"]);
|
|
2130
|
-
var FlexCol = /*#__PURE__*/styled(
|
|
2204
|
+
var FlexCol = /*#__PURE__*/styled$1(View).withConfig({
|
|
2131
2205
|
displayName: "StoryGrid__FlexCol",
|
|
2132
2206
|
componentId: "kitt-universal__sc-4z5new-3"
|
|
2133
2207
|
})(["flex-grow:1;flex-basis:0;margin:0 8px;"]);
|
|
@@ -2145,14 +2219,22 @@ function StoryGridRow(_ref) {
|
|
|
2145
2219
|
var breakpointValue = breakpoint === 'small' ? 480 : 768;
|
|
2146
2220
|
|
|
2147
2221
|
if (width < breakpointValue) {
|
|
2148
|
-
return /*#__PURE__*/
|
|
2149
|
-
|
|
2150
|
-
|
|
2222
|
+
return /*#__PURE__*/jsx(SmallScreenRow, {
|
|
2223
|
+
children: Children.map(children, function (child) {
|
|
2224
|
+
return /*#__PURE__*/jsx(SmallScreenCol, {
|
|
2225
|
+
children: child
|
|
2226
|
+
});
|
|
2227
|
+
})
|
|
2228
|
+
});
|
|
2151
2229
|
}
|
|
2152
2230
|
|
|
2153
|
-
return /*#__PURE__*/
|
|
2154
|
-
|
|
2155
|
-
|
|
2231
|
+
return /*#__PURE__*/jsx(FlexRow, {
|
|
2232
|
+
children: Children.map(children, function (child) {
|
|
2233
|
+
return /*#__PURE__*/jsx(FlexCol, {
|
|
2234
|
+
children: child
|
|
2235
|
+
});
|
|
2236
|
+
})
|
|
2237
|
+
});
|
|
2156
2238
|
}
|
|
2157
2239
|
|
|
2158
2240
|
function StoryGridCol(_ref2) {
|
|
@@ -2166,10 +2248,13 @@ function StoryGridCol(_ref2) {
|
|
|
2166
2248
|
return null;
|
|
2167
2249
|
}
|
|
2168
2250
|
|
|
2169
|
-
return /*#__PURE__*/
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2251
|
+
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
2252
|
+
children: [title ? /*#__PURE__*/jsx(StoryTitle.Level4, {
|
|
2253
|
+
numberOfLines: 1,
|
|
2254
|
+
color: titleColor,
|
|
2255
|
+
children: title
|
|
2256
|
+
}) : null, children]
|
|
2257
|
+
});
|
|
2173
2258
|
}
|
|
2174
2259
|
|
|
2175
2260
|
var StoryGrid = {
|
|
@@ -2177,7 +2262,7 @@ var StoryGrid = {
|
|
|
2177
2262
|
Col: StoryGridCol
|
|
2178
2263
|
};
|
|
2179
2264
|
|
|
2180
|
-
var Container = /*#__PURE__*/styled(
|
|
2265
|
+
var Container = /*#__PURE__*/styled$1(View).withConfig({
|
|
2181
2266
|
displayName: "Tag__Container",
|
|
2182
2267
|
componentId: "kitt-universal__sc-19jmowi-0"
|
|
2183
2268
|
})(["background-color:", ";border-width:", ";border-color:", ";padding:", ";border-radius:", ";align-self:flex-start;"], function (_ref) {
|
|
@@ -2231,13 +2316,15 @@ function Tag(_ref6) {
|
|
|
2231
2316
|
type = _ref6$type === void 0 ? 'default' : _ref6$type,
|
|
2232
2317
|
_ref6$variant = _ref6.variant,
|
|
2233
2318
|
variant = _ref6$variant === void 0 ? 'fill' : _ref6$variant;
|
|
2234
|
-
return /*#__PURE__*/
|
|
2319
|
+
return /*#__PURE__*/jsx(Container, {
|
|
2235
2320
|
type: type,
|
|
2236
|
-
variant: variant
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2321
|
+
variant: variant,
|
|
2322
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
2323
|
+
base: "body-xsmall",
|
|
2324
|
+
color: getLabelColor(type, variant),
|
|
2325
|
+
children: label
|
|
2326
|
+
})
|
|
2327
|
+
});
|
|
2241
2328
|
}
|
|
2242
2329
|
|
|
2243
2330
|
var lateOceanColorPalette = {
|
|
@@ -2346,6 +2433,7 @@ var colorsLateOceanTheme = {
|
|
|
2346
2433
|
danger: lateOceanColorPalette.englishVermillon,
|
|
2347
2434
|
separator: lateOceanColorPalette.black100,
|
|
2348
2435
|
hover: lateOceanColorPalette.black100,
|
|
2436
|
+
black: lateOceanColorPalette.black1000,
|
|
2349
2437
|
uiBackground: lateOceanColorPalette.black25,
|
|
2350
2438
|
uiBackgroundLight: lateOceanColorPalette.white,
|
|
2351
2439
|
overlay: {
|
|
@@ -2531,6 +2619,15 @@ var tagLateOceanTheme = {
|
|
|
2531
2619
|
}
|
|
2532
2620
|
};
|
|
2533
2621
|
|
|
2622
|
+
var tooltip = {
|
|
2623
|
+
backgroundColor: colorsLateOceanTheme.black,
|
|
2624
|
+
borderRadius: 10,
|
|
2625
|
+
opacity: 0.95,
|
|
2626
|
+
horizontalPadding: 16,
|
|
2627
|
+
verticalPadding: 4,
|
|
2628
|
+
floatingPadding: 8
|
|
2629
|
+
};
|
|
2630
|
+
|
|
2534
2631
|
var calcLineHeight = function (fontSize, lineHeightMultiplier) {
|
|
2535
2632
|
return Math.round(fontSize * lineHeightMultiplier);
|
|
2536
2633
|
};
|
|
@@ -2647,50 +2744,319 @@ var theme = {
|
|
|
2647
2744
|
shadows: shadowsLateOceanTheme,
|
|
2648
2745
|
fullScreenModal: fullScreenModalLateOceanTheme,
|
|
2649
2746
|
iconButton: iconButton,
|
|
2650
|
-
listItem: listItemLateOceanTheme
|
|
2747
|
+
listItem: listItemLateOceanTheme,
|
|
2748
|
+
tooltip: tooltip
|
|
2651
2749
|
};
|
|
2652
2750
|
|
|
2653
|
-
function
|
|
2654
|
-
|
|
2655
|
-
|
|
2751
|
+
function TimePicker() {
|
|
2752
|
+
return /*#__PURE__*/jsx(Typography.Text, {
|
|
2753
|
+
base: "body",
|
|
2754
|
+
children: "TimePicker is not implemented for the web"
|
|
2755
|
+
});
|
|
2656
2756
|
}
|
|
2657
2757
|
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2758
|
+
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; }
|
|
2759
|
+
|
|
2760
|
+
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; }
|
|
2761
|
+
|
|
2762
|
+
var Arrow = function (props) {
|
|
2763
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$1(_objectSpread$1({}, props), {}, {
|
|
2764
|
+
children: /*#__PURE__*/jsx("path", {
|
|
2765
|
+
fillRule: "evenodd",
|
|
2766
|
+
clipRule: "evenodd",
|
|
2767
|
+
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",
|
|
2768
|
+
fill: "currentColor"
|
|
2769
|
+
})
|
|
2770
|
+
}));
|
|
2771
|
+
};
|
|
2772
|
+
|
|
2773
|
+
Arrow.defaultProps = {
|
|
2774
|
+
width: "36",
|
|
2775
|
+
height: "8",
|
|
2776
|
+
viewBox: "0 0 36 9",
|
|
2777
|
+
fill: "none",
|
|
2778
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2779
|
+
};
|
|
2780
|
+
var StyledTooltipView = /*#__PURE__*/styled$1(View).withConfig({
|
|
2781
|
+
displayName: "TooltipView__StyledTooltipView",
|
|
2782
|
+
componentId: "kitt-universal__sc-156zm6m-0"
|
|
2783
|
+
})(["align-items:center;"]);
|
|
2784
|
+
var StyledTooltipContent = /*#__PURE__*/styled$1(View).withConfig({
|
|
2785
|
+
displayName: "TooltipView__StyledTooltipContent",
|
|
2786
|
+
componentId: "kitt-universal__sc-156zm6m-1"
|
|
2787
|
+
})(["background-color:", ";border-radius:", "px;opacity:", ";padding:", ";"], function (_ref) {
|
|
2788
|
+
var theme = _ref.theme;
|
|
2789
|
+
return theme.kitt.tooltip.backgroundColor;
|
|
2790
|
+
}, function (_ref2) {
|
|
2791
|
+
var theme = _ref2.theme;
|
|
2792
|
+
return theme.kitt.tooltip.borderRadius;
|
|
2793
|
+
}, function (_ref3) {
|
|
2794
|
+
var theme = _ref3.theme;
|
|
2795
|
+
return theme.kitt.tooltip.opacity;
|
|
2796
|
+
}, function (_ref4) {
|
|
2797
|
+
var theme = _ref4.theme;
|
|
2798
|
+
return "".concat(theme.kitt.tooltip.verticalPadding, "px ").concat(theme.kitt.tooltip.horizontalPadding, "px");
|
|
2799
|
+
});
|
|
2800
|
+
|
|
2801
|
+
function ArrowView(props) {
|
|
2802
|
+
var theme = /*#__PURE__*/useTheme();
|
|
2803
|
+
return /*#__PURE__*/jsx(View, _objectSpread$1(_objectSpread$1({}, props), {}, {
|
|
2804
|
+
children: /*#__PURE__*/jsx(Arrow, {
|
|
2805
|
+
color: theme.kitt.tooltip.backgroundColor
|
|
2806
|
+
})
|
|
2807
|
+
}));
|
|
2808
|
+
}
|
|
2809
|
+
|
|
2810
|
+
var StyledArrow = /*#__PURE__*/styled$1(ArrowView).withConfig({
|
|
2811
|
+
displayName: "TooltipView__StyledArrow",
|
|
2812
|
+
componentId: "kitt-universal__sc-156zm6m-2"
|
|
2813
|
+
})(["color:", ";transform:", ";"], function (_ref5) {
|
|
2814
|
+
var theme = _ref5.theme;
|
|
2815
|
+
return theme.kitt.tooltip.backgroundColor;
|
|
2816
|
+
}, function (_ref6) {
|
|
2817
|
+
var $position = _ref6.$position;
|
|
2818
|
+
return "rotate(".concat($position === 'bottom' ? 180 : 0, "deg)");
|
|
2819
|
+
});
|
|
2820
|
+
function TooltipView(_ref7) {
|
|
2821
|
+
var children = _ref7.children,
|
|
2822
|
+
position = _ref7.position;
|
|
2823
|
+
return /*#__PURE__*/jsxs(StyledTooltipView, {
|
|
2824
|
+
children: [position === 'bottom' ? /*#__PURE__*/jsx(StyledArrow, {
|
|
2825
|
+
$position: position
|
|
2826
|
+
}) : null, /*#__PURE__*/jsx(StyledTooltipContent, {
|
|
2827
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
2828
|
+
base: "body",
|
|
2829
|
+
color: "white",
|
|
2830
|
+
children: children
|
|
2831
|
+
})
|
|
2832
|
+
}), position === 'top' ? /*#__PURE__*/jsx(StyledArrow, {
|
|
2833
|
+
$position: position
|
|
2834
|
+
}) : null]
|
|
2835
|
+
});
|
|
2836
|
+
}
|
|
2837
|
+
|
|
2838
|
+
var tooltipDefaultPosition = 'top';
|
|
2839
|
+
var tooltipDefaultFloatingStrategy = {
|
|
2840
|
+
web: 'absolute'
|
|
2841
|
+
};
|
|
2842
|
+
|
|
2843
|
+
var StyledTooltipTrigger = /*#__PURE__*/styled$1(Pressable).withConfig({
|
|
2844
|
+
displayName: "Tooltipweb__StyledTooltipTrigger",
|
|
2845
|
+
componentId: "kitt-universal__sc-zn1y6f-0"
|
|
2846
|
+
})(["display:inline-flex;align-self:baseline;"]);
|
|
2847
|
+
var WebAnimatedTooltip = /*#__PURE__*/styled$1(View).withConfig({
|
|
2848
|
+
displayName: "Tooltipweb__WebAnimatedTooltip",
|
|
2849
|
+
componentId: "kitt-universal__sc-zn1y6f-1"
|
|
2850
|
+
})(["opacity:", ";transition:opacity 200ms;visibility:", ";"], function (_ref) {
|
|
2851
|
+
var theme = _ref.theme,
|
|
2852
|
+
$visible = _ref.$visible;
|
|
2853
|
+
return $visible ? theme.kitt.tooltip.opacity : 0;
|
|
2854
|
+
}, function (_ref2) {
|
|
2855
|
+
var $visible = _ref2.$visible;
|
|
2856
|
+
return $visible ? 'visible' : 'hidden';
|
|
2857
|
+
});
|
|
2858
|
+
|
|
2859
|
+
function getActualPosition(originalPosition, offsetMiddlewareData) {
|
|
2860
|
+
if (!offsetMiddlewareData) return originalPosition;
|
|
2861
|
+
|
|
2862
|
+
if (originalPosition === 'top') {
|
|
2863
|
+
return offsetMiddlewareData.y > 0 ? 'bottom' : originalPosition;
|
|
2662
2864
|
}
|
|
2663
|
-
|
|
2865
|
+
|
|
2866
|
+
if (originalPosition === 'bottom') {
|
|
2867
|
+
return offsetMiddlewareData.y < 0 ? 'top' : originalPosition;
|
|
2868
|
+
}
|
|
2869
|
+
|
|
2870
|
+
return originalPosition;
|
|
2871
|
+
}
|
|
2872
|
+
|
|
2873
|
+
function Tooltip(_ref3) {
|
|
2874
|
+
var children = _ref3.children,
|
|
2875
|
+
defaultVisible = _ref3.defaultVisible,
|
|
2876
|
+
_ref3$position = _ref3.position,
|
|
2877
|
+
position = _ref3$position === void 0 ? tooltipDefaultPosition : _ref3$position,
|
|
2878
|
+
content = _ref3.content,
|
|
2879
|
+
_ref3$floatingStrateg = _ref3.floatingStrategy,
|
|
2880
|
+
floatingStrategy = _ref3$floatingStrateg === void 0 ? tooltipDefaultFloatingStrategy : _ref3$floatingStrateg,
|
|
2881
|
+
floatingPadding = _ref3.floatingPadding,
|
|
2882
|
+
onUpdate = _ref3.onUpdate;
|
|
2883
|
+
var theme = /*#__PURE__*/useTheme();
|
|
2884
|
+
var padding = floatingPadding || theme.kitt.tooltip.floatingPadding;
|
|
2885
|
+
|
|
2886
|
+
var _useState = useState(Boolean(defaultVisible)),
|
|
2887
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2888
|
+
visible = _useState2[0],
|
|
2889
|
+
setVisible = _useState2[1];
|
|
2890
|
+
|
|
2891
|
+
var _useFloating = useFloating({
|
|
2892
|
+
placement: position,
|
|
2893
|
+
strategy: floatingStrategy === null || floatingStrategy === void 0 ? void 0 : floatingStrategy.web,
|
|
2894
|
+
middleware: [offset(padding), shift(), flip()]
|
|
2895
|
+
}),
|
|
2896
|
+
x = _useFloating.x,
|
|
2897
|
+
y = _useFloating.y,
|
|
2898
|
+
reference = _useFloating.reference,
|
|
2899
|
+
floating = _useFloating.floating,
|
|
2900
|
+
strategy = _useFloating.strategy,
|
|
2901
|
+
update = _useFloating.update,
|
|
2902
|
+
refs = _useFloating.refs,
|
|
2903
|
+
middlewareData = _useFloating.middlewareData; // Update on scroll and resize for all relevant nodes
|
|
2904
|
+
|
|
2905
|
+
|
|
2906
|
+
useEffect(function () {
|
|
2907
|
+
if (!refs.reference.current || !refs.floating.current) {
|
|
2908
|
+
return function () {
|
|
2909
|
+
return undefined;
|
|
2910
|
+
};
|
|
2911
|
+
}
|
|
2912
|
+
|
|
2913
|
+
var parents = [].concat(_toConsumableArray(getScrollParents(refs.reference.current)), _toConsumableArray(getScrollParents(refs.floating.current)));
|
|
2914
|
+
parents.forEach(function (parent) {
|
|
2915
|
+
parent.addEventListener('scroll', update);
|
|
2916
|
+
parent.addEventListener('resize', update);
|
|
2917
|
+
});
|
|
2918
|
+
return function () {
|
|
2919
|
+
parents.forEach(function (parent) {
|
|
2920
|
+
parent.removeEventListener('scroll', update);
|
|
2921
|
+
parent.removeEventListener('resize', update);
|
|
2922
|
+
});
|
|
2923
|
+
};
|
|
2924
|
+
}, [refs.reference, refs.floating, update]);
|
|
2925
|
+
useEffect(function () {
|
|
2926
|
+
if (!onUpdate) return;
|
|
2927
|
+
onUpdate({
|
|
2928
|
+
x: x,
|
|
2929
|
+
y: y,
|
|
2930
|
+
reference: reference,
|
|
2931
|
+
floating: floating,
|
|
2932
|
+
strategy: strategy,
|
|
2933
|
+
update: update,
|
|
2934
|
+
refs: refs,
|
|
2935
|
+
middlewareData: middlewareData
|
|
2936
|
+
});
|
|
2937
|
+
}, [x, y, reference, floating, strategy, update, refs, middlewareData, onUpdate]);
|
|
2938
|
+
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
2939
|
+
children: [/*#__PURE__*/jsx(StyledTooltipTrigger, {
|
|
2940
|
+
ref: reference,
|
|
2941
|
+
accessibilityRole: "button",
|
|
2942
|
+
onPress: function onPress() {
|
|
2943
|
+
return setVisible(function (prev) {
|
|
2944
|
+
return !prev;
|
|
2945
|
+
});
|
|
2946
|
+
},
|
|
2947
|
+
onMouseEnter: function onMouseEnter() {
|
|
2948
|
+
setVisible(true);
|
|
2949
|
+
},
|
|
2950
|
+
onFocus: function onFocus() {
|
|
2951
|
+
setVisible(true);
|
|
2952
|
+
},
|
|
2953
|
+
children: children
|
|
2954
|
+
}), /*#__PURE__*/jsx(WebAnimatedTooltip, {
|
|
2955
|
+
ref: floating,
|
|
2956
|
+
$visible: visible,
|
|
2957
|
+
accessibilityHidden: !visible,
|
|
2958
|
+
style: {
|
|
2959
|
+
position: strategy,
|
|
2960
|
+
top: 0,
|
|
2961
|
+
left: 0,
|
|
2962
|
+
transform: [{
|
|
2963
|
+
// @ts-expect-error translate3d is missing in react-native definitions, only supported in web
|
|
2964
|
+
translate3d: "".concat(Math.round(x !== null && x !== void 0 ? x : 0), "px, ").concat(Math.round(y !== null && y !== void 0 ? y : 0), "px, 0")
|
|
2965
|
+
}]
|
|
2966
|
+
},
|
|
2967
|
+
children: /*#__PURE__*/jsx(TooltipView, {
|
|
2968
|
+
position: getActualPosition(position, middlewareData.offset),
|
|
2969
|
+
children: content
|
|
2970
|
+
})
|
|
2971
|
+
})]
|
|
2972
|
+
});
|
|
2973
|
+
}
|
|
2974
|
+
Tooltip.View = TooltipView;
|
|
2975
|
+
|
|
2976
|
+
var StyledTypographyEmoji = /*#__PURE__*/styled$1(Emoji).withConfig({
|
|
2977
|
+
displayName: "TypographyEmoji__StyledTypographyEmoji",
|
|
2978
|
+
componentId: "kitt-universal__sc-1if5guu-0"
|
|
2979
|
+
})(["align-self:center;", ""], function (_ref) {
|
|
2980
|
+
var size = _ref.size;
|
|
2981
|
+
|
|
2982
|
+
/* Style Twemoji: https://github.com/twitter/twemoji#inline-styles */
|
|
2983
|
+
return "\n margin: 0 ".concat(size / 20, "px 0 ").concat(size / 10, "px;\n transform: translateY(").concat(size / 10 * 2, "px);\n ");
|
|
2984
|
+
});
|
|
2985
|
+
function TypographyEmoji(_ref2) {
|
|
2986
|
+
var emoji = _ref2.emoji,
|
|
2987
|
+
base = _ref2.base,
|
|
2988
|
+
small = _ref2.small,
|
|
2989
|
+
medium = _ref2.medium,
|
|
2990
|
+
large = _ref2.large;
|
|
2991
|
+
var theme = /*#__PURE__*/useTheme();
|
|
2992
|
+
var typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(base, small, medium, large);
|
|
2993
|
+
var typeConfig = getTypographyTypeConfig(typeForCurrentWindowSize || 'body', theme);
|
|
2994
|
+
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
2995
|
+
var fontSize = typeConfig[typeConfigKey].fontSize;
|
|
2996
|
+
|
|
2997
|
+
if ((process.env.NODE_ENV !== "production")) {
|
|
2998
|
+
if (!fontSize.endsWith('px')) throw new Error("Unexpected font-size value: ".concat(fontSize));
|
|
2999
|
+
}
|
|
3000
|
+
|
|
3001
|
+
return /*#__PURE__*/jsx(StyledTypographyEmoji, {
|
|
3002
|
+
size: parseInt(fontSize.slice(0, -2), 10),
|
|
3003
|
+
emoji: emoji
|
|
3004
|
+
});
|
|
3005
|
+
}
|
|
3006
|
+
|
|
3007
|
+
var _excluded$1 = ["children", "disabled", "noUnderline", "href", "hrefAttrs", "onPress"];
|
|
3008
|
+
|
|
3009
|
+
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; }
|
|
3010
|
+
|
|
3011
|
+
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; }
|
|
3012
|
+
var TypographyLinkWebWrapper = withTheme( /*#__PURE__*/styled("span")({
|
|
3013
|
+
name: "TypographyLinkWebWrapper",
|
|
3014
|
+
"class": "tcwz3nt"
|
|
3015
|
+
}));
|
|
3016
|
+
var StyledLink = /*#__PURE__*/styled$1(Text$1).withConfig({
|
|
2664
3017
|
displayName: "TypographyLink__StyledLink",
|
|
2665
3018
|
componentId: "kitt-universal__sc-1o1zy30-0"
|
|
2666
|
-
})(["text-decoration:", ";", ""], function (_ref) {
|
|
2667
|
-
var noUnderline = _ref
|
|
2668
|
-
return noUnderline ? 'none' : 'underline';
|
|
3019
|
+
})(["text-decoration:", ";", ";", ";"], function (_ref) {
|
|
3020
|
+
var $noUnderline = _ref.$noUnderline;
|
|
3021
|
+
return $noUnderline ? 'none' : 'underline';
|
|
2669
3022
|
}, function (_ref2) {
|
|
2670
|
-
var disabled = _ref2
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
3023
|
+
var $disabled = _ref2.$disabled;
|
|
3024
|
+
return "\n text-decoration-color: inherit;\n transition: color 0.2s ease-in-out;\n cursor: ".concat($disabled ? 'not-allowed' : 'pointer', ";\n ");
|
|
3025
|
+
}, function (_ref3) {
|
|
3026
|
+
var $disabled = _ref3.$disabled,
|
|
3027
|
+
theme = _ref3.theme;
|
|
3028
|
+
if (!$disabled) return undefined;
|
|
3029
|
+
return "color: ".concat(theme.kitt.typography.link.disabledColor, ";");
|
|
2674
3030
|
});
|
|
2675
|
-
function TypographyLink(
|
|
2676
|
-
var children =
|
|
2677
|
-
disabled =
|
|
2678
|
-
noUnderline =
|
|
2679
|
-
href =
|
|
2680
|
-
hrefAttrs =
|
|
2681
|
-
onPress =
|
|
2682
|
-
otherProps = _objectWithoutProperties(
|
|
2683
|
-
|
|
2684
|
-
return /*#__PURE__*/
|
|
2685
|
-
accessibilityRole: "none"
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
3031
|
+
function TypographyLink(_ref4) {
|
|
3032
|
+
var children = _ref4.children,
|
|
3033
|
+
disabled = _ref4.disabled,
|
|
3034
|
+
noUnderline = _ref4.noUnderline,
|
|
3035
|
+
href = _ref4.href,
|
|
3036
|
+
hrefAttrs = _ref4.hrefAttrs,
|
|
3037
|
+
onPress = _ref4.onPress,
|
|
3038
|
+
otherProps = _objectWithoutProperties(_ref4, _excluded$1);
|
|
3039
|
+
|
|
3040
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
3041
|
+
accessibilityRole: "none",
|
|
3042
|
+
children: /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
3043
|
+
as: TypographyLinkWebWrapper,
|
|
3044
|
+
"data-nounderline": noUnderline,
|
|
3045
|
+
children: /*#__PURE__*/jsx(StyledLink, {
|
|
3046
|
+
$disabled: disabled,
|
|
3047
|
+
$noUnderline: noUnderline,
|
|
3048
|
+
href: href,
|
|
3049
|
+
hrefAttrs: hrefAttrs,
|
|
3050
|
+
accessibilityRole: "link",
|
|
3051
|
+
dataSet: {
|
|
3052
|
+
// remove data-kitt-universal when we delete kitt web. See See :global(a) in Link styles.module.css
|
|
3053
|
+
'kitt-universal': 'true'
|
|
3054
|
+
},
|
|
3055
|
+
onPress: disabled ? undefined : onPress,
|
|
3056
|
+
children: children
|
|
3057
|
+
})
|
|
3058
|
+
})
|
|
3059
|
+
}));
|
|
2694
3060
|
}
|
|
2695
3061
|
|
|
2696
3062
|
function matchWindowSize(currentWidth, _ref) {
|
|
@@ -2762,9 +3128,10 @@ function useKittTheme() {
|
|
|
2762
3128
|
function KittThemeProvider(_ref) {
|
|
2763
3129
|
var children = _ref.children;
|
|
2764
3130
|
var theme = useKittTheme();
|
|
2765
|
-
return /*#__PURE__*/
|
|
2766
|
-
theme: theme
|
|
2767
|
-
|
|
3131
|
+
return /*#__PURE__*/jsx(ThemeProvider, {
|
|
3132
|
+
theme: theme,
|
|
3133
|
+
children: children
|
|
3134
|
+
});
|
|
2768
3135
|
}
|
|
2769
3136
|
var KittThemeDecorator = makeDecorator({
|
|
2770
3137
|
name: 'ThemeDecorator',
|
|
@@ -2772,17 +3139,9 @@ var KittThemeDecorator = makeDecorator({
|
|
|
2772
3139
|
wrapper: function wrapper(storyFn, context, _ref2) {
|
|
2773
3140
|
_ref2.options;
|
|
2774
3141
|
_ref2.parameters;
|
|
2775
|
-
return /*#__PURE__*/
|
|
2776
|
-
|
|
2777
|
-
});
|
|
2778
|
-
|
|
2779
|
-
var SafeAreaProviderDecorator = makeDecorator({
|
|
2780
|
-
name: 'SafeAreaProviderDecorator',
|
|
2781
|
-
parameterName: 'safeAreaProvider',
|
|
2782
|
-
wrapper: function wrapper(storyFn, context, _ref) {
|
|
2783
|
-
_ref.options;
|
|
2784
|
-
_ref.parameters;
|
|
2785
|
-
return /*#__PURE__*/React.createElement(SafeAreaProvider, null, storyFn(context));
|
|
3142
|
+
return /*#__PURE__*/jsx(KittThemeProvider, {
|
|
3143
|
+
children: storyFn(context)
|
|
3144
|
+
});
|
|
2786
3145
|
}
|
|
2787
3146
|
});
|
|
2788
3147
|
|
|
@@ -2793,8 +3152,10 @@ function MatchWindowSize(_ref) {
|
|
|
2793
3152
|
|
|
2794
3153
|
var match = useMatchWindowSize(matchWindowSizeOptions);
|
|
2795
3154
|
if (!match) return null;
|
|
2796
|
-
return /*#__PURE__*/
|
|
3155
|
+
return /*#__PURE__*/jsx(Fragment$1, {
|
|
3156
|
+
children: children
|
|
3157
|
+
});
|
|
2797
3158
|
}
|
|
2798
3159
|
|
|
2799
|
-
export { Avatar, Button, Card, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputFeedback, InputField, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification,
|
|
3160
|
+
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 };
|
|
2800
3161
|
//# sourceMappingURL=index-browser-all.es.web.js.map
|