@redsift/design-system 6.2.0 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +49 -1
- package/index.js +364 -161
- package/index.js.map +1 -1
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -212,10 +212,10 @@ const StyledIcon = styled.span`
|
|
|
212
212
|
}}
|
|
213
213
|
`;
|
|
214
214
|
|
|
215
|
-
const _excluded$
|
|
216
|
-
const COMPONENT_NAME$
|
|
217
|
-
const CLASSNAME$
|
|
218
|
-
const DEFAULT_PROPS$
|
|
215
|
+
const _excluded$k = ["aria-hidden", "aria-label", "badge", "className", "color", "icon", "size", "svgProps"];
|
|
216
|
+
const COMPONENT_NAME$j = 'RedSiftIcon';
|
|
217
|
+
const CLASSNAME$j = 'redsift-icon';
|
|
218
|
+
const DEFAULT_PROPS$j = {
|
|
219
219
|
size: IconSize.medium
|
|
220
220
|
};
|
|
221
221
|
|
|
@@ -224,7 +224,7 @@ const DEFAULT_PROPS$i = {
|
|
|
224
224
|
*/
|
|
225
225
|
const Icon = /*#__PURE__*/forwardRef((props, ref) => {
|
|
226
226
|
const iconRef = ref || useRef();
|
|
227
|
-
|
|
227
|
+
const {
|
|
228
228
|
'aria-hidden': ariaHidden,
|
|
229
229
|
'aria-label': ariaLabel,
|
|
230
230
|
badge,
|
|
@@ -234,19 +234,16 @@ const Icon = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
234
234
|
size,
|
|
235
235
|
svgProps
|
|
236
236
|
} = props,
|
|
237
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
238
|
-
if (!ariaHidden) {
|
|
239
|
-
ariaHidden = undefined;
|
|
240
|
-
}
|
|
237
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$k);
|
|
241
238
|
return /*#__PURE__*/React.createElement(StyledIcon, _extends({}, forwardedProps, {
|
|
242
239
|
$color: color,
|
|
243
240
|
$size: size,
|
|
244
|
-
"aria-hidden": ariaLabel ? ariaHidden
|
|
241
|
+
"aria-hidden": ariaLabel ? ariaHidden ? ariaHidden : undefined : true,
|
|
245
242
|
"aria-label": ariaLabel,
|
|
246
243
|
className: classNames(Icon.className, className),
|
|
247
244
|
ref: iconRef
|
|
248
245
|
}), /*#__PURE__*/React.createElement("svg", _extends({}, svgProps, {
|
|
249
|
-
"aria-hidden": ariaLabel ? ariaHidden
|
|
246
|
+
"aria-hidden": ariaLabel ? ariaHidden ? ariaHidden : undefined : true,
|
|
250
247
|
"aria-label": ariaLabel,
|
|
251
248
|
focusable: "false",
|
|
252
249
|
height: "1em",
|
|
@@ -262,9 +259,9 @@ const Icon = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
262
259
|
fill: "currentColor"
|
|
263
260
|
})), badge ? badge : null);
|
|
264
261
|
});
|
|
265
|
-
Icon.className = CLASSNAME$
|
|
266
|
-
Icon.defaultProps = DEFAULT_PROPS$
|
|
267
|
-
Icon.displayName = COMPONENT_NAME$
|
|
262
|
+
Icon.className = CLASSNAME$j;
|
|
263
|
+
Icon.defaultProps = DEFAULT_PROPS$j;
|
|
264
|
+
Icon.displayName = COMPONENT_NAME$j;
|
|
268
265
|
|
|
269
266
|
/**
|
|
270
267
|
* Display a warning if no label was found for screen readers and assistive technologies.
|
|
@@ -323,10 +320,10 @@ const StyledIconButton = styled.button`
|
|
|
323
320
|
}
|
|
324
321
|
`;
|
|
325
322
|
|
|
326
|
-
const _excluded$
|
|
327
|
-
const COMPONENT_NAME$
|
|
328
|
-
const CLASSNAME$
|
|
329
|
-
const DEFAULT_PROPS$
|
|
323
|
+
const _excluded$j = ["className", "color", "disabled", "icon", "isDisabled", "onPress", "size"];
|
|
324
|
+
const COMPONENT_NAME$i = 'RedSiftIconButton';
|
|
325
|
+
const CLASSNAME$i = 'redsift-icon-button';
|
|
326
|
+
const DEFAULT_PROPS$i = {
|
|
330
327
|
color: ColorPalette.primary,
|
|
331
328
|
size: IconButtonSize.medium
|
|
332
329
|
};
|
|
@@ -354,7 +351,7 @@ const IconButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
354
351
|
onPress,
|
|
355
352
|
size
|
|
356
353
|
} = props,
|
|
357
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
354
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$j);
|
|
358
355
|
warnIfNoAccessibleLabelFound(props);
|
|
359
356
|
return /*#__PURE__*/React.createElement(StyledIconButton, _extends({}, forwardedProps, buttonProps, {
|
|
360
357
|
$color: isDisabled || disabled ? undefined : color,
|
|
@@ -369,9 +366,9 @@ const IconButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
369
366
|
size: size
|
|
370
367
|
}));
|
|
371
368
|
});
|
|
372
|
-
IconButton.className = CLASSNAME$
|
|
373
|
-
IconButton.defaultProps = DEFAULT_PROPS$
|
|
374
|
-
IconButton.displayName = COMPONENT_NAME$
|
|
369
|
+
IconButton.className = CLASSNAME$i;
|
|
370
|
+
IconButton.defaultProps = DEFAULT_PROPS$i;
|
|
371
|
+
IconButton.displayName = COMPONENT_NAME$i;
|
|
375
372
|
|
|
376
373
|
const AppContainerContext = /*#__PURE__*/React.createContext(null);
|
|
377
374
|
|
|
@@ -462,10 +459,10 @@ const StyledAppBar = styled.header`
|
|
|
462
459
|
}
|
|
463
460
|
`;
|
|
464
461
|
|
|
465
|
-
const _excluded$
|
|
466
|
-
const COMPONENT_NAME$
|
|
467
|
-
const CLASSNAME$
|
|
468
|
-
const DEFAULT_PROPS$
|
|
462
|
+
const _excluded$i = ["children", "className", "fallbackTitle", "iconButtonProps", "iconButtonRef", "title"];
|
|
463
|
+
const COMPONENT_NAME$h = 'RedSiftAppBar';
|
|
464
|
+
const CLASSNAME$h = 'redsift-app-bar';
|
|
465
|
+
const DEFAULT_PROPS$h = {};
|
|
469
466
|
|
|
470
467
|
/**
|
|
471
468
|
* The AppBar component.
|
|
@@ -480,7 +477,7 @@ const AppBar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
480
477
|
iconButtonRef = useRef(),
|
|
481
478
|
title: propsTitle
|
|
482
479
|
} = props,
|
|
483
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
480
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$i);
|
|
484
481
|
const {
|
|
485
482
|
isLoaded
|
|
486
483
|
} = useIsLoaded();
|
|
@@ -503,9 +500,9 @@ const AppBar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
503
500
|
className: `${AppBar.className}__right`
|
|
504
501
|
}, children));
|
|
505
502
|
});
|
|
506
|
-
AppBar.className = CLASSNAME$
|
|
507
|
-
AppBar.defaultProps = DEFAULT_PROPS$
|
|
508
|
-
AppBar.displayName = COMPONENT_NAME$
|
|
503
|
+
AppBar.className = CLASSNAME$h;
|
|
504
|
+
AppBar.defaultProps = DEFAULT_PROPS$h;
|
|
505
|
+
AppBar.displayName = COMPONENT_NAME$h;
|
|
509
506
|
|
|
510
507
|
/**
|
|
511
508
|
* Component style.
|
|
@@ -589,10 +586,10 @@ const StyledAppSidePanel = styled.div`
|
|
|
589
586
|
}
|
|
590
587
|
`;
|
|
591
588
|
|
|
592
|
-
const _excluded$
|
|
593
|
-
const COMPONENT_NAME$
|
|
594
|
-
const CLASSNAME$
|
|
595
|
-
const DEFAULT_PROPS$
|
|
589
|
+
const _excluded$h = ["children", "className", "featuredElements", "iconButtonProps", "iconButtonRef", "isCollapsed", "logo", "onClose"];
|
|
590
|
+
const COMPONENT_NAME$g = 'RedSiftAppSidePanel';
|
|
591
|
+
const CLASSNAME$g = 'redsift-app-side-panel';
|
|
592
|
+
const DEFAULT_PROPS$g = {};
|
|
596
593
|
|
|
597
594
|
/**
|
|
598
595
|
* The AppSidePanel component.
|
|
@@ -609,7 +606,7 @@ const AppSidePanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
609
606
|
logo,
|
|
610
607
|
onClose
|
|
611
608
|
} = props,
|
|
612
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
609
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$h);
|
|
613
610
|
const appContainerState = useContext(AppContainerContext);
|
|
614
611
|
const handleClose = event => {
|
|
615
612
|
onClose === null || onClose === void 0 ? void 0 : onClose(event);
|
|
@@ -635,9 +632,9 @@ const AppSidePanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
635
632
|
className: `${AppSidePanel.className}__featured`
|
|
636
633
|
}, featuredElements) : null, children);
|
|
637
634
|
});
|
|
638
|
-
AppSidePanel.className = CLASSNAME$
|
|
639
|
-
AppSidePanel.defaultProps = DEFAULT_PROPS$
|
|
640
|
-
AppSidePanel.displayName = COMPONENT_NAME$
|
|
635
|
+
AppSidePanel.className = CLASSNAME$g;
|
|
636
|
+
AppSidePanel.defaultProps = DEFAULT_PROPS$g;
|
|
637
|
+
AppSidePanel.displayName = COMPONENT_NAME$g;
|
|
641
638
|
|
|
642
639
|
/**
|
|
643
640
|
* Context props.
|
|
@@ -844,10 +841,10 @@ const StyledBadge = styled.div`
|
|
|
844
841
|
}}
|
|
845
842
|
`;
|
|
846
843
|
|
|
847
|
-
const _excluded$
|
|
848
|
-
const COMPONENT_NAME$
|
|
849
|
-
const CLASSNAME$
|
|
850
|
-
const DEFAULT_PROPS$
|
|
844
|
+
const _excluded$g = ["autoBreak", "children", "className", "color", "variant"];
|
|
845
|
+
const COMPONENT_NAME$f = 'RedSiftBadge';
|
|
846
|
+
const CLASSNAME$f = 'redsift-badge';
|
|
847
|
+
const DEFAULT_PROPS$f = {
|
|
851
848
|
variant: BadgeVariant.dot
|
|
852
849
|
};
|
|
853
850
|
|
|
@@ -863,7 +860,7 @@ const Badge = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
863
860
|
color,
|
|
864
861
|
variant
|
|
865
862
|
} = props,
|
|
866
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
863
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$g);
|
|
867
864
|
return /*#__PURE__*/React.createElement(StyledBadge, _extends({}, forwardedProps, {
|
|
868
865
|
$autoBreak: autoBreak,
|
|
869
866
|
$color: color,
|
|
@@ -872,14 +869,14 @@ const Badge = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
872
869
|
ref: badgeRef
|
|
873
870
|
}), variant === BadgeVariant.standard ? children : null);
|
|
874
871
|
});
|
|
875
|
-
Badge.className = CLASSNAME$
|
|
876
|
-
Badge.defaultProps = DEFAULT_PROPS$
|
|
877
|
-
Badge.displayName = COMPONENT_NAME$
|
|
872
|
+
Badge.className = CLASSNAME$f;
|
|
873
|
+
Badge.defaultProps = DEFAULT_PROPS$f;
|
|
874
|
+
Badge.displayName = COMPONENT_NAME$f;
|
|
878
875
|
|
|
879
|
-
const _excluded$
|
|
880
|
-
const COMPONENT_NAME$
|
|
881
|
-
const CLASSNAME$
|
|
882
|
-
const DEFAULT_PROPS$
|
|
876
|
+
const _excluded$f = ["badge", "badgeNumber", "badgeProps", "children", "className", "href", "icon", "iconProps", "iconRef", "isCurrent", "isDisabled", "isSecondLevel", "onClick", "onKeyDown", "tabIndex", "withoutIcons"];
|
|
877
|
+
const COMPONENT_NAME$e = 'RedSiftSideNavigationMenuItem';
|
|
878
|
+
const CLASSNAME$e = 'redsift-side-navigation-menu-item';
|
|
879
|
+
const DEFAULT_PROPS$e = {};
|
|
883
880
|
|
|
884
881
|
/**
|
|
885
882
|
* The SideNavigationMenuItem component.
|
|
@@ -904,7 +901,7 @@ const SideNavigationMenuItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
904
901
|
tabIndex,
|
|
905
902
|
withoutIcons
|
|
906
903
|
} = props,
|
|
907
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
904
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$f);
|
|
908
905
|
warnIfNoAccessibleLabelFound(props, [children]);
|
|
909
906
|
const appContainerState = useContext(AppContainerContext);
|
|
910
907
|
useEffect(() => {
|
|
@@ -965,9 +962,9 @@ const SideNavigationMenuItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
965
962
|
color: "#E11010"
|
|
966
963
|
}, badgeProps), badge || badgeNumber) : null);
|
|
967
964
|
});
|
|
968
|
-
SideNavigationMenuItem.className = CLASSNAME$
|
|
969
|
-
SideNavigationMenuItem.defaultProps = DEFAULT_PROPS$
|
|
970
|
-
SideNavigationMenuItem.displayName = COMPONENT_NAME$
|
|
965
|
+
SideNavigationMenuItem.className = CLASSNAME$e;
|
|
966
|
+
SideNavigationMenuItem.defaultProps = DEFAULT_PROPS$e;
|
|
967
|
+
SideNavigationMenuItem.displayName = COMPONENT_NAME$e;
|
|
971
968
|
|
|
972
969
|
/**
|
|
973
970
|
* Component style.
|
|
@@ -1116,10 +1113,10 @@ const SideNavigationMenuReducer = (state, action) => {
|
|
|
1116
1113
|
}
|
|
1117
1114
|
};
|
|
1118
1115
|
|
|
1119
|
-
const _excluded$
|
|
1120
|
-
const COMPONENT_NAME$
|
|
1121
|
-
const CLASSNAME$
|
|
1122
|
-
const DEFAULT_PROPS$
|
|
1116
|
+
const _excluded$e = ["aria-label", "buttonProps", "buttonRef", "children", "className", "hasBadge", "icon", "iconProps", "iconRef", "isDisabled", "isExpanded", "menuProps", "menuRef", "tabIndex", "withoutIcons"];
|
|
1117
|
+
const COMPONENT_NAME$d = 'RedSiftSideNavigationMenu';
|
|
1118
|
+
const CLASSNAME$d = 'redsift-side-navigation-menu';
|
|
1119
|
+
const DEFAULT_PROPS$d = {};
|
|
1123
1120
|
|
|
1124
1121
|
/**
|
|
1125
1122
|
* The SideNavigationMenu component.
|
|
@@ -1143,7 +1140,7 @@ const SideNavigationMenu = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1143
1140
|
tabIndex,
|
|
1144
1141
|
withoutIcons
|
|
1145
1142
|
} = props,
|
|
1146
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
1143
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$e);
|
|
1147
1144
|
warnIfNoAccessibleLabelFound(props);
|
|
1148
1145
|
const sideNavigationMenuBarContext = useContext(SideNavigationMenuBarContext);
|
|
1149
1146
|
const [isFirstChild, setIsFirstChild] = useState(false);
|
|
@@ -1414,9 +1411,9 @@ const SideNavigationMenu = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1414
1411
|
role: "menu"
|
|
1415
1412
|
}, menuItemListEventHandler), renderedMenuItems)));
|
|
1416
1413
|
});
|
|
1417
|
-
SideNavigationMenu.className = CLASSNAME$
|
|
1418
|
-
SideNavigationMenu.defaultProps = DEFAULT_PROPS$
|
|
1419
|
-
SideNavigationMenu.displayName = COMPONENT_NAME$
|
|
1414
|
+
SideNavigationMenu.className = CLASSNAME$d;
|
|
1415
|
+
SideNavigationMenu.defaultProps = DEFAULT_PROPS$d;
|
|
1416
|
+
SideNavigationMenu.displayName = COMPONENT_NAME$d;
|
|
1420
1417
|
|
|
1421
1418
|
/**
|
|
1422
1419
|
* Component style.
|
|
@@ -1486,10 +1483,10 @@ const useBoundingClientRect = (ref, deps) => {
|
|
|
1486
1483
|
return boundingRect;
|
|
1487
1484
|
};
|
|
1488
1485
|
|
|
1489
|
-
const _excluded$
|
|
1490
|
-
const COMPONENT_NAME$
|
|
1491
|
-
const CLASSNAME$
|
|
1492
|
-
const DEFAULT_PROPS$
|
|
1486
|
+
const _excluded$d = ["aria-label", "aria-labelledby", "children", "className", "isDisabled", "menubarProps", "menubarRef", "withoutIcons"];
|
|
1487
|
+
const COMPONENT_NAME$c = 'RedSiftSideNavigationMenuBar';
|
|
1488
|
+
const CLASSNAME$c = 'redsift-side-navigation-menu-bar';
|
|
1489
|
+
const DEFAULT_PROPS$c = {};
|
|
1493
1490
|
|
|
1494
1491
|
/**
|
|
1495
1492
|
* Hook to store the previous index for further use
|
|
@@ -1517,7 +1514,7 @@ const SideNavigationMenuBar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1517
1514
|
menubarRef = useRef(),
|
|
1518
1515
|
withoutIcons
|
|
1519
1516
|
} = props,
|
|
1520
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
1517
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$d);
|
|
1521
1518
|
warnIfNoAccessibleLabelFound(props);
|
|
1522
1519
|
const {
|
|
1523
1520
|
top
|
|
@@ -1664,11 +1661,11 @@ const SideNavigationMenuBar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1664
1661
|
role: "menubar"
|
|
1665
1662
|
}), navItems)));
|
|
1666
1663
|
});
|
|
1667
|
-
SideNavigationMenuBar.className = CLASSNAME$
|
|
1668
|
-
SideNavigationMenuBar.defaultProps = DEFAULT_PROPS$
|
|
1669
|
-
SideNavigationMenuBar.displayName = COMPONENT_NAME$
|
|
1664
|
+
SideNavigationMenuBar.className = CLASSNAME$c;
|
|
1665
|
+
SideNavigationMenuBar.defaultProps = DEFAULT_PROPS$c;
|
|
1666
|
+
SideNavigationMenuBar.displayName = COMPONENT_NAME$c;
|
|
1670
1667
|
|
|
1671
|
-
const _excluded$
|
|
1668
|
+
const _excluded$c = ["title", "href", "ref"],
|
|
1672
1669
|
_excluded2 = ["title", "children", "ref"],
|
|
1673
1670
|
_excluded3 = ["title", "href", "ref"];
|
|
1674
1671
|
const isMenu = item => {
|
|
@@ -1687,7 +1684,7 @@ const useSideNavigationMenuBar = _ref => {
|
|
|
1687
1684
|
href,
|
|
1688
1685
|
ref
|
|
1689
1686
|
} = item,
|
|
1690
|
-
rest = _objectWithoutProperties(item, _excluded$
|
|
1687
|
+
rest = _objectWithoutProperties(item, _excluded$c);
|
|
1691
1688
|
menuBarChildren.push( /*#__PURE__*/React.createElement(SideNavigationMenuItem, _extends({
|
|
1692
1689
|
key: title,
|
|
1693
1690
|
isCurrent: isActive ? isActive(href) : undefined
|
|
@@ -1779,10 +1776,10 @@ const StyledAppContent = styled.main`
|
|
|
1779
1776
|
}}
|
|
1780
1777
|
`;
|
|
1781
1778
|
|
|
1782
|
-
const _excluded$
|
|
1783
|
-
const COMPONENT_NAME$
|
|
1784
|
-
const CLASSNAME$
|
|
1785
|
-
const DEFAULT_PROPS$
|
|
1779
|
+
const _excluded$b = ["children", "className"];
|
|
1780
|
+
const COMPONENT_NAME$b = 'RedSiftAppContent';
|
|
1781
|
+
const CLASSNAME$b = 'redsift-app-content';
|
|
1782
|
+
const DEFAULT_PROPS$b = {};
|
|
1786
1783
|
|
|
1787
1784
|
/**
|
|
1788
1785
|
* The AppContent component.
|
|
@@ -1793,7 +1790,7 @@ const AppContent = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1793
1790
|
children,
|
|
1794
1791
|
className
|
|
1795
1792
|
} = props,
|
|
1796
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
1793
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$b);
|
|
1797
1794
|
const {
|
|
1798
1795
|
isLoaded
|
|
1799
1796
|
} = useIsLoaded();
|
|
@@ -1805,14 +1802,14 @@ const AppContent = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1805
1802
|
ref: contentRef
|
|
1806
1803
|
}), children);
|
|
1807
1804
|
});
|
|
1808
|
-
AppContent.className = CLASSNAME$
|
|
1809
|
-
AppContent.defaultProps = DEFAULT_PROPS$
|
|
1810
|
-
AppContent.displayName = COMPONENT_NAME$
|
|
1805
|
+
AppContent.className = CLASSNAME$b;
|
|
1806
|
+
AppContent.defaultProps = DEFAULT_PROPS$b;
|
|
1807
|
+
AppContent.displayName = COMPONENT_NAME$b;
|
|
1811
1808
|
|
|
1812
|
-
const _excluded$
|
|
1813
|
-
const COMPONENT_NAME$
|
|
1814
|
-
const CLASSNAME$
|
|
1815
|
-
const DEFAULT_PROPS$
|
|
1809
|
+
const _excluded$a = ["children", "className"];
|
|
1810
|
+
const COMPONENT_NAME$a = 'RedSiftAppContainer';
|
|
1811
|
+
const CLASSNAME$a = 'redsift-app-container';
|
|
1812
|
+
const DEFAULT_PROPS$a = {};
|
|
1816
1813
|
|
|
1817
1814
|
/**
|
|
1818
1815
|
* The AppContainer component.
|
|
@@ -1823,7 +1820,7 @@ const AppContainer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1823
1820
|
children,
|
|
1824
1821
|
className
|
|
1825
1822
|
} = props,
|
|
1826
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
1823
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$a);
|
|
1827
1824
|
const {
|
|
1828
1825
|
hasAppBar,
|
|
1829
1826
|
hasAppSidePanel,
|
|
@@ -1874,9 +1871,9 @@ const AppContainer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1874
1871
|
value: state
|
|
1875
1872
|
}, children));
|
|
1876
1873
|
});
|
|
1877
|
-
AppContainer.className = CLASSNAME$
|
|
1878
|
-
AppContainer.defaultProps = DEFAULT_PROPS$
|
|
1879
|
-
AppContainer.displayName = COMPONENT_NAME$
|
|
1874
|
+
AppContainer.className = CLASSNAME$a;
|
|
1875
|
+
AppContainer.defaultProps = DEFAULT_PROPS$a;
|
|
1876
|
+
AppContainer.displayName = COMPONENT_NAME$a;
|
|
1880
1877
|
|
|
1881
1878
|
/**
|
|
1882
1879
|
* Component style.
|
|
@@ -1967,10 +1964,10 @@ const StyledBreadcrumbItem = styled.a`
|
|
|
1967
1964
|
|
|
1968
1965
|
`;
|
|
1969
1966
|
|
|
1970
|
-
const _excluded$
|
|
1971
|
-
const COMPONENT_NAME$
|
|
1972
|
-
const CLASSNAME$
|
|
1973
|
-
const DEFAULT_PROPS$
|
|
1967
|
+
const _excluded$9 = ["children", "className", "href", "icon", "isCurrent", "isDisabled", "theme"];
|
|
1968
|
+
const COMPONENT_NAME$9 = 'RedSiftBreadcrumbItem';
|
|
1969
|
+
const CLASSNAME$9 = 'redsift-breadcrumb-item';
|
|
1970
|
+
const DEFAULT_PROPS$9 = {
|
|
1974
1971
|
theme: Theme.dark
|
|
1975
1972
|
};
|
|
1976
1973
|
|
|
@@ -1988,7 +1985,7 @@ const BreadcrumbItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1988
1985
|
isDisabled,
|
|
1989
1986
|
theme
|
|
1990
1987
|
} = props,
|
|
1991
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
1988
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$9);
|
|
1992
1989
|
warnIfNoAccessibleLabelFound(props, [children]);
|
|
1993
1990
|
return /*#__PURE__*/React.createElement(StyledBreadcrumbItem, _extends({
|
|
1994
1991
|
role: "link",
|
|
@@ -2006,9 +2003,9 @@ const BreadcrumbItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2006
2003
|
icon: icon
|
|
2007
2004
|
}) : null, children);
|
|
2008
2005
|
});
|
|
2009
|
-
BreadcrumbItem.className = CLASSNAME$
|
|
2010
|
-
BreadcrumbItem.defaultProps = DEFAULT_PROPS$
|
|
2011
|
-
BreadcrumbItem.displayName = COMPONENT_NAME$
|
|
2006
|
+
BreadcrumbItem.className = CLASSNAME$9;
|
|
2007
|
+
BreadcrumbItem.defaultProps = DEFAULT_PROPS$9;
|
|
2008
|
+
BreadcrumbItem.displayName = COMPONENT_NAME$9;
|
|
2012
2009
|
|
|
2013
2010
|
/**
|
|
2014
2011
|
* Component style.
|
|
@@ -2051,10 +2048,10 @@ const StyledBreadcrumbs = styled.nav`
|
|
|
2051
2048
|
}
|
|
2052
2049
|
`;
|
|
2053
2050
|
|
|
2054
|
-
const _excluded$
|
|
2055
|
-
const COMPONENT_NAME$
|
|
2056
|
-
const CLASSNAME$
|
|
2057
|
-
const DEFAULT_PROPS$
|
|
2051
|
+
const _excluded$8 = ["children", "className", "icon", "isDisabled", "separator", "theme"];
|
|
2052
|
+
const COMPONENT_NAME$8 = 'RedSiftBreadcrumbs';
|
|
2053
|
+
const CLASSNAME$8 = 'redsift-breadcrumbs';
|
|
2054
|
+
const DEFAULT_PROPS$8 = {
|
|
2058
2055
|
theme: Theme.dark
|
|
2059
2056
|
};
|
|
2060
2057
|
|
|
@@ -2071,7 +2068,7 @@ const Breadcrumbs = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2071
2068
|
separator,
|
|
2072
2069
|
theme
|
|
2073
2070
|
} = props,
|
|
2074
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
2071
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$8);
|
|
2075
2072
|
warnIfNoAccessibleLabelFound(props);
|
|
2076
2073
|
const childArray = [];
|
|
2077
2074
|
React.Children.forEach(children, child => {
|
|
@@ -2102,9 +2099,9 @@ const Breadcrumbs = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2102
2099
|
ref: linkRef
|
|
2103
2100
|
}), /*#__PURE__*/React.createElement("ol", null, breadcrumbItems));
|
|
2104
2101
|
});
|
|
2105
|
-
Breadcrumbs.className = CLASSNAME$
|
|
2106
|
-
Breadcrumbs.defaultProps = DEFAULT_PROPS$
|
|
2107
|
-
Breadcrumbs.displayName = COMPONENT_NAME$
|
|
2102
|
+
Breadcrumbs.className = CLASSNAME$8;
|
|
2103
|
+
Breadcrumbs.defaultProps = DEFAULT_PROPS$8;
|
|
2104
|
+
Breadcrumbs.displayName = COMPONENT_NAME$8;
|
|
2108
2105
|
|
|
2109
2106
|
/**
|
|
2110
2107
|
* Component variant.
|
|
@@ -2303,10 +2300,10 @@ const StyledButton = styled.button`
|
|
|
2303
2300
|
}}
|
|
2304
2301
|
`;
|
|
2305
2302
|
|
|
2306
|
-
const _excluded$
|
|
2307
|
-
const COMPONENT_NAME$
|
|
2308
|
-
const CLASSNAME$
|
|
2309
|
-
const DEFAULT_PROPS$
|
|
2303
|
+
const _excluded$7 = ["children", "className", "color", "disabled", "fullWidth", "isDisabled", "leftIcon", "onPress", "rightIcon", "size", "variant"];
|
|
2304
|
+
const COMPONENT_NAME$7 = 'RedSiftButton';
|
|
2305
|
+
const CLASSNAME$7 = 'redsift-button';
|
|
2306
|
+
const DEFAULT_PROPS$7 = {
|
|
2310
2307
|
color: ColorPalette.primary,
|
|
2311
2308
|
size: ButtonSize.large,
|
|
2312
2309
|
variant: ButtonVariant.contained
|
|
@@ -2340,7 +2337,7 @@ const Button = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2340
2337
|
size,
|
|
2341
2338
|
variant
|
|
2342
2339
|
} = props,
|
|
2343
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
2340
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$7);
|
|
2344
2341
|
return /*#__PURE__*/React.createElement(StyledButton, _extends({}, forwardedProps, buttonProps, {
|
|
2345
2342
|
$color: color,
|
|
2346
2343
|
$fullWidth: fullWidth,
|
|
@@ -2361,14 +2358,14 @@ const Button = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2361
2358
|
className: "right"
|
|
2362
2359
|
}) : null);
|
|
2363
2360
|
});
|
|
2364
|
-
Button.className = CLASSNAME$
|
|
2365
|
-
Button.defaultProps = DEFAULT_PROPS$
|
|
2366
|
-
Button.displayName = COMPONENT_NAME$
|
|
2361
|
+
Button.className = CLASSNAME$7;
|
|
2362
|
+
Button.defaultProps = DEFAULT_PROPS$7;
|
|
2363
|
+
Button.displayName = COMPONENT_NAME$7;
|
|
2367
2364
|
|
|
2368
|
-
const _excluded$
|
|
2369
|
-
const COMPONENT_NAME$
|
|
2370
|
-
const CLASSNAME$
|
|
2371
|
-
const DEFAULT_PROPS$
|
|
2365
|
+
const _excluded$6 = ["as", "children", "className", "color", "href", "isDisabled", "leftIcon", "rightIcon", "size", "target", "variant"];
|
|
2366
|
+
const COMPONENT_NAME$6 = 'RedSiftButtonLink';
|
|
2367
|
+
const CLASSNAME$6 = 'redsift-button-link';
|
|
2368
|
+
const DEFAULT_PROPS$6 = {
|
|
2372
2369
|
color: ColorPalette.primary,
|
|
2373
2370
|
size: ButtonSize.large,
|
|
2374
2371
|
variant: ButtonVariant.contained
|
|
@@ -2396,7 +2393,7 @@ const ButtonLink = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2396
2393
|
target,
|
|
2397
2394
|
variant
|
|
2398
2395
|
} = props,
|
|
2399
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
2396
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$6);
|
|
2400
2397
|
return /*#__PURE__*/React.createElement(StyledButton, _extends({
|
|
2401
2398
|
as: as || 'a',
|
|
2402
2399
|
role: "link",
|
|
@@ -2420,9 +2417,9 @@ const ButtonLink = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2420
2417
|
className: "right"
|
|
2421
2418
|
}) : null);
|
|
2422
2419
|
});
|
|
2423
|
-
ButtonLink.className = CLASSNAME$
|
|
2424
|
-
ButtonLink.defaultProps = DEFAULT_PROPS$
|
|
2425
|
-
ButtonLink.displayName = COMPONENT_NAME$
|
|
2420
|
+
ButtonLink.className = CLASSNAME$6;
|
|
2421
|
+
ButtonLink.defaultProps = DEFAULT_PROPS$6;
|
|
2422
|
+
ButtonLink.displayName = COMPONENT_NAME$6;
|
|
2426
2423
|
|
|
2427
2424
|
/**
|
|
2428
2425
|
* Component size.
|
|
@@ -2553,10 +2550,10 @@ const StyledCheckbox = styled.label`
|
|
|
2553
2550
|
}}
|
|
2554
2551
|
`;
|
|
2555
2552
|
|
|
2556
|
-
const _excluded$
|
|
2557
|
-
const COMPONENT_NAME$
|
|
2558
|
-
const CLASSNAME$
|
|
2559
|
-
const DEFAULT_PROPS$
|
|
2553
|
+
const _excluded$5 = ["aria-label", "aria-labelledby", "autoFocus", "children", "className", "color", "defaultSelected", "inputProps", "inputRef", "isControlled", "isDisabled", "isIndeterminate", "isInvalid", "isReadOnly", "isRequired", "isSelected", "name", "onChange", "size", "value"];
|
|
2554
|
+
const COMPONENT_NAME$5 = 'RedSiftCheckbox';
|
|
2555
|
+
const CLASSNAME$5 = 'redsift-checkbox';
|
|
2556
|
+
const DEFAULT_PROPS$5 = {
|
|
2560
2557
|
color: ColorPalette.primary,
|
|
2561
2558
|
size: CheckboxSize.large
|
|
2562
2559
|
};
|
|
@@ -2591,7 +2588,7 @@ const Checkbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2591
2588
|
size,
|
|
2592
2589
|
value
|
|
2593
2590
|
} = props,
|
|
2594
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
2591
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$5);
|
|
2595
2592
|
const {
|
|
2596
2593
|
isFocusVisible,
|
|
2597
2594
|
focusProps
|
|
@@ -2672,9 +2669,9 @@ const Checkbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2672
2669
|
className: "label"
|
|
2673
2670
|
}, children) : null);
|
|
2674
2671
|
});
|
|
2675
|
-
Checkbox.className = CLASSNAME$
|
|
2676
|
-
Checkbox.defaultProps = DEFAULT_PROPS$
|
|
2677
|
-
Checkbox.displayName = COMPONENT_NAME$
|
|
2672
|
+
Checkbox.className = CLASSNAME$5;
|
|
2673
|
+
Checkbox.defaultProps = DEFAULT_PROPS$5;
|
|
2674
|
+
Checkbox.displayName = COMPONENT_NAME$5;
|
|
2678
2675
|
|
|
2679
2676
|
/**
|
|
2680
2677
|
* Context props.
|
|
@@ -2764,10 +2761,10 @@ const StyledCheckboxGroup = styled.div`
|
|
|
2764
2761
|
|
|
2765
2762
|
`;
|
|
2766
2763
|
|
|
2767
|
-
const _excluded$
|
|
2768
|
-
const COMPONENT_NAME$
|
|
2769
|
-
const CLASSNAME$
|
|
2770
|
-
const DEFAULT_PROPS$
|
|
2764
|
+
const _excluded$4 = ["children", "className", "defaultValues", "description", "isDisabled", "isInvalid", "isReadOnly", "isRequired", "label", "onChange", "orientation", "possibleValues", "value"];
|
|
2765
|
+
const COMPONENT_NAME$4 = 'RedSiftCheckboxGroup';
|
|
2766
|
+
const CLASSNAME$4 = 'redsift-checkbox-group';
|
|
2767
|
+
const DEFAULT_PROPS$4 = {
|
|
2771
2768
|
color: ColorPalette.primary,
|
|
2772
2769
|
orientation: CheckboxGroupOrientation.vertical
|
|
2773
2770
|
};
|
|
@@ -2793,7 +2790,7 @@ const CheckboxGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2793
2790
|
possibleValues,
|
|
2794
2791
|
value
|
|
2795
2792
|
} = props,
|
|
2796
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
2793
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$4);
|
|
2797
2794
|
const [selectedValues, setValue] = useState(value || defaultValues || []);
|
|
2798
2795
|
useEffect(() => {
|
|
2799
2796
|
if (value) {
|
|
@@ -2848,9 +2845,9 @@ const CheckboxGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2848
2845
|
className: `${CheckboxGroup.className}-description`
|
|
2849
2846
|
}, description));
|
|
2850
2847
|
});
|
|
2851
|
-
CheckboxGroup.className = CLASSNAME$
|
|
2852
|
-
CheckboxGroup.defaultProps = DEFAULT_PROPS$
|
|
2853
|
-
CheckboxGroup.displayName = COMPONENT_NAME$
|
|
2848
|
+
CheckboxGroup.className = CLASSNAME$4;
|
|
2849
|
+
CheckboxGroup.defaultProps = DEFAULT_PROPS$4;
|
|
2850
|
+
CheckboxGroup.displayName = COMPONENT_NAME$4;
|
|
2854
2851
|
|
|
2855
2852
|
/**
|
|
2856
2853
|
* Component variant.
|
|
@@ -3006,10 +3003,10 @@ const StyledFloatingActionButton = styled.button`
|
|
|
3006
3003
|
}
|
|
3007
3004
|
`;
|
|
3008
3005
|
|
|
3009
|
-
const _excluded$
|
|
3010
|
-
const COMPONENT_NAME$
|
|
3011
|
-
const CLASSNAME$
|
|
3012
|
-
const DEFAULT_PROPS$
|
|
3006
|
+
const _excluded$3 = ["className", "color", "disabled", "icon", "isDisabled", "onPress", "size", "text", "variant"];
|
|
3007
|
+
const COMPONENT_NAME$3 = 'RedSiftFloatingActionButton';
|
|
3008
|
+
const CLASSNAME$3 = 'redsift-floatin-action-button';
|
|
3009
|
+
const DEFAULT_PROPS$3 = {
|
|
3013
3010
|
color: ColorPalette.primary,
|
|
3014
3011
|
size: FloatingActionButtonSize.large,
|
|
3015
3012
|
variant: FloatingActionButtonVariant.round
|
|
@@ -3040,7 +3037,7 @@ const FloatingActionButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3040
3037
|
text,
|
|
3041
3038
|
variant
|
|
3042
3039
|
} = props,
|
|
3043
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
3040
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$3);
|
|
3044
3041
|
warnIfNoAccessibleLabelFound(props, [text]);
|
|
3045
3042
|
return /*#__PURE__*/React.createElement(StyledFloatingActionButton, _extends({}, forwardedProps, buttonProps, {
|
|
3046
3043
|
$color: color,
|
|
@@ -3055,9 +3052,9 @@ const FloatingActionButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3055
3052
|
icon: icon
|
|
3056
3053
|
}), text && /*#__PURE__*/React.createElement("span", null, text));
|
|
3057
3054
|
});
|
|
3058
|
-
FloatingActionButton.className = CLASSNAME$
|
|
3059
|
-
FloatingActionButton.defaultProps = DEFAULT_PROPS$
|
|
3060
|
-
FloatingActionButton.displayName = COMPONENT_NAME$
|
|
3055
|
+
FloatingActionButton.className = CLASSNAME$3;
|
|
3056
|
+
FloatingActionButton.defaultProps = DEFAULT_PROPS$3;
|
|
3057
|
+
FloatingActionButton.displayName = COMPONENT_NAME$3;
|
|
3061
3058
|
|
|
3062
3059
|
/**
|
|
3063
3060
|
* Component style.
|
|
@@ -3097,10 +3094,10 @@ const StyledLink = styled.a`
|
|
|
3097
3094
|
}
|
|
3098
3095
|
`;
|
|
3099
3096
|
|
|
3100
|
-
const _excluded$
|
|
3101
|
-
const COMPONENT_NAME$
|
|
3102
|
-
const CLASSNAME$
|
|
3103
|
-
const DEFAULT_PROPS$
|
|
3097
|
+
const _excluded$2 = ["children", "className", "href", "isDisabled"];
|
|
3098
|
+
const COMPONENT_NAME$2 = 'RedSiftLink';
|
|
3099
|
+
const CLASSNAME$2 = 'redsift-link';
|
|
3100
|
+
const DEFAULT_PROPS$2 = {};
|
|
3104
3101
|
|
|
3105
3102
|
/**
|
|
3106
3103
|
* The Link is a semantic link that looks like a link.
|
|
@@ -3118,7 +3115,7 @@ const Link = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3118
3115
|
href,
|
|
3119
3116
|
isDisabled
|
|
3120
3117
|
} = props,
|
|
3121
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
3118
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$2);
|
|
3122
3119
|
return /*#__PURE__*/React.createElement(StyledLink, _extends({
|
|
3123
3120
|
"aria-disabled": isDisabled,
|
|
3124
3121
|
role: "link",
|
|
@@ -3130,14 +3127,14 @@ const Link = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3130
3127
|
ref: linkRef
|
|
3131
3128
|
}), children);
|
|
3132
3129
|
});
|
|
3133
|
-
Link.className = CLASSNAME$
|
|
3134
|
-
Link.defaultProps = DEFAULT_PROPS$
|
|
3135
|
-
Link.displayName = COMPONENT_NAME$
|
|
3130
|
+
Link.className = CLASSNAME$2;
|
|
3131
|
+
Link.defaultProps = DEFAULT_PROPS$2;
|
|
3132
|
+
Link.displayName = COMPONENT_NAME$2;
|
|
3136
3133
|
|
|
3137
|
-
const _excluded = ["children", "className", "disabled", "isDisabled", "onPress"];
|
|
3138
|
-
const COMPONENT_NAME = 'RedSiftLinkButton';
|
|
3139
|
-
const CLASSNAME = 'redsift-link-button';
|
|
3140
|
-
const DEFAULT_PROPS = {};
|
|
3134
|
+
const _excluded$1 = ["children", "className", "disabled", "isDisabled", "onPress"];
|
|
3135
|
+
const COMPONENT_NAME$1 = 'RedSiftLinkButton';
|
|
3136
|
+
const CLASSNAME$1 = 'redsift-link-button';
|
|
3137
|
+
const DEFAULT_PROPS$1 = {};
|
|
3141
3138
|
|
|
3142
3139
|
/**
|
|
3143
3140
|
* The LinkButton is a semantic button that looks like a link.
|
|
@@ -3161,7 +3158,7 @@ const LinkButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3161
3158
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3162
3159
|
onPress
|
|
3163
3160
|
} = props,
|
|
3164
|
-
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
3161
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1);
|
|
3165
3162
|
return /*#__PURE__*/React.createElement(StyledLink, _extends({
|
|
3166
3163
|
as: "button"
|
|
3167
3164
|
}, forwardedProps, buttonProps, {
|
|
@@ -3174,9 +3171,215 @@ const LinkButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3174
3171
|
ref: buttonRef
|
|
3175
3172
|
}), children);
|
|
3176
3173
|
});
|
|
3177
|
-
LinkButton.className = CLASSNAME;
|
|
3178
|
-
LinkButton.defaultProps = DEFAULT_PROPS;
|
|
3179
|
-
LinkButton.displayName = COMPONENT_NAME;
|
|
3174
|
+
LinkButton.className = CLASSNAME$1;
|
|
3175
|
+
LinkButton.defaultProps = DEFAULT_PROPS$1;
|
|
3176
|
+
LinkButton.displayName = COMPONENT_NAME$1;
|
|
3177
|
+
|
|
3178
|
+
/**
|
|
3179
|
+
* Component variant.
|
|
3180
|
+
*/
|
|
3181
|
+
const ShieldVariant = {
|
|
3182
|
+
success: 'success',
|
|
3183
|
+
successLocked: 'successLocked',
|
|
3184
|
+
successUnlocked: 'successUnlocked',
|
|
3185
|
+
fail: 'fail',
|
|
3186
|
+
failLocked: 'failLocked',
|
|
3187
|
+
failUnlocked: 'failUnlocked',
|
|
3188
|
+
warning: 'warning',
|
|
3189
|
+
warningLocked: 'warningLocked',
|
|
3190
|
+
warningUnlocked: 'warningUnlocked',
|
|
3191
|
+
ignored: 'ignored',
|
|
3192
|
+
noData: 'noData',
|
|
3193
|
+
question: 'question',
|
|
3194
|
+
email: 'email'
|
|
3195
|
+
};
|
|
3196
|
+
|
|
3197
|
+
const StyledShield = styled.div`
|
|
3198
|
+
height: 24px;
|
|
3199
|
+
width: 20px;
|
|
3200
|
+
|
|
3201
|
+
${_ref => {
|
|
3202
|
+
let {
|
|
3203
|
+
$color,
|
|
3204
|
+
$outlined,
|
|
3205
|
+
$reversed
|
|
3206
|
+
} = _ref;
|
|
3207
|
+
if ($reversed && $outlined) {
|
|
3208
|
+
return css`
|
|
3209
|
+
& .shield {
|
|
3210
|
+
fill: ${Object.keys(ColorPalette).indexOf($color) !== -1 ? `var(--redsift-color-${$color}-main)` : `${$color}`};
|
|
3211
|
+
stroke: #ffffff;
|
|
3212
|
+
stroke-width: 2;
|
|
3213
|
+
}
|
|
3214
|
+
& .icon {
|
|
3215
|
+
fill-rule: evenodd;
|
|
3216
|
+
clip-rule: evenodd;
|
|
3217
|
+
fill: #ffffff;
|
|
3218
|
+
}
|
|
3219
|
+
`;
|
|
3220
|
+
} else if ($outlined) {
|
|
3221
|
+
return css`
|
|
3222
|
+
& .shield {
|
|
3223
|
+
fill: #ffffff;
|
|
3224
|
+
stroke: ${Object.keys(ColorPalette).indexOf($color) !== -1 ? `var(--redsift-color-${$color}-main)` : `${$color}`};
|
|
3225
|
+
stroke-width: 2;
|
|
3226
|
+
}
|
|
3227
|
+
& .icon {
|
|
3228
|
+
fill-rule: evenodd;
|
|
3229
|
+
clip-rule: evenodd;
|
|
3230
|
+
fill: ${Object.keys(ColorPalette).indexOf($color) !== -1 ? `var(--redsift-color-${$color}-main)` : `${$color}`};
|
|
3231
|
+
}
|
|
3232
|
+
`;
|
|
3233
|
+
} else if ($reversed) {
|
|
3234
|
+
return css`
|
|
3235
|
+
& .shield {
|
|
3236
|
+
fill: #ffffff;
|
|
3237
|
+
}
|
|
3238
|
+
& .icon {
|
|
3239
|
+
fill-rule: evenodd;
|
|
3240
|
+
clip-rule: evenodd;
|
|
3241
|
+
fill: ${Object.keys(ColorPalette).indexOf($color) !== -1 ? `var(--redsift-color-${$color}-main)` : `${$color}`};
|
|
3242
|
+
}
|
|
3243
|
+
`;
|
|
3244
|
+
} else {
|
|
3245
|
+
return css`
|
|
3246
|
+
& .shield {
|
|
3247
|
+
fill: ${Object.keys(ColorPalette).indexOf($color) !== -1 ? `var(--redsift-color-${$color}-main)` : `${$color}`};
|
|
3248
|
+
}
|
|
3249
|
+
& .icon {
|
|
3250
|
+
fill-rule: evenodd;
|
|
3251
|
+
clip-rule: evenodd;
|
|
3252
|
+
fill: #ffffff;
|
|
3253
|
+
}
|
|
3254
|
+
`;
|
|
3255
|
+
}
|
|
3256
|
+
}}
|
|
3257
|
+
`;
|
|
3258
|
+
|
|
3259
|
+
const _excluded = ["aria-hidden", "aria-label", "className", "svgProps", "outlined", "reversed", "variant"];
|
|
3260
|
+
const COMPONENT_NAME = 'RedSiftShield';
|
|
3261
|
+
const CLASSNAME = 'redsift-shield';
|
|
3262
|
+
const DEFAULT_PROPS = {
|
|
3263
|
+
variant: ShieldVariant.success
|
|
3264
|
+
};
|
|
3265
|
+
const getVariant = variant => {
|
|
3266
|
+
switch (variant) {
|
|
3267
|
+
case ShieldVariant.email:
|
|
3268
|
+
return {
|
|
3269
|
+
color: ColorPalette.primary,
|
|
3270
|
+
icon: 'M14.7,6.3H5.3c-0.6,0-1.2,0.5-1.2,1.2l0,7c0,0.6,0.5,1.2,1.2,1.2h9.3c0.6,0,1.2-0.5,1.2-1.2v-7 C15.8,6.9,15.3,6.3,14.7,6.3z M14.7,14.5H5.3V8.7l4.7,2.9l4.7-2.9V14.5z M10,10.4L5.3,7.5h9.3L10,10.4z'
|
|
3271
|
+
};
|
|
3272
|
+
case ShieldVariant.fail:
|
|
3273
|
+
return {
|
|
3274
|
+
color: ColorPalette.error,
|
|
3275
|
+
icon: 'M9,15V5h2v10H9z M9,19v-2h2v2H9z'
|
|
3276
|
+
};
|
|
3277
|
+
case ShieldVariant.failLocked:
|
|
3278
|
+
return {
|
|
3279
|
+
color: ColorPalette.error,
|
|
3280
|
+
icon: 'M13.5,9.7h-0.6V8.5c0-1.6-1.3-2.9-2.9-2.9S7.1,6.9,7.1,8.5v1.2H6.5c-0.6,0-1.2,0.5-1.2,1.2v5.8 c0,0.6,0.5,1.2,1.2,1.2h7c0.6,0,1.2-0.5,1.2-1.2v-5.8C14.7,10.2,14.1,9.7,13.5,9.7z M10,14.9c-0.6,0-1.2-0.5-1.2-1.2 s0.5-1.2,1.2-1.2c0.6,0,1.2,0.5,1.2,1.2S10.6,14.9,10,14.9z M11.8,9.7H8.2V8.5c0-1,0.8-1.8,1.8-1.8s1.8,0.8,1.8,1.8V9.7z'
|
|
3281
|
+
};
|
|
3282
|
+
case ShieldVariant.failUnlocked:
|
|
3283
|
+
return {
|
|
3284
|
+
color: ColorPalette.error,
|
|
3285
|
+
icon: 'M10,14.9c0.6,0,1.2-0.5,1.2-1.2s-0.5-1.2-1.2-1.2c-0.6,0-1.2,0.5-1.2,1.2S9.4,14.9,10,14.9z M13.5,9.7h-0.6V8.5 c0-1.6-1.3-2.9-2.9-2.9S7.1,6.9,7.1,8.5h1.1c0-1,0.8-1.8,1.8-1.8s1.8,0.8,1.8,1.8v1.2H6.5c-0.6,0-1.2,0.5-1.2,1.2v5.8 c0,0.6,0.5,1.2,1.2,1.2h7c0.6,0,1.2-0.5,1.2-1.2v-5.8C14.7,10.2,14.1,9.7,13.5,9.7z M13.5,16.7h-7v-5.8h7V16.7z'
|
|
3286
|
+
};
|
|
3287
|
+
case ShieldVariant.ignored:
|
|
3288
|
+
return {
|
|
3289
|
+
color: '#BDBDBD',
|
|
3290
|
+
icon: 'M10,6.2c-3.2,0-5.8,2.6-5.8,5.8c0,3.2,2.6,5.8,5.8,5.8s5.8-2.6,5.8-5.8C15.8,8.8,13.2,6.2,10,6.2z M5.3,12 c0-2.6,2.1-4.7,4.7-4.7c1.1,0,2.1,0.4,2.9,1l-6.5,6.5C5.7,14.1,5.3,13.1,5.3,12z M10,16.7c-1.1,0-2.1-0.4-2.9-1l6.5-6.5 c0.6,0.8,1,1.8,1,2.9C14.7,14.6,12.6,16.7,10,16.7z'
|
|
3291
|
+
};
|
|
3292
|
+
case ShieldVariant.noData:
|
|
3293
|
+
return {
|
|
3294
|
+
color: '#BDBDBD',
|
|
3295
|
+
icon: 'M16,13H4v-2h12V13z'
|
|
3296
|
+
};
|
|
3297
|
+
case ShieldVariant.question:
|
|
3298
|
+
return {
|
|
3299
|
+
color: '#666666',
|
|
3300
|
+
icon: 'M9,17h2v-2H9V17z M10,5C7.8,5,6,6.8,6,9h2c0-1.1,0.9-2,2-2s2,0.9,2,2c0,2-3,1.8-3,5h2c0-2.2,3-2.5,3-5 C14,6.8,12.2,5,10,5z'
|
|
3301
|
+
};
|
|
3302
|
+
case ShieldVariant.success:
|
|
3303
|
+
return {
|
|
3304
|
+
color: ColorPalette.success,
|
|
3305
|
+
icon: 'M8,16.6l8.5-8.5l-1.4-1.4L8,13.7l-2.8-2.8l-1.4,1.4L8,16.6z'
|
|
3306
|
+
};
|
|
3307
|
+
case ShieldVariant.successLocked:
|
|
3308
|
+
return {
|
|
3309
|
+
color: ColorPalette.success,
|
|
3310
|
+
icon: 'M13.5,9.7h-0.6V8.5c0-1.6-1.3-2.9-2.9-2.9S7.1,6.9,7.1,8.5v1.2H6.5c-0.6,0-1.2,0.5-1.2,1.2v5.8 c0,0.6,0.5,1.2,1.2,1.2h7c0.6,0,1.2-0.5,1.2-1.2v-5.8C14.7,10.2,14.1,9.7,13.5,9.7z M10,14.9c-0.6,0-1.2-0.5-1.2-1.2 s0.5-1.2,1.2-1.2c0.6,0,1.2,0.5,1.2,1.2S10.6,14.9,10,14.9z M11.8,9.7H8.2V8.5c0-1,0.8-1.8,1.8-1.8s1.8,0.8,1.8,1.8V9.7z'
|
|
3311
|
+
};
|
|
3312
|
+
case ShieldVariant.successUnlocked:
|
|
3313
|
+
return {
|
|
3314
|
+
color: ColorPalette.success,
|
|
3315
|
+
icon: 'M10,14.9c0.6,0,1.2-0.5,1.2-1.2s-0.5-1.2-1.2-1.2c-0.6,0-1.2,0.5-1.2,1.2S9.4,14.9,10,14.9z M13.5,9.7h-0.6V8.5 c0-1.6-1.3-2.9-2.9-2.9S7.1,6.9,7.1,8.5h1.1c0-1,0.8-1.8,1.8-1.8s1.8,0.8,1.8,1.8v1.2H6.5c-0.6,0-1.2,0.5-1.2,1.2v5.8 c0,0.6,0.5,1.2,1.2,1.2h7c0.6,0,1.2-0.5,1.2-1.2v-5.8C14.7,10.2,14.1,9.7,13.5,9.7z M13.5,16.7h-7v-5.8h7V16.7z'
|
|
3316
|
+
};
|
|
3317
|
+
case ShieldVariant.warning:
|
|
3318
|
+
return {
|
|
3319
|
+
color: ColorPalette.warning,
|
|
3320
|
+
icon: 'M10,5c0.7,0,1.4,0.4,1.7,1l4,7c0.4,0.6,0.4,1.4,0,2c-0.4,0.6-1,1-1.7,1H6c-0.7,0-1.4-0.4-1.7-1 c-0.4-0.6-0.4-1.4,0-2l4-7C8.6,5.4,9.3,5,10,5z M10,7l-4,7h8L10,7z'
|
|
3321
|
+
};
|
|
3322
|
+
case ShieldVariant.warningLocked:
|
|
3323
|
+
return {
|
|
3324
|
+
color: ColorPalette.warning,
|
|
3325
|
+
icon: 'M13.5,9.7h-0.6V8.5c0-1.6-1.3-2.9-2.9-2.9S7.1,6.9,7.1,8.5v1.2H6.5c-0.6,0-1.2,0.5-1.2,1.2v5.8 c0,0.6,0.5,1.2,1.2,1.2h7c0.6,0,1.2-0.5,1.2-1.2v-5.8C14.7,10.2,14.1,9.7,13.5,9.7z M10,14.9c-0.6,0-1.2-0.5-1.2-1.2 s0.5-1.2,1.2-1.2c0.6,0,1.2,0.5,1.2,1.2S10.6,14.9,10,14.9z M11.8,9.7H8.2V8.5c0-1,0.8-1.8,1.8-1.8s1.8,0.8,1.8,1.8V9.7z'
|
|
3326
|
+
};
|
|
3327
|
+
case ShieldVariant.warningUnlocked:
|
|
3328
|
+
return {
|
|
3329
|
+
color: ColorPalette.warning,
|
|
3330
|
+
icon: 'M10,14.9c0.6,0,1.2-0.5,1.2-1.2s-0.5-1.2-1.2-1.2c-0.6,0-1.2,0.5-1.2,1.2S9.4,14.9,10,14.9z M13.5,9.7h-0.6V8.5 c0-1.6-1.3-2.9-2.9-2.9S7.1,6.9,7.1,8.5h1.1c0-1,0.8-1.8,1.8-1.8s1.8,0.8,1.8,1.8v1.2H6.5c-0.6,0-1.2,0.5-1.2,1.2v5.8 c0,0.6,0.5,1.2,1.2,1.2h7c0.6,0,1.2-0.5,1.2-1.2v-5.8C14.7,10.2,14.1,9.7,13.5,9.7z M13.5,16.7h-7v-5.8h7V16.7z'
|
|
3331
|
+
};
|
|
3332
|
+
}
|
|
3333
|
+
};
|
|
3334
|
+
|
|
3335
|
+
/**
|
|
3336
|
+
* The Shield component.
|
|
3337
|
+
*/
|
|
3338
|
+
const Shield = /*#__PURE__*/forwardRef((props, ref) => {
|
|
3339
|
+
const {
|
|
3340
|
+
'aria-hidden': ariaHidden,
|
|
3341
|
+
'aria-label': ariaLabel,
|
|
3342
|
+
className,
|
|
3343
|
+
svgProps,
|
|
3344
|
+
outlined,
|
|
3345
|
+
reversed,
|
|
3346
|
+
variant
|
|
3347
|
+
} = props,
|
|
3348
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
3349
|
+
const color = getVariant(variant).color;
|
|
3350
|
+
const icon = getVariant(variant).icon;
|
|
3351
|
+
return /*#__PURE__*/React.createElement(StyledShield, _extends({}, forwardedProps, {
|
|
3352
|
+
"aria-hidden": ariaLabel ? ariaHidden ? ariaHidden : undefined : true,
|
|
3353
|
+
"aria-label": ariaLabel,
|
|
3354
|
+
className: classNames(Shield.className, className),
|
|
3355
|
+
ref: ref,
|
|
3356
|
+
$color: color,
|
|
3357
|
+
$outlined: outlined,
|
|
3358
|
+
$reversed: reversed,
|
|
3359
|
+
$variant: variant
|
|
3360
|
+
}), /*#__PURE__*/React.createElement("svg", _extends({}, svgProps, {
|
|
3361
|
+
"aria-hidden": ariaLabel ? ariaHidden ? ariaHidden : undefined : true,
|
|
3362
|
+
"aria-label": ariaLabel,
|
|
3363
|
+
focusable: "false",
|
|
3364
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
3365
|
+
role: "img",
|
|
3366
|
+
style: {
|
|
3367
|
+
verticalAlign: '-0.125em'
|
|
3368
|
+
},
|
|
3369
|
+
viewBox: "0 0 20 24",
|
|
3370
|
+
width: "20",
|
|
3371
|
+
height: "24"
|
|
3372
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
3373
|
+
d: outlined ? 'M1,10.9V5l9-3.9L19,5v5.9c0,5.5-3.9,10.7-9,12.1C4.9,21.6,1,16.4,1,10.9z' : 'M10,0L0,4.4v6.5C0,17,4.3,22.6,10,24c5.7-1.4,10-7,10-13.1V4.4L10,0z',
|
|
3374
|
+
className: "shield"
|
|
3375
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
3376
|
+
d: icon,
|
|
3377
|
+
className: "icon"
|
|
3378
|
+
})));
|
|
3379
|
+
});
|
|
3380
|
+
Shield.className = CLASSNAME;
|
|
3381
|
+
Shield.defaultProps = DEFAULT_PROPS;
|
|
3382
|
+
Shield.displayName = COMPONENT_NAME;
|
|
3180
3383
|
|
|
3181
|
-
export { AppBar, AppContainer, AppContainerContext, AppContent, AppSidePanel, Badge, BadgeVariant, BreadcrumbItem, Breadcrumbs, Button, ButtonLink, ButtonSize, ButtonVariant, Checkbox, CheckboxGroup, CheckboxGroupOrientation, CheckboxSize, ColorPalette, FloatingActionButton, FloatingActionButtonColor, FloatingActionButtonSize, FloatingActionButtonVariant, Icon, IconButton, IconButtonSize, IconSize, Link, LinkButton, SideNavigationMenu, SideNavigationMenuBar, SideNavigationMenuItem, SideNavigationMenuReducerActionType, StyledButton, StyledLink, Theme, useAppSidePanel, useSideNavigationMenuBar };
|
|
3384
|
+
export { AppBar, AppContainer, AppContainerContext, AppContent, AppSidePanel, Badge, BadgeVariant, BreadcrumbItem, Breadcrumbs, Button, ButtonLink, ButtonSize, ButtonVariant, Checkbox, CheckboxGroup, CheckboxGroupOrientation, CheckboxSize, ColorPalette, FloatingActionButton, FloatingActionButtonColor, FloatingActionButtonSize, FloatingActionButtonVariant, Icon, IconButton, IconButtonSize, IconSize, Link, LinkButton, Shield, ShieldVariant, SideNavigationMenu, SideNavigationMenuBar, SideNavigationMenuItem, SideNavigationMenuReducerActionType, StyledButton, StyledLink, Theme, useAppSidePanel, useSideNavigationMenuBar };
|
|
3182
3385
|
//# sourceMappingURL=index.js.map
|