@ornikar/kitt-universal 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -12
- 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 +1 -2
- 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 +5 -2
- package/dist/definitions/Icon/SpinningIcon.web.d.ts.map +1 -1
- package/dist/definitions/ListItem/ListItem.d.ts +3 -5
- package/dist/definitions/ListItem/ListItem.d.ts.map +1 -1
- package/dist/definitions/ListItem/ListItemContent.d.ts +2 -2
- package/dist/definitions/ListItem/ListItemContent.d.ts.map +1 -1
- package/dist/definitions/ListItem/ListItemSideContent.d.ts +3 -4
- package/dist/definitions/ListItem/ListItemSideContent.d.ts.map +1 -1
- package/dist/definitions/Loader/LargeLoader.web.d.ts.map +1 -1
- package/dist/definitions/Message/Message.d.ts.map +1 -1
- package/dist/definitions/Modal/Body.d.ts +4 -2
- 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 +1 -0
- 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 +1 -15
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/story-components/Section.d.ts +18 -0
- package/dist/definitions/story-components/Section.d.ts.map +1 -0
- package/dist/definitions/story-components/Story.d.ts.map +1 -1
- package/dist/definitions/story-components/StoryGrid.d.ts +1 -2
- package/dist/definitions/story-components/StoryGrid.d.ts.map +1 -1
- package/dist/definitions/story-components/StoryTitle.d.ts.map +1 -1
- package/dist/definitions/story-components/index.d.ts +1 -10
- package/dist/definitions/story-components/index.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +0 -34
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/buttonLateOceanTheme.d.ts +0 -8
- package/dist/definitions/themes/late-ocean/buttonLateOceanTheme.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts +0 -3
- package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts.map +1 -1
- package/dist/definitions/typography/Typography.d.ts +3 -9
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/definitions/typography/TypographyLink.d.ts +4 -6
- package/dist/definitions/typography/TypographyLink.d.ts.map +1 -1
- package/dist/definitions/utils/windowSize/createWindowSizeHelper.d.ts +2 -2
- package/dist/index-browser-all.es.android.js +143 -578
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +143 -578
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +134 -613
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +163 -723
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +122 -640
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/styles.css +117 -0
- package/dist/tsbuildinfo +1 -1
- package/package.json +3 -9
- package/dist/definitions/IconButton/IconButton.d.ts +0 -11
- package/dist/definitions/IconButton/IconButton.d.ts.map +0 -1
- package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts +0 -13
- package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts.map +0 -1
- package/dist/definitions/IconButton/PressableIconButton.d.ts +0 -8
- package/dist/definitions/IconButton/PressableIconButton.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveLink.d.ts +0 -11
- package/dist/definitions/primitives/PrimitiveLink.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveLink.web.d.ts +0 -4
- package/dist/definitions/primitives/PrimitiveLink.web.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitivePressable.d.ts +0 -16
- package/dist/definitions/primitives/PrimitivePressable.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitivePressable.web.d.ts +0 -4
- package/dist/definitions/primitives/PrimitivePressable.web.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveScrollView.d.ts +0 -8
- package/dist/definitions/primitives/PrimitiveScrollView.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveScrollView.web.d.ts +0 -4
- package/dist/definitions/primitives/PrimitiveScrollView.web.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveText.d.ts +0 -14
- package/dist/definitions/primitives/PrimitiveText.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveText.web.d.ts +0 -6
- package/dist/definitions/primitives/PrimitiveText.web.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveView.d.ts +0 -21
- package/dist/definitions/primitives/PrimitiveView.d.ts.map +0 -1
- package/dist/definitions/primitives/PrimitiveView.web.d.ts +0 -23
- package/dist/definitions/primitives/PrimitiveView.web.d.ts.map +0 -1
- package/dist/definitions/primitives/helpers.d.ts +0 -7
- package/dist/definitions/primitives/helpers.d.ts.map +0 -1
- package/dist/definitions/primitives/reset.d.ts +0 -2
- package/dist/definitions/primitives/reset.d.ts.map +0 -1
- package/dist/definitions/story-components/Flex.d.ts +0 -9
- package/dist/definitions/story-components/Flex.d.ts.map +0 -1
- package/dist/definitions/story-components/StoryBlock.d.ts +0 -11
- package/dist/definitions/story-components/StoryBlock.d.ts.map +0 -1
- package/dist/definitions/story-components/StoryContainer.d.ts +0 -9
- package/dist/definitions/story-components/StoryContainer.d.ts.map +0 -1
- package/dist/definitions/story-components/StoryContainer.web.d.ts +0 -4
- package/dist/definitions/story-components/StoryContainer.web.d.ts.map +0 -1
- package/dist/definitions/story-components/StorySection.d.ts +0 -23
- package/dist/definitions/story-components/StorySection.d.ts.map +0 -1
- package/dist/definitions/story-components/theme.d.ts +0 -2
- package/dist/definitions/story-components/theme.d.ts.map +0 -1
- package/dist/definitions/themes/late-ocean/iconButton.d.ts +0 -36
- package/dist/definitions/themes/late-ocean/iconButton.d.ts.map +0 -1
- package/dist/definitions/utils/tests/styled-component-typing-test.d.ts +0 -18
- package/dist/definitions/utils/tests/styled-component-typing-test.d.ts.map +0 -1
|
@@ -2,17 +2,13 @@ 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,
|
|
6
|
-
import {
|
|
5
|
+
import React, { useRef, useEffect, useContext, createContext, useState, forwardRef, useMemo } from 'react';
|
|
6
|
+
import { Animated, Easing, Image, Platform, useWindowDimensions, Pressable, ActivityIndicator, View, StyleSheet, ScrollView, Modal as Modal$1 } from 'react-native';
|
|
7
7
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
8
|
-
import styled, { useTheme, css
|
|
8
|
+
import styled, { useTheme, css } from 'styled-components/native';
|
|
9
9
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
10
|
-
import { useSafeAreaInsets
|
|
11
|
-
import Animated$1, { useSharedValue, useAnimatedStyle, withSpring } from 'react-native-reanimated';
|
|
10
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
12
11
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
13
|
-
import { makeDecorator } from '@storybook/addons';
|
|
14
|
-
|
|
15
|
-
var PrimitiveView = View;
|
|
16
12
|
|
|
17
13
|
function SpinningIcon(_ref) {
|
|
18
14
|
var children = _ref.children;
|
|
@@ -45,7 +41,7 @@ function SpinningIcon(_ref) {
|
|
|
45
41
|
}, children);
|
|
46
42
|
}
|
|
47
43
|
|
|
48
|
-
var IconContainer$2 = /*#__PURE__*/styled
|
|
44
|
+
var IconContainer$2 = /*#__PURE__*/styled.View.withConfig({
|
|
49
45
|
displayName: "Icon__IconContainer",
|
|
50
46
|
componentId: "kitt-universal__sc-usm0ol-0"
|
|
51
47
|
})(["color:", ";width:", "px;height:", "px;align-self:", ";"], function (_ref) {
|
|
@@ -79,15 +75,13 @@ function Icon(_ref5) {
|
|
|
79
75
|
}, spin ? /*#__PURE__*/React.createElement(SpinningIcon, null, clonedIcon) : clonedIcon);
|
|
80
76
|
}
|
|
81
77
|
|
|
82
|
-
var PrimitiveText = Text$1;
|
|
83
|
-
|
|
84
78
|
var _excluded$9 = ["accessibilityRole", "base", "variant", "color"];
|
|
85
79
|
var TypographyTypeContext = /*#__PURE__*/createContext(undefined);
|
|
86
80
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
87
81
|
function useTypographyColor() {
|
|
88
82
|
return useContext(TypographyColorContext);
|
|
89
83
|
}
|
|
90
|
-
var StyledTypography = /*#__PURE__*/styled
|
|
84
|
+
var StyledTypography = /*#__PURE__*/styled.Text.withConfig({
|
|
91
85
|
displayName: "Typography__StyledTypography",
|
|
92
86
|
componentId: "kitt-universal__sc-1dz700q-0"
|
|
93
87
|
})(["", " ", ""], function (_ref) {
|
|
@@ -116,8 +110,8 @@ var isTypographyHeader = function (base, typeInContext) {
|
|
|
116
110
|
};
|
|
117
111
|
|
|
118
112
|
function Typography(_ref3) {
|
|
119
|
-
|
|
120
|
-
base = _ref3.base,
|
|
113
|
+
_ref3.accessibilityRole;
|
|
114
|
+
var base = _ref3.base,
|
|
121
115
|
variant = _ref3.variant,
|
|
122
116
|
color = _ref3.color,
|
|
123
117
|
otherProps = _objectWithoutProperties(_ref3, _excluded$9);
|
|
@@ -135,13 +129,11 @@ function Typography(_ref3) {
|
|
|
135
129
|
color: colorWithDefaultToBlack,
|
|
136
130
|
isHeader: isHeader,
|
|
137
131
|
type: base,
|
|
138
|
-
variant: nonNullableVariant
|
|
139
|
-
accessibilityRole: accessibilityRole || undefined
|
|
132
|
+
variant: nonNullableVariant
|
|
140
133
|
}, otherProps))) : /*#__PURE__*/React.createElement(StyledTypography, _extends({
|
|
141
134
|
color: colorWithDefaultToBlack,
|
|
142
135
|
isHeader: isHeader,
|
|
143
|
-
variant: nonNullableVariant
|
|
144
|
-
accessibilityRole: accessibilityRole || undefined
|
|
136
|
+
variant: nonNullableVariant
|
|
145
137
|
}, otherProps));
|
|
146
138
|
return color ? /*#__PURE__*/React.createElement(TypographyColorContext.Provider, {
|
|
147
139
|
value: color
|
|
@@ -155,19 +147,19 @@ function TypographyText(props) {
|
|
|
155
147
|
}
|
|
156
148
|
|
|
157
149
|
function TypographyParagraph(props) {
|
|
150
|
+
// @ts-expect-error paragraph is not allowed in react-native but exists in react-native-web
|
|
158
151
|
return /*#__PURE__*/React.createElement(Typography, _extends({
|
|
159
152
|
accessibilityRole: "paragraph"
|
|
160
153
|
}, props));
|
|
161
154
|
}
|
|
162
155
|
|
|
163
|
-
var createHeading = function (level
|
|
156
|
+
var createHeading = function (level) {
|
|
164
157
|
// https://github.com/necolas/react-native-web/issues/401
|
|
165
158
|
function TypographyHeading(props) {
|
|
166
159
|
return /*#__PURE__*/React.createElement(Typography, _extends({
|
|
167
|
-
accessibilityRole: "header"
|
|
168
|
-
base: defaultBase
|
|
160
|
+
accessibilityRole: "header"
|
|
169
161
|
}, props, {
|
|
170
|
-
|
|
162
|
+
"aria-level": level
|
|
171
163
|
}));
|
|
172
164
|
}
|
|
173
165
|
|
|
@@ -177,27 +169,11 @@ var createHeading = function (level, defaultBase) {
|
|
|
177
169
|
|
|
178
170
|
Typography.Text = TypographyText;
|
|
179
171
|
Typography.Paragraph = TypographyParagraph;
|
|
180
|
-
Typography.
|
|
181
|
-
Typography.
|
|
182
|
-
Typography.
|
|
183
|
-
Typography.
|
|
184
|
-
Typography.
|
|
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');
|
|
172
|
+
Typography.h1 = createHeading('1');
|
|
173
|
+
Typography.h2 = createHeading('2');
|
|
174
|
+
Typography.h3 = createHeading('3');
|
|
175
|
+
Typography.h4 = createHeading('4');
|
|
176
|
+
Typography.h5 = createHeading('5');
|
|
201
177
|
|
|
202
178
|
var _excluded$8 = ["size"];
|
|
203
179
|
|
|
@@ -209,7 +185,7 @@ var getInitials = function (firstname, lastname) {
|
|
|
209
185
|
return (getFirstCharacter(firstname) + getFirstCharacter(lastname)).toUpperCase();
|
|
210
186
|
};
|
|
211
187
|
|
|
212
|
-
var StyledAvatarView = /*#__PURE__*/styled
|
|
188
|
+
var StyledAvatarView = /*#__PURE__*/styled.View.withConfig({
|
|
213
189
|
displayName: "Avatar__StyledAvatarView",
|
|
214
190
|
componentId: "kitt-universal__sc-9miubv-0"
|
|
215
191
|
})(["border-radius:", "px;background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], function (_ref) {
|
|
@@ -275,9 +251,7 @@ function Avatar(_ref6) {
|
|
|
275
251
|
})));
|
|
276
252
|
}
|
|
277
253
|
|
|
278
|
-
var
|
|
279
|
-
|
|
280
|
-
var ButtonContainer = /*#__PURE__*/styled(PrimitivePressable).withConfig({
|
|
254
|
+
var ButtonContainer = /*#__PURE__*/styled.Pressable.withConfig({
|
|
281
255
|
displayName: "ButtonContainer",
|
|
282
256
|
componentId: "kitt-universal__sc-ofbpwm-0"
|
|
283
257
|
})(["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) {
|
|
@@ -377,7 +351,7 @@ var ButtonText = /*#__PURE__*/styled(Typography.Text).withConfig({
|
|
|
377
351
|
displayName: "ButtonContent__ButtonText",
|
|
378
352
|
componentId: "kitt-universal__sc-dnyw3n-0"
|
|
379
353
|
})(["text-align:center;"]);
|
|
380
|
-
var Content$1 = /*#__PURE__*/styled
|
|
354
|
+
var Content$1 = /*#__PURE__*/styled.View.withConfig({
|
|
381
355
|
displayName: "ButtonContent__Content",
|
|
382
356
|
componentId: "kitt-universal__sc-dnyw3n-1"
|
|
383
357
|
})(["flex-direction:row;align-items:center;justify-content:center;flex:", ";"], function (_ref) {
|
|
@@ -385,7 +359,7 @@ var Content$1 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
385
359
|
iconOnly = _ref.iconOnly;
|
|
386
360
|
return "".concat(stretch || iconOnly ? 1 : 0, " 1 auto");
|
|
387
361
|
});
|
|
388
|
-
var IconContainer$1 = /*#__PURE__*/styled
|
|
362
|
+
var IconContainer$1 = /*#__PURE__*/styled.View.withConfig({
|
|
389
363
|
displayName: "ButtonContent__IconContainer",
|
|
390
364
|
componentId: "kitt-universal__sc-dnyw3n-2"
|
|
391
365
|
})(["", ""], function (_ref2) {
|
|
@@ -435,7 +409,7 @@ function ButtonContent(_ref4) {
|
|
|
435
409
|
size: theme.kitt.button.iconSize
|
|
436
410
|
};
|
|
437
411
|
|
|
438
|
-
if (
|
|
412
|
+
if (process.env.NODE_ENV !== "production") {
|
|
439
413
|
if (!(children || icon)) {
|
|
440
414
|
throw new Error('kitt(Button): You should provide at least a children or a icon');
|
|
441
415
|
}
|
|
@@ -523,7 +497,7 @@ function Button(_ref) {
|
|
|
523
497
|
}), children));
|
|
524
498
|
}
|
|
525
499
|
|
|
526
|
-
var Container$5 = /*#__PURE__*/styled
|
|
500
|
+
var Container$5 = /*#__PURE__*/styled.View.withConfig({
|
|
527
501
|
displayName: "Card__Container",
|
|
528
502
|
componentId: "kitt-universal__sc-1n9psug-0"
|
|
529
503
|
})(["background-color:", ";padding:", ";border-radius:", ";border-width:", ";border-color:", ";"], function (_ref) {
|
|
@@ -621,11 +595,11 @@ var KittBreakpointsMax = {
|
|
|
621
595
|
LARGE: KittBreakpoints.WIDE - 1
|
|
622
596
|
};
|
|
623
597
|
|
|
624
|
-
var FieldContainer = /*#__PURE__*/styled
|
|
598
|
+
var FieldContainer = /*#__PURE__*/styled.View.withConfig({
|
|
625
599
|
displayName: "InputField__FieldContainer",
|
|
626
600
|
componentId: "kitt-universal__sc-13fkixs-0"
|
|
627
601
|
})(["padding:5px 0 10px;"]);
|
|
628
|
-
var FeedbackContainer = /*#__PURE__*/styled
|
|
602
|
+
var FeedbackContainer = /*#__PURE__*/styled.View.withConfig({
|
|
629
603
|
displayName: "InputField__FeedbackContainer",
|
|
630
604
|
componentId: "kitt-universal__sc-13fkixs-1"
|
|
631
605
|
})(["", ";"], function (_ref) {
|
|
@@ -634,14 +608,14 @@ var FeedbackContainer = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
634
608
|
minWidth: KittBreakpoints.SMALL
|
|
635
609
|
}, 'padding-top: 10px', 'padding-top: 5px');
|
|
636
610
|
});
|
|
637
|
-
var FieldLabelContainer = /*#__PURE__*/styled
|
|
611
|
+
var FieldLabelContainer = /*#__PURE__*/styled.View.withConfig({
|
|
638
612
|
displayName: "InputField__FieldLabelContainer",
|
|
639
613
|
componentId: "kitt-universal__sc-13fkixs-2"
|
|
640
614
|
})(["flex-direction:row;align-items:center;padding-bottom:", "px;"], function (_ref2) {
|
|
641
615
|
var theme = _ref2.theme;
|
|
642
616
|
return theme.kitt.forms.inputField.labelContainerPaddingBottom;
|
|
643
617
|
});
|
|
644
|
-
var LabelContainer = /*#__PURE__*/styled
|
|
618
|
+
var LabelContainer = /*#__PURE__*/styled.View.withConfig({
|
|
645
619
|
displayName: "InputField__LabelContainer",
|
|
646
620
|
componentId: "kitt-universal__sc-13fkixs-3"
|
|
647
621
|
})(["margin-right:", "px;"], function (_ref3) {
|
|
@@ -710,7 +684,7 @@ var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width
|
|
|
710
684
|
var theme = _ref7.theme;
|
|
711
685
|
return theme.kitt.typography.types.bodies.fontFamily.regular;
|
|
712
686
|
});
|
|
713
|
-
var Input = /*#__PURE__*/styled
|
|
687
|
+
var Input = /*#__PURE__*/styled.TextInput.withConfig({
|
|
714
688
|
displayName: "InputText__Input",
|
|
715
689
|
componentId: "kitt-universal__sc-uke279-0"
|
|
716
690
|
})(["", " padding:", ";line-height:", ";min-height:", "px;"], styledTextInputMixin, function (_ref8) {
|
|
@@ -725,7 +699,7 @@ var Input = /*#__PURE__*/styled(TextInput).withConfig({
|
|
|
725
699
|
var minHeight = _ref10.minHeight;
|
|
726
700
|
return minHeight;
|
|
727
701
|
});
|
|
728
|
-
var Container$4 = /*#__PURE__*/styled
|
|
702
|
+
var Container$4 = /*#__PURE__*/styled.View.withConfig({
|
|
729
703
|
displayName: "InputText__Container",
|
|
730
704
|
componentId: "kitt-universal__sc-uke279-1"
|
|
731
705
|
})(["margin-top:", ";margin-bottom:", ";"], function (_ref11) {
|
|
@@ -735,7 +709,7 @@ var Container$4 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
735
709
|
var theme = _ref12.theme;
|
|
736
710
|
return theme.kitt.forms.input.marginBottom;
|
|
737
711
|
});
|
|
738
|
-
var PasswordButtonContainer = /*#__PURE__*/styled
|
|
712
|
+
var PasswordButtonContainer = /*#__PURE__*/styled.Pressable.withConfig({
|
|
739
713
|
displayName: "InputText__PasswordButtonContainer",
|
|
740
714
|
componentId: "kitt-universal__sc-uke279-2"
|
|
741
715
|
})(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:", "px;"], function (_ref13) {
|
|
@@ -826,7 +800,6 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref15, ref) {
|
|
|
826
800
|
if (_onBlur) _onBlur(e);
|
|
827
801
|
}
|
|
828
802
|
})), type === 'password' && !disabled && /*#__PURE__*/React.createElement(PasswordButtonContainer, {
|
|
829
|
-
accessibilityRole: "button",
|
|
830
803
|
onPress: togglePasswordVisibility
|
|
831
804
|
}, /*#__PURE__*/React.createElement(TypographyIcon, {
|
|
832
805
|
icon: isPasswordVisible ? /*#__PURE__*/React.createElement(EyeIcon, null) : /*#__PURE__*/React.createElement(EyeOffIcon, null),
|
|
@@ -845,7 +818,7 @@ function Label(_ref) {
|
|
|
845
818
|
}, children) : children);
|
|
846
819
|
}
|
|
847
820
|
|
|
848
|
-
var OuterRadio = /*#__PURE__*/styled
|
|
821
|
+
var OuterRadio = /*#__PURE__*/styled.View.withConfig({
|
|
849
822
|
displayName: "Radio__OuterRadio",
|
|
850
823
|
componentId: "kitt-universal__sc-1mdgr2o-0"
|
|
851
824
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;border-width:", ";border-color:", ";"], function (_ref) {
|
|
@@ -869,7 +842,7 @@ var OuterRadio = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
869
842
|
disabled = _ref6.disabled;
|
|
870
843
|
return theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].borderColor;
|
|
871
844
|
});
|
|
872
|
-
var SelectedOuterRadio = /*#__PURE__*/styled
|
|
845
|
+
var SelectedOuterRadio = /*#__PURE__*/styled.View.withConfig({
|
|
873
846
|
displayName: "Radio__SelectedOuterRadio",
|
|
874
847
|
componentId: "kitt-universal__sc-1mdgr2o-1"
|
|
875
848
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;justify-content:center;align-items:center;"], function (_ref7) {
|
|
@@ -885,7 +858,7 @@ var SelectedOuterRadio = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
885
858
|
var theme = _ref10.theme;
|
|
886
859
|
return theme.kitt.forms.radio.size / 2;
|
|
887
860
|
});
|
|
888
|
-
var SelectedInnerRadio = /*#__PURE__*/styled
|
|
861
|
+
var SelectedInnerRadio = /*#__PURE__*/styled.View.withConfig({
|
|
889
862
|
displayName: "Radio__SelectedInnerRadio",
|
|
890
863
|
componentId: "kitt-universal__sc-1mdgr2o-2"
|
|
891
864
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;"], function (_ref11) {
|
|
@@ -901,7 +874,7 @@ var SelectedInnerRadio = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
901
874
|
var theme = _ref14.theme;
|
|
902
875
|
return theme.kitt.forms.radio.checked.innerSize / 2;
|
|
903
876
|
});
|
|
904
|
-
var Container$3 = /*#__PURE__*/styled
|
|
877
|
+
var Container$3 = /*#__PURE__*/styled.Pressable.withConfig({
|
|
905
878
|
displayName: "Radio__Container",
|
|
906
879
|
componentId: "kitt-universal__sc-1mdgr2o-3"
|
|
907
880
|
})(["flex-direction:row;align-items:center;"]);
|
|
@@ -925,7 +898,7 @@ function Radio(_ref16) {
|
|
|
925
898
|
disabled: disabled,
|
|
926
899
|
accessibilityRole: "radio",
|
|
927
900
|
"aria-checked": checked,
|
|
928
|
-
|
|
901
|
+
accessible: checked && !disabled,
|
|
929
902
|
onPress: function handlePress() {
|
|
930
903
|
onChange(value);
|
|
931
904
|
}
|
|
@@ -949,7 +922,7 @@ function TextArea(_ref) {
|
|
|
949
922
|
}));
|
|
950
923
|
}
|
|
951
924
|
|
|
952
|
-
var Body = /*#__PURE__*/styled
|
|
925
|
+
var Body = /*#__PURE__*/styled.View.withConfig({
|
|
953
926
|
displayName: "Body",
|
|
954
927
|
componentId: "kitt-universal__sc-1ofncfn-0"
|
|
955
928
|
})(["", " background-color:", ";flex:1;"], function (_ref) {
|
|
@@ -966,7 +939,7 @@ function FullScreenModalBody(_ref3) {
|
|
|
966
939
|
return /*#__PURE__*/React.createElement(Body, null, children);
|
|
967
940
|
}
|
|
968
941
|
|
|
969
|
-
var SideContainer = /*#__PURE__*/styled
|
|
942
|
+
var SideContainer = /*#__PURE__*/styled.View.withConfig({
|
|
970
943
|
displayName: "Header__SideContainer",
|
|
971
944
|
componentId: "kitt-universal__sc-dfmxi1-0"
|
|
972
945
|
})(["", ""], function (_ref) {
|
|
@@ -986,7 +959,7 @@ function getHeaderHorizontalMediumPadding(spacing) {
|
|
|
986
959
|
return spacing * 6;
|
|
987
960
|
}
|
|
988
961
|
|
|
989
|
-
var Header = /*#__PURE__*/styled
|
|
962
|
+
var Header = /*#__PURE__*/styled.View.withConfig({
|
|
990
963
|
displayName: "Header",
|
|
991
964
|
componentId: "kitt-universal__sc-dfmxi1-1"
|
|
992
965
|
})(["", ";border-bottom-color:", ";border-bottom-width:1px;flex-direction:row;align-items:center;"], function (_ref2) {
|
|
@@ -1004,7 +977,7 @@ var Header = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1004
977
|
var theme = _ref3.theme;
|
|
1005
978
|
return theme.kitt.fullScreenModal.header.borderColor;
|
|
1006
979
|
});
|
|
1007
|
-
var HeaderContent = /*#__PURE__*/styled
|
|
980
|
+
var HeaderContent = /*#__PURE__*/styled.View.withConfig({
|
|
1008
981
|
displayName: "Header__HeaderContent",
|
|
1009
982
|
componentId: "kitt-universal__sc-dfmxi1-2"
|
|
1010
983
|
})(["", ";", ";justify-content:center;align-items:center;"], function (_ref4) {
|
|
@@ -1090,7 +1063,7 @@ function FullScreenModalHeader(_ref6) {
|
|
|
1090
1063
|
}, right) : null);
|
|
1091
1064
|
}
|
|
1092
1065
|
|
|
1093
|
-
var Container$2 = /*#__PURE__*/styled
|
|
1066
|
+
var Container$2 = /*#__PURE__*/styled.View.withConfig({
|
|
1094
1067
|
displayName: "FullScreenModal__Container",
|
|
1095
1068
|
componentId: "kitt-universal__sc-11qpbe3-0"
|
|
1096
1069
|
})(["flex:1;background-color:", ";"], function (_ref) {
|
|
@@ -1104,218 +1077,8 @@ function FullScreenModal(_ref2) {
|
|
|
1104
1077
|
FullScreenModal.Header = FullScreenModalHeader;
|
|
1105
1078
|
FullScreenModal.Body = FullScreenModalBody;
|
|
1106
1079
|
|
|
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/chris/ornikar/kitt/@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/chris/ornikar/kitt/@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
|
-
|
|
1317
1080
|
var _excluded$5 = ["children"];
|
|
1318
|
-
var ContentView$1 = /*#__PURE__*/styled
|
|
1081
|
+
var ContentView$1 = /*#__PURE__*/styled.View.withConfig({
|
|
1319
1082
|
displayName: "ListItemContent__ContentView",
|
|
1320
1083
|
componentId: "kitt-universal__sc-57q0u9-0"
|
|
1321
1084
|
})(["flex:1 0 0%;align-self:center;"]);
|
|
@@ -1328,7 +1091,7 @@ function ListItemContent(_ref) {
|
|
|
1328
1091
|
|
|
1329
1092
|
var _excluded$4 = ["children", "side"],
|
|
1330
1093
|
_excluded2$1 = ["children", "align"];
|
|
1331
|
-
var SideContainerView = /*#__PURE__*/styled
|
|
1094
|
+
var SideContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
1332
1095
|
displayName: "ListItemSideContent__SideContainerView",
|
|
1333
1096
|
componentId: "kitt-universal__sc-1vajiw-0"
|
|
1334
1097
|
})(["flex-direction:row;margin-left:", ";margin-right:", ";"], function (_ref) {
|
|
@@ -1351,7 +1114,7 @@ function ListItemSideContainer(_ref3) {
|
|
|
1351
1114
|
side: side
|
|
1352
1115
|
}, rest), children);
|
|
1353
1116
|
}
|
|
1354
|
-
var SideContentView = /*#__PURE__*/styled
|
|
1117
|
+
var SideContentView = /*#__PURE__*/styled.View.withConfig({
|
|
1355
1118
|
displayName: "ListItemSideContent__SideContentView",
|
|
1356
1119
|
componentId: "kitt-universal__sc-1vajiw-1"
|
|
1357
1120
|
})(["align-self:", ";"], function (_ref4) {
|
|
@@ -1369,12 +1132,8 @@ function ListItemSideContent(_ref5) {
|
|
|
1369
1132
|
}, rest), children);
|
|
1370
1133
|
}
|
|
1371
1134
|
|
|
1372
|
-
var _excluded$3 = ["children", "withPadding", "borders", "left", "right"
|
|
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({
|
|
1135
|
+
var _excluded$3 = ["children", "withPadding", "borders", "left", "right"];
|
|
1136
|
+
var ContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
1378
1137
|
displayName: "ListItem__ContainerView",
|
|
1379
1138
|
componentId: "kitt-universal__sc-2afp9s-0"
|
|
1380
1139
|
})(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], function (_ref) {
|
|
@@ -1412,19 +1171,12 @@ function ListItem(_ref5) {
|
|
|
1412
1171
|
borders = _ref5.borders,
|
|
1413
1172
|
left = _ref5.left,
|
|
1414
1173
|
right = _ref5.right,
|
|
1415
|
-
onPress = _ref5.onPress,
|
|
1416
1174
|
rest = _objectWithoutProperties(_ref5, _excluded$3);
|
|
1417
1175
|
|
|
1418
|
-
|
|
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({
|
|
1176
|
+
return /*#__PURE__*/React.createElement(Pressable, rest, /*#__PURE__*/React.createElement(ContainerView, {
|
|
1425
1177
|
withPadding: withPadding,
|
|
1426
1178
|
borders: borders
|
|
1427
|
-
},
|
|
1179
|
+
}, left ? /*#__PURE__*/React.createElement(ListItemSideContainer, {
|
|
1428
1180
|
side: "left"
|
|
1429
1181
|
}, left) : null, /*#__PURE__*/React.createElement(ListItemContent, null, children), right ? /*#__PURE__*/React.createElement(ListItemSideContainer, {
|
|
1430
1182
|
side: "right"
|
|
@@ -1464,7 +1216,7 @@ function LargeLoader(_ref) {
|
|
|
1464
1216
|
|
|
1465
1217
|
var xIconSize = 14;
|
|
1466
1218
|
var mainIconSize = 20;
|
|
1467
|
-
var Container$1 = /*#__PURE__*/styled
|
|
1219
|
+
var Container$1 = /*#__PURE__*/styled.View.withConfig({
|
|
1468
1220
|
displayName: "Message__Container",
|
|
1469
1221
|
componentId: "kitt-universal__sc-c6400e-0"
|
|
1470
1222
|
})(["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) {
|
|
@@ -1491,7 +1243,7 @@ var Container$1 = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1491
1243
|
insets = _ref6.insets;
|
|
1492
1244
|
return ((_insets$top = insets === null || insets === void 0 ? void 0 : insets.top) !== null && _insets$top !== void 0 ? _insets$top : 0) + theme.kitt.spacing * 4;
|
|
1493
1245
|
});
|
|
1494
|
-
var CloseContainer = /*#__PURE__*/styled
|
|
1246
|
+
var CloseContainer = /*#__PURE__*/styled.TouchableOpacity.withConfig({
|
|
1495
1247
|
displayName: "Message__CloseContainer",
|
|
1496
1248
|
componentId: "kitt-universal__sc-c6400e-1"
|
|
1497
1249
|
})(["margin-left:", "px;padding:", "px;"], function (_ref7) {
|
|
@@ -1501,14 +1253,14 @@ var CloseContainer = /*#__PURE__*/styled(TouchableOpacity).withConfig({
|
|
|
1501
1253
|
var theme = _ref8.theme;
|
|
1502
1254
|
return theme.kitt.spacing;
|
|
1503
1255
|
});
|
|
1504
|
-
var IconContainer = /*#__PURE__*/styled
|
|
1256
|
+
var IconContainer = /*#__PURE__*/styled.View.withConfig({
|
|
1505
1257
|
displayName: "Message__IconContainer",
|
|
1506
1258
|
componentId: "kitt-universal__sc-c6400e-2"
|
|
1507
1259
|
})(["margin-right:", "px;"], function (_ref9) {
|
|
1508
1260
|
var theme = _ref9.theme;
|
|
1509
1261
|
return theme.kitt.spacing * 4;
|
|
1510
1262
|
});
|
|
1511
|
-
var Content = /*#__PURE__*/styled
|
|
1263
|
+
var Content = /*#__PURE__*/styled.Text.withConfig({
|
|
1512
1264
|
displayName: "Message__Content",
|
|
1513
1265
|
componentId: "kitt-universal__sc-c6400e-3"
|
|
1514
1266
|
})(["text-align:", ";flex:1;"], function (_ref10) {
|
|
@@ -1583,7 +1335,7 @@ function Message(_ref11) {
|
|
|
1583
1335
|
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; }
|
|
1584
1336
|
|
|
1585
1337
|
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; }
|
|
1586
|
-
var OverlayPressable = /*#__PURE__*/styled
|
|
1338
|
+
var OverlayPressable = /*#__PURE__*/styled.Pressable.withConfig({
|
|
1587
1339
|
displayName: "Overlay__OverlayPressable",
|
|
1588
1340
|
componentId: "kitt-universal__sc-1cz1gbr-0"
|
|
1589
1341
|
})(function (_ref) {
|
|
@@ -1595,14 +1347,11 @@ var OverlayPressable = /*#__PURE__*/styled(PrimitivePressable).withConfig({
|
|
|
1595
1347
|
function Overlay(_ref2) {
|
|
1596
1348
|
var onPress = _ref2.onPress;
|
|
1597
1349
|
return /*#__PURE__*/React.createElement(OverlayPressable, {
|
|
1598
|
-
accessibilityRole: "none",
|
|
1599
1350
|
onPress: onPress
|
|
1600
|
-
}, /*#__PURE__*/React.createElement(
|
|
1351
|
+
}, /*#__PURE__*/React.createElement(View, null));
|
|
1601
1352
|
}
|
|
1602
1353
|
|
|
1603
|
-
var
|
|
1604
|
-
|
|
1605
|
-
var BodyView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
1354
|
+
var BodyView = /*#__PURE__*/styled.View.withConfig({
|
|
1606
1355
|
displayName: "Body__BodyView",
|
|
1607
1356
|
componentId: "kitt-universal__sc-17fwpo4-0"
|
|
1608
1357
|
})(["padding:", "px ", "px;"], function (_ref) {
|
|
@@ -1612,12 +1361,14 @@ var BodyView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1612
1361
|
var theme = _ref2.theme;
|
|
1613
1362
|
return theme.kitt.spacing * 4;
|
|
1614
1363
|
});
|
|
1615
|
-
|
|
1364
|
+
var ModalBody = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
1616
1365
|
var children = _ref3.children;
|
|
1617
|
-
return /*#__PURE__*/React.createElement(
|
|
1618
|
-
|
|
1366
|
+
return /*#__PURE__*/React.createElement(ScrollView, {
|
|
1367
|
+
ref: ref
|
|
1368
|
+
}, /*#__PURE__*/React.createElement(BodyView, null, children));
|
|
1369
|
+
});
|
|
1619
1370
|
|
|
1620
|
-
var FooterView = /*#__PURE__*/styled
|
|
1371
|
+
var FooterView = /*#__PURE__*/styled.View.withConfig({
|
|
1621
1372
|
displayName: "Footer__FooterView",
|
|
1622
1373
|
componentId: "kitt-universal__sc-1ujq2dc-0"
|
|
1623
1374
|
})(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], function (_ref) {
|
|
@@ -1634,7 +1385,7 @@ function ModalFooter(_ref3) {
|
|
|
1634
1385
|
|
|
1635
1386
|
var OnCloseContext = /*#__PURE__*/createContext(function () {});
|
|
1636
1387
|
|
|
1637
|
-
var HeaderView = /*#__PURE__*/styled
|
|
1388
|
+
var HeaderView = /*#__PURE__*/styled.View.withConfig({
|
|
1638
1389
|
displayName: "Header__HeaderView",
|
|
1639
1390
|
componentId: "kitt-universal__sc-1iwabch-0"
|
|
1640
1391
|
})(["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) {
|
|
@@ -1644,21 +1395,21 @@ var HeaderView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1644
1395
|
var theme = _ref2.theme;
|
|
1645
1396
|
return theme.kitt.colors.separator;
|
|
1646
1397
|
});
|
|
1647
|
-
var LeftIconView = /*#__PURE__*/styled
|
|
1398
|
+
var LeftIconView = /*#__PURE__*/styled.View.withConfig({
|
|
1648
1399
|
displayName: "Header__LeftIconView",
|
|
1649
1400
|
componentId: "kitt-universal__sc-1iwabch-1"
|
|
1650
1401
|
})(["align-self:flex-start;margin-right:", "px;"], function (_ref3) {
|
|
1651
1402
|
var theme = _ref3.theme;
|
|
1652
1403
|
return theme.kitt.spacing * 2;
|
|
1653
1404
|
});
|
|
1654
|
-
var RightIconView = /*#__PURE__*/styled
|
|
1405
|
+
var RightIconView = /*#__PURE__*/styled.View.withConfig({
|
|
1655
1406
|
displayName: "Header__RightIconView",
|
|
1656
1407
|
componentId: "kitt-universal__sc-1iwabch-2"
|
|
1657
1408
|
})(["align-self:flex-start;margin-left:", "px;"], function (_ref4) {
|
|
1658
1409
|
var theme = _ref4.theme;
|
|
1659
1410
|
return theme.kitt.spacing * 2;
|
|
1660
1411
|
});
|
|
1661
|
-
var TitleView = /*#__PURE__*/styled
|
|
1412
|
+
var TitleView = /*#__PURE__*/styled.View.withConfig({
|
|
1662
1413
|
displayName: "Header__TitleView",
|
|
1663
1414
|
componentId: "kitt-universal__sc-1iwabch-3"
|
|
1664
1415
|
})(["padding-left:", "px;flex-shrink:1;"], function (_ref5) {
|
|
@@ -1681,7 +1432,7 @@ function ModalHeader(_ref6) {
|
|
|
1681
1432
|
})));
|
|
1682
1433
|
}
|
|
1683
1434
|
|
|
1684
|
-
var ModalView = /*#__PURE__*/styled
|
|
1435
|
+
var ModalView = /*#__PURE__*/styled.View.withConfig({
|
|
1685
1436
|
displayName: "Modal__ModalView",
|
|
1686
1437
|
componentId: "kitt-universal__sc-1xy2w5u-0"
|
|
1687
1438
|
})(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], function (_ref) {
|
|
@@ -1691,7 +1442,7 @@ var ModalView = /*#__PURE__*/styled(PrimitiveView).withConfig({
|
|
|
1691
1442
|
var theme = _ref2.theme;
|
|
1692
1443
|
return theme.kitt.spacing * 4;
|
|
1693
1444
|
});
|
|
1694
|
-
var ContentView = /*#__PURE__*/styled
|
|
1445
|
+
var ContentView = /*#__PURE__*/styled.View.withConfig({
|
|
1695
1446
|
displayName: "Modal__ContentView",
|
|
1696
1447
|
componentId: "kitt-universal__sc-1xy2w5u-1"
|
|
1697
1448
|
})(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", ";background-color:", ";"], function (_ref3) {
|
|
@@ -1744,90 +1495,11 @@ function Notification(_ref) {
|
|
|
1744
1495
|
}, children);
|
|
1745
1496
|
}
|
|
1746
1497
|
|
|
1747
|
-
var
|
|
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({
|
|
1498
|
+
var StoryTitleContainer = /*#__PURE__*/styled.View.withConfig({
|
|
1827
1499
|
displayName: "StoryTitle__StoryTitleContainer",
|
|
1828
1500
|
componentId: "kitt-universal__sc-sic7hb-0"
|
|
1829
1501
|
})(["margin-bottom:30px;"]);
|
|
1830
|
-
var StorySubTitleContainer = /*#__PURE__*/styled
|
|
1502
|
+
var StorySubTitleContainer = /*#__PURE__*/styled.View.withConfig({
|
|
1831
1503
|
displayName: "StoryTitle__StorySubTitleContainer",
|
|
1832
1504
|
componentId: "kitt-universal__sc-sic7hb-1"
|
|
1833
1505
|
})(["margin-bottom:10px;"]);
|
|
@@ -1835,10 +1507,10 @@ function StoryTitle(_ref) {
|
|
|
1835
1507
|
var color = _ref.color,
|
|
1836
1508
|
children = _ref.children,
|
|
1837
1509
|
numberOfLines = _ref.numberOfLines;
|
|
1838
|
-
return /*#__PURE__*/React.createElement(StoryTitleContainer, null, /*#__PURE__*/React.createElement(Typography.
|
|
1510
|
+
return /*#__PURE__*/React.createElement(StoryTitleContainer, null, /*#__PURE__*/React.createElement(Typography.h1, {
|
|
1839
1511
|
variant: "bold",
|
|
1840
1512
|
base: "header1",
|
|
1841
|
-
color:
|
|
1513
|
+
color: color,
|
|
1842
1514
|
numberOfLines: numberOfLines
|
|
1843
1515
|
}, children));
|
|
1844
1516
|
}
|
|
@@ -1847,10 +1519,10 @@ function StoryTitleLevel2(_ref2) {
|
|
|
1847
1519
|
var color = _ref2.color,
|
|
1848
1520
|
children = _ref2.children,
|
|
1849
1521
|
numberOfLines = _ref2.numberOfLines;
|
|
1850
|
-
return /*#__PURE__*/React.createElement(StoryTitleContainer, null, /*#__PURE__*/React.createElement(Typography.
|
|
1522
|
+
return /*#__PURE__*/React.createElement(StoryTitleContainer, null, /*#__PURE__*/React.createElement(Typography.h2, {
|
|
1851
1523
|
variant: "bold",
|
|
1852
1524
|
base: "header2",
|
|
1853
|
-
color:
|
|
1525
|
+
color: color,
|
|
1854
1526
|
numberOfLines: numberOfLines
|
|
1855
1527
|
}, children));
|
|
1856
1528
|
}
|
|
@@ -1861,11 +1533,11 @@ function StoryTitleLevel3(_ref3) {
|
|
|
1861
1533
|
var color = _ref3.color,
|
|
1862
1534
|
children = _ref3.children,
|
|
1863
1535
|
numberOfLines = _ref3.numberOfLines;
|
|
1864
|
-
return /*#__PURE__*/React.createElement(StorySubTitleContainer, null, /*#__PURE__*/React.createElement(Typography.
|
|
1536
|
+
return /*#__PURE__*/React.createElement(StorySubTitleContainer, null, /*#__PURE__*/React.createElement(Typography.h3, {
|
|
1865
1537
|
variant: "bold",
|
|
1866
1538
|
base: "header3",
|
|
1867
1539
|
medium: "header4",
|
|
1868
|
-
color:
|
|
1540
|
+
color: color,
|
|
1869
1541
|
numberOfLines: numberOfLines
|
|
1870
1542
|
}, children));
|
|
1871
1543
|
}
|
|
@@ -1876,11 +1548,11 @@ function StoryTitleLevel4(_ref4) {
|
|
|
1876
1548
|
var color = _ref4.color,
|
|
1877
1549
|
children = _ref4.children,
|
|
1878
1550
|
numberOfLines = _ref4.numberOfLines;
|
|
1879
|
-
return /*#__PURE__*/React.createElement(StorySubTitleContainer, null, /*#__PURE__*/React.createElement(Typography.
|
|
1551
|
+
return /*#__PURE__*/React.createElement(StorySubTitleContainer, null, /*#__PURE__*/React.createElement(Typography.h4, {
|
|
1880
1552
|
variant: "bold",
|
|
1881
1553
|
base: "header4",
|
|
1882
1554
|
medium: "header5",
|
|
1883
|
-
color:
|
|
1555
|
+
color: color,
|
|
1884
1556
|
numberOfLines: numberOfLines
|
|
1885
1557
|
}, children));
|
|
1886
1558
|
}
|
|
@@ -1890,40 +1562,24 @@ StoryTitle.Level2 = StoryTitleLevel2;
|
|
|
1890
1562
|
StoryTitle.Level3 = StoryTitleLevel3;
|
|
1891
1563
|
StoryTitle.Level4 = StoryTitleLevel4;
|
|
1892
1564
|
|
|
1893
|
-
var
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
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) {
|
|
1565
|
+
var _excluded$2 = ["title", "className", "children"],
|
|
1566
|
+
_excluded2 = ["title", "className", "children"];
|
|
1567
|
+
var StyledSection = /*#__PURE__*/styled.View.withConfig({
|
|
1568
|
+
displayName: "Section__StyledSection",
|
|
1569
|
+
componentId: "kitt-universal__sc-x4z1s-0"
|
|
1570
|
+
})(["margin-bottom:30px;"]);
|
|
1571
|
+
function Section(_ref) {
|
|
1914
1572
|
var title = _ref.title;
|
|
1915
1573
|
_ref.className;
|
|
1916
1574
|
var children = _ref.children,
|
|
1917
|
-
internalIsDemoSection = _ref.internalIsDemoSection,
|
|
1918
1575
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
1919
1576
|
|
|
1920
|
-
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
1921
1577
|
return /*#__PURE__*/React.createElement(StyledSection, props, /*#__PURE__*/React.createElement(StoryTitle.Level2, null, title), children);
|
|
1922
1578
|
}
|
|
1923
|
-
var StyledSubSection = /*#__PURE__*/styled
|
|
1924
|
-
displayName: "
|
|
1925
|
-
componentId: "kitt-universal__sc-
|
|
1926
|
-
})(["margin-bottom:
|
|
1579
|
+
var StyledSubSection = /*#__PURE__*/styled.View.withConfig({
|
|
1580
|
+
displayName: "Section__StyledSubSection",
|
|
1581
|
+
componentId: "kitt-universal__sc-x4z1s-1"
|
|
1582
|
+
})(["margin-bottom:20px;"]);
|
|
1927
1583
|
|
|
1928
1584
|
function SubSection(_ref2) {
|
|
1929
1585
|
var title = _ref2.title;
|
|
@@ -1934,55 +1590,32 @@ function SubSection(_ref2) {
|
|
|
1934
1590
|
return /*#__PURE__*/React.createElement(StyledSubSection, props, /*#__PURE__*/React.createElement(StoryTitle.Level3, null, title), children);
|
|
1935
1591
|
}
|
|
1936
1592
|
|
|
1937
|
-
var
|
|
1938
|
-
displayName: "
|
|
1939
|
-
componentId: "kitt-universal__sc-
|
|
1940
|
-
})(["margin-bottom:
|
|
1941
|
-
|
|
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;"]);
|
|
1593
|
+
var StyledDemoSection = /*#__PURE__*/styled.View.withConfig({
|
|
1594
|
+
displayName: "Section__StyledDemoSection",
|
|
1595
|
+
componentId: "kitt-universal__sc-x4z1s-2"
|
|
1596
|
+
})(["margin-bottom:90px;"]);
|
|
1955
1597
|
|
|
1956
|
-
function DemoSection(
|
|
1957
|
-
var children =
|
|
1958
|
-
return /*#__PURE__*/React.createElement(StyledDemoSection, null, /*#__PURE__*/React.createElement(
|
|
1959
|
-
internalIsDemoSection: true,
|
|
1598
|
+
function DemoSection(_ref3) {
|
|
1599
|
+
var children = _ref3.children;
|
|
1600
|
+
return /*#__PURE__*/React.createElement(StyledDemoSection, null, /*#__PURE__*/React.createElement(Section, {
|
|
1960
1601
|
title: "Demo"
|
|
1961
1602
|
}, children));
|
|
1962
1603
|
}
|
|
1963
1604
|
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
/** @deprecated use StorySection.Demo instead */
|
|
1605
|
+
Section.SubSection = SubSection;
|
|
1606
|
+
Section.DemoSection = DemoSection;
|
|
1967
1607
|
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
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);
|
|
1608
|
+
var StoryContainer = /*#__PURE__*/styled.ScrollView.withConfig({
|
|
1609
|
+
displayName: "Story__StoryContainer",
|
|
1610
|
+
componentId: "kitt-universal__sc-1kwdg2p-0"
|
|
1611
|
+
})(["padding:10px;"]);
|
|
1612
|
+
function Story(_ref) {
|
|
1613
|
+
var title = _ref.title,
|
|
1614
|
+
contentContainerStyle = _ref.contentContainerStyle,
|
|
1615
|
+
children = _ref.children;
|
|
1616
|
+
return /*#__PURE__*/React.createElement(StoryContainer, {
|
|
1617
|
+
contentContainerStyle: contentContainerStyle
|
|
1618
|
+
}, /*#__PURE__*/React.createElement(StoryTitle, null, title), children);
|
|
1986
1619
|
}
|
|
1987
1620
|
|
|
1988
1621
|
function StoryDecorator(storyFn, context) {
|
|
@@ -1991,22 +1624,22 @@ function StoryDecorator(storyFn, context) {
|
|
|
1991
1624
|
}, storyFn());
|
|
1992
1625
|
}
|
|
1993
1626
|
|
|
1994
|
-
var SmallScreenRow = /*#__PURE__*/styled
|
|
1627
|
+
var SmallScreenRow = /*#__PURE__*/styled.View.withConfig({
|
|
1995
1628
|
displayName: "StoryGrid__SmallScreenRow",
|
|
1996
1629
|
componentId: "kitt-universal__sc-4z5new-0"
|
|
1997
1630
|
})(["flex-direction:column;margin:0;"]);
|
|
1998
|
-
var SmallScreenCol = /*#__PURE__*/styled
|
|
1631
|
+
var SmallScreenCol = /*#__PURE__*/styled.View.withConfig({
|
|
1999
1632
|
displayName: "StoryGrid__SmallScreenCol",
|
|
2000
1633
|
componentId: "kitt-universal__sc-4z5new-1"
|
|
2001
|
-
})(["padding:
|
|
2002
|
-
var FlexRow = /*#__PURE__*/styled
|
|
1634
|
+
})(["padding:10px 0 20px;"]);
|
|
1635
|
+
var FlexRow = /*#__PURE__*/styled.View.withConfig({
|
|
2003
1636
|
displayName: "StoryGrid__FlexRow",
|
|
2004
1637
|
componentId: "kitt-universal__sc-4z5new-2"
|
|
2005
|
-
})(["flex-direction:row;margin:0 -
|
|
2006
|
-
var FlexCol = /*#__PURE__*/styled
|
|
1638
|
+
})(["flex-direction:row;margin:0 -5px 20px;"]);
|
|
1639
|
+
var FlexCol = /*#__PURE__*/styled.View.withConfig({
|
|
2007
1640
|
displayName: "StoryGrid__FlexCol",
|
|
2008
1641
|
componentId: "kitt-universal__sc-4z5new-3"
|
|
2009
|
-
})(["flex-grow:1;flex-basis:0;margin:0
|
|
1642
|
+
})(["flex-grow:1;flex-basis:0;margin:0 5px 10px;"]);
|
|
2010
1643
|
|
|
2011
1644
|
function StoryGridRow(_ref) {
|
|
2012
1645
|
var children = _ref.children,
|
|
@@ -2034,19 +1667,7 @@ function StoryGridRow(_ref) {
|
|
|
2034
1667
|
function StoryGridCol(_ref2) {
|
|
2035
1668
|
var title = _ref2.title,
|
|
2036
1669
|
titleColor = _ref2.titleColor,
|
|
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
|
-
|
|
1670
|
+
children = _ref2.children;
|
|
2050
1671
|
return /*#__PURE__*/React.createElement(React.Fragment, null, title ? /*#__PURE__*/React.createElement(StoryTitle.Level4, {
|
|
2051
1672
|
numberOfLines: 1,
|
|
2052
1673
|
color: titleColor
|
|
@@ -2058,7 +1679,7 @@ var StoryGrid = {
|
|
|
2058
1679
|
Col: StoryGridCol
|
|
2059
1680
|
};
|
|
2060
1681
|
|
|
2061
|
-
var Container = /*#__PURE__*/styled
|
|
1682
|
+
var Container = /*#__PURE__*/styled.View.withConfig({
|
|
2062
1683
|
displayName: "Tag__Container",
|
|
2063
1684
|
componentId: "kitt-universal__sc-19jmowi-0"
|
|
2064
1685
|
})(["background-color:", ";border-width:", ";border-color:", ";padding:", ";border-radius:", ";align-self:flex-start;"], function (_ref) {
|
|
@@ -2186,14 +1807,6 @@ var buttonLateOceanTheme = {
|
|
|
2186
1807
|
disabledBackgroundColor: lateOceanColorPalette.transparent,
|
|
2187
1808
|
pressedBackgroundColor: lateOceanColorPalette.transparent,
|
|
2188
1809
|
disabledBorderColor: lateOceanColorPalette.transparent
|
|
2189
|
-
},
|
|
2190
|
-
white: {
|
|
2191
|
-
backgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
2192
|
-
disabledBackgroundColor: lateOceanColorPalette.transparent,
|
|
2193
|
-
hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
2194
|
-
pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
2195
|
-
focusBorderColor: 'rgba(255, 255, 255, 0.1)',
|
|
2196
|
-
disabledBorderColor: lateOceanColorPalette.transparent
|
|
2197
1810
|
}
|
|
2198
1811
|
};
|
|
2199
1812
|
|
|
@@ -2322,41 +1935,6 @@ var fullScreenModalLateOceanTheme = {
|
|
|
2322
1935
|
}
|
|
2323
1936
|
};
|
|
2324
1937
|
|
|
2325
|
-
var iconButton = {
|
|
2326
|
-
backgroundColor: 'transparent',
|
|
2327
|
-
width: 40,
|
|
2328
|
-
height: 40,
|
|
2329
|
-
borderRadius: 20,
|
|
2330
|
-
borderWidth: 2,
|
|
2331
|
-
borderColor: 'transparent',
|
|
2332
|
-
transition: {
|
|
2333
|
-
property: 'all',
|
|
2334
|
-
duration: '200ms',
|
|
2335
|
-
timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1);'
|
|
2336
|
-
},
|
|
2337
|
-
scale: {
|
|
2338
|
-
base: {
|
|
2339
|
-
"default": 1,
|
|
2340
|
-
hover: 0.95,
|
|
2341
|
-
active: 0.95
|
|
2342
|
-
},
|
|
2343
|
-
medium: {
|
|
2344
|
-
hover: 1.05
|
|
2345
|
-
}
|
|
2346
|
-
},
|
|
2347
|
-
disabled: {
|
|
2348
|
-
scale: 1,
|
|
2349
|
-
backgroundColor: buttonLateOceanTheme.secondary.disabledBackgroundColor,
|
|
2350
|
-
borderColor: buttonLateOceanTheme.secondary.disabledBorderColor
|
|
2351
|
-
},
|
|
2352
|
-
"default": {
|
|
2353
|
-
pressedBackgroundColor: buttonLateOceanTheme.secondary.pressedBackgroundColor
|
|
2354
|
-
},
|
|
2355
|
-
white: {
|
|
2356
|
-
pressedBackgroundColor: buttonLateOceanTheme.white.hoverBackgroundColor
|
|
2357
|
-
}
|
|
2358
|
-
};
|
|
2359
|
-
|
|
2360
1938
|
var listItemLateOceanTheme = {
|
|
2361
1939
|
padding: '12px 16px',
|
|
2362
1940
|
borderColor: colorsLateOceanTheme.separator,
|
|
@@ -2486,33 +2064,9 @@ var typographyLateOceanTheme = {
|
|
|
2486
2064
|
'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
|
|
2487
2065
|
}
|
|
2488
2066
|
}
|
|
2489
|
-
},
|
|
2490
|
-
link: {
|
|
2491
|
-
disabledColor: lateOceanColorPalette.black200
|
|
2492
2067
|
}
|
|
2493
2068
|
};
|
|
2494
2069
|
|
|
2495
|
-
var breakpoints = {
|
|
2496
|
-
values: {
|
|
2497
|
-
base: 0,
|
|
2498
|
-
small: 480,
|
|
2499
|
-
medium: 768,
|
|
2500
|
-
large: 1024,
|
|
2501
|
-
wide: 1280
|
|
2502
|
-
},
|
|
2503
|
-
min: {
|
|
2504
|
-
smallBreakpoint: 'min-width: 480px',
|
|
2505
|
-
mediumBreakpoint: 'min-width: 768px',
|
|
2506
|
-
largeBreakpoint: 'min-width: 1024px',
|
|
2507
|
-
wideBreakpoint: 'min-width: 1280px'
|
|
2508
|
-
},
|
|
2509
|
-
max: {
|
|
2510
|
-
smallBreakpoint: 'max-width: 479px',
|
|
2511
|
-
mediumBreakpoint: 'max-width: 767px',
|
|
2512
|
-
largeBreakpoint: 'max-width: 1023px',
|
|
2513
|
-
wideBreakpoint: 'max-width: 1279px'
|
|
2514
|
-
}
|
|
2515
|
-
};
|
|
2516
2070
|
var theme = {
|
|
2517
2071
|
spacing: 4,
|
|
2518
2072
|
colors: colorsLateOceanTheme,
|
|
@@ -2528,47 +2082,42 @@ var theme = {
|
|
|
2528
2082
|
tag: tagLateOceanTheme,
|
|
2529
2083
|
shadows: shadowsLateOceanTheme,
|
|
2530
2084
|
fullScreenModal: fullScreenModalLateOceanTheme,
|
|
2531
|
-
iconButton: iconButton,
|
|
2532
2085
|
listItem: listItemLateOceanTheme
|
|
2533
2086
|
};
|
|
2534
2087
|
|
|
2535
2088
|
function Tooltip(_ref) {
|
|
2536
2089
|
var children = _ref.children;
|
|
2537
|
-
return /*#__PURE__*/React.createElement(
|
|
2090
|
+
return /*#__PURE__*/React.createElement(View, null, children);
|
|
2538
2091
|
}
|
|
2539
2092
|
|
|
2540
|
-
var _excluded$1 = ["
|
|
2541
|
-
var StyledLink = /*#__PURE__*/styled(
|
|
2093
|
+
var _excluded$1 = ["disabled", "noUnderline", "variant"];
|
|
2094
|
+
var StyledLink = /*#__PURE__*/styled(Typography).withConfig({
|
|
2542
2095
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2543
2096
|
return !['disabled', 'noUnderline'].includes(prop);
|
|
2544
2097
|
}
|
|
2545
2098
|
}).withConfig({
|
|
2546
2099
|
displayName: "TypographyLink__StyledLink",
|
|
2547
2100
|
componentId: "kitt-universal__sc-1o1zy30-0"
|
|
2548
|
-
})(["text-decoration:", ";", ""], function (_ref) {
|
|
2101
|
+
})(["text-decoration:", ";", ";margin:0;"], function (_ref) {
|
|
2549
2102
|
var noUnderline = _ref.noUnderline;
|
|
2550
2103
|
return noUnderline ? 'none' : 'underline';
|
|
2551
2104
|
}, function (_ref2) {
|
|
2552
|
-
var disabled = _ref2.disabled
|
|
2553
|
-
|
|
2554
|
-
noUnderline = _ref2.noUnderline;
|
|
2555
|
-
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 ") : '');
|
|
2105
|
+
var disabled = _ref2.disabled;
|
|
2106
|
+
return Platform.OS === 'web' ? "\n text-decoration-color: inherit;\n transition: color 0.2s ease-in-out;\n cursor: ".concat(disabled ? 'not-allowed' : 'pointer', ";\n ") : null;
|
|
2556
2107
|
});
|
|
2557
2108
|
function TypographyLink(_ref3) {
|
|
2558
|
-
var
|
|
2559
|
-
disabled = _ref3.disabled,
|
|
2109
|
+
var disabled = _ref3.disabled,
|
|
2560
2110
|
noUnderline = _ref3.noUnderline,
|
|
2561
|
-
|
|
2111
|
+
_ref3$variant = _ref3.variant,
|
|
2112
|
+
variant = _ref3$variant === void 0 ? 'bold' : _ref3$variant,
|
|
2562
2113
|
otherProps = _objectWithoutProperties(_ref3, _excluded$1);
|
|
2563
2114
|
|
|
2564
|
-
return /*#__PURE__*/React.createElement(
|
|
2565
|
-
accessibilityRole: "none"
|
|
2566
|
-
}), /*#__PURE__*/React.createElement(StyledLink, {
|
|
2115
|
+
return /*#__PURE__*/React.createElement(StyledLink, _extends({
|
|
2567
2116
|
disabled: disabled,
|
|
2568
2117
|
noUnderline: noUnderline,
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
},
|
|
2118
|
+
variant: variant,
|
|
2119
|
+
accessibilityRole: "link"
|
|
2120
|
+
}, otherProps));
|
|
2572
2121
|
}
|
|
2573
2122
|
|
|
2574
2123
|
function matchWindowSize(currentWidth, _ref) {
|
|
@@ -2596,7 +2145,7 @@ function createWindowSizeHelper(currentWidth) {
|
|
|
2596
2145
|
widthList[_key] = arguments[_key];
|
|
2597
2146
|
}
|
|
2598
2147
|
|
|
2599
|
-
if (
|
|
2148
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2600
2149
|
widthList.slice(1).forEach(function (_ref, index) {
|
|
2601
2150
|
var _ref2 = _slicedToArray(_ref, 1),
|
|
2602
2151
|
minWidth = _ref2[0];
|
|
@@ -2631,39 +2180,11 @@ function useKittTheme() {
|
|
|
2631
2180
|
return useMemo(function () {
|
|
2632
2181
|
return {
|
|
2633
2182
|
kitt: theme,
|
|
2634
|
-
responsive: createWindowSizeHelper(width)
|
|
2635
|
-
breakpoints: breakpoints
|
|
2183
|
+
responsive: createWindowSizeHelper(width)
|
|
2636
2184
|
};
|
|
2637
2185
|
}, [width]);
|
|
2638
2186
|
}
|
|
2639
2187
|
|
|
2640
|
-
function KittThemeProvider(_ref) {
|
|
2641
|
-
var children = _ref.children;
|
|
2642
|
-
var theme = useKittTheme();
|
|
2643
|
-
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
2644
|
-
theme: theme
|
|
2645
|
-
}, children);
|
|
2646
|
-
}
|
|
2647
|
-
var KittThemeDecorator = makeDecorator({
|
|
2648
|
-
name: 'ThemeDecorator',
|
|
2649
|
-
parameterName: 'theme',
|
|
2650
|
-
wrapper: function wrapper(storyFn, context, _ref2) {
|
|
2651
|
-
_ref2.options;
|
|
2652
|
-
_ref2.parameters;
|
|
2653
|
-
return /*#__PURE__*/React.createElement(KittThemeProvider, null, storyFn(context));
|
|
2654
|
-
}
|
|
2655
|
-
});
|
|
2656
|
-
|
|
2657
|
-
var SafeAreaProviderDecorator = makeDecorator({
|
|
2658
|
-
name: 'SafeAreaProviderDecorator',
|
|
2659
|
-
parameterName: 'safeAreaProvider',
|
|
2660
|
-
wrapper: function wrapper(storyFn, context, _ref) {
|
|
2661
|
-
_ref.options;
|
|
2662
|
-
_ref.parameters;
|
|
2663
|
-
return /*#__PURE__*/React.createElement(SafeAreaProvider, null, storyFn(context));
|
|
2664
|
-
}
|
|
2665
|
-
});
|
|
2666
|
-
|
|
2667
2188
|
var _excluded = ["children"];
|
|
2668
2189
|
function MatchWindowSize(_ref) {
|
|
2669
2190
|
var children = _ref.children,
|
|
@@ -2674,5 +2195,5 @@ function MatchWindowSize(_ref) {
|
|
|
2674
2195
|
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
2675
2196
|
}
|
|
2676
2197
|
|
|
2677
|
-
export { Avatar, Button, Card,
|
|
2198
|
+
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 };
|
|
2678
2199
|
//# sourceMappingURL=index-browser-all.es.js.map
|