@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
|
@@ -2,13 +2,17 @@ import _extends from '@babel/runtime/helpers/extends';
|
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import { UserIcon, EyeIcon, EyeOffIcon, XIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon } from '@ornikar/kitt-icons';
|
|
4
4
|
export * from '@ornikar/kitt-icons';
|
|
5
|
-
import React, { useRef, useEffect, useContext, createContext, useState, forwardRef, useMemo } from 'react';
|
|
6
|
-
import { Animated, Easing, Image, Platform, useWindowDimensions,
|
|
5
|
+
import React, { useRef, useEffect, useContext, createContext, useState, forwardRef, Fragment, useMemo } from 'react';
|
|
6
|
+
import { View, Animated, Easing, Text as Text$1, Image, Pressable, TextInput, Platform, useWindowDimensions, ActivityIndicator, TouchableOpacity, StyleSheet, ScrollView, Modal as Modal$1 } from 'react-native';
|
|
7
7
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
8
|
-
import styled, { useTheme, css } from 'styled-components
|
|
8
|
+
import styled, { useTheme, css, ThemeProvider } from 'styled-components';
|
|
9
9
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
10
|
-
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
10
|
+
import { useSafeAreaInsets, SafeAreaProvider } from 'react-native-safe-area-context';
|
|
11
|
+
import Animated$1, { useSharedValue, useAnimatedStyle, withSpring } from 'react-native-reanimated';
|
|
11
12
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
13
|
+
import { makeDecorator } from '@storybook/addons';
|
|
14
|
+
|
|
15
|
+
var PrimitiveView = View;
|
|
12
16
|
|
|
13
17
|
function SpinningIcon(_ref) {
|
|
14
18
|
var children = _ref.children;
|
|
@@ -41,7 +45,7 @@ function SpinningIcon(_ref) {
|
|
|
41
45
|
}, children);
|
|
42
46
|
}
|
|
43
47
|
|
|
44
|
-
var IconContainer$2 = /*#__PURE__*/styled.
|
|
48
|
+
var IconContainer$2 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
45
49
|
displayName: "Icon__IconContainer",
|
|
46
50
|
componentId: "kitt-universal__sc-usm0ol-0"
|
|
47
51
|
})(["color:", ";width:", "px;height:", "px;align-self:", ";"], function (_ref) {
|
|
@@ -75,13 +79,15 @@ function Icon(_ref5) {
|
|
|
75
79
|
}, spin ? /*#__PURE__*/React.createElement(SpinningIcon, null, clonedIcon) : clonedIcon);
|
|
76
80
|
}
|
|
77
81
|
|
|
82
|
+
var PrimitiveText = Text$1;
|
|
83
|
+
|
|
78
84
|
var _excluded$9 = ["accessibilityRole", "base", "variant", "color"];
|
|
79
85
|
var TypographyTypeContext = /*#__PURE__*/createContext(undefined);
|
|
80
86
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
81
87
|
function useTypographyColor() {
|
|
82
88
|
return useContext(TypographyColorContext);
|
|
83
89
|
}
|
|
84
|
-
var StyledTypography = /*#__PURE__*/styled.
|
|
90
|
+
var StyledTypography = /*#__PURE__*/styled(PrimitiveText).withConfig({
|
|
85
91
|
displayName: "Typography__StyledTypography",
|
|
86
92
|
componentId: "kitt-universal__sc-1dz700q-0"
|
|
87
93
|
})(["", " ", ""], function (_ref) {
|
|
@@ -110,8 +116,8 @@ var isTypographyHeader = function (base, typeInContext) {
|
|
|
110
116
|
};
|
|
111
117
|
|
|
112
118
|
function Typography(_ref3) {
|
|
113
|
-
_ref3.accessibilityRole
|
|
114
|
-
|
|
119
|
+
var accessibilityRole = _ref3.accessibilityRole,
|
|
120
|
+
base = _ref3.base,
|
|
115
121
|
variant = _ref3.variant,
|
|
116
122
|
color = _ref3.color,
|
|
117
123
|
otherProps = _objectWithoutProperties(_ref3, _excluded$9);
|
|
@@ -129,11 +135,13 @@ function Typography(_ref3) {
|
|
|
129
135
|
color: colorWithDefaultToBlack,
|
|
130
136
|
isHeader: isHeader,
|
|
131
137
|
type: base,
|
|
132
|
-
variant: nonNullableVariant
|
|
138
|
+
variant: nonNullableVariant,
|
|
139
|
+
accessibilityRole: accessibilityRole || undefined
|
|
133
140
|
}, otherProps))) : /*#__PURE__*/React.createElement(StyledTypography, _extends({
|
|
134
141
|
color: colorWithDefaultToBlack,
|
|
135
142
|
isHeader: isHeader,
|
|
136
|
-
variant: nonNullableVariant
|
|
143
|
+
variant: nonNullableVariant,
|
|
144
|
+
accessibilityRole: accessibilityRole || undefined
|
|
137
145
|
}, otherProps));
|
|
138
146
|
return color ? /*#__PURE__*/React.createElement(TypographyColorContext.Provider, {
|
|
139
147
|
value: color
|
|
@@ -147,19 +155,19 @@ function TypographyText(props) {
|
|
|
147
155
|
}
|
|
148
156
|
|
|
149
157
|
function TypographyParagraph(props) {
|
|
150
|
-
// @ts-expect-error paragraph is not allowed in react-native but exists in react-native-web
|
|
151
158
|
return /*#__PURE__*/React.createElement(Typography, _extends({
|
|
152
159
|
accessibilityRole: "paragraph"
|
|
153
160
|
}, props));
|
|
154
161
|
}
|
|
155
162
|
|
|
156
|
-
var createHeading = function (level) {
|
|
163
|
+
var createHeading = function (level, defaultBase) {
|
|
157
164
|
// https://github.com/necolas/react-native-web/issues/401
|
|
158
165
|
function TypographyHeading(props) {
|
|
159
166
|
return /*#__PURE__*/React.createElement(Typography, _extends({
|
|
160
|
-
accessibilityRole: "header"
|
|
167
|
+
accessibilityRole: "header",
|
|
168
|
+
base: defaultBase
|
|
161
169
|
}, props, {
|
|
162
|
-
|
|
170
|
+
accessibilityLevel: level
|
|
163
171
|
}));
|
|
164
172
|
}
|
|
165
173
|
|
|
@@ -169,11 +177,27 @@ var createHeading = function (level) {
|
|
|
169
177
|
|
|
170
178
|
Typography.Text = TypographyText;
|
|
171
179
|
Typography.Paragraph = TypographyParagraph;
|
|
172
|
-
Typography.
|
|
173
|
-
Typography.
|
|
174
|
-
Typography.
|
|
175
|
-
Typography.
|
|
176
|
-
Typography.
|
|
180
|
+
Typography.Header1 = createHeading(1);
|
|
181
|
+
Typography.Header2 = createHeading(2);
|
|
182
|
+
Typography.Header3 = createHeading(3);
|
|
183
|
+
Typography.Header4 = createHeading(4);
|
|
184
|
+
Typography.Header5 = createHeading(5);
|
|
185
|
+
Typography.Header6 = createHeading(6);
|
|
186
|
+
/** @deprecated use Typography.Header1 */
|
|
187
|
+
|
|
188
|
+
Typography.h1 = createHeading(1, 'header1');
|
|
189
|
+
/** @deprecated use Typography.Header2 */
|
|
190
|
+
|
|
191
|
+
Typography.h2 = createHeading(2, 'header2');
|
|
192
|
+
/** @deprecated use Typography.Header3 */
|
|
193
|
+
|
|
194
|
+
Typography.h3 = createHeading(3, 'header3');
|
|
195
|
+
/** @deprecated use Typography.Header4 */
|
|
196
|
+
|
|
197
|
+
Typography.h4 = createHeading(4, 'header4');
|
|
198
|
+
/** @deprecated use Typography.Header6 */
|
|
199
|
+
|
|
200
|
+
Typography.h5 = createHeading(5, 'header5');
|
|
177
201
|
|
|
178
202
|
var _excluded$8 = ["size"];
|
|
179
203
|
|
|
@@ -185,7 +209,7 @@ var getInitials = function (firstname, lastname) {
|
|
|
185
209
|
return (getFirstCharacter(firstname) + getFirstCharacter(lastname)).toUpperCase();
|
|
186
210
|
};
|
|
187
211
|
|
|
188
|
-
var StyledAvatarView = /*#__PURE__*/styled.
|
|
212
|
+
var StyledAvatarView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
189
213
|
displayName: "Avatar__StyledAvatarView",
|
|
190
214
|
componentId: "kitt-universal__sc-9miubv-0"
|
|
191
215
|
})(["border-radius:", "px;background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], function (_ref) {
|
|
@@ -251,7 +275,9 @@ function Avatar(_ref6) {
|
|
|
251
275
|
})));
|
|
252
276
|
}
|
|
253
277
|
|
|
254
|
-
var
|
|
278
|
+
var PrimitivePressable = Pressable;
|
|
279
|
+
|
|
280
|
+
var ButtonContainer = /*#__PURE__*/styled(PrimitivePressable).withConfig({
|
|
255
281
|
displayName: "ButtonContainer",
|
|
256
282
|
componentId: "kitt-universal__sc-ofbpwm-0"
|
|
257
283
|
})(["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) {
|
|
@@ -351,7 +377,7 @@ var ButtonText = /*#__PURE__*/styled(Typography.Text).withConfig({
|
|
|
351
377
|
displayName: "ButtonContent__ButtonText",
|
|
352
378
|
componentId: "kitt-universal__sc-dnyw3n-0"
|
|
353
379
|
})(["text-align:center;"]);
|
|
354
|
-
var Content$1 = /*#__PURE__*/styled.
|
|
380
|
+
var Content$1 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
355
381
|
displayName: "ButtonContent__Content",
|
|
356
382
|
componentId: "kitt-universal__sc-dnyw3n-1"
|
|
357
383
|
})(["flex-direction:row;align-items:center;justify-content:center;flex:", ";"], function (_ref) {
|
|
@@ -359,7 +385,7 @@ var Content$1 = /*#__PURE__*/styled.View.withConfig({
|
|
|
359
385
|
iconOnly = _ref.iconOnly;
|
|
360
386
|
return "".concat(stretch || iconOnly ? 1 : 0, " 1 auto");
|
|
361
387
|
});
|
|
362
|
-
var IconContainer$1 = /*#__PURE__*/styled.
|
|
388
|
+
var IconContainer$1 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
363
389
|
displayName: "ButtonContent__IconContainer",
|
|
364
390
|
componentId: "kitt-universal__sc-dnyw3n-2"
|
|
365
391
|
})(["", ""], function (_ref2) {
|
|
@@ -409,7 +435,7 @@ function ButtonContent(_ref4) {
|
|
|
409
435
|
size: theme.kitt.button.iconSize
|
|
410
436
|
};
|
|
411
437
|
|
|
412
|
-
if (process.env.NODE_ENV !== "production") {
|
|
438
|
+
if ((process.env.NODE_ENV !== "production")) {
|
|
413
439
|
if (!(children || icon)) {
|
|
414
440
|
throw new Error('kitt(Button): You should provide at least a children or a icon');
|
|
415
441
|
}
|
|
@@ -497,7 +523,7 @@ function Button(_ref) {
|
|
|
497
523
|
}), children));
|
|
498
524
|
}
|
|
499
525
|
|
|
500
|
-
var Container$5 = /*#__PURE__*/styled.
|
|
526
|
+
var Container$5 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
501
527
|
displayName: "Card__Container",
|
|
502
528
|
componentId: "kitt-universal__sc-1n9psug-0"
|
|
503
529
|
})(["background-color:", ";padding:", ";border-radius:", ";border-width:", ";border-color:", ";"], function (_ref) {
|
|
@@ -532,7 +558,7 @@ var getColorFromState = function (state) {
|
|
|
532
558
|
return 'danger';
|
|
533
559
|
|
|
534
560
|
default:
|
|
535
|
-
return '
|
|
561
|
+
return 'black-light';
|
|
536
562
|
}
|
|
537
563
|
};
|
|
538
564
|
|
|
@@ -595,11 +621,11 @@ var KittBreakpointsMax = {
|
|
|
595
621
|
LARGE: KittBreakpoints.WIDE - 1
|
|
596
622
|
};
|
|
597
623
|
|
|
598
|
-
var FieldContainer = /*#__PURE__*/styled.
|
|
624
|
+
var FieldContainer = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
599
625
|
displayName: "InputField__FieldContainer",
|
|
600
626
|
componentId: "kitt-universal__sc-13fkixs-0"
|
|
601
627
|
})(["padding:5px 0 10px;"]);
|
|
602
|
-
var FeedbackContainer = /*#__PURE__*/styled.
|
|
628
|
+
var FeedbackContainer = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
603
629
|
displayName: "InputField__FeedbackContainer",
|
|
604
630
|
componentId: "kitt-universal__sc-13fkixs-1"
|
|
605
631
|
})(["", ";"], function (_ref) {
|
|
@@ -608,14 +634,14 @@ var FeedbackContainer = /*#__PURE__*/styled.View.withConfig({
|
|
|
608
634
|
minWidth: KittBreakpoints.SMALL
|
|
609
635
|
}, 'padding-top: 10px', 'padding-top: 5px');
|
|
610
636
|
});
|
|
611
|
-
var FieldLabelContainer = /*#__PURE__*/styled.
|
|
637
|
+
var FieldLabelContainer = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
612
638
|
displayName: "InputField__FieldLabelContainer",
|
|
613
639
|
componentId: "kitt-universal__sc-13fkixs-2"
|
|
614
640
|
})(["flex-direction:row;align-items:center;padding-bottom:", "px;"], function (_ref2) {
|
|
615
641
|
var theme = _ref2.theme;
|
|
616
642
|
return theme.kitt.forms.inputField.labelContainerPaddingBottom;
|
|
617
643
|
});
|
|
618
|
-
var LabelContainer = /*#__PURE__*/styled.
|
|
644
|
+
var LabelContainer = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
619
645
|
displayName: "InputField__LabelContainer",
|
|
620
646
|
componentId: "kitt-universal__sc-13fkixs-3"
|
|
621
647
|
})(["margin-right:", "px;"], function (_ref3) {
|
|
@@ -684,7 +710,7 @@ var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width
|
|
|
684
710
|
var theme = _ref7.theme;
|
|
685
711
|
return theme.kitt.typography.types.bodies.fontFamily.regular;
|
|
686
712
|
});
|
|
687
|
-
var Input = /*#__PURE__*/styled
|
|
713
|
+
var Input = /*#__PURE__*/styled(TextInput).withConfig({
|
|
688
714
|
displayName: "InputText__Input",
|
|
689
715
|
componentId: "kitt-universal__sc-uke279-0"
|
|
690
716
|
})(["", " padding:", ";line-height:", ";min-height:", "px;"], styledTextInputMixin, function (_ref8) {
|
|
@@ -699,7 +725,7 @@ var Input = /*#__PURE__*/styled.TextInput.withConfig({
|
|
|
699
725
|
var minHeight = _ref10.minHeight;
|
|
700
726
|
return minHeight;
|
|
701
727
|
});
|
|
702
|
-
var Container$4 = /*#__PURE__*/styled.
|
|
728
|
+
var Container$4 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
703
729
|
displayName: "InputText__Container",
|
|
704
730
|
componentId: "kitt-universal__sc-uke279-1"
|
|
705
731
|
})(["margin-top:", ";margin-bottom:", ";"], function (_ref11) {
|
|
@@ -709,7 +735,7 @@ var Container$4 = /*#__PURE__*/styled.View.withConfig({
|
|
|
709
735
|
var theme = _ref12.theme;
|
|
710
736
|
return theme.kitt.forms.input.marginBottom;
|
|
711
737
|
});
|
|
712
|
-
var PasswordButtonContainer = /*#__PURE__*/styled.
|
|
738
|
+
var PasswordButtonContainer = /*#__PURE__*/styled(PrimitivePressable).withConfig({
|
|
713
739
|
displayName: "InputText__PasswordButtonContainer",
|
|
714
740
|
componentId: "kitt-universal__sc-uke279-2"
|
|
715
741
|
})(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:", "px;"], function (_ref13) {
|
|
@@ -800,6 +826,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref15, ref) {
|
|
|
800
826
|
if (_onBlur) _onBlur(e);
|
|
801
827
|
}
|
|
802
828
|
})), type === 'password' && !disabled && /*#__PURE__*/React.createElement(PasswordButtonContainer, {
|
|
829
|
+
accessibilityRole: "button",
|
|
803
830
|
onPress: togglePasswordVisibility
|
|
804
831
|
}, /*#__PURE__*/React.createElement(TypographyIcon, {
|
|
805
832
|
icon: isPasswordVisible ? /*#__PURE__*/React.createElement(EyeIcon, null) : /*#__PURE__*/React.createElement(EyeOffIcon, null),
|
|
@@ -818,7 +845,7 @@ function Label(_ref) {
|
|
|
818
845
|
}, children) : children);
|
|
819
846
|
}
|
|
820
847
|
|
|
821
|
-
var OuterRadio = /*#__PURE__*/styled.
|
|
848
|
+
var OuterRadio = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
822
849
|
displayName: "Radio__OuterRadio",
|
|
823
850
|
componentId: "kitt-universal__sc-1mdgr2o-0"
|
|
824
851
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;border-width:", ";border-color:", ";"], function (_ref) {
|
|
@@ -842,7 +869,7 @@ var OuterRadio = /*#__PURE__*/styled.View.withConfig({
|
|
|
842
869
|
disabled = _ref6.disabled;
|
|
843
870
|
return theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].borderColor;
|
|
844
871
|
});
|
|
845
|
-
var SelectedOuterRadio = /*#__PURE__*/styled.
|
|
872
|
+
var SelectedOuterRadio = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
846
873
|
displayName: "Radio__SelectedOuterRadio",
|
|
847
874
|
componentId: "kitt-universal__sc-1mdgr2o-1"
|
|
848
875
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;justify-content:center;align-items:center;"], function (_ref7) {
|
|
@@ -858,7 +885,7 @@ var SelectedOuterRadio = /*#__PURE__*/styled.View.withConfig({
|
|
|
858
885
|
var theme = _ref10.theme;
|
|
859
886
|
return theme.kitt.forms.radio.size / 2;
|
|
860
887
|
});
|
|
861
|
-
var SelectedInnerRadio = /*#__PURE__*/styled.
|
|
888
|
+
var SelectedInnerRadio = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
862
889
|
displayName: "Radio__SelectedInnerRadio",
|
|
863
890
|
componentId: "kitt-universal__sc-1mdgr2o-2"
|
|
864
891
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;"], function (_ref11) {
|
|
@@ -874,7 +901,7 @@ var SelectedInnerRadio = /*#__PURE__*/styled.View.withConfig({
|
|
|
874
901
|
var theme = _ref14.theme;
|
|
875
902
|
return theme.kitt.forms.radio.checked.innerSize / 2;
|
|
876
903
|
});
|
|
877
|
-
var Container$3 = /*#__PURE__*/styled.
|
|
904
|
+
var Container$3 = /*#__PURE__*/styled(PrimitivePressable).withConfig({
|
|
878
905
|
displayName: "Radio__Container",
|
|
879
906
|
componentId: "kitt-universal__sc-1mdgr2o-3"
|
|
880
907
|
})(["flex-direction:row;align-items:center;"]);
|
|
@@ -898,7 +925,7 @@ function Radio(_ref16) {
|
|
|
898
925
|
disabled: disabled,
|
|
899
926
|
accessibilityRole: "radio",
|
|
900
927
|
"aria-checked": checked,
|
|
901
|
-
|
|
928
|
+
focusable: checked && !disabled,
|
|
902
929
|
onPress: function handlePress() {
|
|
903
930
|
onChange(value);
|
|
904
931
|
}
|
|
@@ -922,7 +949,7 @@ function TextArea(_ref) {
|
|
|
922
949
|
}));
|
|
923
950
|
}
|
|
924
951
|
|
|
925
|
-
var Body = /*#__PURE__*/styled.
|
|
952
|
+
var Body = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
926
953
|
displayName: "Body",
|
|
927
954
|
componentId: "kitt-universal__sc-1ofncfn-0"
|
|
928
955
|
})(["", " background-color:", ";flex:1;"], function (_ref) {
|
|
@@ -939,7 +966,7 @@ function FullScreenModalBody(_ref3) {
|
|
|
939
966
|
return /*#__PURE__*/React.createElement(Body, null, children);
|
|
940
967
|
}
|
|
941
968
|
|
|
942
|
-
var SideContainer = /*#__PURE__*/styled.
|
|
969
|
+
var SideContainer = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
943
970
|
displayName: "Header__SideContainer",
|
|
944
971
|
componentId: "kitt-universal__sc-dfmxi1-0"
|
|
945
972
|
})(["", ""], function (_ref) {
|
|
@@ -959,7 +986,7 @@ function getHeaderHorizontalMediumPadding(spacing) {
|
|
|
959
986
|
return spacing * 6;
|
|
960
987
|
}
|
|
961
988
|
|
|
962
|
-
var Header = /*#__PURE__*/styled.
|
|
989
|
+
var Header = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
963
990
|
displayName: "Header",
|
|
964
991
|
componentId: "kitt-universal__sc-dfmxi1-1"
|
|
965
992
|
})(["", ";border-bottom-color:", ";border-bottom-width:1px;flex-direction:row;align-items:center;"], function (_ref2) {
|
|
@@ -977,7 +1004,7 @@ var Header = /*#__PURE__*/styled.View.withConfig({
|
|
|
977
1004
|
var theme = _ref3.theme;
|
|
978
1005
|
return theme.kitt.fullScreenModal.header.borderColor;
|
|
979
1006
|
});
|
|
980
|
-
var HeaderContent = /*#__PURE__*/styled.
|
|
1007
|
+
var HeaderContent = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
981
1008
|
displayName: "Header__HeaderContent",
|
|
982
1009
|
componentId: "kitt-universal__sc-dfmxi1-2"
|
|
983
1010
|
})(["", ";", ";justify-content:center;align-items:center;"], function (_ref4) {
|
|
@@ -1063,7 +1090,7 @@ function FullScreenModalHeader(_ref6) {
|
|
|
1063
1090
|
}, right) : null);
|
|
1064
1091
|
}
|
|
1065
1092
|
|
|
1066
|
-
var Container$2 = /*#__PURE__*/styled.
|
|
1093
|
+
var Container$2 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1067
1094
|
displayName: "FullScreenModal__Container",
|
|
1068
1095
|
componentId: "kitt-universal__sc-11qpbe3-0"
|
|
1069
1096
|
})(["flex:1;background-color:", ";"], function (_ref) {
|
|
@@ -1077,8 +1104,218 @@ function FullScreenModal(_ref2) {
|
|
|
1077
1104
|
FullScreenModal.Header = FullScreenModalHeader;
|
|
1078
1105
|
FullScreenModal.Body = FullScreenModalBody;
|
|
1079
1106
|
|
|
1107
|
+
var PressableIconButton = /*#__PURE__*/styled(PrimitivePressable).withConfig({
|
|
1108
|
+
displayName: "PressableIconButton",
|
|
1109
|
+
componentId: "kitt-universal__sc-1m6jo3s-0"
|
|
1110
|
+
})(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref) {
|
|
1111
|
+
var theme = _ref.theme;
|
|
1112
|
+
return theme.kitt.iconButton.borderRadius;
|
|
1113
|
+
}, function (_ref2) {
|
|
1114
|
+
var theme = _ref2.theme;
|
|
1115
|
+
return theme.kitt.iconButton.width;
|
|
1116
|
+
}, function (_ref3) {
|
|
1117
|
+
var theme = _ref3.theme;
|
|
1118
|
+
return theme.kitt.iconButton.height;
|
|
1119
|
+
}, function (_ref4) {
|
|
1120
|
+
var theme = _ref4.theme,
|
|
1121
|
+
color = _ref4.color,
|
|
1122
|
+
disabled = _ref4.disabled;
|
|
1123
|
+
var iconButton = theme.kitt.iconButton;
|
|
1124
|
+
|
|
1125
|
+
if (Platform.OS !== 'web') {
|
|
1126
|
+
return undefined;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
var transition = iconButton.transition,
|
|
1130
|
+
scale = iconButton.scale;
|
|
1131
|
+
|
|
1132
|
+
if (disabled) {
|
|
1133
|
+
return "\n background-color: ".concat(iconButton.disabled.backgroundColor, ";\n ");
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n\n &:hover,\n .kitt-hover & {\n @media (hover: none) and (pointer: coarse) {\n transform: scale(").concat(scale.base.hover, ");\n }\n\n @media(").concat(theme.breakpoints.min.mediumBreakpoint, ") {\n transform: scale(").concat(scale.medium.hover, ");\n }\n }\n\n &:active,\n .kitt-active & {\n transform: scale(").concat(scale.base.active, ");\n }\n\n &:hover,\n .kitt-hover &,\n &:focus,\n .kitt-focus &,\n &:active,\n .kitt-active & {\n background-color: ").concat(color === 'white' ? iconButton.white.pressedBackgroundColor : iconButton["default"].pressedBackgroundColor, ";\n }\n ");
|
|
1137
|
+
});
|
|
1138
|
+
|
|
1139
|
+
function WebAnimatedContainer(_ref) {
|
|
1140
|
+
var children = _ref.children,
|
|
1141
|
+
color = _ref.color,
|
|
1142
|
+
disabled = _ref.disabled,
|
|
1143
|
+
onPress = _ref.onPress;
|
|
1144
|
+
return /*#__PURE__*/React.createElement(PressableIconButton, {
|
|
1145
|
+
accessibilityRole: "button",
|
|
1146
|
+
color: color,
|
|
1147
|
+
disabled: disabled,
|
|
1148
|
+
onPress: onPress
|
|
1149
|
+
}, children);
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated$1.View).withConfig({
|
|
1153
|
+
displayName: "PressableAnimatedContainer__AnimatedIconButtonBackground",
|
|
1154
|
+
componentId: "kitt-universal__sc-xl9ll5-0"
|
|
1155
|
+
})(["background-color:", ";border-radius:", "px;width:", "px;height:", "px;position:absolute;bottom:0;left:0;"], function (_ref2) {
|
|
1156
|
+
var theme = _ref2.theme,
|
|
1157
|
+
color = _ref2.color,
|
|
1158
|
+
disabled = _ref2.disabled;
|
|
1159
|
+
var iconButton = theme.kitt.iconButton;
|
|
1160
|
+
if (disabled) return iconButton.disabled.backgroundColor;
|
|
1161
|
+
if (color === 'white') return iconButton.white.pressedBackgroundColor;
|
|
1162
|
+
return iconButton["default"].pressedBackgroundColor;
|
|
1163
|
+
}, function (_ref3) {
|
|
1164
|
+
var theme = _ref3.theme;
|
|
1165
|
+
return theme.kitt.iconButton.borderRadius;
|
|
1166
|
+
}, function (_ref4) {
|
|
1167
|
+
var theme = _ref4.theme;
|
|
1168
|
+
return theme.kitt.iconButton.width;
|
|
1169
|
+
}, function (_ref5) {
|
|
1170
|
+
var theme = _ref5.theme;
|
|
1171
|
+
return theme.kitt.iconButton.height;
|
|
1172
|
+
});
|
|
1173
|
+
var AnimatedViewContainer = /*#__PURE__*/styled(Animated$1.View).withConfig({
|
|
1174
|
+
displayName: "PressableAnimatedContainer__AnimatedViewContainer",
|
|
1175
|
+
componentId: "kitt-universal__sc-xl9ll5-1"
|
|
1176
|
+
})(["position:relative;align-items:center;justify-content:center;width:100%;height:100%;"]);
|
|
1177
|
+
|
|
1178
|
+
function NativeAnimatedContainer(_ref6) {
|
|
1179
|
+
var disabled = _ref6.disabled,
|
|
1180
|
+
_ref6$color = _ref6.color,
|
|
1181
|
+
color = _ref6$color === void 0 ? 'black' : _ref6$color,
|
|
1182
|
+
children = _ref6.children,
|
|
1183
|
+
onPress = _ref6.onPress;
|
|
1184
|
+
var theme = /*#__PURE__*/useTheme();
|
|
1185
|
+
var pressed = useSharedValue(false);
|
|
1186
|
+
var opacityStyles = useAnimatedStyle(function () {
|
|
1187
|
+
var _f = function () {
|
|
1188
|
+
return {
|
|
1189
|
+
opacity: withSpring(pressed.value ? 1 : 0)
|
|
1190
|
+
};
|
|
1191
|
+
};
|
|
1192
|
+
|
|
1193
|
+
_f._closure = {
|
|
1194
|
+
withSpring: withSpring,
|
|
1195
|
+
pressed: pressed
|
|
1196
|
+
};
|
|
1197
|
+
_f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
|
|
1198
|
+
_f.__workletHash = 10645190329247;
|
|
1199
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (64:41)";
|
|
1200
|
+
_f.__optimalization = 2;
|
|
1201
|
+
|
|
1202
|
+
global.__reanimatedWorkletInit(_f);
|
|
1203
|
+
|
|
1204
|
+
return _f;
|
|
1205
|
+
}());
|
|
1206
|
+
var scaleStyles = useAnimatedStyle(function () {
|
|
1207
|
+
var _f = function () {
|
|
1208
|
+
return {
|
|
1209
|
+
transform: [{
|
|
1210
|
+
scale: withSpring(pressed.value ? theme.kitt.iconButton.scale.base.active : theme.kitt.iconButton.scale.base["default"])
|
|
1211
|
+
}]
|
|
1212
|
+
};
|
|
1213
|
+
};
|
|
1214
|
+
|
|
1215
|
+
_f._closure = {
|
|
1216
|
+
withSpring: withSpring,
|
|
1217
|
+
pressed: pressed,
|
|
1218
|
+
theme: {
|
|
1219
|
+
kitt: {
|
|
1220
|
+
iconButton: {
|
|
1221
|
+
scale: {
|
|
1222
|
+
base: {
|
|
1223
|
+
active: theme.kitt.iconButton.scale.base.active,
|
|
1224
|
+
"default": theme.kitt.iconButton.scale.base["default"]
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
};
|
|
1231
|
+
_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)}]};}}";
|
|
1232
|
+
_f.__workletHash = 13861998831411;
|
|
1233
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (70:39)";
|
|
1234
|
+
_f.__optimalization = 2;
|
|
1235
|
+
|
|
1236
|
+
global.__reanimatedWorkletInit(_f);
|
|
1237
|
+
|
|
1238
|
+
return _f;
|
|
1239
|
+
}());
|
|
1240
|
+
return /*#__PURE__*/React.createElement(PressableIconButton, {
|
|
1241
|
+
accessibilityRole: "button",
|
|
1242
|
+
disabled: disabled,
|
|
1243
|
+
color: color,
|
|
1244
|
+
onPress: onPress,
|
|
1245
|
+
onPressIn: function onPressIn() {
|
|
1246
|
+
pressed.value = true;
|
|
1247
|
+
},
|
|
1248
|
+
onPressOut: function onPressOut() {
|
|
1249
|
+
pressed.value = false;
|
|
1250
|
+
}
|
|
1251
|
+
}, /*#__PURE__*/React.createElement(AnimatedViewContainer, {
|
|
1252
|
+
style: disabled ? [{
|
|
1253
|
+
transform: [{
|
|
1254
|
+
scale: 1
|
|
1255
|
+
}]
|
|
1256
|
+
}] : [scaleStyles]
|
|
1257
|
+
}, /*#__PURE__*/React.createElement(AnimatedIconButtonBackground, {
|
|
1258
|
+
disabled: disabled,
|
|
1259
|
+
color: color,
|
|
1260
|
+
style: disabled ? [{
|
|
1261
|
+
opacity: 1
|
|
1262
|
+
}] : [opacityStyles]
|
|
1263
|
+
}), children));
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
var PressableAnimatedContainer = Platform.OS === 'web' ? WebAnimatedContainer : NativeAnimatedContainer;
|
|
1267
|
+
|
|
1268
|
+
var IconButtonContentBorder = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1269
|
+
displayName: "IconButton__IconButtonContentBorder",
|
|
1270
|
+
componentId: "kitt-universal__sc-swelbf-0"
|
|
1271
|
+
})(["border:", ";border-color:", ";width:", "px;height:", "px;align-items:center;justify-content:center;border-radius:", "px;"], function (_ref) {
|
|
1272
|
+
var theme = _ref.theme;
|
|
1273
|
+
return "".concat(theme.kitt.iconButton.borderWidth, "px solid");
|
|
1274
|
+
}, function (_ref2) {
|
|
1275
|
+
var theme = _ref2.theme,
|
|
1276
|
+
disabled = _ref2.disabled;
|
|
1277
|
+
return disabled ? theme.kitt.iconButton.disabled.borderColor : theme.kitt.iconButton.borderColor;
|
|
1278
|
+
}, function (_ref3) {
|
|
1279
|
+
var theme = _ref3.theme;
|
|
1280
|
+
return theme.kitt.iconButton.width - theme.kitt.iconButton.borderWidth;
|
|
1281
|
+
}, function (_ref4) {
|
|
1282
|
+
var theme = _ref4.theme;
|
|
1283
|
+
return theme.kitt.iconButton.height - theme.kitt.iconButton.borderWidth;
|
|
1284
|
+
}, function (_ref5) {
|
|
1285
|
+
var theme = _ref5.theme;
|
|
1286
|
+
return theme.kitt.iconButton.borderRadius;
|
|
1287
|
+
});
|
|
1288
|
+
|
|
1289
|
+
function IconButtonContent(_ref6) {
|
|
1290
|
+
var disabled = _ref6.disabled,
|
|
1291
|
+
color = _ref6.color,
|
|
1292
|
+
icon = _ref6.icon;
|
|
1293
|
+
return /*#__PURE__*/React.createElement(IconButtonContentBorder, {
|
|
1294
|
+
disabled: disabled
|
|
1295
|
+
}, /*#__PURE__*/React.createElement(TypographyIcon, {
|
|
1296
|
+
color: disabled ? 'black-light' : color,
|
|
1297
|
+
icon: icon
|
|
1298
|
+
}));
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
function IconButton(_ref7) {
|
|
1302
|
+
var icon = _ref7.icon,
|
|
1303
|
+
color = _ref7.color,
|
|
1304
|
+
disabled = _ref7.disabled,
|
|
1305
|
+
onPress = _ref7.onPress;
|
|
1306
|
+
return /*#__PURE__*/React.createElement(PressableAnimatedContainer, {
|
|
1307
|
+
color: color,
|
|
1308
|
+
disabled: disabled,
|
|
1309
|
+
onPress: onPress
|
|
1310
|
+
}, /*#__PURE__*/React.createElement(IconButtonContent, {
|
|
1311
|
+
disabled: disabled,
|
|
1312
|
+
color: color,
|
|
1313
|
+
icon: icon
|
|
1314
|
+
}));
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1080
1317
|
var _excluded$5 = ["children"];
|
|
1081
|
-
var ContentView$1 = /*#__PURE__*/styled.
|
|
1318
|
+
var ContentView$1 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1082
1319
|
displayName: "ListItemContent__ContentView",
|
|
1083
1320
|
componentId: "kitt-universal__sc-57q0u9-0"
|
|
1084
1321
|
})(["flex:1 0 0%;align-self:center;"]);
|
|
@@ -1091,7 +1328,7 @@ function ListItemContent(_ref) {
|
|
|
1091
1328
|
|
|
1092
1329
|
var _excluded$4 = ["children", "side"],
|
|
1093
1330
|
_excluded2$1 = ["children", "align"];
|
|
1094
|
-
var SideContainerView = /*#__PURE__*/styled.
|
|
1331
|
+
var SideContainerView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1095
1332
|
displayName: "ListItemSideContent__SideContainerView",
|
|
1096
1333
|
componentId: "kitt-universal__sc-1vajiw-0"
|
|
1097
1334
|
})(["flex-direction:row;margin-left:", ";margin-right:", ";"], function (_ref) {
|
|
@@ -1114,7 +1351,7 @@ function ListItemSideContainer(_ref3) {
|
|
|
1114
1351
|
side: side
|
|
1115
1352
|
}, rest), children);
|
|
1116
1353
|
}
|
|
1117
|
-
var SideContentView = /*#__PURE__*/styled.
|
|
1354
|
+
var SideContentView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1118
1355
|
displayName: "ListItemSideContent__SideContentView",
|
|
1119
1356
|
componentId: "kitt-universal__sc-1vajiw-1"
|
|
1120
1357
|
})(["align-self:", ";"], function (_ref4) {
|
|
@@ -1132,8 +1369,12 @@ function ListItemSideContent(_ref5) {
|
|
|
1132
1369
|
}, rest), children);
|
|
1133
1370
|
}
|
|
1134
1371
|
|
|
1135
|
-
var _excluded$3 = ["children", "withPadding", "borders", "left", "right"];
|
|
1136
|
-
|
|
1372
|
+
var _excluded$3 = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
1373
|
+
|
|
1374
|
+
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; }
|
|
1375
|
+
|
|
1376
|
+
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; }
|
|
1377
|
+
var ContainerView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1137
1378
|
displayName: "ListItem__ContainerView",
|
|
1138
1379
|
componentId: "kitt-universal__sc-2afp9s-0"
|
|
1139
1380
|
})(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], function (_ref) {
|
|
@@ -1171,12 +1412,19 @@ function ListItem(_ref5) {
|
|
|
1171
1412
|
borders = _ref5.borders,
|
|
1172
1413
|
left = _ref5.left,
|
|
1173
1414
|
right = _ref5.right,
|
|
1415
|
+
onPress = _ref5.onPress,
|
|
1174
1416
|
rest = _objectWithoutProperties(_ref5, _excluded$3);
|
|
1175
1417
|
|
|
1176
|
-
|
|
1418
|
+
var Wrapper = onPress ? PrimitivePressable : Fragment;
|
|
1419
|
+
var wrapperProps = onPress ? _objectSpread$1({
|
|
1420
|
+
accessibilityRole: 'button',
|
|
1421
|
+
onPress: onPress
|
|
1422
|
+
}, rest) : undefined;
|
|
1423
|
+
var containerProps = onPress ? undefined : rest;
|
|
1424
|
+
return /*#__PURE__*/React.createElement(Wrapper, wrapperProps, /*#__PURE__*/React.createElement(ContainerView, _extends({
|
|
1177
1425
|
withPadding: withPadding,
|
|
1178
1426
|
borders: borders
|
|
1179
|
-
}, left ? /*#__PURE__*/React.createElement(ListItemSideContainer, {
|
|
1427
|
+
}, containerProps), left ? /*#__PURE__*/React.createElement(ListItemSideContainer, {
|
|
1180
1428
|
side: "left"
|
|
1181
1429
|
}, left) : null, /*#__PURE__*/React.createElement(ListItemContent, null, children), right ? /*#__PURE__*/React.createElement(ListItemSideContainer, {
|
|
1182
1430
|
side: "right"
|
|
@@ -1216,7 +1464,7 @@ function LargeLoader(_ref) {
|
|
|
1216
1464
|
|
|
1217
1465
|
var xIconSize = 14;
|
|
1218
1466
|
var mainIconSize = 20;
|
|
1219
|
-
var Container$1 = /*#__PURE__*/styled.
|
|
1467
|
+
var Container$1 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1220
1468
|
displayName: "Message__Container",
|
|
1221
1469
|
componentId: "kitt-universal__sc-c6400e-0"
|
|
1222
1470
|
})(["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) {
|
|
@@ -1243,7 +1491,7 @@ var Container$1 = /*#__PURE__*/styled.View.withConfig({
|
|
|
1243
1491
|
insets = _ref6.insets;
|
|
1244
1492
|
return ((_insets$top = insets === null || insets === void 0 ? void 0 : insets.top) !== null && _insets$top !== void 0 ? _insets$top : 0) + theme.kitt.spacing * 4;
|
|
1245
1493
|
});
|
|
1246
|
-
var CloseContainer = /*#__PURE__*/styled
|
|
1494
|
+
var CloseContainer = /*#__PURE__*/styled(TouchableOpacity).withConfig({
|
|
1247
1495
|
displayName: "Message__CloseContainer",
|
|
1248
1496
|
componentId: "kitt-universal__sc-c6400e-1"
|
|
1249
1497
|
})(["margin-left:", "px;padding:", "px;"], function (_ref7) {
|
|
@@ -1253,14 +1501,14 @@ var CloseContainer = /*#__PURE__*/styled.TouchableOpacity.withConfig({
|
|
|
1253
1501
|
var theme = _ref8.theme;
|
|
1254
1502
|
return theme.kitt.spacing;
|
|
1255
1503
|
});
|
|
1256
|
-
var IconContainer = /*#__PURE__*/styled.
|
|
1504
|
+
var IconContainer = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1257
1505
|
displayName: "Message__IconContainer",
|
|
1258
1506
|
componentId: "kitt-universal__sc-c6400e-2"
|
|
1259
1507
|
})(["margin-right:", "px;"], function (_ref9) {
|
|
1260
1508
|
var theme = _ref9.theme;
|
|
1261
1509
|
return theme.kitt.spacing * 4;
|
|
1262
1510
|
});
|
|
1263
|
-
var Content = /*#__PURE__*/styled.
|
|
1511
|
+
var Content = /*#__PURE__*/styled(PrimitiveText).withConfig({
|
|
1264
1512
|
displayName: "Message__Content",
|
|
1265
1513
|
componentId: "kitt-universal__sc-c6400e-3"
|
|
1266
1514
|
})(["text-align:", ";flex:1;"], function (_ref10) {
|
|
@@ -1335,7 +1583,7 @@ function Message(_ref11) {
|
|
|
1335
1583
|
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; }
|
|
1336
1584
|
|
|
1337
1585
|
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; }
|
|
1338
|
-
var OverlayPressable = /*#__PURE__*/styled.
|
|
1586
|
+
var OverlayPressable = /*#__PURE__*/styled(PrimitivePressable).withConfig({
|
|
1339
1587
|
displayName: "Overlay__OverlayPressable",
|
|
1340
1588
|
componentId: "kitt-universal__sc-1cz1gbr-0"
|
|
1341
1589
|
})(function (_ref) {
|
|
@@ -1347,11 +1595,14 @@ var OverlayPressable = /*#__PURE__*/styled.Pressable.withConfig({
|
|
|
1347
1595
|
function Overlay(_ref2) {
|
|
1348
1596
|
var onPress = _ref2.onPress;
|
|
1349
1597
|
return /*#__PURE__*/React.createElement(OverlayPressable, {
|
|
1598
|
+
accessibilityRole: "none",
|
|
1350
1599
|
onPress: onPress
|
|
1351
|
-
}, /*#__PURE__*/React.createElement(
|
|
1600
|
+
}, /*#__PURE__*/React.createElement(PrimitiveView, null));
|
|
1352
1601
|
}
|
|
1353
1602
|
|
|
1354
|
-
var
|
|
1603
|
+
var PrimitiveScrollView = ScrollView;
|
|
1604
|
+
|
|
1605
|
+
var BodyView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1355
1606
|
displayName: "Body__BodyView",
|
|
1356
1607
|
componentId: "kitt-universal__sc-17fwpo4-0"
|
|
1357
1608
|
})(["padding:", "px ", "px;"], function (_ref) {
|
|
@@ -1361,14 +1612,12 @@ var BodyView = /*#__PURE__*/styled.View.withConfig({
|
|
|
1361
1612
|
var theme = _ref2.theme;
|
|
1362
1613
|
return theme.kitt.spacing * 4;
|
|
1363
1614
|
});
|
|
1364
|
-
|
|
1615
|
+
function ModalBody(_ref3) {
|
|
1365
1616
|
var children = _ref3.children;
|
|
1366
|
-
return /*#__PURE__*/React.createElement(
|
|
1367
|
-
|
|
1368
|
-
}, /*#__PURE__*/React.createElement(BodyView, null, children));
|
|
1369
|
-
});
|
|
1617
|
+
return /*#__PURE__*/React.createElement(PrimitiveScrollView, null, /*#__PURE__*/React.createElement(BodyView, null, children));
|
|
1618
|
+
}
|
|
1370
1619
|
|
|
1371
|
-
var FooterView = /*#__PURE__*/styled.
|
|
1620
|
+
var FooterView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1372
1621
|
displayName: "Footer__FooterView",
|
|
1373
1622
|
componentId: "kitt-universal__sc-1ujq2dc-0"
|
|
1374
1623
|
})(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], function (_ref) {
|
|
@@ -1385,7 +1634,7 @@ function ModalFooter(_ref3) {
|
|
|
1385
1634
|
|
|
1386
1635
|
var OnCloseContext = /*#__PURE__*/createContext(function () {});
|
|
1387
1636
|
|
|
1388
|
-
var HeaderView = /*#__PURE__*/styled.
|
|
1637
|
+
var HeaderView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1389
1638
|
displayName: "Header__HeaderView",
|
|
1390
1639
|
componentId: "kitt-universal__sc-1iwabch-0"
|
|
1391
1640
|
})(["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) {
|
|
@@ -1395,21 +1644,21 @@ var HeaderView = /*#__PURE__*/styled.View.withConfig({
|
|
|
1395
1644
|
var theme = _ref2.theme;
|
|
1396
1645
|
return theme.kitt.colors.separator;
|
|
1397
1646
|
});
|
|
1398
|
-
var LeftIconView = /*#__PURE__*/styled.
|
|
1647
|
+
var LeftIconView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1399
1648
|
displayName: "Header__LeftIconView",
|
|
1400
1649
|
componentId: "kitt-universal__sc-1iwabch-1"
|
|
1401
1650
|
})(["align-self:flex-start;margin-right:", "px;"], function (_ref3) {
|
|
1402
1651
|
var theme = _ref3.theme;
|
|
1403
1652
|
return theme.kitt.spacing * 2;
|
|
1404
1653
|
});
|
|
1405
|
-
var RightIconView = /*#__PURE__*/styled.
|
|
1654
|
+
var RightIconView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1406
1655
|
displayName: "Header__RightIconView",
|
|
1407
1656
|
componentId: "kitt-universal__sc-1iwabch-2"
|
|
1408
1657
|
})(["align-self:flex-start;margin-left:", "px;"], function (_ref4) {
|
|
1409
1658
|
var theme = _ref4.theme;
|
|
1410
1659
|
return theme.kitt.spacing * 2;
|
|
1411
1660
|
});
|
|
1412
|
-
var TitleView = /*#__PURE__*/styled.
|
|
1661
|
+
var TitleView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1413
1662
|
displayName: "Header__TitleView",
|
|
1414
1663
|
componentId: "kitt-universal__sc-1iwabch-3"
|
|
1415
1664
|
})(["padding-left:", "px;flex-shrink:1;"], function (_ref5) {
|
|
@@ -1432,7 +1681,7 @@ function ModalHeader(_ref6) {
|
|
|
1432
1681
|
})));
|
|
1433
1682
|
}
|
|
1434
1683
|
|
|
1435
|
-
var ModalView = /*#__PURE__*/styled.
|
|
1684
|
+
var ModalView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1436
1685
|
displayName: "Modal__ModalView",
|
|
1437
1686
|
componentId: "kitt-universal__sc-1xy2w5u-0"
|
|
1438
1687
|
})(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], function (_ref) {
|
|
@@ -1442,7 +1691,7 @@ var ModalView = /*#__PURE__*/styled.View.withConfig({
|
|
|
1442
1691
|
var theme = _ref2.theme;
|
|
1443
1692
|
return theme.kitt.spacing * 4;
|
|
1444
1693
|
});
|
|
1445
|
-
var ContentView = /*#__PURE__*/styled.
|
|
1694
|
+
var ContentView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1446
1695
|
displayName: "Modal__ContentView",
|
|
1447
1696
|
componentId: "kitt-universal__sc-1xy2w5u-1"
|
|
1448
1697
|
})(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", ";background-color:", ";"], function (_ref3) {
|
|
@@ -1495,11 +1744,90 @@ function Notification(_ref) {
|
|
|
1495
1744
|
}, children);
|
|
1496
1745
|
}
|
|
1497
1746
|
|
|
1498
|
-
var
|
|
1747
|
+
var PrimitiveLink = Text$1;
|
|
1748
|
+
|
|
1749
|
+
var Flex = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1750
|
+
shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {
|
|
1751
|
+
return !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop);
|
|
1752
|
+
}
|
|
1753
|
+
}).withConfig({
|
|
1754
|
+
displayName: "Flex",
|
|
1755
|
+
componentId: "kitt-universal__sc-15q3v3h-0"
|
|
1756
|
+
})(["display:flex;flex-direction:", ";flex-wrap:wrap;padding:", "px;"], function (_ref) {
|
|
1757
|
+
var direction = _ref.direction;
|
|
1758
|
+
return direction;
|
|
1759
|
+
}, function (_ref2) {
|
|
1760
|
+
var theme = _ref2.theme,
|
|
1761
|
+
_ref2$padding = _ref2.padding,
|
|
1762
|
+
padding = _ref2$padding === void 0 ? 0 : _ref2$padding;
|
|
1763
|
+
return padding * theme.kitt.spacing;
|
|
1764
|
+
});
|
|
1765
|
+
|
|
1766
|
+
var storyPadding = 16;
|
|
1767
|
+
|
|
1768
|
+
var getBackgroundColorFromBlockColor = function (theme) {
|
|
1769
|
+
var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'transparent';
|
|
1770
|
+
|
|
1771
|
+
switch (color) {
|
|
1772
|
+
case 'dark':
|
|
1773
|
+
return '#293033';
|
|
1774
|
+
|
|
1775
|
+
case 'light':
|
|
1776
|
+
return '#ffffff';
|
|
1777
|
+
|
|
1778
|
+
case 'primary':
|
|
1779
|
+
return theme.kitt.palettes.lateOcean.lateOcean;
|
|
1780
|
+
|
|
1781
|
+
default:
|
|
1782
|
+
return 'transparent';
|
|
1783
|
+
}
|
|
1784
|
+
};
|
|
1785
|
+
|
|
1786
|
+
var getTypographyColorFromBlockColor = function () {
|
|
1787
|
+
var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transparent';
|
|
1788
|
+
|
|
1789
|
+
switch (color) {
|
|
1790
|
+
case 'dark':
|
|
1791
|
+
case 'primary':
|
|
1792
|
+
return 'white';
|
|
1793
|
+
|
|
1794
|
+
case 'light':
|
|
1795
|
+
default:
|
|
1796
|
+
return 'black';
|
|
1797
|
+
}
|
|
1798
|
+
};
|
|
1799
|
+
|
|
1800
|
+
var StoryBlockBackgroundContext = /*#__PURE__*/createContext('transparent');
|
|
1801
|
+
var StoryBlockColorContext = /*#__PURE__*/createContext('black');
|
|
1802
|
+
var useStoryBlockColor = function (color) {
|
|
1803
|
+
var storyBlockColor = useContext(StoryBlockColorContext);
|
|
1804
|
+
return color || storyBlockColor;
|
|
1805
|
+
};
|
|
1806
|
+
var StyledStoryBlockView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1807
|
+
displayName: "StoryBlock__StyledStoryBlockView",
|
|
1808
|
+
componentId: "kitt-universal__sc-3w4hdm-0"
|
|
1809
|
+
})(["padding:16px ", "px 0;margin:0 -", "px;background:", ";"], storyPadding, storyPadding, function (_ref) {
|
|
1810
|
+
var theme = _ref.theme,
|
|
1811
|
+
background = _ref.background;
|
|
1812
|
+
return getBackgroundColorFromBlockColor(theme, background);
|
|
1813
|
+
});
|
|
1814
|
+
function StoryBlock(_ref2) {
|
|
1815
|
+
var children = _ref2.children,
|
|
1816
|
+
background = _ref2.background;
|
|
1817
|
+
return /*#__PURE__*/React.createElement(StyledStoryBlockView, {
|
|
1818
|
+
background: background
|
|
1819
|
+
}, /*#__PURE__*/React.createElement(StoryBlockColorContext.Provider, {
|
|
1820
|
+
value: getTypographyColorFromBlockColor(background)
|
|
1821
|
+
}, /*#__PURE__*/React.createElement(StoryBlockBackgroundContext.Provider, {
|
|
1822
|
+
value: background
|
|
1823
|
+
}, children)));
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
var StoryTitleContainer = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1499
1827
|
displayName: "StoryTitle__StoryTitleContainer",
|
|
1500
1828
|
componentId: "kitt-universal__sc-sic7hb-0"
|
|
1501
1829
|
})(["margin-bottom:30px;"]);
|
|
1502
|
-
var StorySubTitleContainer = /*#__PURE__*/styled.
|
|
1830
|
+
var StorySubTitleContainer = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1503
1831
|
displayName: "StoryTitle__StorySubTitleContainer",
|
|
1504
1832
|
componentId: "kitt-universal__sc-sic7hb-1"
|
|
1505
1833
|
})(["margin-bottom:10px;"]);
|
|
@@ -1507,10 +1835,10 @@ function StoryTitle(_ref) {
|
|
|
1507
1835
|
var color = _ref.color,
|
|
1508
1836
|
children = _ref.children,
|
|
1509
1837
|
numberOfLines = _ref.numberOfLines;
|
|
1510
|
-
return /*#__PURE__*/React.createElement(StoryTitleContainer, null, /*#__PURE__*/React.createElement(Typography.
|
|
1838
|
+
return /*#__PURE__*/React.createElement(StoryTitleContainer, null, /*#__PURE__*/React.createElement(Typography.Header1, {
|
|
1511
1839
|
variant: "bold",
|
|
1512
1840
|
base: "header1",
|
|
1513
|
-
color: color,
|
|
1841
|
+
color: useStoryBlockColor(color),
|
|
1514
1842
|
numberOfLines: numberOfLines
|
|
1515
1843
|
}, children));
|
|
1516
1844
|
}
|
|
@@ -1519,10 +1847,10 @@ function StoryTitleLevel2(_ref2) {
|
|
|
1519
1847
|
var color = _ref2.color,
|
|
1520
1848
|
children = _ref2.children,
|
|
1521
1849
|
numberOfLines = _ref2.numberOfLines;
|
|
1522
|
-
return /*#__PURE__*/React.createElement(StoryTitleContainer, null, /*#__PURE__*/React.createElement(Typography.
|
|
1850
|
+
return /*#__PURE__*/React.createElement(StoryTitleContainer, null, /*#__PURE__*/React.createElement(Typography.Header2, {
|
|
1523
1851
|
variant: "bold",
|
|
1524
1852
|
base: "header2",
|
|
1525
|
-
color: color,
|
|
1853
|
+
color: useStoryBlockColor(color),
|
|
1526
1854
|
numberOfLines: numberOfLines
|
|
1527
1855
|
}, children));
|
|
1528
1856
|
}
|
|
@@ -1533,11 +1861,11 @@ function StoryTitleLevel3(_ref3) {
|
|
|
1533
1861
|
var color = _ref3.color,
|
|
1534
1862
|
children = _ref3.children,
|
|
1535
1863
|
numberOfLines = _ref3.numberOfLines;
|
|
1536
|
-
return /*#__PURE__*/React.createElement(StorySubTitleContainer, null, /*#__PURE__*/React.createElement(Typography.
|
|
1864
|
+
return /*#__PURE__*/React.createElement(StorySubTitleContainer, null, /*#__PURE__*/React.createElement(Typography.Header3, {
|
|
1537
1865
|
variant: "bold",
|
|
1538
1866
|
base: "header3",
|
|
1539
1867
|
medium: "header4",
|
|
1540
|
-
color: color,
|
|
1868
|
+
color: useStoryBlockColor(color),
|
|
1541
1869
|
numberOfLines: numberOfLines
|
|
1542
1870
|
}, children));
|
|
1543
1871
|
}
|
|
@@ -1548,11 +1876,11 @@ function StoryTitleLevel4(_ref4) {
|
|
|
1548
1876
|
var color = _ref4.color,
|
|
1549
1877
|
children = _ref4.children,
|
|
1550
1878
|
numberOfLines = _ref4.numberOfLines;
|
|
1551
|
-
return /*#__PURE__*/React.createElement(StorySubTitleContainer, null, /*#__PURE__*/React.createElement(Typography.
|
|
1879
|
+
return /*#__PURE__*/React.createElement(StorySubTitleContainer, null, /*#__PURE__*/React.createElement(Typography.Header4, {
|
|
1552
1880
|
variant: "bold",
|
|
1553
1881
|
base: "header4",
|
|
1554
1882
|
medium: "header5",
|
|
1555
|
-
color: color,
|
|
1883
|
+
color: useStoryBlockColor(color),
|
|
1556
1884
|
numberOfLines: numberOfLines
|
|
1557
1885
|
}, children));
|
|
1558
1886
|
}
|
|
@@ -1562,24 +1890,40 @@ StoryTitle.Level2 = StoryTitleLevel2;
|
|
|
1562
1890
|
StoryTitle.Level3 = StoryTitleLevel3;
|
|
1563
1891
|
StoryTitle.Level4 = StoryTitleLevel4;
|
|
1564
1892
|
|
|
1565
|
-
var
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1893
|
+
var StoryContainer$1 = /*#__PURE__*/styled(PrimitiveScrollView).withConfig({
|
|
1894
|
+
displayName: "Story__StoryContainer",
|
|
1895
|
+
componentId: "kitt-universal__sc-1kwdg2p-0"
|
|
1896
|
+
})(["padding:", "px;"], storyPadding);
|
|
1897
|
+
function Story(_ref) {
|
|
1898
|
+
var title = _ref.title,
|
|
1899
|
+
contentContainerStyle = _ref.contentContainerStyle,
|
|
1900
|
+
children = _ref.children;
|
|
1901
|
+
return /*#__PURE__*/React.createElement(StoryContainer$1, {
|
|
1902
|
+
contentContainerStyle: contentContainerStyle
|
|
1903
|
+
}, /*#__PURE__*/React.createElement(StoryTitle, null, title), children);
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
var _excluded$2 = ["title", "className", "children", "internalIsDemoSection"],
|
|
1907
|
+
_excluded2 = ["title", "className", "children"],
|
|
1908
|
+
_excluded3 = ["title", "className", "children"];
|
|
1909
|
+
var StyledSection = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1910
|
+
displayName: "StorySection__StyledSection",
|
|
1911
|
+
componentId: "kitt-universal__sc-1b3liv5-0"
|
|
1912
|
+
})(["margin-bottom:32px;"]);
|
|
1913
|
+
function StorySection(_ref) {
|
|
1572
1914
|
var title = _ref.title;
|
|
1573
1915
|
_ref.className;
|
|
1574
1916
|
var children = _ref.children,
|
|
1917
|
+
internalIsDemoSection = _ref.internalIsDemoSection,
|
|
1575
1918
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
1576
1919
|
|
|
1920
|
+
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
1577
1921
|
return /*#__PURE__*/React.createElement(StyledSection, props, /*#__PURE__*/React.createElement(StoryTitle.Level2, null, title), children);
|
|
1578
1922
|
}
|
|
1579
|
-
var StyledSubSection = /*#__PURE__*/styled.
|
|
1580
|
-
displayName: "
|
|
1581
|
-
componentId: "kitt-universal__sc-
|
|
1582
|
-
})(["margin-bottom:
|
|
1923
|
+
var StyledSubSection = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1924
|
+
displayName: "StorySection__StyledSubSection",
|
|
1925
|
+
componentId: "kitt-universal__sc-1b3liv5-1"
|
|
1926
|
+
})(["margin-bottom:16px;"]);
|
|
1583
1927
|
|
|
1584
1928
|
function SubSection(_ref2) {
|
|
1585
1929
|
var title = _ref2.title;
|
|
@@ -1590,32 +1934,55 @@ function SubSection(_ref2) {
|
|
|
1590
1934
|
return /*#__PURE__*/React.createElement(StyledSubSection, props, /*#__PURE__*/React.createElement(StoryTitle.Level3, null, title), children);
|
|
1591
1935
|
}
|
|
1592
1936
|
|
|
1593
|
-
var
|
|
1594
|
-
displayName: "
|
|
1595
|
-
componentId: "kitt-universal__sc-
|
|
1596
|
-
})(["margin-bottom:
|
|
1937
|
+
var StyledBlockSection = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1938
|
+
displayName: "StorySection__StyledBlockSection",
|
|
1939
|
+
componentId: "kitt-universal__sc-1b3liv5-2"
|
|
1940
|
+
})(["margin-bottom:16px;"]);
|
|
1597
1941
|
|
|
1598
|
-
function
|
|
1599
|
-
var
|
|
1600
|
-
|
|
1942
|
+
function BlockSection(_ref3) {
|
|
1943
|
+
var title = _ref3.title;
|
|
1944
|
+
_ref3.className;
|
|
1945
|
+
var children = _ref3.children,
|
|
1946
|
+
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
1947
|
+
|
|
1948
|
+
return /*#__PURE__*/React.createElement(StyledBlockSection, props, /*#__PURE__*/React.createElement(StoryTitle.Level4, null, title), children);
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
var StyledDemoSection = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1952
|
+
displayName: "StorySection__StyledDemoSection",
|
|
1953
|
+
componentId: "kitt-universal__sc-1b3liv5-3"
|
|
1954
|
+
})(["margin-bottom:64px;"]);
|
|
1955
|
+
|
|
1956
|
+
function DemoSection(_ref4) {
|
|
1957
|
+
var children = _ref4.children;
|
|
1958
|
+
return /*#__PURE__*/React.createElement(StyledDemoSection, null, /*#__PURE__*/React.createElement(StorySection, {
|
|
1959
|
+
internalIsDemoSection: true,
|
|
1601
1960
|
title: "Demo"
|
|
1602
1961
|
}, children));
|
|
1603
1962
|
}
|
|
1604
1963
|
|
|
1605
|
-
|
|
1606
|
-
|
|
1964
|
+
StorySection.SubSection = SubSection;
|
|
1965
|
+
StorySection.BlockSection = BlockSection;
|
|
1966
|
+
/** @deprecated use StorySection.Demo instead */
|
|
1607
1967
|
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1968
|
+
StorySection.DemoSection = DemoSection;
|
|
1969
|
+
StorySection.Demo = DemoSection;
|
|
1970
|
+
/** @deprecated use StorySection instead */
|
|
1971
|
+
|
|
1972
|
+
var DeprecatedSection = StorySection;
|
|
1973
|
+
|
|
1974
|
+
function StoryContainer(_ref) {
|
|
1975
|
+
var children = _ref.children,
|
|
1976
|
+
title = _ref.title,
|
|
1977
|
+
_ref$state = _ref.state,
|
|
1978
|
+
state = _ref$state === void 0 ? 'none' : _ref$state,
|
|
1979
|
+
_ref$platform = _ref.platform,
|
|
1980
|
+
platform = _ref$platform === void 0 ? 'all' : _ref$platform;
|
|
1981
|
+
if (platform === 'web') return null;
|
|
1982
|
+
return /*#__PURE__*/React.createElement(StorySection.BlockSection, {
|
|
1983
|
+
testID: state,
|
|
1984
|
+
title: title
|
|
1985
|
+
}, children);
|
|
1619
1986
|
}
|
|
1620
1987
|
|
|
1621
1988
|
function StoryDecorator(storyFn, context) {
|
|
@@ -1624,22 +1991,22 @@ function StoryDecorator(storyFn, context) {
|
|
|
1624
1991
|
}, storyFn());
|
|
1625
1992
|
}
|
|
1626
1993
|
|
|
1627
|
-
var SmallScreenRow = /*#__PURE__*/styled.
|
|
1994
|
+
var SmallScreenRow = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1628
1995
|
displayName: "StoryGrid__SmallScreenRow",
|
|
1629
1996
|
componentId: "kitt-universal__sc-4z5new-0"
|
|
1630
1997
|
})(["flex-direction:column;margin:0;"]);
|
|
1631
|
-
var SmallScreenCol = /*#__PURE__*/styled.
|
|
1998
|
+
var SmallScreenCol = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1632
1999
|
displayName: "StoryGrid__SmallScreenCol",
|
|
1633
2000
|
componentId: "kitt-universal__sc-4z5new-1"
|
|
1634
|
-
})(["padding:
|
|
1635
|
-
var FlexRow = /*#__PURE__*/styled.
|
|
2001
|
+
})(["padding:8px 0 16px;"]);
|
|
2002
|
+
var FlexRow = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1636
2003
|
displayName: "StoryGrid__FlexRow",
|
|
1637
2004
|
componentId: "kitt-universal__sc-4z5new-2"
|
|
1638
|
-
})(["flex-direction:row;margin:0 -
|
|
1639
|
-
var FlexCol = /*#__PURE__*/styled.
|
|
2005
|
+
})(["flex-direction:row;margin:0 -4px 16px;"]);
|
|
2006
|
+
var FlexCol = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1640
2007
|
displayName: "StoryGrid__FlexCol",
|
|
1641
2008
|
componentId: "kitt-universal__sc-4z5new-3"
|
|
1642
|
-
})(["flex-grow:1;flex-basis:0;margin:0
|
|
2009
|
+
})(["flex-grow:1;flex-basis:0;margin:0 8px;"]);
|
|
1643
2010
|
|
|
1644
2011
|
function StoryGridRow(_ref) {
|
|
1645
2012
|
var children = _ref.children,
|
|
@@ -1667,7 +2034,19 @@ function StoryGridRow(_ref) {
|
|
|
1667
2034
|
function StoryGridCol(_ref2) {
|
|
1668
2035
|
var title = _ref2.title,
|
|
1669
2036
|
titleColor = _ref2.titleColor,
|
|
1670
|
-
children = _ref2.children
|
|
2037
|
+
children = _ref2.children,
|
|
2038
|
+
_ref2$platform = _ref2.platform,
|
|
2039
|
+
platform = _ref2$platform === void 0 ? 'all' : _ref2$platform;
|
|
2040
|
+
var isNative = Platform.OS === 'ios' || Platform.OS === 'android';
|
|
2041
|
+
|
|
2042
|
+
if (Platform.OS === 'web' && platform === 'native') {
|
|
2043
|
+
return null;
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
if (isNative && platform === 'web') {
|
|
2047
|
+
return null;
|
|
2048
|
+
}
|
|
2049
|
+
|
|
1671
2050
|
return /*#__PURE__*/React.createElement(React.Fragment, null, title ? /*#__PURE__*/React.createElement(StoryTitle.Level4, {
|
|
1672
2051
|
numberOfLines: 1,
|
|
1673
2052
|
color: titleColor
|
|
@@ -1679,7 +2058,7 @@ var StoryGrid = {
|
|
|
1679
2058
|
Col: StoryGridCol
|
|
1680
2059
|
};
|
|
1681
2060
|
|
|
1682
|
-
var Container = /*#__PURE__*/styled.
|
|
2061
|
+
var Container = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1683
2062
|
displayName: "Tag__Container",
|
|
1684
2063
|
componentId: "kitt-universal__sc-19jmowi-0"
|
|
1685
2064
|
})(["background-color:", ";padding:", ";border-radius:", ";align-self:flex-start;"], function (_ref) {
|
|
@@ -1723,7 +2102,9 @@ var lateOceanColorPalette = {
|
|
|
1723
2102
|
englishVermillon: '#D44148',
|
|
1724
2103
|
goldCrayola: '#F8C583',
|
|
1725
2104
|
aero: '#89BDDD',
|
|
1726
|
-
transparent: 'transparent'
|
|
2105
|
+
transparent: 'transparent',
|
|
2106
|
+
moonPurple: '#DBD6F9',
|
|
2107
|
+
moonPurpleLight1: '#EDEBFC'
|
|
1727
2108
|
};
|
|
1728
2109
|
|
|
1729
2110
|
var avatarLateOceanTheme = {
|
|
@@ -1770,6 +2151,14 @@ var buttonLateOceanTheme = {
|
|
|
1770
2151
|
disabledBackgroundColor: lateOceanColorPalette.transparent,
|
|
1771
2152
|
pressedBackgroundColor: lateOceanColorPalette.transparent,
|
|
1772
2153
|
disabledBorderColor: lateOceanColorPalette.transparent
|
|
2154
|
+
},
|
|
2155
|
+
white: {
|
|
2156
|
+
backgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
2157
|
+
disabledBackgroundColor: lateOceanColorPalette.transparent,
|
|
2158
|
+
hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
2159
|
+
pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
2160
|
+
focusBorderColor: 'rgba(255, 255, 255, 0.1)',
|
|
2161
|
+
disabledBorderColor: lateOceanColorPalette.transparent
|
|
1773
2162
|
}
|
|
1774
2163
|
};
|
|
1775
2164
|
|
|
@@ -1793,6 +2182,7 @@ var cardLateOceanTheme = {
|
|
|
1793
2182
|
|
|
1794
2183
|
var colorsLateOceanTheme = {
|
|
1795
2184
|
primary: lateOceanColorPalette.lateOcean,
|
|
2185
|
+
primaryLight: lateOceanColorPalette.lateOceanLight1,
|
|
1796
2186
|
accent: lateOceanColorPalette.warmEmbrace,
|
|
1797
2187
|
accentLight: lateOceanColorPalette.warmEmbraceLight1,
|
|
1798
2188
|
success: lateOceanColorPalette.viride,
|
|
@@ -1898,6 +2288,41 @@ var fullScreenModalLateOceanTheme = {
|
|
|
1898
2288
|
}
|
|
1899
2289
|
};
|
|
1900
2290
|
|
|
2291
|
+
var iconButton = {
|
|
2292
|
+
backgroundColor: 'transparent',
|
|
2293
|
+
width: 40,
|
|
2294
|
+
height: 40,
|
|
2295
|
+
borderRadius: 20,
|
|
2296
|
+
borderWidth: 2,
|
|
2297
|
+
borderColor: 'transparent',
|
|
2298
|
+
transition: {
|
|
2299
|
+
property: 'all',
|
|
2300
|
+
duration: '200ms',
|
|
2301
|
+
timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1);'
|
|
2302
|
+
},
|
|
2303
|
+
scale: {
|
|
2304
|
+
base: {
|
|
2305
|
+
"default": 1,
|
|
2306
|
+
hover: 0.95,
|
|
2307
|
+
active: 0.95
|
|
2308
|
+
},
|
|
2309
|
+
medium: {
|
|
2310
|
+
hover: 1.05
|
|
2311
|
+
}
|
|
2312
|
+
},
|
|
2313
|
+
disabled: {
|
|
2314
|
+
scale: 1,
|
|
2315
|
+
backgroundColor: buttonLateOceanTheme.secondary.disabledBackgroundColor,
|
|
2316
|
+
borderColor: buttonLateOceanTheme.secondary.disabledBorderColor
|
|
2317
|
+
},
|
|
2318
|
+
"default": {
|
|
2319
|
+
pressedBackgroundColor: buttonLateOceanTheme.secondary.pressedBackgroundColor
|
|
2320
|
+
},
|
|
2321
|
+
white: {
|
|
2322
|
+
pressedBackgroundColor: buttonLateOceanTheme.white.hoverBackgroundColor
|
|
2323
|
+
}
|
|
2324
|
+
};
|
|
2325
|
+
|
|
1901
2326
|
var listItemLateOceanTheme = {
|
|
1902
2327
|
padding: '12px 16px',
|
|
1903
2328
|
borderColor: colorsLateOceanTheme.separator,
|
|
@@ -1913,9 +2338,7 @@ var tagLateOceanTheme = {
|
|
|
1913
2338
|
borderRadius: '10px',
|
|
1914
2339
|
padding: '2px 12px',
|
|
1915
2340
|
primary: {
|
|
1916
|
-
|
|
1917
|
-
// TODO: validate Moon shadow color with design team
|
|
1918
|
-
backgroundColor: '#EDEBFC'
|
|
2341
|
+
backgroundColor: lateOceanColorPalette.moonPurpleLight1
|
|
1919
2342
|
},
|
|
1920
2343
|
"default": {
|
|
1921
2344
|
backgroundColor: lateOceanColorPalette.black50
|
|
@@ -1946,8 +2369,6 @@ var typographyLateOceanTheme = {
|
|
|
1946
2369
|
colors: {
|
|
1947
2370
|
black: lateOceanColorPalette.black1000,
|
|
1948
2371
|
'black-light': lateOceanColorPalette.black555,
|
|
1949
|
-
grey: lateOceanColorPalette.black555,
|
|
1950
|
-
'grey-light': lateOceanColorPalette.black200,
|
|
1951
2372
|
white: lateOceanColorPalette.white,
|
|
1952
2373
|
'white-light': lateOceanColorPalette.white,
|
|
1953
2374
|
primary: lateOceanColorPalette.lateOcean,
|
|
@@ -1960,8 +2381,7 @@ var typographyLateOceanTheme = {
|
|
|
1960
2381
|
headers: {
|
|
1961
2382
|
fontFamily: {
|
|
1962
2383
|
regular: Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold',
|
|
1963
|
-
bold: Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold'
|
|
1964
|
-
italic: Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold'
|
|
2384
|
+
bold: Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold'
|
|
1965
2385
|
},
|
|
1966
2386
|
fontWeight: 400,
|
|
1967
2387
|
fontStyle: 'normal',
|
|
@@ -1981,18 +2401,15 @@ var typographyLateOceanTheme = {
|
|
|
1981
2401
|
bodies: {
|
|
1982
2402
|
fontFamily: {
|
|
1983
2403
|
regular: Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans',
|
|
1984
|
-
bold: Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans-Bold'
|
|
1985
|
-
italic: Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans-Italic'
|
|
2404
|
+
bold: Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans-Bold'
|
|
1986
2405
|
},
|
|
1987
2406
|
fontWeight: {
|
|
1988
2407
|
regular: 400,
|
|
1989
|
-
bold: 700
|
|
1990
|
-
italic: 400
|
|
2408
|
+
bold: 700
|
|
1991
2409
|
},
|
|
1992
2410
|
fontStyle: {
|
|
1993
2411
|
regular: 'normal',
|
|
1994
|
-
bold: 'normal'
|
|
1995
|
-
italic: 'italic'
|
|
2412
|
+
bold: 'normal'
|
|
1996
2413
|
},
|
|
1997
2414
|
configs: {
|
|
1998
2415
|
'body-large': createTypographyTypeConfig(1.6, 18, 24),
|
|
@@ -2002,9 +2419,35 @@ var typographyLateOceanTheme = {
|
|
|
2002
2419
|
'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
|
|
2003
2420
|
}
|
|
2004
2421
|
}
|
|
2422
|
+
},
|
|
2423
|
+
link: {
|
|
2424
|
+
disabledColor: lateOceanColorPalette.black200
|
|
2005
2425
|
}
|
|
2006
2426
|
};
|
|
2007
2427
|
|
|
2428
|
+
var breakpoints = {
|
|
2429
|
+
values: {
|
|
2430
|
+
base: 0,
|
|
2431
|
+
small: 480,
|
|
2432
|
+
medium: 768,
|
|
2433
|
+
large: 1024,
|
|
2434
|
+
wide: 1280
|
|
2435
|
+
},
|
|
2436
|
+
min: {
|
|
2437
|
+
smallBreakpoint: 'min-width: 480px',
|
|
2438
|
+
mediumBreakpoint: 'min-width: 768px',
|
|
2439
|
+
largeBreakpoint: 'min-width: 1024px',
|
|
2440
|
+
wideBreakpoint: 'min-width: 1280px'
|
|
2441
|
+
},
|
|
2442
|
+
max: {
|
|
2443
|
+
smallBreakpoint: 'max-width: 479px',
|
|
2444
|
+
mediumBreakpoint: 'max-width: 767px',
|
|
2445
|
+
largeBreakpoint: 'max-width: 1023px',
|
|
2446
|
+
wideBreakpoint: 'max-width: 1279px'
|
|
2447
|
+
}
|
|
2448
|
+
}; // eslint-disable-next-line unicorn/expiring-todo-comments
|
|
2449
|
+
// TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
|
|
2450
|
+
|
|
2008
2451
|
var theme = {
|
|
2009
2452
|
spacing: 4,
|
|
2010
2453
|
colors: colorsLateOceanTheme,
|
|
@@ -2020,42 +2463,47 @@ var theme = {
|
|
|
2020
2463
|
tag: tagLateOceanTheme,
|
|
2021
2464
|
shadows: shadowsLateOceanTheme,
|
|
2022
2465
|
fullScreenModal: fullScreenModalLateOceanTheme,
|
|
2466
|
+
iconButton: iconButton,
|
|
2023
2467
|
listItem: listItemLateOceanTheme
|
|
2024
2468
|
};
|
|
2025
2469
|
|
|
2026
2470
|
function Tooltip(_ref) {
|
|
2027
2471
|
var children = _ref.children;
|
|
2028
|
-
return /*#__PURE__*/React.createElement(
|
|
2472
|
+
return /*#__PURE__*/React.createElement(PrimitiveView, null, children);
|
|
2029
2473
|
}
|
|
2030
2474
|
|
|
2031
|
-
var _excluded$1 = ["disabled", "noUnderline", "
|
|
2032
|
-
var StyledLink = /*#__PURE__*/styled(
|
|
2475
|
+
var _excluded$1 = ["children", "disabled", "noUnderline", "onPress"];
|
|
2476
|
+
var StyledLink = /*#__PURE__*/styled(PrimitiveLink).withConfig({
|
|
2033
2477
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2034
2478
|
return !['disabled', 'noUnderline'].includes(prop);
|
|
2035
2479
|
}
|
|
2036
2480
|
}).withConfig({
|
|
2037
2481
|
displayName: "TypographyLink__StyledLink",
|
|
2038
2482
|
componentId: "kitt-universal__sc-1o1zy30-0"
|
|
2039
|
-
})(["text-decoration:", ";", "
|
|
2483
|
+
})(["text-decoration:", ";", ""], function (_ref) {
|
|
2040
2484
|
var noUnderline = _ref.noUnderline;
|
|
2041
2485
|
return noUnderline ? 'none' : 'underline';
|
|
2042
2486
|
}, function (_ref2) {
|
|
2043
|
-
var disabled = _ref2.disabled
|
|
2044
|
-
|
|
2487
|
+
var disabled = _ref2.disabled,
|
|
2488
|
+
theme = _ref2.theme,
|
|
2489
|
+
noUnderline = _ref2.noUnderline;
|
|
2490
|
+
return "\n ".concat(disabled ? "color: ".concat(theme.kitt.typography.link.disabledColor, ";") : '', "\n ").concat(Platform.OS === 'web' ? "\n text-decoration-color: inherit;\n transition: color 0.2s ease-in-out;\n cursor: ".concat(disabled ? 'not-allowed' : 'pointer', ";\n\n\n &:hover, &:active, .kitt-hover & {\n text-decoration: ").concat(noUnderline ? 'underline' : 'none', ";\n }\n ") : '');
|
|
2045
2491
|
});
|
|
2046
2492
|
function TypographyLink(_ref3) {
|
|
2047
|
-
var
|
|
2493
|
+
var children = _ref3.children,
|
|
2494
|
+
disabled = _ref3.disabled,
|
|
2048
2495
|
noUnderline = _ref3.noUnderline,
|
|
2049
|
-
|
|
2050
|
-
variant = _ref3$variant === void 0 ? 'bold' : _ref3$variant,
|
|
2496
|
+
onPress = _ref3.onPress,
|
|
2051
2497
|
otherProps = _objectWithoutProperties(_ref3, _excluded$1);
|
|
2052
2498
|
|
|
2053
|
-
return /*#__PURE__*/React.createElement(
|
|
2499
|
+
return /*#__PURE__*/React.createElement(Typography, _extends({}, otherProps, {
|
|
2500
|
+
accessibilityRole: "none"
|
|
2501
|
+
}), /*#__PURE__*/React.createElement(StyledLink, {
|
|
2054
2502
|
disabled: disabled,
|
|
2055
2503
|
noUnderline: noUnderline,
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
},
|
|
2504
|
+
accessibilityRole: "link",
|
|
2505
|
+
onPress: disabled ? undefined : onPress
|
|
2506
|
+
}, children));
|
|
2059
2507
|
}
|
|
2060
2508
|
|
|
2061
2509
|
function matchWindowSize(currentWidth, _ref) {
|
|
@@ -2083,7 +2531,7 @@ function createWindowSizeHelper(currentWidth) {
|
|
|
2083
2531
|
widthList[_key] = arguments[_key];
|
|
2084
2532
|
}
|
|
2085
2533
|
|
|
2086
|
-
if (process.env.NODE_ENV !== "production") {
|
|
2534
|
+
if ((process.env.NODE_ENV !== "production")) {
|
|
2087
2535
|
widthList.slice(1).forEach(function (_ref, index) {
|
|
2088
2536
|
var _ref2 = _slicedToArray(_ref, 1),
|
|
2089
2537
|
minWidth = _ref2[0];
|
|
@@ -2118,11 +2566,39 @@ function useKittTheme() {
|
|
|
2118
2566
|
return useMemo(function () {
|
|
2119
2567
|
return {
|
|
2120
2568
|
kitt: theme,
|
|
2121
|
-
responsive: createWindowSizeHelper(width)
|
|
2569
|
+
responsive: createWindowSizeHelper(width),
|
|
2570
|
+
breakpoints: breakpoints
|
|
2122
2571
|
};
|
|
2123
2572
|
}, [width]);
|
|
2124
2573
|
}
|
|
2125
2574
|
|
|
2575
|
+
function KittThemeProvider(_ref) {
|
|
2576
|
+
var children = _ref.children;
|
|
2577
|
+
var theme = useKittTheme();
|
|
2578
|
+
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
2579
|
+
theme: theme
|
|
2580
|
+
}, children);
|
|
2581
|
+
}
|
|
2582
|
+
var KittThemeDecorator = makeDecorator({
|
|
2583
|
+
name: 'ThemeDecorator',
|
|
2584
|
+
parameterName: 'theme',
|
|
2585
|
+
wrapper: function wrapper(storyFn, context, _ref2) {
|
|
2586
|
+
_ref2.options;
|
|
2587
|
+
_ref2.parameters;
|
|
2588
|
+
return /*#__PURE__*/React.createElement(KittThemeProvider, null, storyFn(context));
|
|
2589
|
+
}
|
|
2590
|
+
});
|
|
2591
|
+
|
|
2592
|
+
var SafeAreaProviderDecorator = makeDecorator({
|
|
2593
|
+
name: 'SafeAreaProviderDecorator',
|
|
2594
|
+
parameterName: 'safeAreaProvider',
|
|
2595
|
+
wrapper: function wrapper(storyFn, context, _ref) {
|
|
2596
|
+
_ref.options;
|
|
2597
|
+
_ref.parameters;
|
|
2598
|
+
return /*#__PURE__*/React.createElement(SafeAreaProvider, null, storyFn(context));
|
|
2599
|
+
}
|
|
2600
|
+
});
|
|
2601
|
+
|
|
2126
2602
|
var _excluded = ["children"];
|
|
2127
2603
|
function MatchWindowSize(_ref) {
|
|
2128
2604
|
var children = _ref.children,
|
|
@@ -2133,5 +2609,5 @@ function MatchWindowSize(_ref) {
|
|
|
2133
2609
|
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
2134
2610
|
}
|
|
2135
2611
|
|
|
2136
|
-
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 };
|
|
2612
|
+
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 };
|
|
2137
2613
|
//# sourceMappingURL=index-browser-all.es.js.map
|