@razorpay/blade 3.5.1 → 3.5.3
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/CHANGELOG.md +12 -0
- package/build/components/index.native.js +1 -1
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.web.js +154 -265
- package/build/components/index.web.js.map +1 -1
- package/build/css/bankingThemeDarkDesktop.css +1 -1
- package/build/css/bankingThemeDarkMobile.css +1 -1
- package/build/css/bankingThemeLightDesktop.css +1 -1
- package/build/css/bankingThemeLightMobile.css +1 -1
- package/build/css/paymentThemeDarkDesktop.css +1 -1
- package/build/css/paymentThemeDarkMobile.css +1 -1
- package/build/css/paymentThemeLightDesktop.css +1 -1
- package/build/css/paymentThemeLightMobile.css +1 -1
- package/build/tokens/index.web.js +13 -36
- package/build/tokens/index.web.js.map +1 -1
- package/build/utils/index.web.js +27 -82
- package/build/utils/index.web.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,35 +1,13 @@
|
|
|
1
|
-
import _defineProperty$1 from '@babel/runtime
|
|
2
|
-
import _slicedToArray from '@babel/runtime
|
|
3
|
-
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
4
|
-
import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
5
|
-
import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
6
|
-
import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
7
|
-
import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
|
|
8
|
-
import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each';
|
|
9
|
-
import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
|
|
10
|
-
import _Object$defineProperties from '@babel/runtime-corejs3/core-js-stable/object/define-properties';
|
|
11
|
-
import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object/define-property';
|
|
1
|
+
import _defineProperty$1 from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
12
3
|
import * as React from 'react';
|
|
13
4
|
import React__default, { useMemo, useCallback, useState, useEffect, useRef, useContext, createContext, Fragment } from 'react';
|
|
14
5
|
import styled, { ThemeProvider, css, keyframes } from 'styled-components';
|
|
15
|
-
import _typeof from '@babel/runtime
|
|
16
|
-
import _Object$entries2 from '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
17
|
-
import '@babel/runtime-corejs3/core-js-stable/array/is-array';
|
|
18
|
-
import '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
19
|
-
import '@babel/runtime-corejs3/core-js-stable/instance/every';
|
|
20
|
-
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
21
|
-
import _sliceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/slice';
|
|
22
|
-
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
23
|
-
import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
6
|
+
import _typeof from '@babel/runtime/helpers/typeof';
|
|
24
7
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import _classCallCheck from '@babel/runtime-corejs3/helpers/classCallCheck';
|
|
29
|
-
import _createClass from '@babel/runtime-corejs3/helpers/createClass';
|
|
30
|
-
import _Object$assign from '@babel/runtime-corejs3/core-js-stable/object/assign';
|
|
31
|
-
import _setTimeout from '@babel/runtime-corejs3/core-js-stable/set-timeout';
|
|
32
|
-
import _Array$from from '@babel/runtime-corejs3/core-js-stable/array/from';
|
|
8
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
9
|
+
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
10
|
+
import _createClass from '@babel/runtime/helpers/createClass';
|
|
33
11
|
|
|
34
12
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
35
13
|
|
|
@@ -2563,9 +2541,9 @@ var Symbol = _Symbol;
|
|
|
2563
2541
|
var symbolProto = Symbol ? Symbol.prototype : undefined;
|
|
2564
2542
|
symbolProto ? symbolProto.valueOf : undefined;
|
|
2565
2543
|
|
|
2566
|
-
function ownKeys$v(object, enumerableOnly) { var keys =
|
|
2544
|
+
function ownKeys$v(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; }
|
|
2567
2545
|
|
|
2568
|
-
function _objectSpread$v(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
2546
|
+
function _objectSpread$v(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$v(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$v(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2569
2547
|
|
|
2570
2548
|
var accessibilityValue = {
|
|
2571
2549
|
valueMax: 'aria-valuemax',
|
|
@@ -2644,12 +2622,6 @@ var makeAccessible = function makeAccessible(props) {
|
|
|
2644
2622
|
return newProps;
|
|
2645
2623
|
};
|
|
2646
2624
|
|
|
2647
|
-
var makeBezier = function makeBezier(x1, y1, x2, y2) {
|
|
2648
|
-
var _context, _context2, _context3;
|
|
2649
|
-
|
|
2650
|
-
return _concatInstanceProperty(_context = _concatInstanceProperty(_context2 = _concatInstanceProperty(_context3 = "cubic-bezier(".concat(x1, ", ")).call(_context3, y1, ", ")).call(_context2, x2, ", ")).call(_context, y2, ")");
|
|
2651
|
-
};
|
|
2652
|
-
|
|
2653
2625
|
function makeBorderSize(size) {
|
|
2654
2626
|
if (typeof size === 'number') {
|
|
2655
2627
|
return "".concat(size, "px");
|
|
@@ -3351,10 +3323,8 @@ var testID = function testID(defaultKey) {
|
|
|
3351
3323
|
};
|
|
3352
3324
|
|
|
3353
3325
|
var toTitleCase = function toTitleCase(inputString) {
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
return _mapInstanceProperty(_context = inputString.toLowerCase().split(' ')).call(_context, function (word) {
|
|
3357
|
-
return word.charAt(0).toUpperCase() + _sliceInstanceProperty(word).call(word, 1);
|
|
3326
|
+
return inputString.toLowerCase().split(' ').map(function (word) {
|
|
3327
|
+
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
3358
3328
|
}).join(' ');
|
|
3359
3329
|
};
|
|
3360
3330
|
|
|
@@ -3368,9 +3338,7 @@ var useBreakpoint = function useBreakpoint(_ref) {
|
|
|
3368
3338
|
var breakpoints = _ref.breakpoints;
|
|
3369
3339
|
var supportsMatchMedia = typeof document !== 'undefined' && typeof ((_window = window) === null || _window === void 0 ? void 0 : _window.matchMedia) === 'function';
|
|
3370
3340
|
var breakpointsTokenAndQueryCollection = useMemo(function () {
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
return supportsMatchMedia ? _mapInstanceProperty(_context = _Object$entries2(breakpoints)).call(_context, function (_ref2, index, breakpointsArray) {
|
|
3341
|
+
return supportsMatchMedia ? Object.entries(breakpoints).map(function (_ref2, index, breakpointsArray) {
|
|
3374
3342
|
var _ref3 = _slicedToArray(_ref2, 2),
|
|
3375
3343
|
token = _ref3[0],
|
|
3376
3344
|
screenSize = _ref3[1];
|
|
@@ -3380,9 +3348,7 @@ var useBreakpoint = function useBreakpoint(_ref) {
|
|
|
3380
3348
|
if (token === 'max') {
|
|
3381
3349
|
mediaQuery = "screen and (min-width: ".concat(screenSize, "px)");
|
|
3382
3350
|
} else if (breakpointsArray[index - 1]) {
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
mediaQuery = _concatInstanceProperty(_context2 = "screen and (min-width: ".concat(breakpointsArray[index - 1][1] + 1, "px) and (max-width: ")).call(_context2, screenSize, "px)");
|
|
3351
|
+
mediaQuery = "screen and (min-width: ".concat(breakpointsArray[index - 1][1] + 1, "px) and (max-width: ").concat(screenSize, "px)");
|
|
3386
3352
|
} else {
|
|
3387
3353
|
mediaQuery = "screen and (max-width: ".concat(screenSize, "px)");
|
|
3388
3354
|
}
|
|
@@ -3401,9 +3367,7 @@ var useBreakpoint = function useBreakpoint(_ref) {
|
|
|
3401
3367
|
if (platform === 'react-native') {
|
|
3402
3368
|
matchedDeviceType = deviceType.mobile;
|
|
3403
3369
|
} else if (platform === 'browser') {
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
if (matchedBreakpoint && _includesInstanceProperty(_context3 = ['xs', 's', 'm']).call(_context3, matchedBreakpoint)) {
|
|
3370
|
+
if (matchedBreakpoint && ['xs', 's', 'm'].includes(matchedBreakpoint)) {
|
|
3407
3371
|
// tablet is also categorised as mobile
|
|
3408
3372
|
matchedDeviceType = deviceType.mobile;
|
|
3409
3373
|
} else {
|
|
@@ -3419,7 +3383,7 @@ var useBreakpoint = function useBreakpoint(_ref) {
|
|
|
3419
3383
|
var getMatchedBreakpoint = useCallback(function (event) {
|
|
3420
3384
|
var _breakpointsTokenAndQ, _breakpointsTokenAndQ2;
|
|
3421
3385
|
|
|
3422
|
-
var matchedBreakpoint = (_breakpointsTokenAndQ = (_breakpointsTokenAndQ2 =
|
|
3386
|
+
var matchedBreakpoint = (_breakpointsTokenAndQ = (_breakpointsTokenAndQ2 = breakpointsTokenAndQueryCollection.find(function (_ref4) {
|
|
3423
3387
|
var _ref4$mediaQuery = _ref4.mediaQuery,
|
|
3424
3388
|
mediaQuery = _ref4$mediaQuery === void 0 ? '' : _ref4$mediaQuery;
|
|
3425
3389
|
|
|
@@ -3467,7 +3431,7 @@ var useBreakpoint = function useBreakpoint(_ref) {
|
|
|
3467
3431
|
});
|
|
3468
3432
|
};
|
|
3469
3433
|
|
|
3470
|
-
var mediaQueryInstances =
|
|
3434
|
+
var mediaQueryInstances = breakpointsTokenAndQueryCollection.map(function (_ref5) {
|
|
3471
3435
|
var _ref5$mediaQuery = _ref5.mediaQuery,
|
|
3472
3436
|
mediaQuery = _ref5$mediaQuery === void 0 ? '' : _ref5$mediaQuery;
|
|
3473
3437
|
var mediaQueryInstance = window.matchMedia(mediaQuery);
|
|
@@ -3485,9 +3449,8 @@ var useBreakpoint = function useBreakpoint(_ref) {
|
|
|
3485
3449
|
|
|
3486
3450
|
return mediaQueryInstance;
|
|
3487
3451
|
});
|
|
3488
|
-
|
|
3489
3452
|
return function () {
|
|
3490
|
-
|
|
3453
|
+
mediaQueryInstances.forEach(function (mediaQueryInstance) {
|
|
3491
3454
|
if (mediaQueryInstance.removeEventListener) {
|
|
3492
3455
|
mediaQueryInstance.removeEventListener('change', handleMediaQueryChange);
|
|
3493
3456
|
} else {
|
|
@@ -3506,9 +3469,9 @@ var fontFamily = {
|
|
|
3506
3469
|
code: 'monospace'
|
|
3507
3470
|
};
|
|
3508
3471
|
|
|
3509
|
-
function ownKeys$u(object, enumerableOnly) { var keys =
|
|
3472
|
+
function ownKeys$u(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; }
|
|
3510
3473
|
|
|
3511
|
-
function _objectSpread$u(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
3474
|
+
function _objectSpread$u(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$u(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$u(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3512
3475
|
var fontWeight = {
|
|
3513
3476
|
regular: 400,
|
|
3514
3477
|
bold: 700
|
|
@@ -3584,27 +3547,6 @@ var fontWeight = {
|
|
|
3584
3547
|
}
|
|
3585
3548
|
});
|
|
3586
3549
|
|
|
3587
|
-
/* makeBezier returns a string of `cubic-bezier()` for web & a react-native-reanimated Easing Function of type `EasingFunctionFactory` for native */
|
|
3588
|
-
|
|
3589
|
-
({
|
|
3590
|
-
standard: {
|
|
3591
|
-
attentive: makeBezier(0.5, 0, 0.3, 1.5),
|
|
3592
|
-
effective: makeBezier(0.3, 0, 0.2, 1),
|
|
3593
|
-
revealing: makeBezier(0.5, 0, 0, 1),
|
|
3594
|
-
wary: makeBezier(1, 0.5, 0, 0.5)
|
|
3595
|
-
},
|
|
3596
|
-
entrance: {
|
|
3597
|
-
attentive: makeBezier(0.5, 0, 0.3, 1.5),
|
|
3598
|
-
effective: makeBezier(0, 0, 0.2, 1),
|
|
3599
|
-
revealing: makeBezier(0, 0, 0, 1)
|
|
3600
|
-
},
|
|
3601
|
-
exit: {
|
|
3602
|
-
attentive: makeBezier(0.7, 0, 0.5, 1),
|
|
3603
|
-
effective: makeBezier(0.17, 0, 1, 1),
|
|
3604
|
-
revealing: makeBezier(0.5, 0, 1, 1)
|
|
3605
|
-
}
|
|
3606
|
-
});
|
|
3607
|
-
|
|
3608
3550
|
var colorSchemeNamesInput = ['light', 'dark', 'system'];
|
|
3609
3551
|
|
|
3610
3552
|
var useColorScheme = function useColorScheme() {
|
|
@@ -3619,10 +3561,8 @@ var useColorScheme = function useColorScheme() {
|
|
|
3619
3561
|
setColorSchemeState = _useState2[1];
|
|
3620
3562
|
|
|
3621
3563
|
var setColorScheme = useCallback(function setThemeMode(colorScheme) {
|
|
3622
|
-
if (!
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
throw new Error(_concatInstanceProperty(_context = "[useColorScheme]: Expected color scheme to be one of [".concat(colorSchemeNamesInput.toString(), "] but received ")).call(_context, colorScheme));
|
|
3564
|
+
if (!colorSchemeNamesInput.includes(colorScheme)) {
|
|
3565
|
+
throw new Error("[useColorScheme]: Expected color scheme to be one of [".concat(colorSchemeNamesInput.toString(), "] but received ").concat(colorScheme));
|
|
3626
3566
|
}
|
|
3627
3567
|
|
|
3628
3568
|
setColorSchemeState(getColorScheme(colorScheme));
|
|
@@ -3666,8 +3606,6 @@ var castWebType = function castWebType(value) {
|
|
|
3666
3606
|
|
|
3667
3607
|
var MAX_WIDTH = 584;
|
|
3668
3608
|
var getCommonStyles = function getCommonStyles(props) {
|
|
3669
|
-
var _context;
|
|
3670
|
-
|
|
3671
3609
|
var theme = props.theme,
|
|
3672
3610
|
contrastType = props.contrastType,
|
|
3673
3611
|
intent = props.intent,
|
|
@@ -3679,7 +3617,7 @@ var getCommonStyles = function getCommonStyles(props) {
|
|
|
3679
3617
|
var feedbackColors = theme.colors.feedback;
|
|
3680
3618
|
return {
|
|
3681
3619
|
background: feedbackColors.background[intent][contrastType],
|
|
3682
|
-
padding:
|
|
3620
|
+
padding: "".concat(makeSpace(theme.spacing[4]), " ").concat(makeSpace(theme.spacing[5])),
|
|
3683
3621
|
borderRadius: makeBorderSize(isBorderless ? theme.border.radius.none : theme.border.radius.medium),
|
|
3684
3622
|
borderColor: feedbackColors.border[intent][contrastType],
|
|
3685
3623
|
borderWidth: makeBorderSize(isBorderless ? theme.border.width.none : theme.border.width.thin),
|
|
@@ -3714,9 +3652,8 @@ var Defs = function Defs(_ref) {
|
|
|
3714
3652
|
|
|
3715
3653
|
var G = function G(_ref) {
|
|
3716
3654
|
var clipPath = _ref.clipPath,
|
|
3717
|
-
fill =
|
|
3655
|
+
fill = _ref.fill,
|
|
3718
3656
|
children = _ref.children;
|
|
3719
|
-
|
|
3720
3657
|
return /*#__PURE__*/jsx("g", {
|
|
3721
3658
|
clipPath: clipPath,
|
|
3722
3659
|
fill: fill,
|
|
@@ -3728,14 +3665,13 @@ var Path = function Path(_ref) {
|
|
|
3728
3665
|
var d = _ref.d,
|
|
3729
3666
|
clipPath = _ref.clipPath,
|
|
3730
3667
|
clipRule = _ref.clipRule,
|
|
3731
|
-
fill =
|
|
3668
|
+
fill = _ref.fill,
|
|
3732
3669
|
fillOpacity = _ref.fillOpacity,
|
|
3733
3670
|
fillRule = _ref.fillRule,
|
|
3734
3671
|
stroke = _ref.stroke,
|
|
3735
3672
|
strokeLinecap = _ref.strokeLinecap,
|
|
3736
3673
|
strokeLinejoin = _ref.strokeLinejoin,
|
|
3737
3674
|
strokeWidth = _ref.strokeWidth;
|
|
3738
|
-
|
|
3739
3675
|
return /*#__PURE__*/jsx("path", {
|
|
3740
3676
|
d: d,
|
|
3741
3677
|
clipPath: clipPath,
|
|
@@ -3757,8 +3693,7 @@ var Rect = function Rect(_ref) {
|
|
|
3757
3693
|
ry = _ref.ry,
|
|
3758
3694
|
x = _ref.x,
|
|
3759
3695
|
y = _ref.y,
|
|
3760
|
-
fill =
|
|
3761
|
-
|
|
3696
|
+
fill = _ref.fill;
|
|
3762
3697
|
return /*#__PURE__*/jsx("rect", {
|
|
3763
3698
|
height: height,
|
|
3764
3699
|
width: width,
|
|
@@ -3770,17 +3705,16 @@ var Rect = function Rect(_ref) {
|
|
|
3770
3705
|
});
|
|
3771
3706
|
};
|
|
3772
3707
|
|
|
3773
|
-
function ownKeys$t(object, enumerableOnly) { var keys =
|
|
3708
|
+
function ownKeys$t(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; }
|
|
3774
3709
|
|
|
3775
|
-
function _objectSpread$t(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
3710
|
+
function _objectSpread$t(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$t(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$t(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3776
3711
|
|
|
3777
3712
|
var Svg = function Svg(_ref) {
|
|
3778
3713
|
var children = _ref.children,
|
|
3779
3714
|
height = _ref.height,
|
|
3780
3715
|
viewBox = _ref.viewBox,
|
|
3781
3716
|
width = _ref.width,
|
|
3782
|
-
fill =
|
|
3783
|
-
|
|
3717
|
+
fill = _ref.fill;
|
|
3784
3718
|
return /*#__PURE__*/jsx("svg", _objectSpread$t(_objectSpread$t({}, makeAccessible({
|
|
3785
3719
|
hidden: true
|
|
3786
3720
|
})), {}, {
|
|
@@ -3816,9 +3750,9 @@ var useTheme = function useTheme() {
|
|
|
3816
3750
|
return themeContext;
|
|
3817
3751
|
};
|
|
3818
3752
|
|
|
3819
|
-
function ownKeys$s(object, enumerableOnly) { var keys =
|
|
3753
|
+
function ownKeys$s(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; }
|
|
3820
3754
|
|
|
3821
|
-
function _objectSpread$s(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
3755
|
+
function _objectSpread$s(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$s(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$s(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3822
3756
|
|
|
3823
3757
|
var BladeProvider = function BladeProvider(_ref) {
|
|
3824
3758
|
var themeTokens = _ref.themeTokens,
|
|
@@ -3829,10 +3763,8 @@ var BladeProvider = function BladeProvider(_ref) {
|
|
|
3829
3763
|
throw new Error("[BladeProvider]: Expected valid themeTokens of type ThemeTokens to be passed but found ".concat(_typeof(themeTokens)));
|
|
3830
3764
|
}
|
|
3831
3765
|
|
|
3832
|
-
if (initialColorScheme && !
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
throw new Error(_concatInstanceProperty(_context = "[BladeProvider]: Expected color scheme to be one of [".concat(colorSchemeNamesInput.toString(), "] but received ")).call(_context, initialColorScheme));
|
|
3766
|
+
if (initialColorScheme && !colorSchemeNamesInput.includes(initialColorScheme)) {
|
|
3767
|
+
throw new Error("[BladeProvider]: Expected color scheme to be one of [".concat(colorSchemeNamesInput.toString(), "] but received ").concat(initialColorScheme));
|
|
3836
3768
|
}
|
|
3837
3769
|
|
|
3838
3770
|
var _useColorScheme = useColorScheme(initialColorScheme),
|
|
@@ -4890,9 +4822,9 @@ var ExternalLinkIcon = function ExternalLinkIcon(_ref) {
|
|
|
4890
4822
|
});
|
|
4891
4823
|
};
|
|
4892
4824
|
|
|
4893
|
-
function ownKeys$r(object, enumerableOnly) { var keys =
|
|
4825
|
+
function ownKeys$r(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; }
|
|
4894
4826
|
|
|
4895
|
-
function _objectSpread$r(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
4827
|
+
function _objectSpread$r(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$r(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$r(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4896
4828
|
var StyledButton = /*#__PURE__*/styled.button.withConfig({
|
|
4897
4829
|
displayName: "StyledIconButtonweb__StyledButton",
|
|
4898
4830
|
componentId: "sc-1f4cg7d-0"
|
|
@@ -5127,9 +5059,9 @@ var getBaseTextStyles = function getBaseTextStyles(_ref) {
|
|
|
5127
5059
|
|
|
5128
5060
|
var _excluded$3 = ["color", "fontFamily", "fontSize", "fontWeight", "fontStyle", "textDecorationLine", "lineHeight", "textAlign"];
|
|
5129
5061
|
|
|
5130
|
-
function ownKeys$q(object, enumerableOnly) { var keys =
|
|
5062
|
+
function ownKeys$q(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; }
|
|
5131
5063
|
|
|
5132
|
-
function _objectSpread$q(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
5064
|
+
function _objectSpread$q(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$q(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$q(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5133
5065
|
var StyledBaseText$1 = /*#__PURE__*/styled.div.withConfig({
|
|
5134
5066
|
displayName: "BaseTextweb__StyledBaseText",
|
|
5135
5067
|
componentId: "sc-1ob51ew-0"
|
|
@@ -5192,20 +5124,18 @@ var BaseText = function BaseText(_ref2) {
|
|
|
5192
5124
|
}));
|
|
5193
5125
|
};
|
|
5194
5126
|
|
|
5195
|
-
function ownKeys$p(object, enumerableOnly) { var keys =
|
|
5127
|
+
function ownKeys$p(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; }
|
|
5196
5128
|
|
|
5197
|
-
function _objectSpread$p(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
5129
|
+
function _objectSpread$p(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$p(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$p(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5198
5130
|
|
|
5199
5131
|
var getProps$3 = function getProps(_ref) {
|
|
5200
|
-
var _context;
|
|
5201
|
-
|
|
5202
5132
|
var size = _ref.size,
|
|
5203
5133
|
type = _ref.type,
|
|
5204
5134
|
contrast = _ref.contrast;
|
|
5205
5135
|
var isPlatformWeb = getPlatformType() === 'browser' || getPlatformType() === 'node';
|
|
5206
5136
|
var colorContrast = contrast ? "".concat(contrast, "Contrast") : 'lowContrast';
|
|
5207
5137
|
var props = {
|
|
5208
|
-
color:
|
|
5138
|
+
color: "surface.text.".concat(type !== null && type !== void 0 ? type : 'normal', ".").concat(colorContrast),
|
|
5209
5139
|
fontSize: 600,
|
|
5210
5140
|
fontWeight: 'bold',
|
|
5211
5141
|
fontStyle: 'normal',
|
|
@@ -5251,13 +5181,11 @@ var Title = function Title(_ref2) {
|
|
|
5251
5181
|
}));
|
|
5252
5182
|
};
|
|
5253
5183
|
|
|
5254
|
-
function ownKeys$o(object, enumerableOnly) { var keys =
|
|
5184
|
+
function ownKeys$o(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; }
|
|
5255
5185
|
|
|
5256
|
-
function _objectSpread$o(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
5186
|
+
function _objectSpread$o(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$o(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$o(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5257
5187
|
|
|
5258
5188
|
var getProps$2 = function getProps(_ref) {
|
|
5259
|
-
var _context;
|
|
5260
|
-
|
|
5261
5189
|
var variant = _ref.variant,
|
|
5262
5190
|
size = _ref.size,
|
|
5263
5191
|
type = _ref.type,
|
|
@@ -5266,7 +5194,7 @@ var getProps$2 = function getProps(_ref) {
|
|
|
5266
5194
|
var isPlatformWeb = getPlatformType() === 'browser' || getPlatformType() === 'node';
|
|
5267
5195
|
var colorContrast = contrast ? "".concat(contrast, "Contrast") : 'lowContrast';
|
|
5268
5196
|
var props = {
|
|
5269
|
-
color:
|
|
5197
|
+
color: "surface.text.".concat(type !== null && type !== void 0 ? type : 'normal', ".").concat(colorContrast),
|
|
5270
5198
|
fontSize: 200,
|
|
5271
5199
|
fontWeight: weight !== null && weight !== void 0 ? weight : 'bold',
|
|
5272
5200
|
fontStyle: 'normal',
|
|
@@ -5331,13 +5259,11 @@ var Heading = function Heading(_ref2) {
|
|
|
5331
5259
|
}));
|
|
5332
5260
|
};
|
|
5333
5261
|
|
|
5334
|
-
function ownKeys$n(object, enumerableOnly) { var keys =
|
|
5262
|
+
function ownKeys$n(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; }
|
|
5335
5263
|
|
|
5336
|
-
function _objectSpread$n(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
5264
|
+
function _objectSpread$n(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$n(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$n(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5337
5265
|
|
|
5338
5266
|
var getTextProps = function getTextProps(_ref) {
|
|
5339
|
-
var _context;
|
|
5340
|
-
|
|
5341
5267
|
var variant = _ref.variant,
|
|
5342
5268
|
type = _ref.type,
|
|
5343
5269
|
weight = _ref.weight,
|
|
@@ -5346,7 +5272,7 @@ var getTextProps = function getTextProps(_ref) {
|
|
|
5346
5272
|
var isPlatformWeb = getPlatformType() === 'browser' || getPlatformType() === 'node';
|
|
5347
5273
|
var colorContrast = contrast ? "".concat(contrast, "Contrast") : 'lowContrast';
|
|
5348
5274
|
var props = {
|
|
5349
|
-
color:
|
|
5275
|
+
color: "surface.text.".concat(type !== null && type !== void 0 ? type : 'normal', ".").concat(colorContrast),
|
|
5350
5276
|
fontSize: 100,
|
|
5351
5277
|
fontWeight: weight !== null && weight !== void 0 ? weight : 'regular',
|
|
5352
5278
|
fontStyle: 'normal',
|
|
@@ -5448,10 +5374,7 @@ var CodeContainer = /*#__PURE__*/styled(Box).withConfig({
|
|
|
5448
5374
|
displayName: "Code__CodeContainer",
|
|
5449
5375
|
componentId: "l9m17z-0"
|
|
5450
5376
|
})(function (props) {
|
|
5451
|
-
var
|
|
5452
|
-
|
|
5453
|
-
var padding = _concatInstanceProperty(_context = "".concat(makeSpace(props.theme.spacing[0]), " ")).call(_context, makeSpace(props.theme.spacing[2]));
|
|
5454
|
-
|
|
5377
|
+
var padding = "".concat(makeSpace(props.theme.spacing[0]), " ").concat(makeSpace(props.theme.spacing[2]));
|
|
5455
5378
|
return {
|
|
5456
5379
|
padding: padding,
|
|
5457
5380
|
backgroundColor: props.theme.colors.brand.gray[400],
|
|
@@ -5534,9 +5457,9 @@ var getBaseButtonStyles = function getBaseButtonStyles(_ref) {
|
|
|
5534
5457
|
};
|
|
5535
5458
|
};
|
|
5536
5459
|
|
|
5537
|
-
function ownKeys$m(object, enumerableOnly) { var keys =
|
|
5460
|
+
function ownKeys$m(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; }
|
|
5538
5461
|
|
|
5539
|
-
function _objectSpread$m(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
5462
|
+
function _objectSpread$m(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$m(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$m(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5540
5463
|
var StyledBaseButton = /*#__PURE__*/styled.button.attrs(function (props) {
|
|
5541
5464
|
return _objectSpread$m({}, props.accessibilityProps);
|
|
5542
5465
|
}).withConfig({
|
|
@@ -5694,9 +5617,7 @@ var LiveAnnouncer = /*#__PURE__*/function () {
|
|
|
5694
5617
|
|
|
5695
5618
|
this.node = document.createElement('div');
|
|
5696
5619
|
this.node.dataset.liveAnnouncer = 'true';
|
|
5697
|
-
|
|
5698
|
-
_Object$assign(this.node.style, screenReaderStyles);
|
|
5699
|
-
|
|
5620
|
+
Object.assign(this.node.style, screenReaderStyles);
|
|
5700
5621
|
this.assertiveLog = this.createLog('assertive');
|
|
5701
5622
|
this.node.appendChild(this.assertiveLog);
|
|
5702
5623
|
this.politeLog = this.createLog('polite');
|
|
@@ -5743,7 +5664,7 @@ var LiveAnnouncer = /*#__PURE__*/function () {
|
|
|
5743
5664
|
}
|
|
5744
5665
|
|
|
5745
5666
|
if (message !== '') {
|
|
5746
|
-
|
|
5667
|
+
setTimeout(function () {
|
|
5747
5668
|
node.remove();
|
|
5748
5669
|
}, LIVEREGION_TIMEOUT_DELAY);
|
|
5749
5670
|
}
|
|
@@ -5842,9 +5763,9 @@ var SpinningBox = /*#__PURE__*/styled(Box).withConfig({
|
|
|
5842
5763
|
return css(["width:max-content;display:inline-flex;animation:", " ", " ", " infinite;"], rotate, makeMotionTime(get_1(theme.motion, motion.duration)), get_1(theme.motion, motion.easing));
|
|
5843
5764
|
});
|
|
5844
5765
|
|
|
5845
|
-
function ownKeys$l(object, enumerableOnly) { var keys =
|
|
5766
|
+
function ownKeys$l(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; }
|
|
5846
5767
|
|
|
5847
|
-
function _objectSpread$l(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
5768
|
+
function _objectSpread$l(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$l(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$l(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5848
5769
|
|
|
5849
5770
|
var getColor = function getColor(_ref) {
|
|
5850
5771
|
var contrast = _ref.contrast,
|
|
@@ -5852,9 +5773,7 @@ var getColor = function getColor(_ref) {
|
|
|
5852
5773
|
theme = _ref.theme;
|
|
5853
5774
|
|
|
5854
5775
|
if (intent) {
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
return get_1(theme.colors, _concatInstanceProperty(_context = "feedback.".concat(intent, ".action.icon.primary.disabled.")).call(_context, contrast, "Contrast"));
|
|
5776
|
+
return get_1(theme.colors, "feedback.".concat(intent, ".action.icon.primary.disabled.").concat(contrast, "Contrast"));
|
|
5858
5777
|
} else if (contrast == 'low') {
|
|
5859
5778
|
return get_1(theme.colors, 'brand.gray.700');
|
|
5860
5779
|
} else {
|
|
@@ -5895,7 +5814,7 @@ var BaseSpinner = function BaseSpinner(_ref2) {
|
|
|
5895
5814
|
theme: theme
|
|
5896
5815
|
})
|
|
5897
5816
|
})
|
|
5898
|
-
}), label &&
|
|
5817
|
+
}), label && label.trim().length > 0 ? /*#__PURE__*/jsx(Box, {
|
|
5899
5818
|
marginLeft: labelPosition === 'right' ? 'spacing.3' : 'spacing.0',
|
|
5900
5819
|
marginTop: labelPosition === 'bottom' ? 'spacing.3' : 'spacing.0',
|
|
5901
5820
|
children: /*#__PURE__*/jsx(Text, {
|
|
@@ -5911,13 +5830,11 @@ var BaseSpinner = function BaseSpinner(_ref2) {
|
|
|
5911
5830
|
});
|
|
5912
5831
|
};
|
|
5913
5832
|
|
|
5914
|
-
function ownKeys$k(object, enumerableOnly) { var keys =
|
|
5833
|
+
function ownKeys$k(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; }
|
|
5915
5834
|
|
|
5916
|
-
function _objectSpread$k(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
5835
|
+
function _objectSpread$k(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$k(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$k(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5917
5836
|
|
|
5918
5837
|
var getColorToken$1 = function getColorToken(_ref) {
|
|
5919
|
-
var _context4, _context5;
|
|
5920
|
-
|
|
5921
5838
|
var property = _ref.property,
|
|
5922
5839
|
variant = _ref.variant,
|
|
5923
5840
|
state = _ref.state,
|
|
@@ -5925,13 +5842,11 @@ var getColorToken$1 = function getColorToken(_ref) {
|
|
|
5925
5842
|
intent = _ref.intent;
|
|
5926
5843
|
|
|
5927
5844
|
if (intent && contrast) {
|
|
5928
|
-
var _context, _context2, _context3;
|
|
5929
|
-
|
|
5930
5845
|
// TODO: Add support for secondary & tertiary variants for feedback buttons here when a use-case is identified
|
|
5931
|
-
return
|
|
5846
|
+
return "feedback.".concat(intent, ".action.").concat(property, ".primary.").concat(state, ".").concat(contrast, "Contrast");
|
|
5932
5847
|
}
|
|
5933
5848
|
|
|
5934
|
-
return
|
|
5849
|
+
return "action.".concat(property, ".").concat(variant, ".").concat(state);
|
|
5935
5850
|
};
|
|
5936
5851
|
|
|
5937
5852
|
var getProps$1 = function getProps(_ref2) {
|
|
@@ -5944,14 +5859,14 @@ var getProps$1 = function getProps(_ref2) {
|
|
|
5944
5859
|
intent = _ref2.intent,
|
|
5945
5860
|
contrast = _ref2.contrast,
|
|
5946
5861
|
hasIcon = _ref2.hasIcon;
|
|
5947
|
-
var isIconOnly = hasIcon && (!children || (children === null || children === void 0 ? void 0 :
|
|
5862
|
+
var isIconOnly = hasIcon && (!children || (children === null || children === void 0 ? void 0 : children.trim().length) === 0);
|
|
5948
5863
|
var props = {
|
|
5949
5864
|
iconSize: isIconOnly ? buttonIconOnlySizeToIconSizeMap[size] : buttonSizeToIconSizeMap[size],
|
|
5950
5865
|
spinnerSize: buttonSizeToSpinnerSizeMap[size],
|
|
5951
5866
|
fontSize: buttonTypographyTokens.fonts.size[size],
|
|
5952
5867
|
lineHeight: buttonTypographyTokens.lineHeights[size],
|
|
5953
5868
|
minHeight: makeSize(minHeight$1[size]),
|
|
5954
|
-
iconPadding: hasIcon && children !== null && children !== void 0 &&
|
|
5869
|
+
iconPadding: hasIcon && children !== null && children !== void 0 && children.trim() ? "spacing.".concat(textPadding[size]) : undefined,
|
|
5955
5870
|
iconColor: getColorToken$1({
|
|
5956
5871
|
property: 'icon',
|
|
5957
5872
|
variant: variant,
|
|
@@ -5970,7 +5885,7 @@ var getProps$1 = function getProps(_ref2) {
|
|
|
5970
5885
|
buttonPaddingBottom: isIconOnly ? makeSpace(theme.spacing[buttonIconOnlyPadding[size].bottom]) : makeSpace(theme.spacing[buttonPadding[size].bottom]),
|
|
5971
5886
|
buttonPaddingLeft: isIconOnly ? makeSpace(theme.spacing[buttonIconOnlyPadding[size].left]) : makeSpace(theme.spacing[buttonPadding[size].left]),
|
|
5972
5887
|
buttonPaddingRight: isIconOnly ? makeSpace(theme.spacing[buttonIconOnlyPadding[size].right]) : makeSpace(theme.spacing[buttonPadding[size].right]),
|
|
5973
|
-
text: size === 'xsmall' ? children === null || children === void 0 ? void 0 :
|
|
5888
|
+
text: size === 'xsmall' ? children === null || children === void 0 ? void 0 : children.trim().toUpperCase() : children === null || children === void 0 ? void 0 : children.trim(),
|
|
5974
5889
|
defaultBackgroundColor: get_1(theme.colors, getColorToken$1({
|
|
5975
5890
|
property: 'background',
|
|
5976
5891
|
variant: variant,
|
|
@@ -6113,7 +6028,7 @@ var BaseButton = function BaseButton(_ref4) {
|
|
|
6113
6028
|
var _useTheme = useTheme(),
|
|
6114
6029
|
theme = _useTheme.theme;
|
|
6115
6030
|
|
|
6116
|
-
if (!Icon && !(children !== null && children !== void 0 &&
|
|
6031
|
+
if (!Icon && !(children !== null && children !== void 0 && children.trim())) {
|
|
6117
6032
|
throw new Error("[Blade: BaseButton]: At least one of icon or text is required to render a button.");
|
|
6118
6033
|
}
|
|
6119
6034
|
|
|
@@ -6253,9 +6168,9 @@ var getStyledLinkStyles = function getStyledLinkStyles(_ref) {
|
|
|
6253
6168
|
};
|
|
6254
6169
|
};
|
|
6255
6170
|
|
|
6256
|
-
function ownKeys$j(object, enumerableOnly) { var keys =
|
|
6171
|
+
function ownKeys$j(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6257
6172
|
|
|
6258
|
-
function _objectSpread$j(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
6173
|
+
function _objectSpread$j(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$j(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$j(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6259
6174
|
var StyledLink$1 = /*#__PURE__*/styled.button.attrs(function (props) {
|
|
6260
6175
|
return _objectSpread$j({}, props.accessibilityProps);
|
|
6261
6176
|
}).withConfig({
|
|
@@ -6319,13 +6234,11 @@ var useInteraction = function useInteraction() {
|
|
|
6319
6234
|
|
|
6320
6235
|
var _excluded$2 = ["currentInteraction", "setCurrentInteraction"];
|
|
6321
6236
|
|
|
6322
|
-
function ownKeys$i(object, enumerableOnly) { var keys =
|
|
6237
|
+
function ownKeys$i(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6323
6238
|
|
|
6324
|
-
function _objectSpread$i(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
6239
|
+
function _objectSpread$i(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$i(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$i(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6325
6240
|
|
|
6326
6241
|
var getColorToken = function getColorToken(_ref) {
|
|
6327
|
-
var _context4;
|
|
6328
|
-
|
|
6329
6242
|
var variant = _ref.variant,
|
|
6330
6243
|
intent = _ref.intent,
|
|
6331
6244
|
contrast = _ref.contrast,
|
|
@@ -6345,12 +6258,10 @@ var getColorToken = function getColorToken(_ref) {
|
|
|
6345
6258
|
}
|
|
6346
6259
|
|
|
6347
6260
|
if (intent && state !== 'visited') {
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
return _concatInstanceProperty(_context = _concatInstanceProperty(_context2 = _concatInstanceProperty(_context3 = "feedback.".concat(intent, ".action.")).call(_context3, element, ".link.")).call(_context2, state, ".")).call(_context, contrast, "Contrast");
|
|
6261
|
+
return "feedback.".concat(intent, ".action.").concat(element, ".link.").concat(state, ".").concat(contrast, "Contrast");
|
|
6351
6262
|
}
|
|
6352
6263
|
|
|
6353
|
-
return
|
|
6264
|
+
return "action.".concat(element, ".link.").concat(state);
|
|
6354
6265
|
};
|
|
6355
6266
|
|
|
6356
6267
|
var getProps = function getProps(_ref2) {
|
|
@@ -6379,7 +6290,7 @@ var getProps = function getProps(_ref2) {
|
|
|
6379
6290
|
}),
|
|
6380
6291
|
fontSize: size === 'medium' ? 100 : 75,
|
|
6381
6292
|
iconSize: size,
|
|
6382
|
-
iconPadding: children !== null && children !== void 0 &&
|
|
6293
|
+
iconPadding: children !== null && children !== void 0 && children.trim() ? 'spacing.2' : 'spacing.0',
|
|
6383
6294
|
textColor: getColorToken({
|
|
6384
6295
|
variant: variant,
|
|
6385
6296
|
intent: intent,
|
|
@@ -6436,7 +6347,7 @@ var BaseLink = function BaseLink(_ref3) {
|
|
|
6436
6347
|
var _useTheme = useTheme(),
|
|
6437
6348
|
theme = _useTheme.theme;
|
|
6438
6349
|
|
|
6439
|
-
if (!Icon && !(children !== null && children !== void 0 &&
|
|
6350
|
+
if (!Icon && !(children !== null && children !== void 0 && children.trim())) {
|
|
6440
6351
|
throw new Error("[Blade: BaseLink]: At least one of icon or text is required to render a link.");
|
|
6441
6352
|
}
|
|
6442
6353
|
|
|
@@ -6534,9 +6445,9 @@ var BaseLink = function BaseLink(_ref3) {
|
|
|
6534
6445
|
}));
|
|
6535
6446
|
};
|
|
6536
6447
|
|
|
6537
|
-
function ownKeys$h(object, enumerableOnly) { var keys =
|
|
6448
|
+
function ownKeys$h(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6538
6449
|
|
|
6539
|
-
function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
6450
|
+
function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$h(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$h(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6540
6451
|
var isReactNative$3 = getPlatformType() === 'react-native'; // Need extra wrappers on React Native only for alignment
|
|
6541
6452
|
|
|
6542
6453
|
var SecondaryActionWrapper = isReactNative$3 ? Box : Fragment;
|
|
@@ -6549,8 +6460,6 @@ var intentIconMap = {
|
|
|
6549
6460
|
};
|
|
6550
6461
|
|
|
6551
6462
|
var Alert = function Alert(_ref) {
|
|
6552
|
-
var _context;
|
|
6553
|
-
|
|
6554
6463
|
var description = _ref.description,
|
|
6555
6464
|
title = _ref.title,
|
|
6556
6465
|
_ref$isDismissable = _ref.isDismissable,
|
|
@@ -6566,6 +6475,10 @@ var Alert = function Alert(_ref) {
|
|
|
6566
6475
|
isBorderless = _ref$isBorderless === void 0 ? false : _ref$isBorderless,
|
|
6567
6476
|
actions = _ref.actions;
|
|
6568
6477
|
|
|
6478
|
+
if (!(actions !== null && actions !== void 0 && actions.primary) && actions !== null && actions !== void 0 && actions.secondary) {
|
|
6479
|
+
throw new Error('[Blade: Alert]: SecondaryAction is allowed only when PrimaryAction is defined.');
|
|
6480
|
+
}
|
|
6481
|
+
|
|
6569
6482
|
var _useState = useState(true),
|
|
6570
6483
|
_useState2 = _slicedToArray(_useState, 2),
|
|
6571
6484
|
isVisible = _useState2[0],
|
|
@@ -6575,7 +6488,7 @@ var Alert = function Alert(_ref) {
|
|
|
6575
6488
|
var Icon = intentIconMap[intent];
|
|
6576
6489
|
|
|
6577
6490
|
var icon = /*#__PURE__*/jsx(Icon, {
|
|
6578
|
-
color:
|
|
6491
|
+
color: "feedback.icon.".concat(intent, ".").concat(contrastType),
|
|
6579
6492
|
size: "large"
|
|
6580
6493
|
});
|
|
6581
6494
|
|
|
@@ -6702,9 +6615,9 @@ var getStyledBadgeStyles = function getStyledBadgeStyles(_ref) {
|
|
|
6702
6615
|
};
|
|
6703
6616
|
};
|
|
6704
6617
|
|
|
6705
|
-
function ownKeys$g(object, enumerableOnly) { var keys =
|
|
6618
|
+
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; }
|
|
6706
6619
|
|
|
6707
|
-
function _objectSpread$g(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
6620
|
+
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$1(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; }
|
|
6708
6621
|
var StyledBadge = /*#__PURE__*/styled.div.withConfig({
|
|
6709
6622
|
displayName: "StyledBadgeweb__StyledBadge",
|
|
6710
6623
|
componentId: "sc-1svn4tv-0"
|
|
@@ -6716,7 +6629,7 @@ var StyledBadge = /*#__PURE__*/styled.div.withConfig({
|
|
|
6716
6629
|
|
|
6717
6630
|
var isFeedbackVariant = function isFeedbackVariant(variant) {
|
|
6718
6631
|
var feedbackVariants = ['information', 'negative', 'neutral', 'notice', 'positive'];
|
|
6719
|
-
return
|
|
6632
|
+
return feedbackVariants.includes(variant);
|
|
6720
6633
|
};
|
|
6721
6634
|
|
|
6722
6635
|
var getColorProps = function getColorProps(_ref) {
|
|
@@ -6729,17 +6642,13 @@ var getColorProps = function getColorProps(_ref) {
|
|
|
6729
6642
|
};
|
|
6730
6643
|
|
|
6731
6644
|
if (isFeedbackVariant(variant)) {
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
props.
|
|
6735
|
-
props.textColor = _concatInstanceProperty(_context2 = "feedback.text.".concat(variant, ".")).call(_context2, contrast, "Contrast");
|
|
6736
|
-
props.backgroundColor = _concatInstanceProperty(_context3 = "feedback.background.".concat(variant, ".")).call(_context3, contrast, "Contrast");
|
|
6645
|
+
props.iconColor = "feedback.icon.".concat(variant, ".").concat(contrast, "Contrast");
|
|
6646
|
+
props.textColor = "feedback.text.".concat(variant, ".").concat(contrast, "Contrast");
|
|
6647
|
+
props.backgroundColor = "feedback.background.".concat(variant, ".").concat(contrast, "Contrast");
|
|
6737
6648
|
} else {
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
props.
|
|
6741
|
-
props.textColor = _concatInstanceProperty(_context5 = "badge.text.".concat(variant, ".")).call(_context5, contrast, "Contrast");
|
|
6742
|
-
props.backgroundColor = _concatInstanceProperty(_context6 = "badge.background.".concat(variant, ".")).call(_context6, contrast, "Contrast");
|
|
6649
|
+
props.iconColor = "badge.icon.".concat(variant, ".").concat(contrast, "Contrast");
|
|
6650
|
+
props.textColor = "badge.text.".concat(variant, ".").concat(contrast, "Contrast");
|
|
6651
|
+
props.backgroundColor = "badge.background.".concat(variant, ".").concat(contrast, "Contrast");
|
|
6743
6652
|
}
|
|
6744
6653
|
|
|
6745
6654
|
return props;
|
|
@@ -6772,7 +6681,7 @@ var Badge = function Badge(_ref2) {
|
|
|
6772
6681
|
_ref2$variant = _ref2.variant,
|
|
6773
6682
|
variant = _ref2$variant === void 0 ? 'neutral' : _ref2$variant;
|
|
6774
6683
|
|
|
6775
|
-
if (!(children !== null && children !== void 0 &&
|
|
6684
|
+
if (!(children !== null && children !== void 0 && children.trim())) {
|
|
6776
6685
|
throw new Error('[Blade: Badge]: Text as children is required for Badge.');
|
|
6777
6686
|
}
|
|
6778
6687
|
|
|
@@ -6820,9 +6729,9 @@ var Badge = function Badge(_ref2) {
|
|
|
6820
6729
|
});
|
|
6821
6730
|
};
|
|
6822
6731
|
|
|
6823
|
-
function ownKeys$f(object, enumerableOnly) { var keys =
|
|
6732
|
+
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; }
|
|
6824
6733
|
|
|
6825
|
-
function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
6734
|
+
function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$f(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$f(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6826
6735
|
|
|
6827
6736
|
var Button = function Button(_ref) {
|
|
6828
6737
|
var children = _ref.children,
|
|
@@ -6989,9 +6898,9 @@ var CheckboxIconWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
6989
6898
|
return getCheckboxIconWrapperStyles(props);
|
|
6990
6899
|
});
|
|
6991
6900
|
|
|
6992
|
-
function ownKeys$e(object, enumerableOnly) { var keys =
|
|
6901
|
+
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; }
|
|
6993
6902
|
|
|
6994
|
-
function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
6903
|
+
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$1(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; }
|
|
6995
6904
|
var fadeIn = /*#__PURE__*/keyframes(["from{transform:scale(.6);opacity:0;}to{transform:scale(1);opacity:1;}"]);
|
|
6996
6905
|
var fadeOut$1 = /*#__PURE__*/keyframes(["from{transform:scale(1);opacity:1;}to{transform:scale(.6);opacity:0;}"]);
|
|
6997
6906
|
var AnimatedFade$1 = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -7193,8 +7102,6 @@ var genId = function genId() {
|
|
|
7193
7102
|
|
|
7194
7103
|
|
|
7195
7104
|
var useId = function useId(prefix, idProp) {
|
|
7196
|
-
var _context;
|
|
7197
|
-
|
|
7198
7105
|
var initialId = idProp || (handoffComplete ? genId() : null);
|
|
7199
7106
|
|
|
7200
7107
|
var _React$useState = React.useState(initialId),
|
|
@@ -7215,7 +7122,7 @@ var useId = function useId(prefix, idProp) {
|
|
|
7215
7122
|
}
|
|
7216
7123
|
}, []);
|
|
7217
7124
|
var id = uid != null ? uid.toString() : undefined;
|
|
7218
|
-
return prefix ?
|
|
7125
|
+
return prefix ? "".concat(prefix, "-").concat(id) : id;
|
|
7219
7126
|
};
|
|
7220
7127
|
|
|
7221
7128
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
@@ -7242,9 +7149,9 @@ var useFormId = function useFormId(prefix) {
|
|
|
7242
7149
|
};
|
|
7243
7150
|
};
|
|
7244
7151
|
|
|
7245
|
-
function ownKeys$d(object, enumerableOnly) { var keys =
|
|
7152
|
+
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; }
|
|
7246
7153
|
|
|
7247
|
-
function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
7154
|
+
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$1(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; }
|
|
7248
7155
|
|
|
7249
7156
|
/**
|
|
7250
7157
|
* indeterminate is not a HTML input element prop,
|
|
@@ -7629,9 +7536,9 @@ var SelectorSupportText = function SelectorSupportText(_ref) {
|
|
|
7629
7536
|
});
|
|
7630
7537
|
};
|
|
7631
7538
|
|
|
7632
|
-
function ownKeys$c(object, enumerableOnly) { var keys =
|
|
7539
|
+
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; }
|
|
7633
7540
|
|
|
7634
|
-
function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
7541
|
+
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$1(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; }
|
|
7635
7542
|
var variants = {
|
|
7636
7543
|
"default": {
|
|
7637
7544
|
background: {
|
|
@@ -7697,6 +7604,8 @@ var SelectorInput = function SelectorInput(_ref3) {
|
|
|
7697
7604
|
}, inputProps));
|
|
7698
7605
|
};
|
|
7699
7606
|
|
|
7607
|
+
/* eslint-disable @typescript-eslint/no-shadow */
|
|
7608
|
+
|
|
7700
7609
|
var Checkbox = function Checkbox(_ref) {
|
|
7701
7610
|
var _groupProps$state, _groupProps$size;
|
|
7702
7611
|
|
|
@@ -7723,10 +7632,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
7723
7632
|
var hasOnChange = !isUndefined_1(onChange);
|
|
7724
7633
|
|
|
7725
7634
|
if ((hasValidationState || hasName || hasDefaultChecked || hasIsChecked || hasOnChange) && !isEmpty_1(groupProps)) {
|
|
7726
|
-
var
|
|
7727
|
-
|
|
7728
|
-
var props = _filterInstanceProperty(_context = [hasValidationState ? 'validationState' : undefined, hasName ? 'name' : undefined, hasDefaultChecked ? 'defaultChecked' : undefined, hasIsChecked ? 'isChecked' : undefined, hasOnChange ? 'onChange' : undefined]).call(_context, Boolean).join(',');
|
|
7729
|
-
|
|
7635
|
+
var props = [hasValidationState ? 'validationState' : undefined, hasName ? 'name' : undefined, hasDefaultChecked ? 'defaultChecked' : undefined, hasIsChecked ? 'isChecked' : undefined, hasOnChange ? 'onChange' : undefined].filter(Boolean).join(',');
|
|
7730
7636
|
throw new Error("[Blade Checkbox]: Cannot set `".concat(props, "` on <Checkbox /> when it's inside <CheckboxGroup />, Please set it on the <CheckboxGroup /> itself"));
|
|
7731
7637
|
} // mandate value prop when using inside group
|
|
7732
7638
|
|
|
@@ -7885,16 +7791,16 @@ var useCheckboxGroup = function useCheckboxGroup(_ref) {
|
|
|
7885
7791
|
});
|
|
7886
7792
|
}),
|
|
7887
7793
|
isChecked: function isChecked(value) {
|
|
7888
|
-
return
|
|
7794
|
+
return checkedValues.includes(value);
|
|
7889
7795
|
},
|
|
7890
7796
|
addValue: function addValue(value) {
|
|
7891
7797
|
if (isDisabled) {
|
|
7892
7798
|
return;
|
|
7893
7799
|
}
|
|
7894
7800
|
|
|
7895
|
-
if (!
|
|
7801
|
+
if (!checkedValues.includes(value)) {
|
|
7896
7802
|
setValue(function () {
|
|
7897
|
-
return
|
|
7803
|
+
return checkedValues.concat(value);
|
|
7898
7804
|
});
|
|
7899
7805
|
}
|
|
7900
7806
|
},
|
|
@@ -7903,9 +7809,9 @@ var useCheckboxGroup = function useCheckboxGroup(_ref) {
|
|
|
7903
7809
|
return;
|
|
7904
7810
|
}
|
|
7905
7811
|
|
|
7906
|
-
if (
|
|
7812
|
+
if (checkedValues.includes(value)) {
|
|
7907
7813
|
setValue(function () {
|
|
7908
|
-
return
|
|
7814
|
+
return checkedValues.filter(function (existingValue) {
|
|
7909
7815
|
return existingValue !== value;
|
|
7910
7816
|
});
|
|
7911
7817
|
});
|
|
@@ -7932,9 +7838,9 @@ var useCheckboxGroup = function useCheckboxGroup(_ref) {
|
|
|
7932
7838
|
};
|
|
7933
7839
|
};
|
|
7934
7840
|
|
|
7935
|
-
function ownKeys$b(object, enumerableOnly) { var keys =
|
|
7841
|
+
function ownKeys$b(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; }
|
|
7936
7842
|
|
|
7937
|
-
function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
7843
|
+
function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$b(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$b(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7938
7844
|
|
|
7939
7845
|
var SelectorGroupField = function SelectorGroupField(_ref) {
|
|
7940
7846
|
var children = _ref.children,
|
|
@@ -7958,8 +7864,6 @@ var SelectorGroupField = function SelectorGroupField(_ref) {
|
|
|
7958
7864
|
};
|
|
7959
7865
|
|
|
7960
7866
|
var CheckboxGroup = function CheckboxGroup(_ref) {
|
|
7961
|
-
var _context, _context2;
|
|
7962
|
-
|
|
7963
7867
|
var children = _ref.children,
|
|
7964
7868
|
label = _ref.label,
|
|
7965
7869
|
helpText = _ref.helpText,
|
|
@@ -7995,8 +7899,7 @@ var CheckboxGroup = function CheckboxGroup(_ref) {
|
|
|
7995
7899
|
|
|
7996
7900
|
var showError = validationState === 'error' && errorText;
|
|
7997
7901
|
var showHelpText = !showError && helpText;
|
|
7998
|
-
|
|
7999
|
-
var accessibilityText = _concatInstanceProperty(_context = ",".concat(showError ? errorText : '', " ")).call(_context, showHelpText ? helpText : '');
|
|
7902
|
+
var accessibilityText = ",".concat(showError ? errorText : '', " ").concat(showHelpText ? helpText : '');
|
|
8000
7903
|
|
|
8001
7904
|
var _useBreakpoint = useBreakpoint({
|
|
8002
7905
|
breakpoints: theme.breakpoints
|
|
@@ -8021,7 +7924,7 @@ var CheckboxGroup = function CheckboxGroup(_ref) {
|
|
|
8021
7924
|
children: [/*#__PURE__*/jsx(Box, {
|
|
8022
7925
|
display: "flex",
|
|
8023
7926
|
flexDirection: "column",
|
|
8024
|
-
children:
|
|
7927
|
+
children: React__default.Children.map(children, function (child, index) {
|
|
8025
7928
|
return /*#__PURE__*/jsx(Box, {
|
|
8026
7929
|
marginBottom: index === childCount - 1 ? 0 : gap,
|
|
8027
7930
|
children: child
|
|
@@ -8037,9 +7940,9 @@ var CheckboxGroup = function CheckboxGroup(_ref) {
|
|
|
8037
7940
|
});
|
|
8038
7941
|
};
|
|
8039
7942
|
|
|
8040
|
-
function ownKeys$a(object, enumerableOnly) { var keys =
|
|
7943
|
+
function ownKeys$a(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; }
|
|
8041
7944
|
|
|
8042
|
-
function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
7945
|
+
function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$a(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$a(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8043
7946
|
|
|
8044
7947
|
var getVisualContainerStyles = function getVisualContainerStyles() {
|
|
8045
7948
|
return {
|
|
@@ -8211,9 +8114,9 @@ var BaseInputVisuals = function BaseInputVisuals(_ref5) {
|
|
|
8211
8114
|
return null;
|
|
8212
8115
|
};
|
|
8213
8116
|
|
|
8214
|
-
function ownKeys$9(object, enumerableOnly) { var keys =
|
|
8117
|
+
function ownKeys$9(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; }
|
|
8215
8118
|
|
|
8216
|
-
function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
8119
|
+
function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$9(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$9(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8217
8120
|
|
|
8218
8121
|
var getTextStyles = function getTextStyles(_ref) {
|
|
8219
8122
|
var variant = _ref.variant,
|
|
@@ -8233,9 +8136,9 @@ var getTextStyles = function getTextStyles(_ref) {
|
|
|
8233
8136
|
}));
|
|
8234
8137
|
};
|
|
8235
8138
|
|
|
8236
|
-
function ownKeys$8(object, enumerableOnly) { var keys =
|
|
8139
|
+
function ownKeys$8(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; }
|
|
8237
8140
|
|
|
8238
|
-
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
8141
|
+
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$8(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8239
8142
|
var getInputBackgroundAndBorderStyles = function getInputBackgroundAndBorderStyles(_ref) {
|
|
8240
8143
|
var theme = _ref.theme,
|
|
8241
8144
|
isHovered = _ref.isHovered,
|
|
@@ -8327,9 +8230,9 @@ var getBaseInputStyles = function getBaseInputStyles(_ref2) {
|
|
|
8327
8230
|
|
|
8328
8231
|
var _excluded$1 = ["name", "isDisabled", "isRequired", "maxCharacters", "handleOnFocus", "handleOnChange", "handleOnBlur", "handleOnInput", "handleOnKeyDown", "keyboardType", "keyboardReturnKeyType", "autoCompleteSuggestionType", "accessibilityProps", "setCurrentInteraction", "numberOfLines", "type"];
|
|
8329
8232
|
|
|
8330
|
-
function ownKeys$7(object, enumerableOnly) { var keys =
|
|
8233
|
+
function ownKeys$7(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; }
|
|
8331
8234
|
|
|
8332
|
-
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
8235
|
+
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8333
8236
|
var StyledBaseNativeInput = /*#__PURE__*/styled.input.withConfig({
|
|
8334
8237
|
displayName: "StyledBaseInputweb__StyledBaseNativeInput",
|
|
8335
8238
|
componentId: "hsusrk-0"
|
|
@@ -8486,9 +8389,9 @@ var BaseInputAnimatedBorder = function BaseInputAnimatedBorder(_ref2) {
|
|
|
8486
8389
|
|
|
8487
8390
|
var _excluded = ["children", "validationState", "currentInteraction", "isLabelLeftPositioned", "isTextArea"];
|
|
8488
8391
|
|
|
8489
|
-
function ownKeys$6(object, enumerableOnly) { var keys =
|
|
8392
|
+
function ownKeys$6(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; }
|
|
8490
8393
|
|
|
8491
|
-
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
8394
|
+
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8492
8395
|
var StyledBaseInputWrapper = /*#__PURE__*/styled(Box).withConfig({
|
|
8493
8396
|
displayName: "BaseInputWrapper__StyledBaseInputWrapper",
|
|
8494
8397
|
componentId: "sc-27jk75-0"
|
|
@@ -8802,10 +8705,8 @@ var BaseInput = /*#__PURE__*/React__default.forwardRef(function (_ref9, ref) {
|
|
|
8802
8705
|
});
|
|
8803
8706
|
var willRenderHintText = Boolean(helpText) || Boolean(successText) || Boolean(errorText);
|
|
8804
8707
|
|
|
8805
|
-
if (autoCompleteSuggestionType && !
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
throw new Error(_concatInstanceProperty(_context = "[Blade: Input]: Expected autoCompleteSuggestionType to be one of ".concat(autoCompleteSuggestionTypeValues.join(', '), " but received ")).call(_context, autoCompleteSuggestionType));
|
|
8708
|
+
if (autoCompleteSuggestionType && !autoCompleteSuggestionTypeValues.includes(autoCompleteSuggestionType)) {
|
|
8709
|
+
throw new Error("[Blade: Input]: Expected autoCompleteSuggestionType to be one of ".concat(autoCompleteSuggestionTypeValues.join(', '), " but received ").concat(autoCompleteSuggestionType));
|
|
8809
8710
|
}
|
|
8810
8711
|
|
|
8811
8712
|
var isTextArea = as === 'textarea';
|
|
@@ -8916,9 +8817,9 @@ var CharacterCounter = function CharacterCounter(_ref) {
|
|
|
8916
8817
|
});
|
|
8917
8818
|
};
|
|
8918
8819
|
|
|
8919
|
-
function ownKeys$5(object, enumerableOnly) { var keys =
|
|
8820
|
+
function ownKeys$5(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; }
|
|
8920
8821
|
|
|
8921
|
-
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
8822
|
+
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8922
8823
|
|
|
8923
8824
|
var getKeyboardAndAutocompleteProps = function getKeyboardAndAutocompleteProps(_ref) {
|
|
8924
8825
|
var _ref$type = _ref.type,
|
|
@@ -9345,18 +9246,18 @@ var TextArea = function TextArea(_ref) {
|
|
|
9345
9246
|
});
|
|
9346
9247
|
};
|
|
9347
9248
|
|
|
9348
|
-
function ownKeys$4(object, enumerableOnly) { var keys =
|
|
9249
|
+
function ownKeys$4(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; }
|
|
9349
9250
|
|
|
9350
|
-
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
9251
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9351
9252
|
var isReactNative = getPlatformType() === 'react-native';
|
|
9352
9253
|
/**
|
|
9353
9254
|
* Converts a string value of otp to array if passed otherwise returns an array of 6 empty strings
|
|
9354
9255
|
*/
|
|
9355
9256
|
|
|
9356
9257
|
var otpToArray = function otpToArray(code) {
|
|
9357
|
-
var _code$split
|
|
9258
|
+
var _code$split;
|
|
9358
9259
|
|
|
9359
|
-
return (_code$split = code === null || code === void 0 ? void 0 : code.split('')) !== null && _code$split !== void 0 ? _code$split :
|
|
9260
|
+
return (_code$split = code === null || code === void 0 ? void 0 : code.split('')) !== null && _code$split !== void 0 ? _code$split : Array(6).fill('');
|
|
9360
9261
|
};
|
|
9361
9262
|
/**
|
|
9362
9263
|
* OTPInput component can be used for accepting OTPs sent to users for authentication/verification purposes.
|
|
@@ -9416,13 +9317,13 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9416
9317
|
if (inputValue && inputValue.length >= otpLength) {
|
|
9417
9318
|
// callback for when the OTPInput is controlled and inputValue reaches the same or greater length as the otpLength
|
|
9418
9319
|
onOTPFilled === null || onOTPFilled === void 0 ? void 0 : onOTPFilled({
|
|
9419
|
-
value:
|
|
9320
|
+
value: inputValue.slice(0, otpLength),
|
|
9420
9321
|
name: name
|
|
9421
9322
|
});
|
|
9422
9323
|
} else if (!inputValue && otpValue.join('').length >= otpLength) {
|
|
9423
9324
|
// callback for when the OTPInput is uncontrolled and otpValue stored in state reaches the same or greater length as the otpLength
|
|
9424
9325
|
onOTPFilled === null || onOTPFilled === void 0 ? void 0 : onOTPFilled({
|
|
9425
|
-
value:
|
|
9326
|
+
value: otpValue.slice(0, otpLength).join(''),
|
|
9426
9327
|
name: name
|
|
9427
9328
|
});
|
|
9428
9329
|
}
|
|
@@ -9437,9 +9338,7 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9437
9338
|
var setOtpValueByIndex = function setOtpValueByIndex(_ref2) {
|
|
9438
9339
|
var value = _ref2.value,
|
|
9439
9340
|
index = _ref2.index;
|
|
9440
|
-
|
|
9441
|
-
var newOtpValue = _Array$from(otpValue);
|
|
9442
|
-
|
|
9341
|
+
var newOtpValue = Array.from(otpValue);
|
|
9443
9342
|
newOtpValue[index] = value;
|
|
9444
9343
|
setOtpValue(newOtpValue);
|
|
9445
9344
|
return newOtpValue.join('');
|
|
@@ -9476,31 +9375,28 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9476
9375
|
if (inputValue && inputValue.length > 0) {
|
|
9477
9376
|
// When OTPInput is controlled, set the otpValue as the consumer passed `inputValue` and append the value on current index based on user's input.
|
|
9478
9377
|
// User's input will not reflect on the otp but will trigger `onChange` callback with the user's input appended so that the consumer can take appropriate action.
|
|
9479
|
-
var newOtpValue =
|
|
9480
|
-
|
|
9378
|
+
var newOtpValue = Array.from(inputValue);
|
|
9481
9379
|
newOtpValue[currentOtpIndex] = value !== null && value !== void 0 ? value : '';
|
|
9482
9380
|
setOtpValue(newOtpValue);
|
|
9483
9381
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
9484
9382
|
name: name,
|
|
9485
9383
|
value: newOtpValue.join('')
|
|
9486
9384
|
});
|
|
9487
|
-
} else if (value &&
|
|
9488
|
-
var _context2;
|
|
9489
|
-
|
|
9385
|
+
} else if (value && value.trim().length > 1) {
|
|
9490
9386
|
// When the entered value is more that 1 character (when value is pasted), set the otpValue to the newly received value.
|
|
9491
9387
|
// Could have used `onPaste` for web to achieve this but 1. React Native doesn't support onPaste and 2. Safari's autofill on web doesn't trigger onPaste
|
|
9492
|
-
setOtpValue(
|
|
9388
|
+
setOtpValue(Array.from(value));
|
|
9493
9389
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
9494
9390
|
name: name,
|
|
9495
|
-
value:
|
|
9391
|
+
value: value.trim().slice(0, otpLength)
|
|
9496
9392
|
});
|
|
9497
|
-
} else if (otpValue[currentOtpIndex] !== (value === null || value === void 0 ? void 0 :
|
|
9393
|
+
} else if (otpValue[currentOtpIndex] !== (value === null || value === void 0 ? void 0 : value.trim())) {
|
|
9498
9394
|
var _value$trim;
|
|
9499
9395
|
|
|
9500
9396
|
// Set the value at the current index to the entered value
|
|
9501
9397
|
// only as long as its not the same as the already existing value (this prevents `onChange` being triggered unnecessarily)
|
|
9502
9398
|
var newValue = setOtpValueByIndex({
|
|
9503
|
-
value: (_value$trim = value === null || value === void 0 ? void 0 :
|
|
9399
|
+
value: (_value$trim = value === null || value === void 0 ? void 0 : value.trim()) !== null && _value$trim !== void 0 ? _value$trim : '',
|
|
9504
9400
|
index: currentOtpIndex
|
|
9505
9401
|
});
|
|
9506
9402
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
@@ -9515,7 +9411,7 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9515
9411
|
currentOtpIndex = _ref4.currentOtpIndex;
|
|
9516
9412
|
|
|
9517
9413
|
// Moves focus to next input whenever a value is entered in the current input
|
|
9518
|
-
if (value &&
|
|
9414
|
+
if (value && value.trim().length === 1) {
|
|
9519
9415
|
focusOnOtpByIndex(++currentOtpIndex);
|
|
9520
9416
|
}
|
|
9521
9417
|
};
|
|
@@ -9571,7 +9467,7 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9571
9467
|
var inputs = [];
|
|
9572
9468
|
|
|
9573
9469
|
var _loop = function _loop(index) {
|
|
9574
|
-
var
|
|
9470
|
+
var _otpValue$index, _Array$from$index;
|
|
9575
9471
|
|
|
9576
9472
|
var currentValue = inputValue ? otpToArray(inputValue)[index] || '' : otpValue[index] || '';
|
|
9577
9473
|
var ref = /*#__PURE__*/React__default.createRef();
|
|
@@ -9584,10 +9480,10 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9584
9480
|
children: /*#__PURE__*/jsx(BaseInput // eslint-disable-next-line jsx-a11y/no-autofocus
|
|
9585
9481
|
, {
|
|
9586
9482
|
autoFocus: autoFocus && index === 0,
|
|
9587
|
-
accessibilityLabel:
|
|
9483
|
+
accessibilityLabel: "".concat(index === 0 ? label : '', " character ").concat(index + 1),
|
|
9588
9484
|
label: label,
|
|
9589
9485
|
hideLabelText: true,
|
|
9590
|
-
id:
|
|
9486
|
+
id: "".concat(inputId, "-").concat(index),
|
|
9591
9487
|
textAlign: "center",
|
|
9592
9488
|
ref: ref,
|
|
9593
9489
|
value: currentValue,
|
|
@@ -9608,7 +9504,7 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9608
9504
|
}));
|
|
9609
9505
|
},
|
|
9610
9506
|
isDisabled: isDisabled,
|
|
9611
|
-
placeholder: (_Array$from$index =
|
|
9507
|
+
placeholder: (_Array$from$index = Array.from(placeholder !== null && placeholder !== void 0 ? placeholder : '')[index]) !== null && _Array$from$index !== void 0 ? _Array$from$index : '',
|
|
9612
9508
|
isRequired: true,
|
|
9613
9509
|
autoCompleteSuggestionType: "oneTimeCode",
|
|
9614
9510
|
keyboardType: keyboardType,
|
|
@@ -9619,7 +9515,7 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9619
9515
|
helpText: helpText,
|
|
9620
9516
|
hideFormHint: true
|
|
9621
9517
|
})
|
|
9622
|
-
},
|
|
9518
|
+
}, "".concat(inputId, "-").concat(index)));
|
|
9623
9519
|
};
|
|
9624
9520
|
|
|
9625
9521
|
for (var index = 0; index < otpLength; index++) {
|
|
@@ -9663,9 +9559,9 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9663
9559
|
});
|
|
9664
9560
|
};
|
|
9665
9561
|
|
|
9666
|
-
function ownKeys$3(object, enumerableOnly) { var keys =
|
|
9562
|
+
function ownKeys$3(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; }
|
|
9667
9563
|
|
|
9668
|
-
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
9564
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9669
9565
|
|
|
9670
9566
|
var Link = function Link(_ref) {
|
|
9671
9567
|
var children = _ref.children,
|
|
@@ -9704,9 +9600,9 @@ var Link = function Link(_ref) {
|
|
|
9704
9600
|
}));
|
|
9705
9601
|
};
|
|
9706
9602
|
|
|
9707
|
-
function ownKeys$2(object, enumerableOnly) { var keys =
|
|
9603
|
+
function ownKeys$2(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; }
|
|
9708
9604
|
|
|
9709
|
-
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
9605
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9710
9606
|
|
|
9711
9607
|
var useRadio = function useRadio(_ref) {
|
|
9712
9608
|
var isChecked = _ref.isChecked,
|
|
@@ -9873,9 +9769,9 @@ var radioIconColors = {
|
|
|
9873
9769
|
}
|
|
9874
9770
|
};
|
|
9875
9771
|
|
|
9876
|
-
function ownKeys$1(object, enumerableOnly) { var keys =
|
|
9772
|
+
function ownKeys$1(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; }
|
|
9877
9773
|
|
|
9878
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
9774
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9879
9775
|
|
|
9880
9776
|
var getRadioIconWrapperStyles = function getRadioIconWrapperStyles(_ref) {
|
|
9881
9777
|
var theme = _ref.theme,
|
|
@@ -10044,9 +9940,8 @@ var Circle = function Circle(_ref) {
|
|
|
10044
9940
|
x = _ref.x,
|
|
10045
9941
|
y = _ref.y,
|
|
10046
9942
|
r = _ref.r,
|
|
10047
|
-
fill =
|
|
9943
|
+
fill = _ref.fill,
|
|
10048
9944
|
stroke = _ref.stroke;
|
|
10049
|
-
|
|
10050
9945
|
return /*#__PURE__*/jsx("circle", {
|
|
10051
9946
|
cx: cx,
|
|
10052
9947
|
cy: cy,
|
|
@@ -10058,17 +9953,15 @@ var Circle = function Circle(_ref) {
|
|
|
10058
9953
|
});
|
|
10059
9954
|
};
|
|
10060
9955
|
|
|
10061
|
-
|
|
10062
|
-
var _context;
|
|
9956
|
+
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
10063
9957
|
|
|
9958
|
+
var CheckedIcon = function CheckedIcon(_ref) {
|
|
10064
9959
|
var color = _ref.color,
|
|
10065
9960
|
size = _ref.size;
|
|
10066
9961
|
var width = radioSizes.icon[size].width;
|
|
10067
9962
|
var height = radioSizes.icon[size].height;
|
|
10068
9963
|
var radius = radioSizes.icon[size].dotRadius;
|
|
10069
|
-
|
|
10070
|
-
var viewBox = _concatInstanceProperty(_context = "0 0 ".concat(width, " ")).call(_context, height);
|
|
10071
|
-
|
|
9964
|
+
var viewBox = "0 0 ".concat(width, " ").concat(height);
|
|
10072
9965
|
var cx = "".concat(width / 2);
|
|
10073
9966
|
var cy = "".concat(height / 2);
|
|
10074
9967
|
return /*#__PURE__*/jsx(Svg, {
|
|
@@ -10314,8 +10207,6 @@ var useRadioGroup = function useRadioGroup(_ref) {
|
|
|
10314
10207
|
};
|
|
10315
10208
|
|
|
10316
10209
|
var RadioGroup = function RadioGroup(_ref) {
|
|
10317
|
-
var _context, _context2;
|
|
10318
|
-
|
|
10319
10210
|
var children = _ref.children,
|
|
10320
10211
|
label = _ref.label,
|
|
10321
10212
|
helpText = _ref.helpText,
|
|
@@ -10358,9 +10249,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
10358
10249
|
|
|
10359
10250
|
var showError = validationState === 'error' && errorText;
|
|
10360
10251
|
var showHelpText = !showError && helpText;
|
|
10361
|
-
|
|
10362
|
-
var accessibilityText = _concatInstanceProperty(_context = ",".concat(showError ? errorText : '', " ")).call(_context, showHelpText ? helpText : '');
|
|
10363
|
-
|
|
10252
|
+
var accessibilityText = ",".concat(showError ? errorText : '', " ").concat(showHelpText ? helpText : '');
|
|
10364
10253
|
var isReactNative = getPlatformType() === 'react-native';
|
|
10365
10254
|
var gap = radioSizes.group.gap[size][matchedDeviceType];
|
|
10366
10255
|
var childCount = React__default.Children.count(children);
|
|
@@ -10381,7 +10270,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
10381
10270
|
children: [/*#__PURE__*/jsx(Box, {
|
|
10382
10271
|
display: "flex",
|
|
10383
10272
|
flexDirection: "column",
|
|
10384
|
-
children:
|
|
10273
|
+
children: React__default.Children.map(children, function (child, index) {
|
|
10385
10274
|
return /*#__PURE__*/jsx(Box, {
|
|
10386
10275
|
marginBottom: index === childCount - 1 ? 0 : gap,
|
|
10387
10276
|
children: child
|
|
@@ -10416,9 +10305,9 @@ var Spinner = function Spinner(_ref) {
|
|
|
10416
10305
|
});
|
|
10417
10306
|
};
|
|
10418
10307
|
|
|
10419
|
-
function ownKeys(object, enumerableOnly) { var keys =
|
|
10308
|
+
function ownKeys(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; }
|
|
10420
10309
|
|
|
10421
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
10310
|
+
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$1(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; }
|
|
10422
10311
|
var fallbackId = 'blade-skip-nav';
|
|
10423
10312
|
var StyledLink = /*#__PURE__*/styled(BaseLink).withConfig({
|
|
10424
10313
|
displayName: "SkipNavweb__StyledLink",
|