@ornikar/kitt-universal 3.9.0 → 4.0.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/AnimatedButtonPressable.web.d.ts +1 -1
- package/dist/definitions/IconButton/IconButton.d.ts +5 -1
- package/dist/definitions/IconButton/IconButton.d.ts.map +1 -1
- package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts +4 -1
- package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts.map +1 -1
- package/dist/definitions/TimePicker/TimePicker.d.ts +1 -1
- package/dist/definitions/TimePicker/TimePicker.d.ts.map +1 -1
- package/dist/definitions/TimePicker/useTimePicker.d.ts +2 -4
- package/dist/definitions/TimePicker/useTimePicker.d.ts.map +1 -1
- package/dist/definitions/forms/InputFeedback/InputFeedback.d.ts +1 -1
- package/dist/definitions/forms/InputFeedback/InputFeedback.d.ts.map +1 -1
- package/dist/definitions/forms/InputIcon/InputIcon.d.ts +9 -0
- package/dist/definitions/forms/InputIcon/InputIcon.d.ts.map +1 -0
- package/dist/definitions/forms/InputPassword/InputPassword.d.ts +7 -0
- package/dist/definitions/forms/InputPassword/InputPassword.d.ts.map +1 -0
- package/dist/definitions/forms/InputPressable/InputPressable.d.ts +6 -0
- package/dist/definitions/forms/InputPressable/InputPressable.d.ts.map +1 -0
- package/dist/definitions/forms/InputText/InputText.d.ts +4 -12
- package/dist/definitions/forms/InputText/InputText.d.ts.map +1 -1
- package/dist/definitions/forms/TextArea/TextArea.d.ts +1 -1
- package/dist/definitions/forms/TextArea/TextArea.d.ts.map +1 -1
- package/dist/definitions/forms/styledTextInputMixin.d.ts +7 -0
- package/dist/definitions/forms/styledTextInputMixin.d.ts.map +1 -0
- package/dist/definitions/forms/utils.d.ts +10 -0
- package/dist/definitions/forms/utils.d.ts.map +1 -0
- package/dist/definitions/index.d.ts +10 -2
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +2 -13
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/forms.d.ts +26 -0
- package/dist/definitions/themes/late-ocean/forms.d.ts.map +1 -0
- package/dist/definitions/themes/late-ocean/input.d.ts +26 -0
- package/dist/definitions/themes/late-ocean/input.d.ts.map +1 -0
- package/dist/definitions/themes/late-ocean/textArea.d.ts +5 -0
- package/dist/definitions/themes/late-ocean/textArea.d.ts.map +1 -0
- package/dist/index-browser-all.es.android.js +330 -291
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +330 -291
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +330 -291
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +328 -295
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +249 -211
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.js +240 -207
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +119 -106
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +119 -106
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +119 -106
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +119 -106
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +115 -102
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +115 -102
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/definitions/forms/InputFormState.d.ts +0 -2
- package/dist/definitions/forms/InputFormState.d.ts.map +0 -1
- package/dist/definitions/forms/InputText/useInputText.d.ts +0 -8
- package/dist/definitions/forms/InputText/useInputText.d.ts.map +0 -1
- package/dist/definitions/themes/late-ocean/formLateOceanTheme.d.ts +0 -37
- package/dist/definitions/themes/late-ocean/formLateOceanTheme.d.ts.map +0 -1
- package/dist/definitions/themes/late-ocean/inputLateOceanTheme.d.ts +0 -23
- package/dist/definitions/themes/late-ocean/inputLateOceanTheme.d.ts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
-
import { UserIcon,
|
|
3
|
+
import { UserIcon, EyeOffIcon, EyeIcon, XIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon } from '@ornikar/kitt-icons';
|
|
4
4
|
export * from '@ornikar/kitt-icons';
|
|
5
|
-
import { Animated, Easing, useWindowDimensions, Image, Platform, Linking,
|
|
5
|
+
import { Animated, Easing, useWindowDimensions, Image, Platform, Linking, Pressable, TextInput, ActivityIndicator, TouchableOpacity, View, StyleSheet, ScrollView, Modal as Modal$1, Text as Text$1 } 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 { useRef, useEffect, cloneElement, useContext, createContext, forwardRef, useMemo, useState, Fragment, Children } from 'react';
|
|
@@ -135,11 +135,11 @@ var KittBreakpointsMax = {
|
|
|
135
135
|
LARGE: KittBreakpoints.WIDE - 1
|
|
136
136
|
};
|
|
137
137
|
|
|
138
|
-
var _excluded$
|
|
138
|
+
var _excluded$e = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
|
|
139
139
|
|
|
140
|
-
function ownKeys$
|
|
140
|
+
function ownKeys$j(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
141
141
|
|
|
142
|
-
function _objectSpread$
|
|
142
|
+
function _objectSpread$j(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$j(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$j(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
143
143
|
var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
|
|
144
144
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
145
145
|
function useTypographyColor() {
|
|
@@ -215,7 +215,7 @@ function Typography(_ref4) {
|
|
|
215
215
|
large = _ref4.large,
|
|
216
216
|
variant = _ref4.variant,
|
|
217
217
|
color = _ref4.color,
|
|
218
|
-
otherProps = _objectWithoutProperties(_ref4, _excluded$
|
|
218
|
+
otherProps = _objectWithoutProperties(_ref4, _excluded$e);
|
|
219
219
|
|
|
220
220
|
var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
|
|
221
221
|
var hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
|
|
@@ -232,14 +232,14 @@ function Typography(_ref4) {
|
|
|
232
232
|
var nonNullableVariant = variant !== null && variant !== void 0 ? variant : isHeader ? 'bold' : 'regular';
|
|
233
233
|
var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
|
|
234
234
|
value: isHeader,
|
|
235
|
-
children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$
|
|
235
|
+
children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$j({
|
|
236
236
|
$color: colorOrDefaultToBlack,
|
|
237
237
|
$isHeader: isHeader,
|
|
238
238
|
$typeForCurrentWindowSize: typeForCurrentWindowSize,
|
|
239
239
|
$variant: nonNullableVariant,
|
|
240
240
|
accessibilityRole: accessibilityRole || undefined
|
|
241
241
|
}, otherProps))
|
|
242
|
-
}) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$
|
|
242
|
+
}) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$j({
|
|
243
243
|
$color: colorOrDefaultToBlack,
|
|
244
244
|
$isHeader: isHeader,
|
|
245
245
|
$variant: nonNullableVariant,
|
|
@@ -252,13 +252,13 @@ function Typography(_ref4) {
|
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
function TypographyText(props) {
|
|
255
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread$
|
|
255
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$j({
|
|
256
256
|
accessibilityRole: null
|
|
257
257
|
}, props));
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
function TypographyParagraph(props) {
|
|
261
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread$
|
|
261
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$j({
|
|
262
262
|
accessibilityRole: "paragraph"
|
|
263
263
|
}, props));
|
|
264
264
|
}
|
|
@@ -266,7 +266,7 @@ function TypographyParagraph(props) {
|
|
|
266
266
|
var createHeading = function (level, defaultBase) {
|
|
267
267
|
// https://github.com/necolas/react-native-web/issues/401
|
|
268
268
|
function TypographyHeading(props) {
|
|
269
|
-
return /*#__PURE__*/jsx(Typography, _objectSpread$
|
|
269
|
+
return /*#__PURE__*/jsx(Typography, _objectSpread$j(_objectSpread$j({
|
|
270
270
|
accessibilityRole: "header",
|
|
271
271
|
base: defaultBase
|
|
272
272
|
}, props), {}, {
|
|
@@ -302,11 +302,11 @@ Typography.h4 = createHeading(4, 'header4');
|
|
|
302
302
|
|
|
303
303
|
Typography.h5 = createHeading(5, 'header5');
|
|
304
304
|
|
|
305
|
-
var _excluded$
|
|
305
|
+
var _excluded$d = ["size", "base", "round", "light"];
|
|
306
306
|
|
|
307
|
-
function ownKeys$
|
|
307
|
+
function ownKeys$i(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
308
308
|
|
|
309
|
-
function _objectSpread$
|
|
309
|
+
function _objectSpread$i(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$i(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$i(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
310
310
|
|
|
311
311
|
var getInitials = function (firstname, lastname) {
|
|
312
312
|
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
@@ -377,13 +377,13 @@ function Avatar(_ref6) {
|
|
|
377
377
|
base = _ref6$base === void 0 ? 'body-small' : _ref6$base,
|
|
378
378
|
round = _ref6.round,
|
|
379
379
|
light = _ref6.light,
|
|
380
|
-
props = _objectWithoutProperties(_ref6, _excluded$
|
|
380
|
+
props = _objectWithoutProperties(_ref6, _excluded$d);
|
|
381
381
|
|
|
382
382
|
return /*#__PURE__*/jsx(StyledAvatarView, {
|
|
383
383
|
$size: size,
|
|
384
384
|
$isRound: round,
|
|
385
385
|
$isLight: light,
|
|
386
|
-
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$
|
|
386
|
+
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$i({
|
|
387
387
|
size: size,
|
|
388
388
|
base: base,
|
|
389
389
|
isLight: light
|
|
@@ -525,26 +525,26 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
|
|
|
525
525
|
return defaultPadding;
|
|
526
526
|
});
|
|
527
527
|
|
|
528
|
-
var _excluded$
|
|
528
|
+
var _excluded$c = ["color"],
|
|
529
529
|
_excluded2$2 = ["color"];
|
|
530
530
|
|
|
531
|
-
function ownKeys$
|
|
531
|
+
function ownKeys$h(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
532
532
|
|
|
533
|
-
function _objectSpread$
|
|
533
|
+
function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$h(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$h(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
534
534
|
|
|
535
535
|
function TypographyIconSpecifiedColor(_ref) {
|
|
536
536
|
var color = _ref.color,
|
|
537
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
537
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
538
538
|
|
|
539
539
|
var theme = /*#__PURE__*/useTheme();
|
|
540
|
-
return /*#__PURE__*/jsx(Icon, _objectSpread$
|
|
540
|
+
return /*#__PURE__*/jsx(Icon, _objectSpread$h(_objectSpread$h({}, props), {}, {
|
|
541
541
|
color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
|
|
542
542
|
}));
|
|
543
543
|
}
|
|
544
544
|
|
|
545
545
|
function TypographyIconInheritColor(props) {
|
|
546
546
|
var color = useTypographyColor();
|
|
547
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$
|
|
547
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$h({
|
|
548
548
|
color: color
|
|
549
549
|
}, props));
|
|
550
550
|
}
|
|
@@ -554,23 +554,23 @@ function TypographyIcon(_ref2) {
|
|
|
554
554
|
props = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
555
555
|
|
|
556
556
|
if (color) {
|
|
557
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$
|
|
557
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$h({
|
|
558
558
|
color: color
|
|
559
559
|
}, props));
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
-
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$
|
|
562
|
+
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$h({}, props));
|
|
563
563
|
}
|
|
564
564
|
|
|
565
565
|
function isSubtle(type) {
|
|
566
566
|
return type.startsWith('subtle');
|
|
567
567
|
}
|
|
568
568
|
|
|
569
|
-
var _excluded$
|
|
569
|
+
var _excluded$b = ["type", "isDisabled", "$isStretch", "icon", "children"];
|
|
570
570
|
|
|
571
|
-
function ownKeys$
|
|
571
|
+
function ownKeys$g(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
572
572
|
|
|
573
|
-
function _objectSpread$
|
|
573
|
+
function _objectSpread$g(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$g(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$g(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
574
574
|
|
|
575
575
|
var getTextColorByType = function (type) {
|
|
576
576
|
switch (type) {
|
|
@@ -676,7 +676,7 @@ function ButtonContentChildren(_ref4) {
|
|
|
676
676
|
color: isWebSubtle ? 'inherit' : color
|
|
677
677
|
};
|
|
678
678
|
return /*#__PURE__*/jsxs(StyledChildrenWithIcon, {
|
|
679
|
-
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$
|
|
679
|
+
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$g(_objectSpread$g({}, buttonIconSharedProps), {}, {
|
|
680
680
|
testID: "button-left-icon",
|
|
681
681
|
icon: icon
|
|
682
682
|
})) : null, /*#__PURE__*/jsx(StyledButtonText, {
|
|
@@ -687,7 +687,7 @@ function ButtonContentChildren(_ref4) {
|
|
|
687
687
|
,
|
|
688
688
|
color: isWebSubtle ? undefined : color,
|
|
689
689
|
children: children
|
|
690
|
-
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$
|
|
690
|
+
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$g(_objectSpread$g({}, buttonIconSharedProps), {}, {
|
|
691
691
|
icon: icon
|
|
692
692
|
})) : null]
|
|
693
693
|
});
|
|
@@ -713,14 +713,14 @@ function ButtonContent(_ref7) {
|
|
|
713
713
|
$isStretch = _ref7.$isStretch,
|
|
714
714
|
icon = _ref7.icon,
|
|
715
715
|
children = _ref7.children,
|
|
716
|
-
props = _objectWithoutProperties(_ref7, _excluded$
|
|
716
|
+
props = _objectWithoutProperties(_ref7, _excluded$b);
|
|
717
717
|
|
|
718
718
|
var color = isDisabled ? 'black-light' : getTextColorByType(type);
|
|
719
719
|
return /*#__PURE__*/jsx(ButtonContentContainer, {
|
|
720
720
|
$isSubtle: isSubtle(type),
|
|
721
721
|
$isStretch: $isStretch,
|
|
722
722
|
$isIconOnly: Boolean(!children && icon),
|
|
723
|
-
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread$
|
|
723
|
+
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread$g(_objectSpread$g({
|
|
724
724
|
icon: icon,
|
|
725
725
|
type: type,
|
|
726
726
|
isDisabled: isDisabled,
|
|
@@ -789,7 +789,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
789
789
|
});
|
|
790
790
|
});
|
|
791
791
|
|
|
792
|
-
var Container$
|
|
792
|
+
var Container$6 = /*#__PURE__*/styled.View.withConfig({
|
|
793
793
|
displayName: "Card__Container"
|
|
794
794
|
})(["background-color:", ";padding:", ";border-radius:", ";border-width:", ";border-color:", ";"], function (_ref) {
|
|
795
795
|
var theme = _ref.theme,
|
|
@@ -812,7 +812,7 @@ var Container$7 = /*#__PURE__*/styled.View.withConfig({
|
|
|
812
812
|
function Card(_ref6) {
|
|
813
813
|
var children = _ref6.children,
|
|
814
814
|
type = _ref6.type;
|
|
815
|
-
return /*#__PURE__*/jsx(Container$
|
|
815
|
+
return /*#__PURE__*/jsx(Container$6, {
|
|
816
816
|
type: type,
|
|
817
817
|
children: children
|
|
818
818
|
});
|
|
@@ -857,20 +857,20 @@ var defaultOpenLinkBehavior = {
|
|
|
857
857
|
web: 'targetBlank'
|
|
858
858
|
};
|
|
859
859
|
|
|
860
|
-
var _excluded$
|
|
860
|
+
var _excluded$a = ["as", "href", "openLinkBehavior", "onPress"];
|
|
861
861
|
|
|
862
|
-
function ownKeys$
|
|
862
|
+
function ownKeys$f(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
863
863
|
|
|
864
|
-
function _objectSpread$
|
|
864
|
+
function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$f(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$f(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
865
865
|
function ExternalLink(_ref) {
|
|
866
866
|
var Component = _ref.as,
|
|
867
867
|
href = _ref.href,
|
|
868
868
|
_ref$openLinkBehavior = _ref.openLinkBehavior,
|
|
869
869
|
openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
|
|
870
870
|
onPress = _ref.onPress,
|
|
871
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
871
|
+
rest = _objectWithoutProperties(_ref, _excluded$a);
|
|
872
872
|
|
|
873
|
-
return /*#__PURE__*/jsx(Component, _objectSpread$
|
|
873
|
+
return /*#__PURE__*/jsx(Component, _objectSpread$f(_objectSpread$f({}, rest), {}, {
|
|
874
874
|
onPress: function handleOnPress() {
|
|
875
875
|
if (onPress) onPress();
|
|
876
876
|
if (!href) return;
|
|
@@ -904,6 +904,7 @@ var getColorFromState = function (state) {
|
|
|
904
904
|
case 'invalid':
|
|
905
905
|
return 'danger';
|
|
906
906
|
|
|
907
|
+
case 'valid':
|
|
907
908
|
default:
|
|
908
909
|
return 'black-light';
|
|
909
910
|
}
|
|
@@ -960,43 +961,47 @@ function InputField(_ref4) {
|
|
|
960
961
|
});
|
|
961
962
|
}
|
|
962
963
|
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
966
|
-
isFocused = _useState2[0],
|
|
967
|
-
setIsFocused = _useState2[1];
|
|
964
|
+
function getIconColor(state, disabled) {
|
|
965
|
+
if (disabled) return 'black-light';
|
|
968
966
|
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
setIsPasswordVisible = _useState4[1];
|
|
967
|
+
switch (state) {
|
|
968
|
+
case 'invalid':
|
|
969
|
+
return 'danger';
|
|
973
970
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
handleInputFocus: function handleInputFocus() {
|
|
977
|
-
return setIsFocused(true);
|
|
978
|
-
},
|
|
979
|
-
handleInputBlur: function handleInputBlur() {
|
|
980
|
-
return setIsFocused(false);
|
|
981
|
-
},
|
|
982
|
-
togglePasswordVisibility: function togglePasswordVisibility() {
|
|
983
|
-
return setIsPasswordVisible(function (isVisible) {
|
|
984
|
-
return !isVisible;
|
|
985
|
-
});
|
|
986
|
-
},
|
|
987
|
-
isPasswordVisible: isPasswordVisible
|
|
988
|
-
};
|
|
989
|
-
};
|
|
971
|
+
case 'valid':
|
|
972
|
+
return 'success';
|
|
990
973
|
|
|
991
|
-
|
|
974
|
+
default:
|
|
975
|
+
return undefined;
|
|
976
|
+
}
|
|
977
|
+
}
|
|
992
978
|
|
|
993
|
-
function
|
|
979
|
+
function InputIcon(_ref) {
|
|
980
|
+
var icon = _ref.icon,
|
|
981
|
+
state = _ref.state,
|
|
982
|
+
disabled = _ref.disabled;
|
|
983
|
+
var theme = /*#__PURE__*/useTheme();
|
|
984
|
+
var color = getIconColor(state, disabled);
|
|
985
|
+
return /*#__PURE__*/jsx(TypographyIcon, {
|
|
986
|
+
color: color,
|
|
987
|
+
icon: icon,
|
|
988
|
+
size: theme.kitt.forms.input.icon.size
|
|
989
|
+
});
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
function ownKeys$e(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
993
|
+
|
|
994
|
+
function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$e(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$e(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
995
|
+
function InputPressable(_ref) {
|
|
996
|
+
var props = _extends({}, _ref);
|
|
997
|
+
|
|
998
|
+
return /*#__PURE__*/jsx(Pressable, _objectSpread$e({}, props));
|
|
999
|
+
}
|
|
994
1000
|
|
|
995
|
-
function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$c(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$c(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
996
1001
|
var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width:", ";border-radius:", ";border-color:", ";font-size:", ";color:", ";font-family:", ";"], function (_ref) {
|
|
997
1002
|
var theme = _ref.theme,
|
|
998
|
-
state = _ref
|
|
999
|
-
return state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states["default"].backgroundColor;
|
|
1003
|
+
$state = _ref.$state;
|
|
1004
|
+
return $state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states["default"].backgroundColor;
|
|
1000
1005
|
}, function (_ref2) {
|
|
1001
1006
|
var theme = _ref2.theme;
|
|
1002
1007
|
return theme.kitt.forms.input.borderWidth;
|
|
@@ -1005,147 +1010,158 @@ var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width
|
|
|
1005
1010
|
return theme.kitt.forms.input.borderRadius;
|
|
1006
1011
|
}, function (_ref4) {
|
|
1007
1012
|
var theme = _ref4.theme,
|
|
1008
|
-
state = _ref4
|
|
1009
|
-
return theme.kitt.forms.input.states[state].borderColor;
|
|
1013
|
+
$state = _ref4.$state;
|
|
1014
|
+
return theme.kitt.forms.input.states[$state].borderColor;
|
|
1010
1015
|
}, function (_ref5) {
|
|
1011
1016
|
var theme = _ref5.theme;
|
|
1012
1017
|
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
1013
1018
|
return theme.kitt.typography.types.bodies.configs.body[typeConfigKey].fontSize;
|
|
1014
1019
|
}, function (_ref6) {
|
|
1015
1020
|
var theme = _ref6.theme,
|
|
1016
|
-
state = _ref6
|
|
1017
|
-
return theme.kitt.typography.colors[theme.kitt.forms.input.states[state].color];
|
|
1021
|
+
$state = _ref6.$state;
|
|
1022
|
+
return theme.kitt.typography.colors[theme.kitt.forms.input.states[$state].color];
|
|
1018
1023
|
}, function (_ref7) {
|
|
1019
1024
|
var theme = _ref7.theme;
|
|
1020
1025
|
return theme.kitt.typography.types.bodies.fontFamily.regular;
|
|
1021
1026
|
});
|
|
1022
|
-
var Input = /*#__PURE__*/styled(TextInput).withConfig({
|
|
1023
|
-
displayName: "InputText__Input"
|
|
1024
|
-
})(["", " padding:", ";line-height:", ";min-height:", "px;"], styledTextInputMixin, function (_ref8) {
|
|
1025
|
-
var theme = _ref8.theme,
|
|
1026
|
-
multiline = _ref8.multiline;
|
|
1027
|
-
return !multiline && Platform.OS === 'ios' ? theme.kitt.forms.input.paddingSingleLineIOS : theme.kitt.forms.input.padding;
|
|
1028
|
-
}, function (_ref9) {
|
|
1029
|
-
var theme = _ref9.theme,
|
|
1030
|
-
multiline = _ref9.multiline;
|
|
1031
|
-
if (!multiline && Platform.OS === 'ios') return 0;
|
|
1032
|
-
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
1033
|
-
return theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight;
|
|
1034
|
-
}, function (_ref10) {
|
|
1035
|
-
var minHeight = _ref10.minHeight;
|
|
1036
|
-
return minHeight;
|
|
1037
|
-
});
|
|
1038
|
-
var Container$6 = /*#__PURE__*/styled.View.withConfig({
|
|
1039
|
-
displayName: "InputText__Container"
|
|
1040
|
-
})(["margin-top:", ";margin-bottom:", ";"], function (_ref11) {
|
|
1041
|
-
var theme = _ref11.theme;
|
|
1042
|
-
return theme.kitt.forms.input.marginTop;
|
|
1043
|
-
}, function (_ref12) {
|
|
1044
|
-
var theme = _ref12.theme;
|
|
1045
|
-
return theme.kitt.forms.input.marginBottom;
|
|
1046
|
-
});
|
|
1047
|
-
var PasswordButtonContainer = /*#__PURE__*/styled.Pressable.withConfig({
|
|
1048
|
-
displayName: "InputText__PasswordButtonContainer"
|
|
1049
|
-
})(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:", "px;"], function (_ref13) {
|
|
1050
|
-
var theme = _ref13.theme;
|
|
1051
|
-
return theme.kitt.forms.input.passwordButtonIconSize / 2;
|
|
1052
|
-
});
|
|
1053
1027
|
|
|
1054
|
-
|
|
1055
|
-
var
|
|
1056
|
-
|
|
1057
|
-
formState =
|
|
1028
|
+
function getInputUIState(_ref) {
|
|
1029
|
+
var isFocused = _ref.isFocused,
|
|
1030
|
+
isDisabled = _ref.isDisabled,
|
|
1031
|
+
formState = _ref.formState;
|
|
1058
1032
|
if (isDisabled) return 'disabled';
|
|
1059
1033
|
if (isFocused) return 'focus';
|
|
1060
1034
|
if (formState === 'invalid') return 'invalid';
|
|
1061
1035
|
return 'default';
|
|
1062
|
-
}
|
|
1036
|
+
}
|
|
1063
1037
|
|
|
1064
|
-
var
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1038
|
+
var _excluded$9 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoCompleteType", "keyboardType", "onFocus", "onBlur"];
|
|
1039
|
+
|
|
1040
|
+
function ownKeys$d(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1041
|
+
|
|
1042
|
+
function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$d(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$d(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1043
|
+
var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
|
|
1044
|
+
displayName: "InputText__StyledTextInput"
|
|
1045
|
+
})(["", " padding:", ";line-height:", ";min-height:", "px;"], styledTextInputMixin, function (_ref) {
|
|
1046
|
+
var theme = _ref.theme,
|
|
1047
|
+
multiline = _ref.multiline;
|
|
1048
|
+
|
|
1049
|
+
if (!multiline && Platform.OS === 'ios') {
|
|
1050
|
+
return theme.kitt.forms.input.padding.iOSSingleLine;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
return theme.kitt.forms.input.padding["default"];
|
|
1054
|
+
}, function (_ref2) {
|
|
1055
|
+
var theme = _ref2.theme,
|
|
1056
|
+
multiline = _ref2.multiline;
|
|
1057
|
+
if (!multiline && Platform.OS === 'ios') return 0;
|
|
1058
|
+
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
1059
|
+
return theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight;
|
|
1060
|
+
}, function (_ref3) {
|
|
1061
|
+
var $minHeight = _ref3.$minHeight;
|
|
1062
|
+
return $minHeight;
|
|
1063
|
+
});
|
|
1064
|
+
var InputTextContainer = /*#__PURE__*/styled.View.withConfig({
|
|
1065
|
+
displayName: "InputText__InputTextContainer"
|
|
1066
|
+
})(["position:relative;"]);
|
|
1067
|
+
var RightInputContainer = /*#__PURE__*/styled.View.withConfig({
|
|
1068
|
+
displayName: "InputText__RightInputContainer"
|
|
1069
|
+
})(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:10px;"]);
|
|
1070
|
+
var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
1071
|
+
var id = _ref4.id,
|
|
1072
|
+
right = _ref4.right,
|
|
1073
|
+
_ref4$minHeight = _ref4.minHeight,
|
|
1074
|
+
minHeight = _ref4$minHeight === void 0 ? 0 : _ref4$minHeight,
|
|
1075
|
+
formState = _ref4.state,
|
|
1076
|
+
internalForceState = _ref4.internalForceState,
|
|
1077
|
+
_ref4$disabled = _ref4.disabled,
|
|
1078
|
+
disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,
|
|
1079
|
+
_ref4$autoCorrect = _ref4.autoCorrect,
|
|
1080
|
+
autoCorrect = _ref4$autoCorrect === void 0 ? true : _ref4$autoCorrect,
|
|
1081
|
+
_ref4$textContentType = _ref4.textContentType,
|
|
1082
|
+
textContentType = _ref4$textContentType === void 0 ? 'none' : _ref4$textContentType,
|
|
1083
|
+
_ref4$autoCompleteTyp = _ref4.autoCompleteType,
|
|
1084
|
+
autoCompleteType = _ref4$autoCompleteTyp === void 0 ? 'off' : _ref4$autoCompleteTyp,
|
|
1085
|
+
_ref4$keyboardType = _ref4.keyboardType,
|
|
1086
|
+
keyboardType = _ref4$keyboardType === void 0 ? 'default' : _ref4$keyboardType,
|
|
1087
|
+
_onFocus = _ref4.onFocus,
|
|
1088
|
+
_onBlur = _ref4.onBlur,
|
|
1089
|
+
props = _objectWithoutProperties(_ref4, _excluded$9);
|
|
1107
1090
|
|
|
1108
1091
|
var theme = /*#__PURE__*/useTheme();
|
|
1109
|
-
|
|
1092
|
+
|
|
1093
|
+
var _useState = useState(false),
|
|
1094
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1095
|
+
isFocused = _useState2[0],
|
|
1096
|
+
setIsFocused = _useState2[1];
|
|
1097
|
+
|
|
1098
|
+
var state = internalForceState || getInputUIState({
|
|
1110
1099
|
isFocused: isFocused,
|
|
1111
1100
|
isDisabled: disabled,
|
|
1112
1101
|
formState: formState
|
|
1113
1102
|
});
|
|
1114
|
-
return /*#__PURE__*/jsxs(
|
|
1115
|
-
children: [/*#__PURE__*/jsx(
|
|
1103
|
+
return /*#__PURE__*/jsxs(InputTextContainer, {
|
|
1104
|
+
children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread$d(_objectSpread$d({
|
|
1116
1105
|
ref: ref,
|
|
1117
1106
|
nativeID: id,
|
|
1118
1107
|
editable: !disabled,
|
|
1119
|
-
keyboardType:
|
|
1120
|
-
autoCompleteType:
|
|
1121
|
-
autoCorrect:
|
|
1122
|
-
minHeight: minHeight,
|
|
1123
|
-
textContentType:
|
|
1124
|
-
placeholderTextColor: theme.kitt.
|
|
1125
|
-
selectionColor: theme.kitt.forms.input.
|
|
1126
|
-
secureTextEntry: type === 'password' && !isPasswordVisible
|
|
1108
|
+
keyboardType: keyboardType,
|
|
1109
|
+
autoCompleteType: autoCompleteType,
|
|
1110
|
+
autoCorrect: autoCorrect,
|
|
1111
|
+
$minHeight: minHeight,
|
|
1112
|
+
textContentType: textContentType,
|
|
1113
|
+
placeholderTextColor: theme.kitt.forms.input.color.placeholder,
|
|
1114
|
+
selectionColor: theme.kitt.forms.input.color.selection
|
|
1127
1115
|
}, props), {}, {
|
|
1128
|
-
state: state,
|
|
1116
|
+
$state: state,
|
|
1129
1117
|
onFocus: function onFocus(e) {
|
|
1130
|
-
|
|
1118
|
+
setIsFocused(true);
|
|
1131
1119
|
if (_onFocus) _onFocus(e);
|
|
1132
1120
|
},
|
|
1133
1121
|
onBlur: function onBlur(e) {
|
|
1134
|
-
|
|
1122
|
+
setIsFocused(false);
|
|
1135
1123
|
if (_onBlur) _onBlur(e);
|
|
1136
1124
|
}
|
|
1137
|
-
})),
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
1141
|
-
icon: isPasswordVisible ? /*#__PURE__*/jsx(EyeIcon, {}) : /*#__PURE__*/jsx(EyeOffIcon, {}),
|
|
1142
|
-
size: theme.kitt.forms.input.passwordButtonIconSize,
|
|
1143
|
-
color: theme.kitt.forms.input.states[state].passwordButtonIconColor
|
|
1144
|
-
})
|
|
1145
|
-
})]
|
|
1125
|
+
})), right ? /*#__PURE__*/jsx(RightInputContainer, {
|
|
1126
|
+
children: right
|
|
1127
|
+
}) : null]
|
|
1146
1128
|
});
|
|
1147
1129
|
});
|
|
1148
1130
|
|
|
1131
|
+
var _excluded$8 = ["isPasswordDefaultVisible", "right"];
|
|
1132
|
+
|
|
1133
|
+
function ownKeys$c(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1134
|
+
|
|
1135
|
+
function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$c(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$c(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1136
|
+
function InputPassword(_ref) {
|
|
1137
|
+
var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
|
|
1138
|
+
right = _ref.right,
|
|
1139
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
1140
|
+
|
|
1141
|
+
var _useState = useState(Boolean(isPasswordDefaultVisible)),
|
|
1142
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1143
|
+
isVisible = _useState2[0],
|
|
1144
|
+
setIsVisible = _useState2[1];
|
|
1145
|
+
|
|
1146
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$c(_objectSpread$c({}, props), {}, {
|
|
1147
|
+
textContentType: "password",
|
|
1148
|
+
autoCompleteType: "password",
|
|
1149
|
+
autoCorrect: false,
|
|
1150
|
+
secureTextEntry: !isVisible,
|
|
1151
|
+
right: right || /*#__PURE__*/jsx(InputPressable, {
|
|
1152
|
+
accessibilityRole: "button",
|
|
1153
|
+
onPress: function onPress() {
|
|
1154
|
+
return setIsVisible(function (prev) {
|
|
1155
|
+
return !prev;
|
|
1156
|
+
});
|
|
1157
|
+
},
|
|
1158
|
+
children: /*#__PURE__*/jsx(InputIcon, {
|
|
1159
|
+
icon: isVisible ? /*#__PURE__*/jsx(EyeOffIcon, {}) : /*#__PURE__*/jsx(EyeIcon, {})
|
|
1160
|
+
})
|
|
1161
|
+
})
|
|
1162
|
+
}));
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1149
1165
|
function Label(_ref) {
|
|
1150
1166
|
var htmlFor = _ref.htmlFor,
|
|
1151
1167
|
children = _ref.children;
|
|
@@ -1256,13 +1272,11 @@ function TextArea(_ref) {
|
|
|
1256
1272
|
var props = _extends({}, _ref);
|
|
1257
1273
|
|
|
1258
1274
|
var theme = /*#__PURE__*/useTheme();
|
|
1259
|
-
return /*#__PURE__*/jsx(InputText, _objectSpread$b(
|
|
1275
|
+
return /*#__PURE__*/jsx(InputText, _objectSpread$b({
|
|
1260
1276
|
multiline: true,
|
|
1261
|
-
textAlignVertical: "top"
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
minHeight: theme.kitt.forms.input.textAreaMinHeight
|
|
1265
|
-
}));
|
|
1277
|
+
textAlignVertical: "top",
|
|
1278
|
+
minHeight: theme.kitt.forms.textArea.minHeight
|
|
1279
|
+
}, props));
|
|
1266
1280
|
}
|
|
1267
1281
|
|
|
1268
1282
|
var Body = /*#__PURE__*/styled.View.withConfig({
|
|
@@ -1516,6 +1530,10 @@ function PressableAnimatedContainer(_ref5) {
|
|
|
1516
1530
|
var disabled = _ref5.disabled,
|
|
1517
1531
|
_ref5$color = _ref5.color,
|
|
1518
1532
|
color = _ref5$color === void 0 ? 'black' : _ref5$color,
|
|
1533
|
+
testID = _ref5.testID,
|
|
1534
|
+
_ref5$accessibilityRo = _ref5.accessibilityRole,
|
|
1535
|
+
accessibilityRole = _ref5$accessibilityRo === void 0 ? 'button' : _ref5$accessibilityRo,
|
|
1536
|
+
accessibilityLabel = _ref5.accessibilityLabel,
|
|
1519
1537
|
children = _ref5.children,
|
|
1520
1538
|
onPress = _ref5.onPress;
|
|
1521
1539
|
var theme = /*#__PURE__*/useTheme();
|
|
@@ -1533,7 +1551,7 @@ function PressableAnimatedContainer(_ref5) {
|
|
|
1533
1551
|
};
|
|
1534
1552
|
_f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
|
|
1535
1553
|
_f.__workletHash = 10645190329247;
|
|
1536
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (
|
|
1554
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (60:41)";
|
|
1537
1555
|
_f.__optimalization = 2;
|
|
1538
1556
|
|
|
1539
1557
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -1567,7 +1585,7 @@ function PressableAnimatedContainer(_ref5) {
|
|
|
1567
1585
|
};
|
|
1568
1586
|
_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)}]};}}";
|
|
1569
1587
|
_f.__workletHash = 13861998831411;
|
|
1570
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (
|
|
1588
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (66:39)";
|
|
1571
1589
|
_f.__optimalization = 2;
|
|
1572
1590
|
|
|
1573
1591
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -1575,9 +1593,11 @@ function PressableAnimatedContainer(_ref5) {
|
|
|
1575
1593
|
return _f;
|
|
1576
1594
|
}());
|
|
1577
1595
|
return /*#__PURE__*/jsx(PressableIconButton, {
|
|
1578
|
-
accessibilityRole:
|
|
1596
|
+
accessibilityRole: accessibilityRole,
|
|
1579
1597
|
disabled: disabled,
|
|
1580
1598
|
color: color,
|
|
1599
|
+
testID: testID,
|
|
1600
|
+
accessibilityLabel: accessibilityLabel,
|
|
1581
1601
|
onPress: onPress,
|
|
1582
1602
|
onPressIn: function onPressIn() {
|
|
1583
1603
|
pressed.value = true;
|
|
@@ -1639,10 +1659,16 @@ function IconButton(_ref7) {
|
|
|
1639
1659
|
var icon = _ref7.icon,
|
|
1640
1660
|
color = _ref7.color,
|
|
1641
1661
|
disabled = _ref7.disabled,
|
|
1662
|
+
testID = _ref7.testID,
|
|
1663
|
+
accessibilityLabel = _ref7.accessibilityLabel,
|
|
1664
|
+
accessibilityRole = _ref7.accessibilityRole,
|
|
1642
1665
|
onPress = _ref7.onPress;
|
|
1643
1666
|
return /*#__PURE__*/jsx(PressableAnimatedContainer, {
|
|
1644
1667
|
color: color,
|
|
1645
1668
|
disabled: disabled,
|
|
1669
|
+
testID: testID,
|
|
1670
|
+
accessibilityLabel: accessibilityLabel,
|
|
1671
|
+
accessibilityRole: accessibilityRole,
|
|
1646
1672
|
onPress: onPress,
|
|
1647
1673
|
children: /*#__PURE__*/jsx(IconButtonContent, {
|
|
1648
1674
|
disabled: disabled,
|
|
@@ -2799,54 +2825,137 @@ var feedbackMessageLateOceanTheme = {
|
|
|
2799
2825
|
}
|
|
2800
2826
|
};
|
|
2801
2827
|
|
|
2802
|
-
var
|
|
2803
|
-
|
|
2804
|
-
|
|
2828
|
+
var calcLineHeight = function (fontSize, lineHeightMultiplier) {
|
|
2829
|
+
return Math.round(fontSize * lineHeightMultiplier);
|
|
2830
|
+
};
|
|
2831
|
+
var createTypographyTypeConfig = function (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) {
|
|
2832
|
+
return {
|
|
2833
|
+
baseAndSmall: {
|
|
2834
|
+
fontSize: "".concat(baseAndSmallFontSize, "px"),
|
|
2835
|
+
lineHeight: "".concat(calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier), "px")
|
|
2836
|
+
},
|
|
2837
|
+
mediumAndWide: {
|
|
2838
|
+
fontSize: "".concat(mediumAndWideFontSize, "px"),
|
|
2839
|
+
lineHeight: "".concat(calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier), "px")
|
|
2840
|
+
}
|
|
2841
|
+
};
|
|
2842
|
+
};
|
|
2843
|
+
var typographyLateOceanTheme = {
|
|
2844
|
+
colors: {
|
|
2845
|
+
black: lateOceanColorPalette.black1000,
|
|
2846
|
+
'black-light': lateOceanColorPalette.black555,
|
|
2847
|
+
white: lateOceanColorPalette.white,
|
|
2848
|
+
'white-light': lateOceanColorPalette.white,
|
|
2849
|
+
primary: lateOceanColorPalette.lateOcean,
|
|
2850
|
+
'primary-light': lateOceanColorPalette.lateOceanLight1,
|
|
2851
|
+
accent: lateOceanColorPalette.warmEmbrace,
|
|
2852
|
+
success: lateOceanColorPalette.viride,
|
|
2853
|
+
danger: lateOceanColorPalette.englishVermillon
|
|
2854
|
+
},
|
|
2855
|
+
types: {
|
|
2856
|
+
headers: {
|
|
2857
|
+
fontFamily: {
|
|
2858
|
+
regular: Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold',
|
|
2859
|
+
bold: Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold'
|
|
2860
|
+
},
|
|
2861
|
+
fontWeight: 400,
|
|
2862
|
+
fontStyle: 'normal',
|
|
2863
|
+
configs: {
|
|
2864
|
+
// also known as xxlarge
|
|
2865
|
+
header1: createTypographyTypeConfig(1.3, 38, 62),
|
|
2866
|
+
// also known as xlarge
|
|
2867
|
+
header2: createTypographyTypeConfig(1.3, 32, 48),
|
|
2868
|
+
// also known as medium
|
|
2869
|
+
header3: createTypographyTypeConfig(1.3, 24, 36),
|
|
2870
|
+
// also known as xsmall
|
|
2871
|
+
header4: createTypographyTypeConfig(1.3, 18, 24),
|
|
2872
|
+
// also known as xxsmall
|
|
2873
|
+
header5: createTypographyTypeConfig(1.3, 18, 18)
|
|
2874
|
+
}
|
|
2875
|
+
},
|
|
2876
|
+
bodies: {
|
|
2877
|
+
fontFamily: {
|
|
2878
|
+
regular: Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans',
|
|
2879
|
+
bold: Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans-Bold'
|
|
2880
|
+
},
|
|
2881
|
+
fontWeight: {
|
|
2882
|
+
regular: 400,
|
|
2883
|
+
bold: 700
|
|
2884
|
+
},
|
|
2885
|
+
fontStyle: {
|
|
2886
|
+
regular: 'normal',
|
|
2887
|
+
bold: 'normal'
|
|
2888
|
+
},
|
|
2889
|
+
configs: {
|
|
2890
|
+
'body-large': createTypographyTypeConfig(1.6, 18, 24),
|
|
2891
|
+
'body-medium': createTypographyTypeConfig(1.6, 18, 18),
|
|
2892
|
+
body: createTypographyTypeConfig(1.6, 16, 16),
|
|
2893
|
+
'body-small': createTypographyTypeConfig(1.6, 14, 14),
|
|
2894
|
+
'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2897
|
+
},
|
|
2898
|
+
link: {
|
|
2899
|
+
disabledColor: lateOceanColorPalette.black200
|
|
2900
|
+
}
|
|
2805
2901
|
};
|
|
2806
2902
|
|
|
2807
2903
|
var inputStatesStyle = {
|
|
2808
2904
|
"default": {
|
|
2809
|
-
backgroundColor:
|
|
2905
|
+
backgroundColor: colorsLateOceanTheme.uiBackgroundLight,
|
|
2906
|
+
borderColor: colorsLateOceanTheme.separator,
|
|
2907
|
+
color: 'black'
|
|
2908
|
+
},
|
|
2909
|
+
pending: {
|
|
2910
|
+
backgroundColor: colorsLateOceanTheme.uiBackgroundLight,
|
|
2911
|
+
borderColor: colorsLateOceanTheme.separator,
|
|
2912
|
+
color: 'black'
|
|
2913
|
+
},
|
|
2914
|
+
valid: {
|
|
2915
|
+
backgroundColor: colorsLateOceanTheme.uiBackgroundLight,
|
|
2810
2916
|
borderColor: lateOceanColorPalette.black100,
|
|
2811
|
-
color: 'black'
|
|
2812
|
-
passwordButtonIconColor: 'black'
|
|
2917
|
+
color: 'black'
|
|
2813
2918
|
},
|
|
2814
2919
|
hover: {
|
|
2815
2920
|
borderColor: lateOceanColorPalette.black200,
|
|
2816
|
-
color: 'black'
|
|
2817
|
-
passwordButtonIconColor: 'black'
|
|
2921
|
+
color: 'black'
|
|
2818
2922
|
},
|
|
2819
2923
|
focus: {
|
|
2820
|
-
borderColor:
|
|
2821
|
-
color: 'black'
|
|
2822
|
-
passwordButtonIconColor: 'black'
|
|
2924
|
+
borderColor: colorsLateOceanTheme.primary,
|
|
2925
|
+
color: 'black'
|
|
2823
2926
|
},
|
|
2824
2927
|
disabled: {
|
|
2825
|
-
backgroundColor:
|
|
2826
|
-
borderColor:
|
|
2827
|
-
color: 'black-light'
|
|
2828
|
-
passwordButtonIconColor: 'black-light'
|
|
2928
|
+
backgroundColor: colorsLateOceanTheme.disabled,
|
|
2929
|
+
borderColor: colorsLateOceanTheme.separator,
|
|
2930
|
+
color: 'black-light'
|
|
2829
2931
|
},
|
|
2830
2932
|
invalid: {
|
|
2831
|
-
borderColor:
|
|
2832
|
-
color: 'black'
|
|
2833
|
-
passwordButtonIconColor: 'black'
|
|
2933
|
+
borderColor: colorsLateOceanTheme.danger,
|
|
2934
|
+
color: 'black'
|
|
2834
2935
|
}
|
|
2835
2936
|
};
|
|
2836
|
-
var
|
|
2837
|
-
|
|
2838
|
-
|
|
2937
|
+
var input = {
|
|
2938
|
+
color: {
|
|
2939
|
+
selection: colorsLateOceanTheme.primary,
|
|
2940
|
+
placeholder: typographyLateOceanTheme.colors['black-light']
|
|
2941
|
+
},
|
|
2839
2942
|
borderWidth: '2px',
|
|
2840
2943
|
borderRadius: '10px',
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2944
|
+
icon: {
|
|
2945
|
+
size: 20
|
|
2946
|
+
},
|
|
2947
|
+
padding: {
|
|
2948
|
+
"default": '7px 16px',
|
|
2949
|
+
iOSSingleLine: '12px 16px'
|
|
2950
|
+
},
|
|
2847
2951
|
states: inputStatesStyle
|
|
2848
2952
|
};
|
|
2849
2953
|
|
|
2954
|
+
var inputFieldLateOceanTheme = {
|
|
2955
|
+
labelContainerPaddingBottom: 5,
|
|
2956
|
+
iconMarginLeft: 6
|
|
2957
|
+
};
|
|
2958
|
+
|
|
2850
2959
|
var radioLateOceanTheme = {
|
|
2851
2960
|
size: 18,
|
|
2852
2961
|
unchecked: {
|
|
@@ -2865,10 +2974,15 @@ var radioLateOceanTheme = {
|
|
|
2865
2974
|
}
|
|
2866
2975
|
};
|
|
2867
2976
|
|
|
2868
|
-
var
|
|
2869
|
-
|
|
2977
|
+
var textArea = {
|
|
2978
|
+
minHeight: 120
|
|
2979
|
+
};
|
|
2980
|
+
|
|
2981
|
+
var forms = {
|
|
2982
|
+
input: input,
|
|
2870
2983
|
radio: radioLateOceanTheme,
|
|
2871
|
-
inputField: inputFieldLateOceanTheme
|
|
2984
|
+
inputField: inputFieldLateOceanTheme,
|
|
2985
|
+
textArea: textArea
|
|
2872
2986
|
};
|
|
2873
2987
|
|
|
2874
2988
|
var fullScreenModalLateOceanTheme = {
|
|
@@ -2981,81 +3095,6 @@ var tooltip = {
|
|
|
2981
3095
|
floatingPadding: 8
|
|
2982
3096
|
};
|
|
2983
3097
|
|
|
2984
|
-
var calcLineHeight = function (fontSize, lineHeightMultiplier) {
|
|
2985
|
-
return Math.round(fontSize * lineHeightMultiplier);
|
|
2986
|
-
};
|
|
2987
|
-
var createTypographyTypeConfig = function (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) {
|
|
2988
|
-
return {
|
|
2989
|
-
baseAndSmall: {
|
|
2990
|
-
fontSize: "".concat(baseAndSmallFontSize, "px"),
|
|
2991
|
-
lineHeight: "".concat(calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier), "px")
|
|
2992
|
-
},
|
|
2993
|
-
mediumAndWide: {
|
|
2994
|
-
fontSize: "".concat(mediumAndWideFontSize, "px"),
|
|
2995
|
-
lineHeight: "".concat(calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier), "px")
|
|
2996
|
-
}
|
|
2997
|
-
};
|
|
2998
|
-
};
|
|
2999
|
-
var typographyLateOceanTheme = {
|
|
3000
|
-
colors: {
|
|
3001
|
-
black: lateOceanColorPalette.black1000,
|
|
3002
|
-
'black-light': lateOceanColorPalette.black555,
|
|
3003
|
-
white: lateOceanColorPalette.white,
|
|
3004
|
-
'white-light': lateOceanColorPalette.white,
|
|
3005
|
-
primary: lateOceanColorPalette.lateOcean,
|
|
3006
|
-
'primary-light': lateOceanColorPalette.lateOceanLight1,
|
|
3007
|
-
accent: lateOceanColorPalette.warmEmbrace,
|
|
3008
|
-
success: lateOceanColorPalette.viride,
|
|
3009
|
-
danger: lateOceanColorPalette.englishVermillon
|
|
3010
|
-
},
|
|
3011
|
-
types: {
|
|
3012
|
-
headers: {
|
|
3013
|
-
fontFamily: {
|
|
3014
|
-
regular: Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold',
|
|
3015
|
-
bold: Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold'
|
|
3016
|
-
},
|
|
3017
|
-
fontWeight: 400,
|
|
3018
|
-
fontStyle: 'normal',
|
|
3019
|
-
configs: {
|
|
3020
|
-
// also known as xxlarge
|
|
3021
|
-
header1: createTypographyTypeConfig(1.3, 38, 62),
|
|
3022
|
-
// also known as xlarge
|
|
3023
|
-
header2: createTypographyTypeConfig(1.3, 32, 48),
|
|
3024
|
-
// also known as medium
|
|
3025
|
-
header3: createTypographyTypeConfig(1.3, 24, 36),
|
|
3026
|
-
// also known as xsmall
|
|
3027
|
-
header4: createTypographyTypeConfig(1.3, 18, 24),
|
|
3028
|
-
// also known as xxsmall
|
|
3029
|
-
header5: createTypographyTypeConfig(1.3, 18, 18)
|
|
3030
|
-
}
|
|
3031
|
-
},
|
|
3032
|
-
bodies: {
|
|
3033
|
-
fontFamily: {
|
|
3034
|
-
regular: Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans',
|
|
3035
|
-
bold: Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans-Bold'
|
|
3036
|
-
},
|
|
3037
|
-
fontWeight: {
|
|
3038
|
-
regular: 400,
|
|
3039
|
-
bold: 700
|
|
3040
|
-
},
|
|
3041
|
-
fontStyle: {
|
|
3042
|
-
regular: 'normal',
|
|
3043
|
-
bold: 'normal'
|
|
3044
|
-
},
|
|
3045
|
-
configs: {
|
|
3046
|
-
'body-large': createTypographyTypeConfig(1.6, 18, 24),
|
|
3047
|
-
'body-medium': createTypographyTypeConfig(1.6, 18, 18),
|
|
3048
|
-
body: createTypographyTypeConfig(1.6, 16, 16),
|
|
3049
|
-
'body-small': createTypographyTypeConfig(1.6, 14, 14),
|
|
3050
|
-
'body-xsmall': createTypographyTypeConfig(1.6, 12, 12)
|
|
3051
|
-
}
|
|
3052
|
-
}
|
|
3053
|
-
},
|
|
3054
|
-
link: {
|
|
3055
|
-
disabledColor: lateOceanColorPalette.black200
|
|
3056
|
-
}
|
|
3057
|
-
};
|
|
3058
|
-
|
|
3059
3098
|
var breakpoints = {
|
|
3060
3099
|
values: {
|
|
3061
3100
|
base: 0,
|
|
@@ -3089,7 +3128,7 @@ var theme = {
|
|
|
3089
3128
|
button: buttonLateOceanTheme,
|
|
3090
3129
|
card: cardLateOceanTheme,
|
|
3091
3130
|
feedbackMessage: feedbackMessageLateOceanTheme,
|
|
3092
|
-
forms:
|
|
3131
|
+
forms: forms,
|
|
3093
3132
|
typography: typographyLateOceanTheme,
|
|
3094
3133
|
tag: tagLateOceanTheme,
|
|
3095
3134
|
shadows: shadowsLateOceanTheme,
|
|
@@ -3232,7 +3271,7 @@ function TimePicker(_ref) {
|
|
|
3232
3271
|
isTimePickerModalVisible = _useTimePicker.isTimePickerModalVisible;
|
|
3233
3272
|
|
|
3234
3273
|
return /*#__PURE__*/jsxs(Container, {
|
|
3235
|
-
state: timePickerState === 'default' ? state : timePickerState,
|
|
3274
|
+
$state: timePickerState === 'default' ? state : timePickerState,
|
|
3236
3275
|
accessibilityRole: "button",
|
|
3237
3276
|
onPress: handleInputPress,
|
|
3238
3277
|
children: [/*#__PURE__*/jsx(Typography.Text, {
|
|
@@ -3664,5 +3703,5 @@ function withTheme(WrappedComponent) {
|
|
|
3664
3703
|
});
|
|
3665
3704
|
}
|
|
3666
3705
|
|
|
3667
|
-
export { Avatar, Button, Card, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputFeedback, InputField, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, Radio, DeprecatedSection as Section, Skeleton, 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 };
|
|
3706
|
+
export { Avatar, Button, Card, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputFeedback, InputField, InputIcon, InputPassword, InputPressable, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, Radio, DeprecatedSection as Section, Skeleton, 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 };
|
|
3668
3707
|
//# sourceMappingURL=index-browser-all.es.ios.js.map
|