@ornikar/kitt-universal 6.1.0 → 7.0.2
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/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/TimePicker/useTimePicker.d.ts +2 -0
- package/dist/definitions/TimePicker/useTimePicker.d.ts.map +1 -1
- 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/pageLoader.d.ts +5 -0
- package/dist/definitions/themes/late-ocean/pageLoader.d.ts.map +1 -0
- package/dist/index-browser-all.es.android.js +107 -137
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +107 -137
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +107 -137
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +107 -142
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +63 -92
- 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 +75 -104
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +13 -5
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +13 -5
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +13 -5
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +13 -5
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +13 -5
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +13 -5
- 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 +4 -4
- package/dist/definitions/Loader/LargeLoader.d.ts +0 -7
- package/dist/definitions/Loader/LargeLoader.d.ts.map +0 -1
- package/dist/definitions/Loader/LargeLoader.web.d.ts +0 -3
- package/dist/definitions/Loader/LargeLoader.web.d.ts.map +0 -1
- package/dist/definitions/Loader/Loader.d.ts +0 -8
- package/dist/definitions/Loader/Loader.d.ts.map +0 -1
- package/dist/definitions/Loader/Loader.web.d.ts +0 -8
- package/dist/definitions/Loader/Loader.web.d.ts.map +0 -1
- package/dist/definitions/typography/TypographySpinningIcon.d.ts +0 -9
- package/dist/definitions/typography/TypographySpinningIcon.d.ts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
-
import { UserIcon, CheckboxMark, XIcon, EyeOffIcon, EyeIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
|
|
3
|
+
import { UserIcon, CheckboxMark, XIcon, EyeOffIcon, EyeIcon, ArcIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
|
|
4
4
|
export * from '@ornikar/kitt-icons';
|
|
5
|
-
import { useWindowDimensions, Image, Platform, Linking,
|
|
5
|
+
import { useWindowDimensions, Image, Platform, Linking, Pressable, StyleSheet, ScrollView, Modal as Modal$1, Text as Text$1, TextInput, View, Animated as Animated$1, Easing, ActivityIndicator } from 'react-native';
|
|
6
6
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
7
7
|
import styled, { useTheme, css, ThemeProvider } from 'styled-components/native';
|
|
8
8
|
import { cloneElement, useContext, createContext, forwardRef, useMemo, useState, useRef, useEffect, Fragment as Fragment$1, Children } from 'react';
|
|
@@ -102,7 +102,7 @@ var KittBreakpointsMax = {
|
|
|
102
102
|
LARGE: KittBreakpoints.WIDE - 1
|
|
103
103
|
};
|
|
104
104
|
|
|
105
|
-
var _excluded$
|
|
105
|
+
var _excluded$h = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
|
|
106
106
|
var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
|
|
107
107
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
108
108
|
function useTypographyColor() {
|
|
@@ -178,7 +178,7 @@ function Typography(_ref4) {
|
|
|
178
178
|
large = _ref4.large,
|
|
179
179
|
variant = _ref4.variant,
|
|
180
180
|
color = _ref4.color,
|
|
181
|
-
otherProps = _objectWithoutProperties(_ref4, _excluded$
|
|
181
|
+
otherProps = _objectWithoutProperties(_ref4, _excluded$h);
|
|
182
182
|
|
|
183
183
|
var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
|
|
184
184
|
var hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
|
|
@@ -265,7 +265,7 @@ Typography.h4 = createHeading(4, 'header4');
|
|
|
265
265
|
|
|
266
266
|
Typography.h5 = createHeading(5, 'header5');
|
|
267
267
|
|
|
268
|
-
var _excluded$
|
|
268
|
+
var _excluded$g = ["size", "round", "light", "sizeVariant"];
|
|
269
269
|
|
|
270
270
|
var getInitials = function (firstname, lastname) {
|
|
271
271
|
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
@@ -276,9 +276,10 @@ var StyledAvatarView = /*#__PURE__*/styled.View.withConfig({
|
|
|
276
276
|
})(["border-radius:", ";background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], function (_ref) {
|
|
277
277
|
var theme = _ref.theme,
|
|
278
278
|
$isRound = _ref.$isRound,
|
|
279
|
-
$size = _ref.$size
|
|
279
|
+
$size = _ref.$size,
|
|
280
|
+
$sizeVariant = _ref.$sizeVariant;
|
|
280
281
|
if ($isRound) return "".concat($size / 2, "px");
|
|
281
|
-
return "".concat(theme.kitt.avatar.borderRadius, "px");
|
|
282
|
+
return "".concat($sizeVariant === 'large' ? theme.kitt.avatar.large.borderRadius : theme.kitt.avatar.borderRadius, "px");
|
|
282
283
|
}, function (_ref2) {
|
|
283
284
|
var theme = _ref2.theme,
|
|
284
285
|
$isLight = _ref2.$isLight;
|
|
@@ -297,8 +298,8 @@ function AvatarContent(_ref5) {
|
|
|
297
298
|
firstname = _ref5.firstname,
|
|
298
299
|
lastname = _ref5.lastname,
|
|
299
300
|
alt = _ref5.alt,
|
|
300
|
-
|
|
301
|
-
|
|
301
|
+
isLight = _ref5.isLight,
|
|
302
|
+
sizeVariant = _ref5.sizeVariant;
|
|
302
303
|
|
|
303
304
|
if (src) {
|
|
304
305
|
return /*#__PURE__*/jsx(Image, {
|
|
@@ -315,8 +316,8 @@ function AvatarContent(_ref5) {
|
|
|
315
316
|
|
|
316
317
|
if (firstname && lastname) {
|
|
317
318
|
return /*#__PURE__*/jsx(Typography.Text, {
|
|
318
|
-
base:
|
|
319
|
-
variant:
|
|
319
|
+
base: sizeVariant === 'large' ? 'body-large' : 'body',
|
|
320
|
+
variant: sizeVariant === 'large' ? 'bold' : 'regular',
|
|
320
321
|
color: isLight ? 'black' : 'white',
|
|
321
322
|
children: getInitials(firstname, lastname)
|
|
322
323
|
});
|
|
@@ -332,20 +333,20 @@ function AvatarContent(_ref5) {
|
|
|
332
333
|
function Avatar(_ref6) {
|
|
333
334
|
var _ref6$size = _ref6.size,
|
|
334
335
|
size = _ref6$size === void 0 ? 40 : _ref6$size,
|
|
335
|
-
_ref6$base = _ref6.base,
|
|
336
|
-
base = _ref6$base === void 0 ? 'body-small' : _ref6$base,
|
|
337
336
|
round = _ref6.round,
|
|
338
337
|
light = _ref6.light,
|
|
339
|
-
|
|
338
|
+
sizeVariant = _ref6.sizeVariant,
|
|
339
|
+
props = _objectWithoutProperties(_ref6, _excluded$g);
|
|
340
340
|
|
|
341
341
|
return /*#__PURE__*/jsx(StyledAvatarView, {
|
|
342
342
|
$size: size,
|
|
343
343
|
$isRound: round,
|
|
344
344
|
$isLight: light,
|
|
345
|
+
$sizeVariant: sizeVariant,
|
|
345
346
|
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread({
|
|
346
347
|
size: size,
|
|
347
|
-
|
|
348
|
-
|
|
348
|
+
isLight: light,
|
|
349
|
+
sizeVariant: sizeVariant
|
|
349
350
|
}, props))
|
|
350
351
|
});
|
|
351
352
|
}
|
|
@@ -502,12 +503,12 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
|
|
|
502
503
|
return defaultPadding;
|
|
503
504
|
});
|
|
504
505
|
|
|
505
|
-
var _excluded$
|
|
506
|
-
_excluded2$
|
|
506
|
+
var _excluded$f = ["color"],
|
|
507
|
+
_excluded2$2 = ["color"];
|
|
507
508
|
|
|
508
509
|
function TypographyIconSpecifiedColor(_ref) {
|
|
509
510
|
var color = _ref.color,
|
|
510
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
511
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
511
512
|
|
|
512
513
|
var theme = /*#__PURE__*/useTheme();
|
|
513
514
|
return /*#__PURE__*/jsx(Icon, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -524,7 +525,7 @@ function TypographyIconInheritColor(props) {
|
|
|
524
525
|
|
|
525
526
|
function TypographyIcon(_ref2) {
|
|
526
527
|
var color = _ref2.color,
|
|
527
|
-
props = _objectWithoutProperties(_ref2, _excluded2$
|
|
528
|
+
props = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
528
529
|
|
|
529
530
|
if (color) {
|
|
530
531
|
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread({
|
|
@@ -539,7 +540,7 @@ function isSubtle(type) {
|
|
|
539
540
|
return type.startsWith('subtle');
|
|
540
541
|
}
|
|
541
542
|
|
|
542
|
-
var _excluded$
|
|
543
|
+
var _excluded$e = ["type", "variant", "isDisabled", "$isStretch", "icon", "children"];
|
|
543
544
|
|
|
544
545
|
var getTextColorByType = function (type, variant) {
|
|
545
546
|
switch (type) {
|
|
@@ -678,7 +679,7 @@ function ButtonContent(_ref7) {
|
|
|
678
679
|
$isStretch = _ref7.$isStretch,
|
|
679
680
|
icon = _ref7.icon,
|
|
680
681
|
children = _ref7.children,
|
|
681
|
-
props = _objectWithoutProperties(_ref7, _excluded$
|
|
682
|
+
props = _objectWithoutProperties(_ref7, _excluded$e);
|
|
682
683
|
|
|
683
684
|
var color = isDisabled ? 'black-light' : getTextColorByType(type, variant);
|
|
684
685
|
return /*#__PURE__*/jsx(ButtonContentContainer, {
|
|
@@ -830,14 +831,14 @@ var defaultOpenLinkBehavior = {
|
|
|
830
831
|
web: 'targetBlank'
|
|
831
832
|
};
|
|
832
833
|
|
|
833
|
-
var _excluded$
|
|
834
|
+
var _excluded$d = ["as", "href", "openLinkBehavior", "onPress"];
|
|
834
835
|
function ExternalLink(_ref) {
|
|
835
836
|
var Component = _ref.as,
|
|
836
837
|
href = _ref.href,
|
|
837
838
|
_ref$openLinkBehavior = _ref.openLinkBehavior,
|
|
838
839
|
openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
|
|
839
840
|
onPress = _ref.onPress,
|
|
840
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
841
|
+
rest = _objectWithoutProperties(_ref, _excluded$d);
|
|
841
842
|
|
|
842
843
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
843
844
|
onPress: function handleOnPress(e) {
|
|
@@ -927,6 +928,9 @@ var avatar = {
|
|
|
927
928
|
},
|
|
928
929
|
light: {
|
|
929
930
|
backgroundColor: lateOceanColorPalette.black100
|
|
931
|
+
},
|
|
932
|
+
large: {
|
|
933
|
+
borderRadius: 30
|
|
930
934
|
}
|
|
931
935
|
};
|
|
932
936
|
|
|
@@ -1318,6 +1322,10 @@ var listItem = {
|
|
|
1318
1322
|
innerMargin: 8
|
|
1319
1323
|
};
|
|
1320
1324
|
|
|
1325
|
+
var pageLoader = {
|
|
1326
|
+
size: 60
|
|
1327
|
+
};
|
|
1328
|
+
|
|
1321
1329
|
var shadows = {
|
|
1322
1330
|
medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
|
|
1323
1331
|
};
|
|
@@ -1408,19 +1416,20 @@ var theme = {
|
|
|
1408
1416
|
lateOcean: lateOceanColorPalette
|
|
1409
1417
|
},
|
|
1410
1418
|
avatar: avatar,
|
|
1419
|
+
breakpoints: breakpoints,
|
|
1411
1420
|
button: button,
|
|
1412
1421
|
card: card,
|
|
1413
1422
|
feedbackMessage: feedbackMessage,
|
|
1414
1423
|
forms: forms,
|
|
1415
|
-
typography: typography,
|
|
1416
|
-
tag: tag,
|
|
1417
|
-
shadows: shadows,
|
|
1418
1424
|
fullScreenModal: fullScreenModal,
|
|
1419
1425
|
iconButton: iconButton,
|
|
1420
1426
|
listItem: listItem,
|
|
1421
|
-
|
|
1427
|
+
pageLoader: pageLoader,
|
|
1428
|
+
shadows: shadows,
|
|
1422
1429
|
skeleton: skeleton,
|
|
1423
|
-
|
|
1430
|
+
tag: tag,
|
|
1431
|
+
tooltip: tooltip,
|
|
1432
|
+
typography: typography
|
|
1424
1433
|
};
|
|
1425
1434
|
|
|
1426
1435
|
function matchWindowSize(_ref, _ref2) {
|
|
@@ -1717,7 +1726,7 @@ function DatePickerInputs(_ref4) {
|
|
|
1717
1726
|
});
|
|
1718
1727
|
}
|
|
1719
1728
|
|
|
1720
|
-
var _excluded$
|
|
1729
|
+
var _excluded$c = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "setIsFocused", "currentValue", "setCurrentValue", "onChange", "isFocused"];
|
|
1721
1730
|
function DatePickerAndroid(_ref) {
|
|
1722
1731
|
var onBlur = _ref.onBlur,
|
|
1723
1732
|
onFocus = _ref.onFocus,
|
|
@@ -1728,7 +1737,7 @@ function DatePickerAndroid(_ref) {
|
|
|
1728
1737
|
setCurrentValue = _ref.setCurrentValue,
|
|
1729
1738
|
_onChange = _ref.onChange,
|
|
1730
1739
|
isFocused = _ref.isFocused,
|
|
1731
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1740
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
1732
1741
|
|
|
1733
1742
|
var handleClose = function () {
|
|
1734
1743
|
if (onBlur) onBlur();
|
|
@@ -1775,8 +1784,7 @@ function Overlay(_ref2) {
|
|
|
1775
1784
|
var onPress = _ref2.onPress;
|
|
1776
1785
|
return /*#__PURE__*/jsx(OverlayPressable, {
|
|
1777
1786
|
accessibilityRole: "none",
|
|
1778
|
-
onPress: onPress
|
|
1779
|
-
children: /*#__PURE__*/jsx(View, {})
|
|
1787
|
+
onPress: onPress
|
|
1780
1788
|
});
|
|
1781
1789
|
}
|
|
1782
1790
|
|
|
@@ -1814,11 +1822,11 @@ function ModalFooter(_ref3) {
|
|
|
1814
1822
|
});
|
|
1815
1823
|
}
|
|
1816
1824
|
|
|
1817
|
-
var _excluded$
|
|
1825
|
+
var _excluded$b = ["as", "children"];
|
|
1818
1826
|
function StyleWebWrapper(_ref) {
|
|
1819
1827
|
var as = _ref.as,
|
|
1820
1828
|
children = _ref.children,
|
|
1821
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1829
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
1822
1830
|
|
|
1823
1831
|
if (Platform.OS !== 'web') return children;
|
|
1824
1832
|
// as or default to div. If as is undefined, T is div but typescript is not sure
|
|
@@ -1848,7 +1856,7 @@ function withTheme(WrappedComponent) {
|
|
|
1848
1856
|
});
|
|
1849
1857
|
}
|
|
1850
1858
|
|
|
1851
|
-
var _excluded$
|
|
1859
|
+
var _excluded$a = ["color", "disabled"];
|
|
1852
1860
|
var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled$1("div")({
|
|
1853
1861
|
name: "PressableIconButtonWebWrapper",
|
|
1854
1862
|
"class": "kitt-u_PressableIconButtonWebWrapper_p1nlccvg",
|
|
@@ -1912,7 +1920,7 @@ var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
|
|
|
1912
1920
|
function PressableIconButton(_ref9) {
|
|
1913
1921
|
var color = _ref9.color,
|
|
1914
1922
|
disabled = _ref9.disabled,
|
|
1915
|
-
props = _objectWithoutProperties(_ref9, _excluded$
|
|
1923
|
+
props = _objectWithoutProperties(_ref9, _excluded$a);
|
|
1916
1924
|
|
|
1917
1925
|
return /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
1918
1926
|
as: PressableIconButtonWebWrapper,
|
|
@@ -2231,7 +2239,7 @@ function PlatformDateTimePicker(_ref) {
|
|
|
2231
2239
|
}));
|
|
2232
2240
|
}
|
|
2233
2241
|
|
|
2234
|
-
var _excluded$
|
|
2242
|
+
var _excluded$9 = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
|
|
2235
2243
|
|
|
2236
2244
|
function ModalTitle(_ref) {
|
|
2237
2245
|
var children = _ref.children;
|
|
@@ -2251,7 +2259,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
2251
2259
|
validateButtonLabel = _ref2.validateButtonLabel,
|
|
2252
2260
|
onClose = _ref2.onClose,
|
|
2253
2261
|
onChange = _ref2.onChange,
|
|
2254
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
2262
|
+
props = _objectWithoutProperties(_ref2, _excluded$9);
|
|
2255
2263
|
|
|
2256
2264
|
var _useState = useState(value),
|
|
2257
2265
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -2295,7 +2303,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
2295
2303
|
});
|
|
2296
2304
|
}
|
|
2297
2305
|
|
|
2298
|
-
var _excluded$
|
|
2306
|
+
var _excluded$8 = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "onChange", "onFocus", "onBlur", "pickerDefaultDate"];
|
|
2299
2307
|
function DatePicker(_ref) {
|
|
2300
2308
|
var value = _ref.value,
|
|
2301
2309
|
pickerUITestID = _ref.pickerUITestID,
|
|
@@ -2305,7 +2313,7 @@ function DatePicker(_ref) {
|
|
|
2305
2313
|
onFocus = _ref.onFocus,
|
|
2306
2314
|
onBlur = _ref.onBlur,
|
|
2307
2315
|
pickerDefaultDate = _ref.pickerDefaultDate,
|
|
2308
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2316
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
2309
2317
|
|
|
2310
2318
|
var _useState = useState(false),
|
|
2311
2319
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -2371,7 +2379,7 @@ var InputTextContainer = /*#__PURE__*/styled.View.withConfig({
|
|
|
2371
2379
|
displayName: "InputTextContainer"
|
|
2372
2380
|
})(["position:relative;"]);
|
|
2373
2381
|
|
|
2374
|
-
var _excluded$
|
|
2382
|
+
var _excluded$7 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoCompleteType", "keyboardType", "onFocus", "onBlur"];
|
|
2375
2383
|
var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
|
|
2376
2384
|
displayName: "InputText__StyledTextInput"
|
|
2377
2385
|
})(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
|
|
@@ -2415,7 +2423,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
2415
2423
|
keyboardType = _ref4$keyboardType === void 0 ? 'default' : _ref4$keyboardType,
|
|
2416
2424
|
_onFocus = _ref4.onFocus,
|
|
2417
2425
|
_onBlur = _ref4.onBlur,
|
|
2418
|
-
props = _objectWithoutProperties(_ref4, _excluded$
|
|
2426
|
+
props = _objectWithoutProperties(_ref4, _excluded$7);
|
|
2419
2427
|
|
|
2420
2428
|
var theme = /*#__PURE__*/useTheme();
|
|
2421
2429
|
|
|
@@ -2563,11 +2571,11 @@ function InputPressable(_ref) {
|
|
|
2563
2571
|
return /*#__PURE__*/jsx(Pressable, _objectSpread({}, props));
|
|
2564
2572
|
}
|
|
2565
2573
|
|
|
2566
|
-
var _excluded$
|
|
2574
|
+
var _excluded$6 = ["isPasswordDefaultVisible", "right"];
|
|
2567
2575
|
function InputPassword(_ref) {
|
|
2568
2576
|
var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
|
|
2569
2577
|
right = _ref.right,
|
|
2570
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2578
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
2571
2579
|
|
|
2572
2580
|
var _useState = useState(Boolean(isPasswordDefaultVisible)),
|
|
2573
2581
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -2929,10 +2937,12 @@ FullScreenModal.Body = FullScreenModalBody;
|
|
|
2929
2937
|
|
|
2930
2938
|
function SpinningIcon(_ref) {
|
|
2931
2939
|
var icon = _ref.icon,
|
|
2932
|
-
_ref$size = _ref.size,
|
|
2933
|
-
size = _ref$size === void 0 ? defaultIconSize : _ref$size,
|
|
2934
|
-
align = _ref.align,
|
|
2935
2940
|
color = _ref.color;
|
|
2941
|
+
|
|
2942
|
+
if (process.env.NODE_ENV !== 'production' && !color) {
|
|
2943
|
+
throw new Error("Invalid color passed to SpinningIcon: ".concat(String(color)));
|
|
2944
|
+
}
|
|
2945
|
+
|
|
2936
2946
|
var clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
2937
2947
|
color: color
|
|
2938
2948
|
});
|
|
@@ -2956,36 +2966,31 @@ function SpinningIcon(_ref) {
|
|
|
2956
2966
|
return undefined;
|
|
2957
2967
|
};
|
|
2958
2968
|
}, []);
|
|
2959
|
-
return /*#__PURE__*/jsx(
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
rotate: rotation
|
|
2967
|
-
}]
|
|
2968
|
-
},
|
|
2969
|
-
children: clonedIcon
|
|
2970
|
-
})
|
|
2969
|
+
return /*#__PURE__*/jsx(Animated$1.View, {
|
|
2970
|
+
style: {
|
|
2971
|
+
transform: [{
|
|
2972
|
+
rotate: rotation
|
|
2973
|
+
}]
|
|
2974
|
+
},
|
|
2975
|
+
children: clonedIcon
|
|
2971
2976
|
});
|
|
2972
2977
|
}
|
|
2973
2978
|
|
|
2974
|
-
var _excluded$
|
|
2979
|
+
var _excluded$5 = ["children"];
|
|
2975
2980
|
var ContentView = /*#__PURE__*/styled.View.withConfig({
|
|
2976
2981
|
displayName: "ListItemContent__ContentView"
|
|
2977
2982
|
})(["flex:1 0 0%;align-self:center;"]);
|
|
2978
2983
|
function ListItemContent(_ref) {
|
|
2979
2984
|
var children = _ref.children,
|
|
2980
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
2985
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
2981
2986
|
|
|
2982
2987
|
return /*#__PURE__*/jsx(ContentView, _objectSpread(_objectSpread({}, rest), {}, {
|
|
2983
2988
|
children: children
|
|
2984
2989
|
}));
|
|
2985
2990
|
}
|
|
2986
2991
|
|
|
2987
|
-
var _excluded$
|
|
2988
|
-
_excluded2$
|
|
2992
|
+
var _excluded$4 = ["children", "side"],
|
|
2993
|
+
_excluded2$1 = ["children", "align"];
|
|
2989
2994
|
var SideContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
2990
2995
|
displayName: "ListItemSideContent__SideContainerView"
|
|
2991
2996
|
})(["flex-direction:row;margin-left:", ";margin-right:", ";"], function (_ref) {
|
|
@@ -3002,7 +3007,7 @@ function ListItemSideContainer(_ref3) {
|
|
|
3002
3007
|
var children = _ref3.children,
|
|
3003
3008
|
_ref3$side = _ref3.side,
|
|
3004
3009
|
side = _ref3$side === void 0 ? 'left' : _ref3$side,
|
|
3005
|
-
rest = _objectWithoutProperties(_ref3, _excluded$
|
|
3010
|
+
rest = _objectWithoutProperties(_ref3, _excluded$4);
|
|
3006
3011
|
|
|
3007
3012
|
return /*#__PURE__*/jsx(SideContainerView, _objectSpread(_objectSpread({
|
|
3008
3013
|
side: side
|
|
@@ -3020,7 +3025,7 @@ function ListItemSideContent(_ref5) {
|
|
|
3020
3025
|
var children = _ref5.children,
|
|
3021
3026
|
_ref5$align = _ref5.align,
|
|
3022
3027
|
align = _ref5$align === void 0 ? 'auto' : _ref5$align,
|
|
3023
|
-
rest = _objectWithoutProperties(_ref5, _excluded2$
|
|
3028
|
+
rest = _objectWithoutProperties(_ref5, _excluded2$1);
|
|
3024
3029
|
|
|
3025
3030
|
return /*#__PURE__*/jsx(SideContentView, _objectSpread(_objectSpread({
|
|
3026
3031
|
align: align
|
|
@@ -3029,7 +3034,7 @@ function ListItemSideContent(_ref5) {
|
|
|
3029
3034
|
}));
|
|
3030
3035
|
}
|
|
3031
3036
|
|
|
3032
|
-
var _excluded$
|
|
3037
|
+
var _excluded$3 = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
3033
3038
|
var ContainerView = /*#__PURE__*/styled.View.withConfig({
|
|
3034
3039
|
displayName: "ListItem__ContainerView"
|
|
3035
3040
|
})(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], function (_ref) {
|
|
@@ -3068,7 +3073,7 @@ function ListItem(_ref5) {
|
|
|
3068
3073
|
left = _ref5.left,
|
|
3069
3074
|
right = _ref5.right,
|
|
3070
3075
|
onPress = _ref5.onPress,
|
|
3071
|
-
rest = _objectWithoutProperties(_ref5, _excluded$
|
|
3076
|
+
rest = _objectWithoutProperties(_ref5, _excluded$3);
|
|
3072
3077
|
|
|
3073
3078
|
var Wrapper = onPress ? Pressable : Fragment$1;
|
|
3074
3079
|
var wrapperProps = onPress ? _objectSpread({
|
|
@@ -3097,32 +3102,11 @@ ListItem.Content = ListItemContent;
|
|
|
3097
3102
|
ListItem.SideContent = ListItemSideContent;
|
|
3098
3103
|
ListItem.SideContainer = ListItemSideContainer;
|
|
3099
3104
|
|
|
3100
|
-
function
|
|
3101
|
-
|
|
3102
|
-
return
|
|
3103
|
-
}
|
|
3104
|
-
|
|
3105
|
-
var defaultLoaderSize = defaultIconSize;
|
|
3106
|
-
function Loader(_ref) {
|
|
3107
|
-
var _ref$color = _ref.color,
|
|
3108
|
-
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
3109
|
-
_ref$size = _ref.size,
|
|
3110
|
-
size = _ref$size === void 0 ? defaultLoaderSize : _ref$size;
|
|
3111
|
-
var theme = /*#__PURE__*/useTheme();
|
|
3112
|
-
var colorHex = theme.kitt.typography.colors[color];
|
|
3113
|
-
return /*#__PURE__*/jsx(ActivityIndicator, {
|
|
3114
|
-
testID: "ActivityIndicator",
|
|
3115
|
-
color: colorHex,
|
|
3116
|
-
size: getActivityIndicatorSize(size)
|
|
3117
|
-
});
|
|
3118
|
-
}
|
|
3119
|
-
|
|
3120
|
-
function LargeLoader(_ref) {
|
|
3121
|
-
var _ref$color = _ref.color,
|
|
3122
|
-
color = _ref$color === void 0 ? 'primary' : _ref$color;
|
|
3123
|
-
return /*#__PURE__*/jsx(Loader, {
|
|
3105
|
+
function LoaderIcon(_ref) {
|
|
3106
|
+
var color = _ref.color;
|
|
3107
|
+
return /*#__PURE__*/jsx(SpinningIcon, {
|
|
3124
3108
|
color: color,
|
|
3125
|
-
|
|
3109
|
+
icon: /*#__PURE__*/jsx(ArcIcon, {})
|
|
3126
3110
|
});
|
|
3127
3111
|
}
|
|
3128
3112
|
|
|
@@ -3301,6 +3285,22 @@ function Notification(_ref) {
|
|
|
3301
3285
|
});
|
|
3302
3286
|
}
|
|
3303
3287
|
|
|
3288
|
+
function getActivityIndicatorSize(size) {
|
|
3289
|
+
if (Platform.OS === 'android') return size;
|
|
3290
|
+
return size < 36 ? 'small' : 'large';
|
|
3291
|
+
}
|
|
3292
|
+
|
|
3293
|
+
function PageLoader() {
|
|
3294
|
+
var theme = /*#__PURE__*/useTheme();
|
|
3295
|
+
var size = theme.kitt.pageLoader.size;
|
|
3296
|
+
var colorHex = theme.kitt.typography.colors.primary;
|
|
3297
|
+
return /*#__PURE__*/jsx(ActivityIndicator, {
|
|
3298
|
+
testID: "ActivityIndicator",
|
|
3299
|
+
color: colorHex,
|
|
3300
|
+
size: getActivityIndicatorSize(size)
|
|
3301
|
+
});
|
|
3302
|
+
}
|
|
3303
|
+
|
|
3304
3304
|
var Container$2 = /*#__PURE__*/styled.View.withConfig({
|
|
3305
3305
|
displayName: "SkeletonContent__Container"
|
|
3306
3306
|
})(["background-color:", ";border-color:", ";height:100%;width:100%;"], function (_ref) {
|
|
@@ -3595,8 +3595,8 @@ function Story(_ref) {
|
|
|
3595
3595
|
});
|
|
3596
3596
|
}
|
|
3597
3597
|
|
|
3598
|
-
var _excluded$
|
|
3599
|
-
_excluded2
|
|
3598
|
+
var _excluded$2 = ["title", "children", "internalIsDemoSection"],
|
|
3599
|
+
_excluded2 = ["title", "children"],
|
|
3600
3600
|
_excluded3 = ["title", "children"];
|
|
3601
3601
|
var StyledSection = /*#__PURE__*/styled.View.withConfig({
|
|
3602
3602
|
displayName: "StorySection__StyledSection"
|
|
@@ -3605,7 +3605,7 @@ function StorySection(_ref) {
|
|
|
3605
3605
|
var title = _ref.title,
|
|
3606
3606
|
children = _ref.children,
|
|
3607
3607
|
internalIsDemoSection = _ref.internalIsDemoSection,
|
|
3608
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3608
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
3609
3609
|
|
|
3610
3610
|
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
3611
3611
|
return /*#__PURE__*/jsxs(StyledSection, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -3621,7 +3621,7 @@ var StyledSubSection = /*#__PURE__*/styled.View.withConfig({
|
|
|
3621
3621
|
function SubSection(_ref2) {
|
|
3622
3622
|
var title = _ref2.title,
|
|
3623
3623
|
children = _ref2.children,
|
|
3624
|
-
props = _objectWithoutProperties(_ref2, _excluded2
|
|
3624
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
3625
3625
|
|
|
3626
3626
|
return /*#__PURE__*/jsxs(StyledSubSection, _objectSpread(_objectSpread({}, props), {}, {
|
|
3627
3627
|
children: [/*#__PURE__*/jsx(StoryTitle.Level3, {
|
|
@@ -3897,6 +3897,12 @@ function ModalDateTimePicker(_ref2) {
|
|
|
3897
3897
|
}
|
|
3898
3898
|
|
|
3899
3899
|
var timePickerPlaceholder = '--:--';
|
|
3900
|
+
var formatNumberToTimeString = function (time) {
|
|
3901
|
+
return "".concat(String(time).padStart(2, '0'));
|
|
3902
|
+
};
|
|
3903
|
+
var formatDateToTimeString = function (date) {
|
|
3904
|
+
return "".concat(formatNumberToTimeString(date.getHours()), ":").concat(formatNumberToTimeString(date.getMinutes()));
|
|
3905
|
+
};
|
|
3900
3906
|
var useTimePicker = function (value, onChange, onBlur, disabled, defaultValue) {
|
|
3901
3907
|
var _useState = useState(false),
|
|
3902
3908
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -3909,10 +3915,7 @@ var useTimePicker = function (value, onChange, onBlur, disabled, defaultValue) {
|
|
|
3909
3915
|
}, []);
|
|
3910
3916
|
var defaultDate = defaultValue || todayAtNoon;
|
|
3911
3917
|
var dateTimePickerValue = value || defaultDate;
|
|
3912
|
-
var displayedValue = value === null ? timePickerPlaceholder :
|
|
3913
|
-
minute: 'numeric',
|
|
3914
|
-
hour: 'numeric'
|
|
3915
|
-
}).format(dateTimePickerValue);
|
|
3918
|
+
var displayedValue = value === null ? timePickerPlaceholder : formatDateToTimeString(dateTimePickerValue);
|
|
3916
3919
|
var timePickerState = isTimePickerModalVisible ? 'focus' : 'default';
|
|
3917
3920
|
return {
|
|
3918
3921
|
dateTimePickerValue: dateTimePickerValue,
|
|
@@ -4175,7 +4178,7 @@ function TypographyEmoji(_ref2) {
|
|
|
4175
4178
|
});
|
|
4176
4179
|
}
|
|
4177
4180
|
|
|
4178
|
-
var _excluded$
|
|
4181
|
+
var _excluded$1 = ["children", "disabled", "noUnderline", "href", "hrefAttrs", "onPress"];
|
|
4179
4182
|
var TypographyLinkWebWrapper = withTheme( /*#__PURE__*/styled$1("span")({
|
|
4180
4183
|
name: "TypographyLinkWebWrapper",
|
|
4181
4184
|
"class": "kitt-u_TypographyLinkWebWrapper_tcwz3nt",
|
|
@@ -4208,7 +4211,7 @@ function TypographyLink(_ref5) {
|
|
|
4208
4211
|
href = _ref5.href,
|
|
4209
4212
|
hrefAttrs = _ref5.hrefAttrs,
|
|
4210
4213
|
onPress = _ref5.onPress,
|
|
4211
|
-
otherProps = _objectWithoutProperties(_ref5, _excluded$
|
|
4214
|
+
otherProps = _objectWithoutProperties(_ref5, _excluded$1);
|
|
4212
4215
|
|
|
4213
4216
|
return /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
4214
4217
|
accessibilityRole: "none",
|
|
@@ -4232,39 +4235,6 @@ function TypographyLink(_ref5) {
|
|
|
4232
4235
|
}));
|
|
4233
4236
|
}
|
|
4234
4237
|
|
|
4235
|
-
var _excluded$1 = ["color"],
|
|
4236
|
-
_excluded2 = ["color"];
|
|
4237
|
-
|
|
4238
|
-
function TypographySpinningIconSpecifiedColor(_ref) {
|
|
4239
|
-
var color = _ref.color,
|
|
4240
|
-
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
4241
|
-
|
|
4242
|
-
var theme = /*#__PURE__*/useTheme();
|
|
4243
|
-
return /*#__PURE__*/jsx(SpinningIcon, _objectSpread(_objectSpread({}, props), {}, {
|
|
4244
|
-
color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
|
|
4245
|
-
}));
|
|
4246
|
-
}
|
|
4247
|
-
|
|
4248
|
-
function TypographySpinningIconInheritColor(props) {
|
|
4249
|
-
var color = useTypographyColor();
|
|
4250
|
-
return /*#__PURE__*/jsx(TypographySpinningIconSpecifiedColor, _objectSpread({
|
|
4251
|
-
color: color
|
|
4252
|
-
}, props));
|
|
4253
|
-
}
|
|
4254
|
-
|
|
4255
|
-
function TypographySpinningIcon(_ref2) {
|
|
4256
|
-
var color = _ref2.color,
|
|
4257
|
-
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
4258
|
-
|
|
4259
|
-
if (color) {
|
|
4260
|
-
return /*#__PURE__*/jsx(TypographySpinningIconSpecifiedColor, _objectSpread({
|
|
4261
|
-
color: color
|
|
4262
|
-
}, props));
|
|
4263
|
-
}
|
|
4264
|
-
|
|
4265
|
-
return /*#__PURE__*/jsx(TypographySpinningIconInheritColor, _objectSpread({}, props));
|
|
4266
|
-
}
|
|
4267
|
-
|
|
4268
4238
|
var hex2rgba = function (hex) {
|
|
4269
4239
|
var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
4270
4240
|
var r = parseInt(hex.slice(1, 3), 16);
|
|
@@ -4303,5 +4273,5 @@ function MatchWindowSize(_ref) {
|
|
|
4303
4273
|
return children;
|
|
4304
4274
|
}
|
|
4305
4275
|
|
|
4306
|
-
export { Avatar, Button, Card, Checkbox, DatePicker, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label,
|
|
4276
|
+
export { Avatar, Button, Card, Checkbox, DatePicker, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MatchWindowSize, Message, Modal, Notification, Overlay, PageLoader, Radio, DeprecatedSection as Section, Skeleton, SpinningIcon, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
|
|
4307
4277
|
//# sourceMappingURL=index-browser-all.es.js.map
|