@ornikar/kitt-universal 6.0.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definitions/Avatar/Avatar.d.ts +5 -4
- package/dist/definitions/Avatar/Avatar.d.ts.map +1 -1
- package/dist/definitions/Button/AnimatedButtonPressable.d.ts +2 -1
- package/dist/definitions/Button/AnimatedButtonPressable.d.ts.map +1 -1
- package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts +2 -1
- package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts.map +1 -1
- package/dist/definitions/Button/BaseStyledButtonPressable.d.ts +2 -1
- package/dist/definitions/Button/BaseStyledButtonPressable.d.ts.map +1 -1
- package/dist/definitions/Button/Button.d.ts +2 -0
- package/dist/definitions/Button/Button.d.ts.map +1 -1
- package/dist/definitions/Button/ButtonContent.d.ts +3 -2
- package/dist/definitions/Button/ButtonContent.d.ts.map +1 -1
- package/dist/definitions/Button/getVariantValuesIfExist.d.ts +5 -0
- package/dist/definitions/Button/getVariantValuesIfExist.d.ts.map +1 -0
- package/dist/definitions/ExternalLink/ExternalLink.d.ts +3 -3
- package/dist/definitions/ExternalLink/ExternalLink.d.ts.map +1 -1
- package/dist/definitions/Icon/Icon.d.ts +1 -1
- package/dist/definitions/Icon/Icon.d.ts.map +1 -1
- package/dist/definitions/Icon/SpinningIcon.d.ts +4 -3
- package/dist/definitions/Icon/SpinningIcon.d.ts.map +1 -1
- package/dist/definitions/Icon/SpinningIcon.web.d.ts +1 -1
- package/dist/definitions/Icon/SpinningIcon.web.d.ts.map +1 -1
- package/dist/definitions/LoaderIcon/LoaderIcon.d.ts +7 -0
- package/dist/definitions/LoaderIcon/LoaderIcon.d.ts.map +1 -0
- package/dist/definitions/Overlay/Overlay.d.ts +1 -1
- package/dist/definitions/Overlay/Overlay.d.ts.map +1 -1
- package/dist/definitions/PageLoader/PageLoader.d.ts +4 -0
- package/dist/definitions/PageLoader/PageLoader.d.ts.map +1 -0
- package/dist/definitions/PageLoader/PageLoader.web.d.ts +3 -0
- package/dist/definitions/PageLoader/PageLoader.web.d.ts.map +1 -0
- package/dist/definitions/index.d.ts +5 -6
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +37 -36
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/avatar.d.ts +7 -3
- package/dist/definitions/themes/late-ocean/avatar.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/button.d.ts +26 -9
- package/dist/definitions/themes/late-ocean/button.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/pageLoader.d.ts +5 -0
- package/dist/definitions/themes/late-ocean/pageLoader.d.ts.map +1 -0
- package/dist/definitions/utils/tests/renderWithProvidersUtils.d.ts +4 -2
- package/dist/definitions/utils/tests/renderWithProvidersUtils.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +202 -181
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +202 -181
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +202 -181
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +222 -194
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +156 -134
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.css +1 -1
- package/dist/index-node-14.17.cjs.web.js +188 -156
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +69 -40
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +69 -40
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +69 -40
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +69 -40
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +69 -40
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +69 -40
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +5 -5
- package/dist/definitions/Loader/LargeLoader.d.ts +0 -7
- package/dist/definitions/Loader/LargeLoader.d.ts.map +0 -1
- package/dist/definitions/Loader/LargeLoader.web.d.ts +0 -3
- package/dist/definitions/Loader/LargeLoader.web.d.ts.map +0 -1
- package/dist/definitions/Loader/Loader.d.ts +0 -8
- package/dist/definitions/Loader/Loader.d.ts.map +0 -1
- package/dist/definitions/Loader/Loader.web.d.ts +0 -8
- package/dist/definitions/Loader/Loader.web.d.ts.map +0 -1
- package/dist/definitions/typography/TypographySpinningIcon.d.ts +0 -9
- package/dist/definitions/typography/TypographySpinningIcon.d.ts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
-
import { UserIcon, CheckboxMark, XIcon, EyeOffIcon, EyeIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
|
|
3
|
+
import { UserIcon, CheckboxMark, XIcon, EyeOffIcon, EyeIcon, ArcIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
|
|
4
4
|
export * from '@ornikar/kitt-icons';
|
|
5
|
-
import { useWindowDimensions, Image, Platform, Linking,
|
|
5
|
+
import { useWindowDimensions, Image, Platform, Linking, Pressable, StyleSheet, ScrollView, Modal as Modal$1, Text as Text$1, TextInput, View, Animated as Animated$1, Easing, ActivityIndicator } from 'react-native';
|
|
6
6
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
7
7
|
import styled, { useTheme, css, ThemeProvider } from 'styled-components/native';
|
|
8
8
|
import { cloneElement, useContext, createContext, forwardRef, useMemo, useState, useRef, useEffect, Fragment as Fragment$1, Children } from 'react';
|
|
@@ -102,7 +102,7 @@ var KittBreakpointsMax = {
|
|
|
102
102
|
LARGE: KittBreakpoints.WIDE - 1
|
|
103
103
|
};
|
|
104
104
|
|
|
105
|
-
var _excluded$
|
|
105
|
+
var _excluded$h = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
|
|
106
106
|
var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
|
|
107
107
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
108
108
|
function useTypographyColor() {
|
|
@@ -178,7 +178,7 @@ function Typography(_ref4) {
|
|
|
178
178
|
large = _ref4.large,
|
|
179
179
|
variant = _ref4.variant,
|
|
180
180
|
color = _ref4.color,
|
|
181
|
-
otherProps = _objectWithoutProperties(_ref4, _excluded$
|
|
181
|
+
otherProps = _objectWithoutProperties(_ref4, _excluded$h);
|
|
182
182
|
|
|
183
183
|
var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
|
|
184
184
|
var hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
|
|
@@ -265,7 +265,7 @@ Typography.h4 = createHeading(4, 'header4');
|
|
|
265
265
|
|
|
266
266
|
Typography.h5 = createHeading(5, 'header5');
|
|
267
267
|
|
|
268
|
-
var _excluded$
|
|
268
|
+
var _excluded$g = ["size", "round", "light", "sizeVariant"];
|
|
269
269
|
|
|
270
270
|
var getInitials = function (firstname, lastname) {
|
|
271
271
|
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
@@ -276,9 +276,10 @@ var StyledAvatarView = /*#__PURE__*/styled.View.withConfig({
|
|
|
276
276
|
})(["border-radius:", ";background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], function (_ref) {
|
|
277
277
|
var theme = _ref.theme,
|
|
278
278
|
$isRound = _ref.$isRound,
|
|
279
|
-
$size = _ref.$size
|
|
279
|
+
$size = _ref.$size,
|
|
280
|
+
$sizeVariant = _ref.$sizeVariant;
|
|
280
281
|
if ($isRound) return "".concat($size / 2, "px");
|
|
281
|
-
return "".concat(theme.kitt.avatar.borderRadius, "px");
|
|
282
|
+
return "".concat($sizeVariant === 'large' ? theme.kitt.avatar.large.borderRadius : theme.kitt.avatar.borderRadius, "px");
|
|
282
283
|
}, function (_ref2) {
|
|
283
284
|
var theme = _ref2.theme,
|
|
284
285
|
$isLight = _ref2.$isLight;
|
|
@@ -297,8 +298,8 @@ function AvatarContent(_ref5) {
|
|
|
297
298
|
firstname = _ref5.firstname,
|
|
298
299
|
lastname = _ref5.lastname,
|
|
299
300
|
alt = _ref5.alt,
|
|
300
|
-
|
|
301
|
-
|
|
301
|
+
isLight = _ref5.isLight,
|
|
302
|
+
sizeVariant = _ref5.sizeVariant;
|
|
302
303
|
|
|
303
304
|
if (src) {
|
|
304
305
|
return /*#__PURE__*/jsx(Image, {
|
|
@@ -315,8 +316,8 @@ function AvatarContent(_ref5) {
|
|
|
315
316
|
|
|
316
317
|
if (firstname && lastname) {
|
|
317
318
|
return /*#__PURE__*/jsx(Typography.Text, {
|
|
318
|
-
base:
|
|
319
|
-
variant:
|
|
319
|
+
base: sizeVariant === 'large' ? 'body-large' : 'body',
|
|
320
|
+
variant: sizeVariant === 'large' ? 'bold' : 'regular',
|
|
320
321
|
color: isLight ? 'black' : 'white',
|
|
321
322
|
children: getInitials(firstname, lastname)
|
|
322
323
|
});
|
|
@@ -332,24 +333,38 @@ function AvatarContent(_ref5) {
|
|
|
332
333
|
function Avatar(_ref6) {
|
|
333
334
|
var _ref6$size = _ref6.size,
|
|
334
335
|
size = _ref6$size === void 0 ? 40 : _ref6$size,
|
|
335
|
-
_ref6$base = _ref6.base,
|
|
336
|
-
base = _ref6$base === void 0 ? 'body-small' : _ref6$base,
|
|
337
336
|
round = _ref6.round,
|
|
338
337
|
light = _ref6.light,
|
|
339
|
-
|
|
338
|
+
sizeVariant = _ref6.sizeVariant,
|
|
339
|
+
props = _objectWithoutProperties(_ref6, _excluded$g);
|
|
340
340
|
|
|
341
341
|
return /*#__PURE__*/jsx(StyledAvatarView, {
|
|
342
342
|
$size: size,
|
|
343
343
|
$isRound: round,
|
|
344
344
|
$isLight: light,
|
|
345
|
+
$sizeVariant: sizeVariant,
|
|
345
346
|
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread({
|
|
346
347
|
size: size,
|
|
347
|
-
|
|
348
|
-
|
|
348
|
+
isLight: light,
|
|
349
|
+
sizeVariant: sizeVariant
|
|
349
350
|
}, props))
|
|
350
351
|
});
|
|
351
352
|
}
|
|
352
353
|
|
|
354
|
+
var hasVariant = function (button, variant) {
|
|
355
|
+
return variant in button;
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
function getVariantValuesIfExist(theme, type, variant) {
|
|
359
|
+
var button = theme.kitt.button[type];
|
|
360
|
+
|
|
361
|
+
if (hasVariant(button, variant)) {
|
|
362
|
+
return button[variant];
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
return theme.kitt.button[type]["default"];
|
|
366
|
+
}
|
|
367
|
+
|
|
353
368
|
var StyledPressable = /*#__PURE__*/styled.Pressable.withConfig({
|
|
354
369
|
displayName: "AnimatedButtonPressable__StyledPressable"
|
|
355
370
|
})(["", ""], function (_ref) {
|
|
@@ -368,6 +383,7 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
368
383
|
disabled = _ref3.disabled,
|
|
369
384
|
accessibilityRole = _ref3.accessibilityRole,
|
|
370
385
|
$type = _ref3.$type,
|
|
386
|
+
$variant = _ref3.$variant,
|
|
371
387
|
$isStretch = _ref3.$isStretch,
|
|
372
388
|
href = _ref3.href,
|
|
373
389
|
hrefAttrs = _ref3.hrefAttrs,
|
|
@@ -376,9 +392,11 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
376
392
|
var theme = /*#__PURE__*/useTheme();
|
|
377
393
|
var pressed = useSharedValue(0);
|
|
378
394
|
var color = useSharedValue(0);
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
395
|
+
|
|
396
|
+
var _getVariantValuesIfEx = getVariantValuesIfExist(theme, $type, $variant),
|
|
397
|
+
backgroundColor = _getVariantValuesIfEx.backgroundColor,
|
|
398
|
+
pressedBackgroundColor = _getVariantValuesIfEx.pressedBackgroundColor;
|
|
399
|
+
|
|
382
400
|
var scale = theme.kitt.button.scale;
|
|
383
401
|
var scaleStyles = useAnimatedStyle(function () {
|
|
384
402
|
var _f = function () {
|
|
@@ -406,7 +424,7 @@ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
406
424
|
};
|
|
407
425
|
_f.asString = "function _f(){const{interpolateColor,color,backgroundColor,pressedBackgroundColor,withSpring,pressed,scale}=jsThis._closure;{return{backgroundColor:interpolateColor(color.value,[0,1],[backgroundColor,pressedBackgroundColor]),transform:[{scale:withSpring(pressed.value?scale.base.active:scale.base.default)}]};}}";
|
|
408
426
|
_f.__workletHash = 5368461229978;
|
|
409
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Button/AnimatedButtonPressable.tsx (
|
|
427
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Button/AnimatedButtonPressable.tsx (56:41)";
|
|
410
428
|
_f.__optimalization = 2;
|
|
411
429
|
|
|
412
430
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -467,10 +485,11 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
|
|
|
467
485
|
}, function (_ref6) {
|
|
468
486
|
var theme = _ref6.theme,
|
|
469
487
|
$isDisabled = _ref6.$isDisabled,
|
|
470
|
-
$type = _ref6.$type
|
|
471
|
-
|
|
488
|
+
$type = _ref6.$type,
|
|
489
|
+
$variant = _ref6.$variant;
|
|
490
|
+
if ($isDisabled) return theme.kitt.button.disabled["default"].backgroundColor;
|
|
472
491
|
if (Platform.OS !== 'web') return 'transparent';
|
|
473
|
-
return theme
|
|
492
|
+
return getVariantValuesIfExist(theme, $type, $variant).backgroundColor;
|
|
474
493
|
}, function (_ref7) {
|
|
475
494
|
var theme = _ref7.theme,
|
|
476
495
|
$isLarge = _ref7.$isLarge,
|
|
@@ -484,12 +503,12 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
|
|
|
484
503
|
return defaultPadding;
|
|
485
504
|
});
|
|
486
505
|
|
|
487
|
-
var _excluded$
|
|
488
|
-
_excluded2$
|
|
506
|
+
var _excluded$f = ["color"],
|
|
507
|
+
_excluded2$2 = ["color"];
|
|
489
508
|
|
|
490
509
|
function TypographyIconSpecifiedColor(_ref) {
|
|
491
510
|
var color = _ref.color,
|
|
492
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
511
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
493
512
|
|
|
494
513
|
var theme = /*#__PURE__*/useTheme();
|
|
495
514
|
return /*#__PURE__*/jsx(Icon, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -506,7 +525,7 @@ function TypographyIconInheritColor(props) {
|
|
|
506
525
|
|
|
507
526
|
function TypographyIcon(_ref2) {
|
|
508
527
|
var color = _ref2.color,
|
|
509
|
-
props = _objectWithoutProperties(_ref2, _excluded2$
|
|
528
|
+
props = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
510
529
|
|
|
511
530
|
if (color) {
|
|
512
531
|
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread({
|
|
@@ -521,12 +540,12 @@ function isSubtle(type) {
|
|
|
521
540
|
return type.startsWith('subtle');
|
|
522
541
|
}
|
|
523
542
|
|
|
524
|
-
var _excluded$
|
|
543
|
+
var _excluded$e = ["type", "variant", "isDisabled", "$isStretch", "icon", "children"];
|
|
525
544
|
|
|
526
|
-
var getTextColorByType = function (type) {
|
|
545
|
+
var getTextColorByType = function (type, variant) {
|
|
527
546
|
switch (type) {
|
|
528
547
|
case 'primary':
|
|
529
|
-
return 'white';
|
|
548
|
+
return variant === 'ghost' ? 'primary' : 'white';
|
|
530
549
|
|
|
531
550
|
case 'white':
|
|
532
551
|
return 'white';
|
|
@@ -655,13 +674,14 @@ var ButtonContentContainer = /*#__PURE__*/styled.View.withConfig({
|
|
|
655
674
|
});
|
|
656
675
|
function ButtonContent(_ref7) {
|
|
657
676
|
var type = _ref7.type,
|
|
677
|
+
variant = _ref7.variant,
|
|
658
678
|
isDisabled = _ref7.isDisabled,
|
|
659
679
|
$isStretch = _ref7.$isStretch,
|
|
660
680
|
icon = _ref7.icon,
|
|
661
681
|
children = _ref7.children,
|
|
662
|
-
props = _objectWithoutProperties(_ref7, _excluded$
|
|
682
|
+
props = _objectWithoutProperties(_ref7, _excluded$e);
|
|
663
683
|
|
|
664
|
-
var color = isDisabled ? 'black-light' : getTextColorByType(type);
|
|
684
|
+
var color = isDisabled ? 'black-light' : getTextColorByType(type, variant);
|
|
665
685
|
return /*#__PURE__*/jsx(ButtonContentContainer, {
|
|
666
686
|
$isSubtle: isSubtle(type),
|
|
667
687
|
$isStretch: $isStretch,
|
|
@@ -684,7 +704,7 @@ var StyledDisabled = /*#__PURE__*/styled.View.withConfig({
|
|
|
684
704
|
var _theme$kitt$button = theme.kitt.button,
|
|
685
705
|
borderWidth = _theme$kitt$button.borderWidth,
|
|
686
706
|
disabled = _theme$kitt$button.disabled;
|
|
687
|
-
return "".concat(borderWidth.disabled, "px solid ").concat(disabled.borderColor);
|
|
707
|
+
return "".concat(borderWidth.disabled, "px solid ").concat(disabled["default"].borderColor);
|
|
688
708
|
}, function (_ref2) {
|
|
689
709
|
var theme = _ref2.theme;
|
|
690
710
|
return theme.kitt.button.borderRadius;
|
|
@@ -694,6 +714,8 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
694
714
|
var children = _ref.children,
|
|
695
715
|
_ref$type = _ref.type,
|
|
696
716
|
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
717
|
+
_ref$variant = _ref.variant,
|
|
718
|
+
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
697
719
|
disabled = _ref.disabled,
|
|
698
720
|
stretch = _ref.stretch,
|
|
699
721
|
large = _ref.large,
|
|
@@ -706,6 +728,11 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
706
728
|
_ref$accessibilityRol = _ref.accessibilityRole,
|
|
707
729
|
accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
|
|
708
730
|
onPress = _ref.onPress;
|
|
731
|
+
|
|
732
|
+
if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && type !== 'primary') {
|
|
733
|
+
throw new Error('variant=ghost is only allowed with type=primary');
|
|
734
|
+
}
|
|
735
|
+
|
|
709
736
|
return /*#__PURE__*/jsx(AnimatedButtonPressable, {
|
|
710
737
|
ref: ref,
|
|
711
738
|
accessibilityRole: accessibilityRole,
|
|
@@ -715,14 +742,17 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
715
742
|
disabled: disabled,
|
|
716
743
|
$isStretch: stretch,
|
|
717
744
|
$type: type,
|
|
745
|
+
$variant: variant,
|
|
718
746
|
onPress: onPress,
|
|
719
747
|
children: /*#__PURE__*/jsxs(BaseStyledButtonPressable, {
|
|
720
748
|
$type: type,
|
|
749
|
+
$variant: variant,
|
|
721
750
|
$isStretch: stretch,
|
|
722
751
|
$isLarge: large,
|
|
723
752
|
$isDisabled: disabled,
|
|
724
753
|
children: [/*#__PURE__*/jsx(ButtonContent, {
|
|
725
754
|
type: type,
|
|
755
|
+
variant: variant,
|
|
726
756
|
$isStretch: stretch,
|
|
727
757
|
isDisabled: disabled,
|
|
728
758
|
icon: icon,
|
|
@@ -801,18 +831,22 @@ var defaultOpenLinkBehavior = {
|
|
|
801
831
|
web: 'targetBlank'
|
|
802
832
|
};
|
|
803
833
|
|
|
804
|
-
var _excluded$
|
|
834
|
+
var _excluded$d = ["as", "href", "openLinkBehavior", "onPress"];
|
|
805
835
|
function ExternalLink(_ref) {
|
|
806
836
|
var Component = _ref.as,
|
|
807
837
|
href = _ref.href,
|
|
808
838
|
_ref$openLinkBehavior = _ref.openLinkBehavior,
|
|
809
839
|
openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
|
|
810
840
|
onPress = _ref.onPress,
|
|
811
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
841
|
+
rest = _objectWithoutProperties(_ref, _excluded$d);
|
|
812
842
|
|
|
813
843
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
814
|
-
onPress: function handleOnPress() {
|
|
815
|
-
if (onPress)
|
|
844
|
+
onPress: function handleOnPress(e) {
|
|
845
|
+
if (onPress) {
|
|
846
|
+
onPress(e);
|
|
847
|
+
if (e !== null && e !== void 0 && e.defaultPrevented) return;
|
|
848
|
+
}
|
|
849
|
+
|
|
816
850
|
if (!href) return;
|
|
817
851
|
|
|
818
852
|
switch (openLinkBehavior["native"]) {
|
|
@@ -894,6 +928,9 @@ var avatar = {
|
|
|
894
928
|
},
|
|
895
929
|
light: {
|
|
896
930
|
backgroundColor: lateOceanColorPalette.black100
|
|
931
|
+
},
|
|
932
|
+
large: {
|
|
933
|
+
borderRadius: 30
|
|
897
934
|
}
|
|
898
935
|
};
|
|
899
936
|
|
|
@@ -926,47 +963,68 @@ var button = {
|
|
|
926
963
|
timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
|
|
927
964
|
},
|
|
928
965
|
"default": {
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
966
|
+
"default": {
|
|
967
|
+
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
968
|
+
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
969
|
+
hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
970
|
+
focusBorderColor: 'rgba(0, 0, 0, 0.1)'
|
|
971
|
+
}
|
|
933
972
|
},
|
|
934
973
|
primary: {
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
974
|
+
"default": {
|
|
975
|
+
backgroundColor: colors.primary,
|
|
976
|
+
pressedBackgroundColor: colors.primaryLight,
|
|
977
|
+
hoverBackgroundColor: colors.primaryLight,
|
|
978
|
+
focusBorderColor: 'rgba(76, 52, 224, 0.2)'
|
|
979
|
+
},
|
|
980
|
+
ghost: {
|
|
981
|
+
backgroundColor: colors.uiBackgroundLight,
|
|
982
|
+
pressedBackgroundColor: colors.uiBackground,
|
|
983
|
+
hoverBackgroundColor: colors.hover,
|
|
984
|
+
focusBorderColor: 'rgba(255,255,255, 0.4)',
|
|
985
|
+
color: colors.primary,
|
|
986
|
+
hoverColor: colors.hover,
|
|
987
|
+
activeColor: colors.hover
|
|
988
|
+
}
|
|
939
989
|
},
|
|
940
990
|
white: {
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
991
|
+
"default": {
|
|
992
|
+
backgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
993
|
+
pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
994
|
+
hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
995
|
+
focusBorderColor: 'rgba(255, 255, 255, 0.1)'
|
|
996
|
+
}
|
|
945
997
|
},
|
|
946
998
|
subtle: {
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
999
|
+
"default": {
|
|
1000
|
+
backgroundColor: colors.transparent,
|
|
1001
|
+
pressedBackgroundColor: colors.transparent,
|
|
1002
|
+
hoverBackgroundColor: colors.transparent,
|
|
1003
|
+
focusBorderColor: 'rgba(76, 52, 224, 0.2)',
|
|
1004
|
+
color: colors.primary,
|
|
1005
|
+
hoverColor: 'rgba(76, 52, 224, 0.8)',
|
|
1006
|
+
activeColor: 'rgba(76, 52, 224, 0.8)'
|
|
1007
|
+
}
|
|
954
1008
|
},
|
|
955
1009
|
'subtle-dark': {
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
1010
|
+
"default": {
|
|
1011
|
+
backgroundColor: colors.transparent,
|
|
1012
|
+
pressedBackgroundColor: colors.transparent,
|
|
1013
|
+
hoverBackgroundColor: colors.transparent,
|
|
1014
|
+
focusBorderColor: 'rgba(0, 0, 0, 0.1)',
|
|
1015
|
+
color: colors.black,
|
|
1016
|
+
hoverColor: 'rgba(0, 0, 0, 0.8)',
|
|
1017
|
+
activeColor: 'rgba(0, 0, 0, 0.8)'
|
|
1018
|
+
}
|
|
963
1019
|
},
|
|
964
1020
|
disabled: {
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
1021
|
+
"default": {
|
|
1022
|
+
backgroundColor: colors.disabled,
|
|
1023
|
+
pressedBackgroundColor: colors.disabled,
|
|
1024
|
+
hoverBackgroundColor: colors.disabled,
|
|
1025
|
+
focusBorderColor: lateOceanColorPalette.black100,
|
|
1026
|
+
borderColor: lateOceanColorPalette.black100
|
|
1027
|
+
}
|
|
970
1028
|
}
|
|
971
1029
|
};
|
|
972
1030
|
|
|
@@ -1246,14 +1304,14 @@ var iconButton = {
|
|
|
1246
1304
|
},
|
|
1247
1305
|
disabled: {
|
|
1248
1306
|
scale: 1,
|
|
1249
|
-
backgroundColor: button.disabled.backgroundColor,
|
|
1250
|
-
borderColor: button.disabled.borderColor
|
|
1307
|
+
backgroundColor: button.disabled["default"].backgroundColor,
|
|
1308
|
+
borderColor: button.disabled["default"].borderColor
|
|
1251
1309
|
},
|
|
1252
1310
|
"default": {
|
|
1253
|
-
pressedBackgroundColor: button["default"].pressedBackgroundColor
|
|
1311
|
+
pressedBackgroundColor: button["default"]["default"].pressedBackgroundColor
|
|
1254
1312
|
},
|
|
1255
1313
|
white: {
|
|
1256
|
-
pressedBackgroundColor: button.white.hoverBackgroundColor
|
|
1314
|
+
pressedBackgroundColor: button.white["default"].hoverBackgroundColor
|
|
1257
1315
|
}
|
|
1258
1316
|
};
|
|
1259
1317
|
|
|
@@ -1264,6 +1322,10 @@ var listItem = {
|
|
|
1264
1322
|
innerMargin: 8
|
|
1265
1323
|
};
|
|
1266
1324
|
|
|
1325
|
+
var pageLoader = {
|
|
1326
|
+
size: 60
|
|
1327
|
+
};
|
|
1328
|
+
|
|
1267
1329
|
var shadows = {
|
|
1268
1330
|
medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
|
|
1269
1331
|
};
|
|
@@ -1354,19 +1416,20 @@ var theme = {
|
|
|
1354
1416
|
lateOcean: lateOceanColorPalette
|
|
1355
1417
|
},
|
|
1356
1418
|
avatar: avatar,
|
|
1419
|
+
breakpoints: breakpoints,
|
|
1357
1420
|
button: button,
|
|
1358
1421
|
card: card,
|
|
1359
1422
|
feedbackMessage: feedbackMessage,
|
|
1360
1423
|
forms: forms,
|
|
1361
|
-
typography: typography,
|
|
1362
|
-
tag: tag,
|
|
1363
|
-
shadows: shadows,
|
|
1364
1424
|
fullScreenModal: fullScreenModal,
|
|
1365
1425
|
iconButton: iconButton,
|
|
1366
1426
|
listItem: listItem,
|
|
1367
|
-
|
|
1427
|
+
pageLoader: pageLoader,
|
|
1428
|
+
shadows: shadows,
|
|
1368
1429
|
skeleton: skeleton,
|
|
1369
|
-
|
|
1430
|
+
tag: tag,
|
|
1431
|
+
tooltip: tooltip,
|
|
1432
|
+
typography: typography
|
|
1370
1433
|
};
|
|
1371
1434
|
|
|
1372
1435
|
function matchWindowSize(_ref, _ref2) {
|
|
@@ -1663,7 +1726,7 @@ function DatePickerInputs(_ref4) {
|
|
|
1663
1726
|
});
|
|
1664
1727
|
}
|
|
1665
1728
|
|
|
1666
|
-
var _excluded$
|
|
1729
|
+
var _excluded$c = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "setIsFocused", "currentValue", "setCurrentValue", "onChange", "isFocused"];
|
|
1667
1730
|
function DatePickerAndroid(_ref) {
|
|
1668
1731
|
var onBlur = _ref.onBlur,
|
|
1669
1732
|
onFocus = _ref.onFocus,
|
|
@@ -1674,7 +1737,7 @@ function DatePickerAndroid(_ref) {
|
|
|
1674
1737
|
setCurrentValue = _ref.setCurrentValue,
|
|
1675
1738
|
_onChange = _ref.onChange,
|
|
1676
1739
|
isFocused = _ref.isFocused,
|
|
1677
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1740
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
1678
1741
|
|
|
1679
1742
|
var handleClose = function () {
|
|
1680
1743
|
if (onBlur) onBlur();
|
|
@@ -1721,8 +1784,7 @@ function Overlay(_ref2) {
|
|
|
1721
1784
|
var onPress = _ref2.onPress;
|
|
1722
1785
|
return /*#__PURE__*/jsx(OverlayPressable, {
|
|
1723
1786
|
accessibilityRole: "none",
|
|
1724
|
-
onPress: onPress
|
|
1725
|
-
children: /*#__PURE__*/jsx(View, {})
|
|
1787
|
+
onPress: onPress
|
|
1726
1788
|
});
|
|
1727
1789
|
}
|
|
1728
1790
|
|
|
@@ -1760,11 +1822,11 @@ function ModalFooter(_ref3) {
|
|
|
1760
1822
|
});
|
|
1761
1823
|
}
|
|
1762
1824
|
|
|
1763
|
-
var _excluded$
|
|
1825
|
+
var _excluded$b = ["as", "children"];
|
|
1764
1826
|
function StyleWebWrapper(_ref) {
|
|
1765
1827
|
var as = _ref.as,
|
|
1766
1828
|
children = _ref.children,
|
|
1767
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1829
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
1768
1830
|
|
|
1769
1831
|
if (Platform.OS !== 'web') return children;
|
|
1770
1832
|
// as or default to div. If as is undefined, T is div but typescript is not sure
|
|
@@ -1794,7 +1856,7 @@ function withTheme(WrappedComponent) {
|
|
|
1794
1856
|
});
|
|
1795
1857
|
}
|
|
1796
1858
|
|
|
1797
|
-
var _excluded$
|
|
1859
|
+
var _excluded$a = ["color", "disabled"];
|
|
1798
1860
|
var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled$1("div")({
|
|
1799
1861
|
name: "PressableIconButtonWebWrapper",
|
|
1800
1862
|
"class": "kitt-u_PressableIconButtonWebWrapper_p1nlccvg",
|
|
@@ -1858,7 +1920,7 @@ var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
|
|
|
1858
1920
|
function PressableIconButton(_ref9) {
|
|
1859
1921
|
var color = _ref9.color,
|
|
1860
1922
|
disabled = _ref9.disabled,
|
|
1861
|
-
props = _objectWithoutProperties(_ref9, _excluded$
|
|
1923
|
+
props = _objectWithoutProperties(_ref9, _excluded$a);
|
|
1862
1924
|
|
|
1863
1925
|
return /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
1864
1926
|
as: PressableIconButtonWebWrapper,
|
|
@@ -2177,7 +2239,7 @@ function PlatformDateTimePicker(_ref) {
|
|
|
2177
2239
|
}));
|
|
2178
2240
|
}
|
|
2179
2241
|
|
|
2180
|
-
var _excluded$
|
|
2242
|
+
var _excluded$9 = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
|
|
2181
2243
|
|
|
2182
2244
|
function ModalTitle(_ref) {
|
|
2183
2245
|
var children = _ref.children;
|
|
@@ -2197,7 +2259,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
2197
2259
|
validateButtonLabel = _ref2.validateButtonLabel,
|
|
2198
2260
|
onClose = _ref2.onClose,
|
|
2199
2261
|
onChange = _ref2.onChange,
|
|
2200
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
2262
|
+
props = _objectWithoutProperties(_ref2, _excluded$9);
|
|
2201
2263
|
|
|
2202
2264
|
var _useState = useState(value),
|
|
2203
2265
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -2241,7 +2303,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
2241
2303
|
});
|
|
2242
2304
|
}
|
|
2243
2305
|
|
|
2244
|
-
var _excluded$
|
|
2306
|
+
var _excluded$8 = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "onChange", "onFocus", "onBlur", "pickerDefaultDate"];
|
|
2245
2307
|
function DatePicker(_ref) {
|
|
2246
2308
|
var value = _ref.value,
|
|
2247
2309
|
pickerUITestID = _ref.pickerUITestID,
|
|
@@ -2251,7 +2313,7 @@ function DatePicker(_ref) {
|
|
|
2251
2313
|
onFocus = _ref.onFocus,
|
|
2252
2314
|
onBlur = _ref.onBlur,
|
|
2253
2315
|
pickerDefaultDate = _ref.pickerDefaultDate,
|
|
2254
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2316
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
2255
2317
|
|
|
2256
2318
|
var _useState = useState(false),
|
|
2257
2319
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -2317,7 +2379,7 @@ var InputTextContainer = /*#__PURE__*/styled.View.withConfig({
|
|
|
2317
2379
|
displayName: "InputTextContainer"
|
|
2318
2380
|
})(["position:relative;"]);
|
|
2319
2381
|
|
|
2320
|
-
var _excluded$
|
|
2382
|
+
var _excluded$7 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoCompleteType", "keyboardType", "onFocus", "onBlur"];
|
|
2321
2383
|
var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
|
|
2322
2384
|
displayName: "InputText__StyledTextInput"
|
|
2323
2385
|
})(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
|
|
@@ -2361,7 +2423,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
2361
2423
|
keyboardType = _ref4$keyboardType === void 0 ? 'default' : _ref4$keyboardType,
|
|
2362
2424
|
_onFocus = _ref4.onFocus,
|
|
2363
2425
|
_onBlur = _ref4.onBlur,
|
|
2364
|
-
props = _objectWithoutProperties(_ref4, _excluded$
|
|
2426
|
+
props = _objectWithoutProperties(_ref4, _excluded$7);
|
|
2365
2427
|
|
|
2366
2428
|
var theme = /*#__PURE__*/useTheme();
|
|
2367
2429
|
|
|
@@ -2509,11 +2571,11 @@ function InputPressable(_ref) {
|
|
|
2509
2571
|
return /*#__PURE__*/jsx(Pressable, _objectSpread({}, props));
|
|
2510
2572
|
}
|
|
2511
2573
|
|
|
2512
|
-
var _excluded$
|
|
2574
|
+
var _excluded$6 = ["isPasswordDefaultVisible", "right"];
|
|
2513
2575
|
function InputPassword(_ref) {
|
|
2514
2576
|
var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
|
|
2515
2577
|
right = _ref.right,
|
|
2516
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2578
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
2517
2579
|
|
|
2518
2580
|
var _useState = useState(Boolean(isPasswordDefaultVisible)),
|
|
2519
2581
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -2875,10 +2937,12 @@ FullScreenModal.Body = FullScreenModalBody;
|
|
|
2875
2937
|
|
|
2876
2938
|
function SpinningIcon(_ref) {
|
|
2877
2939
|
var icon = _ref.icon,
|
|
2878
|
-
_ref$size = _ref.size,
|
|
2879
|
-
size = _ref$size === void 0 ? defaultIconSize : _ref$size,
|
|
2880
|
-
align = _ref.align,
|
|
2881
2940
|
color = _ref.color;
|
|
2941
|
+
|
|
2942
|
+
if (process.env.NODE_ENV !== 'production' && !color) {
|
|
2943
|
+
throw new Error("Invalid color passed to SpinningIcon: ".concat(String(color)));
|
|
2944
|
+
}
|
|
2945
|
+
|
|
2882
2946
|
var clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
2883
2947
|
color: color
|
|
2884
2948
|
});
|
|
@@ -2902,36 +2966,31 @@ function SpinningIcon(_ref) {
|
|
|
2902
2966
|
return undefined;
|
|
2903
2967
|
};
|
|
2904
2968
|
}, []);
|
|
2905
|
-
return /*#__PURE__*/jsx(
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
rotate: rotation
|
|
2913
|
-
}]
|
|
2914
|
-
},
|
|
2915
|
-
children: clonedIcon
|
|
2916
|
-
})
|
|
2969
|
+
return /*#__PURE__*/jsx(Animated$1.View, {
|
|
2970
|
+
style: {
|
|
2971
|
+
transform: [{
|
|
2972
|
+
rotate: rotation
|
|
2973
|
+
}]
|
|
2974
|
+
},
|
|
2975
|
+
children: clonedIcon
|
|
2917
2976
|
});
|
|
2918
2977
|
}
|
|
2919
2978
|
|
|
2920
|
-
var _excluded$
|
|
2979
|
+
var _excluded$5 = ["children"];
|
|
2921
2980
|
var ContentView = /*#__PURE__*/styled.View.withConfig({
|
|
2922
2981
|
displayName: "ListItemContent__ContentView"
|
|
2923
2982
|
})(["flex:1 0 0%;align-self:center;"]);
|
|
2924
2983
|
function ListItemContent(_ref) {
|
|
2925
2984
|
var children = _ref.children,
|
|
2926
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
2985
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
2927
2986
|
|
|
2928
2987
|
return /*#__PURE__*/jsx(ContentView, _objectSpread(_objectSpread({}, rest), {}, {
|
|
2929
2988
|
children: children
|
|
2930
2989
|
}));
|
|
2931
2990
|
}
|
|
2932
2991
|
|
|
2933
|
-
var _excluded$
|
|
2934
|
-
_excluded2$
|
|
2992
|
+
var _excluded$4 = ["children", "side"],
|
|
2993
|
+
_excluded2$1 = ["children", "align"];
|
|
2935
2994
|
var SideContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
2936
2995
|
displayName: "ListItemSideContent__SideContainerView"
|
|
2937
2996
|
})(["flex-direction:row;margin-left:", ";margin-right:", ";"], function (_ref) {
|
|
@@ -2948,7 +3007,7 @@ function ListItemSideContainer(_ref3) {
|
|
|
2948
3007
|
var children = _ref3.children,
|
|
2949
3008
|
_ref3$side = _ref3.side,
|
|
2950
3009
|
side = _ref3$side === void 0 ? 'left' : _ref3$side,
|
|
2951
|
-
rest = _objectWithoutProperties(_ref3, _excluded$
|
|
3010
|
+
rest = _objectWithoutProperties(_ref3, _excluded$4);
|
|
2952
3011
|
|
|
2953
3012
|
return /*#__PURE__*/jsx(SideContainerView, _objectSpread(_objectSpread({
|
|
2954
3013
|
side: side
|
|
@@ -2966,7 +3025,7 @@ function ListItemSideContent(_ref5) {
|
|
|
2966
3025
|
var children = _ref5.children,
|
|
2967
3026
|
_ref5$align = _ref5.align,
|
|
2968
3027
|
align = _ref5$align === void 0 ? 'auto' : _ref5$align,
|
|
2969
|
-
rest = _objectWithoutProperties(_ref5, _excluded2$
|
|
3028
|
+
rest = _objectWithoutProperties(_ref5, _excluded2$1);
|
|
2970
3029
|
|
|
2971
3030
|
return /*#__PURE__*/jsx(SideContentView, _objectSpread(_objectSpread({
|
|
2972
3031
|
align: align
|
|
@@ -2975,7 +3034,7 @@ function ListItemSideContent(_ref5) {
|
|
|
2975
3034
|
}));
|
|
2976
3035
|
}
|
|
2977
3036
|
|
|
2978
|
-
var _excluded$
|
|
3037
|
+
var _excluded$3 = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
2979
3038
|
var ContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
2980
3039
|
displayName: "ListItem__ContainerView"
|
|
2981
3040
|
})(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], function (_ref) {
|
|
@@ -3014,7 +3073,7 @@ function ListItem(_ref5) {
|
|
|
3014
3073
|
left = _ref5.left,
|
|
3015
3074
|
right = _ref5.right,
|
|
3016
3075
|
onPress = _ref5.onPress,
|
|
3017
|
-
rest = _objectWithoutProperties(_ref5, _excluded$
|
|
3076
|
+
rest = _objectWithoutProperties(_ref5, _excluded$3);
|
|
3018
3077
|
|
|
3019
3078
|
var Wrapper = onPress ? Pressable : Fragment$1;
|
|
3020
3079
|
var wrapperProps = onPress ? _objectSpread({
|
|
@@ -3043,32 +3102,11 @@ ListItem.Content = ListItemContent;
|
|
|
3043
3102
|
ListItem.SideContent = ListItemSideContent;
|
|
3044
3103
|
ListItem.SideContainer = ListItemSideContainer;
|
|
3045
3104
|
|
|
3046
|
-
function
|
|
3047
|
-
|
|
3048
|
-
return
|
|
3049
|
-
}
|
|
3050
|
-
|
|
3051
|
-
var defaultLoaderSize = defaultIconSize;
|
|
3052
|
-
function Loader(_ref) {
|
|
3053
|
-
var _ref$color = _ref.color,
|
|
3054
|
-
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
3055
|
-
_ref$size = _ref.size,
|
|
3056
|
-
size = _ref$size === void 0 ? defaultLoaderSize : _ref$size;
|
|
3057
|
-
var theme = /*#__PURE__*/useTheme();
|
|
3058
|
-
var colorHex = theme.kitt.typography.colors[color];
|
|
3059
|
-
return /*#__PURE__*/jsx(ActivityIndicator, {
|
|
3060
|
-
testID: "ActivityIndicator",
|
|
3061
|
-
color: colorHex,
|
|
3062
|
-
size: getActivityIndicatorSize(size)
|
|
3063
|
-
});
|
|
3064
|
-
}
|
|
3065
|
-
|
|
3066
|
-
function LargeLoader(_ref) {
|
|
3067
|
-
var _ref$color = _ref.color,
|
|
3068
|
-
color = _ref$color === void 0 ? 'primary' : _ref$color;
|
|
3069
|
-
return /*#__PURE__*/jsx(Loader, {
|
|
3105
|
+
function LoaderIcon(_ref) {
|
|
3106
|
+
var color = _ref.color;
|
|
3107
|
+
return /*#__PURE__*/jsx(SpinningIcon, {
|
|
3070
3108
|
color: color,
|
|
3071
|
-
|
|
3109
|
+
icon: /*#__PURE__*/jsx(ArcIcon, {})
|
|
3072
3110
|
});
|
|
3073
3111
|
}
|
|
3074
3112
|
|
|
@@ -3247,6 +3285,22 @@ function Notification(_ref) {
|
|
|
3247
3285
|
});
|
|
3248
3286
|
}
|
|
3249
3287
|
|
|
3288
|
+
function getActivityIndicatorSize(size) {
|
|
3289
|
+
if (Platform.OS === 'android') return size;
|
|
3290
|
+
return size < 36 ? 'small' : 'large';
|
|
3291
|
+
}
|
|
3292
|
+
|
|
3293
|
+
function PageLoader() {
|
|
3294
|
+
var theme = /*#__PURE__*/useTheme();
|
|
3295
|
+
var size = theme.kitt.pageLoader.size;
|
|
3296
|
+
var colorHex = theme.kitt.typography.colors.primary;
|
|
3297
|
+
return /*#__PURE__*/jsx(ActivityIndicator, {
|
|
3298
|
+
testID: "ActivityIndicator",
|
|
3299
|
+
color: colorHex,
|
|
3300
|
+
size: getActivityIndicatorSize(size)
|
|
3301
|
+
});
|
|
3302
|
+
}
|
|
3303
|
+
|
|
3250
3304
|
var Container$2 = /*#__PURE__*/styled.View.withConfig({
|
|
3251
3305
|
displayName: "SkeletonContent__Container"
|
|
3252
3306
|
})(["background-color:", ";border-color:", ";height:100%;width:100%;"], function (_ref) {
|
|
@@ -3541,8 +3595,8 @@ function Story(_ref) {
|
|
|
3541
3595
|
});
|
|
3542
3596
|
}
|
|
3543
3597
|
|
|
3544
|
-
var _excluded$
|
|
3545
|
-
_excluded2
|
|
3598
|
+
var _excluded$2 = ["title", "children", "internalIsDemoSection"],
|
|
3599
|
+
_excluded2 = ["title", "children"],
|
|
3546
3600
|
_excluded3 = ["title", "children"];
|
|
3547
3601
|
var StyledSection = /*#__PURE__*/styled.View.withConfig({
|
|
3548
3602
|
displayName: "StorySection__StyledSection"
|
|
@@ -3551,7 +3605,7 @@ function StorySection(_ref) {
|
|
|
3551
3605
|
var title = _ref.title,
|
|
3552
3606
|
children = _ref.children,
|
|
3553
3607
|
internalIsDemoSection = _ref.internalIsDemoSection,
|
|
3554
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3608
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
3555
3609
|
|
|
3556
3610
|
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
3557
3611
|
return /*#__PURE__*/jsxs(StyledSection, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -3567,7 +3621,7 @@ var StyledSubSection = /*#__PURE__*/styled.View.withConfig({
|
|
|
3567
3621
|
function SubSection(_ref2) {
|
|
3568
3622
|
var title = _ref2.title,
|
|
3569
3623
|
children = _ref2.children,
|
|
3570
|
-
props = _objectWithoutProperties(_ref2, _excluded2
|
|
3624
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
3571
3625
|
|
|
3572
3626
|
return /*#__PURE__*/jsxs(StyledSubSection, _objectSpread(_objectSpread({}, props), {}, {
|
|
3573
3627
|
children: [/*#__PURE__*/jsx(StoryTitle.Level3, {
|
|
@@ -4121,7 +4175,7 @@ function TypographyEmoji(_ref2) {
|
|
|
4121
4175
|
});
|
|
4122
4176
|
}
|
|
4123
4177
|
|
|
4124
|
-
var _excluded$
|
|
4178
|
+
var _excluded$1 = ["children", "disabled", "noUnderline", "href", "hrefAttrs", "onPress"];
|
|
4125
4179
|
var TypographyLinkWebWrapper = withTheme( /*#__PURE__*/styled$1("span")({
|
|
4126
4180
|
name: "TypographyLinkWebWrapper",
|
|
4127
4181
|
"class": "kitt-u_TypographyLinkWebWrapper_tcwz3nt",
|
|
@@ -4154,7 +4208,7 @@ function TypographyLink(_ref5) {
|
|
|
4154
4208
|
href = _ref5.href,
|
|
4155
4209
|
hrefAttrs = _ref5.hrefAttrs,
|
|
4156
4210
|
onPress = _ref5.onPress,
|
|
4157
|
-
otherProps = _objectWithoutProperties(_ref5, _excluded$
|
|
4211
|
+
otherProps = _objectWithoutProperties(_ref5, _excluded$1);
|
|
4158
4212
|
|
|
4159
4213
|
return /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
4160
4214
|
accessibilityRole: "none",
|
|
@@ -4178,39 +4232,6 @@ function TypographyLink(_ref5) {
|
|
|
4178
4232
|
}));
|
|
4179
4233
|
}
|
|
4180
4234
|
|
|
4181
|
-
var _excluded$1 = ["color"],
|
|
4182
|
-
_excluded2 = ["color"];
|
|
4183
|
-
|
|
4184
|
-
function TypographySpinningIconSpecifiedColor(_ref) {
|
|
4185
|
-
var color = _ref.color,
|
|
4186
|
-
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
4187
|
-
|
|
4188
|
-
var theme = /*#__PURE__*/useTheme();
|
|
4189
|
-
return /*#__PURE__*/jsx(SpinningIcon, _objectSpread(_objectSpread({}, props), {}, {
|
|
4190
|
-
color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
|
|
4191
|
-
}));
|
|
4192
|
-
}
|
|
4193
|
-
|
|
4194
|
-
function TypographySpinningIconInheritColor(props) {
|
|
4195
|
-
var color = useTypographyColor();
|
|
4196
|
-
return /*#__PURE__*/jsx(TypographySpinningIconSpecifiedColor, _objectSpread({
|
|
4197
|
-
color: color
|
|
4198
|
-
}, props));
|
|
4199
|
-
}
|
|
4200
|
-
|
|
4201
|
-
function TypographySpinningIcon(_ref2) {
|
|
4202
|
-
var color = _ref2.color,
|
|
4203
|
-
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
4204
|
-
|
|
4205
|
-
if (color) {
|
|
4206
|
-
return /*#__PURE__*/jsx(TypographySpinningIconSpecifiedColor, _objectSpread({
|
|
4207
|
-
color: color
|
|
4208
|
-
}, props));
|
|
4209
|
-
}
|
|
4210
|
-
|
|
4211
|
-
return /*#__PURE__*/jsx(TypographySpinningIconInheritColor, _objectSpread({}, props));
|
|
4212
|
-
}
|
|
4213
|
-
|
|
4214
4235
|
var hex2rgba = function (hex) {
|
|
4215
4236
|
var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
4216
4237
|
var r = parseInt(hex.slice(1, 3), 16);
|
|
@@ -4249,5 +4270,5 @@ function MatchWindowSize(_ref) {
|
|
|
4249
4270
|
return children;
|
|
4250
4271
|
}
|
|
4251
4272
|
|
|
4252
|
-
export { Avatar, Button, Card, Checkbox, DatePicker, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label,
|
|
4273
|
+
export { Avatar, Button, Card, Checkbox, DatePicker, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MatchWindowSize, Message, Modal, Notification, Overlay, PageLoader, Radio, DeprecatedSection as Section, Skeleton, SpinningIcon, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
|
|
4253
4274
|
//# sourceMappingURL=index-browser-all.es.js.map
|