@razorpay/blade 3.5.0 → 3.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/build/components/index.web.js +152 -266
- 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"
|
|
@@ -4937,7 +4869,8 @@ var StyledIconButton = function StyledIconButton(_ref) {
|
|
|
4937
4869
|
accessibilityLabel = _ref.accessibilityLabel;
|
|
4938
4870
|
return /*#__PURE__*/jsx(StyledButton, _objectSpread$r(_objectSpread$r({
|
|
4939
4871
|
onClick: onClick,
|
|
4940
|
-
contrast: contrast
|
|
4872
|
+
contrast: contrast,
|
|
4873
|
+
type: "button"
|
|
4941
4874
|
}, makeAccessible({
|
|
4942
4875
|
label: accessibilityLabel
|
|
4943
4876
|
})), {}, {
|
|
@@ -5126,9 +5059,9 @@ var getBaseTextStyles = function getBaseTextStyles(_ref) {
|
|
|
5126
5059
|
|
|
5127
5060
|
var _excluded$3 = ["color", "fontFamily", "fontSize", "fontWeight", "fontStyle", "textDecorationLine", "lineHeight", "textAlign"];
|
|
5128
5061
|
|
|
5129
|
-
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; }
|
|
5130
5063
|
|
|
5131
|
-
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; }
|
|
5132
5065
|
var StyledBaseText$1 = /*#__PURE__*/styled.div.withConfig({
|
|
5133
5066
|
displayName: "BaseTextweb__StyledBaseText",
|
|
5134
5067
|
componentId: "sc-1ob51ew-0"
|
|
@@ -5191,20 +5124,18 @@ var BaseText = function BaseText(_ref2) {
|
|
|
5191
5124
|
}));
|
|
5192
5125
|
};
|
|
5193
5126
|
|
|
5194
|
-
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; }
|
|
5195
5128
|
|
|
5196
|
-
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; }
|
|
5197
5130
|
|
|
5198
5131
|
var getProps$3 = function getProps(_ref) {
|
|
5199
|
-
var _context;
|
|
5200
|
-
|
|
5201
5132
|
var size = _ref.size,
|
|
5202
5133
|
type = _ref.type,
|
|
5203
5134
|
contrast = _ref.contrast;
|
|
5204
5135
|
var isPlatformWeb = getPlatformType() === 'browser' || getPlatformType() === 'node';
|
|
5205
5136
|
var colorContrast = contrast ? "".concat(contrast, "Contrast") : 'lowContrast';
|
|
5206
5137
|
var props = {
|
|
5207
|
-
color:
|
|
5138
|
+
color: "surface.text.".concat(type !== null && type !== void 0 ? type : 'normal', ".").concat(colorContrast),
|
|
5208
5139
|
fontSize: 600,
|
|
5209
5140
|
fontWeight: 'bold',
|
|
5210
5141
|
fontStyle: 'normal',
|
|
@@ -5250,13 +5181,11 @@ var Title = function Title(_ref2) {
|
|
|
5250
5181
|
}));
|
|
5251
5182
|
};
|
|
5252
5183
|
|
|
5253
|
-
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; }
|
|
5254
5185
|
|
|
5255
|
-
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; }
|
|
5256
5187
|
|
|
5257
5188
|
var getProps$2 = function getProps(_ref) {
|
|
5258
|
-
var _context;
|
|
5259
|
-
|
|
5260
5189
|
var variant = _ref.variant,
|
|
5261
5190
|
size = _ref.size,
|
|
5262
5191
|
type = _ref.type,
|
|
@@ -5265,7 +5194,7 @@ var getProps$2 = function getProps(_ref) {
|
|
|
5265
5194
|
var isPlatformWeb = getPlatformType() === 'browser' || getPlatformType() === 'node';
|
|
5266
5195
|
var colorContrast = contrast ? "".concat(contrast, "Contrast") : 'lowContrast';
|
|
5267
5196
|
var props = {
|
|
5268
|
-
color:
|
|
5197
|
+
color: "surface.text.".concat(type !== null && type !== void 0 ? type : 'normal', ".").concat(colorContrast),
|
|
5269
5198
|
fontSize: 200,
|
|
5270
5199
|
fontWeight: weight !== null && weight !== void 0 ? weight : 'bold',
|
|
5271
5200
|
fontStyle: 'normal',
|
|
@@ -5330,13 +5259,11 @@ var Heading = function Heading(_ref2) {
|
|
|
5330
5259
|
}));
|
|
5331
5260
|
};
|
|
5332
5261
|
|
|
5333
|
-
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; }
|
|
5334
5263
|
|
|
5335
|
-
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; }
|
|
5336
5265
|
|
|
5337
5266
|
var getTextProps = function getTextProps(_ref) {
|
|
5338
|
-
var _context;
|
|
5339
|
-
|
|
5340
5267
|
var variant = _ref.variant,
|
|
5341
5268
|
type = _ref.type,
|
|
5342
5269
|
weight = _ref.weight,
|
|
@@ -5345,7 +5272,7 @@ var getTextProps = function getTextProps(_ref) {
|
|
|
5345
5272
|
var isPlatformWeb = getPlatformType() === 'browser' || getPlatformType() === 'node';
|
|
5346
5273
|
var colorContrast = contrast ? "".concat(contrast, "Contrast") : 'lowContrast';
|
|
5347
5274
|
var props = {
|
|
5348
|
-
color:
|
|
5275
|
+
color: "surface.text.".concat(type !== null && type !== void 0 ? type : 'normal', ".").concat(colorContrast),
|
|
5349
5276
|
fontSize: 100,
|
|
5350
5277
|
fontWeight: weight !== null && weight !== void 0 ? weight : 'regular',
|
|
5351
5278
|
fontStyle: 'normal',
|
|
@@ -5447,10 +5374,7 @@ var CodeContainer = /*#__PURE__*/styled(Box).withConfig({
|
|
|
5447
5374
|
displayName: "Code__CodeContainer",
|
|
5448
5375
|
componentId: "l9m17z-0"
|
|
5449
5376
|
})(function (props) {
|
|
5450
|
-
var
|
|
5451
|
-
|
|
5452
|
-
var padding = _concatInstanceProperty(_context = "".concat(makeSpace(props.theme.spacing[0]), " ")).call(_context, makeSpace(props.theme.spacing[2]));
|
|
5453
|
-
|
|
5377
|
+
var padding = "".concat(makeSpace(props.theme.spacing[0]), " ").concat(makeSpace(props.theme.spacing[2]));
|
|
5454
5378
|
return {
|
|
5455
5379
|
padding: padding,
|
|
5456
5380
|
backgroundColor: props.theme.colors.brand.gray[400],
|
|
@@ -5533,9 +5457,9 @@ var getBaseButtonStyles = function getBaseButtonStyles(_ref) {
|
|
|
5533
5457
|
};
|
|
5534
5458
|
};
|
|
5535
5459
|
|
|
5536
|
-
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; }
|
|
5537
5461
|
|
|
5538
|
-
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; }
|
|
5539
5463
|
var StyledBaseButton = /*#__PURE__*/styled.button.attrs(function (props) {
|
|
5540
5464
|
return _objectSpread$m({}, props.accessibilityProps);
|
|
5541
5465
|
}).withConfig({
|
|
@@ -5693,9 +5617,7 @@ var LiveAnnouncer = /*#__PURE__*/function () {
|
|
|
5693
5617
|
|
|
5694
5618
|
this.node = document.createElement('div');
|
|
5695
5619
|
this.node.dataset.liveAnnouncer = 'true';
|
|
5696
|
-
|
|
5697
|
-
_Object$assign(this.node.style, screenReaderStyles);
|
|
5698
|
-
|
|
5620
|
+
Object.assign(this.node.style, screenReaderStyles);
|
|
5699
5621
|
this.assertiveLog = this.createLog('assertive');
|
|
5700
5622
|
this.node.appendChild(this.assertiveLog);
|
|
5701
5623
|
this.politeLog = this.createLog('polite');
|
|
@@ -5742,7 +5664,7 @@ var LiveAnnouncer = /*#__PURE__*/function () {
|
|
|
5742
5664
|
}
|
|
5743
5665
|
|
|
5744
5666
|
if (message !== '') {
|
|
5745
|
-
|
|
5667
|
+
setTimeout(function () {
|
|
5746
5668
|
node.remove();
|
|
5747
5669
|
}, LIVEREGION_TIMEOUT_DELAY);
|
|
5748
5670
|
}
|
|
@@ -5841,9 +5763,9 @@ var SpinningBox = /*#__PURE__*/styled(Box).withConfig({
|
|
|
5841
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));
|
|
5842
5764
|
});
|
|
5843
5765
|
|
|
5844
|
-
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; }
|
|
5845
5767
|
|
|
5846
|
-
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; }
|
|
5847
5769
|
|
|
5848
5770
|
var getColor = function getColor(_ref) {
|
|
5849
5771
|
var contrast = _ref.contrast,
|
|
@@ -5851,9 +5773,7 @@ var getColor = function getColor(_ref) {
|
|
|
5851
5773
|
theme = _ref.theme;
|
|
5852
5774
|
|
|
5853
5775
|
if (intent) {
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
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"));
|
|
5857
5777
|
} else if (contrast == 'low') {
|
|
5858
5778
|
return get_1(theme.colors, 'brand.gray.700');
|
|
5859
5779
|
} else {
|
|
@@ -5894,7 +5814,7 @@ var BaseSpinner = function BaseSpinner(_ref2) {
|
|
|
5894
5814
|
theme: theme
|
|
5895
5815
|
})
|
|
5896
5816
|
})
|
|
5897
|
-
}), label &&
|
|
5817
|
+
}), label && label.trim().length > 0 ? /*#__PURE__*/jsx(Box, {
|
|
5898
5818
|
marginLeft: labelPosition === 'right' ? 'spacing.3' : 'spacing.0',
|
|
5899
5819
|
marginTop: labelPosition === 'bottom' ? 'spacing.3' : 'spacing.0',
|
|
5900
5820
|
children: /*#__PURE__*/jsx(Text, {
|
|
@@ -5910,13 +5830,11 @@ var BaseSpinner = function BaseSpinner(_ref2) {
|
|
|
5910
5830
|
});
|
|
5911
5831
|
};
|
|
5912
5832
|
|
|
5913
|
-
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; }
|
|
5914
5834
|
|
|
5915
|
-
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; }
|
|
5916
5836
|
|
|
5917
5837
|
var getColorToken$1 = function getColorToken(_ref) {
|
|
5918
|
-
var _context4, _context5;
|
|
5919
|
-
|
|
5920
5838
|
var property = _ref.property,
|
|
5921
5839
|
variant = _ref.variant,
|
|
5922
5840
|
state = _ref.state,
|
|
@@ -5924,13 +5842,11 @@ var getColorToken$1 = function getColorToken(_ref) {
|
|
|
5924
5842
|
intent = _ref.intent;
|
|
5925
5843
|
|
|
5926
5844
|
if (intent && contrast) {
|
|
5927
|
-
var _context, _context2, _context3;
|
|
5928
|
-
|
|
5929
5845
|
// TODO: Add support for secondary & tertiary variants for feedback buttons here when a use-case is identified
|
|
5930
|
-
return
|
|
5846
|
+
return "feedback.".concat(intent, ".action.").concat(property, ".primary.").concat(state, ".").concat(contrast, "Contrast");
|
|
5931
5847
|
}
|
|
5932
5848
|
|
|
5933
|
-
return
|
|
5849
|
+
return "action.".concat(property, ".").concat(variant, ".").concat(state);
|
|
5934
5850
|
};
|
|
5935
5851
|
|
|
5936
5852
|
var getProps$1 = function getProps(_ref2) {
|
|
@@ -5943,14 +5859,14 @@ var getProps$1 = function getProps(_ref2) {
|
|
|
5943
5859
|
intent = _ref2.intent,
|
|
5944
5860
|
contrast = _ref2.contrast,
|
|
5945
5861
|
hasIcon = _ref2.hasIcon;
|
|
5946
|
-
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);
|
|
5947
5863
|
var props = {
|
|
5948
5864
|
iconSize: isIconOnly ? buttonIconOnlySizeToIconSizeMap[size] : buttonSizeToIconSizeMap[size],
|
|
5949
5865
|
spinnerSize: buttonSizeToSpinnerSizeMap[size],
|
|
5950
5866
|
fontSize: buttonTypographyTokens.fonts.size[size],
|
|
5951
5867
|
lineHeight: buttonTypographyTokens.lineHeights[size],
|
|
5952
5868
|
minHeight: makeSize(minHeight$1[size]),
|
|
5953
|
-
iconPadding: hasIcon && children !== null && children !== void 0 &&
|
|
5869
|
+
iconPadding: hasIcon && children !== null && children !== void 0 && children.trim() ? "spacing.".concat(textPadding[size]) : undefined,
|
|
5954
5870
|
iconColor: getColorToken$1({
|
|
5955
5871
|
property: 'icon',
|
|
5956
5872
|
variant: variant,
|
|
@@ -5969,7 +5885,7 @@ var getProps$1 = function getProps(_ref2) {
|
|
|
5969
5885
|
buttonPaddingBottom: isIconOnly ? makeSpace(theme.spacing[buttonIconOnlyPadding[size].bottom]) : makeSpace(theme.spacing[buttonPadding[size].bottom]),
|
|
5970
5886
|
buttonPaddingLeft: isIconOnly ? makeSpace(theme.spacing[buttonIconOnlyPadding[size].left]) : makeSpace(theme.spacing[buttonPadding[size].left]),
|
|
5971
5887
|
buttonPaddingRight: isIconOnly ? makeSpace(theme.spacing[buttonIconOnlyPadding[size].right]) : makeSpace(theme.spacing[buttonPadding[size].right]),
|
|
5972
|
-
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(),
|
|
5973
5889
|
defaultBackgroundColor: get_1(theme.colors, getColorToken$1({
|
|
5974
5890
|
property: 'background',
|
|
5975
5891
|
variant: variant,
|
|
@@ -6112,7 +6028,7 @@ var BaseButton = function BaseButton(_ref4) {
|
|
|
6112
6028
|
var _useTheme = useTheme(),
|
|
6113
6029
|
theme = _useTheme.theme;
|
|
6114
6030
|
|
|
6115
|
-
if (!Icon && !(children !== null && children !== void 0 &&
|
|
6031
|
+
if (!Icon && !(children !== null && children !== void 0 && children.trim())) {
|
|
6116
6032
|
throw new Error("[Blade: BaseButton]: At least one of icon or text is required to render a button.");
|
|
6117
6033
|
}
|
|
6118
6034
|
|
|
@@ -6252,9 +6168,9 @@ var getStyledLinkStyles = function getStyledLinkStyles(_ref) {
|
|
|
6252
6168
|
};
|
|
6253
6169
|
};
|
|
6254
6170
|
|
|
6255
|
-
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; }
|
|
6256
6172
|
|
|
6257
|
-
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; }
|
|
6258
6174
|
var StyledLink$1 = /*#__PURE__*/styled.button.attrs(function (props) {
|
|
6259
6175
|
return _objectSpread$j({}, props.accessibilityProps);
|
|
6260
6176
|
}).withConfig({
|
|
@@ -6318,13 +6234,11 @@ var useInteraction = function useInteraction() {
|
|
|
6318
6234
|
|
|
6319
6235
|
var _excluded$2 = ["currentInteraction", "setCurrentInteraction"];
|
|
6320
6236
|
|
|
6321
|
-
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; }
|
|
6322
6238
|
|
|
6323
|
-
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; }
|
|
6324
6240
|
|
|
6325
6241
|
var getColorToken = function getColorToken(_ref) {
|
|
6326
|
-
var _context4;
|
|
6327
|
-
|
|
6328
6242
|
var variant = _ref.variant,
|
|
6329
6243
|
intent = _ref.intent,
|
|
6330
6244
|
contrast = _ref.contrast,
|
|
@@ -6344,12 +6258,10 @@ var getColorToken = function getColorToken(_ref) {
|
|
|
6344
6258
|
}
|
|
6345
6259
|
|
|
6346
6260
|
if (intent && state !== 'visited') {
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
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");
|
|
6350
6262
|
}
|
|
6351
6263
|
|
|
6352
|
-
return
|
|
6264
|
+
return "action.".concat(element, ".link.").concat(state);
|
|
6353
6265
|
};
|
|
6354
6266
|
|
|
6355
6267
|
var getProps = function getProps(_ref2) {
|
|
@@ -6378,7 +6290,7 @@ var getProps = function getProps(_ref2) {
|
|
|
6378
6290
|
}),
|
|
6379
6291
|
fontSize: size === 'medium' ? 100 : 75,
|
|
6380
6292
|
iconSize: size,
|
|
6381
|
-
iconPadding: children !== null && children !== void 0 &&
|
|
6293
|
+
iconPadding: children !== null && children !== void 0 && children.trim() ? 'spacing.2' : 'spacing.0',
|
|
6382
6294
|
textColor: getColorToken({
|
|
6383
6295
|
variant: variant,
|
|
6384
6296
|
intent: intent,
|
|
@@ -6435,7 +6347,7 @@ var BaseLink = function BaseLink(_ref3) {
|
|
|
6435
6347
|
var _useTheme = useTheme(),
|
|
6436
6348
|
theme = _useTheme.theme;
|
|
6437
6349
|
|
|
6438
|
-
if (!Icon && !(children !== null && children !== void 0 &&
|
|
6350
|
+
if (!Icon && !(children !== null && children !== void 0 && children.trim())) {
|
|
6439
6351
|
throw new Error("[Blade: BaseLink]: At least one of icon or text is required to render a link.");
|
|
6440
6352
|
}
|
|
6441
6353
|
|
|
@@ -6533,9 +6445,9 @@ var BaseLink = function BaseLink(_ref3) {
|
|
|
6533
6445
|
}));
|
|
6534
6446
|
};
|
|
6535
6447
|
|
|
6536
|
-
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; }
|
|
6537
6449
|
|
|
6538
|
-
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; }
|
|
6539
6451
|
var isReactNative$3 = getPlatformType() === 'react-native'; // Need extra wrappers on React Native only for alignment
|
|
6540
6452
|
|
|
6541
6453
|
var SecondaryActionWrapper = isReactNative$3 ? Box : Fragment;
|
|
@@ -6548,8 +6460,6 @@ var intentIconMap = {
|
|
|
6548
6460
|
};
|
|
6549
6461
|
|
|
6550
6462
|
var Alert = function Alert(_ref) {
|
|
6551
|
-
var _context;
|
|
6552
|
-
|
|
6553
6463
|
var description = _ref.description,
|
|
6554
6464
|
title = _ref.title,
|
|
6555
6465
|
_ref$isDismissable = _ref.isDismissable,
|
|
@@ -6574,7 +6484,7 @@ var Alert = function Alert(_ref) {
|
|
|
6574
6484
|
var Icon = intentIconMap[intent];
|
|
6575
6485
|
|
|
6576
6486
|
var icon = /*#__PURE__*/jsx(Icon, {
|
|
6577
|
-
color:
|
|
6487
|
+
color: "feedback.icon.".concat(intent, ".").concat(contrastType),
|
|
6578
6488
|
size: "large"
|
|
6579
6489
|
});
|
|
6580
6490
|
|
|
@@ -6701,9 +6611,9 @@ var getStyledBadgeStyles = function getStyledBadgeStyles(_ref) {
|
|
|
6701
6611
|
};
|
|
6702
6612
|
};
|
|
6703
6613
|
|
|
6704
|
-
function ownKeys$g(object, enumerableOnly) { var keys =
|
|
6614
|
+
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; }
|
|
6705
6615
|
|
|
6706
|
-
function _objectSpread$g(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
6616
|
+
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; }
|
|
6707
6617
|
var StyledBadge = /*#__PURE__*/styled.div.withConfig({
|
|
6708
6618
|
displayName: "StyledBadgeweb__StyledBadge",
|
|
6709
6619
|
componentId: "sc-1svn4tv-0"
|
|
@@ -6715,7 +6625,7 @@ var StyledBadge = /*#__PURE__*/styled.div.withConfig({
|
|
|
6715
6625
|
|
|
6716
6626
|
var isFeedbackVariant = function isFeedbackVariant(variant) {
|
|
6717
6627
|
var feedbackVariants = ['information', 'negative', 'neutral', 'notice', 'positive'];
|
|
6718
|
-
return
|
|
6628
|
+
return feedbackVariants.includes(variant);
|
|
6719
6629
|
};
|
|
6720
6630
|
|
|
6721
6631
|
var getColorProps = function getColorProps(_ref) {
|
|
@@ -6728,17 +6638,13 @@ var getColorProps = function getColorProps(_ref) {
|
|
|
6728
6638
|
};
|
|
6729
6639
|
|
|
6730
6640
|
if (isFeedbackVariant(variant)) {
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
props.
|
|
6734
|
-
props.textColor = _concatInstanceProperty(_context2 = "feedback.text.".concat(variant, ".")).call(_context2, contrast, "Contrast");
|
|
6735
|
-
props.backgroundColor = _concatInstanceProperty(_context3 = "feedback.background.".concat(variant, ".")).call(_context3, contrast, "Contrast");
|
|
6641
|
+
props.iconColor = "feedback.icon.".concat(variant, ".").concat(contrast, "Contrast");
|
|
6642
|
+
props.textColor = "feedback.text.".concat(variant, ".").concat(contrast, "Contrast");
|
|
6643
|
+
props.backgroundColor = "feedback.background.".concat(variant, ".").concat(contrast, "Contrast");
|
|
6736
6644
|
} else {
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
props.
|
|
6740
|
-
props.textColor = _concatInstanceProperty(_context5 = "badge.text.".concat(variant, ".")).call(_context5, contrast, "Contrast");
|
|
6741
|
-
props.backgroundColor = _concatInstanceProperty(_context6 = "badge.background.".concat(variant, ".")).call(_context6, contrast, "Contrast");
|
|
6645
|
+
props.iconColor = "badge.icon.".concat(variant, ".").concat(contrast, "Contrast");
|
|
6646
|
+
props.textColor = "badge.text.".concat(variant, ".").concat(contrast, "Contrast");
|
|
6647
|
+
props.backgroundColor = "badge.background.".concat(variant, ".").concat(contrast, "Contrast");
|
|
6742
6648
|
}
|
|
6743
6649
|
|
|
6744
6650
|
return props;
|
|
@@ -6771,7 +6677,7 @@ var Badge = function Badge(_ref2) {
|
|
|
6771
6677
|
_ref2$variant = _ref2.variant,
|
|
6772
6678
|
variant = _ref2$variant === void 0 ? 'neutral' : _ref2$variant;
|
|
6773
6679
|
|
|
6774
|
-
if (!(children !== null && children !== void 0 &&
|
|
6680
|
+
if (!(children !== null && children !== void 0 && children.trim())) {
|
|
6775
6681
|
throw new Error('[Blade: Badge]: Text as children is required for Badge.');
|
|
6776
6682
|
}
|
|
6777
6683
|
|
|
@@ -6819,9 +6725,9 @@ var Badge = function Badge(_ref2) {
|
|
|
6819
6725
|
});
|
|
6820
6726
|
};
|
|
6821
6727
|
|
|
6822
|
-
function ownKeys$f(object, enumerableOnly) { var keys =
|
|
6728
|
+
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; }
|
|
6823
6729
|
|
|
6824
|
-
function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
6730
|
+
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; }
|
|
6825
6731
|
|
|
6826
6732
|
var Button = function Button(_ref) {
|
|
6827
6733
|
var children = _ref.children,
|
|
@@ -6988,9 +6894,9 @@ var CheckboxIconWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
6988
6894
|
return getCheckboxIconWrapperStyles(props);
|
|
6989
6895
|
});
|
|
6990
6896
|
|
|
6991
|
-
function ownKeys$e(object, enumerableOnly) { var keys =
|
|
6897
|
+
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; }
|
|
6992
6898
|
|
|
6993
|
-
function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
6899
|
+
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; }
|
|
6994
6900
|
var fadeIn = /*#__PURE__*/keyframes(["from{transform:scale(.6);opacity:0;}to{transform:scale(1);opacity:1;}"]);
|
|
6995
6901
|
var fadeOut$1 = /*#__PURE__*/keyframes(["from{transform:scale(1);opacity:1;}to{transform:scale(.6);opacity:0;}"]);
|
|
6996
6902
|
var AnimatedFade$1 = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -7192,8 +7098,6 @@ var genId = function genId() {
|
|
|
7192
7098
|
|
|
7193
7099
|
|
|
7194
7100
|
var useId = function useId(prefix, idProp) {
|
|
7195
|
-
var _context;
|
|
7196
|
-
|
|
7197
7101
|
var initialId = idProp || (handoffComplete ? genId() : null);
|
|
7198
7102
|
|
|
7199
7103
|
var _React$useState = React.useState(initialId),
|
|
@@ -7214,7 +7118,7 @@ var useId = function useId(prefix, idProp) {
|
|
|
7214
7118
|
}
|
|
7215
7119
|
}, []);
|
|
7216
7120
|
var id = uid != null ? uid.toString() : undefined;
|
|
7217
|
-
return prefix ?
|
|
7121
|
+
return prefix ? "".concat(prefix, "-").concat(id) : id;
|
|
7218
7122
|
};
|
|
7219
7123
|
|
|
7220
7124
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
@@ -7241,9 +7145,9 @@ var useFormId = function useFormId(prefix) {
|
|
|
7241
7145
|
};
|
|
7242
7146
|
};
|
|
7243
7147
|
|
|
7244
|
-
function ownKeys$d(object, enumerableOnly) { var keys =
|
|
7148
|
+
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; }
|
|
7245
7149
|
|
|
7246
|
-
function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
7150
|
+
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; }
|
|
7247
7151
|
|
|
7248
7152
|
/**
|
|
7249
7153
|
* indeterminate is not a HTML input element prop,
|
|
@@ -7628,9 +7532,9 @@ var SelectorSupportText = function SelectorSupportText(_ref) {
|
|
|
7628
7532
|
});
|
|
7629
7533
|
};
|
|
7630
7534
|
|
|
7631
|
-
function ownKeys$c(object, enumerableOnly) { var keys =
|
|
7535
|
+
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; }
|
|
7632
7536
|
|
|
7633
|
-
function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
7537
|
+
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; }
|
|
7634
7538
|
var variants = {
|
|
7635
7539
|
"default": {
|
|
7636
7540
|
background: {
|
|
@@ -7696,6 +7600,8 @@ var SelectorInput = function SelectorInput(_ref3) {
|
|
|
7696
7600
|
}, inputProps));
|
|
7697
7601
|
};
|
|
7698
7602
|
|
|
7603
|
+
/* eslint-disable @typescript-eslint/no-shadow */
|
|
7604
|
+
|
|
7699
7605
|
var Checkbox = function Checkbox(_ref) {
|
|
7700
7606
|
var _groupProps$state, _groupProps$size;
|
|
7701
7607
|
|
|
@@ -7722,10 +7628,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
7722
7628
|
var hasOnChange = !isUndefined_1(onChange);
|
|
7723
7629
|
|
|
7724
7630
|
if ((hasValidationState || hasName || hasDefaultChecked || hasIsChecked || hasOnChange) && !isEmpty_1(groupProps)) {
|
|
7725
|
-
var
|
|
7726
|
-
|
|
7727
|
-
var props = _filterInstanceProperty(_context = [hasValidationState ? 'validationState' : undefined, hasName ? 'name' : undefined, hasDefaultChecked ? 'defaultChecked' : undefined, hasIsChecked ? 'isChecked' : undefined, hasOnChange ? 'onChange' : undefined]).call(_context, Boolean).join(',');
|
|
7728
|
-
|
|
7631
|
+
var props = [hasValidationState ? 'validationState' : undefined, hasName ? 'name' : undefined, hasDefaultChecked ? 'defaultChecked' : undefined, hasIsChecked ? 'isChecked' : undefined, hasOnChange ? 'onChange' : undefined].filter(Boolean).join(',');
|
|
7729
7632
|
throw new Error("[Blade Checkbox]: Cannot set `".concat(props, "` on <Checkbox /> when it's inside <CheckboxGroup />, Please set it on the <CheckboxGroup /> itself"));
|
|
7730
7633
|
} // mandate value prop when using inside group
|
|
7731
7634
|
|
|
@@ -7884,16 +7787,16 @@ var useCheckboxGroup = function useCheckboxGroup(_ref) {
|
|
|
7884
7787
|
});
|
|
7885
7788
|
}),
|
|
7886
7789
|
isChecked: function isChecked(value) {
|
|
7887
|
-
return
|
|
7790
|
+
return checkedValues.includes(value);
|
|
7888
7791
|
},
|
|
7889
7792
|
addValue: function addValue(value) {
|
|
7890
7793
|
if (isDisabled) {
|
|
7891
7794
|
return;
|
|
7892
7795
|
}
|
|
7893
7796
|
|
|
7894
|
-
if (!
|
|
7797
|
+
if (!checkedValues.includes(value)) {
|
|
7895
7798
|
setValue(function () {
|
|
7896
|
-
return
|
|
7799
|
+
return checkedValues.concat(value);
|
|
7897
7800
|
});
|
|
7898
7801
|
}
|
|
7899
7802
|
},
|
|
@@ -7902,9 +7805,9 @@ var useCheckboxGroup = function useCheckboxGroup(_ref) {
|
|
|
7902
7805
|
return;
|
|
7903
7806
|
}
|
|
7904
7807
|
|
|
7905
|
-
if (
|
|
7808
|
+
if (checkedValues.includes(value)) {
|
|
7906
7809
|
setValue(function () {
|
|
7907
|
-
return
|
|
7810
|
+
return checkedValues.filter(function (existingValue) {
|
|
7908
7811
|
return existingValue !== value;
|
|
7909
7812
|
});
|
|
7910
7813
|
});
|
|
@@ -7931,9 +7834,9 @@ var useCheckboxGroup = function useCheckboxGroup(_ref) {
|
|
|
7931
7834
|
};
|
|
7932
7835
|
};
|
|
7933
7836
|
|
|
7934
|
-
function ownKeys$b(object, enumerableOnly) { var keys =
|
|
7837
|
+
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; }
|
|
7935
7838
|
|
|
7936
|
-
function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
7839
|
+
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; }
|
|
7937
7840
|
|
|
7938
7841
|
var SelectorGroupField = function SelectorGroupField(_ref) {
|
|
7939
7842
|
var children = _ref.children,
|
|
@@ -7957,8 +7860,6 @@ var SelectorGroupField = function SelectorGroupField(_ref) {
|
|
|
7957
7860
|
};
|
|
7958
7861
|
|
|
7959
7862
|
var CheckboxGroup = function CheckboxGroup(_ref) {
|
|
7960
|
-
var _context, _context2;
|
|
7961
|
-
|
|
7962
7863
|
var children = _ref.children,
|
|
7963
7864
|
label = _ref.label,
|
|
7964
7865
|
helpText = _ref.helpText,
|
|
@@ -7994,8 +7895,7 @@ var CheckboxGroup = function CheckboxGroup(_ref) {
|
|
|
7994
7895
|
|
|
7995
7896
|
var showError = validationState === 'error' && errorText;
|
|
7996
7897
|
var showHelpText = !showError && helpText;
|
|
7997
|
-
|
|
7998
|
-
var accessibilityText = _concatInstanceProperty(_context = ",".concat(showError ? errorText : '', " ")).call(_context, showHelpText ? helpText : '');
|
|
7898
|
+
var accessibilityText = ",".concat(showError ? errorText : '', " ").concat(showHelpText ? helpText : '');
|
|
7999
7899
|
|
|
8000
7900
|
var _useBreakpoint = useBreakpoint({
|
|
8001
7901
|
breakpoints: theme.breakpoints
|
|
@@ -8020,7 +7920,7 @@ var CheckboxGroup = function CheckboxGroup(_ref) {
|
|
|
8020
7920
|
children: [/*#__PURE__*/jsx(Box, {
|
|
8021
7921
|
display: "flex",
|
|
8022
7922
|
flexDirection: "column",
|
|
8023
|
-
children:
|
|
7923
|
+
children: React__default.Children.map(children, function (child, index) {
|
|
8024
7924
|
return /*#__PURE__*/jsx(Box, {
|
|
8025
7925
|
marginBottom: index === childCount - 1 ? 0 : gap,
|
|
8026
7926
|
children: child
|
|
@@ -8036,9 +7936,9 @@ var CheckboxGroup = function CheckboxGroup(_ref) {
|
|
|
8036
7936
|
});
|
|
8037
7937
|
};
|
|
8038
7938
|
|
|
8039
|
-
function ownKeys$a(object, enumerableOnly) { var keys =
|
|
7939
|
+
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; }
|
|
8040
7940
|
|
|
8041
|
-
function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
7941
|
+
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; }
|
|
8042
7942
|
|
|
8043
7943
|
var getVisualContainerStyles = function getVisualContainerStyles() {
|
|
8044
7944
|
return {
|
|
@@ -8210,9 +8110,9 @@ var BaseInputVisuals = function BaseInputVisuals(_ref5) {
|
|
|
8210
8110
|
return null;
|
|
8211
8111
|
};
|
|
8212
8112
|
|
|
8213
|
-
function ownKeys$9(object, enumerableOnly) { var keys =
|
|
8113
|
+
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; }
|
|
8214
8114
|
|
|
8215
|
-
function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
8115
|
+
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; }
|
|
8216
8116
|
|
|
8217
8117
|
var getTextStyles = function getTextStyles(_ref) {
|
|
8218
8118
|
var variant = _ref.variant,
|
|
@@ -8232,9 +8132,9 @@ var getTextStyles = function getTextStyles(_ref) {
|
|
|
8232
8132
|
}));
|
|
8233
8133
|
};
|
|
8234
8134
|
|
|
8235
|
-
function ownKeys$8(object, enumerableOnly) { var keys =
|
|
8135
|
+
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; }
|
|
8236
8136
|
|
|
8237
|
-
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
8137
|
+
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; }
|
|
8238
8138
|
var getInputBackgroundAndBorderStyles = function getInputBackgroundAndBorderStyles(_ref) {
|
|
8239
8139
|
var theme = _ref.theme,
|
|
8240
8140
|
isHovered = _ref.isHovered,
|
|
@@ -8326,9 +8226,9 @@ var getBaseInputStyles = function getBaseInputStyles(_ref2) {
|
|
|
8326
8226
|
|
|
8327
8227
|
var _excluded$1 = ["name", "isDisabled", "isRequired", "maxCharacters", "handleOnFocus", "handleOnChange", "handleOnBlur", "handleOnInput", "handleOnKeyDown", "keyboardType", "keyboardReturnKeyType", "autoCompleteSuggestionType", "accessibilityProps", "setCurrentInteraction", "numberOfLines", "type"];
|
|
8328
8228
|
|
|
8329
|
-
function ownKeys$7(object, enumerableOnly) { var keys =
|
|
8229
|
+
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; }
|
|
8330
8230
|
|
|
8331
|
-
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
8231
|
+
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; }
|
|
8332
8232
|
var StyledBaseNativeInput = /*#__PURE__*/styled.input.withConfig({
|
|
8333
8233
|
displayName: "StyledBaseInputweb__StyledBaseNativeInput",
|
|
8334
8234
|
componentId: "hsusrk-0"
|
|
@@ -8485,9 +8385,9 @@ var BaseInputAnimatedBorder = function BaseInputAnimatedBorder(_ref2) {
|
|
|
8485
8385
|
|
|
8486
8386
|
var _excluded = ["children", "validationState", "currentInteraction", "isLabelLeftPositioned", "isTextArea"];
|
|
8487
8387
|
|
|
8488
|
-
function ownKeys$6(object, enumerableOnly) { var keys =
|
|
8388
|
+
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; }
|
|
8489
8389
|
|
|
8490
|
-
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
8390
|
+
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; }
|
|
8491
8391
|
var StyledBaseInputWrapper = /*#__PURE__*/styled(Box).withConfig({
|
|
8492
8392
|
displayName: "BaseInputWrapper__StyledBaseInputWrapper",
|
|
8493
8393
|
componentId: "sc-27jk75-0"
|
|
@@ -8801,10 +8701,8 @@ var BaseInput = /*#__PURE__*/React__default.forwardRef(function (_ref9, ref) {
|
|
|
8801
8701
|
});
|
|
8802
8702
|
var willRenderHintText = Boolean(helpText) || Boolean(successText) || Boolean(errorText);
|
|
8803
8703
|
|
|
8804
|
-
if (autoCompleteSuggestionType && !
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
throw new Error(_concatInstanceProperty(_context = "[Blade: Input]: Expected autoCompleteSuggestionType to be one of ".concat(autoCompleteSuggestionTypeValues.join(', '), " but received ")).call(_context, autoCompleteSuggestionType));
|
|
8704
|
+
if (autoCompleteSuggestionType && !autoCompleteSuggestionTypeValues.includes(autoCompleteSuggestionType)) {
|
|
8705
|
+
throw new Error("[Blade: Input]: Expected autoCompleteSuggestionType to be one of ".concat(autoCompleteSuggestionTypeValues.join(', '), " but received ").concat(autoCompleteSuggestionType));
|
|
8808
8706
|
}
|
|
8809
8707
|
|
|
8810
8708
|
var isTextArea = as === 'textarea';
|
|
@@ -8915,9 +8813,9 @@ var CharacterCounter = function CharacterCounter(_ref) {
|
|
|
8915
8813
|
});
|
|
8916
8814
|
};
|
|
8917
8815
|
|
|
8918
|
-
function ownKeys$5(object, enumerableOnly) { var keys =
|
|
8816
|
+
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; }
|
|
8919
8817
|
|
|
8920
|
-
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
8818
|
+
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; }
|
|
8921
8819
|
|
|
8922
8820
|
var getKeyboardAndAutocompleteProps = function getKeyboardAndAutocompleteProps(_ref) {
|
|
8923
8821
|
var _ref$type = _ref.type,
|
|
@@ -9344,18 +9242,18 @@ var TextArea = function TextArea(_ref) {
|
|
|
9344
9242
|
});
|
|
9345
9243
|
};
|
|
9346
9244
|
|
|
9347
|
-
function ownKeys$4(object, enumerableOnly) { var keys =
|
|
9245
|
+
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; }
|
|
9348
9246
|
|
|
9349
|
-
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
9247
|
+
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; }
|
|
9350
9248
|
var isReactNative = getPlatformType() === 'react-native';
|
|
9351
9249
|
/**
|
|
9352
9250
|
* Converts a string value of otp to array if passed otherwise returns an array of 6 empty strings
|
|
9353
9251
|
*/
|
|
9354
9252
|
|
|
9355
9253
|
var otpToArray = function otpToArray(code) {
|
|
9356
|
-
var _code$split
|
|
9254
|
+
var _code$split;
|
|
9357
9255
|
|
|
9358
|
-
return (_code$split = code === null || code === void 0 ? void 0 : code.split('')) !== null && _code$split !== void 0 ? _code$split :
|
|
9256
|
+
return (_code$split = code === null || code === void 0 ? void 0 : code.split('')) !== null && _code$split !== void 0 ? _code$split : Array(6).fill('');
|
|
9359
9257
|
};
|
|
9360
9258
|
/**
|
|
9361
9259
|
* OTPInput component can be used for accepting OTPs sent to users for authentication/verification purposes.
|
|
@@ -9415,13 +9313,13 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9415
9313
|
if (inputValue && inputValue.length >= otpLength) {
|
|
9416
9314
|
// callback for when the OTPInput is controlled and inputValue reaches the same or greater length as the otpLength
|
|
9417
9315
|
onOTPFilled === null || onOTPFilled === void 0 ? void 0 : onOTPFilled({
|
|
9418
|
-
value:
|
|
9316
|
+
value: inputValue.slice(0, otpLength),
|
|
9419
9317
|
name: name
|
|
9420
9318
|
});
|
|
9421
9319
|
} else if (!inputValue && otpValue.join('').length >= otpLength) {
|
|
9422
9320
|
// callback for when the OTPInput is uncontrolled and otpValue stored in state reaches the same or greater length as the otpLength
|
|
9423
9321
|
onOTPFilled === null || onOTPFilled === void 0 ? void 0 : onOTPFilled({
|
|
9424
|
-
value:
|
|
9322
|
+
value: otpValue.slice(0, otpLength).join(''),
|
|
9425
9323
|
name: name
|
|
9426
9324
|
});
|
|
9427
9325
|
}
|
|
@@ -9436,9 +9334,7 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9436
9334
|
var setOtpValueByIndex = function setOtpValueByIndex(_ref2) {
|
|
9437
9335
|
var value = _ref2.value,
|
|
9438
9336
|
index = _ref2.index;
|
|
9439
|
-
|
|
9440
|
-
var newOtpValue = _Array$from(otpValue);
|
|
9441
|
-
|
|
9337
|
+
var newOtpValue = Array.from(otpValue);
|
|
9442
9338
|
newOtpValue[index] = value;
|
|
9443
9339
|
setOtpValue(newOtpValue);
|
|
9444
9340
|
return newOtpValue.join('');
|
|
@@ -9475,31 +9371,28 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9475
9371
|
if (inputValue && inputValue.length > 0) {
|
|
9476
9372
|
// When OTPInput is controlled, set the otpValue as the consumer passed `inputValue` and append the value on current index based on user's input.
|
|
9477
9373
|
// 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.
|
|
9478
|
-
var newOtpValue =
|
|
9479
|
-
|
|
9374
|
+
var newOtpValue = Array.from(inputValue);
|
|
9480
9375
|
newOtpValue[currentOtpIndex] = value !== null && value !== void 0 ? value : '';
|
|
9481
9376
|
setOtpValue(newOtpValue);
|
|
9482
9377
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
9483
9378
|
name: name,
|
|
9484
9379
|
value: newOtpValue.join('')
|
|
9485
9380
|
});
|
|
9486
|
-
} else if (value &&
|
|
9487
|
-
var _context2;
|
|
9488
|
-
|
|
9381
|
+
} else if (value && value.trim().length > 1) {
|
|
9489
9382
|
// When the entered value is more that 1 character (when value is pasted), set the otpValue to the newly received value.
|
|
9490
9383
|
// 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
|
|
9491
|
-
setOtpValue(
|
|
9384
|
+
setOtpValue(Array.from(value));
|
|
9492
9385
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
9493
9386
|
name: name,
|
|
9494
|
-
value:
|
|
9387
|
+
value: value.trim().slice(0, otpLength)
|
|
9495
9388
|
});
|
|
9496
|
-
} else if (otpValue[currentOtpIndex] !== (value === null || value === void 0 ? void 0 :
|
|
9389
|
+
} else if (otpValue[currentOtpIndex] !== (value === null || value === void 0 ? void 0 : value.trim())) {
|
|
9497
9390
|
var _value$trim;
|
|
9498
9391
|
|
|
9499
9392
|
// Set the value at the current index to the entered value
|
|
9500
9393
|
// only as long as its not the same as the already existing value (this prevents `onChange` being triggered unnecessarily)
|
|
9501
9394
|
var newValue = setOtpValueByIndex({
|
|
9502
|
-
value: (_value$trim = value === null || value === void 0 ? void 0 :
|
|
9395
|
+
value: (_value$trim = value === null || value === void 0 ? void 0 : value.trim()) !== null && _value$trim !== void 0 ? _value$trim : '',
|
|
9503
9396
|
index: currentOtpIndex
|
|
9504
9397
|
});
|
|
9505
9398
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
@@ -9514,7 +9407,7 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9514
9407
|
currentOtpIndex = _ref4.currentOtpIndex;
|
|
9515
9408
|
|
|
9516
9409
|
// Moves focus to next input whenever a value is entered in the current input
|
|
9517
|
-
if (value &&
|
|
9410
|
+
if (value && value.trim().length === 1) {
|
|
9518
9411
|
focusOnOtpByIndex(++currentOtpIndex);
|
|
9519
9412
|
}
|
|
9520
9413
|
};
|
|
@@ -9570,7 +9463,7 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9570
9463
|
var inputs = [];
|
|
9571
9464
|
|
|
9572
9465
|
var _loop = function _loop(index) {
|
|
9573
|
-
var
|
|
9466
|
+
var _otpValue$index, _Array$from$index;
|
|
9574
9467
|
|
|
9575
9468
|
var currentValue = inputValue ? otpToArray(inputValue)[index] || '' : otpValue[index] || '';
|
|
9576
9469
|
var ref = /*#__PURE__*/React__default.createRef();
|
|
@@ -9583,10 +9476,10 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9583
9476
|
children: /*#__PURE__*/jsx(BaseInput // eslint-disable-next-line jsx-a11y/no-autofocus
|
|
9584
9477
|
, {
|
|
9585
9478
|
autoFocus: autoFocus && index === 0,
|
|
9586
|
-
accessibilityLabel:
|
|
9479
|
+
accessibilityLabel: "".concat(index === 0 ? label : '', " character ").concat(index + 1),
|
|
9587
9480
|
label: label,
|
|
9588
9481
|
hideLabelText: true,
|
|
9589
|
-
id:
|
|
9482
|
+
id: "".concat(inputId, "-").concat(index),
|
|
9590
9483
|
textAlign: "center",
|
|
9591
9484
|
ref: ref,
|
|
9592
9485
|
value: currentValue,
|
|
@@ -9607,7 +9500,7 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9607
9500
|
}));
|
|
9608
9501
|
},
|
|
9609
9502
|
isDisabled: isDisabled,
|
|
9610
|
-
placeholder: (_Array$from$index =
|
|
9503
|
+
placeholder: (_Array$from$index = Array.from(placeholder !== null && placeholder !== void 0 ? placeholder : '')[index]) !== null && _Array$from$index !== void 0 ? _Array$from$index : '',
|
|
9611
9504
|
isRequired: true,
|
|
9612
9505
|
autoCompleteSuggestionType: "oneTimeCode",
|
|
9613
9506
|
keyboardType: keyboardType,
|
|
@@ -9618,7 +9511,7 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9618
9511
|
helpText: helpText,
|
|
9619
9512
|
hideFormHint: true
|
|
9620
9513
|
})
|
|
9621
|
-
},
|
|
9514
|
+
}, "".concat(inputId, "-").concat(index)));
|
|
9622
9515
|
};
|
|
9623
9516
|
|
|
9624
9517
|
for (var index = 0; index < otpLength; index++) {
|
|
@@ -9662,9 +9555,9 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
9662
9555
|
});
|
|
9663
9556
|
};
|
|
9664
9557
|
|
|
9665
|
-
function ownKeys$3(object, enumerableOnly) { var keys =
|
|
9558
|
+
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; }
|
|
9666
9559
|
|
|
9667
|
-
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
9560
|
+
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; }
|
|
9668
9561
|
|
|
9669
9562
|
var Link = function Link(_ref) {
|
|
9670
9563
|
var children = _ref.children,
|
|
@@ -9703,9 +9596,9 @@ var Link = function Link(_ref) {
|
|
|
9703
9596
|
}));
|
|
9704
9597
|
};
|
|
9705
9598
|
|
|
9706
|
-
function ownKeys$2(object, enumerableOnly) { var keys =
|
|
9599
|
+
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; }
|
|
9707
9600
|
|
|
9708
|
-
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
9601
|
+
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; }
|
|
9709
9602
|
|
|
9710
9603
|
var useRadio = function useRadio(_ref) {
|
|
9711
9604
|
var isChecked = _ref.isChecked,
|
|
@@ -9872,9 +9765,9 @@ var radioIconColors = {
|
|
|
9872
9765
|
}
|
|
9873
9766
|
};
|
|
9874
9767
|
|
|
9875
|
-
function ownKeys$1(object, enumerableOnly) { var keys =
|
|
9768
|
+
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; }
|
|
9876
9769
|
|
|
9877
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
9770
|
+
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; }
|
|
9878
9771
|
|
|
9879
9772
|
var getRadioIconWrapperStyles = function getRadioIconWrapperStyles(_ref) {
|
|
9880
9773
|
var theme = _ref.theme,
|
|
@@ -10043,9 +9936,8 @@ var Circle = function Circle(_ref) {
|
|
|
10043
9936
|
x = _ref.x,
|
|
10044
9937
|
y = _ref.y,
|
|
10045
9938
|
r = _ref.r,
|
|
10046
|
-
fill =
|
|
9939
|
+
fill = _ref.fill,
|
|
10047
9940
|
stroke = _ref.stroke;
|
|
10048
|
-
|
|
10049
9941
|
return /*#__PURE__*/jsx("circle", {
|
|
10050
9942
|
cx: cx,
|
|
10051
9943
|
cy: cy,
|
|
@@ -10057,17 +9949,15 @@ var Circle = function Circle(_ref) {
|
|
|
10057
9949
|
});
|
|
10058
9950
|
};
|
|
10059
9951
|
|
|
10060
|
-
|
|
10061
|
-
var _context;
|
|
9952
|
+
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
10062
9953
|
|
|
9954
|
+
var CheckedIcon = function CheckedIcon(_ref) {
|
|
10063
9955
|
var color = _ref.color,
|
|
10064
9956
|
size = _ref.size;
|
|
10065
9957
|
var width = radioSizes.icon[size].width;
|
|
10066
9958
|
var height = radioSizes.icon[size].height;
|
|
10067
9959
|
var radius = radioSizes.icon[size].dotRadius;
|
|
10068
|
-
|
|
10069
|
-
var viewBox = _concatInstanceProperty(_context = "0 0 ".concat(width, " ")).call(_context, height);
|
|
10070
|
-
|
|
9960
|
+
var viewBox = "0 0 ".concat(width, " ").concat(height);
|
|
10071
9961
|
var cx = "".concat(width / 2);
|
|
10072
9962
|
var cy = "".concat(height / 2);
|
|
10073
9963
|
return /*#__PURE__*/jsx(Svg, {
|
|
@@ -10313,8 +10203,6 @@ var useRadioGroup = function useRadioGroup(_ref) {
|
|
|
10313
10203
|
};
|
|
10314
10204
|
|
|
10315
10205
|
var RadioGroup = function RadioGroup(_ref) {
|
|
10316
|
-
var _context, _context2;
|
|
10317
|
-
|
|
10318
10206
|
var children = _ref.children,
|
|
10319
10207
|
label = _ref.label,
|
|
10320
10208
|
helpText = _ref.helpText,
|
|
@@ -10357,9 +10245,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
10357
10245
|
|
|
10358
10246
|
var showError = validationState === 'error' && errorText;
|
|
10359
10247
|
var showHelpText = !showError && helpText;
|
|
10360
|
-
|
|
10361
|
-
var accessibilityText = _concatInstanceProperty(_context = ",".concat(showError ? errorText : '', " ")).call(_context, showHelpText ? helpText : '');
|
|
10362
|
-
|
|
10248
|
+
var accessibilityText = ",".concat(showError ? errorText : '', " ").concat(showHelpText ? helpText : '');
|
|
10363
10249
|
var isReactNative = getPlatformType() === 'react-native';
|
|
10364
10250
|
var gap = radioSizes.group.gap[size][matchedDeviceType];
|
|
10365
10251
|
var childCount = React__default.Children.count(children);
|
|
@@ -10380,7 +10266,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
10380
10266
|
children: [/*#__PURE__*/jsx(Box, {
|
|
10381
10267
|
display: "flex",
|
|
10382
10268
|
flexDirection: "column",
|
|
10383
|
-
children:
|
|
10269
|
+
children: React__default.Children.map(children, function (child, index) {
|
|
10384
10270
|
return /*#__PURE__*/jsx(Box, {
|
|
10385
10271
|
marginBottom: index === childCount - 1 ? 0 : gap,
|
|
10386
10272
|
children: child
|
|
@@ -10415,9 +10301,9 @@ var Spinner = function Spinner(_ref) {
|
|
|
10415
10301
|
});
|
|
10416
10302
|
};
|
|
10417
10303
|
|
|
10418
|
-
function ownKeys(object, enumerableOnly) { var keys =
|
|
10304
|
+
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; }
|
|
10419
10305
|
|
|
10420
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
10306
|
+
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; }
|
|
10421
10307
|
var fallbackId = 'blade-skip-nav';
|
|
10422
10308
|
var StyledLink = /*#__PURE__*/styled(BaseLink).withConfig({
|
|
10423
10309
|
displayName: "SkipNavweb__StyledLink",
|