@ornikar/kitt-universal 1.0.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definitions/Avatar/Avatar.d.ts.map +1 -1
- package/dist/definitions/Button/Button.d.ts +1 -1
- package/dist/definitions/Button/Button.d.ts.map +1 -1
- package/dist/definitions/Button/ButtonContainer.d.ts +3 -3
- package/dist/definitions/Button/ButtonContainer.d.ts.map +1 -1
- package/dist/definitions/Button/ButtonContent.d.ts +2 -1
- package/dist/definitions/Button/ButtonContent.d.ts.map +1 -1
- package/dist/definitions/Card/Card.d.ts.map +1 -1
- package/dist/definitions/FullScreenModal/Body.d.ts.map +1 -1
- package/dist/definitions/FullScreenModal/FullScreenModal.d.ts.map +1 -1
- package/dist/definitions/FullScreenModal/Header.d.ts.map +1 -1
- package/dist/definitions/Icon/Icon.d.ts.map +1 -1
- package/dist/definitions/Icon/SpinningIcon.web.d.ts +2 -5
- package/dist/definitions/Icon/SpinningIcon.web.d.ts.map +1 -1
- package/dist/definitions/IconButton/IconButton.d.ts +11 -0
- package/dist/definitions/IconButton/IconButton.d.ts.map +1 -0
- package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts +13 -0
- package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts.map +1 -0
- package/dist/definitions/IconButton/PressableIconButton.d.ts +8 -0
- package/dist/definitions/IconButton/PressableIconButton.d.ts.map +1 -0
- package/dist/definitions/ListItem/ListItem.d.ts +5 -3
- 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 +4 -3
- package/dist/definitions/ListItem/ListItemSideContent.d.ts.map +1 -1
- package/dist/definitions/Loader/LargeLoader.web.d.ts.map +1 -1
- package/dist/definitions/Message/Message.d.ts.map +1 -1
- package/dist/definitions/Modal/Body.d.ts +2 -4
- package/dist/definitions/Modal/Body.d.ts.map +1 -1
- package/dist/definitions/Modal/Footer.d.ts.map +1 -1
- package/dist/definitions/Modal/Header.d.ts.map +1 -1
- package/dist/definitions/Modal/Modal.d.ts +2 -2
- package/dist/definitions/Modal/Modal.d.ts.map +1 -1
- package/dist/definitions/Overlay/Overlay.d.ts +2 -2
- package/dist/definitions/Overlay/Overlay.d.ts.map +1 -1
- package/dist/definitions/Tag/Tag.d.ts.map +1 -1
- package/dist/definitions/forms/InputField/InputField.d.ts.map +1 -1
- package/dist/definitions/forms/InputText/InputText.d.ts +0 -1
- package/dist/definitions/forms/InputText/InputText.d.ts.map +1 -1
- package/dist/definitions/forms/Radio/Radio.d.ts.map +1 -1
- package/dist/definitions/index.d.ts +15 -1
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/primitives/PrimitiveLink.d.ts +11 -0
- package/dist/definitions/primitives/PrimitiveLink.d.ts.map +1 -0
- package/dist/definitions/primitives/PrimitiveLink.web.d.ts +4 -0
- package/dist/definitions/primitives/PrimitiveLink.web.d.ts.map +1 -0
- package/dist/definitions/primitives/PrimitivePressable.d.ts +16 -0
- package/dist/definitions/primitives/PrimitivePressable.d.ts.map +1 -0
- package/dist/definitions/primitives/PrimitivePressable.web.d.ts +4 -0
- package/dist/definitions/primitives/PrimitivePressable.web.d.ts.map +1 -0
- package/dist/definitions/primitives/PrimitiveScrollView.d.ts +8 -0
- package/dist/definitions/primitives/PrimitiveScrollView.d.ts.map +1 -0
- package/dist/definitions/primitives/PrimitiveScrollView.web.d.ts +4 -0
- package/dist/definitions/primitives/PrimitiveScrollView.web.d.ts.map +1 -0
- package/dist/definitions/primitives/PrimitiveText.d.ts +14 -0
- package/dist/definitions/primitives/PrimitiveText.d.ts.map +1 -0
- package/dist/definitions/primitives/PrimitiveText.web.d.ts +6 -0
- package/dist/definitions/primitives/PrimitiveText.web.d.ts.map +1 -0
- package/dist/definitions/primitives/PrimitiveView.d.ts +21 -0
- package/dist/definitions/primitives/PrimitiveView.d.ts.map +1 -0
- package/dist/definitions/primitives/PrimitiveView.web.d.ts +23 -0
- package/dist/definitions/primitives/PrimitiveView.web.d.ts.map +1 -0
- package/dist/definitions/primitives/helpers.d.ts +7 -0
- package/dist/definitions/primitives/helpers.d.ts.map +1 -0
- package/dist/definitions/primitives/reset.d.ts +2 -0
- package/dist/definitions/primitives/reset.d.ts.map +1 -0
- package/dist/definitions/story-components/Flex.d.ts +9 -0
- package/dist/definitions/story-components/Flex.d.ts.map +1 -0
- package/dist/definitions/story-components/Story.d.ts.map +1 -1
- package/dist/definitions/story-components/StoryBlock.d.ts +11 -0
- package/dist/definitions/story-components/StoryBlock.d.ts.map +1 -0
- package/dist/definitions/story-components/StoryContainer.d.ts +9 -0
- package/dist/definitions/story-components/StoryContainer.d.ts.map +1 -0
- package/dist/definitions/story-components/StoryContainer.web.d.ts +4 -0
- package/dist/definitions/story-components/StoryContainer.web.d.ts.map +1 -0
- package/dist/definitions/story-components/StoryGrid.d.ts +2 -1
- package/dist/definitions/story-components/StoryGrid.d.ts.map +1 -1
- package/dist/definitions/story-components/StorySection.d.ts +23 -0
- package/dist/definitions/story-components/StorySection.d.ts.map +1 -0
- package/dist/definitions/story-components/StoryTitle.d.ts.map +1 -1
- package/dist/definitions/story-components/index.d.ts +10 -1
- package/dist/definitions/story-components/index.d.ts.map +1 -1
- package/dist/definitions/story-components/theme.d.ts +2 -0
- package/dist/definitions/story-components/theme.d.ts.map +1 -0
- package/dist/definitions/themes/default.d.ts +37 -6
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/buttonLateOceanTheme.d.ts +8 -0
- package/dist/definitions/themes/late-ocean/buttonLateOceanTheme.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/iconButton.d.ts +36 -0
- package/dist/definitions/themes/late-ocean/iconButton.d.ts.map +1 -0
- package/dist/definitions/themes/late-ocean/tagLateOceanTheme.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts +3 -6
- package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts.map +1 -1
- package/dist/definitions/themes/palettes/lateOceanColorPalette.d.ts +2 -0
- package/dist/definitions/themes/palettes/lateOceanColorPalette.d.ts.map +1 -1
- package/dist/definitions/typography/Typography.d.ts +11 -5
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/definitions/typography/TypographyLink.d.ts +6 -4
- package/dist/definitions/typography/TypographyLink.d.ts.map +1 -1
- package/dist/definitions/utils/tests/styled-component-typing-test.d.ts +18 -0
- package/dist/definitions/utils/tests/styled-component-typing-test.d.ts.map +1 -0
- package/dist/definitions/utils/windowSize/createWindowSizeHelper.d.ts +2 -2
- package/dist/index-browser-all.es.android.js +590 -158
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +590 -158
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +625 -149
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +735 -178
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +652 -137
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +12 -6
- package/dist/definitions/story-components/Section.d.ts +0 -18
- package/dist/definitions/story-components/Section.d.ts.map +0 -1
- package/dist/styles.css +0 -117
|
@@ -3,13 +3,17 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
import _taggedTemplateLiteral from '@babel/runtime/helpers/taggedTemplateLiteral';
|
|
4
4
|
import { UserIcon, EyeIcon, EyeOffIcon, XIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon } from '@ornikar/kitt-icons';
|
|
5
5
|
export * from '@ornikar/kitt-icons';
|
|
6
|
-
import React, { useRef, useEffect, useContext, createContext, useState, forwardRef, useMemo } from 'react';
|
|
7
|
-
import { Animated, Easing,
|
|
6
|
+
import React, { useRef, useEffect, useContext, createContext, useState, forwardRef, Fragment, useMemo } from 'react';
|
|
7
|
+
import { View, Animated, Easing, Text as Text$1, Image, Pressable, TextInput, useWindowDimensions, ActivityIndicator, TouchableOpacity, StyleSheet, ScrollView, Modal as Modal$1 } from 'react-native';
|
|
8
8
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
9
|
-
import styled, { useTheme, css } from 'styled-components
|
|
9
|
+
import styled, { useTheme, css, ThemeProvider } from 'styled-components';
|
|
10
10
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
11
|
-
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
11
|
+
import { useSafeAreaInsets, SafeAreaProvider } from 'react-native-safe-area-context';
|
|
12
|
+
import Animated$1, { useSharedValue, useAnimatedStyle, withSpring } from 'react-native-reanimated';
|
|
12
13
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
14
|
+
import { makeDecorator } from '@storybook/addons';
|
|
15
|
+
|
|
16
|
+
var PrimitiveView = View;
|
|
13
17
|
|
|
14
18
|
function SpinningIcon(_ref) {
|
|
15
19
|
var children = _ref.children;
|
|
@@ -42,8 +46,8 @@ function SpinningIcon(_ref) {
|
|
|
42
46
|
}, children);
|
|
43
47
|
}
|
|
44
48
|
|
|
45
|
-
var _templateObject$
|
|
46
|
-
var IconContainer$2 = styled
|
|
49
|
+
var _templateObject$u;
|
|
50
|
+
var IconContainer$2 = styled(PrimitiveView)(_templateObject$u || (_templateObject$u = _taggedTemplateLiteral(["\n color: ", ";\n width: ", "px;\n height: ", "px;\n align-self: ", ";\n"])), function (_ref) {
|
|
47
51
|
var color = _ref.color;
|
|
48
52
|
return color;
|
|
49
53
|
}, function (_ref2) {
|
|
@@ -74,15 +78,17 @@ function Icon(_ref5) {
|
|
|
74
78
|
}, spin ? /*#__PURE__*/React.createElement(SpinningIcon, null, clonedIcon) : clonedIcon);
|
|
75
79
|
}
|
|
76
80
|
|
|
81
|
+
var PrimitiveText = Text$1;
|
|
82
|
+
|
|
77
83
|
var _excluded$9 = ["accessibilityRole", "base", "variant", "color"];
|
|
78
84
|
|
|
79
|
-
var _templateObject$
|
|
85
|
+
var _templateObject$t;
|
|
80
86
|
var TypographyTypeContext = /*#__PURE__*/createContext(undefined);
|
|
81
87
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
82
88
|
function useTypographyColor() {
|
|
83
89
|
return useContext(TypographyColorContext);
|
|
84
90
|
}
|
|
85
|
-
var StyledTypography = styled
|
|
91
|
+
var StyledTypography = styled(PrimitiveText)(_templateObject$t || (_templateObject$t = _taggedTemplateLiteral(["\n /* font */\n ", "\n\n /* color */\n ", "\n"])), function (_ref) {
|
|
86
92
|
var theme = _ref.theme,
|
|
87
93
|
isHeader = _ref.isHeader,
|
|
88
94
|
type = _ref.type,
|
|
@@ -108,8 +114,8 @@ var isTypographyHeader = function (base, typeInContext) {
|
|
|
108
114
|
};
|
|
109
115
|
|
|
110
116
|
function Typography(_ref3) {
|
|
111
|
-
_ref3.accessibilityRole
|
|
112
|
-
|
|
117
|
+
var accessibilityRole = _ref3.accessibilityRole,
|
|
118
|
+
base = _ref3.base,
|
|
113
119
|
variant = _ref3.variant,
|
|
114
120
|
color = _ref3.color,
|
|
115
121
|
otherProps = _objectWithoutProperties(_ref3, _excluded$9);
|
|
@@ -127,11 +133,13 @@ function Typography(_ref3) {
|
|
|
127
133
|
color: colorWithDefaultToBlack,
|
|
128
134
|
isHeader: isHeader,
|
|
129
135
|
type: base,
|
|
130
|
-
variant: nonNullableVariant
|
|
136
|
+
variant: nonNullableVariant,
|
|
137
|
+
accessibilityRole: accessibilityRole || undefined
|
|
131
138
|
}, otherProps))) : /*#__PURE__*/React.createElement(StyledTypography, _extends({
|
|
132
139
|
color: colorWithDefaultToBlack,
|
|
133
140
|
isHeader: isHeader,
|
|
134
|
-
variant: nonNullableVariant
|
|
141
|
+
variant: nonNullableVariant,
|
|
142
|
+
accessibilityRole: accessibilityRole || undefined
|
|
135
143
|
}, otherProps));
|
|
136
144
|
return color ? /*#__PURE__*/React.createElement(TypographyColorContext.Provider, {
|
|
137
145
|
value: color
|
|
@@ -145,19 +153,19 @@ function TypographyText(props) {
|
|
|
145
153
|
}
|
|
146
154
|
|
|
147
155
|
function TypographyParagraph(props) {
|
|
148
|
-
// @ts-expect-error paragraph is not allowed in react-native but exists in react-native-web
|
|
149
156
|
return /*#__PURE__*/React.createElement(Typography, _extends({
|
|
150
157
|
accessibilityRole: "paragraph"
|
|
151
158
|
}, props));
|
|
152
159
|
}
|
|
153
160
|
|
|
154
|
-
var createHeading = function (level) {
|
|
161
|
+
var createHeading = function (level, defaultBase) {
|
|
155
162
|
// https://github.com/necolas/react-native-web/issues/401
|
|
156
163
|
function TypographyHeading(props) {
|
|
157
164
|
return /*#__PURE__*/React.createElement(Typography, _extends({
|
|
158
|
-
accessibilityRole: "header"
|
|
165
|
+
accessibilityRole: "header",
|
|
166
|
+
base: defaultBase
|
|
159
167
|
}, props, {
|
|
160
|
-
|
|
168
|
+
accessibilityLevel: level
|
|
161
169
|
}));
|
|
162
170
|
}
|
|
163
171
|
|
|
@@ -167,15 +175,31 @@ var createHeading = function (level) {
|
|
|
167
175
|
|
|
168
176
|
Typography.Text = TypographyText;
|
|
169
177
|
Typography.Paragraph = TypographyParagraph;
|
|
170
|
-
Typography.
|
|
171
|
-
Typography.
|
|
172
|
-
Typography.
|
|
173
|
-
Typography.
|
|
174
|
-
Typography.
|
|
178
|
+
Typography.Header1 = createHeading(1);
|
|
179
|
+
Typography.Header2 = createHeading(2);
|
|
180
|
+
Typography.Header3 = createHeading(3);
|
|
181
|
+
Typography.Header4 = createHeading(4);
|
|
182
|
+
Typography.Header5 = createHeading(5);
|
|
183
|
+
Typography.Header6 = createHeading(6);
|
|
184
|
+
/** @deprecated use Typography.Header1 */
|
|
185
|
+
|
|
186
|
+
Typography.h1 = createHeading(1, 'header1');
|
|
187
|
+
/** @deprecated use Typography.Header2 */
|
|
188
|
+
|
|
189
|
+
Typography.h2 = createHeading(2, 'header2');
|
|
190
|
+
/** @deprecated use Typography.Header3 */
|
|
191
|
+
|
|
192
|
+
Typography.h3 = createHeading(3, 'header3');
|
|
193
|
+
/** @deprecated use Typography.Header4 */
|
|
194
|
+
|
|
195
|
+
Typography.h4 = createHeading(4, 'header4');
|
|
196
|
+
/** @deprecated use Typography.Header6 */
|
|
197
|
+
|
|
198
|
+
Typography.h5 = createHeading(5, 'header5');
|
|
175
199
|
|
|
176
200
|
var _excluded$8 = ["size"];
|
|
177
201
|
|
|
178
|
-
var _templateObject$
|
|
202
|
+
var _templateObject$s;
|
|
179
203
|
|
|
180
204
|
var getFirstCharacter = function (string) {
|
|
181
205
|
return string ? string[0] : '';
|
|
@@ -185,7 +209,7 @@ var getInitials = function (firstname, lastname) {
|
|
|
185
209
|
return (getFirstCharacter(firstname) + getFirstCharacter(lastname)).toUpperCase();
|
|
186
210
|
};
|
|
187
211
|
|
|
188
|
-
var StyledAvatarView = styled
|
|
212
|
+
var StyledAvatarView = styled(PrimitiveView)(_templateObject$s || (_templateObject$s = _taggedTemplateLiteral(["\n border-radius: ", "px;\n background-color: ", ";\n height: ", "px;\n width: ", "px;\n overflow: hidden;\n align-items: center;\n justify-content: center;\n"])), function (_ref) {
|
|
189
213
|
var round = _ref.round,
|
|
190
214
|
size = _ref.size;
|
|
191
215
|
return round ? size / 2 : 10;
|
|
@@ -248,8 +272,10 @@ function Avatar(_ref6) {
|
|
|
248
272
|
})));
|
|
249
273
|
}
|
|
250
274
|
|
|
251
|
-
var
|
|
252
|
-
|
|
275
|
+
var PrimitivePressable = Pressable;
|
|
276
|
+
|
|
277
|
+
var _templateObject$r;
|
|
278
|
+
var ButtonContainer = styled(PrimitivePressable)(_templateObject$r || (_templateObject$r = _taggedTemplateLiteral(["\n min-width: ", ";\n max-width: ", ";\n width: ", ";\n min-height: ", ";\n background-color: ", ";\n padding: ", ";\n flex-direction: row;\n\n /* Emulate inline-* css display by making the button taking only its necessary space */\n align-self: flex-start;\n border-radius: ", ";\n border-color: ", ";\n border-width: ", ";\n"])), function (_ref) {
|
|
253
279
|
var theme = _ref.theme;
|
|
254
280
|
return theme.kitt.button.minWidth;
|
|
255
281
|
}, function (_ref2) {
|
|
@@ -323,7 +349,7 @@ function TypographyIcon(_ref2) {
|
|
|
323
349
|
return /*#__PURE__*/React.createElement(TypographyIconInheritColor, otherProps);
|
|
324
350
|
}
|
|
325
351
|
|
|
326
|
-
var _templateObject$
|
|
352
|
+
var _templateObject$q, _templateObject2$c, _templateObject3$8;
|
|
327
353
|
|
|
328
354
|
var getTextColorByType = function (type, isPressed, disabled) {
|
|
329
355
|
if (disabled) return 'black-light';
|
|
@@ -344,13 +370,13 @@ var getTextColorByType = function (type, isPressed, disabled) {
|
|
|
344
370
|
}
|
|
345
371
|
};
|
|
346
372
|
|
|
347
|
-
var ButtonText = styled(Typography.Text)(_templateObject$
|
|
348
|
-
var Content$1 = styled
|
|
373
|
+
var ButtonText = styled(Typography.Text)(_templateObject$q || (_templateObject$q = _taggedTemplateLiteral(["\n /* On native code, this is the only way to ensure that the text is centered */\n text-align: center;\n"])));
|
|
374
|
+
var Content$1 = styled(PrimitiveView)(_templateObject2$c || (_templateObject2$c = _taggedTemplateLiteral(["\n flex-direction: row;\n align-items: center;\n justify-content: center;\n\n /*\n On native code flex grow does not work as expected which cause an issue with the flex props.\n In order to occupy only the needed space, we enable flex grow only when stretched\n */\n flex: ", ";\n"])), function (_ref) {
|
|
349
375
|
var stretch = _ref.stretch,
|
|
350
376
|
iconOnly = _ref.iconOnly;
|
|
351
377
|
return "".concat(stretch || iconOnly ? 1 : 0, " 1 auto");
|
|
352
378
|
});
|
|
353
|
-
var IconContainer$1 = styled
|
|
379
|
+
var IconContainer$1 = styled(PrimitiveView)(_templateObject3$8 || (_templateObject3$8 = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref2) {
|
|
354
380
|
var theme = _ref2.theme,
|
|
355
381
|
iconPosition = _ref2.iconPosition;
|
|
356
382
|
var value = theme.kitt.spacing * 3;
|
|
@@ -397,7 +423,7 @@ function ButtonContent(_ref4) {
|
|
|
397
423
|
size: theme.kitt.button.iconSize
|
|
398
424
|
};
|
|
399
425
|
|
|
400
|
-
if (process.env.NODE_ENV !== "production") {
|
|
426
|
+
if ((process.env.NODE_ENV !== "production")) {
|
|
401
427
|
if (!(children || icon)) {
|
|
402
428
|
throw new Error('kitt(Button): You should provide at least a children or a icon');
|
|
403
429
|
}
|
|
@@ -485,8 +511,8 @@ function Button(_ref) {
|
|
|
485
511
|
}), children));
|
|
486
512
|
}
|
|
487
513
|
|
|
488
|
-
var _templateObject$
|
|
489
|
-
var Container$5 = styled
|
|
514
|
+
var _templateObject$p;
|
|
515
|
+
var Container$5 = styled(PrimitiveView)(_templateObject$p || (_templateObject$p = _taggedTemplateLiteral(["\n background-color: ", ";\n padding: ", ";\n border-radius: ", ";\n border-width: ", ";\n border-color: ", ";\n"])), function (_ref) {
|
|
490
516
|
var theme = _ref.theme,
|
|
491
517
|
type = _ref.type;
|
|
492
518
|
return theme.kitt.card[type].backgroundColor;
|
|
@@ -518,7 +544,7 @@ var getColorFromState = function (state) {
|
|
|
518
544
|
return 'danger';
|
|
519
545
|
|
|
520
546
|
default:
|
|
521
|
-
return '
|
|
547
|
+
return 'black-light';
|
|
522
548
|
}
|
|
523
549
|
};
|
|
524
550
|
|
|
@@ -581,19 +607,19 @@ var KittBreakpointsMax = {
|
|
|
581
607
|
LARGE: KittBreakpoints.WIDE - 1
|
|
582
608
|
};
|
|
583
609
|
|
|
584
|
-
var _templateObject$
|
|
585
|
-
var FieldContainer = styled
|
|
586
|
-
var FeedbackContainer = styled
|
|
610
|
+
var _templateObject$o, _templateObject2$b, _templateObject3$7, _templateObject4$6;
|
|
611
|
+
var FieldContainer = styled(PrimitiveView)(_templateObject$o || (_templateObject$o = _taggedTemplateLiteral(["\n padding: 5px 0 10px;\n"])));
|
|
612
|
+
var FeedbackContainer = styled(PrimitiveView)(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteral(["\n ", ";\n"])), function (_ref) {
|
|
587
613
|
var theme = _ref.theme;
|
|
588
614
|
return theme.responsive.ifWindowSizeMatches({
|
|
589
615
|
minWidth: KittBreakpoints.SMALL
|
|
590
616
|
}, 'padding-top: 10px', 'padding-top: 5px');
|
|
591
617
|
});
|
|
592
|
-
var FieldLabelContainer = styled
|
|
618
|
+
var FieldLabelContainer = styled(PrimitiveView)(_templateObject3$7 || (_templateObject3$7 = _taggedTemplateLiteral(["\n flex-direction: row;\n align-items: center;\n padding-bottom: ", "px;\n"])), function (_ref2) {
|
|
593
619
|
var theme = _ref2.theme;
|
|
594
620
|
return theme.kitt.forms.inputField.labelContainerPaddingBottom;
|
|
595
621
|
});
|
|
596
|
-
var LabelContainer = styled
|
|
622
|
+
var LabelContainer = styled(PrimitiveView)(_templateObject4$6 || (_templateObject4$6 = _taggedTemplateLiteral(["\n margin-right: ", "px;\n"])), function (_ref3) {
|
|
597
623
|
var theme = _ref3.theme;
|
|
598
624
|
return theme.kitt.forms.inputField.iconMarginLeft;
|
|
599
625
|
});
|
|
@@ -635,8 +661,8 @@ var useInputText = function () {
|
|
|
635
661
|
|
|
636
662
|
var _excluded$6 = ["id", "minHeight", "type", "state", "internalForceState", "disabled", "onFocus", "onBlur"];
|
|
637
663
|
|
|
638
|
-
var _templateObject$
|
|
639
|
-
var styledTextInputMixin = css(_templateObject$
|
|
664
|
+
var _templateObject$n, _templateObject2$a, _templateObject3$6, _templateObject4$5;
|
|
665
|
+
var styledTextInputMixin = css(_templateObject$n || (_templateObject$n = _taggedTemplateLiteral(["\n /* stylelint-disable declaration-property-value-allowed-list */\n background-color: ", ";\n border-width: ", ";\n border-radius: ", ";\n border-color: ", ";\n font-size: ", ";\n color: ", ";\n font-family: ", ";\n"])), function (_ref) {
|
|
640
666
|
var theme = _ref.theme,
|
|
641
667
|
state = _ref.state;
|
|
642
668
|
return state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states["default"].backgroundColor;
|
|
@@ -661,7 +687,7 @@ var styledTextInputMixin = css(_templateObject$i || (_templateObject$i = _tagged
|
|
|
661
687
|
var theme = _ref7.theme;
|
|
662
688
|
return theme.kitt.typography.types.bodies.fontFamily.regular;
|
|
663
689
|
});
|
|
664
|
-
var Input = styled
|
|
690
|
+
var Input = styled(TextInput)(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteral(["\n /* stylelint-disable declaration-bang-space-before */\n /* stylelint-disable comment-word-disallowed-list */\n\n /* FIXME: text input is not vertically centered on iOS because of bigger line-height */\n ", "\n padding: ", ";\n line-height: ", ";\n min-height: ", "px;\n"])), styledTextInputMixin, function (_ref8) {
|
|
665
691
|
var theme = _ref8.theme,
|
|
666
692
|
multiline = _ref8.multiline;
|
|
667
693
|
return !multiline && "ios" === 'ios' ? theme.kitt.forms.input.paddingSingleLineIOS : theme.kitt.forms.input.padding;
|
|
@@ -673,14 +699,14 @@ var Input = styled.TextInput(_templateObject2$9 || (_templateObject2$9 = _tagged
|
|
|
673
699
|
var minHeight = _ref10.minHeight;
|
|
674
700
|
return minHeight;
|
|
675
701
|
});
|
|
676
|
-
var Container$4 = styled
|
|
702
|
+
var Container$4 = styled(PrimitiveView)(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteral(["\n margin-top: ", ";\n margin-bottom: ", ";\n"])), function (_ref11) {
|
|
677
703
|
var theme = _ref11.theme;
|
|
678
704
|
return theme.kitt.forms.input.marginTop;
|
|
679
705
|
}, function (_ref12) {
|
|
680
706
|
var theme = _ref12.theme;
|
|
681
707
|
return theme.kitt.forms.input.marginBottom;
|
|
682
708
|
});
|
|
683
|
-
var PasswordButtonContainer = styled
|
|
709
|
+
var PasswordButtonContainer = styled(PrimitivePressable)(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteral(["\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n justify-content: center;\n padding: ", "px;\n"])), function (_ref13) {
|
|
684
710
|
var theme = _ref13.theme;
|
|
685
711
|
return theme.kitt.forms.input.passwordButtonIconSize / 2;
|
|
686
712
|
});
|
|
@@ -768,6 +794,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref15, ref) {
|
|
|
768
794
|
if (_onBlur) _onBlur(e);
|
|
769
795
|
}
|
|
770
796
|
})), type === 'password' && !disabled && /*#__PURE__*/React.createElement(PasswordButtonContainer, {
|
|
797
|
+
accessibilityRole: "button",
|
|
771
798
|
onPress: togglePasswordVisibility
|
|
772
799
|
}, /*#__PURE__*/React.createElement(TypographyIcon, {
|
|
773
800
|
icon: isPasswordVisible ? /*#__PURE__*/React.createElement(EyeIcon, null) : /*#__PURE__*/React.createElement(EyeOffIcon, null),
|
|
@@ -784,8 +811,8 @@ function Label(_ref) {
|
|
|
784
811
|
}, children);
|
|
785
812
|
}
|
|
786
813
|
|
|
787
|
-
var _templateObject$
|
|
788
|
-
var OuterRadio = styled
|
|
814
|
+
var _templateObject$m, _templateObject2$9, _templateObject3$5, _templateObject4$4, _templateObject5;
|
|
815
|
+
var OuterRadio = styled(PrimitiveView)(_templateObject$m || (_templateObject$m = _taggedTemplateLiteral(["\n background-color: ", ";\n width: ", "px;\n height: ", "px;\n border-radius: ", "px;\n border-width: ", ";\n border-color: ", ";\n"])), function (_ref) {
|
|
789
816
|
var theme = _ref.theme,
|
|
790
817
|
disabled = _ref.disabled;
|
|
791
818
|
return theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].backgroundColor;
|
|
@@ -806,7 +833,7 @@ var OuterRadio = styled.View(_templateObject$h || (_templateObject$h = _taggedTe
|
|
|
806
833
|
disabled = _ref6.disabled;
|
|
807
834
|
return theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].borderColor;
|
|
808
835
|
});
|
|
809
|
-
var SelectedOuterRadio = styled
|
|
836
|
+
var SelectedOuterRadio = styled(PrimitiveView)(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteral(["\n background-color: ", ";\n width: ", "px;\n height: ", "px;\n border-radius: ", "px;\n justify-content: center;\n align-items: center;\n"])), function (_ref7) {
|
|
810
837
|
var theme = _ref7.theme;
|
|
811
838
|
return theme.kitt.forms.radio.checked.backgroundColor;
|
|
812
839
|
}, function (_ref8) {
|
|
@@ -819,7 +846,7 @@ var SelectedOuterRadio = styled.View(_templateObject2$8 || (_templateObject2$8 =
|
|
|
819
846
|
var theme = _ref10.theme;
|
|
820
847
|
return theme.kitt.forms.radio.size / 2;
|
|
821
848
|
});
|
|
822
|
-
var SelectedInnerRadio = styled
|
|
849
|
+
var SelectedInnerRadio = styled(PrimitiveView)(_templateObject3$5 || (_templateObject3$5 = _taggedTemplateLiteral(["\n background-color: ", ";\n width: ", "px;\n height: ", "px;\n border-radius: ", "px;\n"])), function (_ref11) {
|
|
823
850
|
var theme = _ref11.theme;
|
|
824
851
|
return theme.kitt.forms.radio.checked.innerBackgroundColor;
|
|
825
852
|
}, function (_ref12) {
|
|
@@ -832,7 +859,7 @@ var SelectedInnerRadio = styled.View(_templateObject3$5 || (_templateObject3$5 =
|
|
|
832
859
|
var theme = _ref14.theme;
|
|
833
860
|
return theme.kitt.forms.radio.checked.innerSize / 2;
|
|
834
861
|
});
|
|
835
|
-
var Container$3 = styled
|
|
862
|
+
var Container$3 = styled(PrimitivePressable)(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteral(["\n flex-direction: row;\n align-items: center;\n"])));
|
|
836
863
|
var Text = styled(Typography.Text)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-left: ", "px;\n"])), function (_ref15) {
|
|
837
864
|
var theme = _ref15.theme;
|
|
838
865
|
return theme.kitt.spacing * 2;
|
|
@@ -850,7 +877,7 @@ function Radio(_ref16) {
|
|
|
850
877
|
disabled: disabled,
|
|
851
878
|
accessibilityRole: "radio",
|
|
852
879
|
"aria-checked": checked,
|
|
853
|
-
|
|
880
|
+
focusable: checked && !disabled,
|
|
854
881
|
onPress: function handlePress() {
|
|
855
882
|
onChange(value);
|
|
856
883
|
}
|
|
@@ -874,8 +901,8 @@ function TextArea(_ref) {
|
|
|
874
901
|
}));
|
|
875
902
|
}
|
|
876
903
|
|
|
877
|
-
var _templateObject$
|
|
878
|
-
var Body = styled
|
|
904
|
+
var _templateObject$l;
|
|
905
|
+
var Body = styled(PrimitiveView)(_templateObject$l || (_templateObject$l = _taggedTemplateLiteral(["\n ", "\n background-color: ", ";\n flex: 1;\n"])), function (_ref) {
|
|
879
906
|
var theme = _ref.theme;
|
|
880
907
|
return theme.responsive.ifWindowSizeMatches({
|
|
881
908
|
minWidth: KittBreakpoints.MEDIUM
|
|
@@ -889,8 +916,8 @@ function FullScreenModalBody(_ref3) {
|
|
|
889
916
|
return /*#__PURE__*/React.createElement(Body, null, children);
|
|
890
917
|
}
|
|
891
918
|
|
|
892
|
-
var _templateObject$
|
|
893
|
-
var SideContainer = styled
|
|
919
|
+
var _templateObject$k, _templateObject2$8, _templateObject3$4;
|
|
920
|
+
var SideContainer = styled(PrimitiveView)(_templateObject$k || (_templateObject$k = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref) {
|
|
894
921
|
var theme = _ref.theme,
|
|
895
922
|
_ref$side = _ref.side,
|
|
896
923
|
side = _ref$side === void 0 ? 'left' : _ref$side;
|
|
@@ -907,7 +934,7 @@ function getHeaderHorizontalMediumPadding(spacing) {
|
|
|
907
934
|
return spacing * 6;
|
|
908
935
|
}
|
|
909
936
|
|
|
910
|
-
var Header = styled
|
|
937
|
+
var Header = styled(PrimitiveView)(_templateObject2$8 || (_templateObject2$8 = _taggedTemplateLiteral(["\n ", ";\n border-bottom-color: ", ";\n border-bottom-width: 1px;\n flex-direction: row;\n align-items: center;\n"])), function (_ref2) {
|
|
911
938
|
var theme = _ref2.theme,
|
|
912
939
|
_ref2$insetTop = _ref2.insetTop,
|
|
913
940
|
insetTop = _ref2$insetTop === void 0 ? 0 : _ref2$insetTop;
|
|
@@ -922,7 +949,7 @@ var Header = styled.View(_templateObject2$7 || (_templateObject2$7 = _taggedTemp
|
|
|
922
949
|
var theme = _ref3.theme;
|
|
923
950
|
return theme.kitt.fullScreenModal.header.borderColor;
|
|
924
951
|
});
|
|
925
|
-
var HeaderContent = styled
|
|
952
|
+
var HeaderContent = styled(PrimitiveView)(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteral(["\n ", ";\n ", ";\n justify-content: center;\n align-items: center;\n"])), function (_ref4) {
|
|
926
953
|
var theme = _ref4.theme,
|
|
927
954
|
leftWidth = _ref4.leftWidth,
|
|
928
955
|
rightWidth = _ref4.rightWidth,
|
|
@@ -1005,8 +1032,8 @@ function FullScreenModalHeader(_ref6) {
|
|
|
1005
1032
|
}, right) : null);
|
|
1006
1033
|
}
|
|
1007
1034
|
|
|
1008
|
-
var _templateObject$
|
|
1009
|
-
var Container$2 = styled
|
|
1035
|
+
var _templateObject$j;
|
|
1036
|
+
var Container$2 = styled(PrimitiveView)(_templateObject$j || (_templateObject$j = _taggedTemplateLiteral(["\n flex: 1;\n background-color: ", ";\n"])), function (_ref) {
|
|
1010
1037
|
var theme = _ref.theme;
|
|
1011
1038
|
return theme.kitt.colors.uiBackground;
|
|
1012
1039
|
});
|
|
@@ -1017,10 +1044,187 @@ function FullScreenModal(_ref2) {
|
|
|
1017
1044
|
FullScreenModal.Header = FullScreenModalHeader;
|
|
1018
1045
|
FullScreenModal.Body = FullScreenModalBody;
|
|
1019
1046
|
|
|
1047
|
+
var _templateObject$i;
|
|
1048
|
+
var PressableIconButton = styled(PrimitivePressable)(_templateObject$i || (_templateObject$i = _taggedTemplateLiteral(["\n border-radius: ", "px;\n width: ", "px;\n height: ", "px;\n align-items: center;\n justify-content: center;\n position: relative;\n background-color: transparent;\n\n ", ";\n"])), function (_ref) {
|
|
1049
|
+
var theme = _ref.theme;
|
|
1050
|
+
return theme.kitt.iconButton.borderRadius;
|
|
1051
|
+
}, function (_ref2) {
|
|
1052
|
+
var theme = _ref2.theme;
|
|
1053
|
+
return theme.kitt.iconButton.width;
|
|
1054
|
+
}, function (_ref3) {
|
|
1055
|
+
var theme = _ref3.theme;
|
|
1056
|
+
return theme.kitt.iconButton.height;
|
|
1057
|
+
}, function (_ref4) {
|
|
1058
|
+
var theme = _ref4.theme;
|
|
1059
|
+
_ref4.color;
|
|
1060
|
+
_ref4.disabled;
|
|
1061
|
+
theme.kitt.iconButton;
|
|
1062
|
+
return undefined;
|
|
1063
|
+
});
|
|
1064
|
+
|
|
1065
|
+
var _templateObject$h, _templateObject2$7;
|
|
1066
|
+
|
|
1067
|
+
var AnimatedIconButtonBackground = styled(Animated$1.View)(_templateObject$h || (_templateObject$h = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", "px;\n width: ", "px;\n height: ", "px;\n position: absolute;\n bottom: 0;\n left: 0;\n"])), function (_ref2) {
|
|
1068
|
+
var theme = _ref2.theme,
|
|
1069
|
+
color = _ref2.color,
|
|
1070
|
+
disabled = _ref2.disabled;
|
|
1071
|
+
var iconButton = theme.kitt.iconButton;
|
|
1072
|
+
if (disabled) return iconButton.disabled.backgroundColor;
|
|
1073
|
+
if (color === 'white') return iconButton.white.pressedBackgroundColor;
|
|
1074
|
+
return iconButton["default"].pressedBackgroundColor;
|
|
1075
|
+
}, function (_ref3) {
|
|
1076
|
+
var theme = _ref3.theme;
|
|
1077
|
+
return theme.kitt.iconButton.borderRadius;
|
|
1078
|
+
}, function (_ref4) {
|
|
1079
|
+
var theme = _ref4.theme;
|
|
1080
|
+
return theme.kitt.iconButton.width;
|
|
1081
|
+
}, function (_ref5) {
|
|
1082
|
+
var theme = _ref5.theme;
|
|
1083
|
+
return theme.kitt.iconButton.height;
|
|
1084
|
+
});
|
|
1085
|
+
var AnimatedViewContainer = styled(Animated$1.View)(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n"])));
|
|
1086
|
+
|
|
1087
|
+
function NativeAnimatedContainer(_ref6) {
|
|
1088
|
+
var disabled = _ref6.disabled,
|
|
1089
|
+
_ref6$color = _ref6.color,
|
|
1090
|
+
color = _ref6$color === void 0 ? 'black' : _ref6$color,
|
|
1091
|
+
children = _ref6.children,
|
|
1092
|
+
onPress = _ref6.onPress;
|
|
1093
|
+
var theme = useTheme();
|
|
1094
|
+
var pressed = useSharedValue(false);
|
|
1095
|
+
var opacityStyles = useAnimatedStyle(function () {
|
|
1096
|
+
var _f = function () {
|
|
1097
|
+
return {
|
|
1098
|
+
opacity: withSpring(pressed.value ? 1 : 0)
|
|
1099
|
+
};
|
|
1100
|
+
};
|
|
1101
|
+
|
|
1102
|
+
_f._closure = {
|
|
1103
|
+
withSpring: withSpring,
|
|
1104
|
+
pressed: pressed
|
|
1105
|
+
};
|
|
1106
|
+
_f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
|
|
1107
|
+
_f.__workletHash = 10645190329247;
|
|
1108
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (64:41)";
|
|
1109
|
+
_f.__optimalization = 2;
|
|
1110
|
+
|
|
1111
|
+
global.__reanimatedWorkletInit(_f);
|
|
1112
|
+
|
|
1113
|
+
return _f;
|
|
1114
|
+
}());
|
|
1115
|
+
var scaleStyles = useAnimatedStyle(function () {
|
|
1116
|
+
var _f = function () {
|
|
1117
|
+
return {
|
|
1118
|
+
transform: [{
|
|
1119
|
+
scale: withSpring(pressed.value ? theme.kitt.iconButton.scale.base.active : theme.kitt.iconButton.scale.base["default"])
|
|
1120
|
+
}]
|
|
1121
|
+
};
|
|
1122
|
+
};
|
|
1123
|
+
|
|
1124
|
+
_f._closure = {
|
|
1125
|
+
withSpring: withSpring,
|
|
1126
|
+
pressed: pressed,
|
|
1127
|
+
theme: {
|
|
1128
|
+
kitt: {
|
|
1129
|
+
iconButton: {
|
|
1130
|
+
scale: {
|
|
1131
|
+
base: {
|
|
1132
|
+
active: theme.kitt.iconButton.scale.base.active,
|
|
1133
|
+
"default": theme.kitt.iconButton.scale.base["default"]
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
};
|
|
1140
|
+
_f.asString = "function _f(){const{withSpring,pressed,theme}=jsThis._closure;{return{transform:[{scale:withSpring(pressed.value?theme.kitt.iconButton.scale.base.active:theme.kitt.iconButton.scale.base.default)}]};}}";
|
|
1141
|
+
_f.__workletHash = 13861998831411;
|
|
1142
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (70:39)";
|
|
1143
|
+
_f.__optimalization = 2;
|
|
1144
|
+
|
|
1145
|
+
global.__reanimatedWorkletInit(_f);
|
|
1146
|
+
|
|
1147
|
+
return _f;
|
|
1148
|
+
}());
|
|
1149
|
+
return /*#__PURE__*/React.createElement(PressableIconButton, {
|
|
1150
|
+
accessibilityRole: "button",
|
|
1151
|
+
disabled: disabled,
|
|
1152
|
+
color: color,
|
|
1153
|
+
onPress: onPress,
|
|
1154
|
+
onPressIn: function onPressIn() {
|
|
1155
|
+
pressed.value = true;
|
|
1156
|
+
},
|
|
1157
|
+
onPressOut: function onPressOut() {
|
|
1158
|
+
pressed.value = false;
|
|
1159
|
+
}
|
|
1160
|
+
}, /*#__PURE__*/React.createElement(AnimatedViewContainer, {
|
|
1161
|
+
style: disabled ? [{
|
|
1162
|
+
transform: [{
|
|
1163
|
+
scale: 1
|
|
1164
|
+
}]
|
|
1165
|
+
}] : [scaleStyles]
|
|
1166
|
+
}, /*#__PURE__*/React.createElement(AnimatedIconButtonBackground, {
|
|
1167
|
+
disabled: disabled,
|
|
1168
|
+
color: color,
|
|
1169
|
+
style: disabled ? [{
|
|
1170
|
+
opacity: 1
|
|
1171
|
+
}] : [opacityStyles]
|
|
1172
|
+
}), children));
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
var PressableAnimatedContainer = NativeAnimatedContainer;
|
|
1176
|
+
|
|
1177
|
+
var _templateObject$g;
|
|
1178
|
+
var IconButtonContentBorder = styled(PrimitiveView)(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral(["\n border: ", ";\n border-color: ", ";\n width: ", "px;\n height: ", "px;\n align-items: center;\n justify-content: center;\n border-radius: ", "px;\n"])), function (_ref) {
|
|
1179
|
+
var theme = _ref.theme;
|
|
1180
|
+
return "".concat(theme.kitt.iconButton.borderWidth, "px solid");
|
|
1181
|
+
}, function (_ref2) {
|
|
1182
|
+
var theme = _ref2.theme,
|
|
1183
|
+
disabled = _ref2.disabled;
|
|
1184
|
+
return disabled ? theme.kitt.iconButton.disabled.borderColor : theme.kitt.iconButton.borderColor;
|
|
1185
|
+
}, function (_ref3) {
|
|
1186
|
+
var theme = _ref3.theme;
|
|
1187
|
+
return theme.kitt.iconButton.width - theme.kitt.iconButton.borderWidth;
|
|
1188
|
+
}, function (_ref4) {
|
|
1189
|
+
var theme = _ref4.theme;
|
|
1190
|
+
return theme.kitt.iconButton.height - theme.kitt.iconButton.borderWidth;
|
|
1191
|
+
}, function (_ref5) {
|
|
1192
|
+
var theme = _ref5.theme;
|
|
1193
|
+
return theme.kitt.iconButton.borderRadius;
|
|
1194
|
+
});
|
|
1195
|
+
|
|
1196
|
+
function IconButtonContent(_ref6) {
|
|
1197
|
+
var disabled = _ref6.disabled,
|
|
1198
|
+
color = _ref6.color,
|
|
1199
|
+
icon = _ref6.icon;
|
|
1200
|
+
return /*#__PURE__*/React.createElement(IconButtonContentBorder, {
|
|
1201
|
+
disabled: disabled
|
|
1202
|
+
}, /*#__PURE__*/React.createElement(TypographyIcon, {
|
|
1203
|
+
color: disabled ? 'black-light' : color,
|
|
1204
|
+
icon: icon
|
|
1205
|
+
}));
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
function IconButton(_ref7) {
|
|
1209
|
+
var icon = _ref7.icon,
|
|
1210
|
+
color = _ref7.color,
|
|
1211
|
+
disabled = _ref7.disabled,
|
|
1212
|
+
onPress = _ref7.onPress;
|
|
1213
|
+
return /*#__PURE__*/React.createElement(PressableAnimatedContainer, {
|
|
1214
|
+
color: color,
|
|
1215
|
+
disabled: disabled,
|
|
1216
|
+
onPress: onPress
|
|
1217
|
+
}, /*#__PURE__*/React.createElement(IconButtonContent, {
|
|
1218
|
+
disabled: disabled,
|
|
1219
|
+
color: color,
|
|
1220
|
+
icon: icon
|
|
1221
|
+
}));
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1020
1224
|
var _excluded$5 = ["children"];
|
|
1021
1225
|
|
|
1022
|
-
var _templateObject$
|
|
1023
|
-
var ContentView$1 = styled
|
|
1226
|
+
var _templateObject$f;
|
|
1227
|
+
var ContentView$1 = styled(PrimitiveView)(_templateObject$f || (_templateObject$f = _taggedTemplateLiteral(["\n flex: 1 0 0%;\n align-self: center;\n"])));
|
|
1024
1228
|
function ListItemContent(_ref) {
|
|
1025
1229
|
var children = _ref.children,
|
|
1026
1230
|
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
@@ -1031,8 +1235,8 @@ function ListItemContent(_ref) {
|
|
|
1031
1235
|
var _excluded$4 = ["children", "side"],
|
|
1032
1236
|
_excluded2$1 = ["children", "align"];
|
|
1033
1237
|
|
|
1034
|
-
var _templateObject$
|
|
1035
|
-
var SideContainerView = styled
|
|
1238
|
+
var _templateObject$e, _templateObject2$6;
|
|
1239
|
+
var SideContainerView = styled(PrimitiveView)(_templateObject$e || (_templateObject$e = _taggedTemplateLiteral(["\n flex-direction: row;\n margin-left: ", ";\n margin-right: ", ";\n"])), function (_ref) {
|
|
1036
1240
|
var theme = _ref.theme,
|
|
1037
1241
|
side = _ref.side;
|
|
1038
1242
|
return side === 'right' ? theme.kitt.listItem.innerMargin : 0;
|
|
@@ -1052,7 +1256,7 @@ function ListItemSideContainer(_ref3) {
|
|
|
1052
1256
|
side: side
|
|
1053
1257
|
}, rest), children);
|
|
1054
1258
|
}
|
|
1055
|
-
var SideContentView = styled
|
|
1259
|
+
var SideContentView = styled(PrimitiveView)(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteral(["\n align-self: ", ";\n"])), function (_ref4) {
|
|
1056
1260
|
var align = _ref4.align;
|
|
1057
1261
|
return align;
|
|
1058
1262
|
});
|
|
@@ -1067,10 +1271,14 @@ function ListItemSideContent(_ref5) {
|
|
|
1067
1271
|
}, rest), children);
|
|
1068
1272
|
}
|
|
1069
1273
|
|
|
1070
|
-
var _excluded$3 = ["children", "withPadding", "borders", "left", "right"];
|
|
1274
|
+
var _excluded$3 = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
1071
1275
|
|
|
1072
|
-
var _templateObject$
|
|
1073
|
-
|
|
1276
|
+
var _templateObject$d;
|
|
1277
|
+
|
|
1278
|
+
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
1279
|
+
|
|
1280
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
1281
|
+
var ContainerView = styled(PrimitiveView)(_templateObject$d || (_templateObject$d = _taggedTemplateLiteral(["\n flex-direction: row;\n padding: ", ";\n ", ";\n border-color: ", ";\n background-color: ", ";\n"])), function (_ref) {
|
|
1074
1282
|
var withPadding = _ref.withPadding,
|
|
1075
1283
|
theme = _ref.theme;
|
|
1076
1284
|
return withPadding ? theme.kitt.listItem.padding : 0;
|
|
@@ -1105,12 +1313,19 @@ function ListItem(_ref5) {
|
|
|
1105
1313
|
borders = _ref5.borders,
|
|
1106
1314
|
left = _ref5.left,
|
|
1107
1315
|
right = _ref5.right,
|
|
1316
|
+
onPress = _ref5.onPress,
|
|
1108
1317
|
rest = _objectWithoutProperties(_ref5, _excluded$3);
|
|
1109
1318
|
|
|
1110
|
-
|
|
1319
|
+
var Wrapper = onPress ? PrimitivePressable : Fragment;
|
|
1320
|
+
var wrapperProps = onPress ? _objectSpread$1({
|
|
1321
|
+
accessibilityRole: 'button',
|
|
1322
|
+
onPress: onPress
|
|
1323
|
+
}, rest) : undefined;
|
|
1324
|
+
var containerProps = onPress ? undefined : rest;
|
|
1325
|
+
return /*#__PURE__*/React.createElement(Wrapper, wrapperProps, /*#__PURE__*/React.createElement(ContainerView, _extends({
|
|
1111
1326
|
withPadding: withPadding,
|
|
1112
1327
|
borders: borders
|
|
1113
|
-
}, left ? /*#__PURE__*/React.createElement(ListItemSideContainer, {
|
|
1328
|
+
}, containerProps), left ? /*#__PURE__*/React.createElement(ListItemSideContainer, {
|
|
1114
1329
|
side: "left"
|
|
1115
1330
|
}, left) : null, /*#__PURE__*/React.createElement(ListItemContent, null, children), right ? /*#__PURE__*/React.createElement(ListItemSideContainer, {
|
|
1116
1331
|
side: "right"
|
|
@@ -1147,10 +1362,10 @@ function LargeLoader(_ref) {
|
|
|
1147
1362
|
});
|
|
1148
1363
|
}
|
|
1149
1364
|
|
|
1150
|
-
var _templateObject$
|
|
1365
|
+
var _templateObject$c, _templateObject2$5, _templateObject3$3, _templateObject4$3;
|
|
1151
1366
|
var xIconSize = 14;
|
|
1152
1367
|
var mainIconSize = 20;
|
|
1153
|
-
var Container$1 = styled
|
|
1368
|
+
var Container$1 = styled(PrimitiveView)(_templateObject$c || (_templateObject$c = _taggedTemplateLiteral(["\n border-radius: ", "px;\n background-color: ", ";\n padding-bottom: ", "px;\n padding-left: ", "px;\n padding-right: ", "px;\n padding-top: ", "px;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n"])), function (_ref) {
|
|
1154
1369
|
var theme = _ref.theme,
|
|
1155
1370
|
noRadius = _ref.noRadius;
|
|
1156
1371
|
return noRadius ? 0 : theme.kitt.spacing * 5;
|
|
@@ -1174,18 +1389,18 @@ var Container$1 = styled.View(_templateObject$a || (_templateObject$a = _taggedT
|
|
|
1174
1389
|
insets = _ref6.insets;
|
|
1175
1390
|
return ((_insets$top = insets === null || insets === void 0 ? void 0 : insets.top) !== null && _insets$top !== void 0 ? _insets$top : 0) + theme.kitt.spacing * 4;
|
|
1176
1391
|
});
|
|
1177
|
-
var CloseContainer = styled
|
|
1392
|
+
var CloseContainer = styled(TouchableOpacity)(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteral(["\n margin-left: ", "px;\n padding: ", "px;\n"])), function (_ref7) {
|
|
1178
1393
|
var theme = _ref7.theme;
|
|
1179
1394
|
return theme.kitt.spacing * 4;
|
|
1180
1395
|
}, function (_ref8) {
|
|
1181
1396
|
var theme = _ref8.theme;
|
|
1182
1397
|
return theme.kitt.spacing;
|
|
1183
1398
|
});
|
|
1184
|
-
var IconContainer = styled
|
|
1399
|
+
var IconContainer = styled(PrimitiveView)(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteral(["\n margin-right: ", "px;\n"])), function (_ref9) {
|
|
1185
1400
|
var theme = _ref9.theme;
|
|
1186
1401
|
return theme.kitt.spacing * 4;
|
|
1187
1402
|
});
|
|
1188
|
-
var Content = styled
|
|
1403
|
+
var Content = styled(PrimitiveText)(_templateObject4$3 || (_templateObject4$3 = _taggedTemplateLiteral(["\n text-align: ", ";\n flex: 1;\n"])), function (_ref10) {
|
|
1189
1404
|
var centeredText = _ref10.centeredText;
|
|
1190
1405
|
return centeredText ? 'center' : 'left';
|
|
1191
1406
|
});
|
|
@@ -1257,7 +1472,7 @@ function Message(_ref11) {
|
|
|
1257
1472
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
1258
1473
|
|
|
1259
1474
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
1260
|
-
var OverlayPressable = styled
|
|
1475
|
+
var OverlayPressable = styled(PrimitivePressable)(function (_ref) {
|
|
1261
1476
|
var theme = _ref.theme;
|
|
1262
1477
|
return _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {
|
|
1263
1478
|
backgroundColor: theme.kitt.colors.overlay.dark
|
|
@@ -1266,27 +1481,28 @@ var OverlayPressable = styled.Pressable(function (_ref) {
|
|
|
1266
1481
|
function Overlay(_ref2) {
|
|
1267
1482
|
var onPress = _ref2.onPress;
|
|
1268
1483
|
return /*#__PURE__*/React.createElement(OverlayPressable, {
|
|
1484
|
+
accessibilityRole: "none",
|
|
1269
1485
|
onPress: onPress
|
|
1270
|
-
}, /*#__PURE__*/React.createElement(
|
|
1486
|
+
}, /*#__PURE__*/React.createElement(PrimitiveView, null));
|
|
1271
1487
|
}
|
|
1272
1488
|
|
|
1273
|
-
var
|
|
1274
|
-
|
|
1489
|
+
var PrimitiveScrollView = ScrollView;
|
|
1490
|
+
|
|
1491
|
+
var _templateObject$b;
|
|
1492
|
+
var BodyView = styled(PrimitiveView)(_templateObject$b || (_templateObject$b = _taggedTemplateLiteral(["\n padding: ", "px ", "px;\n"])), function (_ref) {
|
|
1275
1493
|
var theme = _ref.theme;
|
|
1276
1494
|
return theme.kitt.spacing * 6;
|
|
1277
1495
|
}, function (_ref2) {
|
|
1278
1496
|
var theme = _ref2.theme;
|
|
1279
1497
|
return theme.kitt.spacing * 4;
|
|
1280
1498
|
});
|
|
1281
|
-
|
|
1499
|
+
function ModalBody(_ref3) {
|
|
1282
1500
|
var children = _ref3.children;
|
|
1283
|
-
return /*#__PURE__*/React.createElement(
|
|
1284
|
-
|
|
1285
|
-
}, /*#__PURE__*/React.createElement(BodyView, null, children));
|
|
1286
|
-
});
|
|
1501
|
+
return /*#__PURE__*/React.createElement(PrimitiveScrollView, null, /*#__PURE__*/React.createElement(BodyView, null, children));
|
|
1502
|
+
}
|
|
1287
1503
|
|
|
1288
|
-
var _templateObject$
|
|
1289
|
-
var FooterView = styled
|
|
1504
|
+
var _templateObject$a;
|
|
1505
|
+
var FooterView = styled(PrimitiveView)(_templateObject$a || (_templateObject$a = _taggedTemplateLiteral(["\n flex: 0 0 auto;\n padding: ", "px;\n border-top-width: 1px;\n border-top-color: ", ";\n"])), function (_ref) {
|
|
1290
1506
|
var theme = _ref.theme;
|
|
1291
1507
|
return theme.kitt.spacing * 4;
|
|
1292
1508
|
}, function (_ref2) {
|
|
@@ -1300,23 +1516,23 @@ function ModalFooter(_ref3) {
|
|
|
1300
1516
|
|
|
1301
1517
|
var OnCloseContext = /*#__PURE__*/createContext(function () {});
|
|
1302
1518
|
|
|
1303
|
-
var _templateObject$
|
|
1304
|
-
var HeaderView = styled
|
|
1519
|
+
var _templateObject$9, _templateObject2$4, _templateObject3$2, _templateObject4$2;
|
|
1520
|
+
var HeaderView = styled(PrimitiveView)(_templateObject$9 || (_templateObject$9 = _taggedTemplateLiteral(["\n position: relative;\n padding: ", "px;\n display: flex;\n flex: 0 0 auto;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n border-bottom-width: 1px;\n border-bottom-color: ", ";\n min-height: 57px;\n"])), function (_ref) {
|
|
1305
1521
|
var theme = _ref.theme;
|
|
1306
1522
|
return theme.kitt.spacing * 2;
|
|
1307
1523
|
}, function (_ref2) {
|
|
1308
1524
|
var theme = _ref2.theme;
|
|
1309
1525
|
return theme.kitt.colors.separator;
|
|
1310
1526
|
});
|
|
1311
|
-
var LeftIconView = styled
|
|
1527
|
+
var LeftIconView = styled(PrimitiveView)(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteral(["\n align-self: flex-start;\n margin-right: ", "px;\n"])), function (_ref3) {
|
|
1312
1528
|
var theme = _ref3.theme;
|
|
1313
1529
|
return theme.kitt.spacing * 2;
|
|
1314
1530
|
});
|
|
1315
|
-
var RightIconView = styled
|
|
1531
|
+
var RightIconView = styled(PrimitiveView)(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteral(["\n align-self: flex-start;\n margin-left: ", "px;\n"])), function (_ref4) {
|
|
1316
1532
|
var theme = _ref4.theme;
|
|
1317
1533
|
return theme.kitt.spacing * 2;
|
|
1318
1534
|
});
|
|
1319
|
-
var TitleView = styled
|
|
1535
|
+
var TitleView = styled(PrimitiveView)(_templateObject4$2 || (_templateObject4$2 = _taggedTemplateLiteral(["\n padding-left: ", "px;\n flex-shrink: 1;\n"])), function (_ref5) {
|
|
1320
1536
|
var theme = _ref5.theme,
|
|
1321
1537
|
isIconLeft = _ref5.isIconLeft;
|
|
1322
1538
|
return isIconLeft ? 0 : theme.kitt.spacing * 2;
|
|
@@ -1336,15 +1552,15 @@ function ModalHeader(_ref6) {
|
|
|
1336
1552
|
})));
|
|
1337
1553
|
}
|
|
1338
1554
|
|
|
1339
|
-
var _templateObject$
|
|
1340
|
-
var ModalView = styled
|
|
1555
|
+
var _templateObject$8, _templateObject2$3;
|
|
1556
|
+
var ModalView = styled(PrimitiveView)(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral(["\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n display: flex;\n align-items: center;\n justify-content: center;\n padding: ", "px ", "px;\n"])), function (_ref) {
|
|
1341
1557
|
var theme = _ref.theme;
|
|
1342
1558
|
return theme.kitt.spacing * 20;
|
|
1343
1559
|
}, function (_ref2) {
|
|
1344
1560
|
var theme = _ref2.theme;
|
|
1345
1561
|
return theme.kitt.spacing * 4;
|
|
1346
1562
|
});
|
|
1347
|
-
var ContentView = styled
|
|
1563
|
+
var ContentView = styled(PrimitiveView)(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n flex-direction: column;\n max-height: 100%;\n max-width: 540px;\n height: auto;\n width: 100%;\n border-radius: ", ";\n background-color: ", ";\n"])), function (_ref3) {
|
|
1348
1564
|
var theme = _ref3.theme;
|
|
1349
1565
|
return theme.kitt.card.borderRadius;
|
|
1350
1566
|
}, function (_ref4) {
|
|
@@ -1394,17 +1610,93 @@ function Notification(_ref) {
|
|
|
1394
1610
|
}, children);
|
|
1395
1611
|
}
|
|
1396
1612
|
|
|
1613
|
+
var PrimitiveLink = Text$1;
|
|
1614
|
+
|
|
1615
|
+
var _templateObject$7;
|
|
1616
|
+
var Flex = styled(PrimitiveView).withConfig({
|
|
1617
|
+
shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {
|
|
1618
|
+
return !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop);
|
|
1619
|
+
}
|
|
1620
|
+
})(_templateObject$7 || (_templateObject$7 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: ", ";\n flex-wrap: wrap;\n padding: ", "px;\n"])), function (_ref) {
|
|
1621
|
+
var direction = _ref.direction;
|
|
1622
|
+
return direction;
|
|
1623
|
+
}, function (_ref2) {
|
|
1624
|
+
var theme = _ref2.theme,
|
|
1625
|
+
_ref2$padding = _ref2.padding,
|
|
1626
|
+
padding = _ref2$padding === void 0 ? 0 : _ref2$padding;
|
|
1627
|
+
return padding * theme.kitt.spacing;
|
|
1628
|
+
});
|
|
1629
|
+
|
|
1630
|
+
var storyPadding = 16;
|
|
1631
|
+
|
|
1632
|
+
var _templateObject$6;
|
|
1633
|
+
|
|
1634
|
+
var getBackgroundColorFromBlockColor = function (theme) {
|
|
1635
|
+
var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'transparent';
|
|
1636
|
+
|
|
1637
|
+
switch (color) {
|
|
1638
|
+
case 'dark':
|
|
1639
|
+
return '#293033';
|
|
1640
|
+
|
|
1641
|
+
case 'light':
|
|
1642
|
+
return '#ffffff';
|
|
1643
|
+
|
|
1644
|
+
case 'primary':
|
|
1645
|
+
return theme.kitt.palettes.lateOcean.lateOcean;
|
|
1646
|
+
|
|
1647
|
+
default:
|
|
1648
|
+
return 'transparent';
|
|
1649
|
+
}
|
|
1650
|
+
};
|
|
1651
|
+
|
|
1652
|
+
var getTypographyColorFromBlockColor = function () {
|
|
1653
|
+
var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transparent';
|
|
1654
|
+
|
|
1655
|
+
switch (color) {
|
|
1656
|
+
case 'dark':
|
|
1657
|
+
case 'primary':
|
|
1658
|
+
return 'white';
|
|
1659
|
+
|
|
1660
|
+
case 'light':
|
|
1661
|
+
default:
|
|
1662
|
+
return 'black';
|
|
1663
|
+
}
|
|
1664
|
+
};
|
|
1665
|
+
|
|
1666
|
+
var StoryBlockBackgroundContext = /*#__PURE__*/createContext('transparent');
|
|
1667
|
+
var StoryBlockColorContext = /*#__PURE__*/createContext('black');
|
|
1668
|
+
var useStoryBlockColor = function (color) {
|
|
1669
|
+
var storyBlockColor = useContext(StoryBlockColorContext);
|
|
1670
|
+
return color || storyBlockColor;
|
|
1671
|
+
};
|
|
1672
|
+
var StyledStoryBlockView = styled(PrimitiveView)(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteral(["\n padding: 16px ", "px 0;\n margin: 0 -", "px;\n background: ", ";\n"])), storyPadding, storyPadding, function (_ref) {
|
|
1673
|
+
var theme = _ref.theme,
|
|
1674
|
+
background = _ref.background;
|
|
1675
|
+
return getBackgroundColorFromBlockColor(theme, background);
|
|
1676
|
+
});
|
|
1677
|
+
function StoryBlock(_ref2) {
|
|
1678
|
+
var children = _ref2.children,
|
|
1679
|
+
background = _ref2.background;
|
|
1680
|
+
return /*#__PURE__*/React.createElement(StyledStoryBlockView, {
|
|
1681
|
+
background: background
|
|
1682
|
+
}, /*#__PURE__*/React.createElement(StoryBlockColorContext.Provider, {
|
|
1683
|
+
value: getTypographyColorFromBlockColor(background)
|
|
1684
|
+
}, /*#__PURE__*/React.createElement(StoryBlockBackgroundContext.Provider, {
|
|
1685
|
+
value: background
|
|
1686
|
+
}, children)));
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1397
1689
|
var _templateObject$5, _templateObject2$2;
|
|
1398
|
-
var StoryTitleContainer = styled
|
|
1399
|
-
var StorySubTitleContainer = styled
|
|
1690
|
+
var StoryTitleContainer = styled(PrimitiveView)(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n margin-bottom: 30px;\n"])));
|
|
1691
|
+
var StorySubTitleContainer = styled(PrimitiveView)(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral(["\n margin-bottom: 10px;\n"])));
|
|
1400
1692
|
function StoryTitle(_ref) {
|
|
1401
1693
|
var color = _ref.color,
|
|
1402
1694
|
children = _ref.children,
|
|
1403
1695
|
numberOfLines = _ref.numberOfLines;
|
|
1404
|
-
return /*#__PURE__*/React.createElement(StoryTitleContainer, null, /*#__PURE__*/React.createElement(Typography.
|
|
1696
|
+
return /*#__PURE__*/React.createElement(StoryTitleContainer, null, /*#__PURE__*/React.createElement(Typography.Header1, {
|
|
1405
1697
|
variant: "bold",
|
|
1406
1698
|
base: "header1",
|
|
1407
|
-
color: color,
|
|
1699
|
+
color: useStoryBlockColor(color),
|
|
1408
1700
|
numberOfLines: numberOfLines
|
|
1409
1701
|
}, children));
|
|
1410
1702
|
}
|
|
@@ -1413,10 +1705,10 @@ function StoryTitleLevel2(_ref2) {
|
|
|
1413
1705
|
var color = _ref2.color,
|
|
1414
1706
|
children = _ref2.children,
|
|
1415
1707
|
numberOfLines = _ref2.numberOfLines;
|
|
1416
|
-
return /*#__PURE__*/React.createElement(StoryTitleContainer, null, /*#__PURE__*/React.createElement(Typography.
|
|
1708
|
+
return /*#__PURE__*/React.createElement(StoryTitleContainer, null, /*#__PURE__*/React.createElement(Typography.Header2, {
|
|
1417
1709
|
variant: "bold",
|
|
1418
1710
|
base: "header2",
|
|
1419
|
-
color: color,
|
|
1711
|
+
color: useStoryBlockColor(color),
|
|
1420
1712
|
numberOfLines: numberOfLines
|
|
1421
1713
|
}, children));
|
|
1422
1714
|
}
|
|
@@ -1427,11 +1719,11 @@ function StoryTitleLevel3(_ref3) {
|
|
|
1427
1719
|
var color = _ref3.color,
|
|
1428
1720
|
children = _ref3.children,
|
|
1429
1721
|
numberOfLines = _ref3.numberOfLines;
|
|
1430
|
-
return /*#__PURE__*/React.createElement(StorySubTitleContainer, null, /*#__PURE__*/React.createElement(Typography.
|
|
1722
|
+
return /*#__PURE__*/React.createElement(StorySubTitleContainer, null, /*#__PURE__*/React.createElement(Typography.Header3, {
|
|
1431
1723
|
variant: "bold",
|
|
1432
1724
|
base: "header3",
|
|
1433
1725
|
medium: "header4",
|
|
1434
|
-
color: color,
|
|
1726
|
+
color: useStoryBlockColor(color),
|
|
1435
1727
|
numberOfLines: numberOfLines
|
|
1436
1728
|
}, children));
|
|
1437
1729
|
}
|
|
@@ -1442,11 +1734,11 @@ function StoryTitleLevel4(_ref4) {
|
|
|
1442
1734
|
var color = _ref4.color,
|
|
1443
1735
|
children = _ref4.children,
|
|
1444
1736
|
numberOfLines = _ref4.numberOfLines;
|
|
1445
|
-
return /*#__PURE__*/React.createElement(StorySubTitleContainer, null, /*#__PURE__*/React.createElement(Typography.
|
|
1737
|
+
return /*#__PURE__*/React.createElement(StorySubTitleContainer, null, /*#__PURE__*/React.createElement(Typography.Header4, {
|
|
1446
1738
|
variant: "bold",
|
|
1447
1739
|
base: "header4",
|
|
1448
1740
|
medium: "header5",
|
|
1449
|
-
color: color,
|
|
1741
|
+
color: useStoryBlockColor(color),
|
|
1450
1742
|
numberOfLines: numberOfLines
|
|
1451
1743
|
}, children));
|
|
1452
1744
|
}
|
|
@@ -1456,20 +1748,34 @@ StoryTitle.Level2 = StoryTitleLevel2;
|
|
|
1456
1748
|
StoryTitle.Level3 = StoryTitleLevel3;
|
|
1457
1749
|
StoryTitle.Level4 = StoryTitleLevel4;
|
|
1458
1750
|
|
|
1459
|
-
var
|
|
1460
|
-
|
|
1751
|
+
var _templateObject$4;
|
|
1752
|
+
var StoryContainer$1 = styled(PrimitiveScrollView)(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n padding: ", "px;\n"])), storyPadding);
|
|
1753
|
+
function Story(_ref) {
|
|
1754
|
+
var title = _ref.title,
|
|
1755
|
+
contentContainerStyle = _ref.contentContainerStyle,
|
|
1756
|
+
children = _ref.children;
|
|
1757
|
+
return /*#__PURE__*/React.createElement(StoryContainer$1, {
|
|
1758
|
+
contentContainerStyle: contentContainerStyle
|
|
1759
|
+
}, /*#__PURE__*/React.createElement(StoryTitle, null, title), children);
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
var _excluded$2 = ["title", "className", "children", "internalIsDemoSection"],
|
|
1763
|
+
_excluded2 = ["title", "className", "children"],
|
|
1764
|
+
_excluded3 = ["title", "className", "children"];
|
|
1461
1765
|
|
|
1462
|
-
var _templateObject$
|
|
1463
|
-
var StyledSection = styled
|
|
1464
|
-
function
|
|
1766
|
+
var _templateObject$3, _templateObject2$1, _templateObject3$1, _templateObject4$1;
|
|
1767
|
+
var StyledSection = styled(PrimitiveView)(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n margin-bottom: 32px;\n"])));
|
|
1768
|
+
function StorySection(_ref) {
|
|
1465
1769
|
var title = _ref.title;
|
|
1466
1770
|
_ref.className;
|
|
1467
1771
|
var children = _ref.children,
|
|
1772
|
+
internalIsDemoSection = _ref.internalIsDemoSection,
|
|
1468
1773
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
1469
1774
|
|
|
1775
|
+
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
1470
1776
|
return /*#__PURE__*/React.createElement(StyledSection, props, /*#__PURE__*/React.createElement(StoryTitle.Level2, null, title), children);
|
|
1471
1777
|
}
|
|
1472
|
-
var StyledSubSection = styled
|
|
1778
|
+
var StyledSubSection = styled(PrimitiveView)(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["\n margin-bottom: 16px;\n"])));
|
|
1473
1779
|
|
|
1474
1780
|
function SubSection(_ref2) {
|
|
1475
1781
|
var title = _ref2.title;
|
|
@@ -1480,27 +1786,49 @@ function SubSection(_ref2) {
|
|
|
1480
1786
|
return /*#__PURE__*/React.createElement(StyledSubSection, props, /*#__PURE__*/React.createElement(StoryTitle.Level3, null, title), children);
|
|
1481
1787
|
}
|
|
1482
1788
|
|
|
1483
|
-
var
|
|
1789
|
+
var StyledBlockSection = styled(PrimitiveView)(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteral(["\n margin-bottom: 16px;\n"])));
|
|
1484
1790
|
|
|
1485
|
-
function
|
|
1486
|
-
var
|
|
1487
|
-
|
|
1791
|
+
function BlockSection(_ref3) {
|
|
1792
|
+
var title = _ref3.title;
|
|
1793
|
+
_ref3.className;
|
|
1794
|
+
var children = _ref3.children,
|
|
1795
|
+
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
1796
|
+
|
|
1797
|
+
return /*#__PURE__*/React.createElement(StyledBlockSection, props, /*#__PURE__*/React.createElement(StoryTitle.Level4, null, title), children);
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
var StyledDemoSection = styled(PrimitiveView)(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n margin-bottom: 64px;\n"])));
|
|
1801
|
+
|
|
1802
|
+
function DemoSection(_ref4) {
|
|
1803
|
+
var children = _ref4.children;
|
|
1804
|
+
return /*#__PURE__*/React.createElement(StyledDemoSection, null, /*#__PURE__*/React.createElement(StorySection, {
|
|
1805
|
+
internalIsDemoSection: true,
|
|
1488
1806
|
title: "Demo"
|
|
1489
1807
|
}, children));
|
|
1490
1808
|
}
|
|
1491
1809
|
|
|
1492
|
-
|
|
1493
|
-
|
|
1810
|
+
StorySection.SubSection = SubSection;
|
|
1811
|
+
StorySection.BlockSection = BlockSection;
|
|
1812
|
+
/** @deprecated use StorySection.Demo instead */
|
|
1494
1813
|
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1814
|
+
StorySection.DemoSection = DemoSection;
|
|
1815
|
+
StorySection.Demo = DemoSection;
|
|
1816
|
+
/** @deprecated use StorySection instead */
|
|
1817
|
+
|
|
1818
|
+
var DeprecatedSection = StorySection;
|
|
1819
|
+
|
|
1820
|
+
function StoryContainer(_ref) {
|
|
1821
|
+
var children = _ref.children,
|
|
1822
|
+
title = _ref.title,
|
|
1823
|
+
_ref$state = _ref.state,
|
|
1824
|
+
state = _ref$state === void 0 ? 'none' : _ref$state,
|
|
1825
|
+
_ref$platform = _ref.platform,
|
|
1826
|
+
platform = _ref$platform === void 0 ? 'all' : _ref$platform;
|
|
1827
|
+
if (platform === 'web') return null;
|
|
1828
|
+
return /*#__PURE__*/React.createElement(StorySection.BlockSection, {
|
|
1829
|
+
testID: state,
|
|
1830
|
+
title: title
|
|
1831
|
+
}, children);
|
|
1504
1832
|
}
|
|
1505
1833
|
|
|
1506
1834
|
function StoryDecorator(storyFn, context) {
|
|
@@ -1510,10 +1838,10 @@ function StoryDecorator(storyFn, context) {
|
|
|
1510
1838
|
}
|
|
1511
1839
|
|
|
1512
1840
|
var _templateObject$2, _templateObject2, _templateObject3, _templateObject4;
|
|
1513
|
-
var SmallScreenRow = styled
|
|
1514
|
-
var SmallScreenCol = styled
|
|
1515
|
-
var FlexRow = styled
|
|
1516
|
-
var FlexCol = styled
|
|
1841
|
+
var SmallScreenRow = styled(PrimitiveView)(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n flex-direction: column;\n margin: 0;\n"])));
|
|
1842
|
+
var SmallScreenCol = styled(PrimitiveView)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 8px 0 16px;\n"])));
|
|
1843
|
+
var FlexRow = styled(PrimitiveView)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex-direction: row;\n margin: 0 -4px 16px;\n"])));
|
|
1844
|
+
var FlexCol = styled(PrimitiveView)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex-grow: 1;\n flex-basis: 0;\n margin: 0 8px;\n"])));
|
|
1517
1845
|
|
|
1518
1846
|
function StoryGridRow(_ref) {
|
|
1519
1847
|
var children = _ref.children,
|
|
@@ -1541,7 +1869,14 @@ function StoryGridRow(_ref) {
|
|
|
1541
1869
|
function StoryGridCol(_ref2) {
|
|
1542
1870
|
var title = _ref2.title,
|
|
1543
1871
|
titleColor = _ref2.titleColor,
|
|
1544
|
-
children = _ref2.children
|
|
1872
|
+
children = _ref2.children,
|
|
1873
|
+
_ref2$platform = _ref2.platform,
|
|
1874
|
+
platform = _ref2$platform === void 0 ? 'all' : _ref2$platform;
|
|
1875
|
+
|
|
1876
|
+
if (platform === 'web') {
|
|
1877
|
+
return null;
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1545
1880
|
return /*#__PURE__*/React.createElement(React.Fragment, null, title ? /*#__PURE__*/React.createElement(StoryTitle.Level4, {
|
|
1546
1881
|
numberOfLines: 1,
|
|
1547
1882
|
color: titleColor
|
|
@@ -1554,7 +1889,7 @@ var StoryGrid = {
|
|
|
1554
1889
|
};
|
|
1555
1890
|
|
|
1556
1891
|
var _templateObject$1;
|
|
1557
|
-
var Container = styled
|
|
1892
|
+
var Container = styled(PrimitiveView)(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n background-color: ", ";\n padding: ", ";\n border-radius: ", ";\n align-self: flex-start;\n"])), function (_ref) {
|
|
1558
1893
|
var theme = _ref.theme,
|
|
1559
1894
|
type = _ref.type;
|
|
1560
1895
|
return theme.kitt.tag[type].backgroundColor;
|
|
@@ -1595,7 +1930,9 @@ var lateOceanColorPalette = {
|
|
|
1595
1930
|
englishVermillon: '#D44148',
|
|
1596
1931
|
goldCrayola: '#F8C583',
|
|
1597
1932
|
aero: '#89BDDD',
|
|
1598
|
-
transparent: 'transparent'
|
|
1933
|
+
transparent: 'transparent',
|
|
1934
|
+
moonPurple: '#DBD6F9',
|
|
1935
|
+
moonPurpleLight1: '#EDEBFC'
|
|
1599
1936
|
};
|
|
1600
1937
|
|
|
1601
1938
|
var avatarLateOceanTheme = {
|
|
@@ -1642,6 +1979,14 @@ var buttonLateOceanTheme = {
|
|
|
1642
1979
|
disabledBackgroundColor: lateOceanColorPalette.transparent,
|
|
1643
1980
|
pressedBackgroundColor: lateOceanColorPalette.transparent,
|
|
1644
1981
|
disabledBorderColor: lateOceanColorPalette.transparent
|
|
1982
|
+
},
|
|
1983
|
+
white: {
|
|
1984
|
+
backgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
1985
|
+
disabledBackgroundColor: lateOceanColorPalette.transparent,
|
|
1986
|
+
hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
1987
|
+
pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
1988
|
+
focusBorderColor: 'rgba(255, 255, 255, 0.1)',
|
|
1989
|
+
disabledBorderColor: lateOceanColorPalette.transparent
|
|
1645
1990
|
}
|
|
1646
1991
|
};
|
|
1647
1992
|
|
|
@@ -1665,6 +2010,7 @@ var cardLateOceanTheme = {
|
|
|
1665
2010
|
|
|
1666
2011
|
var colorsLateOceanTheme = {
|
|
1667
2012
|
primary: lateOceanColorPalette.lateOcean,
|
|
2013
|
+
primaryLight: lateOceanColorPalette.lateOceanLight1,
|
|
1668
2014
|
accent: lateOceanColorPalette.warmEmbrace,
|
|
1669
2015
|
accentLight: lateOceanColorPalette.warmEmbraceLight1,
|
|
1670
2016
|
success: lateOceanColorPalette.viride,
|
|
@@ -1770,6 +2116,41 @@ var fullScreenModalLateOceanTheme = {
|
|
|
1770
2116
|
}
|
|
1771
2117
|
};
|
|
1772
2118
|
|
|
2119
|
+
var iconButton = {
|
|
2120
|
+
backgroundColor: 'transparent',
|
|
2121
|
+
width: 40,
|
|
2122
|
+
height: 40,
|
|
2123
|
+
borderRadius: 20,
|
|
2124
|
+
borderWidth: 2,
|
|
2125
|
+
borderColor: 'transparent',
|
|
2126
|
+
transition: {
|
|
2127
|
+
property: 'all',
|
|
2128
|
+
duration: '200ms',
|
|
2129
|
+
timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1);'
|
|
2130
|
+
},
|
|
2131
|
+
scale: {
|
|
2132
|
+
base: {
|
|
2133
|
+
"default": 1,
|
|
2134
|
+
hover: 0.95,
|
|
2135
|
+
active: 0.95
|
|
2136
|
+
},
|
|
2137
|
+
medium: {
|
|
2138
|
+
hover: 1.05
|
|
2139
|
+
}
|
|
2140
|
+
},
|
|
2141
|
+
disabled: {
|
|
2142
|
+
scale: 1,
|
|
2143
|
+
backgroundColor: buttonLateOceanTheme.secondary.disabledBackgroundColor,
|
|
2144
|
+
borderColor: buttonLateOceanTheme.secondary.disabledBorderColor
|
|
2145
|
+
},
|
|
2146
|
+
"default": {
|
|
2147
|
+
pressedBackgroundColor: buttonLateOceanTheme.secondary.pressedBackgroundColor
|
|
2148
|
+
},
|
|
2149
|
+
white: {
|
|
2150
|
+
pressedBackgroundColor: buttonLateOceanTheme.white.hoverBackgroundColor
|
|
2151
|
+
}
|
|
2152
|
+
};
|
|
2153
|
+
|
|
1773
2154
|
var listItemLateOceanTheme = {
|
|
1774
2155
|
padding: '12px 16px',
|
|
1775
2156
|
borderColor: colorsLateOceanTheme.separator,
|
|
@@ -1785,9 +2166,7 @@ var tagLateOceanTheme = {
|
|
|
1785
2166
|
borderRadius: '10px',
|
|
1786
2167
|
padding: '2px 12px',
|
|
1787
2168
|
primary: {
|
|
1788
|
-
|
|
1789
|
-
// TODO: validate Moon shadow color with design team
|
|
1790
|
-
backgroundColor: '#EDEBFC'
|
|
2169
|
+
backgroundColor: lateOceanColorPalette.moonPurpleLight1
|
|
1791
2170
|
},
|
|
1792
2171
|
"default": {
|
|
1793
2172
|
backgroundColor: lateOceanColorPalette.black50
|
|
@@ -1818,8 +2197,6 @@ var typographyLateOceanTheme = {
|
|
|
1818
2197
|
colors: {
|
|
1819
2198
|
black: lateOceanColorPalette.black1000,
|
|
1820
2199
|
'black-light': lateOceanColorPalette.black555,
|
|
1821
|
-
grey: lateOceanColorPalette.black555,
|
|
1822
|
-
'grey-light': lateOceanColorPalette.black200,
|
|
1823
2200
|
white: lateOceanColorPalette.white,
|
|
1824
2201
|
'white-light': lateOceanColorPalette.white,
|
|
1825
2202
|
primary: lateOceanColorPalette.lateOcean,
|
|
@@ -1832,8 +2209,7 @@ var typographyLateOceanTheme = {
|
|
|
1832
2209
|
headers: {
|
|
1833
2210
|
fontFamily: {
|
|
1834
2211
|
regular: 'Moderat-Extended-Bold',
|
|
1835
|
-
bold: 'Moderat-Extended-Bold'
|
|
1836
|
-
italic: 'Moderat-Extended-Bold'
|
|
2212
|
+
bold: 'Moderat-Extended-Bold'
|
|
1837
2213
|
},
|
|
1838
2214
|
fontWeight: 400,
|
|
1839
2215
|
fontStyle: 'normal',
|
|
@@ -1853,18 +2229,15 @@ var typographyLateOceanTheme = {
|
|
|
1853
2229
|
bodies: {
|
|
1854
2230
|
fontFamily: {
|
|
1855
2231
|
regular: 'NotoSans',
|
|
1856
|
-
bold: 'NotoSans-Bold'
|
|
1857
|
-
italic: 'NotoSans-Italic'
|
|
2232
|
+
bold: 'NotoSans-Bold'
|
|
1858
2233
|
},
|
|
1859
2234
|
fontWeight: {
|
|
1860
2235
|
regular: 400,
|
|
1861
|
-
bold: 700
|
|
1862
|
-
italic: 400
|
|
2236
|
+
bold: 700
|
|
1863
2237
|
},
|
|
1864
2238
|
fontStyle: {
|
|
1865
2239
|
regular: 'normal',
|
|
1866
|
-
bold: 'normal'
|
|
1867
|
-
italic: 'italic'
|
|
2240
|
+
bold: 'normal'
|
|
1868
2241
|
},
|
|
1869
2242
|
configs: {
|
|
1870
2243
|
'body-large': createTypographyTypeConfig(1.6, 18, 24),
|
|
@@ -1874,9 +2247,35 @@ var typographyLateOceanTheme = {
|
|
|
1874
2247
|
'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
|
|
1875
2248
|
}
|
|
1876
2249
|
}
|
|
2250
|
+
},
|
|
2251
|
+
link: {
|
|
2252
|
+
disabledColor: lateOceanColorPalette.black200
|
|
1877
2253
|
}
|
|
1878
2254
|
};
|
|
1879
2255
|
|
|
2256
|
+
var breakpoints = {
|
|
2257
|
+
values: {
|
|
2258
|
+
base: 0,
|
|
2259
|
+
small: 480,
|
|
2260
|
+
medium: 768,
|
|
2261
|
+
large: 1024,
|
|
2262
|
+
wide: 1280
|
|
2263
|
+
},
|
|
2264
|
+
min: {
|
|
2265
|
+
smallBreakpoint: 'min-width: 480px',
|
|
2266
|
+
mediumBreakpoint: 'min-width: 768px',
|
|
2267
|
+
largeBreakpoint: 'min-width: 1024px',
|
|
2268
|
+
wideBreakpoint: 'min-width: 1280px'
|
|
2269
|
+
},
|
|
2270
|
+
max: {
|
|
2271
|
+
smallBreakpoint: 'max-width: 479px',
|
|
2272
|
+
mediumBreakpoint: 'max-width: 767px',
|
|
2273
|
+
largeBreakpoint: 'max-width: 1023px',
|
|
2274
|
+
wideBreakpoint: 'max-width: 1279px'
|
|
2275
|
+
}
|
|
2276
|
+
}; // eslint-disable-next-line unicorn/expiring-todo-comments
|
|
2277
|
+
// TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
|
|
2278
|
+
|
|
1880
2279
|
var theme = {
|
|
1881
2280
|
spacing: 4,
|
|
1882
2281
|
colors: colorsLateOceanTheme,
|
|
@@ -1892,41 +2291,46 @@ var theme = {
|
|
|
1892
2291
|
tag: tagLateOceanTheme,
|
|
1893
2292
|
shadows: shadowsLateOceanTheme,
|
|
1894
2293
|
fullScreenModal: fullScreenModalLateOceanTheme,
|
|
2294
|
+
iconButton: iconButton,
|
|
1895
2295
|
listItem: listItemLateOceanTheme
|
|
1896
2296
|
};
|
|
1897
2297
|
|
|
1898
2298
|
function Tooltip(_ref) {
|
|
1899
2299
|
var children = _ref.children;
|
|
1900
|
-
return /*#__PURE__*/React.createElement(
|
|
2300
|
+
return /*#__PURE__*/React.createElement(PrimitiveView, null, children);
|
|
1901
2301
|
}
|
|
1902
2302
|
|
|
1903
|
-
var _excluded$1 = ["disabled", "noUnderline", "
|
|
2303
|
+
var _excluded$1 = ["children", "disabled", "noUnderline", "onPress"];
|
|
1904
2304
|
|
|
1905
2305
|
var _templateObject;
|
|
1906
|
-
var StyledLink = styled(
|
|
2306
|
+
var StyledLink = styled(PrimitiveLink).withConfig({
|
|
1907
2307
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1908
2308
|
return !['disabled', 'noUnderline'].includes(prop);
|
|
1909
2309
|
}
|
|
1910
|
-
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n text-decoration: ", ";\n ", "
|
|
2310
|
+
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n text-decoration: ", ";\n\n ", "\n"])), function (_ref) {
|
|
1911
2311
|
var noUnderline = _ref.noUnderline;
|
|
1912
2312
|
return noUnderline ? 'none' : 'underline';
|
|
1913
2313
|
}, function (_ref2) {
|
|
1914
|
-
_ref2.disabled
|
|
1915
|
-
|
|
2314
|
+
var disabled = _ref2.disabled,
|
|
2315
|
+
theme = _ref2.theme;
|
|
2316
|
+
_ref2.noUnderline;
|
|
2317
|
+
return "\n ".concat(disabled ? "color: ".concat(theme.kitt.typography.link.disabledColor, ";") : '', "\n ").concat('');
|
|
1916
2318
|
});
|
|
1917
2319
|
function TypographyLink(_ref3) {
|
|
1918
|
-
var
|
|
2320
|
+
var children = _ref3.children,
|
|
2321
|
+
disabled = _ref3.disabled,
|
|
1919
2322
|
noUnderline = _ref3.noUnderline,
|
|
1920
|
-
|
|
1921
|
-
variant = _ref3$variant === void 0 ? 'bold' : _ref3$variant,
|
|
2323
|
+
onPress = _ref3.onPress,
|
|
1922
2324
|
otherProps = _objectWithoutProperties(_ref3, _excluded$1);
|
|
1923
2325
|
|
|
1924
|
-
return /*#__PURE__*/React.createElement(
|
|
2326
|
+
return /*#__PURE__*/React.createElement(Typography, _extends({}, otherProps, {
|
|
2327
|
+
accessibilityRole: "none"
|
|
2328
|
+
}), /*#__PURE__*/React.createElement(StyledLink, {
|
|
1925
2329
|
disabled: disabled,
|
|
1926
2330
|
noUnderline: noUnderline,
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
},
|
|
2331
|
+
accessibilityRole: "link",
|
|
2332
|
+
onPress: disabled ? undefined : onPress
|
|
2333
|
+
}, children));
|
|
1930
2334
|
}
|
|
1931
2335
|
|
|
1932
2336
|
function matchWindowSize(currentWidth, _ref) {
|
|
@@ -1954,7 +2358,7 @@ function createWindowSizeHelper(currentWidth) {
|
|
|
1954
2358
|
widthList[_key] = arguments[_key];
|
|
1955
2359
|
}
|
|
1956
2360
|
|
|
1957
|
-
if (process.env.NODE_ENV !== "production") {
|
|
2361
|
+
if ((process.env.NODE_ENV !== "production")) {
|
|
1958
2362
|
widthList.slice(1).forEach(function (_ref, index) {
|
|
1959
2363
|
var _ref2 = _slicedToArray(_ref, 1),
|
|
1960
2364
|
minWidth = _ref2[0];
|
|
@@ -1989,11 +2393,39 @@ function useKittTheme() {
|
|
|
1989
2393
|
return useMemo(function () {
|
|
1990
2394
|
return {
|
|
1991
2395
|
kitt: theme,
|
|
1992
|
-
responsive: createWindowSizeHelper(width)
|
|
2396
|
+
responsive: createWindowSizeHelper(width),
|
|
2397
|
+
breakpoints: breakpoints
|
|
1993
2398
|
};
|
|
1994
2399
|
}, [width]);
|
|
1995
2400
|
}
|
|
1996
2401
|
|
|
2402
|
+
function KittThemeProvider(_ref) {
|
|
2403
|
+
var children = _ref.children;
|
|
2404
|
+
var theme = useKittTheme();
|
|
2405
|
+
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
2406
|
+
theme: theme
|
|
2407
|
+
}, children);
|
|
2408
|
+
}
|
|
2409
|
+
var KittThemeDecorator = makeDecorator({
|
|
2410
|
+
name: 'ThemeDecorator',
|
|
2411
|
+
parameterName: 'theme',
|
|
2412
|
+
wrapper: function wrapper(storyFn, context, _ref2) {
|
|
2413
|
+
_ref2.options;
|
|
2414
|
+
_ref2.parameters;
|
|
2415
|
+
return /*#__PURE__*/React.createElement(KittThemeProvider, null, storyFn(context));
|
|
2416
|
+
}
|
|
2417
|
+
});
|
|
2418
|
+
|
|
2419
|
+
var SafeAreaProviderDecorator = makeDecorator({
|
|
2420
|
+
name: 'SafeAreaProviderDecorator',
|
|
2421
|
+
parameterName: 'safeAreaProvider',
|
|
2422
|
+
wrapper: function wrapper(storyFn, context, _ref) {
|
|
2423
|
+
_ref.options;
|
|
2424
|
+
_ref.parameters;
|
|
2425
|
+
return /*#__PURE__*/React.createElement(SafeAreaProvider, null, storyFn(context));
|
|
2426
|
+
}
|
|
2427
|
+
});
|
|
2428
|
+
|
|
1997
2429
|
var _excluded = ["children"];
|
|
1998
2430
|
function MatchWindowSize(_ref) {
|
|
1999
2431
|
var children = _ref.children,
|
|
@@ -2004,5 +2436,5 @@ function MatchWindowSize(_ref) {
|
|
|
2004
2436
|
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
2005
2437
|
}
|
|
2006
2438
|
|
|
2007
|
-
export { Avatar, Button, Card, FullScreenModal, Icon, InputFeedback, InputField, InputText, KittBreakpoints, KittBreakpointsMax, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, Radio, Section, Story, StoryDecorator, StoryGrid, StoryTitle, Tag, TextArea, Tooltip, Typography, TypographyIcon, TypographyLink, createWindowSizeHelper, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize };
|
|
2439
|
+
export { Avatar, Button, Card, Flex, FullScreenModal, Icon, IconButton, InputFeedback, InputField, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, PrimitiveLink, PrimitivePressable, PrimitiveScrollView, PrimitiveText, PrimitiveView, Radio, SafeAreaProviderDecorator, DeprecatedSection as Section, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, Tag, TextArea, Tooltip, Typography, TypographyIcon, TypographyLink, createWindowSizeHelper, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor };
|
|
2008
2440
|
//# sourceMappingURL=index-browser-all.es.ios.js.map
|