@ornikar/kitt-universal 3.2.0 → 3.6.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/Avatar/Avatar.d.ts +9 -4
- package/dist/definitions/Avatar/Avatar.d.ts.map +1 -1
- package/dist/definitions/IconButton/PressableIconButton.d.ts.map +1 -1
- package/dist/definitions/Skeleton/Skeleton.d.ts +14 -0
- package/dist/definitions/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/definitions/Skeleton/SkeletonContent.d.ts +8 -0
- package/dist/definitions/Skeleton/SkeletonContent.d.ts.map +1 -0
- package/dist/definitions/Skeleton/SkeletonContent.web.d.ts +7 -0
- package/dist/definitions/Skeleton/SkeletonContent.web.d.ts.map +1 -0
- package/dist/definitions/forms/TextArea/TextArea.d.ts.map +1 -1
- package/dist/definitions/index.d.ts +5 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +2 -10
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/avatarLateOceanTheme.d.ts +9 -10
- package/dist/definitions/themes/late-ocean/avatarLateOceanTheme.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/skeletonTheme.d.ts +7 -0
- package/dist/definitions/themes/late-ocean/skeletonTheme.d.ts.map +1 -0
- package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts +2 -0
- package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts.map +1 -1
- package/dist/definitions/typography/Typography.d.ts +2 -0
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/definitions/typography/TypographyLink.d.ts.map +1 -1
- package/dist/definitions/utils/hexToRgba.d.ts +2 -0
- package/dist/definitions/utils/hexToRgba.d.ts.map +1 -0
- package/dist/definitions/utils/windowSize/createWindowSizeHelper.d.ts +7 -2
- package/dist/definitions/utils/windowSize/createWindowSizeHelper.d.ts.map +1 -1
- package/dist/definitions/utils/windowSize/useMatchWindowSize.d.ts +5 -2
- package/dist/definitions/utils/windowSize/useMatchWindowSize.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +355 -163
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.css +2 -2
- package/dist/index-browser-all.es.ios.js +355 -163
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +307 -130
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +261 -119
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.css +2 -2
- package/dist/index-node-14.17.cjs.js +264 -84
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.css +3 -2
- package/dist/index-node-14.17.cjs.web.js +219 -74
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/styles.css +3 -2
- package/dist/tsbuildinfo +1 -1
- package/package.json +5 -4
|
@@ -7,13 +7,14 @@ 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';
|
|
9
9
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
10
|
-
import Animated$1, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring } from 'react-native-reanimated';
|
|
10
|
+
import Animated$1, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, withRepeat, withTiming, Easing as Easing$1, interpolate } from 'react-native-reanimated';
|
|
11
11
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
12
12
|
import { parse } from 'twemoji-parser';
|
|
13
13
|
import { openBrowserAsync } from 'expo-web-browser';
|
|
14
14
|
import _extends from '@babel/runtime/helpers/extends';
|
|
15
15
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
16
16
|
import { styled as styled$1 } from '@linaria/react';
|
|
17
|
+
import { LinearGradient } from 'expo-linear-gradient';
|
|
17
18
|
import DateTimePicker from '@react-native-community/datetimepicker';
|
|
18
19
|
import { FormattedMessage } from 'react-intl';
|
|
19
20
|
import { useFloating, offset, shift, flip } from '@floating-ui/react-native';
|
|
@@ -194,34 +195,53 @@ function useTypographyTypeForCurrentWindowSize(base, small, medium, large) {
|
|
|
194
195
|
if (small && width >= KittBreakpoints.SMALL) return small;
|
|
195
196
|
return base;
|
|
196
197
|
}
|
|
197
|
-
function
|
|
198
|
-
var
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
198
|
+
function getTypographyInheritedOrDefaultValuesBasedOnExistingAncestors(hasTypographyAncestor, _ref3) {
|
|
199
|
+
var base = _ref3.base,
|
|
200
|
+
color = _ref3.color;
|
|
201
|
+
// return the props set or undefined. In case of undefined, the value will be inherited from its parents.
|
|
202
|
+
if (hasTypographyAncestor) return {
|
|
203
|
+
base: base,
|
|
204
|
+
color: color
|
|
205
|
+
};
|
|
206
|
+
return {
|
|
207
|
+
base: base !== null && base !== void 0 ? base : 'body',
|
|
208
|
+
color: color !== null && color !== void 0 ? color : 'black'
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
function Typography(_ref4) {
|
|
212
|
+
var accessibilityRole = _ref4.accessibilityRole,
|
|
213
|
+
base = _ref4.base,
|
|
214
|
+
small = _ref4.small,
|
|
215
|
+
medium = _ref4.medium,
|
|
216
|
+
large = _ref4.large,
|
|
217
|
+
variant = _ref4.variant,
|
|
218
|
+
color = _ref4.color,
|
|
219
|
+
otherProps = _objectWithoutProperties(_ref4, _excluded$d);
|
|
206
220
|
|
|
207
221
|
var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
|
|
208
|
-
var
|
|
209
|
-
var isHeader = isTypographyHeader(typeForCurrentWindowSize, isHeaderTypographyInContext);
|
|
210
|
-
var nonNullableVariant = variant !== null && variant !== void 0 ? variant : isHeader ? 'bold' : 'regular'; // if isHeaderTypographyInContext exists, it means we are inside another typography so we don't want to
|
|
211
|
-
// redefine the color, just inherit from it
|
|
222
|
+
var hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
|
|
212
223
|
|
|
213
|
-
var
|
|
214
|
-
|
|
224
|
+
var _getTypographyInherit = getTypographyInheritedOrDefaultValuesBasedOnExistingAncestors(hasTypographyAncestor, {
|
|
225
|
+
base: base,
|
|
226
|
+
color: color
|
|
227
|
+
}),
|
|
228
|
+
baseOrDefaultToBody = _getTypographyInherit.base,
|
|
229
|
+
colorOrDefaultToBlack = _getTypographyInherit.color;
|
|
230
|
+
|
|
231
|
+
var typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(baseOrDefaultToBody, small, medium, large);
|
|
232
|
+
var isHeader = isTypographyHeader(typeForCurrentWindowSize, isHeaderTypographyInContext);
|
|
233
|
+
var nonNullableVariant = variant !== null && variant !== void 0 ? variant : isHeader ? 'bold' : 'regular';
|
|
234
|
+
var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
|
|
215
235
|
value: isHeader,
|
|
216
236
|
children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$h({
|
|
217
|
-
$color:
|
|
237
|
+
$color: colorOrDefaultToBlack,
|
|
218
238
|
$isHeader: isHeader,
|
|
219
239
|
$typeForCurrentWindowSize: typeForCurrentWindowSize,
|
|
220
240
|
$variant: nonNullableVariant,
|
|
221
241
|
accessibilityRole: accessibilityRole || undefined
|
|
222
242
|
}, otherProps))
|
|
223
243
|
}) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$h({
|
|
224
|
-
$color:
|
|
244
|
+
$color: colorOrDefaultToBlack,
|
|
225
245
|
$isHeader: isHeader,
|
|
226
246
|
$variant: nonNullableVariant,
|
|
227
247
|
accessibilityRole: accessibilityRole || undefined
|
|
@@ -283,45 +303,44 @@ Typography.h4 = createHeading(4, 'header4');
|
|
|
283
303
|
|
|
284
304
|
Typography.h5 = createHeading(5, 'header5');
|
|
285
305
|
|
|
286
|
-
var _excluded$c = ["size"];
|
|
306
|
+
var _excluded$c = ["size", "base", "round", "light"];
|
|
287
307
|
|
|
288
308
|
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; }
|
|
289
309
|
|
|
290
310
|
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; }
|
|
291
311
|
|
|
292
|
-
var getFirstCharacter = function (string) {
|
|
293
|
-
return string ? string[0] : '';
|
|
294
|
-
};
|
|
295
|
-
|
|
296
312
|
var getInitials = function (firstname, lastname) {
|
|
297
|
-
return (
|
|
313
|
+
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
298
314
|
};
|
|
299
315
|
|
|
300
316
|
var StyledAvatarView = /*#__PURE__*/styled.View.withConfig({
|
|
301
317
|
displayName: "Avatar__StyledAvatarView"
|
|
302
|
-
})(["border-radius:", "
|
|
303
|
-
var
|
|
304
|
-
|
|
305
|
-
|
|
318
|
+
})(["border-radius:", ";background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], function (_ref) {
|
|
319
|
+
var theme = _ref.theme,
|
|
320
|
+
$isRound = _ref.$isRound,
|
|
321
|
+
$size = _ref.$size;
|
|
322
|
+
if ($isRound) return "".concat($size / 2, "px");
|
|
323
|
+
return theme.kitt.avatar.borderRadius;
|
|
306
324
|
}, function (_ref2) {
|
|
307
325
|
var theme = _ref2.theme,
|
|
308
|
-
|
|
309
|
-
return
|
|
326
|
+
$isLight = _ref2.$isLight;
|
|
327
|
+
return $isLight ? theme.kitt.avatar.light.backgroundColor : theme.kitt.avatar["default"].backgroundColor;
|
|
310
328
|
}, function (_ref3) {
|
|
311
|
-
var size = _ref3
|
|
312
|
-
return size;
|
|
329
|
+
var $size = _ref3.$size;
|
|
330
|
+
return $size;
|
|
313
331
|
}, function (_ref4) {
|
|
314
|
-
var size = _ref4
|
|
315
|
-
return size;
|
|
332
|
+
var $size = _ref4.$size;
|
|
333
|
+
return $size;
|
|
316
334
|
});
|
|
317
335
|
|
|
318
336
|
function AvatarContent(_ref5) {
|
|
319
|
-
var
|
|
320
|
-
size = _ref5$size === void 0 ? 40 : _ref5$size,
|
|
337
|
+
var size = _ref5.size,
|
|
321
338
|
src = _ref5.src,
|
|
322
339
|
firstname = _ref5.firstname,
|
|
323
340
|
lastname = _ref5.lastname,
|
|
324
|
-
|
|
341
|
+
alt = _ref5.alt,
|
|
342
|
+
base = _ref5.base,
|
|
343
|
+
isLight = _ref5.isLight;
|
|
325
344
|
|
|
326
345
|
if (src) {
|
|
327
346
|
return /*#__PURE__*/jsx(Image, {
|
|
@@ -331,22 +350,23 @@ function AvatarContent(_ref5) {
|
|
|
331
350
|
style: {
|
|
332
351
|
width: size,
|
|
333
352
|
height: size
|
|
334
|
-
}
|
|
353
|
+
},
|
|
354
|
+
accessibilityLabel: alt
|
|
335
355
|
});
|
|
336
356
|
}
|
|
337
357
|
|
|
338
358
|
if (firstname && lastname) {
|
|
339
359
|
return /*#__PURE__*/jsx(Typography.Text, {
|
|
340
|
-
base:
|
|
360
|
+
base: base,
|
|
341
361
|
variant: "bold",
|
|
342
|
-
color:
|
|
362
|
+
color: isLight ? 'black' : 'white',
|
|
343
363
|
children: getInitials(firstname, lastname)
|
|
344
364
|
});
|
|
345
365
|
}
|
|
346
366
|
|
|
347
367
|
return /*#__PURE__*/jsx(Icon, {
|
|
348
368
|
icon: /*#__PURE__*/jsx(UserIcon, {}),
|
|
349
|
-
color:
|
|
369
|
+
color: isLight ? 'black' : 'white',
|
|
350
370
|
size: size / 2
|
|
351
371
|
});
|
|
352
372
|
}
|
|
@@ -354,14 +374,22 @@ function AvatarContent(_ref5) {
|
|
|
354
374
|
function Avatar(_ref6) {
|
|
355
375
|
var _ref6$size = _ref6.size,
|
|
356
376
|
size = _ref6$size === void 0 ? 40 : _ref6$size,
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
377
|
+
_ref6$base = _ref6.base,
|
|
378
|
+
base = _ref6$base === void 0 ? 'body-small' : _ref6$base,
|
|
379
|
+
round = _ref6.round,
|
|
380
|
+
light = _ref6.light,
|
|
381
|
+
props = _objectWithoutProperties(_ref6, _excluded$c);
|
|
382
|
+
|
|
383
|
+
return /*#__PURE__*/jsx(StyledAvatarView, {
|
|
384
|
+
$size: size,
|
|
385
|
+
$isRound: round,
|
|
386
|
+
$isLight: light,
|
|
387
|
+
children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$g({
|
|
388
|
+
size: size,
|
|
389
|
+
base: base,
|
|
390
|
+
isLight: light
|
|
391
|
+
}, props))
|
|
392
|
+
});
|
|
365
393
|
}
|
|
366
394
|
|
|
367
395
|
var StyledPressable = /*#__PURE__*/styled.Pressable.withConfig({
|
|
@@ -762,7 +790,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
762
790
|
});
|
|
763
791
|
});
|
|
764
792
|
|
|
765
|
-
var Container$
|
|
793
|
+
var Container$7 = /*#__PURE__*/styled.View.withConfig({
|
|
766
794
|
displayName: "Card__Container"
|
|
767
795
|
})(["background-color:", ";padding:", ";border-radius:", ";border-width:", ";border-color:", ";"], function (_ref) {
|
|
768
796
|
var theme = _ref.theme,
|
|
@@ -785,7 +813,7 @@ var Container$6 = /*#__PURE__*/styled.View.withConfig({
|
|
|
785
813
|
function Card(_ref6) {
|
|
786
814
|
var children = _ref6.children,
|
|
787
815
|
type = _ref6.type;
|
|
788
|
-
return /*#__PURE__*/jsx(Container$
|
|
816
|
+
return /*#__PURE__*/jsx(Container$7, {
|
|
789
817
|
type: type,
|
|
790
818
|
children: children
|
|
791
819
|
});
|
|
@@ -1008,7 +1036,7 @@ var Input = /*#__PURE__*/styled(TextInput).withConfig({
|
|
|
1008
1036
|
var minHeight = _ref10.minHeight;
|
|
1009
1037
|
return minHeight;
|
|
1010
1038
|
});
|
|
1011
|
-
var Container$
|
|
1039
|
+
var Container$6 = /*#__PURE__*/styled.View.withConfig({
|
|
1012
1040
|
displayName: "InputText__Container"
|
|
1013
1041
|
})(["margin-top:", ";margin-bottom:", ";"], function (_ref11) {
|
|
1014
1042
|
var theme = _ref11.theme;
|
|
@@ -1084,7 +1112,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref15, ref) {
|
|
|
1084
1112
|
isDisabled: disabled,
|
|
1085
1113
|
formState: formState
|
|
1086
1114
|
});
|
|
1087
|
-
return /*#__PURE__*/jsxs(Container$
|
|
1115
|
+
return /*#__PURE__*/jsxs(Container$6, {
|
|
1088
1116
|
children: [/*#__PURE__*/jsx(Input, _objectSpread$c(_objectSpread$c({
|
|
1089
1117
|
ref: ref,
|
|
1090
1118
|
nativeID: id,
|
|
@@ -1184,7 +1212,7 @@ var SelectedInnerRadio = /*#__PURE__*/styled.View.withConfig({
|
|
|
1184
1212
|
var theme = _ref14.theme;
|
|
1185
1213
|
return theme.kitt.forms.radio.checked.innerSize / 2;
|
|
1186
1214
|
});
|
|
1187
|
-
var Container$
|
|
1215
|
+
var Container$5 = /*#__PURE__*/styled.Pressable.withConfig({
|
|
1188
1216
|
displayName: "Radio__Container"
|
|
1189
1217
|
})(["flex-direction:row;align-items:center;"]);
|
|
1190
1218
|
var Text = /*#__PURE__*/styled(Typography.Text).withConfig({
|
|
@@ -1201,7 +1229,7 @@ function Radio(_ref16) {
|
|
|
1201
1229
|
_ref16$disabled = _ref16.disabled,
|
|
1202
1230
|
disabled = _ref16$disabled === void 0 ? false : _ref16$disabled,
|
|
1203
1231
|
children = _ref16.children;
|
|
1204
|
-
return /*#__PURE__*/jsxs(Container$
|
|
1232
|
+
return /*#__PURE__*/jsxs(Container$5, {
|
|
1205
1233
|
nativeID: id,
|
|
1206
1234
|
disabled: disabled,
|
|
1207
1235
|
accessibilityRole: "radio",
|
|
@@ -1230,7 +1258,8 @@ function TextArea(_ref) {
|
|
|
1230
1258
|
|
|
1231
1259
|
var theme = /*#__PURE__*/useTheme();
|
|
1232
1260
|
return /*#__PURE__*/jsx(InputText, _objectSpread$b(_objectSpread$b({
|
|
1233
|
-
multiline: true
|
|
1261
|
+
multiline: true,
|
|
1262
|
+
textAlignVertical: "top"
|
|
1234
1263
|
}, props), {}, {
|
|
1235
1264
|
type: "text",
|
|
1236
1265
|
minHeight: theme.kitt.forms.input.textAreaMinHeight
|
|
@@ -1380,7 +1409,7 @@ function FullScreenModalHeader(_ref6) {
|
|
|
1380
1409
|
});
|
|
1381
1410
|
}
|
|
1382
1411
|
|
|
1383
|
-
var Container$
|
|
1412
|
+
var Container$4 = /*#__PURE__*/styled.View.withConfig({
|
|
1384
1413
|
displayName: "FullScreenModal__Container"
|
|
1385
1414
|
})(["flex:1;background-color:", ";"], function (_ref) {
|
|
1386
1415
|
var theme = _ref.theme;
|
|
@@ -1388,7 +1417,7 @@ var Container$3 = /*#__PURE__*/styled.View.withConfig({
|
|
|
1388
1417
|
});
|
|
1389
1418
|
function FullScreenModal(_ref2) {
|
|
1390
1419
|
var children = _ref2.children;
|
|
1391
|
-
return /*#__PURE__*/jsx(Container$
|
|
1420
|
+
return /*#__PURE__*/jsx(Container$4, {
|
|
1392
1421
|
children: children
|
|
1393
1422
|
});
|
|
1394
1423
|
}
|
|
@@ -1460,29 +1489,30 @@ var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled$1("div")({
|
|
|
1460
1489
|
return theme.kitt.iconButton.scale.base.active;
|
|
1461
1490
|
}],
|
|
1462
1491
|
"p1nlccvg-4": [function (_ref5) {
|
|
1463
|
-
var theme = _ref5.theme
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
return
|
|
1492
|
+
var theme = _ref5.theme,
|
|
1493
|
+
$isWhite = _ref5.$isWhite;
|
|
1494
|
+
var _theme$kitt$iconButto = theme.kitt.iconButton,
|
|
1495
|
+
white = _theme$kitt$iconButto.white,
|
|
1496
|
+
defaultIconButton = _theme$kitt$iconButto["default"];
|
|
1497
|
+
if ($isWhite) return white.pressedBackgroundColor;
|
|
1498
|
+
return defaultIconButton.pressedBackgroundColor;
|
|
1469
1499
|
}]
|
|
1470
1500
|
}
|
|
1471
1501
|
}));
|
|
1472
1502
|
var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
|
|
1473
1503
|
displayName: "PressableIconButton__StyledPressableIconButton"
|
|
1474
|
-
})(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (
|
|
1475
|
-
var theme =
|
|
1504
|
+
})(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref6) {
|
|
1505
|
+
var theme = _ref6.theme;
|
|
1476
1506
|
return theme.kitt.iconButton.borderRadius;
|
|
1507
|
+
}, function (_ref7) {
|
|
1508
|
+
var theme = _ref7.theme;
|
|
1509
|
+
return theme.kitt.iconButton.width;
|
|
1477
1510
|
}, function (_ref8) {
|
|
1478
1511
|
var theme = _ref8.theme;
|
|
1479
|
-
return theme.kitt.iconButton.width;
|
|
1480
|
-
}, function (_ref9) {
|
|
1481
|
-
var theme = _ref9.theme;
|
|
1482
1512
|
return theme.kitt.iconButton.height;
|
|
1483
|
-
}, function (
|
|
1484
|
-
var theme =
|
|
1485
|
-
disabled =
|
|
1513
|
+
}, function (_ref9) {
|
|
1514
|
+
var theme = _ref9.theme,
|
|
1515
|
+
disabled = _ref9.disabled;
|
|
1486
1516
|
var iconButton = theme.kitt.iconButton;
|
|
1487
1517
|
|
|
1488
1518
|
if (Platform.OS !== 'web') {
|
|
@@ -1497,13 +1527,13 @@ var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
|
|
|
1497
1527
|
|
|
1498
1528
|
return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n ");
|
|
1499
1529
|
});
|
|
1500
|
-
function PressableIconButton(
|
|
1501
|
-
var color =
|
|
1502
|
-
props = _objectWithoutProperties(
|
|
1530
|
+
function PressableIconButton(_ref10) {
|
|
1531
|
+
var color = _ref10.color,
|
|
1532
|
+
props = _objectWithoutProperties(_ref10, _excluded$6);
|
|
1503
1533
|
|
|
1504
1534
|
return /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
1505
1535
|
as: PressableIconButtonWebWrapper,
|
|
1506
|
-
|
|
1536
|
+
$isWhite: color === 'white',
|
|
1507
1537
|
children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread$8({}, props))
|
|
1508
1538
|
});
|
|
1509
1539
|
}
|
|
@@ -1839,7 +1869,7 @@ function LargeLoader(_ref) {
|
|
|
1839
1869
|
|
|
1840
1870
|
var xIconSize = 14;
|
|
1841
1871
|
var mainIconSize = 20;
|
|
1842
|
-
var Container$
|
|
1872
|
+
var Container$3 = /*#__PURE__*/styled.View.withConfig({
|
|
1843
1873
|
displayName: "Message__Container"
|
|
1844
1874
|
})(["border-radius:", "px;background-color:", ";padding-bottom:", "px;padding-left:", "px;padding-right:", "px;padding-top:", "px;flex-direction:row;align-items:flex-start;justify-content:space-between;"], function (_ref) {
|
|
1845
1875
|
var theme = _ref.theme,
|
|
@@ -1928,7 +1958,7 @@ function Message(_ref11) {
|
|
|
1928
1958
|
onDismiss = _ref11.onDismiss,
|
|
1929
1959
|
insets = _ref11.insets;
|
|
1930
1960
|
var color = getColorByType(type);
|
|
1931
|
-
return /*#__PURE__*/jsxs(Container$
|
|
1961
|
+
return /*#__PURE__*/jsxs(Container$3, {
|
|
1932
1962
|
type: type,
|
|
1933
1963
|
noRadius: noRadius,
|
|
1934
1964
|
insets: insets,
|
|
@@ -2132,6 +2162,127 @@ function Notification(_ref) {
|
|
|
2132
2162
|
});
|
|
2133
2163
|
}
|
|
2134
2164
|
|
|
2165
|
+
var Container$2 = /*#__PURE__*/styled.View.withConfig({
|
|
2166
|
+
displayName: "SkeletonContent__Container"
|
|
2167
|
+
})(["background-color:", ";border-color:", ";height:100%;width:100%;"], function (_ref) {
|
|
2168
|
+
var theme = _ref.theme;
|
|
2169
|
+
return theme.kitt.skeleton.backgroundColor;
|
|
2170
|
+
}, function (_ref2) {
|
|
2171
|
+
var theme = _ref2.theme;
|
|
2172
|
+
return theme.kitt.skeleton.flareColor;
|
|
2173
|
+
});
|
|
2174
|
+
var AnimatedLinearGradient = Animated$1.createAnimatedComponent(LinearGradient);
|
|
2175
|
+
function SkeletonContent(_ref3) {
|
|
2176
|
+
var isLoading = _ref3.isLoading,
|
|
2177
|
+
width = _ref3.width;
|
|
2178
|
+
var theme = /*#__PURE__*/useTheme();
|
|
2179
|
+
var sharedX = useSharedValue(0);
|
|
2180
|
+
useEffect(function () {
|
|
2181
|
+
if (isLoading) {
|
|
2182
|
+
sharedX.value = withRepeat(withTiming(1, {
|
|
2183
|
+
duration: theme.kitt.skeleton.animationDuration,
|
|
2184
|
+
easing: Easing$1.inOut(Easing$1.ease)
|
|
2185
|
+
}), -1);
|
|
2186
|
+
}
|
|
2187
|
+
}, [sharedX, width, isLoading, theme]);
|
|
2188
|
+
var linearGradientStyle = useAnimatedStyle(function () {
|
|
2189
|
+
var _f = function () {
|
|
2190
|
+
return {
|
|
2191
|
+
transform: [{
|
|
2192
|
+
translateX: interpolate(sharedX.value, [0, 1], [-width, width])
|
|
2193
|
+
}]
|
|
2194
|
+
};
|
|
2195
|
+
};
|
|
2196
|
+
|
|
2197
|
+
_f._closure = {
|
|
2198
|
+
interpolate: interpolate,
|
|
2199
|
+
sharedX: sharedX,
|
|
2200
|
+
width: width
|
|
2201
|
+
};
|
|
2202
|
+
_f.asString = "function _f(){const{interpolate,sharedX,width}=jsThis._closure;{return{transform:[{translateX:interpolate(sharedX.value,[0,1],[-width,width])}]};}}";
|
|
2203
|
+
_f.__workletHash = 1670955855244;
|
|
2204
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Skeleton/SkeletonContent.tsx (41:47)";
|
|
2205
|
+
_f.__optimalization = 3;
|
|
2206
|
+
|
|
2207
|
+
global.__reanimatedWorkletInit(_f);
|
|
2208
|
+
|
|
2209
|
+
return _f;
|
|
2210
|
+
}());
|
|
2211
|
+
return /*#__PURE__*/jsx(Container$2, {
|
|
2212
|
+
children: /*#__PURE__*/jsx(AnimatedLinearGradient, {
|
|
2213
|
+
colors: [theme.kitt.skeleton.backgroundColor, theme.kitt.skeleton.flareColor, theme.kitt.skeleton.backgroundColor],
|
|
2214
|
+
locations: [0.1, 0.5, 0.9],
|
|
2215
|
+
start: {
|
|
2216
|
+
x: 0,
|
|
2217
|
+
y: 0
|
|
2218
|
+
},
|
|
2219
|
+
end: {
|
|
2220
|
+
x: 1,
|
|
2221
|
+
y: 0
|
|
2222
|
+
},
|
|
2223
|
+
style: [StyleSheet.absoluteFill, linearGradientStyle]
|
|
2224
|
+
})
|
|
2225
|
+
});
|
|
2226
|
+
}
|
|
2227
|
+
|
|
2228
|
+
function Skeleton(_ref) {
|
|
2229
|
+
var isLoading = _ref.isLoading,
|
|
2230
|
+
style = _ref.style;
|
|
2231
|
+
|
|
2232
|
+
var _useState = useState(0),
|
|
2233
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2234
|
+
width = _useState2[0],
|
|
2235
|
+
setWidth = _useState2[1];
|
|
2236
|
+
|
|
2237
|
+
return /*#__PURE__*/jsx(View, {
|
|
2238
|
+
style: style,
|
|
2239
|
+
onLayout: function onLayout(_ref2) {
|
|
2240
|
+
var nativeEvent = _ref2.nativeEvent;
|
|
2241
|
+
return setWidth(nativeEvent.layout.width);
|
|
2242
|
+
},
|
|
2243
|
+
children: /*#__PURE__*/jsx(SkeletonContent, {
|
|
2244
|
+
isLoading: isLoading,
|
|
2245
|
+
width: width
|
|
2246
|
+
})
|
|
2247
|
+
});
|
|
2248
|
+
}
|
|
2249
|
+
var Bar = /*#__PURE__*/styled(Skeleton).withConfig({
|
|
2250
|
+
displayName: "Skeleton__Bar"
|
|
2251
|
+
})(["width:100%;height:", "px;border-radius:", "px;overflow:hidden;"], function (_ref3) {
|
|
2252
|
+
var theme = _ref3.theme;
|
|
2253
|
+
return theme.kitt.spacing * 2;
|
|
2254
|
+
}, function (_ref4) {
|
|
2255
|
+
var theme = _ref4.theme;
|
|
2256
|
+
return theme.kitt.spacing * 2;
|
|
2257
|
+
});
|
|
2258
|
+
var Circle = /*#__PURE__*/styled(Skeleton).withConfig({
|
|
2259
|
+
displayName: "Skeleton__Circle"
|
|
2260
|
+
})(["width:", "px;height:", "px;border-radius:", "px;overflow:hidden;"], function (_ref5) {
|
|
2261
|
+
var theme = _ref5.theme;
|
|
2262
|
+
return theme.kitt.spacing * 12;
|
|
2263
|
+
}, function (_ref6) {
|
|
2264
|
+
var theme = _ref6.theme;
|
|
2265
|
+
return theme.kitt.spacing * 12;
|
|
2266
|
+
}, function (_ref7) {
|
|
2267
|
+
var theme = _ref7.theme;
|
|
2268
|
+
return theme.kitt.spacing * 6;
|
|
2269
|
+
});
|
|
2270
|
+
var Square = /*#__PURE__*/styled(Skeleton).withConfig({
|
|
2271
|
+
displayName: "Skeleton__Square"
|
|
2272
|
+
})(["width:", "px;height:", "px;border-radius:", "px;overflow:hidden;"], function (_ref8) {
|
|
2273
|
+
var theme = _ref8.theme;
|
|
2274
|
+
return theme.kitt.spacing * 12;
|
|
2275
|
+
}, function (_ref9) {
|
|
2276
|
+
var theme = _ref9.theme;
|
|
2277
|
+
return theme.kitt.spacing * 12;
|
|
2278
|
+
}, function (_ref10) {
|
|
2279
|
+
var theme = _ref10.theme;
|
|
2280
|
+
return theme.kitt.spacing * 1.5;
|
|
2281
|
+
});
|
|
2282
|
+
Skeleton.Bar = Bar;
|
|
2283
|
+
Skeleton.Circle = Circle;
|
|
2284
|
+
Skeleton.Square = Square;
|
|
2285
|
+
|
|
2135
2286
|
var Flex = /*#__PURE__*/styled.View.withConfig({
|
|
2136
2287
|
shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {
|
|
2137
2288
|
return !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop);
|
|
@@ -2565,17 +2716,6 @@ var lateOceanColorPalette = {
|
|
|
2565
2716
|
moonPurpleLight1: '#EDEBFC'
|
|
2566
2717
|
};
|
|
2567
2718
|
|
|
2568
|
-
var avatarLateOceanTheme = {
|
|
2569
|
-
"default": {
|
|
2570
|
-
color: lateOceanColorPalette.white,
|
|
2571
|
-
backgroundColor: lateOceanColorPalette.lateOcean
|
|
2572
|
-
},
|
|
2573
|
-
light: {
|
|
2574
|
-
color: lateOceanColorPalette.black1000,
|
|
2575
|
-
backgroundColor: lateOceanColorPalette.black100
|
|
2576
|
-
}
|
|
2577
|
-
};
|
|
2578
|
-
|
|
2579
2719
|
var colorsLateOceanTheme = {
|
|
2580
2720
|
primary: lateOceanColorPalette.lateOcean,
|
|
2581
2721
|
primaryLight: lateOceanColorPalette.lateOceanLight1,
|
|
@@ -2598,6 +2738,16 @@ var colorsLateOceanTheme = {
|
|
|
2598
2738
|
}
|
|
2599
2739
|
};
|
|
2600
2740
|
|
|
2741
|
+
var avatar = {
|
|
2742
|
+
borderRadius: '10px',
|
|
2743
|
+
"default": {
|
|
2744
|
+
backgroundColor: colorsLateOceanTheme.primary
|
|
2745
|
+
},
|
|
2746
|
+
light: {
|
|
2747
|
+
backgroundColor: lateOceanColorPalette.black100
|
|
2748
|
+
}
|
|
2749
|
+
};
|
|
2750
|
+
|
|
2601
2751
|
var buttonLateOceanTheme = {
|
|
2602
2752
|
borderRadius: '30px',
|
|
2603
2753
|
borderWidth: {
|
|
@@ -2824,6 +2974,12 @@ var shadowsLateOceanTheme = {
|
|
|
2824
2974
|
medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
|
|
2825
2975
|
};
|
|
2826
2976
|
|
|
2977
|
+
var skeletonTheme = {
|
|
2978
|
+
backgroundColor: lateOceanColorPalette.black100,
|
|
2979
|
+
flareColor: lateOceanColorPalette.black200,
|
|
2980
|
+
animationDuration: 1000
|
|
2981
|
+
};
|
|
2982
|
+
|
|
2827
2983
|
var tagLateOceanTheme = {
|
|
2828
2984
|
borderRadius: '10px',
|
|
2829
2985
|
padding: '2px 12px',
|
|
@@ -2877,20 +3033,18 @@ var tooltip = {
|
|
|
2877
3033
|
var calcLineHeight = function (fontSize, lineHeightMultiplier) {
|
|
2878
3034
|
return Math.round(fontSize * lineHeightMultiplier);
|
|
2879
3035
|
};
|
|
2880
|
-
|
|
2881
3036
|
var createTypographyTypeConfig = function (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) {
|
|
2882
3037
|
return {
|
|
2883
3038
|
baseAndSmall: {
|
|
2884
3039
|
fontSize: "".concat(baseAndSmallFontSize, "px"),
|
|
2885
|
-
lineHeight: "".concat(calcLineHeight(
|
|
3040
|
+
lineHeight: "".concat(calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier), "px")
|
|
2886
3041
|
},
|
|
2887
3042
|
mediumAndWide: {
|
|
2888
3043
|
fontSize: "".concat(mediumAndWideFontSize, "px"),
|
|
2889
|
-
lineHeight: "".concat(calcLineHeight(
|
|
3044
|
+
lineHeight: "".concat(calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier), "px")
|
|
2890
3045
|
}
|
|
2891
3046
|
};
|
|
2892
3047
|
};
|
|
2893
|
-
|
|
2894
3048
|
var typographyLateOceanTheme = {
|
|
2895
3049
|
colors: {
|
|
2896
3050
|
black: lateOceanColorPalette.black1000,
|
|
@@ -2980,7 +3134,7 @@ var theme = {
|
|
|
2980
3134
|
palettes: {
|
|
2981
3135
|
lateOcean: lateOceanColorPalette
|
|
2982
3136
|
},
|
|
2983
|
-
avatar:
|
|
3137
|
+
avatar: avatar,
|
|
2984
3138
|
button: buttonLateOceanTheme,
|
|
2985
3139
|
card: cardLateOceanTheme,
|
|
2986
3140
|
feedbackMessage: feedbackMessageLateOceanTheme,
|
|
@@ -2991,7 +3145,8 @@ var theme = {
|
|
|
2991
3145
|
fullScreenModal: fullScreenModalLateOceanTheme,
|
|
2992
3146
|
iconButton: iconButton,
|
|
2993
3147
|
listItem: listItemLateOceanTheme,
|
|
2994
|
-
tooltip: tooltip
|
|
3148
|
+
tooltip: tooltip,
|
|
3149
|
+
skeleton: skeletonTheme
|
|
2995
3150
|
};
|
|
2996
3151
|
|
|
2997
3152
|
function Title(_ref) {
|
|
@@ -3375,40 +3530,46 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
3375
3530
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3376
3531
|
var TypographyLinkWebWrapper = withTheme( /*#__PURE__*/styled$1("span")({
|
|
3377
3532
|
name: "TypographyLinkWebWrapper",
|
|
3378
|
-
"class": "tcwz3nt"
|
|
3533
|
+
"class": "tcwz3nt",
|
|
3534
|
+
vars: {
|
|
3535
|
+
"tcwz3nt-0": [function (_ref) {
|
|
3536
|
+
var $hasNoUnderline = _ref.$hasNoUnderline;
|
|
3537
|
+
return $hasNoUnderline ? 'underline' : 'none';
|
|
3538
|
+
}]
|
|
3539
|
+
}
|
|
3379
3540
|
}));
|
|
3380
3541
|
var StyledLink = /*#__PURE__*/styled.Text.withConfig({
|
|
3381
3542
|
displayName: "TypographyLink__StyledLink"
|
|
3382
|
-
})(["text-decoration:", ";", ";", ";"], function (
|
|
3383
|
-
var $
|
|
3384
|
-
return $
|
|
3385
|
-
}, function (
|
|
3386
|
-
var $disabled =
|
|
3543
|
+
})(["text-decoration:", ";", ";", ";"], function (_ref2) {
|
|
3544
|
+
var $hasNoUnderline = _ref2.$hasNoUnderline;
|
|
3545
|
+
return $hasNoUnderline ? 'none' : 'underline';
|
|
3546
|
+
}, function (_ref3) {
|
|
3547
|
+
var $disabled = _ref3.$disabled;
|
|
3387
3548
|
if (Platform.OS !== 'web') return undefined;
|
|
3388
3549
|
return "\n text-decoration-color: inherit;\n transition: color 0.2s ease-in-out;\n cursor: ".concat($disabled ? 'not-allowed' : 'pointer', ";\n ");
|
|
3389
|
-
}, function (
|
|
3390
|
-
var $disabled =
|
|
3391
|
-
theme =
|
|
3550
|
+
}, function (_ref4) {
|
|
3551
|
+
var $disabled = _ref4.$disabled,
|
|
3552
|
+
theme = _ref4.theme;
|
|
3392
3553
|
if (!$disabled) return undefined;
|
|
3393
3554
|
return "color: ".concat(theme.kitt.typography.link.disabledColor, ";");
|
|
3394
3555
|
});
|
|
3395
|
-
function TypographyLink(
|
|
3396
|
-
var children =
|
|
3397
|
-
disabled =
|
|
3398
|
-
noUnderline =
|
|
3399
|
-
href =
|
|
3400
|
-
hrefAttrs =
|
|
3401
|
-
onPress =
|
|
3402
|
-
otherProps = _objectWithoutProperties(
|
|
3556
|
+
function TypographyLink(_ref5) {
|
|
3557
|
+
var children = _ref5.children,
|
|
3558
|
+
disabled = _ref5.disabled,
|
|
3559
|
+
noUnderline = _ref5.noUnderline,
|
|
3560
|
+
href = _ref5.href,
|
|
3561
|
+
hrefAttrs = _ref5.hrefAttrs,
|
|
3562
|
+
onPress = _ref5.onPress,
|
|
3563
|
+
otherProps = _objectWithoutProperties(_ref5, _excluded$1);
|
|
3403
3564
|
|
|
3404
3565
|
return /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
3405
3566
|
accessibilityRole: "none",
|
|
3406
3567
|
children: /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
3407
3568
|
as: TypographyLinkWebWrapper,
|
|
3408
|
-
|
|
3569
|
+
$hasNoUnderline: noUnderline,
|
|
3409
3570
|
children: /*#__PURE__*/jsx(StyledLink, {
|
|
3410
3571
|
$disabled: disabled,
|
|
3411
|
-
$
|
|
3572
|
+
$hasNoUnderline: noUnderline,
|
|
3412
3573
|
href: href,
|
|
3413
3574
|
hrefAttrs: hrefAttrs,
|
|
3414
3575
|
accessibilityRole: "link",
|
|
@@ -3423,25 +3584,35 @@ function TypographyLink(_ref4) {
|
|
|
3423
3584
|
}));
|
|
3424
3585
|
}
|
|
3425
3586
|
|
|
3426
|
-
function matchWindowSize(
|
|
3427
|
-
var
|
|
3428
|
-
|
|
3429
|
-
|
|
3587
|
+
function matchWindowSize(_ref, _ref2) {
|
|
3588
|
+
var width = _ref.width,
|
|
3589
|
+
height = _ref.height;
|
|
3590
|
+
var minWidth = _ref2.minWidth,
|
|
3591
|
+
maxWidth = _ref2.maxWidth,
|
|
3592
|
+
minHeight = _ref2.minHeight,
|
|
3593
|
+
maxHeight = _ref2.maxHeight;
|
|
3594
|
+
var hasWidthMatched = width ? (!minWidth || width >= minWidth) && (!maxWidth || width <= maxWidth) : true;
|
|
3595
|
+
var hasHeightMatched = height ? (!minHeight || height >= minHeight) && (!maxHeight || height <= maxHeight) : true;
|
|
3596
|
+
return hasWidthMatched && hasHeightMatched;
|
|
3430
3597
|
}
|
|
3431
3598
|
function useMatchWindowSize(options) {
|
|
3432
3599
|
var _useWindowDimensions = useWindowDimensions(),
|
|
3433
|
-
width = _useWindowDimensions.width
|
|
3600
|
+
width = _useWindowDimensions.width,
|
|
3601
|
+
height = _useWindowDimensions.height;
|
|
3434
3602
|
|
|
3435
|
-
return matchWindowSize(
|
|
3603
|
+
return matchWindowSize({
|
|
3604
|
+
width: width,
|
|
3605
|
+
height: height
|
|
3606
|
+
}, options);
|
|
3436
3607
|
}
|
|
3437
3608
|
|
|
3438
|
-
function createWindowSizeHelper(
|
|
3609
|
+
function createWindowSizeHelper(dimensions) {
|
|
3439
3610
|
return {
|
|
3440
3611
|
matchWindowSize: function matchWindowSize$1(options) {
|
|
3441
|
-
return matchWindowSize(
|
|
3612
|
+
return matchWindowSize(dimensions, options);
|
|
3442
3613
|
},
|
|
3443
3614
|
ifWindowSizeMatches: function ifWindowSizeMatches(options, valueIfTrue, valueIfFalse) {
|
|
3444
|
-
return matchWindowSize(
|
|
3615
|
+
return matchWindowSize(dimensions, options) ? valueIfTrue : valueIfFalse;
|
|
3445
3616
|
},
|
|
3446
3617
|
mapWindowWidth: function mapWindowWidth() {
|
|
3447
3618
|
for (var _len = arguments.length, widthList = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -3466,7 +3637,7 @@ function createWindowSizeHelper(currentWidth) {
|
|
|
3466
3637
|
minWidth = _ref4[0];
|
|
3467
3638
|
_ref4[1];
|
|
3468
3639
|
|
|
3469
|
-
return matchWindowSize(
|
|
3640
|
+
return matchWindowSize(dimensions, {
|
|
3470
3641
|
minWidth: Number(minWidth)
|
|
3471
3642
|
});
|
|
3472
3643
|
});
|
|
@@ -3477,18 +3648,24 @@ function createWindowSizeHelper(currentWidth) {
|
|
|
3477
3648
|
}
|
|
3478
3649
|
|
|
3479
3650
|
function useKittTheme() {
|
|
3480
|
-
var
|
|
3481
|
-
width = _useWindowSize.width;
|
|
3482
|
-
|
|
3651
|
+
var dimensions = useWindowDimensions();
|
|
3483
3652
|
return useMemo(function () {
|
|
3484
3653
|
return {
|
|
3485
3654
|
kitt: theme,
|
|
3486
|
-
responsive: createWindowSizeHelper(
|
|
3655
|
+
responsive: createWindowSizeHelper(dimensions),
|
|
3487
3656
|
breakpoints: breakpoints
|
|
3488
3657
|
};
|
|
3489
|
-
}, [
|
|
3658
|
+
}, [dimensions]);
|
|
3490
3659
|
}
|
|
3491
3660
|
|
|
3661
|
+
var hex2rgba = function (hex) {
|
|
3662
|
+
var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
3663
|
+
var r = parseInt(hex.slice(1, 3), 16);
|
|
3664
|
+
var g = parseInt(hex.slice(3, 5), 16);
|
|
3665
|
+
var b = parseInt(hex.slice(5, 7), 16);
|
|
3666
|
+
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")");
|
|
3667
|
+
};
|
|
3668
|
+
|
|
3492
3669
|
function KittThemeProvider(_ref) {
|
|
3493
3670
|
var children = _ref.children;
|
|
3494
3671
|
var theme = useKittTheme();
|
|
@@ -3521,5 +3698,5 @@ function MatchWindowSize(_ref) {
|
|
|
3521
3698
|
});
|
|
3522
3699
|
}
|
|
3523
3700
|
|
|
3524
|
-
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, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor };
|
|
3701
|
+
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 };
|
|
3525
3702
|
//# sourceMappingURL=index-browser-all.es.js.map
|