@ornikar/kitt-universal 3.0.0-beta.1 → 3.2.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.d.ts +14 -0
- package/dist/definitions/Button/AnimatedButtonPressable.d.ts.map +1 -0
- package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts +17 -0
- package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts.map +1 -0
- package/dist/definitions/Button/BaseStyledButtonPressable.d.ts +11 -0
- package/dist/definitions/Button/BaseStyledButtonPressable.d.ts.map +1 -0
- package/dist/definitions/Button/Button.d.ts +9 -4
- package/dist/definitions/Button/Button.d.ts.map +1 -1
- package/dist/definitions/Button/ButtonContent.d.ts +11 -3
- package/dist/definitions/Button/ButtonContent.d.ts.map +1 -1
- package/dist/definitions/Button/StyledDisabled.d.ts +3 -0
- package/dist/definitions/Button/StyledDisabled.d.ts.map +1 -0
- package/dist/definitions/Button/isSubtle.d.ts +3 -0
- package/dist/definitions/Button/isSubtle.d.ts.map +1 -0
- package/dist/definitions/Icon/SpinningIcon.web.d.ts.map +1 -1
- package/dist/definitions/IconButton/PressableIconButton.d.ts.map +1 -1
- package/dist/definitions/Loader/LargeLoader.web.d.ts.map +1 -1
- package/dist/definitions/Loader/Loader.d.ts +1 -1
- package/dist/definitions/Loader/Loader.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +3 -43
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/buttonLateOceanTheme.d.ts +42 -35
- package/dist/definitions/themes/late-ocean/buttonLateOceanTheme.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/colorsLateOceanTheme.d.ts +2 -0
- package/dist/definitions/themes/late-ocean/colorsLateOceanTheme.d.ts.map +1 -1
- package/dist/definitions/typography/Typography.d.ts +11 -11
- package/dist/definitions/typography/TypographyIcon.d.ts +2 -2
- package/dist/definitions/typography/TypographyIcon.d.ts.map +1 -1
- package/dist/definitions/typography/TypographyLink.d.ts.map +1 -1
- package/dist/definitions/utils/withTheme.d.ts +2 -2
- package/dist/definitions/utils/withTheme.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +402 -223
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.css +1 -1
- package/dist/index-browser-all.es.ios.js +402 -223
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +406 -227
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +399 -214
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.css +1 -1
- package/dist/index-node-14.17.cjs.js +428 -196
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.css +5 -0
- package/dist/index-node-14.17.cjs.web.js +3173 -0
- package/dist/index-node-14.17.cjs.web.js.map +1 -0
- package/dist/styles.css +2 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +9 -8
- package/CHANGELOG.md +0 -131
- package/dist/definitions/Button/ButtonPressable.d.ts +0 -13
- package/dist/definitions/Button/ButtonPressable.d.ts.map +0 -1
|
@@ -5,7 +5,7 @@ export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
|
5
5
|
import { UserIcon, EyeIcon, EyeOffIcon, LoaderIcon, XIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon } from '@ornikar/kitt-icons';
|
|
6
6
|
export * from '@ornikar/kitt-icons';
|
|
7
7
|
import styled$1, { useTheme, css, ThemeProvider } from 'styled-components/native';
|
|
8
|
-
import { cloneElement, useContext, createContext,
|
|
8
|
+
import { cloneElement, useContext, createContext, forwardRef, useMemo, useState, Fragment, Children, useEffect } from 'react';
|
|
9
9
|
import { styled } from '@linaria/react';
|
|
10
10
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
11
11
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
@@ -29,8 +29,7 @@ function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) {
|
|
|
29
29
|
// return (<WrappedComponent theme={theme} {...(props as any)} />) as any;
|
|
30
30
|
// };
|
|
31
31
|
// }
|
|
32
|
-
function withTheme(
|
|
33
|
-
WrappedComponent) {
|
|
32
|
+
function withTheme(WrappedComponent) {
|
|
34
33
|
return function (props) {
|
|
35
34
|
var theme = /*#__PURE__*/useTheme();
|
|
36
35
|
return /*#__PURE__*/jsx(WrappedComponent, _objectSpread$h({
|
|
@@ -50,7 +49,7 @@ function SpinningIcon(_ref) {
|
|
|
50
49
|
});
|
|
51
50
|
}
|
|
52
51
|
|
|
53
|
-
var IconContainer$
|
|
52
|
+
var IconContainer$1 = /*#__PURE__*/styled$1(View).withConfig({
|
|
54
53
|
displayName: "Icon__IconContainer",
|
|
55
54
|
componentId: "kitt-universal__sc-usm0ol-0"
|
|
56
55
|
})(["color:", ";width:", "px;height:", "px;align-self:", ";"], function (_ref) {
|
|
@@ -77,7 +76,7 @@ function Icon(_ref5) {
|
|
|
77
76
|
var clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
78
77
|
color: color
|
|
79
78
|
});
|
|
80
|
-
return /*#__PURE__*/jsx(IconContainer$
|
|
79
|
+
return /*#__PURE__*/jsx(IconContainer$1, {
|
|
81
80
|
align: align,
|
|
82
81
|
size: size,
|
|
83
82
|
color: color,
|
|
@@ -135,7 +134,7 @@ var KittBreakpointsMax = {
|
|
|
135
134
|
LARGE: KittBreakpoints.WIDE - 1
|
|
136
135
|
};
|
|
137
136
|
|
|
138
|
-
var _excluded$
|
|
137
|
+
var _excluded$e = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
|
|
139
138
|
|
|
140
139
|
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; }
|
|
141
140
|
|
|
@@ -203,7 +202,7 @@ function Typography(_ref3) {
|
|
|
203
202
|
large = _ref3.large,
|
|
204
203
|
variant = _ref3.variant,
|
|
205
204
|
color = _ref3.color,
|
|
206
|
-
otherProps = _objectWithoutProperties(_ref3, _excluded$
|
|
205
|
+
otherProps = _objectWithoutProperties(_ref3, _excluded$e);
|
|
207
206
|
|
|
208
207
|
var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
|
|
209
208
|
var typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(base, small, medium, large);
|
|
@@ -284,7 +283,7 @@ Typography.h4 = createHeading(4, 'header4');
|
|
|
284
283
|
|
|
285
284
|
Typography.h5 = createHeading(5, 'header5');
|
|
286
285
|
|
|
287
|
-
var _excluded$
|
|
286
|
+
var _excluded$d = ["size"];
|
|
288
287
|
|
|
289
288
|
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; }
|
|
290
289
|
|
|
@@ -356,7 +355,7 @@ function AvatarContent(_ref5) {
|
|
|
356
355
|
function Avatar(_ref6) {
|
|
357
356
|
var _ref6$size = _ref6.size,
|
|
358
357
|
size = _ref6$size === void 0 ? 40 : _ref6$size,
|
|
359
|
-
rest = _objectWithoutProperties(_ref6, _excluded$
|
|
358
|
+
rest = _objectWithoutProperties(_ref6, _excluded$d);
|
|
360
359
|
|
|
361
360
|
return /*#__PURE__*/jsx(StyledAvatarView, _objectSpread$f(_objectSpread$f({}, rest), {}, {
|
|
362
361
|
size: size,
|
|
@@ -366,88 +365,257 @@ function Avatar(_ref6) {
|
|
|
366
365
|
}));
|
|
367
366
|
}
|
|
368
367
|
|
|
369
|
-
|
|
370
|
-
|
|
368
|
+
function isSubtle(type) {
|
|
369
|
+
return type.startsWith('subtle');
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
var _excluded$c = ["$type", "$isStretch", "disabled"];
|
|
371
373
|
|
|
372
374
|
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; }
|
|
373
375
|
|
|
374
376
|
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; }
|
|
377
|
+
var AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/styled("div")({
|
|
378
|
+
name: "AnimatedButtonPressableContainer",
|
|
379
|
+
"class": "a1vkj3mh",
|
|
380
|
+
vars: {
|
|
381
|
+
"a1vkj3mh-0": [function (_ref) {
|
|
382
|
+
var $isStretch = _ref.$isStretch;
|
|
383
|
+
return $isStretch ? 'inherit' : 'inline-flex';
|
|
384
|
+
}],
|
|
385
|
+
"a1vkj3mh-1": [function (_ref2) {
|
|
386
|
+
var $isStretch = _ref2.$isStretch;
|
|
387
|
+
return $isStretch ? 'stretch' : 'baseline';
|
|
388
|
+
}],
|
|
389
|
+
"a1vkj3mh-2": [function (_ref3) {
|
|
390
|
+
var theme = _ref3.theme;
|
|
391
|
+
return theme.breakpoints.min.mediumBreakpoint;
|
|
392
|
+
}],
|
|
393
|
+
"a1vkj3mh-3": [function (_ref4) {
|
|
394
|
+
var theme = _ref4.theme;
|
|
395
|
+
return theme.kitt.button.scale.medium.hover;
|
|
396
|
+
}],
|
|
397
|
+
"a1vkj3mh-4": [function (_ref5) {
|
|
398
|
+
var theme = _ref5.theme,
|
|
399
|
+
$isDisabled = _ref5.$isDisabled;
|
|
400
|
+
return "scale(".concat($isDisabled ? 1 : theme.kitt.button.scale.base.active, ")");
|
|
401
|
+
}],
|
|
402
|
+
"a1vkj3mh-5": [function (_ref6) {
|
|
403
|
+
var theme = _ref6.theme,
|
|
404
|
+
$type = _ref6.$type,
|
|
405
|
+
$isDisabled = _ref6.$isDisabled;
|
|
406
|
+
if ($isDisabled) return theme.kitt.button.disabled.hoverBackgroundColor;
|
|
407
|
+
return theme.kitt.button[$type].hoverBackgroundColor;
|
|
408
|
+
}],
|
|
409
|
+
"a1vkj3mh-6": [function (_ref7) {
|
|
410
|
+
var theme = _ref7.theme;
|
|
411
|
+
var _theme$kitt$button$tr = theme.kitt.button.transition,
|
|
412
|
+
duration = _theme$kitt$button$tr.duration,
|
|
413
|
+
timingFunction = _theme$kitt$button$tr.timingFunction;
|
|
414
|
+
return "color, background, border-color, ".concat(duration, " ").concat(timingFunction);
|
|
415
|
+
}],
|
|
416
|
+
"a1vkj3mh-7": [function (_ref8) {
|
|
417
|
+
var theme = _ref8.theme;
|
|
418
|
+
return theme.kitt.button.borderRadius;
|
|
419
|
+
}],
|
|
420
|
+
"a1vkj3mh-8": [function (_ref9) {
|
|
421
|
+
var theme = _ref9.theme;
|
|
422
|
+
return "opacity ".concat(theme.kitt.button.transition.duration, " ").concat(theme.kitt.button.transition.timingFunction);
|
|
423
|
+
}],
|
|
424
|
+
"a1vkj3mh-9": [function (_ref10) {
|
|
425
|
+
var $isDisabled = _ref10.$isDisabled;
|
|
426
|
+
return $isDisabled ? 1 : 0;
|
|
427
|
+
}],
|
|
428
|
+
"a1vkj3mh-10": [function (_ref11) {
|
|
429
|
+
var theme = _ref11.theme;
|
|
430
|
+
return "-".concat(theme.kitt.button.borderWidth.disabled);
|
|
431
|
+
}],
|
|
432
|
+
"a1vkj3mh-12": [function (_ref12) {
|
|
433
|
+
var theme = _ref12.theme;
|
|
434
|
+
return "calc(100% - ".concat(parseInt(theme.kitt.button.borderWidth.disabled, 10) * 0.5, "px)");
|
|
435
|
+
}],
|
|
436
|
+
"a1vkj3mh-14": [function (_ref13) {
|
|
437
|
+
var theme = _ref13.theme;
|
|
438
|
+
return "".concat(theme.kitt.button.disabled.borderColor, " solid ").concat(theme.kitt.button.borderWidth.disabled);
|
|
439
|
+
}],
|
|
440
|
+
"a1vkj3mh-15": [function (_ref14) {
|
|
441
|
+
var theme = _ref14.theme,
|
|
442
|
+
$type = _ref14.$type;
|
|
443
|
+
return "".concat(theme.kitt.button.borderWidth.focus, " solid ").concat(theme.kitt.button[$type].focusBorderColor);
|
|
444
|
+
}],
|
|
445
|
+
"a1vkj3mh-16": [function (_ref15) {
|
|
446
|
+
var theme = _ref15.theme;
|
|
447
|
+
return "-".concat(theme.kitt.button.borderWidth.focus);
|
|
448
|
+
}],
|
|
449
|
+
"a1vkj3mh-18": [function (_ref16) {
|
|
450
|
+
var theme = _ref16.theme,
|
|
451
|
+
$type = _ref16.$type,
|
|
452
|
+
$isDisabled = _ref16.$isDisabled;
|
|
453
|
+
if ($isDisabled) return theme.kitt.typography.colors['black-light'];
|
|
454
|
+
if (!isSubtle($type)) return 'inherit';
|
|
455
|
+
return theme.kitt.button[$type].color;
|
|
456
|
+
}],
|
|
457
|
+
"a1vkj3mh-19": [function (_ref17) {
|
|
458
|
+
var theme = _ref17.theme,
|
|
459
|
+
$type = _ref17.$type,
|
|
460
|
+
$isDisabled = _ref17.$isDisabled;
|
|
461
|
+
if ($isDisabled) return theme.kitt.typography.colors['black-light'];
|
|
462
|
+
if (!isSubtle($type)) return 'inherit';
|
|
463
|
+
return theme.kitt.button[$type].hoverColor;
|
|
464
|
+
}],
|
|
465
|
+
"a1vkj3mh-20": [function (_ref18) {
|
|
466
|
+
var theme = _ref18.theme,
|
|
467
|
+
$type = _ref18.$type,
|
|
468
|
+
$isDisabled = _ref18.$isDisabled;
|
|
469
|
+
if ($isDisabled) return theme.kitt.typography.colors['black-light'];
|
|
470
|
+
if (!isSubtle($type)) return 'inherit';
|
|
471
|
+
return theme.kitt.button[$type].activeColor;
|
|
472
|
+
}]
|
|
473
|
+
}
|
|
474
|
+
}));
|
|
475
|
+
var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref19, ref) {
|
|
476
|
+
var $type = _ref19.$type,
|
|
477
|
+
$isStretch = _ref19.$isStretch,
|
|
478
|
+
disabled = _ref19.disabled,
|
|
479
|
+
props = _objectWithoutProperties(_ref19, _excluded$c);
|
|
480
|
+
|
|
481
|
+
return /*#__PURE__*/jsx(AnimatedButtonPressableContainer, {
|
|
482
|
+
ref: ref,
|
|
483
|
+
$type: $type,
|
|
484
|
+
$isDisabled: !!disabled,
|
|
485
|
+
$isStretch: $isStretch,
|
|
486
|
+
children: /*#__PURE__*/jsx(Pressable, _objectSpread$e({
|
|
487
|
+
disabled: disabled
|
|
488
|
+
}, props))
|
|
489
|
+
});
|
|
490
|
+
});
|
|
375
491
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
}
|
|
492
|
+
var BaseStyledButtonPressable = /*#__PURE__*/styled$1(View).withConfig({
|
|
493
|
+
displayName: "BaseStyledButtonPressable",
|
|
494
|
+
componentId: "kitt-universal__sc-4k8lse-0"
|
|
495
|
+
})(["position:relative;min-width:", ";max-width:", ";width:", ";min-height:", ";border-radius:", ";flex-direction:row;align-items:center;justify-content:center;align-self:flex-start;background-color:", ";padding:", ";"], function (_ref) {
|
|
496
|
+
var theme = _ref.theme;
|
|
497
|
+
return theme.kitt.button.minWidth;
|
|
498
|
+
}, function (_ref2) {
|
|
499
|
+
var theme = _ref2.theme,
|
|
500
|
+
$isStretch = _ref2.$isStretch;
|
|
501
|
+
return $isStretch ? '100%' : theme.kitt.button.maxWidth;
|
|
502
|
+
}, function (_ref3) {
|
|
503
|
+
var $isStretch = _ref3.$isStretch;
|
|
504
|
+
return $isStretch ? '100%' : 'auto';
|
|
505
|
+
}, function (_ref4) {
|
|
506
|
+
var theme = _ref4.theme;
|
|
507
|
+
return theme.kitt.button.minHeight;
|
|
508
|
+
}, function (_ref5) {
|
|
509
|
+
var theme = _ref5.theme;
|
|
510
|
+
return theme.kitt.button.borderRadius;
|
|
511
|
+
}, function (_ref6) {
|
|
512
|
+
var theme = _ref6.theme,
|
|
513
|
+
$isDisabled = _ref6.$isDisabled,
|
|
514
|
+
$type = _ref6.$type;
|
|
515
|
+
if ($isDisabled) return theme.kitt.button.disabled.backgroundColor;
|
|
516
|
+
return theme.kitt.button[$type].backgroundColor;
|
|
517
|
+
}, function (_ref7) {
|
|
518
|
+
var theme = _ref7.theme,
|
|
519
|
+
$isLarge = _ref7.$isLarge,
|
|
520
|
+
$isDisabled = _ref7.$isDisabled;
|
|
521
|
+
var _theme$kitt$button$co = theme.kitt.button.contentPadding,
|
|
522
|
+
large = _theme$kitt$button$co.large,
|
|
523
|
+
defaultPadding = _theme$kitt$button$co["default"],
|
|
524
|
+
disabledPadding = _theme$kitt$button$co.disabled;
|
|
525
|
+
if ($isLarge) return large;
|
|
526
|
+
if ($isDisabled) return disabledPadding;
|
|
527
|
+
return defaultPadding;
|
|
528
|
+
});
|
|
529
|
+
|
|
530
|
+
var _excluded$b = ["color"],
|
|
531
|
+
_excluded2$2 = ["color"];
|
|
532
|
+
|
|
533
|
+
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; }
|
|
534
|
+
|
|
535
|
+
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; }
|
|
383
536
|
|
|
384
537
|
function TypographyIconSpecifiedColor(_ref) {
|
|
385
538
|
var color = _ref.color,
|
|
386
|
-
|
|
539
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
387
540
|
|
|
388
541
|
var theme = /*#__PURE__*/useTheme();
|
|
389
|
-
return /*#__PURE__*/jsx(Icon, _objectSpread$
|
|
390
|
-
color: theme.kitt.typography.colors[color]
|
|
542
|
+
return /*#__PURE__*/jsx(Icon, _objectSpread$d(_objectSpread$d({}, props), {}, {
|
|
543
|
+
color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
|
|
391
544
|
}));
|
|
392
545
|
}
|
|
393
546
|
|
|
547
|
+
function TypographyIconInheritColor(props) {
|
|
548
|
+
var color = useTypographyColor();
|
|
549
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$d({
|
|
550
|
+
color: color
|
|
551
|
+
}, props));
|
|
552
|
+
}
|
|
553
|
+
|
|
394
554
|
function TypographyIcon(_ref2) {
|
|
395
555
|
var color = _ref2.color,
|
|
396
|
-
|
|
556
|
+
props = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
397
557
|
|
|
398
558
|
if (color) {
|
|
399
|
-
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$
|
|
559
|
+
return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$d({
|
|
400
560
|
color: color
|
|
401
|
-
},
|
|
561
|
+
}, props));
|
|
402
562
|
}
|
|
403
563
|
|
|
404
|
-
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$
|
|
564
|
+
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$d({}, props));
|
|
405
565
|
}
|
|
406
566
|
|
|
407
|
-
|
|
567
|
+
var _excluded$a = ["type", "isDisabled", "$isStretch", "icon", "children"];
|
|
408
568
|
|
|
409
|
-
function
|
|
569
|
+
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; }
|
|
410
570
|
|
|
411
|
-
var
|
|
412
|
-
if (disabled) return 'black-light';
|
|
571
|
+
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; }
|
|
413
572
|
|
|
573
|
+
var getTextColorByType = function (type) {
|
|
414
574
|
switch (type) {
|
|
415
575
|
case 'primary':
|
|
416
576
|
return 'white';
|
|
417
577
|
|
|
578
|
+
case 'white':
|
|
579
|
+
return 'white';
|
|
580
|
+
|
|
418
581
|
case 'subtle':
|
|
419
|
-
return
|
|
582
|
+
return 'primary';
|
|
420
583
|
|
|
421
584
|
case 'subtle-dark':
|
|
422
|
-
return
|
|
585
|
+
return 'black';
|
|
423
586
|
|
|
424
|
-
case 'secondary':
|
|
425
587
|
default:
|
|
426
588
|
return 'black';
|
|
427
589
|
}
|
|
428
590
|
};
|
|
429
591
|
|
|
430
|
-
var
|
|
431
|
-
displayName: "
|
|
592
|
+
var StyledButtonText = /*#__PURE__*/styled$1(Typography.Text).withConfig({
|
|
593
|
+
displayName: "ButtonContent__StyledButtonText",
|
|
432
594
|
componentId: "kitt-universal__sc-dnyw3n-0"
|
|
433
|
-
})(["text-align:center;"])
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
}
|
|
438
|
-
var
|
|
439
|
-
|
|
440
|
-
|
|
595
|
+
})(["text-align:center;", " ", ""], function () {
|
|
596
|
+
// Make the multilines case work properly on native
|
|
597
|
+
// Breaks the web implem
|
|
598
|
+
return undefined;
|
|
599
|
+
}, function (_ref) {
|
|
600
|
+
var $type = _ref.$type,
|
|
601
|
+
$isDisabled = _ref.$isDisabled;
|
|
602
|
+
|
|
603
|
+
/* For subltes button, color changes when hovered.
|
|
604
|
+
* We don't want to use a mouse event handler with a react state to handle it
|
|
605
|
+
* For this precise case, we've decided to work outside the typography logic
|
|
606
|
+
*/
|
|
607
|
+
if ($isDisabled || !isSubtle($type)) return undefined;
|
|
608
|
+
return 'color: inherit';
|
|
441
609
|
});
|
|
442
|
-
var
|
|
443
|
-
displayName: "
|
|
444
|
-
componentId: "kitt-universal__sc-dnyw3n-
|
|
610
|
+
var StyledIconContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
611
|
+
displayName: "ButtonContent__StyledIconContainer",
|
|
612
|
+
componentId: "kitt-universal__sc-dnyw3n-1"
|
|
445
613
|
})(["", ""], function (_ref2) {
|
|
446
614
|
var theme = _ref2.theme,
|
|
447
|
-
iconPosition = _ref2
|
|
448
|
-
var value = theme.kitt.spacing *
|
|
615
|
+
$iconPosition = _ref2.$iconPosition;
|
|
616
|
+
var value = theme.kitt.spacing * 2;
|
|
449
617
|
|
|
450
|
-
if (iconPosition === 'left') {
|
|
618
|
+
if ($iconPosition === 'left') {
|
|
451
619
|
return "margin: 0 ".concat(value, "px 0 0;");
|
|
452
620
|
}
|
|
453
621
|
|
|
@@ -456,39 +624,33 @@ var IconContainer$1 = /*#__PURE__*/styled$1(View).withConfig({
|
|
|
456
624
|
|
|
457
625
|
function ButtonIcon(_ref3) {
|
|
458
626
|
var icon = _ref3.icon,
|
|
459
|
-
spin = _ref3.spin,
|
|
460
627
|
color = _ref3.color,
|
|
461
|
-
|
|
628
|
+
spin = _ref3.spin,
|
|
462
629
|
iconPosition = _ref3.iconPosition,
|
|
463
630
|
testID = _ref3.testID;
|
|
464
|
-
return /*#__PURE__*/jsx(
|
|
465
|
-
iconPosition: iconPosition,
|
|
631
|
+
return /*#__PURE__*/jsx(StyledIconContainer, {
|
|
632
|
+
$iconPosition: iconPosition,
|
|
466
633
|
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
467
634
|
icon: icon,
|
|
468
635
|
spin: spin,
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
testID: testID
|
|
636
|
+
testID: testID,
|
|
637
|
+
color: color
|
|
472
638
|
})
|
|
473
639
|
});
|
|
474
640
|
}
|
|
475
641
|
|
|
476
|
-
|
|
642
|
+
var StyledChildrenWithIcon = /*#__PURE__*/styled$1(View).withConfig({
|
|
643
|
+
displayName: "ButtonContent__StyledChildrenWithIcon",
|
|
644
|
+
componentId: "kitt-universal__sc-dnyw3n-2"
|
|
645
|
+
})(["align-items:center;justify-content:center;flex-direction:row;"]);
|
|
646
|
+
function ButtonContentChildren(_ref4) {
|
|
477
647
|
var type = _ref4.type,
|
|
478
|
-
isPressed = _ref4.isPressed,
|
|
479
|
-
stretch = _ref4.stretch,
|
|
480
648
|
icon = _ref4.icon,
|
|
481
649
|
iconPosition = _ref4.iconPosition,
|
|
482
650
|
iconSpin = _ref4.iconSpin,
|
|
483
|
-
|
|
651
|
+
isDisabled = _ref4.isDisabled,
|
|
652
|
+
color = _ref4.color,
|
|
484
653
|
children = _ref4.children;
|
|
485
|
-
var color = getTextColorByType(type, Boolean(isPressed), Boolean(disabled));
|
|
486
|
-
var theme = /*#__PURE__*/useTheme();
|
|
487
|
-
var sharedIconProps = {
|
|
488
|
-
spin: iconSpin,
|
|
489
|
-
color: color,
|
|
490
|
-
size: theme.kitt.button.iconSize
|
|
491
|
-
};
|
|
492
654
|
|
|
493
655
|
if ((process.env.NODE_ENV !== "production")) {
|
|
494
656
|
if (!(children || icon)) {
|
|
@@ -496,129 +658,121 @@ function ButtonContent(_ref4) {
|
|
|
496
658
|
}
|
|
497
659
|
}
|
|
498
660
|
|
|
661
|
+
var isWebSubtle = isSubtle(type) && "web" === 'web' && !isDisabled;
|
|
662
|
+
|
|
499
663
|
if (!children) {
|
|
500
|
-
return /*#__PURE__*/jsx(
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
}))
|
|
664
|
+
return /*#__PURE__*/jsx(TypographyIcon, {
|
|
665
|
+
spin: iconSpin // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
666
|
+
,
|
|
667
|
+
icon: icon,
|
|
668
|
+
color: isWebSubtle ? 'inherit' : color
|
|
506
669
|
});
|
|
507
670
|
}
|
|
508
671
|
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
672
|
+
var buttonIconSharedProps = {
|
|
673
|
+
type: type,
|
|
674
|
+
spin: iconSpin,
|
|
675
|
+
iconPosition: iconPosition,
|
|
676
|
+
color: isWebSubtle ? 'inherit' : color
|
|
677
|
+
};
|
|
678
|
+
return /*#__PURE__*/jsxs(StyledChildrenWithIcon, {
|
|
679
|
+
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$c(_objectSpread$c({}, buttonIconSharedProps), {}, {
|
|
680
|
+
testID: "button-left-icon",
|
|
681
|
+
icon: icon
|
|
682
|
+
})) : null, /*#__PURE__*/jsx(StyledButtonText, {
|
|
516
683
|
base: "body",
|
|
517
|
-
color: color,
|
|
518
684
|
variant: "bold",
|
|
685
|
+
$type: type,
|
|
686
|
+
$isDisabled: isDisabled // set to color: inherit via styled components
|
|
687
|
+
,
|
|
688
|
+
color: isWebSubtle ? undefined : color,
|
|
519
689
|
children: children
|
|
520
|
-
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$
|
|
521
|
-
icon: icon
|
|
522
|
-
iconPosition: iconPosition
|
|
690
|
+
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$c(_objectSpread$c({}, buttonIconSharedProps), {}, {
|
|
691
|
+
icon: icon
|
|
523
692
|
})) : null]
|
|
524
693
|
});
|
|
525
694
|
}
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
return
|
|
533
|
-
}, function (_ref2) {
|
|
534
|
-
var theme = _ref2.theme,
|
|
535
|
-
stretch = _ref2.stretch;
|
|
536
|
-
return stretch ? 'auto' : theme.kitt.button.maxWidth;
|
|
537
|
-
}, function (_ref3) {
|
|
538
|
-
var stretch = _ref3.stretch;
|
|
539
|
-
return stretch ? '100%' : 'auto';
|
|
540
|
-
}, function (_ref4) {
|
|
541
|
-
var theme = _ref4.theme;
|
|
542
|
-
return theme.kitt.button.minHeight;
|
|
543
|
-
}, function (_ref5) {
|
|
544
|
-
var theme = _ref5.theme,
|
|
545
|
-
isPressed = _ref5.isPressed,
|
|
546
|
-
disabled = _ref5.disabled,
|
|
547
|
-
type = _ref5.type;
|
|
548
|
-
|
|
549
|
-
if (disabled) {
|
|
550
|
-
return theme.kitt.button[type].disabledBackgroundColor;
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
return isPressed ? theme.kitt.button[type].pressedBackgroundColor : theme.kitt.button[type].backgroundColor;
|
|
695
|
+
var ButtonContentContainer = /*#__PURE__*/styled$1(View).withConfig({
|
|
696
|
+
displayName: "ButtonContent__ButtonContentContainer",
|
|
697
|
+
componentId: "kitt-universal__sc-dnyw3n-3"
|
|
698
|
+
})(["line-height:16px;", " ", ";"], function (_ref5) {
|
|
699
|
+
var $isStretch = _ref5.$isStretch,
|
|
700
|
+
$isIconOnly = _ref5.$isIconOnly;
|
|
701
|
+
return "\n flex: ".concat($isStretch || $isIconOnly ? 1 : 0, " 1 auto;\n ");
|
|
554
702
|
}, function (_ref6) {
|
|
555
|
-
var
|
|
556
|
-
return
|
|
557
|
-
}, function (_ref7) {
|
|
558
|
-
var theme = _ref7.theme;
|
|
559
|
-
return theme.kitt.button.borderRadius;
|
|
560
|
-
}, function (_ref8) {
|
|
561
|
-
var theme = _ref8.theme,
|
|
562
|
-
disabled = _ref8.disabled,
|
|
563
|
-
type = _ref8.type;
|
|
564
|
-
return disabled ? theme.kitt.button[type].disabledBorderColor : 'transparent';
|
|
565
|
-
}, function (_ref9) {
|
|
566
|
-
var theme = _ref9.theme;
|
|
567
|
-
return theme.kitt.button.borderWidth;
|
|
568
|
-
});
|
|
703
|
+
var $isSubtle = _ref6.$isSubtle;
|
|
704
|
+
if (!$isSubtle) return undefined; // Needed for subtle type
|
|
569
705
|
|
|
570
|
-
|
|
706
|
+
return 'color: inherit';
|
|
707
|
+
});
|
|
708
|
+
function ButtonContent(_ref7) {
|
|
709
|
+
var type = _ref7.type,
|
|
710
|
+
isDisabled = _ref7.isDisabled,
|
|
711
|
+
$isStretch = _ref7.$isStretch,
|
|
712
|
+
icon = _ref7.icon,
|
|
713
|
+
children = _ref7.children,
|
|
714
|
+
props = _objectWithoutProperties(_ref7, _excluded$a);
|
|
715
|
+
|
|
716
|
+
var color = isDisabled ? 'black-light' : getTextColorByType(type);
|
|
717
|
+
return /*#__PURE__*/jsx(ButtonContentContainer, {
|
|
718
|
+
$isSubtle: isSubtle(type),
|
|
719
|
+
$isStretch: $isStretch,
|
|
720
|
+
$isIconOnly: Boolean(!children && icon),
|
|
721
|
+
children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread$c(_objectSpread$c({
|
|
722
|
+
icon: icon,
|
|
723
|
+
type: type,
|
|
724
|
+
isDisabled: isDisabled,
|
|
725
|
+
color: color
|
|
726
|
+
}, props), {}, {
|
|
727
|
+
children: children
|
|
728
|
+
}))
|
|
729
|
+
});
|
|
730
|
+
}
|
|
571
731
|
|
|
572
|
-
|
|
573
|
-
function Button(_ref) {
|
|
732
|
+
var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
574
733
|
var children = _ref.children,
|
|
575
734
|
_ref$type = _ref.type,
|
|
576
|
-
type = _ref$type === void 0 ? '
|
|
735
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
736
|
+
disabled = _ref.disabled,
|
|
737
|
+
stretch = _ref.stretch,
|
|
738
|
+
large = _ref.large,
|
|
577
739
|
icon = _ref.icon,
|
|
578
740
|
_ref$iconPosition = _ref.iconPosition,
|
|
579
741
|
iconPosition = _ref$iconPosition === void 0 ? 'left' : _ref$iconPosition,
|
|
580
742
|
iconSpin = _ref.iconSpin,
|
|
581
|
-
stretch = _ref.stretch,
|
|
582
|
-
disabled = _ref.disabled,
|
|
583
743
|
testID = _ref.testID,
|
|
584
744
|
href = _ref.href,
|
|
585
745
|
hrefAttrs = _ref.hrefAttrs,
|
|
746
|
+
_ref$accessibilityRol = _ref.accessibilityRole,
|
|
747
|
+
accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
|
|
586
748
|
onPress = _ref.onPress;
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
isPressed = _useState2[0],
|
|
591
|
-
setIsPressed = _useState2[1];
|
|
592
|
-
|
|
593
|
-
var sharedProps = {
|
|
594
|
-
type: type,
|
|
595
|
-
stretch: stretch,
|
|
596
|
-
disabled: disabled
|
|
597
|
-
};
|
|
598
|
-
return /*#__PURE__*/jsx(ButtonPressable // eslint-disable-next-line unicorn/expiring-todo-comments
|
|
599
|
-
// TODO: When designs are defined, update with the proper onPress styles to mimic TouchableHighlight
|
|
600
|
-
// underlayColor={globalTheme.button[type].pressedBackgroundColor}
|
|
601
|
-
, _objectSpread$c(_objectSpread$c({}, sharedProps), {}, {
|
|
602
|
-
isPressed: isPressed,
|
|
603
|
-
accessibilityRole: "button",
|
|
749
|
+
return /*#__PURE__*/jsx(AnimatedButtonPressable, {
|
|
750
|
+
ref: ref,
|
|
751
|
+
accessibilityRole: accessibilityRole,
|
|
604
752
|
testID: testID,
|
|
605
753
|
href: href,
|
|
606
754
|
hrefAttrs: hrefAttrs,
|
|
755
|
+
disabled: disabled,
|
|
756
|
+
$isStretch: stretch,
|
|
757
|
+
$type: type,
|
|
607
758
|
onPress: onPress,
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
}
|
|
759
|
+
children: /*#__PURE__*/jsxs(BaseStyledButtonPressable, {
|
|
760
|
+
$type: type,
|
|
761
|
+
$isStretch: stretch,
|
|
762
|
+
$isLarge: large,
|
|
763
|
+
$isDisabled: disabled,
|
|
764
|
+
children: [/*#__PURE__*/jsx(ButtonContent, {
|
|
765
|
+
type: type,
|
|
766
|
+
$isStretch: stretch,
|
|
767
|
+
isDisabled: disabled,
|
|
768
|
+
icon: icon,
|
|
769
|
+
iconPosition: iconPosition,
|
|
770
|
+
iconSpin: iconSpin,
|
|
771
|
+
children: children
|
|
772
|
+
}), null]
|
|
773
|
+
})
|
|
774
|
+
});
|
|
775
|
+
});
|
|
622
776
|
|
|
623
777
|
var Container$5 = /*#__PURE__*/styled$1(View).withConfig({
|
|
624
778
|
displayName: "Card__Container",
|
|
@@ -2361,47 +2515,98 @@ var avatarLateOceanTheme = {
|
|
|
2361
2515
|
}
|
|
2362
2516
|
};
|
|
2363
2517
|
|
|
2518
|
+
var colorsLateOceanTheme = {
|
|
2519
|
+
primary: lateOceanColorPalette.lateOcean,
|
|
2520
|
+
primaryLight: lateOceanColorPalette.lateOceanLight1,
|
|
2521
|
+
accent: lateOceanColorPalette.warmEmbrace,
|
|
2522
|
+
accentLight: lateOceanColorPalette.warmEmbraceLight1,
|
|
2523
|
+
success: lateOceanColorPalette.viride,
|
|
2524
|
+
correct: lateOceanColorPalette.viride,
|
|
2525
|
+
danger: lateOceanColorPalette.englishVermillon,
|
|
2526
|
+
separator: lateOceanColorPalette.black100,
|
|
2527
|
+
hover: lateOceanColorPalette.black100,
|
|
2528
|
+
black: lateOceanColorPalette.black1000,
|
|
2529
|
+
uiBackground: lateOceanColorPalette.black25,
|
|
2530
|
+
uiBackgroundLight: lateOceanColorPalette.white,
|
|
2531
|
+
transparent: lateOceanColorPalette.transparent,
|
|
2532
|
+
disabled: lateOceanColorPalette.black50,
|
|
2533
|
+
overlay: {
|
|
2534
|
+
dark: 'rgba(41, 48, 51, 0.25)',
|
|
2535
|
+
light: 'rgba(255, 255, 255, 0.90)',
|
|
2536
|
+
fullscreenLoader: 'rgba(0, 0, 0, 0.25)'
|
|
2537
|
+
}
|
|
2538
|
+
};
|
|
2539
|
+
|
|
2364
2540
|
var buttonLateOceanTheme = {
|
|
2365
2541
|
borderRadius: '30px',
|
|
2366
|
-
borderWidth:
|
|
2367
|
-
|
|
2542
|
+
borderWidth: {
|
|
2543
|
+
disabled: '2px',
|
|
2544
|
+
focus: '3px'
|
|
2545
|
+
},
|
|
2546
|
+
minHeight: '40px',
|
|
2368
2547
|
minWidth: '40px',
|
|
2369
2548
|
maxWidth: '335px',
|
|
2370
|
-
|
|
2549
|
+
scale: {
|
|
2550
|
+
base: {
|
|
2551
|
+
"default": 1,
|
|
2552
|
+
hover: 0.95,
|
|
2553
|
+
active: 0.95
|
|
2554
|
+
},
|
|
2555
|
+
medium: {
|
|
2556
|
+
hover: 1.05
|
|
2557
|
+
}
|
|
2558
|
+
},
|
|
2371
2559
|
contentPadding: {
|
|
2372
|
-
"default": '8px 16px'
|
|
2560
|
+
"default": '8px 16px 7px',
|
|
2561
|
+
large: '12px 24px 11px',
|
|
2562
|
+
disabled: '6px 14px 5px'
|
|
2373
2563
|
},
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
pressedBackgroundColor: lateOceanColorPalette.lateOceanLight1,
|
|
2378
|
-
disabledBorderColor: lateOceanColorPalette.black100
|
|
2564
|
+
transition: {
|
|
2565
|
+
duration: '200ms',
|
|
2566
|
+
timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
|
|
2379
2567
|
},
|
|
2380
|
-
|
|
2568
|
+
"default": {
|
|
2381
2569
|
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
2382
|
-
disabledBackgroundColor: lateOceanColorPalette.black50,
|
|
2383
2570
|
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
subtle: {
|
|
2387
|
-
backgroundColor: lateOceanColorPalette.transparent,
|
|
2388
|
-
disabledBackgroundColor: lateOceanColorPalette.transparent,
|
|
2389
|
-
pressedBackgroundColor: lateOceanColorPalette.transparent,
|
|
2390
|
-
disabledBorderColor: lateOceanColorPalette.transparent
|
|
2571
|
+
hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
2572
|
+
focusBorderColor: 'rgba(0, 0, 0, 0.1)'
|
|
2391
2573
|
},
|
|
2392
|
-
|
|
2393
|
-
backgroundColor:
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2574
|
+
primary: {
|
|
2575
|
+
backgroundColor: colorsLateOceanTheme.primary,
|
|
2576
|
+
pressedBackgroundColor: colorsLateOceanTheme.primaryLight,
|
|
2577
|
+
hoverBackgroundColor: colorsLateOceanTheme.primaryLight,
|
|
2578
|
+
focusBorderColor: 'rgba(76, 52, 224, 0.2)'
|
|
2397
2579
|
},
|
|
2398
2580
|
white: {
|
|
2399
2581
|
backgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
2400
|
-
disabledBackgroundColor: lateOceanColorPalette.transparent,
|
|
2401
|
-
hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
2402
2582
|
pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
2403
|
-
|
|
2404
|
-
|
|
2583
|
+
hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
2584
|
+
focusBorderColor: 'rgba(255, 255, 255, 0.1)'
|
|
2585
|
+
},
|
|
2586
|
+
subtle: {
|
|
2587
|
+
backgroundColor: colorsLateOceanTheme.transparent,
|
|
2588
|
+
pressedBackgroundColor: colorsLateOceanTheme.transparent,
|
|
2589
|
+
hoverBackgroundColor: colorsLateOceanTheme.transparent,
|
|
2590
|
+
focusBorderColor: 'rgba(76, 52, 224, 0.2)',
|
|
2591
|
+
color: colorsLateOceanTheme.primary,
|
|
2592
|
+
hoverColor: 'rgba(76, 52, 224, 0.8)',
|
|
2593
|
+
activeColor: 'rgba(76, 52, 224, 0.8)'
|
|
2594
|
+
},
|
|
2595
|
+
'subtle-dark': {
|
|
2596
|
+
backgroundColor: colorsLateOceanTheme.transparent,
|
|
2597
|
+
pressedBackgroundColor: colorsLateOceanTheme.transparent,
|
|
2598
|
+
hoverBackgroundColor: colorsLateOceanTheme.transparent,
|
|
2599
|
+
focusBorderColor: 'rgba(0, 0, 0, 0.1)',
|
|
2600
|
+
color: colorsLateOceanTheme.black,
|
|
2601
|
+
hoverColor: 'rgba(0, 0, 0, 0.8)',
|
|
2602
|
+
activeColor: 'rgba(0, 0, 0, 0.8)'
|
|
2603
|
+
},
|
|
2604
|
+
disabled: {
|
|
2605
|
+
backgroundColor: colorsLateOceanTheme.disabled,
|
|
2606
|
+
pressedBackgroundColor: colorsLateOceanTheme.disabled,
|
|
2607
|
+
hoverBackgroundColor: colorsLateOceanTheme.disabled,
|
|
2608
|
+
focusBorderColor: lateOceanColorPalette.black100,
|
|
2609
|
+
borderColor: lateOceanColorPalette.black100
|
|
2405
2610
|
}
|
|
2406
2611
|
};
|
|
2407
2612
|
|
|
@@ -2423,26 +2628,6 @@ var cardLateOceanTheme = {
|
|
|
2423
2628
|
}
|
|
2424
2629
|
};
|
|
2425
2630
|
|
|
2426
|
-
var colorsLateOceanTheme = {
|
|
2427
|
-
primary: lateOceanColorPalette.lateOcean,
|
|
2428
|
-
primaryLight: lateOceanColorPalette.lateOceanLight1,
|
|
2429
|
-
accent: lateOceanColorPalette.warmEmbrace,
|
|
2430
|
-
accentLight: lateOceanColorPalette.warmEmbraceLight1,
|
|
2431
|
-
success: lateOceanColorPalette.viride,
|
|
2432
|
-
correct: lateOceanColorPalette.viride,
|
|
2433
|
-
danger: lateOceanColorPalette.englishVermillon,
|
|
2434
|
-
separator: lateOceanColorPalette.black100,
|
|
2435
|
-
hover: lateOceanColorPalette.black100,
|
|
2436
|
-
black: lateOceanColorPalette.black1000,
|
|
2437
|
-
uiBackground: lateOceanColorPalette.black25,
|
|
2438
|
-
uiBackgroundLight: lateOceanColorPalette.white,
|
|
2439
|
-
overlay: {
|
|
2440
|
-
dark: 'rgba(41, 48, 51, 0.25)',
|
|
2441
|
-
light: 'rgba(255, 255, 255, 0.90)',
|
|
2442
|
-
fullscreenLoader: 'rgba(0, 0, 0, 0.25)'
|
|
2443
|
-
}
|
|
2444
|
-
};
|
|
2445
|
-
|
|
2446
2631
|
var feedbackMessageLateOceanTheme = {
|
|
2447
2632
|
backgroundColors: {
|
|
2448
2633
|
success: lateOceanColorPalette.viride,
|
|
@@ -2556,11 +2741,11 @@ var iconButton = {
|
|
|
2556
2741
|
},
|
|
2557
2742
|
disabled: {
|
|
2558
2743
|
scale: 1,
|
|
2559
|
-
backgroundColor: buttonLateOceanTheme.
|
|
2560
|
-
borderColor: buttonLateOceanTheme.
|
|
2744
|
+
backgroundColor: buttonLateOceanTheme.disabled.backgroundColor,
|
|
2745
|
+
borderColor: buttonLateOceanTheme.disabled.borderColor
|
|
2561
2746
|
},
|
|
2562
2747
|
"default": {
|
|
2563
|
-
pressedBackgroundColor: buttonLateOceanTheme.
|
|
2748
|
+
pressedBackgroundColor: buttonLateOceanTheme["default"].pressedBackgroundColor
|
|
2564
2749
|
},
|
|
2565
2750
|
white: {
|
|
2566
2751
|
pressedBackgroundColor: buttonLateOceanTheme.white.hoverBackgroundColor
|
|
@@ -2726,7 +2911,7 @@ var breakpoints = {
|
|
|
2726
2911
|
wideBreakpoint: 'max-width: 1279px'
|
|
2727
2912
|
}
|
|
2728
2913
|
}; // eslint-disable-next-line unicorn/expiring-todo-comments
|
|
2729
|
-
// TODO : seperate brand
|
|
2914
|
+
// TODO : seperate brand co lor usage definition from proper theme definition and add t ypings - https://ornikar.atlassian.net/browse/CME-156
|
|
2730
2915
|
|
|
2731
2916
|
var theme = {
|
|
2732
2917
|
spacing: 4,
|
|
@@ -3041,7 +3226,7 @@ function TypographyLink(_ref4) {
|
|
|
3041
3226
|
accessibilityRole: "none",
|
|
3042
3227
|
children: /*#__PURE__*/jsx(StyleWebWrapper, {
|
|
3043
3228
|
as: TypographyLinkWebWrapper,
|
|
3044
|
-
"data-nounderline": noUnderline,
|
|
3229
|
+
"data-nounderline": noUnderline ? true : undefined,
|
|
3045
3230
|
children: /*#__PURE__*/jsx(StyledLink, {
|
|
3046
3231
|
$disabled: disabled,
|
|
3047
3232
|
$noUnderline: noUnderline,
|