@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
|
@@ -6,19 +6,14 @@ const _extends = require('@babel/runtime/helpers/extends');
|
|
|
6
6
|
const kittIcons = require('@ornikar/kitt-icons');
|
|
7
7
|
const React = require('react');
|
|
8
8
|
const reactNative = require('react-native');
|
|
9
|
-
const styled = require('styled-components');
|
|
9
|
+
const styled = require('styled-components/native');
|
|
10
10
|
const reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
11
|
-
const Animated = require('react-native-reanimated');
|
|
12
|
-
const addons = require('@storybook/addons');
|
|
13
11
|
|
|
14
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
|
|
15
13
|
|
|
16
14
|
const _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
17
15
|
const React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
18
16
|
const styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
19
|
-
const Animated__default = /*#__PURE__*/_interopDefaultLegacy(Animated);
|
|
20
|
-
|
|
21
|
-
const PrimitiveView = reactNative.View;
|
|
22
17
|
|
|
23
18
|
function SpinningIcon({
|
|
24
19
|
children
|
|
@@ -52,7 +47,7 @@ function SpinningIcon({
|
|
|
52
47
|
}, children);
|
|
53
48
|
}
|
|
54
49
|
|
|
55
|
-
const IconContainer$2 = /*#__PURE__*/styled__default
|
|
50
|
+
const IconContainer$2 = /*#__PURE__*/styled__default.View.withConfig({
|
|
56
51
|
displayName: "Icon__IconContainer",
|
|
57
52
|
componentId: "kitt-universal__sc-usm0ol-0"
|
|
58
53
|
})(["color:", ";width:", "px;height:", "px;align-self:", ";"], ({
|
|
@@ -81,14 +76,12 @@ function Icon({
|
|
|
81
76
|
}, spin ? /*#__PURE__*/React__default.createElement(SpinningIcon, null, clonedIcon) : clonedIcon);
|
|
82
77
|
}
|
|
83
78
|
|
|
84
|
-
const PrimitiveText = reactNative.Text;
|
|
85
|
-
|
|
86
79
|
const TypographyTypeContext = /*#__PURE__*/React.createContext(undefined);
|
|
87
80
|
const TypographyColorContext = /*#__PURE__*/React.createContext('black');
|
|
88
81
|
function useTypographyColor() {
|
|
89
82
|
return React.useContext(TypographyColorContext);
|
|
90
83
|
}
|
|
91
|
-
const StyledTypography = /*#__PURE__*/styled__default
|
|
84
|
+
const StyledTypography = /*#__PURE__*/styled__default.Text.withConfig({
|
|
92
85
|
displayName: "Typography__StyledTypography",
|
|
93
86
|
componentId: "kitt-universal__sc-1dz700q-0"
|
|
94
87
|
})(["", " ", ""], ({
|
|
@@ -149,13 +142,11 @@ function Typography({
|
|
|
149
142
|
color: colorWithDefaultToBlack,
|
|
150
143
|
isHeader: isHeader,
|
|
151
144
|
type: base,
|
|
152
|
-
variant: nonNullableVariant
|
|
153
|
-
accessibilityRole: accessibilityRole || undefined
|
|
145
|
+
variant: nonNullableVariant
|
|
154
146
|
}, otherProps))) : /*#__PURE__*/React__default.createElement(StyledTypography, _extends__default({
|
|
155
147
|
color: colorWithDefaultToBlack,
|
|
156
148
|
isHeader: isHeader,
|
|
157
|
-
variant: nonNullableVariant
|
|
158
|
-
accessibilityRole: accessibilityRole || undefined
|
|
149
|
+
variant: nonNullableVariant
|
|
159
150
|
}, otherProps));
|
|
160
151
|
return color ? /*#__PURE__*/React__default.createElement(TypographyColorContext.Provider, {
|
|
161
152
|
value: color
|
|
@@ -169,19 +160,19 @@ function TypographyText(props) {
|
|
|
169
160
|
}
|
|
170
161
|
|
|
171
162
|
function TypographyParagraph(props) {
|
|
163
|
+
// @ts-expect-error paragraph is not allowed in react-native but exists in react-native-web
|
|
172
164
|
return /*#__PURE__*/React__default.createElement(Typography, _extends__default({
|
|
173
165
|
accessibilityRole: "paragraph"
|
|
174
166
|
}, props));
|
|
175
167
|
}
|
|
176
168
|
|
|
177
|
-
const createHeading =
|
|
169
|
+
const createHeading = level => {
|
|
178
170
|
// https://github.com/necolas/react-native-web/issues/401
|
|
179
171
|
function TypographyHeading(props) {
|
|
180
172
|
return /*#__PURE__*/React__default.createElement(Typography, _extends__default({
|
|
181
|
-
accessibilityRole: "header"
|
|
182
|
-
base: defaultBase
|
|
173
|
+
accessibilityRole: "header"
|
|
183
174
|
}, props, {
|
|
184
|
-
|
|
175
|
+
"aria-level": level
|
|
185
176
|
}));
|
|
186
177
|
}
|
|
187
178
|
|
|
@@ -191,33 +182,17 @@ const createHeading = (level, defaultBase) => {
|
|
|
191
182
|
|
|
192
183
|
Typography.Text = TypographyText;
|
|
193
184
|
Typography.Paragraph = TypographyParagraph;
|
|
194
|
-
Typography.
|
|
195
|
-
Typography.
|
|
196
|
-
Typography.
|
|
197
|
-
Typography.
|
|
198
|
-
Typography.
|
|
199
|
-
Typography.Header6 = createHeading(6);
|
|
200
|
-
/** @deprecated use Typography.Header1 */
|
|
201
|
-
|
|
202
|
-
Typography.h1 = createHeading(1, 'header1');
|
|
203
|
-
/** @deprecated use Typography.Header2 */
|
|
204
|
-
|
|
205
|
-
Typography.h2 = createHeading(2, 'header2');
|
|
206
|
-
/** @deprecated use Typography.Header3 */
|
|
207
|
-
|
|
208
|
-
Typography.h3 = createHeading(3, 'header3');
|
|
209
|
-
/** @deprecated use Typography.Header4 */
|
|
210
|
-
|
|
211
|
-
Typography.h4 = createHeading(4, 'header4');
|
|
212
|
-
/** @deprecated use Typography.Header6 */
|
|
213
|
-
|
|
214
|
-
Typography.h5 = createHeading(5, 'header5');
|
|
185
|
+
Typography.h1 = createHeading('1');
|
|
186
|
+
Typography.h2 = createHeading('2');
|
|
187
|
+
Typography.h3 = createHeading('3');
|
|
188
|
+
Typography.h4 = createHeading('4');
|
|
189
|
+
Typography.h5 = createHeading('5');
|
|
215
190
|
|
|
216
191
|
const getFirstCharacter = string => string ? string[0] : '';
|
|
217
192
|
|
|
218
193
|
const getInitials = (firstname, lastname) => (getFirstCharacter(firstname) + getFirstCharacter(lastname)).toUpperCase();
|
|
219
194
|
|
|
220
|
-
const StyledAvatarView = /*#__PURE__*/styled__default
|
|
195
|
+
const StyledAvatarView = /*#__PURE__*/styled__default.View.withConfig({
|
|
221
196
|
displayName: "Avatar__StyledAvatarView",
|
|
222
197
|
componentId: "kitt-universal__sc-9miubv-0"
|
|
223
198
|
})(["border-radius:", "px;background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], ({
|
|
@@ -277,9 +252,7 @@ function Avatar({
|
|
|
277
252
|
})));
|
|
278
253
|
}
|
|
279
254
|
|
|
280
|
-
const
|
|
281
|
-
|
|
282
|
-
const ButtonContainer = /*#__PURE__*/styled__default(PrimitivePressable).withConfig({
|
|
255
|
+
const ButtonContainer = /*#__PURE__*/styled__default.Pressable.withConfig({
|
|
283
256
|
displayName: "ButtonContainer",
|
|
284
257
|
componentId: "kitt-universal__sc-ofbpwm-0"
|
|
285
258
|
})(["min-width:", ";max-width:", ";width:", ";min-height:", ";background-color:", ";padding:", ";flex-direction:row;align-self:flex-start;border-radius:", ";border-color:", ";border-width:", ";"], ({
|
|
@@ -368,14 +341,14 @@ const ButtonText = /*#__PURE__*/styled__default(Typography.Text).withConfig({
|
|
|
368
341
|
displayName: "ButtonContent__ButtonText",
|
|
369
342
|
componentId: "kitt-universal__sc-dnyw3n-0"
|
|
370
343
|
})(["text-align:center;"]);
|
|
371
|
-
const Content$1 = /*#__PURE__*/styled__default
|
|
344
|
+
const Content$1 = /*#__PURE__*/styled__default.View.withConfig({
|
|
372
345
|
displayName: "ButtonContent__Content",
|
|
373
346
|
componentId: "kitt-universal__sc-dnyw3n-1"
|
|
374
347
|
})(["flex-direction:row;align-items:center;justify-content:center;flex:", ";"], ({
|
|
375
348
|
stretch,
|
|
376
349
|
iconOnly
|
|
377
350
|
}) => `${stretch || iconOnly ? 1 : 0} 1 auto`);
|
|
378
|
-
const IconContainer$1 = /*#__PURE__*/styled__default
|
|
351
|
+
const IconContainer$1 = /*#__PURE__*/styled__default.View.withConfig({
|
|
379
352
|
displayName: "ButtonContent__IconContainer",
|
|
380
353
|
componentId: "kitt-universal__sc-dnyw3n-2"
|
|
381
354
|
})(["", ""], ({
|
|
@@ -428,7 +401,7 @@ function ButtonContent({
|
|
|
428
401
|
size: theme.kitt.button.iconSize
|
|
429
402
|
};
|
|
430
403
|
|
|
431
|
-
if (
|
|
404
|
+
if (process.env.NODE_ENV !== "production") {
|
|
432
405
|
if (!(children || icon)) {
|
|
433
406
|
throw new Error('kitt(Button): You should provide at least a children or a icon');
|
|
434
407
|
}
|
|
@@ -506,7 +479,7 @@ function Button({
|
|
|
506
479
|
}), children));
|
|
507
480
|
}
|
|
508
481
|
|
|
509
|
-
const Container$5 = /*#__PURE__*/styled__default
|
|
482
|
+
const Container$5 = /*#__PURE__*/styled__default.View.withConfig({
|
|
510
483
|
displayName: "Card__Container",
|
|
511
484
|
componentId: "kitt-universal__sc-1n9psug-0"
|
|
512
485
|
})(["background-color:", ";padding:", ";border-radius:", ";border-width:", ";border-color:", ";"], ({
|
|
@@ -601,11 +574,11 @@ const KittBreakpointsMax = {
|
|
|
601
574
|
LARGE: KittBreakpoints.WIDE - 1
|
|
602
575
|
};
|
|
603
576
|
|
|
604
|
-
const FieldContainer = /*#__PURE__*/styled__default
|
|
577
|
+
const FieldContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
605
578
|
displayName: "InputField__FieldContainer",
|
|
606
579
|
componentId: "kitt-universal__sc-13fkixs-0"
|
|
607
580
|
})(["padding:5px 0 10px;"]);
|
|
608
|
-
const FeedbackContainer = /*#__PURE__*/styled__default
|
|
581
|
+
const FeedbackContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
609
582
|
displayName: "InputField__FeedbackContainer",
|
|
610
583
|
componentId: "kitt-universal__sc-13fkixs-1"
|
|
611
584
|
})(["", ";"], ({
|
|
@@ -613,13 +586,13 @@ const FeedbackContainer = /*#__PURE__*/styled__default(PrimitiveView).withConfig
|
|
|
613
586
|
}) => theme.responsive.ifWindowSizeMatches({
|
|
614
587
|
minWidth: KittBreakpoints.SMALL
|
|
615
588
|
}, 'padding-top: 10px', 'padding-top: 5px'));
|
|
616
|
-
const FieldLabelContainer = /*#__PURE__*/styled__default
|
|
589
|
+
const FieldLabelContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
617
590
|
displayName: "InputField__FieldLabelContainer",
|
|
618
591
|
componentId: "kitt-universal__sc-13fkixs-2"
|
|
619
592
|
})(["flex-direction:row;align-items:center;padding-bottom:", "px;"], ({
|
|
620
593
|
theme
|
|
621
594
|
}) => theme.kitt.forms.inputField.labelContainerPaddingBottom);
|
|
622
|
-
const LabelContainer = /*#__PURE__*/styled__default
|
|
595
|
+
const LabelContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
623
596
|
displayName: "InputField__LabelContainer",
|
|
624
597
|
componentId: "kitt-universal__sc-13fkixs-3"
|
|
625
598
|
})(["margin-right:", "px;"], ({
|
|
@@ -664,7 +637,7 @@ const styledTextInputMixin = /*#__PURE__*/styled.css(["background-color:", ";bor
|
|
|
664
637
|
}) => theme.kitt.typography.colors[theme.kitt.forms.input.states[state].color], ({
|
|
665
638
|
theme
|
|
666
639
|
}) => theme.kitt.typography.types.bodies.fontFamily.regular);
|
|
667
|
-
const Input = /*#__PURE__*/styled__default
|
|
640
|
+
const Input = /*#__PURE__*/styled__default.TextInput.withConfig({
|
|
668
641
|
displayName: "InputText__Input",
|
|
669
642
|
componentId: "kitt-universal__sc-uke279-0"
|
|
670
643
|
})(["", " padding:", ";line-height:", ";min-height:", "px;"], styledTextInputMixin, ({
|
|
@@ -676,7 +649,7 @@ const Input = /*#__PURE__*/styled__default(reactNative.TextInput).withConfig({
|
|
|
676
649
|
}) => !multiline && reactNative.Platform.OS === 'ios' ? 0 : theme.kitt.typography.types.bodies.configs.body.baseAndSmall.lineHeight, ({
|
|
677
650
|
minHeight
|
|
678
651
|
}) => minHeight);
|
|
679
|
-
const Container$4 = /*#__PURE__*/styled__default
|
|
652
|
+
const Container$4 = /*#__PURE__*/styled__default.View.withConfig({
|
|
680
653
|
displayName: "InputText__Container",
|
|
681
654
|
componentId: "kitt-universal__sc-uke279-1"
|
|
682
655
|
})(["margin-top:", ";margin-bottom:", ";"], ({
|
|
@@ -684,7 +657,7 @@ const Container$4 = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
|
684
657
|
}) => theme.kitt.forms.input.marginTop, ({
|
|
685
658
|
theme
|
|
686
659
|
}) => theme.kitt.forms.input.marginBottom);
|
|
687
|
-
const PasswordButtonContainer = /*#__PURE__*/styled__default
|
|
660
|
+
const PasswordButtonContainer = /*#__PURE__*/styled__default.Pressable.withConfig({
|
|
688
661
|
displayName: "InputText__PasswordButtonContainer",
|
|
689
662
|
componentId: "kitt-universal__sc-uke279-2"
|
|
690
663
|
})(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:", "px;"], ({
|
|
@@ -773,7 +746,6 @@ const InputText = /*#__PURE__*/React.forwardRef(({
|
|
|
773
746
|
if (onBlur) onBlur(e);
|
|
774
747
|
}
|
|
775
748
|
})), type === 'password' && !disabled && /*#__PURE__*/React__default.createElement(PasswordButtonContainer, {
|
|
776
|
-
accessibilityRole: "button",
|
|
777
749
|
onPress: togglePasswordVisibility
|
|
778
750
|
}, /*#__PURE__*/React__default.createElement(TypographyIcon, {
|
|
779
751
|
icon: isPasswordVisible ? /*#__PURE__*/React__default.createElement(kittIcons.EyeIcon, null) : /*#__PURE__*/React__default.createElement(kittIcons.EyeOffIcon, null),
|
|
@@ -793,7 +765,7 @@ function Label({
|
|
|
793
765
|
}, children) : children);
|
|
794
766
|
}
|
|
795
767
|
|
|
796
|
-
const OuterRadio = /*#__PURE__*/styled__default
|
|
768
|
+
const OuterRadio = /*#__PURE__*/styled__default.View.withConfig({
|
|
797
769
|
displayName: "Radio__OuterRadio",
|
|
798
770
|
componentId: "kitt-universal__sc-1mdgr2o-0"
|
|
799
771
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;border-width:", ";border-color:", ";"], ({
|
|
@@ -811,7 +783,7 @@ const OuterRadio = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
|
811
783
|
theme,
|
|
812
784
|
disabled
|
|
813
785
|
}) => theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].borderColor);
|
|
814
|
-
const SelectedOuterRadio = /*#__PURE__*/styled__default
|
|
786
|
+
const SelectedOuterRadio = /*#__PURE__*/styled__default.View.withConfig({
|
|
815
787
|
displayName: "Radio__SelectedOuterRadio",
|
|
816
788
|
componentId: "kitt-universal__sc-1mdgr2o-1"
|
|
817
789
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;justify-content:center;align-items:center;"], ({
|
|
@@ -823,7 +795,7 @@ const SelectedOuterRadio = /*#__PURE__*/styled__default(PrimitiveView).withConfi
|
|
|
823
795
|
}) => theme.kitt.forms.radio.size, ({
|
|
824
796
|
theme
|
|
825
797
|
}) => theme.kitt.forms.radio.size / 2);
|
|
826
|
-
const SelectedInnerRadio = /*#__PURE__*/styled__default
|
|
798
|
+
const SelectedInnerRadio = /*#__PURE__*/styled__default.View.withConfig({
|
|
827
799
|
displayName: "Radio__SelectedInnerRadio",
|
|
828
800
|
componentId: "kitt-universal__sc-1mdgr2o-2"
|
|
829
801
|
})(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;"], ({
|
|
@@ -835,7 +807,7 @@ const SelectedInnerRadio = /*#__PURE__*/styled__default(PrimitiveView).withConfi
|
|
|
835
807
|
}) => theme.kitt.forms.radio.checked.innerSize, ({
|
|
836
808
|
theme
|
|
837
809
|
}) => theme.kitt.forms.radio.checked.innerSize / 2);
|
|
838
|
-
const Container$3 = /*#__PURE__*/styled__default
|
|
810
|
+
const Container$3 = /*#__PURE__*/styled__default.Pressable.withConfig({
|
|
839
811
|
displayName: "Radio__Container",
|
|
840
812
|
componentId: "kitt-universal__sc-1mdgr2o-3"
|
|
841
813
|
})(["flex-direction:row;align-items:center;"]);
|
|
@@ -858,7 +830,7 @@ function Radio({
|
|
|
858
830
|
disabled: disabled,
|
|
859
831
|
accessibilityRole: "radio",
|
|
860
832
|
"aria-checked": checked,
|
|
861
|
-
|
|
833
|
+
accessible: checked && !disabled,
|
|
862
834
|
onPress: () => {
|
|
863
835
|
onChange(value);
|
|
864
836
|
}
|
|
@@ -881,7 +853,7 @@ function TextArea({ ...props
|
|
|
881
853
|
}));
|
|
882
854
|
}
|
|
883
855
|
|
|
884
|
-
const Body = /*#__PURE__*/styled__default
|
|
856
|
+
const Body = /*#__PURE__*/styled__default.View.withConfig({
|
|
885
857
|
displayName: "Body",
|
|
886
858
|
componentId: "kitt-universal__sc-1ofncfn-0"
|
|
887
859
|
})(["", " background-color:", ";flex:1;"], ({
|
|
@@ -899,7 +871,7 @@ function FullScreenModalBody({
|
|
|
899
871
|
return /*#__PURE__*/React__default.createElement(Body, null, children);
|
|
900
872
|
}
|
|
901
873
|
|
|
902
|
-
const SideContainer = /*#__PURE__*/styled__default
|
|
874
|
+
const SideContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
903
875
|
displayName: "Header__SideContainer",
|
|
904
876
|
componentId: "kitt-universal__sc-dfmxi1-0"
|
|
905
877
|
})(["", ""], ({
|
|
@@ -919,7 +891,7 @@ function getHeaderHorizontalMediumPadding(spacing) {
|
|
|
919
891
|
return spacing * 6;
|
|
920
892
|
}
|
|
921
893
|
|
|
922
|
-
const Header = /*#__PURE__*/styled__default
|
|
894
|
+
const Header = /*#__PURE__*/styled__default.View.withConfig({
|
|
923
895
|
displayName: "Header",
|
|
924
896
|
componentId: "kitt-universal__sc-dfmxi1-1"
|
|
925
897
|
})(["", ";border-bottom-color:", ";border-bottom-width:1px;flex-direction:row;align-items:center;"], ({
|
|
@@ -937,7 +909,7 @@ const Header = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
|
937
909
|
}, ({
|
|
938
910
|
theme
|
|
939
911
|
}) => theme.kitt.fullScreenModal.header.borderColor);
|
|
940
|
-
const HeaderContent = /*#__PURE__*/styled__default
|
|
912
|
+
const HeaderContent = /*#__PURE__*/styled__default.View.withConfig({
|
|
941
913
|
displayName: "Header__HeaderContent",
|
|
942
914
|
componentId: "kitt-universal__sc-dfmxi1-2"
|
|
943
915
|
})(["", ";", ";justify-content:center;align-items:center;"], ({
|
|
@@ -1010,7 +982,7 @@ function FullScreenModalHeader({
|
|
|
1010
982
|
}, right) : null);
|
|
1011
983
|
}
|
|
1012
984
|
|
|
1013
|
-
const Container$2 = /*#__PURE__*/styled__default
|
|
985
|
+
const Container$2 = /*#__PURE__*/styled__default.View.withConfig({
|
|
1014
986
|
displayName: "FullScreenModal__Container",
|
|
1015
987
|
componentId: "kitt-universal__sc-11qpbe3-0"
|
|
1016
988
|
})(["flex:1;background-color:", ";"], ({
|
|
@@ -1024,246 +996,7 @@ function FullScreenModal({
|
|
|
1024
996
|
FullScreenModal.Header = FullScreenModalHeader;
|
|
1025
997
|
FullScreenModal.Body = FullScreenModalBody;
|
|
1026
998
|
|
|
1027
|
-
const
|
|
1028
|
-
displayName: "PressableIconButton",
|
|
1029
|
-
componentId: "kitt-universal__sc-1m6jo3s-0"
|
|
1030
|
-
})(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], ({
|
|
1031
|
-
theme
|
|
1032
|
-
}) => theme.kitt.iconButton.borderRadius, ({
|
|
1033
|
-
theme
|
|
1034
|
-
}) => theme.kitt.iconButton.width, ({
|
|
1035
|
-
theme
|
|
1036
|
-
}) => theme.kitt.iconButton.height, ({
|
|
1037
|
-
theme,
|
|
1038
|
-
color,
|
|
1039
|
-
disabled
|
|
1040
|
-
}) => {
|
|
1041
|
-
const {
|
|
1042
|
-
iconButton
|
|
1043
|
-
} = theme.kitt;
|
|
1044
|
-
|
|
1045
|
-
if (reactNative.Platform.OS !== 'web') {
|
|
1046
|
-
return undefined;
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
const {
|
|
1050
|
-
transition,
|
|
1051
|
-
scale
|
|
1052
|
-
} = iconButton;
|
|
1053
|
-
|
|
1054
|
-
if (disabled) {
|
|
1055
|
-
return `
|
|
1056
|
-
background-color: ${iconButton.disabled.backgroundColor};
|
|
1057
|
-
`;
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
return `
|
|
1061
|
-
transition: ${transition.property} ${transition.duration} ${transition.timingFunction};
|
|
1062
|
-
|
|
1063
|
-
&:hover,
|
|
1064
|
-
.kitt-hover & {
|
|
1065
|
-
@media (hover: none) and (pointer: coarse) {
|
|
1066
|
-
transform: scale(${scale.base.hover});
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
@media(${theme.breakpoints.min.mediumBreakpoint}) {
|
|
1070
|
-
transform: scale(${scale.medium.hover});
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
&:active,
|
|
1075
|
-
.kitt-active & {
|
|
1076
|
-
transform: scale(${scale.base.active});
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
&:hover,
|
|
1080
|
-
.kitt-hover &,
|
|
1081
|
-
&:focus,
|
|
1082
|
-
.kitt-focus &,
|
|
1083
|
-
&:active,
|
|
1084
|
-
.kitt-active & {
|
|
1085
|
-
background-color: ${color === 'white' ? iconButton.white.pressedBackgroundColor : iconButton.default.pressedBackgroundColor};
|
|
1086
|
-
}
|
|
1087
|
-
`;
|
|
1088
|
-
});
|
|
1089
|
-
|
|
1090
|
-
function WebAnimatedContainer({
|
|
1091
|
-
children,
|
|
1092
|
-
color,
|
|
1093
|
-
disabled,
|
|
1094
|
-
onPress
|
|
1095
|
-
}) {
|
|
1096
|
-
return /*#__PURE__*/React__default.createElement(PressableIconButton, {
|
|
1097
|
-
accessibilityRole: "button",
|
|
1098
|
-
color: color,
|
|
1099
|
-
disabled: disabled,
|
|
1100
|
-
onPress: onPress
|
|
1101
|
-
}, children);
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
const AnimatedIconButtonBackground = /*#__PURE__*/styled__default(Animated__default.View).withConfig({
|
|
1105
|
-
displayName: "PressableAnimatedContainer__AnimatedIconButtonBackground",
|
|
1106
|
-
componentId: "kitt-universal__sc-xl9ll5-0"
|
|
1107
|
-
})(["background-color:", ";border-radius:", "px;width:", "px;height:", "px;position:absolute;bottom:0;left:0;"], ({
|
|
1108
|
-
theme,
|
|
1109
|
-
color,
|
|
1110
|
-
disabled
|
|
1111
|
-
}) => {
|
|
1112
|
-
const {
|
|
1113
|
-
iconButton
|
|
1114
|
-
} = theme.kitt;
|
|
1115
|
-
if (disabled) return iconButton.disabled.backgroundColor;
|
|
1116
|
-
if (color === 'white') return iconButton.white.pressedBackgroundColor;
|
|
1117
|
-
return iconButton.default.pressedBackgroundColor;
|
|
1118
|
-
}, ({
|
|
1119
|
-
theme
|
|
1120
|
-
}) => theme.kitt.iconButton.borderRadius, ({
|
|
1121
|
-
theme
|
|
1122
|
-
}) => theme.kitt.iconButton.width, ({
|
|
1123
|
-
theme
|
|
1124
|
-
}) => theme.kitt.iconButton.height);
|
|
1125
|
-
const AnimatedViewContainer = /*#__PURE__*/styled__default(Animated__default.View).withConfig({
|
|
1126
|
-
displayName: "PressableAnimatedContainer__AnimatedViewContainer",
|
|
1127
|
-
componentId: "kitt-universal__sc-xl9ll5-1"
|
|
1128
|
-
})(["position:relative;align-items:center;justify-content:center;width:100%;height:100%;"]);
|
|
1129
|
-
|
|
1130
|
-
function NativeAnimatedContainer({
|
|
1131
|
-
disabled,
|
|
1132
|
-
color = 'black',
|
|
1133
|
-
children,
|
|
1134
|
-
onPress
|
|
1135
|
-
}) {
|
|
1136
|
-
const theme = /*#__PURE__*/styled.useTheme();
|
|
1137
|
-
const pressed = Animated.useSharedValue(false);
|
|
1138
|
-
const opacityStyles = Animated.useAnimatedStyle(function () {
|
|
1139
|
-
const _f = function () {
|
|
1140
|
-
return {
|
|
1141
|
-
opacity: Animated.withSpring(pressed.value ? 1 : 0)
|
|
1142
|
-
};
|
|
1143
|
-
};
|
|
1144
|
-
|
|
1145
|
-
_f._closure = {
|
|
1146
|
-
withSpring: Animated.withSpring,
|
|
1147
|
-
pressed
|
|
1148
|
-
};
|
|
1149
|
-
_f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
|
|
1150
|
-
_f.__workletHash = 10645190329247;
|
|
1151
|
-
_f.__location = "/home/chris/ornikar/kitt/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (64:41)";
|
|
1152
|
-
_f.__optimalization = 2;
|
|
1153
|
-
|
|
1154
|
-
global.__reanimatedWorkletInit(_f);
|
|
1155
|
-
|
|
1156
|
-
return _f;
|
|
1157
|
-
}());
|
|
1158
|
-
const scaleStyles = Animated.useAnimatedStyle(function () {
|
|
1159
|
-
const _f = function () {
|
|
1160
|
-
return {
|
|
1161
|
-
transform: [{
|
|
1162
|
-
scale: Animated.withSpring(pressed.value ? theme.kitt.iconButton.scale.base.active : theme.kitt.iconButton.scale.base.default)
|
|
1163
|
-
}]
|
|
1164
|
-
};
|
|
1165
|
-
};
|
|
1166
|
-
|
|
1167
|
-
_f._closure = {
|
|
1168
|
-
withSpring: Animated.withSpring,
|
|
1169
|
-
pressed,
|
|
1170
|
-
theme: {
|
|
1171
|
-
kitt: {
|
|
1172
|
-
iconButton: {
|
|
1173
|
-
scale: {
|
|
1174
|
-
base: {
|
|
1175
|
-
active: theme.kitt.iconButton.scale.base.active,
|
|
1176
|
-
default: theme.kitt.iconButton.scale.base.default
|
|
1177
|
-
}
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
};
|
|
1183
|
-
_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)}]};}}";
|
|
1184
|
-
_f.__workletHash = 13861998831411;
|
|
1185
|
-
_f.__location = "/home/chris/ornikar/kitt/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (70:39)";
|
|
1186
|
-
_f.__optimalization = 2;
|
|
1187
|
-
|
|
1188
|
-
global.__reanimatedWorkletInit(_f);
|
|
1189
|
-
|
|
1190
|
-
return _f;
|
|
1191
|
-
}());
|
|
1192
|
-
return /*#__PURE__*/React__default.createElement(PressableIconButton, {
|
|
1193
|
-
accessibilityRole: "button",
|
|
1194
|
-
disabled: disabled,
|
|
1195
|
-
color: color,
|
|
1196
|
-
onPress: onPress,
|
|
1197
|
-
onPressIn: () => {
|
|
1198
|
-
pressed.value = true;
|
|
1199
|
-
},
|
|
1200
|
-
onPressOut: () => {
|
|
1201
|
-
pressed.value = false;
|
|
1202
|
-
}
|
|
1203
|
-
}, /*#__PURE__*/React__default.createElement(AnimatedViewContainer, {
|
|
1204
|
-
style: disabled ? [{
|
|
1205
|
-
transform: [{
|
|
1206
|
-
scale: 1
|
|
1207
|
-
}]
|
|
1208
|
-
}] : [scaleStyles]
|
|
1209
|
-
}, /*#__PURE__*/React__default.createElement(AnimatedIconButtonBackground, {
|
|
1210
|
-
disabled: disabled,
|
|
1211
|
-
color: color,
|
|
1212
|
-
style: disabled ? [{
|
|
1213
|
-
opacity: 1
|
|
1214
|
-
}] : [opacityStyles]
|
|
1215
|
-
}), children));
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
const PressableAnimatedContainer = reactNative.Platform.OS === 'web' ? WebAnimatedContainer : NativeAnimatedContainer;
|
|
1219
|
-
|
|
1220
|
-
const IconButtonContentBorder = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
1221
|
-
displayName: "IconButton__IconButtonContentBorder",
|
|
1222
|
-
componentId: "kitt-universal__sc-swelbf-0"
|
|
1223
|
-
})(["border:", ";border-color:", ";width:", "px;height:", "px;align-items:center;justify-content:center;border-radius:", "px;"], ({
|
|
1224
|
-
theme
|
|
1225
|
-
}) => `${theme.kitt.iconButton.borderWidth}px solid`, ({
|
|
1226
|
-
theme,
|
|
1227
|
-
disabled
|
|
1228
|
-
}) => disabled ? theme.kitt.iconButton.disabled.borderColor : theme.kitt.iconButton.borderColor, ({
|
|
1229
|
-
theme
|
|
1230
|
-
}) => theme.kitt.iconButton.width - theme.kitt.iconButton.borderWidth, ({
|
|
1231
|
-
theme
|
|
1232
|
-
}) => theme.kitt.iconButton.height - theme.kitt.iconButton.borderWidth, ({
|
|
1233
|
-
theme
|
|
1234
|
-
}) => theme.kitt.iconButton.borderRadius);
|
|
1235
|
-
|
|
1236
|
-
function IconButtonContent({
|
|
1237
|
-
disabled,
|
|
1238
|
-
color,
|
|
1239
|
-
icon
|
|
1240
|
-
}) {
|
|
1241
|
-
return /*#__PURE__*/React__default.createElement(IconButtonContentBorder, {
|
|
1242
|
-
disabled: disabled
|
|
1243
|
-
}, /*#__PURE__*/React__default.createElement(TypographyIcon, {
|
|
1244
|
-
color: disabled ? 'black-light' : color,
|
|
1245
|
-
icon: icon
|
|
1246
|
-
}));
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
function IconButton({
|
|
1250
|
-
icon,
|
|
1251
|
-
color,
|
|
1252
|
-
disabled,
|
|
1253
|
-
onPress
|
|
1254
|
-
}) {
|
|
1255
|
-
return /*#__PURE__*/React__default.createElement(PressableAnimatedContainer, {
|
|
1256
|
-
color: color,
|
|
1257
|
-
disabled: disabled,
|
|
1258
|
-
onPress: onPress
|
|
1259
|
-
}, /*#__PURE__*/React__default.createElement(IconButtonContent, {
|
|
1260
|
-
disabled: disabled,
|
|
1261
|
-
color: color,
|
|
1262
|
-
icon: icon
|
|
1263
|
-
}));
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
const ContentView$1 = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
999
|
+
const ContentView$1 = /*#__PURE__*/styled__default.View.withConfig({
|
|
1267
1000
|
displayName: "ListItemContent__ContentView",
|
|
1268
1001
|
componentId: "kitt-universal__sc-57q0u9-0"
|
|
1269
1002
|
})(["flex:1 0 0%;align-self:center;"]);
|
|
@@ -1274,7 +1007,7 @@ function ListItemContent({
|
|
|
1274
1007
|
return /*#__PURE__*/React__default.createElement(ContentView$1, rest, children);
|
|
1275
1008
|
}
|
|
1276
1009
|
|
|
1277
|
-
const SideContainerView = /*#__PURE__*/styled__default
|
|
1010
|
+
const SideContainerView = /*#__PURE__*/styled__default.View.withConfig({
|
|
1278
1011
|
displayName: "ListItemSideContent__SideContainerView",
|
|
1279
1012
|
componentId: "kitt-universal__sc-1vajiw-0"
|
|
1280
1013
|
})(["flex-direction:row;margin-left:", ";margin-right:", ";"], ({
|
|
@@ -1294,7 +1027,7 @@ function ListItemSideContainer({
|
|
|
1294
1027
|
side: side
|
|
1295
1028
|
}, rest), children);
|
|
1296
1029
|
}
|
|
1297
|
-
const SideContentView = /*#__PURE__*/styled__default
|
|
1030
|
+
const SideContentView = /*#__PURE__*/styled__default.View.withConfig({
|
|
1298
1031
|
displayName: "ListItemSideContent__SideContentView",
|
|
1299
1032
|
componentId: "kitt-universal__sc-1vajiw-1"
|
|
1300
1033
|
})(["align-self:", ";"], ({
|
|
@@ -1310,7 +1043,7 @@ function ListItemSideContent({
|
|
|
1310
1043
|
}, rest), children);
|
|
1311
1044
|
}
|
|
1312
1045
|
|
|
1313
|
-
const ContainerView = /*#__PURE__*/styled__default
|
|
1046
|
+
const ContainerView = /*#__PURE__*/styled__default.View.withConfig({
|
|
1314
1047
|
displayName: "ListItem__ContainerView",
|
|
1315
1048
|
componentId: "kitt-universal__sc-2afp9s-0"
|
|
1316
1049
|
})(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], ({
|
|
@@ -1348,20 +1081,12 @@ function ListItem({
|
|
|
1348
1081
|
borders,
|
|
1349
1082
|
left,
|
|
1350
1083
|
right,
|
|
1351
|
-
onPress,
|
|
1352
1084
|
...rest
|
|
1353
1085
|
}) {
|
|
1354
|
-
|
|
1355
|
-
const wrapperProps = onPress ? {
|
|
1356
|
-
accessibilityRole: 'button',
|
|
1357
|
-
onPress,
|
|
1358
|
-
...rest
|
|
1359
|
-
} : undefined;
|
|
1360
|
-
const containerProps = onPress ? undefined : rest;
|
|
1361
|
-
return /*#__PURE__*/React__default.createElement(Wrapper, wrapperProps, /*#__PURE__*/React__default.createElement(ContainerView, _extends__default({
|
|
1086
|
+
return /*#__PURE__*/React__default.createElement(reactNative.Pressable, rest, /*#__PURE__*/React__default.createElement(ContainerView, {
|
|
1362
1087
|
withPadding: withPadding,
|
|
1363
1088
|
borders: borders
|
|
1364
|
-
},
|
|
1089
|
+
}, left ? /*#__PURE__*/React__default.createElement(ListItemSideContainer, {
|
|
1365
1090
|
side: "left"
|
|
1366
1091
|
}, left) : null, /*#__PURE__*/React__default.createElement(ListItemContent, null, children), right ? /*#__PURE__*/React__default.createElement(ListItemSideContainer, {
|
|
1367
1092
|
side: "right"
|
|
@@ -1400,7 +1125,7 @@ function LargeLoader({
|
|
|
1400
1125
|
|
|
1401
1126
|
const xIconSize = 14;
|
|
1402
1127
|
const mainIconSize = 20;
|
|
1403
|
-
const Container$1 = /*#__PURE__*/styled__default
|
|
1128
|
+
const Container$1 = /*#__PURE__*/styled__default.View.withConfig({
|
|
1404
1129
|
displayName: "Message__Container",
|
|
1405
1130
|
componentId: "kitt-universal__sc-c6400e-0"
|
|
1406
1131
|
})(["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;"], ({
|
|
@@ -1419,7 +1144,7 @@ const Container$1 = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
|
1419
1144
|
theme,
|
|
1420
1145
|
insets
|
|
1421
1146
|
}) => (insets?.top ?? 0) + theme.kitt.spacing * 4);
|
|
1422
|
-
const CloseContainer = /*#__PURE__*/styled__default
|
|
1147
|
+
const CloseContainer = /*#__PURE__*/styled__default.TouchableOpacity.withConfig({
|
|
1423
1148
|
displayName: "Message__CloseContainer",
|
|
1424
1149
|
componentId: "kitt-universal__sc-c6400e-1"
|
|
1425
1150
|
})(["margin-left:", "px;padding:", "px;"], ({
|
|
@@ -1427,13 +1152,13 @@ const CloseContainer = /*#__PURE__*/styled__default(reactNative.TouchableOpacity
|
|
|
1427
1152
|
}) => theme.kitt.spacing * 4, ({
|
|
1428
1153
|
theme
|
|
1429
1154
|
}) => theme.kitt.spacing);
|
|
1430
|
-
const IconContainer = /*#__PURE__*/styled__default
|
|
1155
|
+
const IconContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
1431
1156
|
displayName: "Message__IconContainer",
|
|
1432
1157
|
componentId: "kitt-universal__sc-c6400e-2"
|
|
1433
1158
|
})(["margin-right:", "px;"], ({
|
|
1434
1159
|
theme
|
|
1435
1160
|
}) => theme.kitt.spacing * 4);
|
|
1436
|
-
const Content = /*#__PURE__*/styled__default
|
|
1161
|
+
const Content = /*#__PURE__*/styled__default.Text.withConfig({
|
|
1437
1162
|
displayName: "Message__Content",
|
|
1438
1163
|
componentId: "kitt-universal__sc-c6400e-3"
|
|
1439
1164
|
})(["text-align:", ";flex:1;"], ({
|
|
@@ -1502,7 +1227,7 @@ function Message({
|
|
|
1502
1227
|
})) : null);
|
|
1503
1228
|
}
|
|
1504
1229
|
|
|
1505
|
-
const OverlayPressable = /*#__PURE__*/styled__default
|
|
1230
|
+
const OverlayPressable = /*#__PURE__*/styled__default.Pressable.withConfig({
|
|
1506
1231
|
displayName: "Overlay__OverlayPressable",
|
|
1507
1232
|
componentId: "kitt-universal__sc-1cz1gbr-0"
|
|
1508
1233
|
})(({
|
|
@@ -1514,14 +1239,11 @@ function Overlay({
|
|
|
1514
1239
|
onPress
|
|
1515
1240
|
}) {
|
|
1516
1241
|
return /*#__PURE__*/React__default.createElement(OverlayPressable, {
|
|
1517
|
-
accessibilityRole: "none",
|
|
1518
1242
|
onPress: onPress
|
|
1519
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
1243
|
+
}, /*#__PURE__*/React__default.createElement(reactNative.View, null));
|
|
1520
1244
|
}
|
|
1521
1245
|
|
|
1522
|
-
const
|
|
1523
|
-
|
|
1524
|
-
const BodyView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
1246
|
+
const BodyView = /*#__PURE__*/styled__default.View.withConfig({
|
|
1525
1247
|
displayName: "Body__BodyView",
|
|
1526
1248
|
componentId: "kitt-universal__sc-17fwpo4-0"
|
|
1527
1249
|
})(["padding:", "px ", "px;"], ({
|
|
@@ -1529,13 +1251,15 @@ const BodyView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
|
1529
1251
|
}) => theme.kitt.spacing * 6, ({
|
|
1530
1252
|
theme
|
|
1531
1253
|
}) => theme.kitt.spacing * 4);
|
|
1532
|
-
|
|
1254
|
+
const ModalBody = /*#__PURE__*/React.forwardRef(({
|
|
1533
1255
|
children
|
|
1534
|
-
}) {
|
|
1535
|
-
return /*#__PURE__*/React__default.createElement(
|
|
1536
|
-
|
|
1256
|
+
}, ref) => {
|
|
1257
|
+
return /*#__PURE__*/React__default.createElement(reactNative.ScrollView, {
|
|
1258
|
+
ref: ref
|
|
1259
|
+
}, /*#__PURE__*/React__default.createElement(BodyView, null, children));
|
|
1260
|
+
});
|
|
1537
1261
|
|
|
1538
|
-
const FooterView = /*#__PURE__*/styled__default
|
|
1262
|
+
const FooterView = /*#__PURE__*/styled__default.View.withConfig({
|
|
1539
1263
|
displayName: "Footer__FooterView",
|
|
1540
1264
|
componentId: "kitt-universal__sc-1ujq2dc-0"
|
|
1541
1265
|
})(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], ({
|
|
@@ -1551,7 +1275,7 @@ function ModalFooter({
|
|
|
1551
1275
|
|
|
1552
1276
|
const OnCloseContext = /*#__PURE__*/React.createContext(() => {});
|
|
1553
1277
|
|
|
1554
|
-
const HeaderView = /*#__PURE__*/styled__default
|
|
1278
|
+
const HeaderView = /*#__PURE__*/styled__default.View.withConfig({
|
|
1555
1279
|
displayName: "Header__HeaderView",
|
|
1556
1280
|
componentId: "kitt-universal__sc-1iwabch-0"
|
|
1557
1281
|
})(["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;"], ({
|
|
@@ -1559,19 +1283,19 @@ const HeaderView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
|
1559
1283
|
}) => theme.kitt.spacing * 2, ({
|
|
1560
1284
|
theme
|
|
1561
1285
|
}) => theme.kitt.colors.separator);
|
|
1562
|
-
const LeftIconView = /*#__PURE__*/styled__default
|
|
1286
|
+
const LeftIconView = /*#__PURE__*/styled__default.View.withConfig({
|
|
1563
1287
|
displayName: "Header__LeftIconView",
|
|
1564
1288
|
componentId: "kitt-universal__sc-1iwabch-1"
|
|
1565
1289
|
})(["align-self:flex-start;margin-right:", "px;"], ({
|
|
1566
1290
|
theme
|
|
1567
1291
|
}) => theme.kitt.spacing * 2);
|
|
1568
|
-
const RightIconView = /*#__PURE__*/styled__default
|
|
1292
|
+
const RightIconView = /*#__PURE__*/styled__default.View.withConfig({
|
|
1569
1293
|
displayName: "Header__RightIconView",
|
|
1570
1294
|
componentId: "kitt-universal__sc-1iwabch-2"
|
|
1571
1295
|
})(["align-self:flex-start;margin-left:", "px;"], ({
|
|
1572
1296
|
theme
|
|
1573
1297
|
}) => theme.kitt.spacing * 2);
|
|
1574
|
-
const TitleView = /*#__PURE__*/styled__default
|
|
1298
|
+
const TitleView = /*#__PURE__*/styled__default.View.withConfig({
|
|
1575
1299
|
displayName: "Header__TitleView",
|
|
1576
1300
|
componentId: "kitt-universal__sc-1iwabch-3"
|
|
1577
1301
|
})(["padding-left:", "px;flex-shrink:1;"], ({
|
|
@@ -1594,7 +1318,7 @@ function ModalHeader({
|
|
|
1594
1318
|
})));
|
|
1595
1319
|
}
|
|
1596
1320
|
|
|
1597
|
-
const ModalView = /*#__PURE__*/styled__default
|
|
1321
|
+
const ModalView = /*#__PURE__*/styled__default.View.withConfig({
|
|
1598
1322
|
displayName: "Modal__ModalView",
|
|
1599
1323
|
componentId: "kitt-universal__sc-1xy2w5u-0"
|
|
1600
1324
|
})(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], ({
|
|
@@ -1602,7 +1326,7 @@ const ModalView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
|
1602
1326
|
}) => theme.kitt.spacing * 20, ({
|
|
1603
1327
|
theme
|
|
1604
1328
|
}) => theme.kitt.spacing * 4);
|
|
1605
|
-
const ContentView = /*#__PURE__*/styled__default
|
|
1329
|
+
const ContentView = /*#__PURE__*/styled__default.View.withConfig({
|
|
1606
1330
|
displayName: "Modal__ContentView",
|
|
1607
1331
|
componentId: "kitt-universal__sc-1xy2w5u-1"
|
|
1608
1332
|
})(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", ";background-color:", ";"], ({
|
|
@@ -1654,81 +1378,11 @@ function Notification({
|
|
|
1654
1378
|
}, children);
|
|
1655
1379
|
}
|
|
1656
1380
|
|
|
1657
|
-
const
|
|
1658
|
-
|
|
1659
|
-
const Flex = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
1660
|
-
shouldForwardProp: (prop, defaultValidatorFn) => !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop)
|
|
1661
|
-
}).withConfig({
|
|
1662
|
-
displayName: "Flex",
|
|
1663
|
-
componentId: "kitt-universal__sc-15q3v3h-0"
|
|
1664
|
-
})(["display:flex;flex-direction:", ";flex-wrap:wrap;padding:", "px;"], ({
|
|
1665
|
-
direction
|
|
1666
|
-
}) => direction, ({
|
|
1667
|
-
theme,
|
|
1668
|
-
padding = 0
|
|
1669
|
-
}) => padding * theme.kitt.spacing);
|
|
1670
|
-
|
|
1671
|
-
const storyPadding = 16;
|
|
1672
|
-
|
|
1673
|
-
const getBackgroundColorFromBlockColor = (theme, color = 'transparent') => {
|
|
1674
|
-
switch (color) {
|
|
1675
|
-
case 'dark':
|
|
1676
|
-
return '#293033';
|
|
1677
|
-
|
|
1678
|
-
case 'light':
|
|
1679
|
-
return '#ffffff';
|
|
1680
|
-
|
|
1681
|
-
case 'primary':
|
|
1682
|
-
return theme.kitt.palettes.lateOcean.lateOcean;
|
|
1683
|
-
|
|
1684
|
-
default:
|
|
1685
|
-
return 'transparent';
|
|
1686
|
-
}
|
|
1687
|
-
};
|
|
1688
|
-
|
|
1689
|
-
const getTypographyColorFromBlockColor = (color = 'transparent') => {
|
|
1690
|
-
switch (color) {
|
|
1691
|
-
case 'dark':
|
|
1692
|
-
case 'primary':
|
|
1693
|
-
return 'white';
|
|
1694
|
-
|
|
1695
|
-
case 'light':
|
|
1696
|
-
default:
|
|
1697
|
-
return 'black';
|
|
1698
|
-
}
|
|
1699
|
-
};
|
|
1700
|
-
|
|
1701
|
-
const StoryBlockBackgroundContext = /*#__PURE__*/React.createContext('transparent');
|
|
1702
|
-
const StoryBlockColorContext = /*#__PURE__*/React.createContext('black');
|
|
1703
|
-
const useStoryBlockColor = color => {
|
|
1704
|
-
const storyBlockColor = React.useContext(StoryBlockColorContext);
|
|
1705
|
-
return color || storyBlockColor;
|
|
1706
|
-
};
|
|
1707
|
-
const StyledStoryBlockView = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
1708
|
-
displayName: "StoryBlock__StyledStoryBlockView",
|
|
1709
|
-
componentId: "kitt-universal__sc-3w4hdm-0"
|
|
1710
|
-
})(["padding:16px ", "px 0;margin:0 -", "px;background:", ";"], storyPadding, storyPadding, ({
|
|
1711
|
-
theme,
|
|
1712
|
-
background
|
|
1713
|
-
}) => getBackgroundColorFromBlockColor(theme, background));
|
|
1714
|
-
function StoryBlock({
|
|
1715
|
-
children,
|
|
1716
|
-
background
|
|
1717
|
-
}) {
|
|
1718
|
-
return /*#__PURE__*/React__default.createElement(StyledStoryBlockView, {
|
|
1719
|
-
background: background
|
|
1720
|
-
}, /*#__PURE__*/React__default.createElement(StoryBlockColorContext.Provider, {
|
|
1721
|
-
value: getTypographyColorFromBlockColor(background)
|
|
1722
|
-
}, /*#__PURE__*/React__default.createElement(StoryBlockBackgroundContext.Provider, {
|
|
1723
|
-
value: background
|
|
1724
|
-
}, children)));
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
const StoryTitleContainer = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
1381
|
+
const StoryTitleContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
1728
1382
|
displayName: "StoryTitle__StoryTitleContainer",
|
|
1729
1383
|
componentId: "kitt-universal__sc-sic7hb-0"
|
|
1730
1384
|
})(["margin-bottom:30px;"]);
|
|
1731
|
-
const StorySubTitleContainer = /*#__PURE__*/styled__default
|
|
1385
|
+
const StorySubTitleContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
1732
1386
|
displayName: "StoryTitle__StorySubTitleContainer",
|
|
1733
1387
|
componentId: "kitt-universal__sc-sic7hb-1"
|
|
1734
1388
|
})(["margin-bottom:10px;"]);
|
|
@@ -1737,10 +1391,10 @@ function StoryTitle({
|
|
|
1737
1391
|
children,
|
|
1738
1392
|
numberOfLines
|
|
1739
1393
|
}) {
|
|
1740
|
-
return /*#__PURE__*/React__default.createElement(StoryTitleContainer, null, /*#__PURE__*/React__default.createElement(Typography.
|
|
1394
|
+
return /*#__PURE__*/React__default.createElement(StoryTitleContainer, null, /*#__PURE__*/React__default.createElement(Typography.h1, {
|
|
1741
1395
|
variant: "bold",
|
|
1742
1396
|
base: "header1",
|
|
1743
|
-
color:
|
|
1397
|
+
color: color,
|
|
1744
1398
|
numberOfLines: numberOfLines
|
|
1745
1399
|
}, children));
|
|
1746
1400
|
}
|
|
@@ -1750,10 +1404,10 @@ function StoryTitleLevel2({
|
|
|
1750
1404
|
children,
|
|
1751
1405
|
numberOfLines
|
|
1752
1406
|
}) {
|
|
1753
|
-
return /*#__PURE__*/React__default.createElement(StoryTitleContainer, null, /*#__PURE__*/React__default.createElement(Typography.
|
|
1407
|
+
return /*#__PURE__*/React__default.createElement(StoryTitleContainer, null, /*#__PURE__*/React__default.createElement(Typography.h2, {
|
|
1754
1408
|
variant: "bold",
|
|
1755
1409
|
base: "header2",
|
|
1756
|
-
color:
|
|
1410
|
+
color: color,
|
|
1757
1411
|
numberOfLines: numberOfLines
|
|
1758
1412
|
}, children));
|
|
1759
1413
|
}
|
|
@@ -1765,11 +1419,11 @@ function StoryTitleLevel3({
|
|
|
1765
1419
|
children,
|
|
1766
1420
|
numberOfLines
|
|
1767
1421
|
}) {
|
|
1768
|
-
return /*#__PURE__*/React__default.createElement(StorySubTitleContainer, null, /*#__PURE__*/React__default.createElement(Typography.
|
|
1422
|
+
return /*#__PURE__*/React__default.createElement(StorySubTitleContainer, null, /*#__PURE__*/React__default.createElement(Typography.h3, {
|
|
1769
1423
|
variant: "bold",
|
|
1770
1424
|
base: "header3",
|
|
1771
1425
|
medium: "header4",
|
|
1772
|
-
color:
|
|
1426
|
+
color: color,
|
|
1773
1427
|
numberOfLines: numberOfLines
|
|
1774
1428
|
}, children));
|
|
1775
1429
|
}
|
|
@@ -1781,11 +1435,11 @@ function StoryTitleLevel4({
|
|
|
1781
1435
|
children,
|
|
1782
1436
|
numberOfLines
|
|
1783
1437
|
}) {
|
|
1784
|
-
return /*#__PURE__*/React__default.createElement(StorySubTitleContainer, null, /*#__PURE__*/React__default.createElement(Typography.
|
|
1438
|
+
return /*#__PURE__*/React__default.createElement(StorySubTitleContainer, null, /*#__PURE__*/React__default.createElement(Typography.h4, {
|
|
1785
1439
|
variant: "bold",
|
|
1786
1440
|
base: "header4",
|
|
1787
1441
|
medium: "header5",
|
|
1788
|
-
color:
|
|
1442
|
+
color: color,
|
|
1789
1443
|
numberOfLines: numberOfLines
|
|
1790
1444
|
}, children));
|
|
1791
1445
|
}
|
|
@@ -1795,38 +1449,22 @@ StoryTitle.Level2 = StoryTitleLevel2;
|
|
|
1795
1449
|
StoryTitle.Level3 = StoryTitleLevel3;
|
|
1796
1450
|
StoryTitle.Level4 = StoryTitleLevel4;
|
|
1797
1451
|
|
|
1798
|
-
const
|
|
1799
|
-
displayName: "
|
|
1800
|
-
componentId: "kitt-universal__sc-
|
|
1801
|
-
})(["
|
|
1802
|
-
function
|
|
1803
|
-
title,
|
|
1804
|
-
contentContainerStyle,
|
|
1805
|
-
children
|
|
1806
|
-
}) {
|
|
1807
|
-
return /*#__PURE__*/React__default.createElement(StoryContainer$1, {
|
|
1808
|
-
contentContainerStyle: contentContainerStyle
|
|
1809
|
-
}, /*#__PURE__*/React__default.createElement(StoryTitle, null, title), children);
|
|
1810
|
-
}
|
|
1811
|
-
|
|
1812
|
-
const StyledSection = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
1813
|
-
displayName: "StorySection__StyledSection",
|
|
1814
|
-
componentId: "kitt-universal__sc-1b3liv5-0"
|
|
1815
|
-
})(["margin-bottom:32px;"]);
|
|
1816
|
-
function StorySection({
|
|
1452
|
+
const StyledSection = /*#__PURE__*/styled__default.View.withConfig({
|
|
1453
|
+
displayName: "Section__StyledSection",
|
|
1454
|
+
componentId: "kitt-universal__sc-x4z1s-0"
|
|
1455
|
+
})(["margin-bottom:30px;"]);
|
|
1456
|
+
function Section({
|
|
1817
1457
|
title,
|
|
1818
1458
|
className,
|
|
1819
1459
|
children,
|
|
1820
|
-
internalIsDemoSection,
|
|
1821
1460
|
...props
|
|
1822
1461
|
}) {
|
|
1823
|
-
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
1824
1462
|
return /*#__PURE__*/React__default.createElement(StyledSection, props, /*#__PURE__*/React__default.createElement(StoryTitle.Level2, null, title), children);
|
|
1825
1463
|
}
|
|
1826
|
-
const StyledSubSection = /*#__PURE__*/styled__default
|
|
1827
|
-
displayName: "
|
|
1828
|
-
componentId: "kitt-universal__sc-
|
|
1829
|
-
})(["margin-bottom:
|
|
1464
|
+
const StyledSubSection = /*#__PURE__*/styled__default.View.withConfig({
|
|
1465
|
+
displayName: "Section__StyledSubSection",
|
|
1466
|
+
componentId: "kitt-universal__sc-x4z1s-1"
|
|
1467
|
+
})(["margin-bottom:20px;"]);
|
|
1830
1468
|
|
|
1831
1469
|
function SubSection({
|
|
1832
1470
|
title,
|
|
@@ -1837,55 +1475,34 @@ function SubSection({
|
|
|
1837
1475
|
return /*#__PURE__*/React__default.createElement(StyledSubSection, props, /*#__PURE__*/React__default.createElement(StoryTitle.Level3, null, title), children);
|
|
1838
1476
|
}
|
|
1839
1477
|
|
|
1840
|
-
const
|
|
1841
|
-
displayName: "
|
|
1842
|
-
componentId: "kitt-universal__sc-
|
|
1843
|
-
})(["margin-bottom:
|
|
1844
|
-
|
|
1845
|
-
function BlockSection({
|
|
1846
|
-
title,
|
|
1847
|
-
className,
|
|
1848
|
-
children,
|
|
1849
|
-
...props
|
|
1850
|
-
}) {
|
|
1851
|
-
return /*#__PURE__*/React__default.createElement(StyledBlockSection, props, /*#__PURE__*/React__default.createElement(StoryTitle.Level4, null, title), children);
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
|
-
const StyledDemoSection = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
1855
|
-
displayName: "StorySection__StyledDemoSection",
|
|
1856
|
-
componentId: "kitt-universal__sc-1b3liv5-3"
|
|
1857
|
-
})(["margin-bottom:64px;"]);
|
|
1478
|
+
const StyledDemoSection = /*#__PURE__*/styled__default.View.withConfig({
|
|
1479
|
+
displayName: "Section__StyledDemoSection",
|
|
1480
|
+
componentId: "kitt-universal__sc-x4z1s-2"
|
|
1481
|
+
})(["margin-bottom:90px;"]);
|
|
1858
1482
|
|
|
1859
1483
|
function DemoSection({
|
|
1860
1484
|
children
|
|
1861
1485
|
}) {
|
|
1862
|
-
return /*#__PURE__*/React__default.createElement(StyledDemoSection, null, /*#__PURE__*/React__default.createElement(
|
|
1863
|
-
internalIsDemoSection: true,
|
|
1486
|
+
return /*#__PURE__*/React__default.createElement(StyledDemoSection, null, /*#__PURE__*/React__default.createElement(Section, {
|
|
1864
1487
|
title: "Demo"
|
|
1865
1488
|
}, children));
|
|
1866
1489
|
}
|
|
1867
1490
|
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
/** @deprecated use StorySection.Demo instead */
|
|
1871
|
-
|
|
1872
|
-
StorySection.DemoSection = DemoSection;
|
|
1873
|
-
StorySection.Demo = DemoSection;
|
|
1874
|
-
/** @deprecated use StorySection instead */
|
|
1491
|
+
Section.SubSection = SubSection;
|
|
1492
|
+
Section.DemoSection = DemoSection;
|
|
1875
1493
|
|
|
1876
|
-
const
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1494
|
+
const StoryContainer = /*#__PURE__*/styled__default.ScrollView.withConfig({
|
|
1495
|
+
displayName: "Story__StoryContainer",
|
|
1496
|
+
componentId: "kitt-universal__sc-1kwdg2p-0"
|
|
1497
|
+
})(["padding:10px;"]);
|
|
1498
|
+
function Story({
|
|
1880
1499
|
title,
|
|
1881
|
-
|
|
1882
|
-
|
|
1500
|
+
contentContainerStyle,
|
|
1501
|
+
children
|
|
1883
1502
|
}) {
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
title: title
|
|
1888
|
-
}, children);
|
|
1503
|
+
return /*#__PURE__*/React__default.createElement(StoryContainer, {
|
|
1504
|
+
contentContainerStyle: contentContainerStyle
|
|
1505
|
+
}, /*#__PURE__*/React__default.createElement(StoryTitle, null, title), children);
|
|
1889
1506
|
}
|
|
1890
1507
|
|
|
1891
1508
|
function StoryDecorator(storyFn, context) {
|
|
@@ -1894,22 +1511,22 @@ function StoryDecorator(storyFn, context) {
|
|
|
1894
1511
|
}, storyFn());
|
|
1895
1512
|
}
|
|
1896
1513
|
|
|
1897
|
-
const SmallScreenRow = /*#__PURE__*/styled__default
|
|
1514
|
+
const SmallScreenRow = /*#__PURE__*/styled__default.View.withConfig({
|
|
1898
1515
|
displayName: "StoryGrid__SmallScreenRow",
|
|
1899
1516
|
componentId: "kitt-universal__sc-4z5new-0"
|
|
1900
1517
|
})(["flex-direction:column;margin:0;"]);
|
|
1901
|
-
const SmallScreenCol = /*#__PURE__*/styled__default
|
|
1518
|
+
const SmallScreenCol = /*#__PURE__*/styled__default.View.withConfig({
|
|
1902
1519
|
displayName: "StoryGrid__SmallScreenCol",
|
|
1903
1520
|
componentId: "kitt-universal__sc-4z5new-1"
|
|
1904
|
-
})(["padding:
|
|
1905
|
-
const FlexRow = /*#__PURE__*/styled__default
|
|
1521
|
+
})(["padding:10px 0 20px;"]);
|
|
1522
|
+
const FlexRow = /*#__PURE__*/styled__default.View.withConfig({
|
|
1906
1523
|
displayName: "StoryGrid__FlexRow",
|
|
1907
1524
|
componentId: "kitt-universal__sc-4z5new-2"
|
|
1908
|
-
})(["flex-direction:row;margin:0 -
|
|
1909
|
-
const FlexCol = /*#__PURE__*/styled__default
|
|
1525
|
+
})(["flex-direction:row;margin:0 -5px 20px;"]);
|
|
1526
|
+
const FlexCol = /*#__PURE__*/styled__default.View.withConfig({
|
|
1910
1527
|
displayName: "StoryGrid__FlexCol",
|
|
1911
1528
|
componentId: "kitt-universal__sc-4z5new-3"
|
|
1912
|
-
})(["flex-grow:1;flex-basis:0;margin:0
|
|
1529
|
+
})(["flex-grow:1;flex-basis:0;margin:0 5px 10px;"]);
|
|
1913
1530
|
|
|
1914
1531
|
function StoryGridRow({
|
|
1915
1532
|
children,
|
|
@@ -1932,19 +1549,8 @@ function StoryGridRow({
|
|
|
1932
1549
|
function StoryGridCol({
|
|
1933
1550
|
title,
|
|
1934
1551
|
titleColor,
|
|
1935
|
-
children
|
|
1936
|
-
platform = 'all'
|
|
1552
|
+
children
|
|
1937
1553
|
}) {
|
|
1938
|
-
const isNative = reactNative.Platform.OS === 'ios' || reactNative.Platform.OS === 'android';
|
|
1939
|
-
|
|
1940
|
-
if (reactNative.Platform.OS === 'web' && platform === 'native') {
|
|
1941
|
-
return null;
|
|
1942
|
-
}
|
|
1943
|
-
|
|
1944
|
-
if (isNative && platform === 'web') {
|
|
1945
|
-
return null;
|
|
1946
|
-
}
|
|
1947
|
-
|
|
1948
1554
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, title ? /*#__PURE__*/React__default.createElement(StoryTitle.Level4, {
|
|
1949
1555
|
numberOfLines: 1,
|
|
1950
1556
|
color: titleColor
|
|
@@ -1956,7 +1562,7 @@ const StoryGrid = {
|
|
|
1956
1562
|
Col: StoryGridCol
|
|
1957
1563
|
};
|
|
1958
1564
|
|
|
1959
|
-
const Container = /*#__PURE__*/styled__default
|
|
1565
|
+
const Container = /*#__PURE__*/styled__default.View.withConfig({
|
|
1960
1566
|
displayName: "Tag__Container",
|
|
1961
1567
|
componentId: "kitt-universal__sc-19jmowi-0"
|
|
1962
1568
|
})(["background-color:", ";border-width:", ";border-color:", ";padding:", ";border-radius:", ";align-self:flex-start;"], ({
|
|
@@ -2078,14 +1684,6 @@ const buttonLateOceanTheme = {
|
|
|
2078
1684
|
disabledBackgroundColor: lateOceanColorPalette.transparent,
|
|
2079
1685
|
pressedBackgroundColor: lateOceanColorPalette.transparent,
|
|
2080
1686
|
disabledBorderColor: lateOceanColorPalette.transparent
|
|
2081
|
-
},
|
|
2082
|
-
white: {
|
|
2083
|
-
backgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
2084
|
-
disabledBackgroundColor: lateOceanColorPalette.transparent,
|
|
2085
|
-
hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
2086
|
-
pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
2087
|
-
focusBorderColor: 'rgba(255, 255, 255, 0.1)',
|
|
2088
|
-
disabledBorderColor: lateOceanColorPalette.transparent
|
|
2089
1687
|
}
|
|
2090
1688
|
};
|
|
2091
1689
|
|
|
@@ -2214,41 +1812,6 @@ const fullScreenModalLateOceanTheme = {
|
|
|
2214
1812
|
}
|
|
2215
1813
|
};
|
|
2216
1814
|
|
|
2217
|
-
const iconButton = {
|
|
2218
|
-
backgroundColor: 'transparent',
|
|
2219
|
-
width: 40,
|
|
2220
|
-
height: 40,
|
|
2221
|
-
borderRadius: 20,
|
|
2222
|
-
borderWidth: 2,
|
|
2223
|
-
borderColor: 'transparent',
|
|
2224
|
-
transition: {
|
|
2225
|
-
property: 'all',
|
|
2226
|
-
duration: '200ms',
|
|
2227
|
-
timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1);'
|
|
2228
|
-
},
|
|
2229
|
-
scale: {
|
|
2230
|
-
base: {
|
|
2231
|
-
default: 1,
|
|
2232
|
-
hover: 0.95,
|
|
2233
|
-
active: 0.95
|
|
2234
|
-
},
|
|
2235
|
-
medium: {
|
|
2236
|
-
hover: 1.05
|
|
2237
|
-
}
|
|
2238
|
-
},
|
|
2239
|
-
disabled: {
|
|
2240
|
-
scale: 1,
|
|
2241
|
-
backgroundColor: buttonLateOceanTheme.secondary.disabledBackgroundColor,
|
|
2242
|
-
borderColor: buttonLateOceanTheme.secondary.disabledBorderColor
|
|
2243
|
-
},
|
|
2244
|
-
default: {
|
|
2245
|
-
pressedBackgroundColor: buttonLateOceanTheme.secondary.pressedBackgroundColor
|
|
2246
|
-
},
|
|
2247
|
-
white: {
|
|
2248
|
-
pressedBackgroundColor: buttonLateOceanTheme.white.hoverBackgroundColor
|
|
2249
|
-
}
|
|
2250
|
-
};
|
|
2251
|
-
|
|
2252
1815
|
const listItemLateOceanTheme = {
|
|
2253
1816
|
padding: '12px 16px',
|
|
2254
1817
|
borderColor: colorsLateOceanTheme.separator,
|
|
@@ -2374,33 +1937,9 @@ const typographyLateOceanTheme = {
|
|
|
2374
1937
|
'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
|
|
2375
1938
|
}
|
|
2376
1939
|
}
|
|
2377
|
-
},
|
|
2378
|
-
link: {
|
|
2379
|
-
disabledColor: lateOceanColorPalette.black200
|
|
2380
1940
|
}
|
|
2381
1941
|
};
|
|
2382
1942
|
|
|
2383
|
-
const breakpoints = {
|
|
2384
|
-
values: {
|
|
2385
|
-
base: 0,
|
|
2386
|
-
small: 480,
|
|
2387
|
-
medium: 768,
|
|
2388
|
-
large: 1024,
|
|
2389
|
-
wide: 1280
|
|
2390
|
-
},
|
|
2391
|
-
min: {
|
|
2392
|
-
smallBreakpoint: 'min-width: 480px',
|
|
2393
|
-
mediumBreakpoint: 'min-width: 768px',
|
|
2394
|
-
largeBreakpoint: 'min-width: 1024px',
|
|
2395
|
-
wideBreakpoint: 'min-width: 1280px'
|
|
2396
|
-
},
|
|
2397
|
-
max: {
|
|
2398
|
-
smallBreakpoint: 'max-width: 479px',
|
|
2399
|
-
mediumBreakpoint: 'max-width: 767px',
|
|
2400
|
-
largeBreakpoint: 'max-width: 1023px',
|
|
2401
|
-
wideBreakpoint: 'max-width: 1279px'
|
|
2402
|
-
}
|
|
2403
|
-
};
|
|
2404
1943
|
const theme = {
|
|
2405
1944
|
spacing: 4,
|
|
2406
1945
|
colors: colorsLateOceanTheme,
|
|
@@ -2416,54 +1955,41 @@ const theme = {
|
|
|
2416
1955
|
tag: tagLateOceanTheme,
|
|
2417
1956
|
shadows: shadowsLateOceanTheme,
|
|
2418
1957
|
fullScreenModal: fullScreenModalLateOceanTheme,
|
|
2419
|
-
iconButton,
|
|
2420
1958
|
listItem: listItemLateOceanTheme
|
|
2421
1959
|
};
|
|
2422
1960
|
|
|
2423
1961
|
function Tooltip({
|
|
2424
1962
|
children
|
|
2425
1963
|
}) {
|
|
2426
|
-
return /*#__PURE__*/React__default.createElement(
|
|
1964
|
+
return /*#__PURE__*/React__default.createElement(reactNative.View, null, children);
|
|
2427
1965
|
}
|
|
2428
1966
|
|
|
2429
|
-
const StyledLink = /*#__PURE__*/styled__default(
|
|
1967
|
+
const StyledLink = /*#__PURE__*/styled__default(Typography).withConfig({
|
|
2430
1968
|
shouldForwardProp: prop => !['disabled', 'noUnderline'].includes(prop)
|
|
2431
1969
|
}).withConfig({
|
|
2432
1970
|
displayName: "TypographyLink__StyledLink",
|
|
2433
1971
|
componentId: "kitt-universal__sc-1o1zy30-0"
|
|
2434
|
-
})(["text-decoration:", ";", ""], ({
|
|
1972
|
+
})(["text-decoration:", ";", ";margin:0;"], ({
|
|
2435
1973
|
noUnderline
|
|
2436
1974
|
}) => noUnderline ? 'none' : 'underline', ({
|
|
2437
|
-
disabled
|
|
2438
|
-
|
|
2439
|
-
noUnderline
|
|
2440
|
-
}) => `
|
|
2441
|
-
${disabled ? `color: ${theme.kitt.typography.link.disabledColor};` : ''}
|
|
2442
|
-
${reactNative.Platform.OS === 'web' ? `
|
|
1975
|
+
disabled
|
|
1976
|
+
}) => reactNative.Platform.OS === 'web' ? `
|
|
2443
1977
|
text-decoration-color: inherit;
|
|
2444
1978
|
transition: color 0.2s ease-in-out;
|
|
2445
1979
|
cursor: ${disabled ? 'not-allowed' : 'pointer'};
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
&:hover, &:active, .kitt-hover & {
|
|
2449
|
-
text-decoration: ${noUnderline ? 'underline' : 'none'};
|
|
2450
|
-
}
|
|
2451
|
-
` : ''}`);
|
|
1980
|
+
` : null);
|
|
2452
1981
|
function TypographyLink({
|
|
2453
|
-
children,
|
|
2454
1982
|
disabled,
|
|
2455
1983
|
noUnderline,
|
|
2456
|
-
|
|
1984
|
+
variant = 'bold',
|
|
2457
1985
|
...otherProps
|
|
2458
1986
|
}) {
|
|
2459
|
-
return /*#__PURE__*/React__default.createElement(
|
|
2460
|
-
accessibilityRole: "none"
|
|
2461
|
-
}), /*#__PURE__*/React__default.createElement(StyledLink, {
|
|
1987
|
+
return /*#__PURE__*/React__default.createElement(StyledLink, _extends__default({
|
|
2462
1988
|
disabled: disabled,
|
|
2463
1989
|
noUnderline: noUnderline,
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
},
|
|
1990
|
+
variant: variant,
|
|
1991
|
+
accessibilityRole: "link"
|
|
1992
|
+
}, otherProps));
|
|
2467
1993
|
}
|
|
2468
1994
|
|
|
2469
1995
|
function matchWindowSize(currentWidth, {
|
|
@@ -2484,7 +2010,7 @@ function createWindowSizeHelper(currentWidth) {
|
|
|
2484
2010
|
matchWindowSize: options => matchWindowSize(currentWidth, options),
|
|
2485
2011
|
ifWindowSizeMatches: (options, valueIfTrue, valueIfFalse) => matchWindowSize(currentWidth, options) ? valueIfTrue : valueIfFalse,
|
|
2486
2012
|
mapWindowWidth: (...widthList) => {
|
|
2487
|
-
if (
|
|
2013
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2488
2014
|
widthList.slice(1).forEach(([minWidth], index) => {
|
|
2489
2015
|
const previousMinWidth = widthList[index][0];
|
|
2490
2016
|
|
|
@@ -2510,42 +2036,11 @@ function useKittTheme() {
|
|
|
2510
2036
|
return React.useMemo(() => {
|
|
2511
2037
|
return {
|
|
2512
2038
|
kitt: theme,
|
|
2513
|
-
responsive: createWindowSizeHelper(width)
|
|
2514
|
-
breakpoints
|
|
2039
|
+
responsive: createWindowSizeHelper(width)
|
|
2515
2040
|
};
|
|
2516
2041
|
}, [width]);
|
|
2517
2042
|
}
|
|
2518
2043
|
|
|
2519
|
-
function KittThemeProvider({
|
|
2520
|
-
children
|
|
2521
|
-
}) {
|
|
2522
|
-
const theme = useKittTheme();
|
|
2523
|
-
return /*#__PURE__*/React__default.createElement(styled.ThemeProvider, {
|
|
2524
|
-
theme: theme
|
|
2525
|
-
}, children);
|
|
2526
|
-
}
|
|
2527
|
-
const KittThemeDecorator = addons.makeDecorator({
|
|
2528
|
-
name: 'ThemeDecorator',
|
|
2529
|
-
parameterName: 'theme',
|
|
2530
|
-
wrapper: (storyFn, context, {
|
|
2531
|
-
options = {},
|
|
2532
|
-
parameters = {}
|
|
2533
|
-
}) => {
|
|
2534
|
-
return /*#__PURE__*/React__default.createElement(KittThemeProvider, null, storyFn(context));
|
|
2535
|
-
}
|
|
2536
|
-
});
|
|
2537
|
-
|
|
2538
|
-
const SafeAreaProviderDecorator = addons.makeDecorator({
|
|
2539
|
-
name: 'SafeAreaProviderDecorator',
|
|
2540
|
-
parameterName: 'safeAreaProvider',
|
|
2541
|
-
wrapper: (storyFn, context, {
|
|
2542
|
-
options = {},
|
|
2543
|
-
parameters = {}
|
|
2544
|
-
}) => {
|
|
2545
|
-
return /*#__PURE__*/React__default.createElement(reactNativeSafeAreaContext.SafeAreaProvider, null, storyFn(context));
|
|
2546
|
-
}
|
|
2547
|
-
});
|
|
2548
|
-
|
|
2549
2044
|
function MatchWindowSize({
|
|
2550
2045
|
children,
|
|
2551
2046
|
...matchWindowSizeOptions
|
|
@@ -2559,16 +2054,13 @@ exports.useWindowSize = reactNative.useWindowDimensions;
|
|
|
2559
2054
|
exports.Avatar = Avatar;
|
|
2560
2055
|
exports.Button = Button;
|
|
2561
2056
|
exports.Card = Card;
|
|
2562
|
-
exports.Flex = Flex;
|
|
2563
2057
|
exports.FullScreenModal = FullScreenModal;
|
|
2564
2058
|
exports.Icon = Icon;
|
|
2565
|
-
exports.IconButton = IconButton;
|
|
2566
2059
|
exports.InputFeedback = InputFeedback;
|
|
2567
2060
|
exports.InputField = InputField;
|
|
2568
2061
|
exports.InputText = InputText;
|
|
2569
2062
|
exports.KittBreakpoints = KittBreakpoints;
|
|
2570
2063
|
exports.KittBreakpointsMax = KittBreakpointsMax;
|
|
2571
|
-
exports.KittThemeDecorator = KittThemeDecorator;
|
|
2572
2064
|
exports.Label = Label;
|
|
2573
2065
|
exports.LargeLoader = LargeLoader;
|
|
2574
2066
|
exports.ListItem = ListItem;
|
|
@@ -2577,20 +2069,11 @@ exports.MatchWindowSize = MatchWindowSize;
|
|
|
2577
2069
|
exports.Message = Message;
|
|
2578
2070
|
exports.Modal = Modal;
|
|
2579
2071
|
exports.Notification = Notification;
|
|
2580
|
-
exports.PrimitiveLink = PrimitiveLink;
|
|
2581
|
-
exports.PrimitivePressable = PrimitivePressable;
|
|
2582
|
-
exports.PrimitiveScrollView = PrimitiveScrollView;
|
|
2583
|
-
exports.PrimitiveText = PrimitiveText;
|
|
2584
|
-
exports.PrimitiveView = PrimitiveView;
|
|
2585
2072
|
exports.Radio = Radio;
|
|
2586
|
-
exports.
|
|
2587
|
-
exports.Section = DeprecatedSection;
|
|
2073
|
+
exports.Section = Section;
|
|
2588
2074
|
exports.Story = Story;
|
|
2589
|
-
exports.StoryBlock = StoryBlock;
|
|
2590
|
-
exports.StoryContainer = StoryContainer;
|
|
2591
2075
|
exports.StoryDecorator = StoryDecorator;
|
|
2592
2076
|
exports.StoryGrid = StoryGrid;
|
|
2593
|
-
exports.StorySection = StorySection;
|
|
2594
2077
|
exports.StoryTitle = StoryTitle;
|
|
2595
2078
|
exports.Tag = Tag;
|
|
2596
2079
|
exports.TextArea = TextArea;
|
|
@@ -2604,7 +2087,6 @@ exports.styledTextInputMixin = styledTextInputMixin;
|
|
|
2604
2087
|
exports.theme = theme;
|
|
2605
2088
|
exports.useKittTheme = useKittTheme;
|
|
2606
2089
|
exports.useMatchWindowSize = useMatchWindowSize;
|
|
2607
|
-
exports.useStoryBlockColor = useStoryBlockColor;
|
|
2608
2090
|
Object.keys(kittIcons).forEach(function (k) {
|
|
2609
2091
|
if (k !== 'default' && !exports.hasOwnProperty(k)) exports[k] = kittIcons[k];
|
|
2610
2092
|
});
|