@ornikar/kitt-universal 7.2.0 → 7.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definitions/Button/BaseStyledButtonPressable.d.ts +1 -0
- package/dist/definitions/Button/BaseStyledButtonPressable.d.ts.map +1 -1
- package/dist/definitions/Button/Button.d.ts +1 -0
- package/dist/definitions/Button/Button.d.ts.map +1 -1
- package/dist/definitions/Button/ButtonContent.d.ts.map +1 -1
- package/dist/definitions/PageLoader/AnimatedBackgroundCircle.d.ts +3 -0
- package/dist/definitions/PageLoader/AnimatedBackgroundCircle.d.ts.map +1 -0
- package/dist/definitions/PageLoader/AnimatedFillCircle.d.ts +3 -0
- package/dist/definitions/PageLoader/AnimatedFillCircle.d.ts.map +1 -0
- package/dist/definitions/PageLoader/AnimatedFillCircleContainer.d.ts +8 -0
- package/dist/definitions/PageLoader/AnimatedFillCircleContainer.d.ts.map +1 -0
- package/dist/definitions/PageLoader/AnimatedLoaderCircle.d.ts +10 -0
- package/dist/definitions/PageLoader/AnimatedLoaderCircle.d.ts.map +1 -0
- package/dist/definitions/PageLoader/PageLoader.d.ts.map +1 -1
- package/dist/definitions/PageLoader/PageLoader.web.d.ts.map +1 -1
- package/dist/definitions/forms/DatePicker/DatePickerInputPart.d.ts.map +1 -1
- package/dist/definitions/forms/InputText/InputText.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/button.d.ts +2 -1
- package/dist/definitions/themes/late-ocean/button.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/input.d.ts +2 -2
- package/dist/definitions/themes/late-ocean/input.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/pageLoader.d.ts +13 -0
- package/dist/definitions/themes/late-ocean/pageLoader.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +219 -29
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +219 -29
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +219 -29
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +114 -35
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +214 -24
- 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 +103 -29
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +26 -3
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +26 -3
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +26 -3
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +26 -3
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +26 -3
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +26 -3
- 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 +10 -5
|
@@ -548,11 +548,14 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled(View).withConfig({
|
|
|
548
548
|
}, function (_ref7) {
|
|
549
549
|
var theme = _ref7.theme,
|
|
550
550
|
$isLarge = _ref7.$isLarge,
|
|
551
|
+
$isXLarge = _ref7.$isXLarge,
|
|
551
552
|
$isDisabled = _ref7.$isDisabled;
|
|
552
553
|
var _theme$kitt$button$co = theme.kitt.button.contentPadding,
|
|
553
554
|
large = _theme$kitt$button$co.large,
|
|
554
555
|
defaultPadding = _theme$kitt$button$co["default"],
|
|
555
|
-
disabledPadding = _theme$kitt$button$co.disabled
|
|
556
|
+
disabledPadding = _theme$kitt$button$co.disabled,
|
|
557
|
+
xLarge = _theme$kitt$button$co.xLarge;
|
|
558
|
+
if ($isXLarge) return xLarge;
|
|
556
559
|
if ($isLarge) return large;
|
|
557
560
|
if ($isDisabled) return disabledPadding;
|
|
558
561
|
return defaultPadding;
|
|
@@ -607,6 +610,9 @@ var getTextColorByType = function (type, variant) {
|
|
|
607
610
|
case 'subtle-dark':
|
|
608
611
|
return 'black';
|
|
609
612
|
|
|
613
|
+
case 'default':
|
|
614
|
+
return variant === 'ghost' ? 'white' : 'black';
|
|
615
|
+
|
|
610
616
|
default:
|
|
611
617
|
return 'black';
|
|
612
618
|
}
|
|
@@ -748,6 +754,7 @@ function ButtonContent(_ref7) {
|
|
|
748
754
|
});
|
|
749
755
|
}
|
|
750
756
|
|
|
757
|
+
var allowedGhostTypes = ['primary', 'default'];
|
|
751
758
|
var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
752
759
|
var children = _ref.children,
|
|
753
760
|
_ref$type = _ref.type,
|
|
@@ -757,6 +764,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
757
764
|
disabled = _ref.disabled,
|
|
758
765
|
stretch = _ref.stretch,
|
|
759
766
|
large = _ref.large,
|
|
767
|
+
xLarge = _ref.xLarge,
|
|
760
768
|
icon = _ref.icon,
|
|
761
769
|
_ref$iconPosition = _ref.iconPosition,
|
|
762
770
|
iconPosition = _ref$iconPosition === void 0 ? 'left' : _ref$iconPosition,
|
|
@@ -767,8 +775,8 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
767
775
|
accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
|
|
768
776
|
onPress = _ref.onPress;
|
|
769
777
|
|
|
770
|
-
if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && type
|
|
771
|
-
throw new Error('variant=ghost is only allowed with type=primary');
|
|
778
|
+
if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && !allowedGhostTypes.includes(type)) {
|
|
779
|
+
throw new Error('variant=ghost is only allowed with type=primary or default');
|
|
772
780
|
}
|
|
773
781
|
|
|
774
782
|
return /*#__PURE__*/jsx(AnimatedButtonPressable, {
|
|
@@ -787,6 +795,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
787
795
|
$variant: variant,
|
|
788
796
|
$isStretch: stretch,
|
|
789
797
|
$isLarge: large,
|
|
798
|
+
$isXLarge: xLarge,
|
|
790
799
|
$isDisabled: disabled,
|
|
791
800
|
children: [/*#__PURE__*/jsx(ButtonContent, {
|
|
792
801
|
type: type,
|
|
@@ -975,6 +984,7 @@ var button = {
|
|
|
975
984
|
contentPadding: {
|
|
976
985
|
"default": '7px 16px 7px',
|
|
977
986
|
large: '11px 24px 11px',
|
|
987
|
+
xLarge: '15px 24px 15px',
|
|
978
988
|
disabled: '5px 14px 5px'
|
|
979
989
|
},
|
|
980
990
|
transition: {
|
|
@@ -987,6 +997,15 @@ var button = {
|
|
|
987
997
|
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
988
998
|
hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
989
999
|
focusBorderColor: 'rgba(0, 0, 0, 0.1)'
|
|
1000
|
+
},
|
|
1001
|
+
ghost: {
|
|
1002
|
+
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
1003
|
+
pressedBackgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
1004
|
+
hoverBackgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
1005
|
+
focusBorderColor: 'rgba(255, 255, 255, 0.4)',
|
|
1006
|
+
color: lateOceanColorPalette.white,
|
|
1007
|
+
hoverColor: lateOceanColorPalette.white,
|
|
1008
|
+
activeColor: lateOceanColorPalette.white
|
|
990
1009
|
}
|
|
991
1010
|
},
|
|
992
1011
|
primary: {
|
|
@@ -1226,8 +1245,8 @@ var input = {
|
|
|
1226
1245
|
size: 20
|
|
1227
1246
|
},
|
|
1228
1247
|
padding: {
|
|
1229
|
-
|
|
1230
|
-
|
|
1248
|
+
horizontal: 16,
|
|
1249
|
+
vertical: 5
|
|
1231
1250
|
},
|
|
1232
1251
|
transition: {
|
|
1233
1252
|
property: 'border-color',
|
|
@@ -1342,7 +1361,20 @@ var listItem = {
|
|
|
1342
1361
|
};
|
|
1343
1362
|
|
|
1344
1363
|
var pageLoader = {
|
|
1345
|
-
size: 60
|
|
1364
|
+
size: 60,
|
|
1365
|
+
strokeWidth: 3,
|
|
1366
|
+
colors: {
|
|
1367
|
+
base: colors.separator,
|
|
1368
|
+
fill: colors.primary
|
|
1369
|
+
},
|
|
1370
|
+
animation: {
|
|
1371
|
+
delay: 500,
|
|
1372
|
+
circleBackgroundFillDuration: 1000,
|
|
1373
|
+
filledCircleFillDuration: 1800,
|
|
1374
|
+
groupFilledCircleRotationDuration: 1800,
|
|
1375
|
+
filledCircleRotationDuration: 2160,
|
|
1376
|
+
fillEasingFunction: [0.39, 0.575, 0.565, 1]
|
|
1377
|
+
}
|
|
1346
1378
|
};
|
|
1347
1379
|
|
|
1348
1380
|
var shadows = {
|
|
@@ -1642,7 +1674,7 @@ var ViewInput = /*#__PURE__*/styled(View).withConfig({
|
|
|
1642
1674
|
componentId: "kitt-universal__sc-11fmlmi-1"
|
|
1643
1675
|
})(["", " padding:", ";min-height:", "px;min-width:", ";"], styledTextInputMixin, function (_ref) {
|
|
1644
1676
|
var theme = _ref.theme;
|
|
1645
|
-
return theme.kitt.forms.input.padding
|
|
1677
|
+
return "".concat(theme.kitt.forms.input.padding.vertical, "px ").concat(theme.kitt.forms.input.padding.horizontal, "px");
|
|
1646
1678
|
}, function (_ref2) {
|
|
1647
1679
|
var theme = _ref2.theme;
|
|
1648
1680
|
return theme.kitt.forms.input.minHeight;
|
|
@@ -1803,20 +1835,18 @@ var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
|
|
|
1803
1835
|
})(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
|
|
1804
1836
|
var theme = _ref.theme,
|
|
1805
1837
|
multiline = _ref.multiline;
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
return theme.kitt.forms.input.padding.iOSSingleLine;
|
|
1809
|
-
}
|
|
1810
|
-
|
|
1811
|
-
return theme.kitt.forms.input.padding["default"];
|
|
1838
|
+
if (!multiline && "web" !== 'web') return "0 ".concat(theme.kitt.forms.input.padding.horizontal, "px");
|
|
1839
|
+
return "".concat(theme.kitt.forms.input.padding.vertical, "px ").concat(theme.kitt.forms.input.padding.horizontal, "px");
|
|
1812
1840
|
}, function (_ref2) {
|
|
1813
1841
|
var theme = _ref2.theme,
|
|
1814
1842
|
multiline = _ref2.multiline;
|
|
1815
|
-
if (!multiline && "web"
|
|
1843
|
+
if (!multiline && "web" !== 'web') return 0;
|
|
1816
1844
|
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
1817
1845
|
return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight, "px");
|
|
1818
1846
|
}, function (_ref3) {
|
|
1819
|
-
var
|
|
1847
|
+
var theme = _ref3.theme,
|
|
1848
|
+
_ref3$$minHeight = _ref3.$minHeight,
|
|
1849
|
+
$minHeight = _ref3$$minHeight === void 0 ? theme.kitt.forms.input.minHeight : _ref3$$minHeight;
|
|
1820
1850
|
return $minHeight;
|
|
1821
1851
|
});
|
|
1822
1852
|
var RightInputContainer = /*#__PURE__*/styled(View).withConfig({
|
|
@@ -1826,8 +1856,7 @@ var RightInputContainer = /*#__PURE__*/styled(View).withConfig({
|
|
|
1826
1856
|
var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
1827
1857
|
var id = _ref4.id,
|
|
1828
1858
|
right = _ref4.right,
|
|
1829
|
-
|
|
1830
|
-
minHeight = _ref4$minHeight === void 0 ? 0 : _ref4$minHeight,
|
|
1859
|
+
minHeight = _ref4.minHeight,
|
|
1831
1860
|
formState = _ref4.state,
|
|
1832
1861
|
internalForceState = _ref4.internalForceState,
|
|
1833
1862
|
_ref4$disabled = _ref4.disabled,
|
|
@@ -2017,6 +2046,7 @@ function InputPassword(_ref) {
|
|
|
2017
2046
|
autoCorrect: false,
|
|
2018
2047
|
secureTextEntry: !isVisible,
|
|
2019
2048
|
right: right || /*#__PURE__*/jsx(InputPressable, {
|
|
2049
|
+
hitSlop: 20,
|
|
2020
2050
|
accessibilityRole: "button",
|
|
2021
2051
|
onPress: function onPress() {
|
|
2022
2052
|
return setIsVisible(function (prev) {
|
|
@@ -3027,38 +3057,87 @@ var PageLoaderContainer = withTheme( /*#__PURE__*/styled$1("div")({
|
|
|
3027
3057
|
"class": "kitt-u_PageLoaderContainer_ptkwz2j",
|
|
3028
3058
|
vars: {
|
|
3029
3059
|
"ptkwz2j-0": [function (_ref) {
|
|
3030
|
-
var
|
|
3031
|
-
return
|
|
3060
|
+
var $circlePerimeter = _ref.$circlePerimeter;
|
|
3061
|
+
return $circlePerimeter;
|
|
3062
|
+
}, "px"],
|
|
3063
|
+
"ptkwz2j-2": [function (_ref2) {
|
|
3064
|
+
var $circlePerimeter = _ref2.$circlePerimeter;
|
|
3065
|
+
return $circlePerimeter * 0.2;
|
|
3066
|
+
}, "px"],
|
|
3067
|
+
"ptkwz2j-3": [function (_ref3) {
|
|
3068
|
+
var theme = _ref3.theme;
|
|
3069
|
+
return theme.kitt.pageLoader.size;
|
|
3070
|
+
}, "px"],
|
|
3071
|
+
"ptkwz2j-5": [function (_ref4) {
|
|
3072
|
+
var theme = _ref4.theme;
|
|
3073
|
+
return theme.kitt.pageLoader.strokeWidth;
|
|
3074
|
+
}, "px"],
|
|
3075
|
+
"ptkwz2j-8": [function (_ref5) {
|
|
3076
|
+
var theme = _ref5.theme;
|
|
3077
|
+
return theme.kitt.pageLoader.colors.base;
|
|
3032
3078
|
}],
|
|
3033
|
-
"ptkwz2j-
|
|
3034
|
-
var theme =
|
|
3035
|
-
|
|
3079
|
+
"ptkwz2j-9": [function (_ref6) {
|
|
3080
|
+
var theme = _ref6.theme;
|
|
3081
|
+
var animation = theme.kitt.pageLoader.animation;
|
|
3082
|
+
|
|
3083
|
+
var _animation$fillEasing = _slicedToArray(animation.fillEasingFunction, 4),
|
|
3084
|
+
x1 = _animation$fillEasing[0],
|
|
3085
|
+
y1 = _animation$fillEasing[1],
|
|
3086
|
+
x2 = _animation$fillEasing[2],
|
|
3087
|
+
y2 = _animation$fillEasing[3];
|
|
3088
|
+
|
|
3089
|
+
return "".concat(animation.circleBackgroundFillDuration, "ms cubic-bezier(").concat(x1, ", ").concat(y1, ", ").concat(x2, ", ").concat(y2, ") ").concat(animation.delay, "ms forwards");
|
|
3090
|
+
}],
|
|
3091
|
+
"ptkwz2j-10": [function (_ref7) {
|
|
3092
|
+
var theme = _ref7.theme;
|
|
3093
|
+
var animation = theme.kitt.pageLoader.animation;
|
|
3094
|
+
return "".concat(animation.filledCircleFillDuration, "ms linear ").concat(animation.delay, "ms infinite");
|
|
3095
|
+
}],
|
|
3096
|
+
"ptkwz2j-11": [function (_ref8) {
|
|
3097
|
+
var theme = _ref8.theme;
|
|
3098
|
+
return theme.kitt.pageLoader.colors.fill;
|
|
3099
|
+
}],
|
|
3100
|
+
"ptkwz2j-12": [function (_ref9) {
|
|
3101
|
+
var theme = _ref9.theme;
|
|
3102
|
+
var animation = theme.kitt.pageLoader.animation;
|
|
3103
|
+
|
|
3104
|
+
var _animation$fillEasing2 = _slicedToArray(animation.fillEasingFunction, 4),
|
|
3105
|
+
x1 = _animation$fillEasing2[0],
|
|
3106
|
+
y1 = _animation$fillEasing2[1],
|
|
3107
|
+
x2 = _animation$fillEasing2[2],
|
|
3108
|
+
y2 = _animation$fillEasing2[3];
|
|
3109
|
+
|
|
3110
|
+
var fillAnimation = "".concat(animation.filledCircleFillDuration, "ms cubic-bezier(").concat(x1, ", ").concat(y1, ", ").concat(x2, ", ").concat(y2, ") ").concat(animation.delay, "ms infinite alternate");
|
|
3111
|
+
var rotationAnimation = "".concat(animation.filledCircleRotationDuration, "ms linear ").concat(animation.delay, "ms infinite");
|
|
3112
|
+
return [fillAnimation, rotationAnimation].join(',');
|
|
3036
3113
|
}]
|
|
3037
3114
|
}
|
|
3038
3115
|
}));
|
|
3039
3116
|
function PageLoader() {
|
|
3040
3117
|
var theme = /*#__PURE__*/useTheme();
|
|
3041
|
-
var
|
|
3118
|
+
var _theme$kitt$pageLoade = theme.kitt.pageLoader,
|
|
3119
|
+
size = _theme$kitt$pageLoade.size,
|
|
3120
|
+
strokeWidth = _theme$kitt$pageLoade.strokeWidth;
|
|
3121
|
+
var center = size * 0.5;
|
|
3122
|
+
var radius = center - strokeWidth;
|
|
3123
|
+
var circlePerimeter = 2 * Math.PI * radius;
|
|
3124
|
+
var sharedProps = {
|
|
3125
|
+
cx: center,
|
|
3126
|
+
cy: center,
|
|
3127
|
+
r: radius,
|
|
3128
|
+
fill: 'none'
|
|
3129
|
+
};
|
|
3042
3130
|
return /*#__PURE__*/jsx(PageLoaderContainer, {
|
|
3131
|
+
$circlePerimeter: circlePerimeter,
|
|
3043
3132
|
children: /*#__PURE__*/jsxs("svg", {
|
|
3044
3133
|
width: size,
|
|
3045
3134
|
height: size,
|
|
3046
3135
|
children: [/*#__PURE__*/jsx("g", {
|
|
3047
3136
|
"data-large-loader": "base",
|
|
3048
|
-
children: /*#__PURE__*/jsx("circle", {
|
|
3049
|
-
cx: "30",
|
|
3050
|
-
cy: "30",
|
|
3051
|
-
r: "27",
|
|
3052
|
-
fill: "none"
|
|
3053
|
-
})
|
|
3137
|
+
children: /*#__PURE__*/jsx("circle", _objectSpread({}, sharedProps))
|
|
3054
3138
|
}), /*#__PURE__*/jsx("g", {
|
|
3055
3139
|
"data-large-loader": "fill",
|
|
3056
|
-
children: /*#__PURE__*/jsx("circle", {
|
|
3057
|
-
cx: "30",
|
|
3058
|
-
cy: "30",
|
|
3059
|
-
r: "27",
|
|
3060
|
-
fill: "none"
|
|
3061
|
-
})
|
|
3140
|
+
children: /*#__PURE__*/jsx("circle", _objectSpread({}, sharedProps))
|
|
3062
3141
|
})]
|
|
3063
3142
|
})
|
|
3064
3143
|
});
|