@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
|
@@ -290,10 +290,11 @@ const StyledAvatarView = /*#__PURE__*/styled__default.View.withConfig({
|
|
|
290
290
|
})(["border-radius:", ";background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], ({
|
|
291
291
|
theme,
|
|
292
292
|
$isRound,
|
|
293
|
-
$size
|
|
293
|
+
$size,
|
|
294
|
+
$sizeVariant
|
|
294
295
|
}) => {
|
|
295
296
|
if ($isRound) return `${$size / 2}px`;
|
|
296
|
-
return `${theme.kitt.avatar.borderRadius}px`;
|
|
297
|
+
return `${$sizeVariant === 'large' ? theme.kitt.avatar.large.borderRadius : theme.kitt.avatar.borderRadius}px`;
|
|
297
298
|
}, ({
|
|
298
299
|
theme,
|
|
299
300
|
$isLight
|
|
@@ -309,8 +310,8 @@ function AvatarContent({
|
|
|
309
310
|
firstname,
|
|
310
311
|
lastname,
|
|
311
312
|
alt,
|
|
312
|
-
|
|
313
|
-
|
|
313
|
+
isLight,
|
|
314
|
+
sizeVariant
|
|
314
315
|
}) {
|
|
315
316
|
if (src) {
|
|
316
317
|
return /*#__PURE__*/jsxRuntime.jsx(reactNative.Image, {
|
|
@@ -327,8 +328,8 @@ function AvatarContent({
|
|
|
327
328
|
|
|
328
329
|
if (firstname && lastname) {
|
|
329
330
|
return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
330
|
-
base:
|
|
331
|
-
variant:
|
|
331
|
+
base: sizeVariant === 'large' ? 'body-large' : 'body',
|
|
332
|
+
variant: sizeVariant === 'large' ? 'bold' : 'regular',
|
|
332
333
|
color: isLight ? 'black' : 'white',
|
|
333
334
|
children: getInitials(firstname, lastname)
|
|
334
335
|
});
|
|
@@ -343,24 +344,39 @@ function AvatarContent({
|
|
|
343
344
|
|
|
344
345
|
function Avatar({
|
|
345
346
|
size = 40,
|
|
346
|
-
base = 'body-small',
|
|
347
347
|
round,
|
|
348
348
|
light,
|
|
349
|
+
sizeVariant,
|
|
349
350
|
...props
|
|
350
351
|
}) {
|
|
351
352
|
return /*#__PURE__*/jsxRuntime.jsx(StyledAvatarView, {
|
|
352
353
|
$size: size,
|
|
353
354
|
$isRound: round,
|
|
354
355
|
$isLight: light,
|
|
356
|
+
$sizeVariant: sizeVariant,
|
|
355
357
|
children: /*#__PURE__*/jsxRuntime.jsx(AvatarContent, {
|
|
356
358
|
size: size,
|
|
357
|
-
base: base,
|
|
358
359
|
isLight: light,
|
|
360
|
+
sizeVariant: sizeVariant,
|
|
359
361
|
...props
|
|
360
362
|
})
|
|
361
363
|
});
|
|
362
364
|
}
|
|
363
365
|
|
|
366
|
+
const hasVariant = (button, variant) => {
|
|
367
|
+
return variant in button;
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
function getVariantValuesIfExist(theme, type, variant) {
|
|
371
|
+
const button = theme.kitt.button[type];
|
|
372
|
+
|
|
373
|
+
if (hasVariant(button, variant)) {
|
|
374
|
+
return button[variant];
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
return theme.kitt.button[type].default;
|
|
378
|
+
}
|
|
379
|
+
|
|
364
380
|
const StyledPressable = /*#__PURE__*/styled__default.Pressable.withConfig({
|
|
365
381
|
displayName: "AnimatedButtonPressable__StyledPressable",
|
|
366
382
|
componentId: "kitt-universal__sc-175vyve-0"
|
|
@@ -381,6 +397,7 @@ const AnimatedButtonPressable = /*#__PURE__*/react.forwardRef(({
|
|
|
381
397
|
disabled,
|
|
382
398
|
accessibilityRole,
|
|
383
399
|
$type,
|
|
400
|
+
$variant,
|
|
384
401
|
$isStretch,
|
|
385
402
|
href,
|
|
386
403
|
hrefAttrs,
|
|
@@ -393,7 +410,7 @@ const AnimatedButtonPressable = /*#__PURE__*/react.forwardRef(({
|
|
|
393
410
|
const {
|
|
394
411
|
backgroundColor,
|
|
395
412
|
pressedBackgroundColor
|
|
396
|
-
} = theme
|
|
413
|
+
} = getVariantValuesIfExist(theme, $type, $variant);
|
|
397
414
|
const {
|
|
398
415
|
scale
|
|
399
416
|
} = theme.kitt.button;
|
|
@@ -423,7 +440,7 @@ const AnimatedButtonPressable = /*#__PURE__*/react.forwardRef(({
|
|
|
423
440
|
};
|
|
424
441
|
_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)}]};}}";
|
|
425
442
|
_f.__workletHash = 5368461229978;
|
|
426
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Button/AnimatedButtonPressable.tsx (
|
|
443
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Button/AnimatedButtonPressable.tsx (56:41)";
|
|
427
444
|
_f.__optimalization = 2;
|
|
428
445
|
|
|
429
446
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -480,11 +497,12 @@ const BaseStyledButtonPressable = /*#__PURE__*/styled__default.View.withConfig({
|
|
|
480
497
|
}) => theme.kitt.button.borderRadius, ({
|
|
481
498
|
theme,
|
|
482
499
|
$isDisabled,
|
|
483
|
-
$type
|
|
500
|
+
$type,
|
|
501
|
+
$variant
|
|
484
502
|
}) => {
|
|
485
|
-
if ($isDisabled) return theme.kitt.button.disabled.backgroundColor;
|
|
503
|
+
if ($isDisabled) return theme.kitt.button.disabled.default.backgroundColor;
|
|
486
504
|
if (reactNative.Platform.OS !== 'web') return 'transparent';
|
|
487
|
-
return theme
|
|
505
|
+
return getVariantValuesIfExist(theme, $type, $variant).backgroundColor;
|
|
488
506
|
}, ({
|
|
489
507
|
theme,
|
|
490
508
|
$isLarge,
|
|
@@ -537,10 +555,10 @@ function isSubtle(type) {
|
|
|
537
555
|
return type.startsWith('subtle');
|
|
538
556
|
}
|
|
539
557
|
|
|
540
|
-
const getTextColorByType = type => {
|
|
558
|
+
const getTextColorByType = (type, variant) => {
|
|
541
559
|
switch (type) {
|
|
542
560
|
case 'primary':
|
|
543
|
-
return 'white';
|
|
561
|
+
return variant === 'ghost' ? 'primary' : 'white';
|
|
544
562
|
|
|
545
563
|
case 'white':
|
|
546
564
|
return 'white';
|
|
@@ -681,13 +699,14 @@ const ButtonContentContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
|
681
699
|
});
|
|
682
700
|
function ButtonContent({
|
|
683
701
|
type,
|
|
702
|
+
variant,
|
|
684
703
|
isDisabled,
|
|
685
704
|
$isStretch,
|
|
686
705
|
icon,
|
|
687
706
|
children,
|
|
688
707
|
...props
|
|
689
708
|
}) {
|
|
690
|
-
const color = isDisabled ? 'black-light' : getTextColorByType(type);
|
|
709
|
+
const color = isDisabled ? 'black-light' : getTextColorByType(type, variant);
|
|
691
710
|
return /*#__PURE__*/jsxRuntime.jsx(ButtonContentContainer, {
|
|
692
711
|
$isSubtle: isSubtle(type),
|
|
693
712
|
$isStretch: $isStretch,
|
|
@@ -713,7 +732,7 @@ const StyledDisabled = /*#__PURE__*/styled__default.View.withConfig({
|
|
|
713
732
|
borderWidth,
|
|
714
733
|
disabled
|
|
715
734
|
} = theme.kitt.button;
|
|
716
|
-
return `${borderWidth.disabled}px solid ${disabled.borderColor}`;
|
|
735
|
+
return `${borderWidth.disabled}px solid ${disabled.default.borderColor}`;
|
|
717
736
|
}, ({
|
|
718
737
|
theme
|
|
719
738
|
}) => theme.kitt.button.borderRadius);
|
|
@@ -721,6 +740,7 @@ const StyledDisabled = /*#__PURE__*/styled__default.View.withConfig({
|
|
|
721
740
|
const Button = /*#__PURE__*/react.forwardRef(({
|
|
722
741
|
children,
|
|
723
742
|
type = 'default',
|
|
743
|
+
variant = 'default',
|
|
724
744
|
disabled,
|
|
725
745
|
stretch,
|
|
726
746
|
large,
|
|
@@ -732,6 +752,10 @@ const Button = /*#__PURE__*/react.forwardRef(({
|
|
|
732
752
|
accessibilityRole = 'button',
|
|
733
753
|
onPress
|
|
734
754
|
}, ref) => {
|
|
755
|
+
if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && type !== 'primary') {
|
|
756
|
+
throw new Error('variant=ghost is only allowed with type=primary');
|
|
757
|
+
}
|
|
758
|
+
|
|
735
759
|
return /*#__PURE__*/jsxRuntime.jsx(AnimatedButtonPressable, {
|
|
736
760
|
ref: ref,
|
|
737
761
|
accessibilityRole: accessibilityRole,
|
|
@@ -741,14 +765,17 @@ const Button = /*#__PURE__*/react.forwardRef(({
|
|
|
741
765
|
disabled: disabled,
|
|
742
766
|
$isStretch: stretch,
|
|
743
767
|
$type: type,
|
|
768
|
+
$variant: variant,
|
|
744
769
|
onPress: onPress,
|
|
745
770
|
children: /*#__PURE__*/jsxRuntime.jsxs(BaseStyledButtonPressable, {
|
|
746
771
|
$type: type,
|
|
772
|
+
$variant: variant,
|
|
747
773
|
$isStretch: stretch,
|
|
748
774
|
$isLarge: large,
|
|
749
775
|
$isDisabled: disabled,
|
|
750
776
|
children: [/*#__PURE__*/jsxRuntime.jsx(ButtonContent, {
|
|
751
777
|
type: type,
|
|
778
|
+
variant: variant,
|
|
752
779
|
$isStretch: stretch,
|
|
753
780
|
isDisabled: disabled,
|
|
754
781
|
icon: icon,
|
|
@@ -826,8 +853,12 @@ function ExternalLink({
|
|
|
826
853
|
...rest
|
|
827
854
|
}) {
|
|
828
855
|
return /*#__PURE__*/jsxRuntime.jsx(Component, { ...rest,
|
|
829
|
-
onPress:
|
|
830
|
-
if (onPress)
|
|
856
|
+
onPress: e => {
|
|
857
|
+
if (onPress) {
|
|
858
|
+
onPress(e);
|
|
859
|
+
if (e?.defaultPrevented) return;
|
|
860
|
+
}
|
|
861
|
+
|
|
831
862
|
if (!href) return;
|
|
832
863
|
|
|
833
864
|
switch (openLinkBehavior.native) {
|
|
@@ -909,6 +940,9 @@ const avatar = {
|
|
|
909
940
|
},
|
|
910
941
|
light: {
|
|
911
942
|
backgroundColor: lateOceanColorPalette.black100
|
|
943
|
+
},
|
|
944
|
+
large: {
|
|
945
|
+
borderRadius: 30
|
|
912
946
|
}
|
|
913
947
|
};
|
|
914
948
|
|
|
@@ -941,47 +975,68 @@ const button = {
|
|
|
941
975
|
timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
|
|
942
976
|
},
|
|
943
977
|
default: {
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
978
|
+
default: {
|
|
979
|
+
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
980
|
+
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
981
|
+
hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
982
|
+
focusBorderColor: 'rgba(0, 0, 0, 0.1)'
|
|
983
|
+
}
|
|
948
984
|
},
|
|
949
985
|
primary: {
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
986
|
+
default: {
|
|
987
|
+
backgroundColor: colors.primary,
|
|
988
|
+
pressedBackgroundColor: colors.primaryLight,
|
|
989
|
+
hoverBackgroundColor: colors.primaryLight,
|
|
990
|
+
focusBorderColor: 'rgba(76, 52, 224, 0.2)'
|
|
991
|
+
},
|
|
992
|
+
ghost: {
|
|
993
|
+
backgroundColor: colors.uiBackgroundLight,
|
|
994
|
+
pressedBackgroundColor: colors.uiBackground,
|
|
995
|
+
hoverBackgroundColor: colors.hover,
|
|
996
|
+
focusBorderColor: 'rgba(255,255,255, 0.4)',
|
|
997
|
+
color: colors.primary,
|
|
998
|
+
hoverColor: colors.hover,
|
|
999
|
+
activeColor: colors.hover
|
|
1000
|
+
}
|
|
954
1001
|
},
|
|
955
1002
|
white: {
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
1003
|
+
default: {
|
|
1004
|
+
backgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
1005
|
+
pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
1006
|
+
hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
1007
|
+
focusBorderColor: 'rgba(255, 255, 255, 0.1)'
|
|
1008
|
+
}
|
|
960
1009
|
},
|
|
961
1010
|
subtle: {
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
1011
|
+
default: {
|
|
1012
|
+
backgroundColor: colors.transparent,
|
|
1013
|
+
pressedBackgroundColor: colors.transparent,
|
|
1014
|
+
hoverBackgroundColor: colors.transparent,
|
|
1015
|
+
focusBorderColor: 'rgba(76, 52, 224, 0.2)',
|
|
1016
|
+
color: colors.primary,
|
|
1017
|
+
hoverColor: 'rgba(76, 52, 224, 0.8)',
|
|
1018
|
+
activeColor: 'rgba(76, 52, 224, 0.8)'
|
|
1019
|
+
}
|
|
969
1020
|
},
|
|
970
1021
|
'subtle-dark': {
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
1022
|
+
default: {
|
|
1023
|
+
backgroundColor: colors.transparent,
|
|
1024
|
+
pressedBackgroundColor: colors.transparent,
|
|
1025
|
+
hoverBackgroundColor: colors.transparent,
|
|
1026
|
+
focusBorderColor: 'rgba(0, 0, 0, 0.1)',
|
|
1027
|
+
color: colors.black,
|
|
1028
|
+
hoverColor: 'rgba(0, 0, 0, 0.8)',
|
|
1029
|
+
activeColor: 'rgba(0, 0, 0, 0.8)'
|
|
1030
|
+
}
|
|
978
1031
|
},
|
|
979
1032
|
disabled: {
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
1033
|
+
default: {
|
|
1034
|
+
backgroundColor: colors.disabled,
|
|
1035
|
+
pressedBackgroundColor: colors.disabled,
|
|
1036
|
+
hoverBackgroundColor: colors.disabled,
|
|
1037
|
+
focusBorderColor: lateOceanColorPalette.black100,
|
|
1038
|
+
borderColor: lateOceanColorPalette.black100
|
|
1039
|
+
}
|
|
985
1040
|
}
|
|
986
1041
|
};
|
|
987
1042
|
|
|
@@ -1257,14 +1312,14 @@ const iconButton = {
|
|
|
1257
1312
|
},
|
|
1258
1313
|
disabled: {
|
|
1259
1314
|
scale: 1,
|
|
1260
|
-
backgroundColor: button.disabled.backgroundColor,
|
|
1261
|
-
borderColor: button.disabled.borderColor
|
|
1315
|
+
backgroundColor: button.disabled.default.backgroundColor,
|
|
1316
|
+
borderColor: button.disabled.default.borderColor
|
|
1262
1317
|
},
|
|
1263
1318
|
default: {
|
|
1264
|
-
pressedBackgroundColor: button.default.pressedBackgroundColor
|
|
1319
|
+
pressedBackgroundColor: button.default.default.pressedBackgroundColor
|
|
1265
1320
|
},
|
|
1266
1321
|
white: {
|
|
1267
|
-
pressedBackgroundColor: button.white.hoverBackgroundColor
|
|
1322
|
+
pressedBackgroundColor: button.white.default.hoverBackgroundColor
|
|
1268
1323
|
}
|
|
1269
1324
|
};
|
|
1270
1325
|
|
|
@@ -1275,6 +1330,10 @@ const listItem = {
|
|
|
1275
1330
|
innerMargin: 8
|
|
1276
1331
|
};
|
|
1277
1332
|
|
|
1333
|
+
const pageLoader = {
|
|
1334
|
+
size: 60
|
|
1335
|
+
};
|
|
1336
|
+
|
|
1278
1337
|
const shadows = {
|
|
1279
1338
|
medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
|
|
1280
1339
|
};
|
|
@@ -1365,19 +1424,20 @@ const theme = {
|
|
|
1365
1424
|
lateOcean: lateOceanColorPalette
|
|
1366
1425
|
},
|
|
1367
1426
|
avatar,
|
|
1427
|
+
breakpoints,
|
|
1368
1428
|
button,
|
|
1369
1429
|
card,
|
|
1370
1430
|
feedbackMessage,
|
|
1371
1431
|
forms,
|
|
1372
|
-
typography,
|
|
1373
|
-
tag,
|
|
1374
|
-
shadows,
|
|
1375
1432
|
fullScreenModal,
|
|
1376
1433
|
iconButton,
|
|
1377
1434
|
listItem,
|
|
1378
|
-
|
|
1435
|
+
pageLoader,
|
|
1436
|
+
shadows,
|
|
1379
1437
|
skeleton,
|
|
1380
|
-
|
|
1438
|
+
tag,
|
|
1439
|
+
tooltip,
|
|
1440
|
+
typography
|
|
1381
1441
|
};
|
|
1382
1442
|
|
|
1383
1443
|
function matchWindowSize({
|
|
@@ -1719,8 +1779,7 @@ function Overlay({
|
|
|
1719
1779
|
}) {
|
|
1720
1780
|
return /*#__PURE__*/jsxRuntime.jsx(OverlayPressable, {
|
|
1721
1781
|
accessibilityRole: "none",
|
|
1722
|
-
onPress: onPress
|
|
1723
|
-
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {})
|
|
1782
|
+
onPress: onPress
|
|
1724
1783
|
});
|
|
1725
1784
|
}
|
|
1726
1785
|
|
|
@@ -2828,10 +2887,12 @@ FullScreenModal.Body = FullScreenModalBody;
|
|
|
2828
2887
|
|
|
2829
2888
|
function SpinningIcon({
|
|
2830
2889
|
icon,
|
|
2831
|
-
size = defaultIconSize,
|
|
2832
|
-
align,
|
|
2833
2890
|
color
|
|
2834
2891
|
}) {
|
|
2892
|
+
if (process.env.NODE_ENV !== 'production' && !color) {
|
|
2893
|
+
throw new Error(`Invalid color passed to SpinningIcon: ${String(color)}`);
|
|
2894
|
+
}
|
|
2895
|
+
|
|
2835
2896
|
const clonedIcon = /*#__PURE__*/react.cloneElement(icon, {
|
|
2836
2897
|
color
|
|
2837
2898
|
});
|
|
@@ -2855,18 +2916,13 @@ function SpinningIcon({
|
|
|
2855
2916
|
return undefined;
|
|
2856
2917
|
};
|
|
2857
2918
|
}, []);
|
|
2858
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
rotate: rotation
|
|
2866
|
-
}]
|
|
2867
|
-
},
|
|
2868
|
-
children: clonedIcon
|
|
2869
|
-
})
|
|
2919
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.Animated.View, {
|
|
2920
|
+
style: {
|
|
2921
|
+
transform: [{
|
|
2922
|
+
rotate: rotation
|
|
2923
|
+
}]
|
|
2924
|
+
},
|
|
2925
|
+
children: clonedIcon
|
|
2870
2926
|
});
|
|
2871
2927
|
}
|
|
2872
2928
|
|
|
@@ -2992,31 +3048,12 @@ ListItem.Content = ListItemContent;
|
|
|
2992
3048
|
ListItem.SideContent = ListItemSideContent;
|
|
2993
3049
|
ListItem.SideContainer = ListItemSideContainer;
|
|
2994
3050
|
|
|
2995
|
-
function
|
|
2996
|
-
|
|
2997
|
-
return size < 36 ? 'small' : 'large';
|
|
2998
|
-
}
|
|
2999
|
-
|
|
3000
|
-
const defaultLoaderSize = defaultIconSize;
|
|
3001
|
-
function Loader({
|
|
3002
|
-
color = 'primary',
|
|
3003
|
-
size = defaultLoaderSize
|
|
3004
|
-
}) {
|
|
3005
|
-
const theme = /*#__PURE__*/styled.useTheme();
|
|
3006
|
-
const colorHex = theme.kitt.typography.colors[color];
|
|
3007
|
-
return /*#__PURE__*/jsxRuntime.jsx(reactNative.ActivityIndicator, {
|
|
3008
|
-
testID: "ActivityIndicator",
|
|
3009
|
-
color: colorHex,
|
|
3010
|
-
size: getActivityIndicatorSize(size)
|
|
3011
|
-
});
|
|
3012
|
-
}
|
|
3013
|
-
|
|
3014
|
-
function LargeLoader({
|
|
3015
|
-
color = 'primary'
|
|
3051
|
+
function LoaderIcon({
|
|
3052
|
+
color
|
|
3016
3053
|
}) {
|
|
3017
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
3054
|
+
return /*#__PURE__*/jsxRuntime.jsx(SpinningIcon, {
|
|
3018
3055
|
color: color,
|
|
3019
|
-
|
|
3056
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.ArcIcon, {})
|
|
3020
3057
|
});
|
|
3021
3058
|
}
|
|
3022
3059
|
|
|
@@ -3203,6 +3240,24 @@ function Notification({
|
|
|
3203
3240
|
});
|
|
3204
3241
|
}
|
|
3205
3242
|
|
|
3243
|
+
function getActivityIndicatorSize(size) {
|
|
3244
|
+
if (reactNative.Platform.OS === 'android') return size;
|
|
3245
|
+
return size < 36 ? 'small' : 'large';
|
|
3246
|
+
}
|
|
3247
|
+
|
|
3248
|
+
function PageLoader() {
|
|
3249
|
+
const theme = /*#__PURE__*/styled.useTheme();
|
|
3250
|
+
const {
|
|
3251
|
+
size
|
|
3252
|
+
} = theme.kitt.pageLoader;
|
|
3253
|
+
const colorHex = theme.kitt.typography.colors.primary;
|
|
3254
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.ActivityIndicator, {
|
|
3255
|
+
testID: "ActivityIndicator",
|
|
3256
|
+
color: colorHex,
|
|
3257
|
+
size: getActivityIndicatorSize(size)
|
|
3258
|
+
});
|
|
3259
|
+
}
|
|
3260
|
+
|
|
3206
3261
|
const Container$2 = /*#__PURE__*/styled__default.View.withConfig({
|
|
3207
3262
|
displayName: "SkeletonContent__Container",
|
|
3208
3263
|
componentId: "kitt-universal__sc-1u3chjb-0"
|
|
@@ -4117,39 +4172,6 @@ function TypographyLink({
|
|
|
4117
4172
|
});
|
|
4118
4173
|
}
|
|
4119
4174
|
|
|
4120
|
-
function TypographySpinningIconSpecifiedColor({
|
|
4121
|
-
color,
|
|
4122
|
-
...props
|
|
4123
|
-
}) {
|
|
4124
|
-
const theme = /*#__PURE__*/styled.useTheme();
|
|
4125
|
-
return /*#__PURE__*/jsxRuntime.jsx(SpinningIcon, { ...props,
|
|
4126
|
-
color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
|
|
4127
|
-
});
|
|
4128
|
-
}
|
|
4129
|
-
|
|
4130
|
-
function TypographySpinningIconInheritColor(props) {
|
|
4131
|
-
const color = useTypographyColor();
|
|
4132
|
-
return /*#__PURE__*/jsxRuntime.jsx(TypographySpinningIconSpecifiedColor, {
|
|
4133
|
-
color: color,
|
|
4134
|
-
...props
|
|
4135
|
-
});
|
|
4136
|
-
}
|
|
4137
|
-
|
|
4138
|
-
function TypographySpinningIcon({
|
|
4139
|
-
color,
|
|
4140
|
-
...props
|
|
4141
|
-
}) {
|
|
4142
|
-
if (color) {
|
|
4143
|
-
return /*#__PURE__*/jsxRuntime.jsx(TypographySpinningIconSpecifiedColor, {
|
|
4144
|
-
color: color,
|
|
4145
|
-
...props
|
|
4146
|
-
});
|
|
4147
|
-
}
|
|
4148
|
-
|
|
4149
|
-
return /*#__PURE__*/jsxRuntime.jsx(TypographySpinningIconInheritColor, { ...props
|
|
4150
|
-
});
|
|
4151
|
-
}
|
|
4152
|
-
|
|
4153
4175
|
const hex2rgba = (hex, alpha = 1) => {
|
|
4154
4176
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
4155
4177
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
@@ -4214,13 +4236,14 @@ exports.KittBreakpointsMax = KittBreakpointsMax;
|
|
|
4214
4236
|
exports.KittThemeDecorator = KittThemeDecorator;
|
|
4215
4237
|
exports.KittThemeProvider = KittThemeProvider;
|
|
4216
4238
|
exports.Label = Label;
|
|
4217
|
-
exports.LargeLoader = LargeLoader;
|
|
4218
4239
|
exports.ListItem = ListItem;
|
|
4219
|
-
exports.
|
|
4240
|
+
exports.LoaderIcon = LoaderIcon;
|
|
4220
4241
|
exports.MatchWindowSize = MatchWindowSize;
|
|
4221
4242
|
exports.Message = Message;
|
|
4222
4243
|
exports.Modal = Modal;
|
|
4223
4244
|
exports.Notification = Notification;
|
|
4245
|
+
exports.Overlay = Overlay;
|
|
4246
|
+
exports.PageLoader = PageLoader;
|
|
4224
4247
|
exports.Radio = Radio;
|
|
4225
4248
|
exports.Section = DeprecatedSection;
|
|
4226
4249
|
exports.Skeleton = Skeleton;
|
|
@@ -4241,7 +4264,6 @@ exports.Typography = Typography;
|
|
|
4241
4264
|
exports.TypographyEmoji = TypographyEmoji;
|
|
4242
4265
|
exports.TypographyIcon = TypographyIcon;
|
|
4243
4266
|
exports.TypographyLink = TypographyLink;
|
|
4244
|
-
exports.TypographySpinningIcon = TypographySpinningIcon;
|
|
4245
4267
|
exports.createWindowSizeHelper = createWindowSizeHelper;
|
|
4246
4268
|
exports.hex2rgba = hex2rgba;
|
|
4247
4269
|
exports.matchWindowSize = matchWindowSize;
|