@alma-oss/spirit-web-react 4.2.0 → 4.2.1
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/README.md +2 -1
- package/bundles/web-react.umd.js +450 -277
- package/bundles/web-react.umd.js.map +1 -1
- package/bundles/web-react.umd.min.js +1 -1
- package/bundles/web-react.umd.min.js.map +1 -1
- package/components/Accordion/Accordion.cjs +2 -2
- package/components/Accordion/Accordion.cjs.map +1 -1
- package/components/ActionGroup/ActionGroup.cjs +2 -2
- package/components/ActionGroup/ActionGroup.cjs.map +1 -1
- package/components/Avatar/Avatar.js.map +1 -1
- package/components/Button/Button.cjs +49 -12
- package/components/Button/Button.cjs.map +1 -1
- package/components/Button/Button.js.map +1 -1
- package/components/Button/useButtonStyleProps.js +6 -6
- package/components/Button/useButtonStyleProps.js.map +1 -1
- package/components/ButtonLink/ButtonLink.js.map +1 -1
- package/components/ButtonLink/useButtonLinkStyleProps.js +6 -6
- package/components/ButtonLink/useButtonLinkStyleProps.js.map +1 -1
- package/components/Card/CardLink.js.map +1 -1
- package/components/Checkbox/Checkbox.cjs +45 -1
- package/components/Checkbox/Checkbox.cjs.map +1 -1
- package/components/Checkbox/Checkbox.js.map +1 -1
- package/components/Checkbox/useCheckboxStyleProps.js +5 -2
- package/components/Checkbox/useCheckboxStyleProps.js.map +1 -1
- package/components/Collapse/Collapse.cjs +2 -2
- package/components/Collapse/Collapse.cjs.map +1 -1
- package/components/ControlButton/ControlButton.js.map +1 -1
- package/components/ControlButton/useControlButtonStyleProps.js +3 -4
- package/components/ControlButton/useControlButtonStyleProps.js.map +1 -1
- package/components/Drawer/Drawer.cjs +49 -12
- package/components/Drawer/Drawer.cjs.map +1 -1
- package/components/Drawer/DrawerPanel.js.map +1 -1
- package/components/FileUploader/useFileUploaderInput.js.map +1 -1
- package/components/Flex/Flex.cjs +2 -2
- package/components/Flex/Flex.cjs.map +1 -1
- package/components/Grid/Grid.cjs +6 -5
- package/components/Grid/Grid.cjs.map +1 -1
- package/components/Grid/useGridItemStyleProps.js +6 -5
- package/components/Grid/useGridItemStyleProps.js.map +1 -1
- package/components/Header/Header.cjs +49 -12
- package/components/Header/Header.cjs.map +1 -1
- package/components/Header/HeaderDialogLink.js.map +1 -1
- package/components/Header/HeaderLink.js.map +1 -1
- package/components/Hidden/Hidden.d.ts +9 -0
- package/components/Hidden/Hidden.js +31 -0
- package/components/Hidden/Hidden.js.map +1 -0
- package/components/Hidden/index.d.ts +1 -0
- package/components/Hidden/index.js +2 -0
- package/components/Hidden/index.js.map +1 -0
- package/components/Icon/Icon.js.map +1 -1
- package/components/Link/Link.js.map +1 -1
- package/components/Matrix/Matrix.cjs.map +1 -1
- package/components/Matrix/Matrix.js +2 -2
- package/components/Matrix/Matrix.js.map +1 -1
- package/components/Matrix/useMatrixStyleProps.d.ts +1 -1
- package/components/Matrix/useMatrixStyleProps.js.map +1 -1
- package/components/Modal/Modal.cjs +50 -14
- package/components/Modal/Modal.cjs.map +1 -1
- package/components/Modal/useModalDialogStyleProps.js +1 -2
- package/components/Modal/useModalDialogStyleProps.js.map +1 -1
- package/components/Navigation/NavigationAction.js.map +1 -1
- package/components/Navigation/NavigationAvatar.js.map +1 -1
- package/components/Pagination/Pagination.cjs +50 -13
- package/components/Pagination/Pagination.cjs.map +1 -1
- package/components/Pagination/PaginationButtonLink.js.map +1 -1
- package/components/Pagination/PaginationLink.js +1 -1
- package/components/Pagination/PaginationLink.js.map +1 -1
- package/components/Pagination/PaginationLinkNext.js.map +1 -1
- package/components/Pagination/PaginationLinkPrevious.js.map +1 -1
- package/components/PricingPlan/PricingPlan.cjs +50 -14
- package/components/PricingPlan/PricingPlan.cjs.map +1 -1
- package/components/Radio/Radio.cjs +45 -1
- package/components/Radio/Radio.cjs.map +1 -1
- package/components/Radio/Radio.js.map +1 -1
- package/components/Radio/useRadioStyleProps.js +5 -2
- package/components/Radio/useRadioStyleProps.js.map +1 -1
- package/components/ScrollView/ScrollView.cjs +39 -3
- package/components/ScrollView/ScrollView.cjs.map +1 -1
- package/components/ScrollView/useScrollPosition.js.map +1 -1
- package/components/SegmentedControl/SegmentedControlContext.js.map +1 -1
- package/components/Select/Select.js.map +1 -1
- package/components/SkipLink/SkipLink.js.map +1 -1
- package/components/Slider/Slider.js.map +1 -1
- package/components/Spinner/Spinner.js.map +1 -1
- package/components/SplitButton/SplitButton.cjs +49 -12
- package/components/SplitButton/SplitButton.cjs.map +1 -1
- package/components/Tabs/TabContext.js.map +1 -1
- package/components/Tabs/TabLink.js.map +1 -1
- package/components/Tag/Tag.js.map +1 -1
- package/components/TextArea/TextArea.js.map +1 -1
- package/components/TextArea/useAdjustHeight.js.map +1 -1
- package/components/TextField/TextField.js.map +1 -1
- package/components/TextFieldBase/TextFieldBase.js.map +1 -1
- package/components/TextFieldBase/TextFieldBaseInput.js.map +1 -1
- package/components/Toast/Toast.cjs.map +1 -1
- package/components/Toast/ToastBarLink.js.map +1 -1
- package/components/Toast/ToastContext.js +2 -2
- package/components/Toast/ToastContext.js.map +1 -1
- package/components/Toggle/Toggle.cjs +46 -1
- package/components/Toggle/Toggle.cjs.map +1 -1
- package/components/Toggle/Toggle.js.map +1 -1
- package/components/Toggle/useToggleStyleProps.js +5 -2
- package/components/Toggle/useToggleStyleProps.js.map +1 -1
- package/components/UNSTABLE_Header/UNSTABLE_HeaderLogo.js.map +1 -1
- package/components/components.cjs +344 -263
- package/components/components.cjs.map +1 -1
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/index.js.map +1 -1
- package/constants/constants.cjs +6 -0
- package/constants/constants.cjs.map +1 -1
- package/constants/index.d.ts +1 -0
- package/constants/index.js +1 -0
- package/constants/index.js.map +1 -1
- package/constants/inputs.d.ts +4 -0
- package/constants/inputs.js +5 -0
- package/constants/inputs.js.map +1 -0
- package/hooks/hooks.cjs +48 -7
- package/hooks/hooks.cjs.map +1 -1
- package/hooks/index.d.ts +2 -1
- package/hooks/index.js +2 -1
- package/hooks/index.js.map +1 -1
- package/hooks/useDeprecationMessage.js +2 -2
- package/hooks/useDeprecationMessage.js.map +1 -1
- package/hooks/useInputPositionClass.d.ts +2 -0
- package/hooks/useInputPositionClass.js +8 -0
- package/hooks/useInputPositionClass.js.map +1 -0
- package/hooks/useSymmetry.d.ts +7 -0
- package/hooks/useSymmetry.js +39 -0
- package/hooks/useSymmetry.js.map +1 -0
- package/index.cjs +347 -268
- package/index.cjs.map +1 -1
- package/package.json +6 -15
- package/spirit-web-react.cjs +347 -268
- package/spirit-web-react.cjs.map +1 -1
- package/spirit-web-react.min.cjs +1 -1
- package/types/button.d.ts +2 -2
- package/types/checkbox.d.ts +2 -1
- package/types/controlButton.d.ts +2 -2
- package/types/hidden.d.ts +10 -0
- package/types/hidden.js +2 -0
- package/types/hidden.js.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.js +1 -0
- package/types/index.js.map +1 -1
- package/types/item.d.ts +2 -2
- package/types/pricingPlan.d.ts +1 -1
- package/types/radio.d.ts +2 -1
- package/types/shared/inputs.d.ts +3 -0
- package/types/slider.d.ts +2 -2
- package/types/toggle.d.ts +2 -1
- package/hooks/useDirectionClass.d.ts +0 -2
- package/hooks/useDirectionClass.js +0 -5
- package/hooks/useDirectionClass.js.map +0 -1
package/index.cjs
CHANGED
|
@@ -88,7 +88,7 @@ const ColorPrefixes = {
|
|
|
88
88
|
EMOTION: 'emotion',
|
|
89
89
|
};
|
|
90
90
|
|
|
91
|
-
var __rest$
|
|
91
|
+
var __rest$2W = (undefined && undefined.__rest) || function (s, e) {
|
|
92
92
|
var t = {};
|
|
93
93
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
94
94
|
t[p] = s[p];
|
|
@@ -188,7 +188,7 @@ const Sizes = {
|
|
|
188
188
|
LARGE: 'large',
|
|
189
189
|
};
|
|
190
190
|
const SizesExtended = Object.assign(Object.assign({ XSMALL: 'xsmall' }, Sizes), { XLARGE: 'xlarge' });
|
|
191
|
-
const _a = createUppercaseKeyDictionary(spiritDesignTokens.containers), { MAXWIDTH, PADDING } = _a, ContainerTokenSizes = __rest$
|
|
191
|
+
const _a = createUppercaseKeyDictionary(spiritDesignTokens.containers), { MAXWIDTH, PADDING } = _a, ContainerTokenSizes = __rest$2W(_a, ["MAXWIDTH", "PADDING"]);
|
|
192
192
|
const ValidationStates = {
|
|
193
193
|
SUCCESS: 'success',
|
|
194
194
|
WARNING: 'warning',
|
|
@@ -215,6 +215,11 @@ exports.DirectionAxis = void 0;
|
|
|
215
215
|
})(exports.DirectionAxis || (exports.DirectionAxis = {}));
|
|
216
216
|
const isDirectionHorizontal = (direction) => direction === Direction.HORIZONTAL;
|
|
217
217
|
|
|
218
|
+
const InputPositions = {
|
|
219
|
+
START: 'start',
|
|
220
|
+
END: 'end',
|
|
221
|
+
};
|
|
222
|
+
|
|
218
223
|
const ObjectFit = {
|
|
219
224
|
CONTAIN: 'contain',
|
|
220
225
|
COVER: 'cover',
|
|
@@ -626,7 +631,7 @@ const useStyleUtilities = (props, prefix = '', additionalProps = {}) => {
|
|
|
626
631
|
};
|
|
627
632
|
};
|
|
628
633
|
|
|
629
|
-
var __rest$
|
|
634
|
+
var __rest$2V = (undefined && undefined.__rest) || function (s, e) {
|
|
630
635
|
var t = {};
|
|
631
636
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
632
637
|
t[p] = s[p];
|
|
@@ -639,7 +644,7 @@ var __rest$2U = (undefined && undefined.__rest) || function (s, e) {
|
|
|
639
644
|
};
|
|
640
645
|
function useStyleProps(props, additionalUtilities) {
|
|
641
646
|
const classNamePrefix = React.useContext(ClassNamePrefixContext);
|
|
642
|
-
const { UNSAFE_className, UNSAFE_style } = props, otherProps = __rest$
|
|
647
|
+
const { UNSAFE_className, UNSAFE_style } = props, otherProps = __rest$2V(props, ["UNSAFE_className", "UNSAFE_style"]);
|
|
643
648
|
const styleUtilitiesConfig = Object.assign({ theme: ThemeStyleProps.theme }, (additionalUtilities !== null && additionalUtilities !== void 0 ? additionalUtilities : {}));
|
|
644
649
|
const { styleUtilities, props: modifiedProps } = useStyleUtilities(otherProps, classNamePrefix, styleUtilitiesConfig);
|
|
645
650
|
const style = Object.assign({}, UNSAFE_style);
|
|
@@ -765,11 +770,11 @@ const useClickOutside = ({ ref, callback }) => {
|
|
|
765
770
|
};
|
|
766
771
|
|
|
767
772
|
const useDeprecationMessage = ({ method = 'component', trigger, componentName, componentProps, propertyProps, customText, }) => {
|
|
768
|
-
let message;
|
|
769
|
-
let hasProps;
|
|
770
773
|
const messageBase = `Deprecation warning (${componentName}):`;
|
|
771
774
|
React.useEffect(() => {
|
|
772
775
|
const isExecutable = trigger && componentName && process.env.NODE_ENV === 'development';
|
|
776
|
+
let message;
|
|
777
|
+
let hasProps;
|
|
773
778
|
switch (method) {
|
|
774
779
|
case 'property':
|
|
775
780
|
if (propertyProps === null || propertyProps === void 0 ? void 0 : propertyProps.delete) {
|
|
@@ -820,10 +825,6 @@ const useDimensionStyle = (property, prefix) => {
|
|
|
820
825
|
return style;
|
|
821
826
|
};
|
|
822
827
|
|
|
823
|
-
function useDirectionClass(componentClass, property) {
|
|
824
|
-
return generateStylePropsClassNames(componentClass, property);
|
|
825
|
-
}
|
|
826
|
-
|
|
827
828
|
const useDragAndDrop = (props) => {
|
|
828
829
|
const [isDragging, setDragging] = React.useState(false);
|
|
829
830
|
const onDragOverHandler = (event) => {
|
|
@@ -878,6 +879,13 @@ function useIconName(key, iconMap, defaultKey = 'default') {
|
|
|
878
879
|
return key && iconMap[key] ? iconMap[key] : iconMap[defaultKey];
|
|
879
880
|
}
|
|
880
881
|
|
|
882
|
+
function useInputPositionClass(componentClass, property) {
|
|
883
|
+
if (!property) {
|
|
884
|
+
return '';
|
|
885
|
+
}
|
|
886
|
+
return generateStylePropsClassNames(componentClass, property, 'inputPosition');
|
|
887
|
+
}
|
|
888
|
+
|
|
881
889
|
const useLastActiveFocus = (isOpen) => {
|
|
882
890
|
const lastActiveElement = React.useRef(null);
|
|
883
891
|
React.useEffect(() => {
|
|
@@ -1007,6 +1015,43 @@ function useSpacingStyle(spacing, prefix, direction = undefined) {
|
|
|
1007
1015
|
return style;
|
|
1008
1016
|
}
|
|
1009
1017
|
|
|
1018
|
+
const SYMMETRICAL_CLASS_SUFFIX = '--symmetrical';
|
|
1019
|
+
const NON_SYMMETRICAL_CLASS_SUFFIX = '--asymmetrical';
|
|
1020
|
+
function getSymmetryClassNamesReducer(componentClass, isSymmetrical) {
|
|
1021
|
+
return (acc, breakpoint) => {
|
|
1022
|
+
if (breakpoint in isSymmetrical) {
|
|
1023
|
+
const value = isSymmetrical[breakpoint];
|
|
1024
|
+
const infix = breakpoint === BREAKPOINT_MOBILE ? '' : `--${breakpoint}`;
|
|
1025
|
+
if (value) {
|
|
1026
|
+
return {
|
|
1027
|
+
classes: [...acc.classes, `${componentClass}${infix}${SYMMETRICAL_CLASS_SUFFIX}`],
|
|
1028
|
+
wasSymmetrical: true,
|
|
1029
|
+
};
|
|
1030
|
+
}
|
|
1031
|
+
if (acc.wasSymmetrical) {
|
|
1032
|
+
return {
|
|
1033
|
+
classes: [...acc.classes, `${componentClass}${infix}${NON_SYMMETRICAL_CLASS_SUFFIX}`],
|
|
1034
|
+
wasSymmetrical: acc.wasSymmetrical,
|
|
1035
|
+
};
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
return acc;
|
|
1039
|
+
};
|
|
1040
|
+
}
|
|
1041
|
+
function useSymmetry(componentClass, isSymmetrical) {
|
|
1042
|
+
if (typeof isSymmetrical !== 'object' || isSymmetrical === null) {
|
|
1043
|
+
return {
|
|
1044
|
+
isSymmetricalActive: isSymmetrical === true,
|
|
1045
|
+
symmetricalClassName: isSymmetrical ? `${componentClass}${SYMMETRICAL_CLASS_SUFFIX}` : '',
|
|
1046
|
+
};
|
|
1047
|
+
}
|
|
1048
|
+
const { classes } = Object.keys(spiritDesignTokens.breakpoints).reduce(getSymmetryClassNamesReducer(componentClass, isSymmetrical), { classes: [], wasSymmetrical: false });
|
|
1049
|
+
return {
|
|
1050
|
+
isSymmetricalActive: Object.values(isSymmetrical).includes(true),
|
|
1051
|
+
symmetricalClassName: classes.join(' '),
|
|
1052
|
+
};
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1010
1055
|
const useToggle = (initialState = false) => {
|
|
1011
1056
|
const [state, setState] = React.useState(initialState);
|
|
1012
1057
|
const toggle = React.useCallback(() => setState((prevState) => !prevState), []);
|
|
@@ -1072,7 +1117,7 @@ const useOpenItem = (id) => {
|
|
|
1072
1117
|
};
|
|
1073
1118
|
};
|
|
1074
1119
|
|
|
1075
|
-
var __rest$
|
|
1120
|
+
var __rest$2U = (undefined && undefined.__rest) || function (s, e) {
|
|
1076
1121
|
var t = {};
|
|
1077
1122
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1078
1123
|
t[p] = s[p];
|
|
@@ -1084,7 +1129,7 @@ var __rest$2T = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1084
1129
|
return t;
|
|
1085
1130
|
};
|
|
1086
1131
|
const Accordion = (props) => {
|
|
1087
|
-
const { children, elementType: ElementTag = 'section', open, toggle } = props, restProps = __rest$
|
|
1132
|
+
const { children, elementType: ElementTag = 'section', open, toggle } = props, restProps = __rest$2U(props, ["children", "elementType", "open", "toggle"]);
|
|
1088
1133
|
const { classProps } = useAccordionStyleProps();
|
|
1089
1134
|
const { styleProps, props: transferProps } = useStyleProps(restProps);
|
|
1090
1135
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps: classProps.root, styleProps });
|
|
@@ -1107,7 +1152,7 @@ const AccordionItemProvider = AccordionItemContext.Provider;
|
|
|
1107
1152
|
AccordionItemContext.Consumer;
|
|
1108
1153
|
const useAccordionItemContext = () => React.useContext(AccordionItemContext);
|
|
1109
1154
|
|
|
1110
|
-
var __rest$
|
|
1155
|
+
var __rest$2T = (undefined && undefined.__rest) || function (s, e) {
|
|
1111
1156
|
var t = {};
|
|
1112
1157
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1113
1158
|
t[p] = s[p];
|
|
@@ -1119,7 +1164,7 @@ var __rest$2S = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1119
1164
|
return t;
|
|
1120
1165
|
};
|
|
1121
1166
|
const AccordionItem = (props) => {
|
|
1122
|
-
const { children, elementType: ElementTag = 'article', id } = props, restProps = __rest$
|
|
1167
|
+
const { children, elementType: ElementTag = 'article', id } = props, restProps = __rest$2T(props, ["children", "elementType", "id"]);
|
|
1123
1168
|
const { classProps } = useAccordionStyleProps();
|
|
1124
1169
|
const { styleProps, props: transferProps } = useStyleProps(restProps);
|
|
1125
1170
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps: classProps.item, styleProps });
|
|
@@ -1135,7 +1180,7 @@ const DEFAULT_BOX_SIZE = 24;
|
|
|
1135
1180
|
|
|
1136
1181
|
const useIconBoxSize = (boxSize) => { var _a; return typeof boxSize === 'object' ? ((_a = boxSize.mobile) !== null && _a !== void 0 ? _a : DEFAULT_BOX_SIZE) : (boxSize !== null && boxSize !== void 0 ? boxSize : DEFAULT_BOX_SIZE); };
|
|
1137
1182
|
|
|
1138
|
-
var __rest$
|
|
1183
|
+
var __rest$2S = (undefined && undefined.__rest) || function (s, e) {
|
|
1139
1184
|
var t = {};
|
|
1140
1185
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1141
1186
|
t[p] = s[p];
|
|
@@ -1157,7 +1202,7 @@ const setCustomDimension$1 = (prefix, size) => {
|
|
|
1157
1202
|
return style;
|
|
1158
1203
|
};
|
|
1159
1204
|
const useIconStyleProps = (props) => {
|
|
1160
|
-
const { boxSize, color, name } = props, otherProps = __rest$
|
|
1205
|
+
const { boxSize, color, name } = props, otherProps = __rest$2S(props, ["boxSize", "color", "name"]);
|
|
1161
1206
|
const stylePrefix = `--${spiritDesignTokens.cssVariablePrefix}icon`;
|
|
1162
1207
|
const isDualtoneIcon = String(name).includes('-dualtone');
|
|
1163
1208
|
const dualtoneColorWithDefault = isDualtoneIcon && !color ? TextColors.PRIMARY : color;
|
|
@@ -1174,7 +1219,7 @@ const useIconStyleProps = (props) => {
|
|
|
1174
1219
|
};
|
|
1175
1220
|
};
|
|
1176
1221
|
|
|
1177
|
-
var __rest$
|
|
1222
|
+
var __rest$2R = (undefined && undefined.__rest) || function (s, e) {
|
|
1178
1223
|
var t = {};
|
|
1179
1224
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1180
1225
|
t[p] = s[p];
|
|
@@ -1185,13 +1230,13 @@ var __rest$2Q = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1185
1230
|
}
|
|
1186
1231
|
return t;
|
|
1187
1232
|
};
|
|
1188
|
-
const defaultProps
|
|
1233
|
+
const defaultProps$10 = {
|
|
1189
1234
|
ariaHidden: true,
|
|
1190
1235
|
boxSize: DEFAULT_BOX_SIZE,
|
|
1191
1236
|
};
|
|
1192
1237
|
const _Icon = (props, ref) => {
|
|
1193
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps
|
|
1194
|
-
const { boxSize, name, title, ariaHidden } = propsWithDefaults, restProps = __rest$
|
|
1238
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$10), props);
|
|
1239
|
+
const { boxSize, name, title, ariaHidden } = propsWithDefaults, restProps = __rest$2R(propsWithDefaults, ["boxSize", "name", "title", "ariaHidden"]);
|
|
1195
1240
|
let icon = useIcon(name);
|
|
1196
1241
|
const iconSize = useIconBoxSize(boxSize);
|
|
1197
1242
|
const { classProps, iconStyleProps, props: modifiedProps } = useIconStyleProps(Object.assign({ boxSize, name }, restProps));
|
|
@@ -1209,7 +1254,7 @@ const _Icon = (props, ref) => {
|
|
|
1209
1254
|
const Icon = React.forwardRef(_Icon);
|
|
1210
1255
|
Icon.spiritComponent = 'Icon';
|
|
1211
1256
|
|
|
1212
|
-
var __rest$
|
|
1257
|
+
var __rest$2Q = (undefined && undefined.__rest) || function (s, e) {
|
|
1213
1258
|
var t = {};
|
|
1214
1259
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1215
1260
|
t[p] = s[p];
|
|
@@ -1220,12 +1265,12 @@ var __rest$2P = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1220
1265
|
}
|
|
1221
1266
|
return t;
|
|
1222
1267
|
};
|
|
1223
|
-
const defaultProps
|
|
1268
|
+
const defaultProps$$ = {
|
|
1224
1269
|
elementType: 'h3',
|
|
1225
1270
|
};
|
|
1226
1271
|
const AccordionHeader = (props) => {
|
|
1227
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps
|
|
1228
|
-
const { elementType: ElementTag = 'h3', children, slot } = propsWithDefaults, restProps = __rest$
|
|
1272
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$$), props);
|
|
1273
|
+
const { elementType: ElementTag = 'h3', children, slot } = propsWithDefaults, restProps = __rest$2Q(propsWithDefaults, ["elementType", "children", "slot"]);
|
|
1229
1274
|
const { classProps } = useAccordionStyleProps();
|
|
1230
1275
|
const { toggle } = useAccordionContext();
|
|
1231
1276
|
const { id } = useAccordionItemContext();
|
|
@@ -1252,7 +1297,7 @@ AccordionHeader.spiritComponent = 'AccordionHeader';
|
|
|
1252
1297
|
AccordionHeader.spiritDefaultElement = 'h3';
|
|
1253
1298
|
AccordionHeader.spiritDefaultProps = null;
|
|
1254
1299
|
|
|
1255
|
-
var __rest$
|
|
1300
|
+
var __rest$2P = (undefined && undefined.__rest) || function (s, e) {
|
|
1256
1301
|
var t = {};
|
|
1257
1302
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1258
1303
|
t[p] = s[p];
|
|
@@ -1267,7 +1312,7 @@ const ATTRIBUTE_ARIA_EXPANDED = 'aria-expanded';
|
|
|
1267
1312
|
const ATTRIBUTE_ARIA_CONTROLS = 'aria-controls';
|
|
1268
1313
|
const ATTRIBUTE_DATA_BREAKPOINT = 'data-spirit-breakpoint';
|
|
1269
1314
|
const useCollapseAriaProps = (props) => {
|
|
1270
|
-
const { isOpen, collapsibleToBreakpoint } = props, modifiedProps = __rest$
|
|
1315
|
+
const { isOpen, collapsibleToBreakpoint } = props, modifiedProps = __rest$2P(props, ["isOpen", "collapsibleToBreakpoint"]);
|
|
1271
1316
|
useDeprecationMessage({
|
|
1272
1317
|
method: 'custom',
|
|
1273
1318
|
trigger: !modifiedProps.id,
|
|
@@ -1314,7 +1359,7 @@ const useResizeHeight = (ref) => {
|
|
|
1314
1359
|
return height;
|
|
1315
1360
|
};
|
|
1316
1361
|
|
|
1317
|
-
var __rest$
|
|
1362
|
+
var __rest$2O = (undefined && undefined.__rest) || function (s, e) {
|
|
1318
1363
|
var t = {};
|
|
1319
1364
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1320
1365
|
t[p] = s[p];
|
|
@@ -1332,15 +1377,15 @@ const transitioningStyles = {
|
|
|
1332
1377
|
exiting: 'is-transitioning',
|
|
1333
1378
|
exited: '',
|
|
1334
1379
|
};
|
|
1335
|
-
const defaultProps$
|
|
1380
|
+
const defaultProps$_ = {
|
|
1336
1381
|
elementType: 'div',
|
|
1337
1382
|
isOpen: false,
|
|
1338
1383
|
collapsibleToBreakpoint: undefined,
|
|
1339
1384
|
transitionDuration: TRANSITION_DURATION$1,
|
|
1340
1385
|
};
|
|
1341
1386
|
const Collapse = (props) => {
|
|
1342
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1343
|
-
const { elementType: ElementTag = defaultProps$
|
|
1387
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$_), props);
|
|
1388
|
+
const { elementType: ElementTag = defaultProps$_.elementType, children, transitionDuration = TRANSITION_DURATION$1 } = propsWithDefaults, restProps = __rest$2O(propsWithDefaults, ["elementType", "children", "transitionDuration"]);
|
|
1344
1389
|
const rootElementRef = React.useRef(null);
|
|
1345
1390
|
const collapseElementRef = React.useRef(null);
|
|
1346
1391
|
const collapseHeight = useResizeHeight(collapseElementRef);
|
|
@@ -1378,7 +1423,7 @@ const useCollapse = (defaultOpenState) => {
|
|
|
1378
1423
|
};
|
|
1379
1424
|
};
|
|
1380
1425
|
|
|
1381
|
-
var __rest$
|
|
1426
|
+
var __rest$2N = (undefined && undefined.__rest) || function (s, e) {
|
|
1382
1427
|
var t = {};
|
|
1383
1428
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1384
1429
|
t[p] = s[p];
|
|
@@ -1389,12 +1434,12 @@ var __rest$2M = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1389
1434
|
}
|
|
1390
1435
|
return t;
|
|
1391
1436
|
};
|
|
1392
|
-
const defaultProps$
|
|
1437
|
+
const defaultProps$Z = {
|
|
1393
1438
|
isOpen: false,
|
|
1394
1439
|
};
|
|
1395
1440
|
const UncontrolledCollapse = (props) => {
|
|
1396
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1397
|
-
const { children, hideOnCollapse, isDisposable, renderTrigger } = propsWithDefaults, restProps = __rest$
|
|
1441
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$Z), props);
|
|
1442
|
+
const { children, hideOnCollapse, isDisposable, renderTrigger } = propsWithDefaults, restProps = __rest$2N(propsWithDefaults, ["children", "hideOnCollapse", "isDisposable", "renderTrigger"]);
|
|
1398
1443
|
const { isOpen, toggleHandler } = useCollapse(restProps.isOpen);
|
|
1399
1444
|
const { ariaProps } = useCollapseAriaProps(Object.assign(Object.assign({}, restProps), { isOpen }));
|
|
1400
1445
|
const isDisposed = hideOnCollapse || isDisposable;
|
|
@@ -1410,7 +1455,7 @@ const UncontrolledCollapse = (props) => {
|
|
|
1410
1455
|
};
|
|
1411
1456
|
UncontrolledCollapse.spiritComponent = 'UncontrolledCollapse';
|
|
1412
1457
|
|
|
1413
|
-
var __rest$
|
|
1458
|
+
var __rest$2M = (undefined && undefined.__rest) || function (s, e) {
|
|
1414
1459
|
var t = {};
|
|
1415
1460
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1416
1461
|
t[p] = s[p];
|
|
@@ -1422,7 +1467,7 @@ var __rest$2L = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1422
1467
|
return t;
|
|
1423
1468
|
};
|
|
1424
1469
|
const AccordionContent = (_a) => {
|
|
1425
|
-
var { children } = _a, restProps = __rest$
|
|
1470
|
+
var { children } = _a, restProps = __rest$2M(_a, ["children"]);
|
|
1426
1471
|
const { classProps } = useAccordionStyleProps();
|
|
1427
1472
|
const { id } = useAccordionItemContext();
|
|
1428
1473
|
const { styleProps, props: transferProps } = useStyleProps(restProps);
|
|
@@ -1433,7 +1478,7 @@ const AccordionContent = (_a) => {
|
|
|
1433
1478
|
};
|
|
1434
1479
|
AccordionContent.spiritComponent = 'AccordionContent';
|
|
1435
1480
|
|
|
1436
|
-
var __rest$
|
|
1481
|
+
var __rest$2L = (undefined && undefined.__rest) || function (s, e) {
|
|
1437
1482
|
var t = {};
|
|
1438
1483
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1439
1484
|
t[p] = s[p];
|
|
@@ -1445,7 +1490,7 @@ var __rest$2K = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1445
1490
|
return t;
|
|
1446
1491
|
};
|
|
1447
1492
|
const UncontrolledAccordion = (props) => {
|
|
1448
|
-
const { defaultOpen, stayOpen } = props, restProps = __rest$
|
|
1493
|
+
const { defaultOpen, stayOpen } = props, restProps = __rest$2L(props, ["defaultOpen", "stayOpen"]);
|
|
1449
1494
|
const { open, toggle } = useAccordion({ defaultOpen, stayOpen });
|
|
1450
1495
|
return React.createElement(Accordion, Object.assign({}, restProps, { open: open, toggle: toggle }));
|
|
1451
1496
|
};
|
|
@@ -1453,7 +1498,7 @@ UncontrolledAccordion.spiritComponent = 'UncontrolledAccordion';
|
|
|
1453
1498
|
UncontrolledAccordion.spiritDefaultElement = 'section';
|
|
1454
1499
|
UncontrolledAccordion.spiritDefaultProps = null;
|
|
1455
1500
|
|
|
1456
|
-
var __rest$
|
|
1501
|
+
var __rest$2K = (undefined && undefined.__rest) || function (s, e) {
|
|
1457
1502
|
var t = {};
|
|
1458
1503
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1459
1504
|
t[p] = s[p];
|
|
@@ -1465,7 +1510,7 @@ var __rest$2J = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1465
1510
|
return t;
|
|
1466
1511
|
};
|
|
1467
1512
|
function useFlexStyleProps(props) {
|
|
1468
|
-
const { alignmentX, alignmentY, direction, spacing, spacingX, spacingY, isWrapping } = props, restProps = __rest$
|
|
1513
|
+
const { alignmentX, alignmentY, direction, spacing, spacingX, spacingY, isWrapping } = props, restProps = __rest$2K(props, ["alignmentX", "alignmentY", "direction", "spacing", "spacingX", "spacingY", "isWrapping"]);
|
|
1469
1514
|
useDeprecationMessage({
|
|
1470
1515
|
method: 'custom',
|
|
1471
1516
|
trigger: direction === 'row' || direction === 'column',
|
|
@@ -1487,7 +1532,7 @@ function useFlexStyleProps(props) {
|
|
|
1487
1532
|
};
|
|
1488
1533
|
}
|
|
1489
1534
|
|
|
1490
|
-
var __rest$
|
|
1535
|
+
var __rest$2J = (undefined && undefined.__rest) || function (s, e) {
|
|
1491
1536
|
var t = {};
|
|
1492
1537
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1493
1538
|
t[p] = s[p];
|
|
@@ -1498,7 +1543,7 @@ var __rest$2I = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1498
1543
|
}
|
|
1499
1544
|
return t;
|
|
1500
1545
|
};
|
|
1501
|
-
const defaultProps$
|
|
1546
|
+
const defaultProps$Y = {
|
|
1502
1547
|
alignmentX: AlignmentXExtended.STRETCH,
|
|
1503
1548
|
alignmentY: AlignmentYExtended.STRETCH,
|
|
1504
1549
|
direction: DirectionExtended.HORIZONTAL,
|
|
@@ -1506,8 +1551,8 @@ const defaultProps$X = {
|
|
|
1506
1551
|
isWrapping: false,
|
|
1507
1552
|
};
|
|
1508
1553
|
const Flex = (props) => {
|
|
1509
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1510
|
-
const { elementType: ElementTag = 'div', direction, children } = propsWithDefaults, restProps = __rest$
|
|
1554
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$Y), props);
|
|
1555
|
+
const { elementType: ElementTag = 'div', direction, children } = propsWithDefaults, restProps = __rest$2J(propsWithDefaults, ["elementType", "direction", "children"]);
|
|
1511
1556
|
const { classProps, props: modifiedProps, styleProps: flexStyle } = useFlexStyleProps(Object.assign({ direction }, restProps));
|
|
1512
1557
|
const { styleProps, props: otherProps } = useStyleProps(Object.assign({}, modifiedProps));
|
|
1513
1558
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps, flexStyle, styleProps, otherProps });
|
|
@@ -1517,7 +1562,7 @@ Flex.spiritComponent = 'Flex';
|
|
|
1517
1562
|
Flex.spiritDefaultElement = 'div';
|
|
1518
1563
|
Flex.spiritDefaultProps = null;
|
|
1519
1564
|
|
|
1520
|
-
var __rest$
|
|
1565
|
+
var __rest$2I = (undefined && undefined.__rest) || function (s, e) {
|
|
1521
1566
|
var t = {};
|
|
1522
1567
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1523
1568
|
t[p] = s[p];
|
|
@@ -1528,7 +1573,7 @@ var __rest$2H = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1528
1573
|
}
|
|
1529
1574
|
return t;
|
|
1530
1575
|
};
|
|
1531
|
-
const defaultProps$
|
|
1576
|
+
const defaultProps$X = {
|
|
1532
1577
|
alignmentX: {
|
|
1533
1578
|
mobile: AlignmentXExtended.STRETCH,
|
|
1534
1579
|
tablet: AlignmentXExtended.LEFT,
|
|
@@ -1539,13 +1584,13 @@ const defaultProps$W = {
|
|
|
1539
1584
|
},
|
|
1540
1585
|
};
|
|
1541
1586
|
const ActionGroup = (props) => {
|
|
1542
|
-
const { children } = props, restProps = __rest$
|
|
1543
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1587
|
+
const { children } = props, restProps = __rest$2I(props, ["children"]);
|
|
1588
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$X), restProps);
|
|
1544
1589
|
return React.createElement(Flex, Object.assign({}, propsWithDefaults), children);
|
|
1545
1590
|
};
|
|
1546
1591
|
ActionGroup.spiritComponent = 'ActionGroup';
|
|
1547
1592
|
|
|
1548
|
-
var __rest$
|
|
1593
|
+
var __rest$2H = (undefined && undefined.__rest) || function (s, e) {
|
|
1549
1594
|
var t = {};
|
|
1550
1595
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1551
1596
|
t[p] = s[p];
|
|
@@ -1557,7 +1602,7 @@ var __rest$2G = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1557
1602
|
return t;
|
|
1558
1603
|
};
|
|
1559
1604
|
function useAlertStyleProps(props) {
|
|
1560
|
-
const { color, isCentered } = props, modifiedProps = __rest$
|
|
1605
|
+
const { color, isCentered } = props, modifiedProps = __rest$2H(props, ["color", "isCentered"]);
|
|
1561
1606
|
const alertClass = useClassNamePrefix('Alert');
|
|
1562
1607
|
const alertColorClass = `${alertClass}--${color}`;
|
|
1563
1608
|
const alertCenteredClass = `${alertClass}--center`;
|
|
@@ -1582,7 +1627,7 @@ function useAlertIcon({ color, iconName }) {
|
|
|
1582
1627
|
return iconName || iconNameValue;
|
|
1583
1628
|
}
|
|
1584
1629
|
|
|
1585
|
-
var __rest$
|
|
1630
|
+
var __rest$2G = (undefined && undefined.__rest) || function (s, e) {
|
|
1586
1631
|
var t = {};
|
|
1587
1632
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1588
1633
|
t[p] = s[p];
|
|
@@ -1593,13 +1638,13 @@ var __rest$2F = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1593
1638
|
}
|
|
1594
1639
|
return t;
|
|
1595
1640
|
};
|
|
1596
|
-
const defaultProps$
|
|
1641
|
+
const defaultProps$W = {
|
|
1597
1642
|
color: 'success',
|
|
1598
1643
|
isCentered: false,
|
|
1599
1644
|
};
|
|
1600
1645
|
const Alert = (props) => {
|
|
1601
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1602
|
-
const { elementType: ElementTag = 'div', children, color, iconName } = propsWithDefaults, restProps = __rest$
|
|
1646
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$W), props);
|
|
1647
|
+
const { elementType: ElementTag = 'div', children, color, iconName } = propsWithDefaults, restProps = __rest$2G(propsWithDefaults, ["elementType", "children", "color", "iconName"]);
|
|
1603
1648
|
const { classProps, props: modifiedProps } = useAlertStyleProps(Object.assign({ color }, restProps));
|
|
1604
1649
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
1605
1650
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps, styleProps, otherProps });
|
|
@@ -1610,7 +1655,7 @@ const Alert = (props) => {
|
|
|
1610
1655
|
};
|
|
1611
1656
|
Alert.spiritComponent = 'Alert';
|
|
1612
1657
|
|
|
1613
|
-
var __rest$
|
|
1658
|
+
var __rest$2F = (undefined && undefined.__rest) || function (s, e) {
|
|
1614
1659
|
var t = {};
|
|
1615
1660
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1616
1661
|
t[p] = s[p];
|
|
@@ -1623,7 +1668,7 @@ var __rest$2E = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1623
1668
|
};
|
|
1624
1669
|
const getAvatarSizeClassname = (className, size) => compose(applySize(size))(className);
|
|
1625
1670
|
function useAvatarStyleProps(props) {
|
|
1626
|
-
const { isSquare, size } = props, restProps = __rest$
|
|
1671
|
+
const { isSquare, size } = props, restProps = __rest$2F(props, ["isSquare", "size"]);
|
|
1627
1672
|
const avatarClass = useClassNamePrefix('Avatar');
|
|
1628
1673
|
const avatarSquareClass = `${avatarClass}--square`;
|
|
1629
1674
|
const classProps = classNames(avatarClass, getAvatarSizeClassname(avatarClass, size), {
|
|
@@ -1635,7 +1680,7 @@ function useAvatarStyleProps(props) {
|
|
|
1635
1680
|
};
|
|
1636
1681
|
}
|
|
1637
1682
|
|
|
1638
|
-
var __rest$
|
|
1683
|
+
var __rest$2E = (undefined && undefined.__rest) || function (s, e) {
|
|
1639
1684
|
var t = {};
|
|
1640
1685
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1641
1686
|
t[p] = s[p];
|
|
@@ -1646,14 +1691,14 @@ var __rest$2D = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1646
1691
|
}
|
|
1647
1692
|
return t;
|
|
1648
1693
|
};
|
|
1649
|
-
const defaultProps$
|
|
1694
|
+
const defaultProps$V = {
|
|
1650
1695
|
elementType: 'div',
|
|
1651
1696
|
isSquare: false,
|
|
1652
1697
|
size: SizesExtended.MEDIUM,
|
|
1653
1698
|
};
|
|
1654
1699
|
const _Avatar = (props, ref) => {
|
|
1655
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1656
|
-
const { elementType: ElementTag = 'div', children } = propsWithDefaults, restProps = __rest$
|
|
1700
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$V), props);
|
|
1701
|
+
const { elementType: ElementTag = 'div', children } = propsWithDefaults, restProps = __rest$2E(propsWithDefaults, ["elementType", "children"]);
|
|
1657
1702
|
const { classProps, props: modifiedProps } = useAvatarStyleProps(restProps);
|
|
1658
1703
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
1659
1704
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps, styleProps });
|
|
@@ -1664,7 +1709,7 @@ _Avatar.spiritDefaultElement = 'div';
|
|
|
1664
1709
|
_Avatar.spiritDefaultProps = null;
|
|
1665
1710
|
const Avatar = React.forwardRef(_Avatar);
|
|
1666
1711
|
|
|
1667
|
-
var __rest$
|
|
1712
|
+
var __rest$2D = (undefined && undefined.__rest) || function (s, e) {
|
|
1668
1713
|
var t = {};
|
|
1669
1714
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1670
1715
|
t[p] = s[p];
|
|
@@ -1676,7 +1721,7 @@ var __rest$2C = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1676
1721
|
return t;
|
|
1677
1722
|
};
|
|
1678
1723
|
const useBoxStyleProps = (props) => {
|
|
1679
|
-
const _a = props || {}, { backgroundColor, borderColor, borderStyle, borderWidth, textColor } = _a, restProps = __rest$
|
|
1724
|
+
const _a = props || {}, { backgroundColor, borderColor, borderStyle, borderWidth, textColor } = _a, restProps = __rest$2D(_a, ["backgroundColor", "borderColor", "borderStyle", "borderWidth", "textColor"]);
|
|
1680
1725
|
const boxBackgroundClassName = useClassNamePrefix(`bg-${backgroundColor}`);
|
|
1681
1726
|
const boxBorderClassName = useClassNamePrefix('border-');
|
|
1682
1727
|
const boxBackgroundColor = backgroundColor ? boxBackgroundClassName : '';
|
|
@@ -1699,7 +1744,7 @@ const useBoxStyleProps = (props) => {
|
|
|
1699
1744
|
};
|
|
1700
1745
|
};
|
|
1701
1746
|
|
|
1702
|
-
var __rest$
|
|
1747
|
+
var __rest$2C = (undefined && undefined.__rest) || function (s, e) {
|
|
1703
1748
|
var t = {};
|
|
1704
1749
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1705
1750
|
t[p] = s[p];
|
|
@@ -1710,13 +1755,13 @@ var __rest$2B = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1710
1755
|
}
|
|
1711
1756
|
return t;
|
|
1712
1757
|
};
|
|
1713
|
-
const defaultProps$
|
|
1758
|
+
const defaultProps$U = {
|
|
1714
1759
|
elementType: 'div',
|
|
1715
1760
|
borderStyle: BorderStyles.SOLID,
|
|
1716
1761
|
};
|
|
1717
1762
|
const Box = (props) => {
|
|
1718
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1719
|
-
const { elementType: ElementTag = 'div', children } = propsWithDefaults, restProps = __rest$
|
|
1763
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$U), props);
|
|
1764
|
+
const { elementType: ElementTag = 'div', children } = propsWithDefaults, restProps = __rest$2C(propsWithDefaults, ["elementType", "children"]);
|
|
1720
1765
|
const { classProps, props: modifiedProps } = useBoxStyleProps(restProps);
|
|
1721
1766
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps, Object.assign(Object.assign(Object.assign({}, BackgroundStyleProps), BorderRadiusStyleProps), PaddingStyleProps));
|
|
1722
1767
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps, styleProps });
|
|
@@ -1726,7 +1771,7 @@ Box.spiritComponent = 'Box';
|
|
|
1726
1771
|
Box.spiritDefaultElement = 'div';
|
|
1727
1772
|
Box.spiritDefaultProps = null;
|
|
1728
1773
|
|
|
1729
|
-
var __rest$
|
|
1774
|
+
var __rest$2B = (undefined && undefined.__rest) || function (s, e) {
|
|
1730
1775
|
var t = {};
|
|
1731
1776
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1732
1777
|
t[p] = s[p];
|
|
@@ -1738,7 +1783,7 @@ var __rest$2A = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1738
1783
|
return t;
|
|
1739
1784
|
};
|
|
1740
1785
|
function useLinkStyleProps(props) {
|
|
1741
|
-
const { color, hasVisitedStyleAllowed, isDisabled, underlined } = props, restProps = __rest$
|
|
1786
|
+
const { color, hasVisitedStyleAllowed, isDisabled, underlined } = props, restProps = __rest$2B(props, ["color", "hasVisitedStyleAllowed", "isDisabled", "underlined"]);
|
|
1742
1787
|
const linkClass = useClassNamePrefix('link');
|
|
1743
1788
|
const linkColorClass = `${linkClass}-${color}`;
|
|
1744
1789
|
const linkDisabledClass = `${linkClass}-disabled`;
|
|
@@ -1757,7 +1802,7 @@ function useLinkStyleProps(props) {
|
|
|
1757
1802
|
};
|
|
1758
1803
|
}
|
|
1759
1804
|
|
|
1760
|
-
var __rest$
|
|
1805
|
+
var __rest$2A = (undefined && undefined.__rest) || function (s, e) {
|
|
1761
1806
|
var t = {};
|
|
1762
1807
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1763
1808
|
t[p] = s[p];
|
|
@@ -1768,15 +1813,15 @@ var __rest$2z = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1768
1813
|
}
|
|
1769
1814
|
return t;
|
|
1770
1815
|
};
|
|
1771
|
-
const defaultProps$
|
|
1816
|
+
const defaultProps$T = {
|
|
1772
1817
|
elementType: 'a',
|
|
1773
1818
|
color: 'primary',
|
|
1774
1819
|
hasVisitedStyleAllowed: false,
|
|
1775
1820
|
underlined: 'hover',
|
|
1776
1821
|
};
|
|
1777
1822
|
const _Link = (props, ref) => {
|
|
1778
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1779
|
-
const { elementType: ElementTag = defaultProps$
|
|
1823
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$T), props);
|
|
1824
|
+
const { elementType: ElementTag = defaultProps$T.elementType, children } = propsWithDefaults, restProps = __rest$2A(propsWithDefaults, ["elementType", "children"]);
|
|
1780
1825
|
const { classProps, props: modifiedProps } = useLinkStyleProps(restProps);
|
|
1781
1826
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
1782
1827
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps, styleProps, otherProps });
|
|
@@ -1785,7 +1830,7 @@ const _Link = (props, ref) => {
|
|
|
1785
1830
|
const Link = React.forwardRef(_Link);
|
|
1786
1831
|
Link.spiritComponent = 'Link';
|
|
1787
1832
|
|
|
1788
|
-
var __rest$
|
|
1833
|
+
var __rest$2z = (undefined && undefined.__rest) || function (s, e) {
|
|
1789
1834
|
var t = {};
|
|
1790
1835
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1791
1836
|
t[p] = s[p];
|
|
@@ -1797,7 +1842,7 @@ var __rest$2y = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1797
1842
|
return t;
|
|
1798
1843
|
};
|
|
1799
1844
|
function useBreadcrumbsStyleProps(props) {
|
|
1800
|
-
const { isGoBackOnly } = props, restProps = __rest$
|
|
1845
|
+
const { isGoBackOnly } = props, restProps = __rest$2z(props, ["isGoBackOnly"]);
|
|
1801
1846
|
const breadcrumbsClass = useClassNamePrefix('Breadcrumbs');
|
|
1802
1847
|
const displayNoneClassName = useClassNamePrefix('d-none');
|
|
1803
1848
|
const displayTabletFlexClassName = useClassNamePrefix('d-tablet-flex');
|
|
@@ -1815,7 +1860,7 @@ function useBreadcrumbsStyleProps(props) {
|
|
|
1815
1860
|
};
|
|
1816
1861
|
}
|
|
1817
1862
|
|
|
1818
|
-
var __rest$
|
|
1863
|
+
var __rest$2y = (undefined && undefined.__rest) || function (s, e) {
|
|
1819
1864
|
var t = {};
|
|
1820
1865
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1821
1866
|
t[p] = s[p];
|
|
@@ -1826,15 +1871,15 @@ var __rest$2x = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1826
1871
|
}
|
|
1827
1872
|
return t;
|
|
1828
1873
|
};
|
|
1829
|
-
const defaultProps$
|
|
1874
|
+
const defaultProps$S = {
|
|
1830
1875
|
iconNameEnd: 'chevron-right',
|
|
1831
1876
|
iconNameStart: 'chevron-left',
|
|
1832
1877
|
isCurrent: false,
|
|
1833
1878
|
isGoBackOnly: false,
|
|
1834
1879
|
};
|
|
1835
1880
|
const BreadcrumbsItem = (props) => {
|
|
1836
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1837
|
-
const { children, href, isCurrent, iconNameStart, iconNameEnd } = propsWithDefaults, restProps = __rest$
|
|
1881
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$S), props);
|
|
1882
|
+
const { children, href, isCurrent, iconNameStart, iconNameEnd } = propsWithDefaults, restProps = __rest$2y(propsWithDefaults, ["children", "href", "isCurrent", "iconNameStart", "iconNameEnd"]);
|
|
1838
1883
|
const { classProps, props: otherProps } = useBreadcrumbsStyleProps(Object.assign({}, restProps));
|
|
1839
1884
|
const { styleProps, props: transferProps } = useStyleProps(otherProps);
|
|
1840
1885
|
return (React.createElement("li", Object.assign({}, transferProps, styleProps, { className: classNames(classProps.item, styleProps.className) }),
|
|
@@ -1844,7 +1889,7 @@ const BreadcrumbsItem = (props) => {
|
|
|
1844
1889
|
};
|
|
1845
1890
|
BreadcrumbsItem.spiritComponent = 'BreadcrumbsItem';
|
|
1846
1891
|
|
|
1847
|
-
var __rest$
|
|
1892
|
+
var __rest$2x = (undefined && undefined.__rest) || function (s, e) {
|
|
1848
1893
|
var t = {};
|
|
1849
1894
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1850
1895
|
t[p] = s[p];
|
|
@@ -1855,13 +1900,13 @@ var __rest$2w = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1855
1900
|
}
|
|
1856
1901
|
return t;
|
|
1857
1902
|
};
|
|
1858
|
-
const defaultProps$
|
|
1903
|
+
const defaultProps$R = {
|
|
1859
1904
|
elementType: 'nav',
|
|
1860
1905
|
items: [],
|
|
1861
1906
|
};
|
|
1862
1907
|
const Breadcrumbs = (props) => {
|
|
1863
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1864
|
-
const { children, elementType: ElementTag = 'nav', goBackTitle, items } = propsWithDefaults, restProps = __rest$
|
|
1908
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$R), props);
|
|
1909
|
+
const { children, elementType: ElementTag = 'nav', goBackTitle, items } = propsWithDefaults, restProps = __rest$2x(propsWithDefaults, ["children", "elementType", "goBackTitle", "items"]);
|
|
1865
1910
|
const { classProps, props: modifiedProps } = useBreadcrumbsStyleProps(Object.assign({}, restProps));
|
|
1866
1911
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
1867
1912
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps: classProps.root, styleProps });
|
|
@@ -1886,7 +1931,7 @@ const useButtonProps = (props) => {
|
|
|
1886
1931
|
};
|
|
1887
1932
|
};
|
|
1888
1933
|
|
|
1889
|
-
var __rest$
|
|
1934
|
+
var __rest$2w = (undefined && undefined.__rest) || function (s, e) {
|
|
1890
1935
|
var t = {};
|
|
1891
1936
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1892
1937
|
t[p] = s[p];
|
|
@@ -1900,7 +1945,7 @@ var __rest$2v = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1900
1945
|
const getButtonColorClassname = (className, color) => compose(applyColor(color))(className);
|
|
1901
1946
|
const getButtonSizeClassname = (className, size) => compose(applySize(size))(className);
|
|
1902
1947
|
function useButtonStyleProps(props) {
|
|
1903
|
-
const { color, isBlock, isDisabled, isLoading, isSymmetrical, size } = props, restProps = __rest$
|
|
1948
|
+
const { color, isBlock, isDisabled, isLoading, isSymmetrical, size } = props, restProps = __rest$2w(props, ["color", "isBlock", "isDisabled", "isLoading", "isSymmetrical", "size"]);
|
|
1904
1949
|
useDeprecationMessage({
|
|
1905
1950
|
method: 'custom',
|
|
1906
1951
|
trigger: !!isBlock,
|
|
@@ -1911,16 +1956,16 @@ function useButtonStyleProps(props) {
|
|
|
1911
1956
|
const buttonBlockClass = `${buttonClass}--block`;
|
|
1912
1957
|
const buttonDisabledClass = `${buttonClass}--disabled`;
|
|
1913
1958
|
const buttonLoadingClass = `${buttonClass}--loading`;
|
|
1914
|
-
const
|
|
1915
|
-
if (isBlock &&
|
|
1959
|
+
const { isSymmetricalActive, symmetricalClassName } = useSymmetry(buttonClass, isSymmetrical);
|
|
1960
|
+
if (isBlock && isSymmetricalActive) {
|
|
1916
1961
|
warning(false, 'isBlock and isSymmetrical props are mutually exclusive');
|
|
1917
1962
|
}
|
|
1963
|
+
const shouldApplyBlock = () => isBlock && !isSymmetricalActive;
|
|
1918
1964
|
const classProps = classNames(buttonClass, getButtonColorClassname(buttonClass, color), getButtonSizeClassname(buttonClass, size), {
|
|
1919
|
-
[buttonBlockClass]:
|
|
1965
|
+
[buttonBlockClass]: shouldApplyBlock(),
|
|
1920
1966
|
[buttonDisabledClass]: isDisabled || isLoading,
|
|
1921
1967
|
[buttonLoadingClass]: isLoading,
|
|
1922
|
-
|
|
1923
|
-
});
|
|
1968
|
+
}, symmetricalClassName);
|
|
1924
1969
|
return {
|
|
1925
1970
|
classProps,
|
|
1926
1971
|
props: restProps,
|
|
@@ -1935,7 +1980,7 @@ const usePropsContext = (props = {}) => {
|
|
|
1935
1980
|
return context ? Object.assign(Object.assign({}, props), context) : props;
|
|
1936
1981
|
};
|
|
1937
1982
|
|
|
1938
|
-
var __rest$
|
|
1983
|
+
var __rest$2v = (undefined && undefined.__rest) || function (s, e) {
|
|
1939
1984
|
var t = {};
|
|
1940
1985
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1941
1986
|
t[p] = s[p];
|
|
@@ -1947,7 +1992,7 @@ var __rest$2u = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1947
1992
|
return t;
|
|
1948
1993
|
};
|
|
1949
1994
|
function useSpinnerStyleProps(props) {
|
|
1950
|
-
const { color } = props, restProps = __rest$
|
|
1995
|
+
const { color } = props, restProps = __rest$2v(props, ["color"]);
|
|
1951
1996
|
const spinnerClass = useClassNamePrefix('text');
|
|
1952
1997
|
const spinnerColorClass = color ? `${spinnerClass}-${color}` : '';
|
|
1953
1998
|
const spinnerAnimation = useClassNamePrefix('animation-spin-clockwise');
|
|
@@ -1965,7 +2010,7 @@ const Spinner = (props) => {
|
|
|
1965
2010
|
};
|
|
1966
2011
|
Spinner.spiritComponent = 'Spinner';
|
|
1967
2012
|
|
|
1968
|
-
var __rest$
|
|
2013
|
+
var __rest$2u = (undefined && undefined.__rest) || function (s, e) {
|
|
1969
2014
|
var t = {};
|
|
1970
2015
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1971
2016
|
t[p] = s[p];
|
|
@@ -1976,7 +2021,7 @@ var __rest$2t = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1976
2021
|
}
|
|
1977
2022
|
return t;
|
|
1978
2023
|
};
|
|
1979
|
-
const defaultProps$
|
|
2024
|
+
const defaultProps$Q = {
|
|
1980
2025
|
color: 'primary',
|
|
1981
2026
|
isBlock: false,
|
|
1982
2027
|
isDisabled: false,
|
|
@@ -1988,8 +2033,8 @@ const defaultProps$P = {
|
|
|
1988
2033
|
};
|
|
1989
2034
|
const _Button = (props, ref) => {
|
|
1990
2035
|
const propsWithContext = usePropsContext();
|
|
1991
|
-
const propsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaultProps$
|
|
1992
|
-
const { elementType: ElementTag = defaultProps$
|
|
2036
|
+
const propsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaultProps$Q), props), propsWithContext);
|
|
2037
|
+
const { elementType: ElementTag = defaultProps$Q.elementType, children } = propsWithDefaults, restProps = __rest$2u(propsWithDefaults, ["elementType", "children"]);
|
|
1993
2038
|
const { buttonProps } = useButtonProps(restProps);
|
|
1994
2039
|
const { classProps, props: modifiedProps } = useButtonStyleProps(restProps);
|
|
1995
2040
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
@@ -2016,7 +2061,7 @@ const useButtonLinkProps = (props) => {
|
|
|
2016
2061
|
};
|
|
2017
2062
|
};
|
|
2018
2063
|
|
|
2019
|
-
var __rest$
|
|
2064
|
+
var __rest$2t = (undefined && undefined.__rest) || function (s, e) {
|
|
2020
2065
|
var t = {};
|
|
2021
2066
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2022
2067
|
t[p] = s[p];
|
|
@@ -2030,7 +2075,7 @@ var __rest$2s = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2030
2075
|
const getButtonLinkColorClassname = (className, color) => compose(applyColor(color))(className);
|
|
2031
2076
|
const getButtonLinkSizeClassname = (className, size) => compose(applySize(size))(className);
|
|
2032
2077
|
function useButtonLinkStyleProps(props) {
|
|
2033
|
-
const { color, isBlock, isDisabled, isLoading, isSymmetrical, size } = props, restProps = __rest$
|
|
2078
|
+
const { color, isBlock, isDisabled, isLoading, isSymmetrical, size } = props, restProps = __rest$2t(props, ["color", "isBlock", "isDisabled", "isLoading", "isSymmetrical", "size"]);
|
|
2034
2079
|
useDeprecationMessage({
|
|
2035
2080
|
method: 'custom',
|
|
2036
2081
|
trigger: !!isBlock,
|
|
@@ -2041,23 +2086,23 @@ function useButtonLinkStyleProps(props) {
|
|
|
2041
2086
|
const buttonBlockClass = `${buttonClass}--block`;
|
|
2042
2087
|
const buttonDisabledClass = `${buttonClass}--disabled`;
|
|
2043
2088
|
const buttonLoadingClass = `${buttonClass}--loading`;
|
|
2044
|
-
const
|
|
2045
|
-
if (isBlock &&
|
|
2089
|
+
const { isSymmetricalActive, symmetricalClassName } = useSymmetry(buttonClass, isSymmetrical);
|
|
2090
|
+
if (isBlock && isSymmetricalActive) {
|
|
2046
2091
|
warning(false, 'isBlock and isSymmetrical props are mutually exclusive');
|
|
2047
2092
|
}
|
|
2093
|
+
const shouldApplyBlock = () => isBlock && !isSymmetricalActive;
|
|
2048
2094
|
const classProps = classNames(buttonClass, getButtonLinkColorClassname(buttonClass, color), getButtonLinkSizeClassname(buttonClass, size), {
|
|
2049
|
-
[buttonBlockClass]:
|
|
2095
|
+
[buttonBlockClass]: shouldApplyBlock(),
|
|
2050
2096
|
[buttonDisabledClass]: isDisabled || isLoading,
|
|
2051
2097
|
[buttonLoadingClass]: isLoading,
|
|
2052
|
-
|
|
2053
|
-
});
|
|
2098
|
+
}, symmetricalClassName);
|
|
2054
2099
|
return {
|
|
2055
2100
|
classProps,
|
|
2056
2101
|
props: restProps,
|
|
2057
2102
|
};
|
|
2058
2103
|
}
|
|
2059
2104
|
|
|
2060
|
-
var __rest$
|
|
2105
|
+
var __rest$2s = (undefined && undefined.__rest) || function (s, e) {
|
|
2061
2106
|
var t = {};
|
|
2062
2107
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2063
2108
|
t[p] = s[p];
|
|
@@ -2068,7 +2113,7 @@ var __rest$2r = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2068
2113
|
}
|
|
2069
2114
|
return t;
|
|
2070
2115
|
};
|
|
2071
|
-
const defaultProps$
|
|
2116
|
+
const defaultProps$P = {
|
|
2072
2117
|
color: 'primary',
|
|
2073
2118
|
elementType: 'a',
|
|
2074
2119
|
isBlock: false,
|
|
@@ -2078,8 +2123,8 @@ const defaultProps$O = {
|
|
|
2078
2123
|
size: 'medium',
|
|
2079
2124
|
};
|
|
2080
2125
|
const _ButtonLink = (props, ref) => {
|
|
2081
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2082
|
-
const { elementType: ElementTag = defaultProps$
|
|
2126
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$P), props);
|
|
2127
|
+
const { elementType: ElementTag = defaultProps$P.elementType, children } = propsWithDefaults, restProps = __rest$2s(propsWithDefaults, ["elementType", "children"]);
|
|
2083
2128
|
const { buttonLinkProps } = useButtonLinkProps(propsWithDefaults);
|
|
2084
2129
|
const { classProps, props: modifiedProps } = useButtonLinkStyleProps(restProps);
|
|
2085
2130
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
@@ -2146,7 +2191,7 @@ function useCardStyleProps(props) {
|
|
|
2146
2191
|
};
|
|
2147
2192
|
}
|
|
2148
2193
|
|
|
2149
|
-
var __rest$
|
|
2194
|
+
var __rest$2r = (undefined && undefined.__rest) || function (s, e) {
|
|
2150
2195
|
var t = {};
|
|
2151
2196
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2152
2197
|
t[p] = s[p];
|
|
@@ -2157,14 +2202,14 @@ var __rest$2q = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2157
2202
|
}
|
|
2158
2203
|
return t;
|
|
2159
2204
|
};
|
|
2160
|
-
const defaultProps$
|
|
2205
|
+
const defaultProps$O = {
|
|
2161
2206
|
direction: DirectionExtended.VERTICAL,
|
|
2162
2207
|
elementType: 'article',
|
|
2163
2208
|
isBoxed: false,
|
|
2164
2209
|
};
|
|
2165
2210
|
const Card = (props) => {
|
|
2166
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2167
|
-
const { elementType: ElementTag = 'article', direction, isBoxed, children } = propsWithDefaults, restProps = __rest$
|
|
2211
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$O), props);
|
|
2212
|
+
const { elementType: ElementTag = 'article', direction, isBoxed, children } = propsWithDefaults, restProps = __rest$2r(propsWithDefaults, ["elementType", "direction", "isBoxed", "children"]);
|
|
2168
2213
|
const { classProps } = useCardStyleProps({ direction, isBoxed });
|
|
2169
2214
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
2170
2215
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps: classProps.root, styleProps, otherProps });
|
|
@@ -2172,7 +2217,7 @@ const Card = (props) => {
|
|
|
2172
2217
|
};
|
|
2173
2218
|
Card.spiritComponent = 'Card';
|
|
2174
2219
|
|
|
2175
|
-
var __rest$
|
|
2220
|
+
var __rest$2q = (undefined && undefined.__rest) || function (s, e) {
|
|
2176
2221
|
var t = {};
|
|
2177
2222
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2178
2223
|
t[p] = s[p];
|
|
@@ -2183,19 +2228,19 @@ var __rest$2p = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2183
2228
|
}
|
|
2184
2229
|
return t;
|
|
2185
2230
|
};
|
|
2186
|
-
const defaultProps$
|
|
2231
|
+
const defaultProps$N = {
|
|
2187
2232
|
alignmentX: AlignmentX.LEFT,
|
|
2188
2233
|
};
|
|
2189
2234
|
const CardArtwork = (props) => {
|
|
2190
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2191
|
-
const { children, alignmentX } = propsWithDefaults, restProps = __rest$
|
|
2235
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$N), props);
|
|
2236
|
+
const { children, alignmentX } = propsWithDefaults, restProps = __rest$2q(propsWithDefaults, ["children", "alignmentX"]);
|
|
2192
2237
|
const { classProps } = useCardStyleProps({ artworkAlignmentX: alignmentX });
|
|
2193
2238
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
2194
2239
|
return (React.createElement("div", Object.assign({}, otherProps, { className: classNames(classProps.artwork, styleProps.className), style: styleProps.style }), children));
|
|
2195
2240
|
};
|
|
2196
2241
|
CardArtwork.spiritComponent = 'CardArtwork';
|
|
2197
2242
|
|
|
2198
|
-
var __rest$
|
|
2243
|
+
var __rest$2p = (undefined && undefined.__rest) || function (s, e) {
|
|
2199
2244
|
var t = {};
|
|
2200
2245
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2201
2246
|
t[p] = s[p];
|
|
@@ -2206,19 +2251,19 @@ var __rest$2o = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2206
2251
|
}
|
|
2207
2252
|
return t;
|
|
2208
2253
|
};
|
|
2209
|
-
const defaultProps$
|
|
2254
|
+
const defaultProps$M = {
|
|
2210
2255
|
isSelectable: false,
|
|
2211
2256
|
};
|
|
2212
2257
|
const CardBody = (props) => {
|
|
2213
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2214
|
-
const { children, isSelectable } = propsWithDefaults, restProps = __rest$
|
|
2258
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$M), props);
|
|
2259
|
+
const { children, isSelectable } = propsWithDefaults, restProps = __rest$2p(propsWithDefaults, ["children", "isSelectable"]);
|
|
2215
2260
|
const { classProps } = useCardStyleProps({ isSelectable });
|
|
2216
2261
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
2217
2262
|
return (React.createElement("div", Object.assign({}, otherProps, { className: classNames(classProps.body, styleProps.className), style: styleProps.style }), children));
|
|
2218
2263
|
};
|
|
2219
2264
|
CardBody.spiritComponent = 'CardBody';
|
|
2220
2265
|
|
|
2221
|
-
var __rest$
|
|
2266
|
+
var __rest$2o = (undefined && undefined.__rest) || function (s, e) {
|
|
2222
2267
|
var t = {};
|
|
2223
2268
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2224
2269
|
t[p] = s[p];
|
|
@@ -2230,14 +2275,14 @@ var __rest$2n = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2230
2275
|
return t;
|
|
2231
2276
|
};
|
|
2232
2277
|
const CardEyebrow = (props) => {
|
|
2233
|
-
const { children } = props, restProps = __rest$
|
|
2278
|
+
const { children } = props, restProps = __rest$2o(props, ["children"]);
|
|
2234
2279
|
const { classProps } = useCardStyleProps();
|
|
2235
2280
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
2236
2281
|
return (React.createElement("div", Object.assign({}, otherProps, { className: classNames(classProps.eyebrow, styleProps.className), style: styleProps.style }), children));
|
|
2237
2282
|
};
|
|
2238
2283
|
CardEyebrow.spiritComponent = 'CardEyebrow';
|
|
2239
2284
|
|
|
2240
|
-
var __rest$
|
|
2285
|
+
var __rest$2n = (undefined && undefined.__rest) || function (s, e) {
|
|
2241
2286
|
var t = {};
|
|
2242
2287
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2243
2288
|
t[p] = s[p];
|
|
@@ -2248,19 +2293,19 @@ var __rest$2m = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2248
2293
|
}
|
|
2249
2294
|
return t;
|
|
2250
2295
|
};
|
|
2251
|
-
const defaultProps$
|
|
2296
|
+
const defaultProps$L = {
|
|
2252
2297
|
alignmentX: AlignmentX.LEFT,
|
|
2253
2298
|
};
|
|
2254
2299
|
const CardFooter = (props) => {
|
|
2255
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2256
|
-
const { children, alignmentX } = propsWithDefaults, restProps = __rest$
|
|
2300
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$L), props);
|
|
2301
|
+
const { children, alignmentX } = propsWithDefaults, restProps = __rest$2n(propsWithDefaults, ["children", "alignmentX"]);
|
|
2257
2302
|
const { classProps } = useCardStyleProps({ footerAlignmentX: alignmentX });
|
|
2258
2303
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
2259
2304
|
return (React.createElement("footer", Object.assign({}, otherProps, { className: classNames(classProps.footer, styleProps.className), style: styleProps.style }), children));
|
|
2260
2305
|
};
|
|
2261
2306
|
CardFooter.spiritComponent = 'CardFooter';
|
|
2262
2307
|
|
|
2263
|
-
var __rest$
|
|
2308
|
+
var __rest$2m = (undefined && undefined.__rest) || function (s, e) {
|
|
2264
2309
|
var t = {};
|
|
2265
2310
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2266
2311
|
t[p] = s[p];
|
|
@@ -2271,12 +2316,12 @@ var __rest$2l = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2271
2316
|
}
|
|
2272
2317
|
return t;
|
|
2273
2318
|
};
|
|
2274
|
-
const defaultProps$
|
|
2319
|
+
const defaultProps$K = {
|
|
2275
2320
|
elementType: 'a',
|
|
2276
2321
|
};
|
|
2277
2322
|
const _CardLink = (props, ref) => {
|
|
2278
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2279
|
-
const { elementType: ElementTag = defaultProps$
|
|
2323
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$K), props);
|
|
2324
|
+
const { elementType: ElementTag = defaultProps$K.elementType, children, href } = propsWithDefaults, restProps = __rest$2m(propsWithDefaults, ["elementType", "children", "href"]);
|
|
2280
2325
|
const { classProps } = useCardStyleProps();
|
|
2281
2326
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
2282
2327
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps: classProps.link, styleProps, otherProps });
|
|
@@ -2285,7 +2330,7 @@ const _CardLink = (props, ref) => {
|
|
|
2285
2330
|
const CardLink = React.forwardRef(_CardLink);
|
|
2286
2331
|
CardLink.spiritComponent = 'CardLink';
|
|
2287
2332
|
|
|
2288
|
-
var __rest$
|
|
2333
|
+
var __rest$2l = (undefined && undefined.__rest) || function (s, e) {
|
|
2289
2334
|
var t = {};
|
|
2290
2335
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2291
2336
|
t[p] = s[p];
|
|
@@ -2297,7 +2342,7 @@ var __rest$2k = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2297
2342
|
return t;
|
|
2298
2343
|
};
|
|
2299
2344
|
const CardLogo = (props) => {
|
|
2300
|
-
const { children } = props, restProps = __rest$
|
|
2345
|
+
const { children } = props, restProps = __rest$2l(props, ["children"]);
|
|
2301
2346
|
const { classProps } = useCardStyleProps();
|
|
2302
2347
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
2303
2348
|
return (React.createElement("div", Object.assign({}, otherProps, { className: classNames(classProps.logo, styleProps.className), style: Object.assign({}, styleProps.style) }), children));
|
|
@@ -2317,7 +2362,7 @@ const useCardMediaStyleProps = (props) => {
|
|
|
2317
2362
|
};
|
|
2318
2363
|
};
|
|
2319
2364
|
|
|
2320
|
-
var __rest$
|
|
2365
|
+
var __rest$2k = (undefined && undefined.__rest) || function (s, e) {
|
|
2321
2366
|
var t = {};
|
|
2322
2367
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2323
2368
|
t[p] = s[p];
|
|
@@ -2328,15 +2373,15 @@ var __rest$2j = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2328
2373
|
}
|
|
2329
2374
|
return t;
|
|
2330
2375
|
};
|
|
2331
|
-
const defaultProps$
|
|
2376
|
+
const defaultProps$J = {
|
|
2332
2377
|
fit: ObjectFit.COVER,
|
|
2333
2378
|
hasFilledHeight: false,
|
|
2334
2379
|
isExpanded: false,
|
|
2335
2380
|
size: CardSizes.AUTO,
|
|
2336
2381
|
};
|
|
2337
2382
|
const CardMedia = (props) => {
|
|
2338
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2339
|
-
const { backgroundColor, children, fit, hasFilledHeight, isExpanded, size } = propsWithDefaults, restProps = __rest$
|
|
2383
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$J), props);
|
|
2384
|
+
const { backgroundColor, children, fit, hasFilledHeight, isExpanded, size } = propsWithDefaults, restProps = __rest$2k(propsWithDefaults, ["backgroundColor", "children", "fit", "hasFilledHeight", "isExpanded", "size"]);
|
|
2340
2385
|
const { classProps } = useCardStyleProps({ size, isExpanded, hasFilledHeight });
|
|
2341
2386
|
const { classProps: cardMediaClassProps, styleProps: cardMediaStyleProps } = useCardMediaStyleProps({
|
|
2342
2387
|
backgroundColor,
|
|
@@ -2352,7 +2397,7 @@ const CardMedia = (props) => {
|
|
|
2352
2397
|
};
|
|
2353
2398
|
CardMedia.spiritComponent = 'CardMedia';
|
|
2354
2399
|
|
|
2355
|
-
var __rest$
|
|
2400
|
+
var __rest$2j = (undefined && undefined.__rest) || function (s, e) {
|
|
2356
2401
|
var t = {};
|
|
2357
2402
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2358
2403
|
t[p] = s[p];
|
|
@@ -2363,13 +2408,13 @@ var __rest$2i = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2363
2408
|
}
|
|
2364
2409
|
return t;
|
|
2365
2410
|
};
|
|
2366
|
-
const defaultProps$
|
|
2411
|
+
const defaultProps$I = {
|
|
2367
2412
|
elementType: 'h4',
|
|
2368
2413
|
isHeading: true,
|
|
2369
2414
|
};
|
|
2370
2415
|
const CardTitle = (props) => {
|
|
2371
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2372
|
-
const { elementType: ElementTag = 'h4', children, isHeading } = propsWithDefaults, restProps = __rest$
|
|
2416
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$I), props);
|
|
2417
|
+
const { elementType: ElementTag = 'h4', children, isHeading } = propsWithDefaults, restProps = __rest$2j(propsWithDefaults, ["elementType", "children", "isHeading"]);
|
|
2373
2418
|
const { classProps } = useCardStyleProps({ isHeading });
|
|
2374
2419
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
2375
2420
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps: classProps.title, styleProps, otherProps });
|
|
@@ -2377,7 +2422,7 @@ const CardTitle = (props) => {
|
|
|
2377
2422
|
};
|
|
2378
2423
|
CardTitle.spiritComponent = 'CardTitle';
|
|
2379
2424
|
|
|
2380
|
-
var __rest$
|
|
2425
|
+
var __rest$2i = (undefined && undefined.__rest) || function (s, e) {
|
|
2381
2426
|
var t = {};
|
|
2382
2427
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2383
2428
|
t[p] = s[p];
|
|
@@ -2388,14 +2433,14 @@ var __rest$2h = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2388
2433
|
}
|
|
2389
2434
|
return t;
|
|
2390
2435
|
};
|
|
2391
|
-
const defaultProps$
|
|
2436
|
+
const defaultProps$H = {
|
|
2392
2437
|
elementType: 'div',
|
|
2393
2438
|
id: undefined,
|
|
2394
2439
|
registerAria: undefined,
|
|
2395
2440
|
};
|
|
2396
2441
|
const HelperText = (props) => {
|
|
2397
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2398
|
-
const { helperText, elementType: ElementTag = defaultProps$
|
|
2442
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$H), props);
|
|
2443
|
+
const { helperText, elementType: ElementTag = defaultProps$H.elementType, id, registerAria } = propsWithDefaults, restProps = __rest$2i(propsWithDefaults, ["helperText", "elementType", "id", "registerAria"]);
|
|
2399
2444
|
const { styleProps, props: transferProps } = useStyleProps(restProps);
|
|
2400
2445
|
const mergedStyleProps = mergeStyleProps(ElementTag, { styleProps, transferProps });
|
|
2401
2446
|
React.useEffect(() => {
|
|
@@ -2411,7 +2456,7 @@ const HelperText = (props) => {
|
|
|
2411
2456
|
};
|
|
2412
2457
|
HelperText.spiritComponent = 'HelperText';
|
|
2413
2458
|
|
|
2414
|
-
var __rest$
|
|
2459
|
+
var __rest$2h = (undefined && undefined.__rest) || function (s, e) {
|
|
2415
2460
|
var t = {};
|
|
2416
2461
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2417
2462
|
t[p] = s[p];
|
|
@@ -2423,7 +2468,7 @@ var __rest$2g = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2423
2468
|
return t;
|
|
2424
2469
|
};
|
|
2425
2470
|
const Label = (props) => {
|
|
2426
|
-
const { elementType: ElementTag = 'label', children, htmlFor, for: labelFor } = props, restProps = __rest$
|
|
2471
|
+
const { elementType: ElementTag = 'label', children, htmlFor, for: labelFor } = props, restProps = __rest$2h(props, ["elementType", "children", "htmlFor", "for"]);
|
|
2427
2472
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
2428
2473
|
const mergedStyleProps = mergeStyleProps(ElementTag, { styleProps, otherProps });
|
|
2429
2474
|
return (React.createElement(ElementTag, Object.assign({}, otherProps, mergedStyleProps, { htmlFor: ElementTag === 'label' ? labelFor || htmlFor : undefined }), children));
|
|
@@ -2456,7 +2501,7 @@ function useValidationIcon({ hasValidationStateIcon }) {
|
|
|
2456
2501
|
return iconNameValue;
|
|
2457
2502
|
}
|
|
2458
2503
|
|
|
2459
|
-
var __rest$
|
|
2504
|
+
var __rest$2g = (undefined && undefined.__rest) || function (s, e) {
|
|
2460
2505
|
var t = {};
|
|
2461
2506
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2462
2507
|
t[p] = s[p];
|
|
@@ -2467,15 +2512,15 @@ var __rest$2f = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2467
2512
|
}
|
|
2468
2513
|
return t;
|
|
2469
2514
|
};
|
|
2470
|
-
const defaultProps$
|
|
2515
|
+
const defaultProps$G = {
|
|
2471
2516
|
elementType: 'div',
|
|
2472
2517
|
id: undefined,
|
|
2473
2518
|
registerAria: undefined,
|
|
2474
2519
|
role: undefined,
|
|
2475
2520
|
};
|
|
2476
2521
|
const ValidationText = (props) => {
|
|
2477
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2478
|
-
const { elementType: ElementTag = defaultProps$
|
|
2522
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$G), props);
|
|
2523
|
+
const { elementType: ElementTag = defaultProps$G.elementType, id, hasValidationStateIcon, registerAria, role, validationText } = propsWithDefaults, restProps = __rest$2g(propsWithDefaults, ["elementType", "id", "hasValidationStateIcon", "registerAria", "role", "validationText"]);
|
|
2479
2524
|
const validationIconName = useValidationIcon({ hasValidationStateIcon });
|
|
2480
2525
|
const { styleProps, props: transferProps } = useStyleProps(restProps);
|
|
2481
2526
|
const mergedStyleProps = mergeStyleProps(ElementTag, { styleProps, transferProps });
|
|
@@ -2511,7 +2556,7 @@ const useValidationTextRole = ({ validationState, validationText, }) => {
|
|
|
2511
2556
|
return role;
|
|
2512
2557
|
};
|
|
2513
2558
|
|
|
2514
|
-
var __rest$
|
|
2559
|
+
var __rest$2f = (undefined && undefined.__rest) || function (s, e) {
|
|
2515
2560
|
var t = {};
|
|
2516
2561
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2517
2562
|
t[p] = s[p];
|
|
@@ -2523,12 +2568,13 @@ var __rest$2e = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2523
2568
|
return t;
|
|
2524
2569
|
};
|
|
2525
2570
|
function useCheckboxStyleProps(props) {
|
|
2526
|
-
const {
|
|
2571
|
+
const { inputPosition = InputPositions.START, isItem, isLabelHidden, validationState } = props, restProps = __rest$2f(props, ["inputPosition", "isItem", "isLabelHidden", "validationState"]);
|
|
2527
2572
|
const { isDisabled, isRequired } = restProps;
|
|
2528
2573
|
const checkboxClass = useClassNamePrefix('Checkbox');
|
|
2529
2574
|
const checkboxDisabledClass = `${checkboxClass}--disabled`;
|
|
2530
2575
|
const checkboxItemClass = `${checkboxClass}--item`;
|
|
2531
2576
|
const checkboxInputClass = `${checkboxClass}__input`;
|
|
2577
|
+
const checkboxInputPositionClass = useInputPositionClass(checkboxClass, inputPosition);
|
|
2532
2578
|
const checkboxTextClass = `${checkboxClass}__text`;
|
|
2533
2579
|
const checkboxLabelClass = `${checkboxClass}__label`;
|
|
2534
2580
|
const checkboxLabelRequiredClass = `${checkboxClass}__label--required`;
|
|
@@ -2537,6 +2583,7 @@ function useCheckboxStyleProps(props) {
|
|
|
2537
2583
|
const checkboxValidationTextClass = `${checkboxClass}__validationText`;
|
|
2538
2584
|
const checkboxValidationClass = `${checkboxClass}--${validationState}`;
|
|
2539
2585
|
const rootStyles = classNames(checkboxClass, {
|
|
2586
|
+
[checkboxInputPositionClass]: checkboxInputPositionClass,
|
|
2540
2587
|
[checkboxDisabledClass]: isDisabled,
|
|
2541
2588
|
[checkboxItemClass]: isItem,
|
|
2542
2589
|
[checkboxValidationClass]: validationState,
|
|
@@ -2558,7 +2605,7 @@ function useCheckboxStyleProps(props) {
|
|
|
2558
2605
|
};
|
|
2559
2606
|
}
|
|
2560
2607
|
|
|
2561
|
-
var __rest$
|
|
2608
|
+
var __rest$2e = (undefined && undefined.__rest) || function (s, e) {
|
|
2562
2609
|
var t = {};
|
|
2563
2610
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2564
2611
|
t[p] = s[p];
|
|
@@ -2571,7 +2618,7 @@ var __rest$2d = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2571
2618
|
};
|
|
2572
2619
|
const _Checkbox = (props, ref) => {
|
|
2573
2620
|
const { classProps, props: modifiedProps } = useCheckboxStyleProps(props);
|
|
2574
|
-
const { 'aria-describedby': ariaDescribedBy = '', hasValidationIcon, helperText, id, isChecked, isDisabled, isRequired, label, validationState, validationText, value } = modifiedProps, restProps = __rest$
|
|
2621
|
+
const { 'aria-describedby': ariaDescribedBy = '', hasValidationIcon, helperText, id, isChecked, isDisabled, isRequired, label, validationState, validationText, value } = modifiedProps, restProps = __rest$2e(modifiedProps, ['aria-describedby', "hasValidationIcon", "helperText", "id", "isChecked", "isDisabled", "isRequired", "label", "validationState", "validationText", "value"]);
|
|
2575
2622
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
2576
2623
|
const [ids, register] = useAriaIds(ariaDescribedBy);
|
|
2577
2624
|
const ariaDescribedByProp = useAriaDescribedBy(ids);
|
|
@@ -2589,7 +2636,7 @@ const _Checkbox = (props, ref) => {
|
|
|
2589
2636
|
const Checkbox = React.forwardRef(_Checkbox);
|
|
2590
2637
|
Checkbox.spiritComponent = 'Checkbox';
|
|
2591
2638
|
|
|
2592
|
-
var __rest$
|
|
2639
|
+
var __rest$2d = (undefined && undefined.__rest) || function (s, e) {
|
|
2593
2640
|
var t = {};
|
|
2594
2641
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2595
2642
|
t[p] = s[p];
|
|
@@ -2601,7 +2648,7 @@ var __rest$2c = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2601
2648
|
return t;
|
|
2602
2649
|
};
|
|
2603
2650
|
function useContainerStyleProps(props) {
|
|
2604
|
-
const { isFluid, size } = props, modifiedProps = __rest$
|
|
2651
|
+
const { isFluid, size } = props, modifiedProps = __rest$2d(props, ["isFluid", "size"]);
|
|
2605
2652
|
const containerClass = useClassNamePrefix('Container');
|
|
2606
2653
|
const containerFluidClass = `${containerClass}--fluid`;
|
|
2607
2654
|
const containerSizeClass = `${containerClass}--${size}`;
|
|
@@ -2615,7 +2662,7 @@ function useContainerStyleProps(props) {
|
|
|
2615
2662
|
};
|
|
2616
2663
|
}
|
|
2617
2664
|
|
|
2618
|
-
var __rest$
|
|
2665
|
+
var __rest$2c = (undefined && undefined.__rest) || function (s, e) {
|
|
2619
2666
|
var t = {};
|
|
2620
2667
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2621
2668
|
t[p] = s[p];
|
|
@@ -2626,13 +2673,13 @@ var __rest$2b = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2626
2673
|
}
|
|
2627
2674
|
return t;
|
|
2628
2675
|
};
|
|
2629
|
-
const defaultProps$
|
|
2676
|
+
const defaultProps$F = {
|
|
2630
2677
|
isFluid: false,
|
|
2631
2678
|
size: SizesExtended.XLARGE,
|
|
2632
2679
|
};
|
|
2633
2680
|
const Container = (props) => {
|
|
2634
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2635
|
-
const { children } = propsWithDefaults, restProps = __rest$
|
|
2681
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$F), props);
|
|
2682
|
+
const { children } = propsWithDefaults, restProps = __rest$2c(propsWithDefaults, ["children"]);
|
|
2636
2683
|
const { classProps, props: modifiedProps } = useContainerStyleProps(restProps);
|
|
2637
2684
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps, {
|
|
2638
2685
|
textAlignment: TextStyleProps.textAlignment,
|
|
@@ -2653,7 +2700,7 @@ const useControlButtonProps = (props) => {
|
|
|
2653
2700
|
};
|
|
2654
2701
|
};
|
|
2655
2702
|
|
|
2656
|
-
var __rest$
|
|
2703
|
+
var __rest$2b = (undefined && undefined.__rest) || function (s, e) {
|
|
2657
2704
|
var t = {};
|
|
2658
2705
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2659
2706
|
t[p] = s[p];
|
|
@@ -2666,27 +2713,26 @@ var __rest$2a = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2666
2713
|
};
|
|
2667
2714
|
const getControlButtonSizeClassname = (className, size) => compose(applySize(size))(className);
|
|
2668
2715
|
function useControlButtonStyleProps(props) {
|
|
2669
|
-
const { isDisabled, isSubtle, isSymmetrical, size } = props, restProps = __rest$
|
|
2716
|
+
const { isDisabled, isSubtle, isSymmetrical, size } = props, restProps = __rest$2b(props, ["isDisabled", "isSubtle", "isSymmetrical", "size"]);
|
|
2670
2717
|
const controlButtonClass = useClassNamePrefix('ControlButton');
|
|
2671
2718
|
const controlButtonBackgroundClass = `${controlButtonClass}--hasBackground`;
|
|
2672
2719
|
const controlButtonDisabledClass = `${controlButtonClass}--disabled`;
|
|
2673
|
-
const controlButtonSymmetricalClass = `${controlButtonClass}--symmetrical`;
|
|
2674
2720
|
const dynamicColorBackgroundInteractiveClass = useClassNamePrefix('dynamic-color-background-interactive');
|
|
2675
2721
|
const dynamicColorBorderClass = useClassNamePrefix('dynamic-color-border');
|
|
2676
2722
|
const accessibilityTapTargetClass = useClassNamePrefix('accessibility-tap-target');
|
|
2723
|
+
const { symmetricalClassName } = useSymmetry(controlButtonClass, isSymmetrical);
|
|
2677
2724
|
const classProps = classNames(controlButtonClass, getControlButtonSizeClassname(controlButtonClass, size), dynamicColorBackgroundInteractiveClass, accessibilityTapTargetClass, {
|
|
2678
2725
|
[controlButtonDisabledClass]: isDisabled,
|
|
2679
|
-
[controlButtonSymmetricalClass]: isSymmetrical,
|
|
2680
2726
|
[controlButtonBackgroundClass]: !isSubtle,
|
|
2681
2727
|
[dynamicColorBorderClass]: !isSubtle,
|
|
2682
|
-
});
|
|
2728
|
+
}, symmetricalClassName);
|
|
2683
2729
|
return {
|
|
2684
2730
|
classProps,
|
|
2685
2731
|
props: restProps,
|
|
2686
2732
|
};
|
|
2687
2733
|
}
|
|
2688
2734
|
|
|
2689
|
-
var __rest$
|
|
2735
|
+
var __rest$2a = (undefined && undefined.__rest) || function (s, e) {
|
|
2690
2736
|
var t = {};
|
|
2691
2737
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2692
2738
|
t[p] = s[p];
|
|
@@ -2697,7 +2743,7 @@ var __rest$29 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2697
2743
|
}
|
|
2698
2744
|
return t;
|
|
2699
2745
|
};
|
|
2700
|
-
const defaultProps$
|
|
2746
|
+
const defaultProps$E = {
|
|
2701
2747
|
elementType: 'button',
|
|
2702
2748
|
isDisabled: false,
|
|
2703
2749
|
isSubtle: false,
|
|
@@ -2706,8 +2752,8 @@ const defaultProps$D = {
|
|
|
2706
2752
|
type: 'button',
|
|
2707
2753
|
};
|
|
2708
2754
|
const _ControlButton = (props, ref) => {
|
|
2709
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2710
|
-
const { elementType: ElementTag = defaultProps$
|
|
2755
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$E), props);
|
|
2756
|
+
const { elementType: ElementTag = defaultProps$E.elementType, children } = propsWithDefaults, restProps = __rest$2a(propsWithDefaults, ["elementType", "children"]);
|
|
2711
2757
|
const { controlButtonProps } = useControlButtonProps(restProps);
|
|
2712
2758
|
const { classProps, props: modifiedProps } = useControlButtonStyleProps(restProps);
|
|
2713
2759
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
@@ -2767,7 +2813,7 @@ const useDialog = (ref, isOpen) => {
|
|
|
2767
2813
|
};
|
|
2768
2814
|
};
|
|
2769
2815
|
|
|
2770
|
-
var __rest$
|
|
2816
|
+
var __rest$29 = (undefined && undefined.__rest) || function (s, e) {
|
|
2771
2817
|
var t = {};
|
|
2772
2818
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2773
2819
|
t[p] = s[p];
|
|
@@ -2779,7 +2825,7 @@ var __rest$28 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2779
2825
|
return t;
|
|
2780
2826
|
};
|
|
2781
2827
|
const Dialog = (props, ref) => {
|
|
2782
|
-
const { children, isOpen, onClose, closeOnBackdropClick = true, closeOnEscapeKeyDown } = props, restProps = __rest$
|
|
2828
|
+
const { children, isOpen, onClose, closeOnBackdropClick = true, closeOnEscapeKeyDown } = props, restProps = __rest$29(props, ["children", "isOpen", "onClose", "closeOnBackdropClick", "closeOnEscapeKeyDown"]);
|
|
2783
2829
|
const dialogElementRef = React.useRef(ref);
|
|
2784
2830
|
const contentElementRef = React.useRef(null);
|
|
2785
2831
|
const { closeDialog, onTransitionEnd } = useDialog(dialogElementRef, isOpen);
|
|
@@ -2855,7 +2901,7 @@ const useDrawerStyleProps = (props = {}) => {
|
|
|
2855
2901
|
};
|
|
2856
2902
|
};
|
|
2857
2903
|
|
|
2858
|
-
var __rest$
|
|
2904
|
+
var __rest$28 = (undefined && undefined.__rest) || function (s, e) {
|
|
2859
2905
|
var t = {};
|
|
2860
2906
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2861
2907
|
t[p] = s[p];
|
|
@@ -2867,7 +2913,7 @@ var __rest$27 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2867
2913
|
return t;
|
|
2868
2914
|
};
|
|
2869
2915
|
const Drawer = (props) => {
|
|
2870
|
-
const { children, alignmentX = DRAWER_ALIGNMENT_DEFAULT, isOpen, onClose, id } = props, restProps = __rest$
|
|
2916
|
+
const { children, alignmentX = DRAWER_ALIGNMENT_DEFAULT, isOpen, onClose, id } = props, restProps = __rest$28(props, ["children", "alignmentX", "isOpen", "onClose", "id"]);
|
|
2871
2917
|
const { classProps } = useDrawerStyleProps({ drawerAlignmentX: alignmentX });
|
|
2872
2918
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
2873
2919
|
const contextValue = {
|
|
@@ -2881,7 +2927,7 @@ const Drawer = (props) => {
|
|
|
2881
2927
|
};
|
|
2882
2928
|
Drawer.spiritComponent = 'Drawer';
|
|
2883
2929
|
|
|
2884
|
-
var __rest$
|
|
2930
|
+
var __rest$27 = (undefined && undefined.__rest) || function (s, e) {
|
|
2885
2931
|
var t = {};
|
|
2886
2932
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2887
2933
|
t[p] = s[p];
|
|
@@ -2893,7 +2939,7 @@ var __rest$26 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2893
2939
|
return t;
|
|
2894
2940
|
};
|
|
2895
2941
|
function useVisuallyHiddenProps(props) {
|
|
2896
|
-
const restProps = __rest$
|
|
2942
|
+
const restProps = __rest$27(props, []);
|
|
2897
2943
|
const visuallyHiddenClass = useClassNamePrefix('accessibility-hidden');
|
|
2898
2944
|
return {
|
|
2899
2945
|
classProps: visuallyHiddenClass,
|
|
@@ -2901,7 +2947,7 @@ function useVisuallyHiddenProps(props) {
|
|
|
2901
2947
|
};
|
|
2902
2948
|
}
|
|
2903
2949
|
|
|
2904
|
-
var __rest$
|
|
2950
|
+
var __rest$26 = (undefined && undefined.__rest) || function (s, e) {
|
|
2905
2951
|
var t = {};
|
|
2906
2952
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2907
2953
|
t[p] = s[p];
|
|
@@ -2913,7 +2959,7 @@ var __rest$25 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2913
2959
|
return t;
|
|
2914
2960
|
};
|
|
2915
2961
|
const VisuallyHidden = (props) => {
|
|
2916
|
-
const { children, elementType: ElementTag = 'span' } = props, rest = __rest$
|
|
2962
|
+
const { children, elementType: ElementTag = 'span' } = props, rest = __rest$26(props, ["children", "elementType"]);
|
|
2917
2963
|
const { classProps, props: modifiedProps } = useVisuallyHiddenProps(rest);
|
|
2918
2964
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
2919
2965
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps, styleProps, otherProps });
|
|
@@ -2921,7 +2967,7 @@ const VisuallyHidden = (props) => {
|
|
|
2921
2967
|
};
|
|
2922
2968
|
VisuallyHidden.spiritComponent = 'VisuallyHidden';
|
|
2923
2969
|
|
|
2924
|
-
var __rest$
|
|
2970
|
+
var __rest$25 = (undefined && undefined.__rest) || function (s, e) {
|
|
2925
2971
|
var t = {};
|
|
2926
2972
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2927
2973
|
t[p] = s[p];
|
|
@@ -2932,15 +2978,15 @@ var __rest$24 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2932
2978
|
}
|
|
2933
2979
|
return t;
|
|
2934
2980
|
};
|
|
2935
|
-
const defaultProps$
|
|
2981
|
+
const defaultProps$D = {
|
|
2936
2982
|
color: ComponentButtonColors.TERTIARY,
|
|
2937
2983
|
iconBoxSize: DEFAULT_BOX_SIZE,
|
|
2938
2984
|
label: DRAWER_CLOSE_BUTTON_LABEL_DEFAULT,
|
|
2939
2985
|
size: Sizes.MEDIUM,
|
|
2940
2986
|
};
|
|
2941
2987
|
const DrawerCloseButton = (props) => {
|
|
2942
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2943
|
-
const { color, iconBoxSize, label, size } = propsWithDefaults, restProps = __rest$
|
|
2988
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$D), props);
|
|
2989
|
+
const { color, iconBoxSize, label, size } = propsWithDefaults, restProps = __rest$25(propsWithDefaults, ["color", "iconBoxSize", "label", "size"]);
|
|
2944
2990
|
const { id, isOpen, onClose } = useDrawerContext();
|
|
2945
2991
|
const { classProps } = useDrawerStyleProps();
|
|
2946
2992
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
@@ -2950,7 +2996,7 @@ const DrawerCloseButton = (props) => {
|
|
|
2950
2996
|
};
|
|
2951
2997
|
DrawerCloseButton.spiritComponent = 'DrawerCloseButton';
|
|
2952
2998
|
|
|
2953
|
-
var __rest$
|
|
2999
|
+
var __rest$24 = (undefined && undefined.__rest) || function (s, e) {
|
|
2954
3000
|
var t = {};
|
|
2955
3001
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2956
3002
|
t[p] = s[p];
|
|
@@ -2962,7 +3008,7 @@ var __rest$23 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2962
3008
|
return t;
|
|
2963
3009
|
};
|
|
2964
3010
|
const _DrawerPanel = (props, ref) => {
|
|
2965
|
-
const { elementType: ElementTag = 'div', children } = props, restProps = __rest$
|
|
3011
|
+
const { elementType: ElementTag = 'div', children } = props, restProps = __rest$24(props, ["elementType", "children"]);
|
|
2966
3012
|
const { classProps } = useDrawerStyleProps(restProps);
|
|
2967
3013
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
2968
3014
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps: classProps.panel, styleProps, otherProps });
|
|
@@ -3014,7 +3060,7 @@ const DropdownProvider = DropdownContext.Provider;
|
|
|
3014
3060
|
DropdownContext.Consumer;
|
|
3015
3061
|
const useDropdownContext = () => React.useContext(DropdownContext);
|
|
3016
3062
|
|
|
3017
|
-
var __rest$
|
|
3063
|
+
var __rest$23 = (undefined && undefined.__rest) || function (s, e) {
|
|
3018
3064
|
var t = {};
|
|
3019
3065
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3020
3066
|
t[p] = s[p];
|
|
@@ -3026,7 +3072,7 @@ var __rest$22 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3026
3072
|
return t;
|
|
3027
3073
|
};
|
|
3028
3074
|
const useDropdownStyleProps = (props = { isOpen: false }) => {
|
|
3029
|
-
const { alignmentX, alignmentY, isOpen } = props, modifiedProps = __rest$
|
|
3075
|
+
const { alignmentX, alignmentY, isOpen } = props, modifiedProps = __rest$23(props, ["alignmentX", "alignmentY", "isOpen"]);
|
|
3030
3076
|
const dropdownRootClass = useClassNamePrefix('Dropdown');
|
|
3031
3077
|
const dropdownPopoverClass = `${dropdownRootClass}Popover`;
|
|
3032
3078
|
const expandedClass = isOpen ? 'is-expanded' : '';
|
|
@@ -3047,7 +3093,7 @@ const useDropdownStyleProps = (props = { isOpen: false }) => {
|
|
|
3047
3093
|
};
|
|
3048
3094
|
};
|
|
3049
3095
|
|
|
3050
|
-
var __rest$
|
|
3096
|
+
var __rest$22 = (undefined && undefined.__rest) || function (s, e) {
|
|
3051
3097
|
var t = {};
|
|
3052
3098
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3053
3099
|
t[p] = s[p];
|
|
@@ -3059,7 +3105,7 @@ var __rest$21 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3059
3105
|
return t;
|
|
3060
3106
|
};
|
|
3061
3107
|
const Dropdown = (props) => {
|
|
3062
|
-
const { children, enableAutoClose = true, fullWidthMode, id, isOpen = false, onAutoClose, onToggle, placement } = props, rest = __rest$
|
|
3108
|
+
const { children, enableAutoClose = true, fullWidthMode, id, isOpen = false, onAutoClose, onToggle, placement } = props, rest = __rest$22(props, ["children", "enableAutoClose", "fullWidthMode", "id", "isOpen", "onAutoClose", "onToggle", "placement"]);
|
|
3063
3109
|
const { classProps, props: modifiedProps } = useDropdownStyleProps(Object.assign({ isOpen }, rest));
|
|
3064
3110
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
3065
3111
|
const dropdownRef = React.useRef(null);
|
|
@@ -3082,7 +3128,7 @@ const Dropdown = (props) => {
|
|
|
3082
3128
|
};
|
|
3083
3129
|
Dropdown.spiritComponent = 'Dropdown';
|
|
3084
3130
|
|
|
3085
|
-
var __rest$
|
|
3131
|
+
var __rest$21 = (undefined && undefined.__rest) || function (s, e) {
|
|
3086
3132
|
var t = {};
|
|
3087
3133
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3088
3134
|
t[p] = s[p];
|
|
@@ -3093,12 +3139,12 @@ var __rest$20 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3093
3139
|
}
|
|
3094
3140
|
return t;
|
|
3095
3141
|
};
|
|
3096
|
-
const defaultProps$
|
|
3142
|
+
const defaultProps$C = {
|
|
3097
3143
|
elementType: 'button',
|
|
3098
3144
|
};
|
|
3099
3145
|
const DropdownTrigger = (props) => {
|
|
3100
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
3101
|
-
const { elementType: ElementTag = 'button', children } = propsWithDefaults, rest = __rest$
|
|
3146
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$C), props);
|
|
3147
|
+
const { elementType: ElementTag = 'button', children } = propsWithDefaults, rest = __rest$21(propsWithDefaults, ["elementType", "children"]);
|
|
3102
3148
|
const { id, isOpen, onToggle, fullWidthMode, triggerRef } = useDropdownContext();
|
|
3103
3149
|
const { classProps, props: modifiedProps } = useDropdownStyleProps(Object.assign({ isOpen }, rest));
|
|
3104
3150
|
const { styleProps: triggerStyleProps, props: transferProps } = useStyleProps(modifiedProps);
|
|
@@ -3108,7 +3154,7 @@ const DropdownTrigger = (props) => {
|
|
|
3108
3154
|
};
|
|
3109
3155
|
DropdownTrigger.spiritComponent = 'DropdownTrigger';
|
|
3110
3156
|
|
|
3111
|
-
var __rest$
|
|
3157
|
+
var __rest$20 = (undefined && undefined.__rest) || function (s, e) {
|
|
3112
3158
|
var t = {};
|
|
3113
3159
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3114
3160
|
t[p] = s[p];
|
|
@@ -3120,7 +3166,7 @@ var __rest$1$ = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3120
3166
|
return t;
|
|
3121
3167
|
};
|
|
3122
3168
|
const DropdownPopover = (props) => {
|
|
3123
|
-
const { children } = props, rest = __rest$
|
|
3169
|
+
const { children } = props, rest = __rest$20(props, ["children"]);
|
|
3124
3170
|
const { id, isOpen, onToggle, fullWidthMode, placement } = useDropdownContext();
|
|
3125
3171
|
const { classProps, props: modifiedProps } = useDropdownStyleProps(Object.assign({ isOpen }, rest));
|
|
3126
3172
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
@@ -3155,7 +3201,7 @@ const useDropdown = ({ dropdownRef, triggerRef, enableAutoClose, onAutoClose, })
|
|
|
3155
3201
|
};
|
|
3156
3202
|
};
|
|
3157
3203
|
|
|
3158
|
-
var __rest$
|
|
3204
|
+
var __rest$1$ = (undefined && undefined.__rest) || function (s, e) {
|
|
3159
3205
|
var t = {};
|
|
3160
3206
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3161
3207
|
t[p] = s[p];
|
|
@@ -3167,7 +3213,7 @@ var __rest$1_ = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3167
3213
|
return t;
|
|
3168
3214
|
};
|
|
3169
3215
|
const UncontrolledDropdown = (props) => {
|
|
3170
|
-
const { children, enableAutoClose = true, fullWidthMode, id, onAutoClose, placement } = props, rest = __rest$
|
|
3216
|
+
const { children, enableAutoClose = true, fullWidthMode, id, onAutoClose, placement } = props, rest = __rest$1$(props, ["children", "enableAutoClose", "fullWidthMode", "id", "onAutoClose", "placement"]);
|
|
3171
3217
|
const { classProps, props: modifiedProps } = useDropdownStyleProps(rest);
|
|
3172
3218
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
3173
3219
|
const dropdownRef = React.useRef(null);
|
|
@@ -3178,7 +3224,7 @@ const UncontrolledDropdown = (props) => {
|
|
|
3178
3224
|
};
|
|
3179
3225
|
UncontrolledDropdown.spiritComponent = 'UncontrolledDropdown';
|
|
3180
3226
|
|
|
3181
|
-
var __rest$
|
|
3227
|
+
var __rest$1_ = (undefined && undefined.__rest) || function (s, e) {
|
|
3182
3228
|
var t = {};
|
|
3183
3229
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3184
3230
|
t[p] = s[p];
|
|
@@ -3190,7 +3236,7 @@ var __rest$1Z = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3190
3236
|
return t;
|
|
3191
3237
|
};
|
|
3192
3238
|
function useStackStyleProps(props) {
|
|
3193
|
-
const { hasEndDivider, hasIntermediateDividers, hasSpacing, hasStartDivider, spacing } = props, restProps = __rest$
|
|
3239
|
+
const { hasEndDivider, hasIntermediateDividers, hasSpacing, hasStartDivider, spacing } = props, restProps = __rest$1_(props, ["hasEndDivider", "hasIntermediateDividers", "hasSpacing", "hasStartDivider", "spacing"]);
|
|
3194
3240
|
const StackClass = useClassNamePrefix('Stack');
|
|
3195
3241
|
const StackBottomDividerClass = `${StackClass}--hasEndDivider`;
|
|
3196
3242
|
const StackMiddleDividersClass = `${StackClass}--hasIntermediateDividers`;
|
|
@@ -3214,7 +3260,7 @@ function useStackStyleProps(props) {
|
|
|
3214
3260
|
};
|
|
3215
3261
|
}
|
|
3216
3262
|
|
|
3217
|
-
var __rest$
|
|
3263
|
+
var __rest$1Z = (undefined && undefined.__rest) || function (s, e) {
|
|
3218
3264
|
var t = {};
|
|
3219
3265
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3220
3266
|
t[p] = s[p];
|
|
@@ -3225,7 +3271,7 @@ var __rest$1Y = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3225
3271
|
}
|
|
3226
3272
|
return t;
|
|
3227
3273
|
};
|
|
3228
|
-
const defaultProps$
|
|
3274
|
+
const defaultProps$B = {
|
|
3229
3275
|
elementType: 'div',
|
|
3230
3276
|
hasSpacing: false,
|
|
3231
3277
|
hasEndDivider: false,
|
|
@@ -3233,8 +3279,8 @@ const defaultProps$A = {
|
|
|
3233
3279
|
hasStartDivider: false,
|
|
3234
3280
|
};
|
|
3235
3281
|
const Stack = (props) => {
|
|
3236
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
3237
|
-
const { elementType: ElementTag = defaultProps$
|
|
3282
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$B), props);
|
|
3283
|
+
const { elementType: ElementTag = defaultProps$B.elementType, children } = propsWithDefaults, restProps = __rest$1Z(propsWithDefaults, ["elementType", "children"]);
|
|
3238
3284
|
const { classProps, props: modifiedProps, styleProps: stackStyle } = useStackStyleProps(restProps);
|
|
3239
3285
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
3240
3286
|
const mergedStyleProps = mergeStyleProps(ElementTag, {
|
|
@@ -3247,7 +3293,7 @@ const Stack = (props) => {
|
|
|
3247
3293
|
};
|
|
3248
3294
|
Stack.spiritComponent = 'Stack';
|
|
3249
3295
|
|
|
3250
|
-
var __rest$
|
|
3296
|
+
var __rest$1Y = (undefined && undefined.__rest) || function (s, e) {
|
|
3251
3297
|
var t = {};
|
|
3252
3298
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3253
3299
|
t[p] = s[p];
|
|
@@ -3259,7 +3305,7 @@ var __rest$1X = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3259
3305
|
return t;
|
|
3260
3306
|
};
|
|
3261
3307
|
const StackItem = (props) => {
|
|
3262
|
-
const { elementType: ElementTag = 'div', children } = props, restProps = __rest$
|
|
3308
|
+
const { elementType: ElementTag = 'div', children } = props, restProps = __rest$1Y(props, ["elementType", "children"]);
|
|
3263
3309
|
const { classProps, props: modifiedProps } = useStackStyleProps(restProps);
|
|
3264
3310
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
3265
3311
|
const mergedStyleProps = mergeStyleProps(ElementTag, {
|
|
@@ -3283,7 +3329,7 @@ function useEmptyStateStyleProps(props) {
|
|
|
3283
3329
|
};
|
|
3284
3330
|
}
|
|
3285
3331
|
|
|
3286
|
-
var __rest$
|
|
3332
|
+
var __rest$1X = (undefined && undefined.__rest) || function (s, e) {
|
|
3287
3333
|
var t = {};
|
|
3288
3334
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3289
3335
|
t[p] = s[p];
|
|
@@ -3295,14 +3341,14 @@ var __rest$1W = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3295
3341
|
return t;
|
|
3296
3342
|
};
|
|
3297
3343
|
const EmptyState = (props) => {
|
|
3298
|
-
const { children } = props, restProps = __rest$
|
|
3344
|
+
const { children } = props, restProps = __rest$1X(props, ["children"]);
|
|
3299
3345
|
const { classProps, props: modifiedProps } = useEmptyStateStyleProps(restProps);
|
|
3300
3346
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
3301
3347
|
return (React.createElement(Stack, Object.assign({}, otherProps, { UNSAFE_className: classNames(classProps.root, styleProps.className), UNSAFE_style: styleProps.style }), children));
|
|
3302
3348
|
};
|
|
3303
3349
|
EmptyState.spiritComponent = 'EmptyState';
|
|
3304
3350
|
|
|
3305
|
-
var __rest$
|
|
3351
|
+
var __rest$1W = (undefined && undefined.__rest) || function (s, e) {
|
|
3306
3352
|
var t = {};
|
|
3307
3353
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3308
3354
|
t[p] = s[p];
|
|
@@ -3314,7 +3360,7 @@ var __rest$1V = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3314
3360
|
return t;
|
|
3315
3361
|
};
|
|
3316
3362
|
const EmptyStateSection = (props) => {
|
|
3317
|
-
const { children } = props, restProps = __rest$
|
|
3363
|
+
const { children } = props, restProps = __rest$1W(props, ["children"]);
|
|
3318
3364
|
const { classProps, props: modifiedProps } = useEmptyStateStyleProps(restProps);
|
|
3319
3365
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
3320
3366
|
return (React.createElement(Stack, Object.assign({}, otherProps, { UNSAFE_className: classNames(classProps.section, styleProps.className), UNSAFE_style: styleProps.style }), children));
|
|
@@ -3346,7 +3392,7 @@ const useFieldGroupStyleProps = ({ isFluid, isRequired, validationState, }) => {
|
|
|
3346
3392
|
};
|
|
3347
3393
|
};
|
|
3348
3394
|
|
|
3349
|
-
var __rest$
|
|
3395
|
+
var __rest$1V = (undefined && undefined.__rest) || function (s, e) {
|
|
3350
3396
|
var t = {};
|
|
3351
3397
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3352
3398
|
t[p] = s[p];
|
|
@@ -3358,7 +3404,7 @@ var __rest$1U = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3358
3404
|
return t;
|
|
3359
3405
|
};
|
|
3360
3406
|
const FieldGroup = (props) => {
|
|
3361
|
-
const { 'aria-describedby': ariaDescribedBy = '', children, helperText, hasValidationIcon, id, isDisabled, isFluid, isLabelHidden, isRequired, label, validationState, validationText } = props, rest = __rest$
|
|
3407
|
+
const { 'aria-describedby': ariaDescribedBy = '', children, helperText, hasValidationIcon, id, isDisabled, isFluid, isLabelHidden, isRequired, label, validationState, validationText } = props, rest = __rest$1V(props, ['aria-describedby', "children", "helperText", "hasValidationIcon", "id", "isDisabled", "isFluid", "isLabelHidden", "isRequired", "label", "validationState", "validationText"]);
|
|
3362
3408
|
const { classProps } = useFieldGroupStyleProps({ isFluid, isRequired, validationState });
|
|
3363
3409
|
const { styleProps, props: transferProps } = useStyleProps(rest);
|
|
3364
3410
|
const [ids, register] = useAriaIds(ariaDescribedBy);
|
|
@@ -3503,7 +3549,7 @@ const useFileUploaderStyleProps = (props) => {
|
|
|
3503
3549
|
};
|
|
3504
3550
|
};
|
|
3505
3551
|
|
|
3506
|
-
var __rest$
|
|
3552
|
+
var __rest$1U = (undefined && undefined.__rest) || function (s, e) {
|
|
3507
3553
|
var t = {};
|
|
3508
3554
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3509
3555
|
t[p] = s[p];
|
|
@@ -3515,7 +3561,7 @@ var __rest$1T = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3515
3561
|
return t;
|
|
3516
3562
|
};
|
|
3517
3563
|
const FileUploader = (props) => {
|
|
3518
|
-
const { addToQueue, children, clearQueue, errorMessages, fileQueue, findInQueue, id, isFluid, onDismiss, updateQueue } = props, restProps = __rest$
|
|
3564
|
+
const { addToQueue, children, clearQueue, errorMessages, fileQueue, findInQueue, id, isFluid, onDismiss, updateQueue } = props, restProps = __rest$1U(props, ["addToQueue", "children", "clearQueue", "errorMessages", "fileQueue", "findInQueue", "id", "isFluid", "onDismiss", "updateQueue"]);
|
|
3519
3565
|
const { classProps } = useFileUploaderStyleProps({ isFluid });
|
|
3520
3566
|
const { styleProps, props: transferProps } = useStyleProps(restProps);
|
|
3521
3567
|
const contextValue = {
|
|
@@ -3688,7 +3734,7 @@ const useFileUploaderInput = (props) => {
|
|
|
3688
3734
|
return Object.assign({ isDropZoneHidden: dropZoneHidden, isDisabledByQueueLimitBehavior: disabledByQueueLimitBehavior, onChange: onChangeHandler }, dragAndDropProps);
|
|
3689
3735
|
};
|
|
3690
3736
|
|
|
3691
|
-
var __rest$
|
|
3737
|
+
var __rest$1T = (undefined && undefined.__rest) || function (s, e) {
|
|
3692
3738
|
var t = {};
|
|
3693
3739
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3694
3740
|
t[p] = s[p];
|
|
@@ -3701,7 +3747,7 @@ var __rest$1S = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3701
3747
|
};
|
|
3702
3748
|
const FileUploaderInput = (props) => {
|
|
3703
3749
|
const [isDragAndDropSupported, setIsDragAndDropSupported] = React.useState(false);
|
|
3704
|
-
const { accept, 'aria-describedby': ariaDescribedBy = '', dropZoneRef, hasValidationIcon, helperText, iconName = 'upload', id, inputRef, isDisabled, isLabelHidden, isMultiple, isRequired, label, labelText, linkText, maxFileSize = DEFAULT_FILE_SIZE_LIMIT, maxUploadedFiles = DEFAULT_FILE_QUEUE_LIMIT, onError, queueLimitBehavior = 'none', validationState, validationText } = props, restProps = __rest$
|
|
3750
|
+
const { accept, 'aria-describedby': ariaDescribedBy = '', dropZoneRef, hasValidationIcon, helperText, iconName = 'upload', id, inputRef, isDisabled, isLabelHidden, isMultiple, isRequired, label, labelText, linkText, maxFileSize = DEFAULT_FILE_SIZE_LIMIT, maxUploadedFiles = DEFAULT_FILE_QUEUE_LIMIT, onError, queueLimitBehavior = 'none', validationState, validationText } = props, restProps = __rest$1T(props, ["accept", 'aria-describedby', "dropZoneRef", "hasValidationIcon", "helperText", "iconName", "id", "inputRef", "isDisabled", "isLabelHidden", "isMultiple", "isRequired", "label", "labelText", "linkText", "maxFileSize", "maxUploadedFiles", "onError", "queueLimitBehavior", "validationState", "validationText"]);
|
|
3705
3751
|
const { isDisabledByQueueLimitBehavior, isDragging, isDropZoneHidden, onChange, onDragEnter, onDragLeave, onDragOver, onDrop, } = useFileUploaderInput({
|
|
3706
3752
|
accept,
|
|
3707
3753
|
isMultiple,
|
|
@@ -3745,7 +3791,7 @@ const FileUploaderInput = (props) => {
|
|
|
3745
3791
|
};
|
|
3746
3792
|
FileUploaderInput.spiritComponent = 'FileUploaderInput';
|
|
3747
3793
|
|
|
3748
|
-
var __rest$
|
|
3794
|
+
var __rest$1S = (undefined && undefined.__rest) || function (s, e) {
|
|
3749
3795
|
var t = {};
|
|
3750
3796
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3751
3797
|
t[p] = s[p];
|
|
@@ -3757,7 +3803,7 @@ var __rest$1R = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3757
3803
|
return t;
|
|
3758
3804
|
};
|
|
3759
3805
|
const FileUploaderList = (props) => {
|
|
3760
|
-
const { label = DEFAULT_ATTACHMENT_LIST_LABEL, id, attachmentComponent, inputName, hasImagePreview } = props, restProps = __rest$
|
|
3806
|
+
const { label = DEFAULT_ATTACHMENT_LIST_LABEL, id, attachmentComponent, inputName, hasImagePreview } = props, restProps = __rest$1S(props, ["label", "id", "attachmentComponent", "inputName", "hasImagePreview"]);
|
|
3761
3807
|
const { classProps } = useFileUploaderStyleProps();
|
|
3762
3808
|
const { styleProps, props: transferProps } = useStyleProps(restProps);
|
|
3763
3809
|
const { fileQueue, onDismiss } = useFileUploaderContext();
|
|
@@ -3780,7 +3826,7 @@ const FileUploaderList = (props) => {
|
|
|
3780
3826
|
};
|
|
3781
3827
|
FileUploaderList.spiritComponent = 'FileUploaderList';
|
|
3782
3828
|
|
|
3783
|
-
var __rest$
|
|
3829
|
+
var __rest$1R = (undefined && undefined.__rest) || function (s, e) {
|
|
3784
3830
|
var t = {};
|
|
3785
3831
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3786
3832
|
t[p] = s[p];
|
|
@@ -3792,7 +3838,7 @@ var __rest$1Q = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3792
3838
|
return t;
|
|
3793
3839
|
};
|
|
3794
3840
|
const AttachmentActionButton = (props) => {
|
|
3795
|
-
const { name = 'edit', children } = props, restProps = __rest$
|
|
3841
|
+
const { name = 'edit', children } = props, restProps = __rest$1R(props, ["name", "children"]);
|
|
3796
3842
|
const { classProps } = useFileUploaderStyleProps();
|
|
3797
3843
|
const { styleProps, props: transferProps } = useStyleProps(restProps);
|
|
3798
3844
|
return (React.createElement("button", Object.assign({ type: "button" }, transferProps, styleProps, { className: classNames(classProps.attachment.button, styleProps.className) }),
|
|
@@ -3801,7 +3847,7 @@ const AttachmentActionButton = (props) => {
|
|
|
3801
3847
|
};
|
|
3802
3848
|
AttachmentActionButton.spiritComponent = 'AttachmentActionButton';
|
|
3803
3849
|
|
|
3804
|
-
var __rest$
|
|
3850
|
+
var __rest$1Q = (undefined && undefined.__rest) || function (s, e) {
|
|
3805
3851
|
var t = {};
|
|
3806
3852
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3807
3853
|
t[p] = s[p];
|
|
@@ -3813,7 +3859,7 @@ var __rest$1P = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3813
3859
|
return t;
|
|
3814
3860
|
};
|
|
3815
3861
|
const AttachmentDismissButton = (props) => {
|
|
3816
|
-
const { children } = props, restProps = __rest$
|
|
3862
|
+
const { children } = props, restProps = __rest$1Q(props, ["children"]);
|
|
3817
3863
|
const { classProps } = useFileUploaderStyleProps();
|
|
3818
3864
|
const { styleProps, props: transferProps } = useStyleProps(restProps);
|
|
3819
3865
|
return (React.createElement("button", Object.assign({ type: "button" }, transferProps, styleProps, { className: classNames(classProps.attachment.button, styleProps.className) }),
|
|
@@ -3822,12 +3868,12 @@ const AttachmentDismissButton = (props) => {
|
|
|
3822
3868
|
};
|
|
3823
3869
|
AttachmentDismissButton.spiritComponent = 'AttachmentDismissButton';
|
|
3824
3870
|
|
|
3825
|
-
const defaultProps$
|
|
3871
|
+
const defaultProps$A = {
|
|
3826
3872
|
meta: undefined,
|
|
3827
3873
|
imageObjectFit: 'cover',
|
|
3828
3874
|
};
|
|
3829
3875
|
const AttachmentImagePreview = (props) => {
|
|
3830
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
3876
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$A), props);
|
|
3831
3877
|
const { label, imagePreview, meta, imageObjectFit } = propsWithDefaults;
|
|
3832
3878
|
const { classProps } = useFileUploaderStyleProps({ meta, imageObjectFit });
|
|
3833
3879
|
const { imageCropStyles, attachmentStyles } = classProps;
|
|
@@ -3911,7 +3957,7 @@ const useFileUploaderAttachment = ({ attachmentRef, file, name, meta, onError, }
|
|
|
3911
3957
|
}, [attachmentRef, file, name, meta, onError]);
|
|
3912
3958
|
};
|
|
3913
3959
|
|
|
3914
|
-
var __rest$
|
|
3960
|
+
var __rest$1P = (undefined && undefined.__rest) || function (s, e) {
|
|
3915
3961
|
var t = {};
|
|
3916
3962
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3917
3963
|
t[p] = s[p];
|
|
@@ -3923,7 +3969,7 @@ var __rest$1O = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3923
3969
|
return t;
|
|
3924
3970
|
};
|
|
3925
3971
|
const FileUploaderAttachment = (props) => {
|
|
3926
|
-
const { editText = DEFAULT_EDIT_BUTTON_LABEL, file, hasImagePreview, iconName = DEFAULT_ICON_NAME, id, imageObjectFit, label, meta, name, onDismiss, onEdit, onError, removeText = DEFAULT_BUTTON_LABEL } = props, restProps = __rest$
|
|
3972
|
+
const { editText = DEFAULT_EDIT_BUTTON_LABEL, file, hasImagePreview, iconName = DEFAULT_ICON_NAME, id, imageObjectFit, label, meta, name, onDismiss, onEdit, onError, removeText = DEFAULT_BUTTON_LABEL } = props, restProps = __rest$1P(props, ["editText", "file", "hasImagePreview", "iconName", "id", "imageObjectFit", "label", "meta", "name", "onDismiss", "onEdit", "onError", "removeText"]);
|
|
3927
3973
|
const [imagePreview, setImagePreview] = React.useState('');
|
|
3928
3974
|
const { classProps } = useFileUploaderStyleProps();
|
|
3929
3975
|
const { styleProps, props: transferProps } = useStyleProps(restProps);
|
|
@@ -3998,7 +4044,7 @@ const useFileQueue = () => {
|
|
|
3998
4044
|
};
|
|
3999
4045
|
};
|
|
4000
4046
|
|
|
4001
|
-
var __rest$
|
|
4047
|
+
var __rest$1O = (undefined && undefined.__rest) || function (s, e) {
|
|
4002
4048
|
var t = {};
|
|
4003
4049
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4004
4050
|
t[p] = s[p];
|
|
@@ -4010,7 +4056,7 @@ var __rest$1N = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4010
4056
|
return t;
|
|
4011
4057
|
};
|
|
4012
4058
|
const UncontrolledFileUploader = (props) => {
|
|
4013
|
-
const { attachmentComponent, maxFileSize, maxUploadedFiles, helperText, iconName, inputId, inputLabel, inputName, inputProps, isLabelHidden, isDisabled, isFluid, queueLimitBehavior, isMultiple, isRequired, labelText, linkText, listId, listProps, onInputError, onChange, errorMessages, validationState, validationText } = props, restProps = __rest$
|
|
4059
|
+
const { attachmentComponent, maxFileSize, maxUploadedFiles, helperText, iconName, inputId, inputLabel, inputName, inputProps, isLabelHidden, isDisabled, isFluid, queueLimitBehavior, isMultiple, isRequired, labelText, linkText, listId, listProps, onInputError, onChange, errorMessages, validationState, validationText } = props, restProps = __rest$1O(props, ["attachmentComponent", "maxFileSize", "maxUploadedFiles", "helperText", "iconName", "inputId", "inputLabel", "inputName", "inputProps", "isLabelHidden", "isDisabled", "isFluid", "queueLimitBehavior", "isMultiple", "isRequired", "labelText", "linkText", "listId", "listProps", "onInputError", "onChange", "errorMessages", "validationState", "validationText"]);
|
|
4014
4060
|
const { fileQueue, addToQueue, clearQueue, onDismiss, findInQueue, updateQueue } = useFileQueue();
|
|
4015
4061
|
React.useEffect(() => {
|
|
4016
4062
|
if (onChange) {
|
|
@@ -4038,7 +4084,7 @@ const useFooterStyleProps = (props) => {
|
|
|
4038
4084
|
};
|
|
4039
4085
|
};
|
|
4040
4086
|
|
|
4041
|
-
var __rest$
|
|
4087
|
+
var __rest$1N = (undefined && undefined.__rest) || function (s, e) {
|
|
4042
4088
|
var t = {};
|
|
4043
4089
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4044
4090
|
t[p] = s[p];
|
|
@@ -4057,7 +4103,7 @@ const defaultStyleProps = {
|
|
|
4057
4103
|
};
|
|
4058
4104
|
const Footer = (props) => {
|
|
4059
4105
|
const propsWithDefaults = Object.assign(Object.assign({}, defaultStyleProps), props);
|
|
4060
|
-
const { elementType: ElementTag = defaultStyleProps.elementType, children, backgroundColor } = propsWithDefaults, restProps = __rest$
|
|
4106
|
+
const { elementType: ElementTag = defaultStyleProps.elementType, children, backgroundColor } = propsWithDefaults, restProps = __rest$1N(propsWithDefaults, ["elementType", "children", "backgroundColor"]);
|
|
4061
4107
|
const { classProps } = useFooterStyleProps({ backgroundColor });
|
|
4062
4108
|
const { styleProps, props: otherProps } = useStyleProps(restProps, {
|
|
4063
4109
|
paddingBottom: PaddingStyleProps.paddingBottom,
|
|
@@ -4069,7 +4115,7 @@ const Footer = (props) => {
|
|
|
4069
4115
|
};
|
|
4070
4116
|
Footer.spiritComponent = 'Footer';
|
|
4071
4117
|
|
|
4072
|
-
var __rest$
|
|
4118
|
+
var __rest$1M = (undefined && undefined.__rest) || function (s, e) {
|
|
4073
4119
|
var t = {};
|
|
4074
4120
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4075
4121
|
t[p] = s[p];
|
|
@@ -4081,7 +4127,7 @@ var __rest$1L = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4081
4127
|
return t;
|
|
4082
4128
|
};
|
|
4083
4129
|
function useGridStyleProps(props) {
|
|
4084
|
-
const { alignmentX, alignmentY, cols, spacing, spacingX, spacingY } = props, restProps = __rest$
|
|
4130
|
+
const { alignmentX, alignmentY, cols, spacing, spacingX, spacingY } = props, restProps = __rest$1M(props, ["alignmentX", "alignmentY", "cols", "spacing", "spacingX", "spacingY"]);
|
|
4085
4131
|
const gridClass = useClassNamePrefix('Grid');
|
|
4086
4132
|
const gridStyle = Object.assign(Object.assign(Object.assign(Object.assign({}, useSpacingStyle(spacing, 'grid', exports.DirectionAxis.X)), useSpacingStyle(spacing, 'grid', exports.DirectionAxis.Y)), useSpacingStyle(spacingX, 'grid', exports.DirectionAxis.X)), useSpacingStyle(spacingY, 'grid', exports.DirectionAxis.Y));
|
|
4087
4133
|
function generateColsClasses(componentClass, property, type) {
|
|
@@ -4108,7 +4154,7 @@ function useGridStyleProps(props) {
|
|
|
4108
4154
|
};
|
|
4109
4155
|
}
|
|
4110
4156
|
|
|
4111
|
-
var __rest$
|
|
4157
|
+
var __rest$1L = (undefined && undefined.__rest) || function (s, e) {
|
|
4112
4158
|
var t = {};
|
|
4113
4159
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4114
4160
|
t[p] = s[p];
|
|
@@ -4119,14 +4165,14 @@ var __rest$1K = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4119
4165
|
}
|
|
4120
4166
|
return t;
|
|
4121
4167
|
};
|
|
4122
|
-
const defaultProps$
|
|
4168
|
+
const defaultProps$z = {
|
|
4123
4169
|
alignmentX: AlignmentXExtended.STRETCH,
|
|
4124
4170
|
alignmentY: AlignmentYExtended.STRETCH,
|
|
4125
4171
|
elementType: 'div',
|
|
4126
4172
|
};
|
|
4127
4173
|
const Grid = (props) => {
|
|
4128
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
4129
|
-
const { elementType: ElementTag = 'div', children } = propsWithDefaults, restProps = __rest$
|
|
4174
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$z), props);
|
|
4175
|
+
const { elementType: ElementTag = 'div', children } = propsWithDefaults, restProps = __rest$1L(propsWithDefaults, ["elementType", "children"]);
|
|
4130
4176
|
const { classProps, props: modifiedProps, styleProps: gridStyle } = useGridStyleProps(restProps);
|
|
4131
4177
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
4132
4178
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps, styleProps, otherProps, gridStyle });
|
|
@@ -4156,22 +4202,23 @@ const setGridItemStyle = (styleObject, baseVarName, propValue) => {
|
|
|
4156
4202
|
function useGridItemStyleProps(props) {
|
|
4157
4203
|
const gridItemClass = useClassNamePrefix('GridItem');
|
|
4158
4204
|
const gridItemStyle = {};
|
|
4159
|
-
const
|
|
4205
|
+
const propsClone = Object.assign({}, props);
|
|
4206
|
+
const typePropNames = Object.keys(propsClone).filter((propName) => propName.startsWith('column') || propName.startsWith('row'));
|
|
4160
4207
|
typePropNames.forEach((propName) => {
|
|
4161
4208
|
const type = propName.startsWith('column') ? 'column' : 'row';
|
|
4162
|
-
if (
|
|
4163
|
-
setGridItemStyle(gridItemStyle, `grid-item-${type}-${propName.replace(type, '').toLowerCase()}`,
|
|
4209
|
+
if (propsClone[propName]) {
|
|
4210
|
+
setGridItemStyle(gridItemStyle, `grid-item-${type}-${propName.replace(type, '').toLowerCase()}`, propsClone[propName]);
|
|
4164
4211
|
}
|
|
4165
|
-
delete
|
|
4212
|
+
delete propsClone[propName];
|
|
4166
4213
|
});
|
|
4167
4214
|
return {
|
|
4168
4215
|
classProps: gridItemClass,
|
|
4169
|
-
props,
|
|
4216
|
+
props: propsClone,
|
|
4170
4217
|
styleProps: gridItemStyle,
|
|
4171
4218
|
};
|
|
4172
4219
|
}
|
|
4173
4220
|
|
|
4174
|
-
var __rest$
|
|
4221
|
+
var __rest$1K = (undefined && undefined.__rest) || function (s, e) {
|
|
4175
4222
|
var t = {};
|
|
4176
4223
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4177
4224
|
t[p] = s[p];
|
|
@@ -4183,7 +4230,7 @@ var __rest$1J = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4183
4230
|
return t;
|
|
4184
4231
|
};
|
|
4185
4232
|
const GridItem = (props) => {
|
|
4186
|
-
const { elementType: ElementTag = 'div', children } = props, restProps = __rest$
|
|
4233
|
+
const { elementType: ElementTag = 'div', children } = props, restProps = __rest$1K(props, ["elementType", "children"]);
|
|
4187
4234
|
const { classProps, styleProps: gridItemStyle, props: modifiedProps } = useGridItemStyleProps(restProps);
|
|
4188
4235
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
4189
4236
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps, styleProps, otherProps, gridItemStyle });
|
|
@@ -4252,7 +4299,7 @@ const useHeaderStyleProps = ({ actionsColor = HEADER_ACTIONS_COLOR_DEFAULT, colo
|
|
|
4252
4299
|
};
|
|
4253
4300
|
};
|
|
4254
4301
|
|
|
4255
|
-
var __rest$
|
|
4302
|
+
var __rest$1J = (undefined && undefined.__rest) || function (s, e) {
|
|
4256
4303
|
var t = {};
|
|
4257
4304
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4258
4305
|
t[p] = s[p];
|
|
@@ -4264,7 +4311,7 @@ var __rest$1I = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4264
4311
|
return t;
|
|
4265
4312
|
};
|
|
4266
4313
|
const Header = (props) => {
|
|
4267
|
-
const { children, color = HEADER_COLOR_DEFAULT, isSimple } = props, restProps = __rest$
|
|
4314
|
+
const { children, color = HEADER_COLOR_DEFAULT, isSimple } = props, restProps = __rest$1J(props, ["children", "color", "isSimple"]);
|
|
4268
4315
|
const { classProps } = useHeaderStyleProps({ color, isSimple });
|
|
4269
4316
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
4270
4317
|
useDeprecationMessage({
|
|
@@ -4285,7 +4332,7 @@ const HeaderButton = (props) => {
|
|
|
4285
4332
|
};
|
|
4286
4333
|
HeaderButton.spiritComponent = 'HeaderButton';
|
|
4287
4334
|
|
|
4288
|
-
var __rest$
|
|
4335
|
+
var __rest$1I = (undefined && undefined.__rest) || function (s, e) {
|
|
4289
4336
|
var t = {};
|
|
4290
4337
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4291
4338
|
t[p] = s[p];
|
|
@@ -4296,12 +4343,12 @@ var __rest$1H = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4296
4343
|
}
|
|
4297
4344
|
return t;
|
|
4298
4345
|
};
|
|
4299
|
-
const defaultProps$
|
|
4346
|
+
const defaultProps$y = {
|
|
4300
4347
|
isAtEnd: false,
|
|
4301
4348
|
};
|
|
4302
4349
|
const HeaderDesktopActions = (props) => {
|
|
4303
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
4304
|
-
const { isAtEnd } = propsWithDefaults, restProps = __rest$
|
|
4350
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$y), props);
|
|
4351
|
+
const { isAtEnd } = propsWithDefaults, restProps = __rest$1I(propsWithDefaults, ["isAtEnd"]);
|
|
4305
4352
|
const { classProps } = useHeaderStyleProps({ hasActionsAtEnd: isAtEnd });
|
|
4306
4353
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
4307
4354
|
return (React.createElement("nav", Object.assign({}, otherProps, { className: classNames(classProps.headerDesktopActions, styleProps.className), style: styleProps.style })));
|
|
@@ -4318,7 +4365,7 @@ const HeaderDialogProvider = HeaderDialogContext.Provider;
|
|
|
4318
4365
|
const HeaderDialogConsumer = HeaderDialogContext.Consumer;
|
|
4319
4366
|
const useHeaderDialogContext = () => React.useContext(HeaderDialogContext);
|
|
4320
4367
|
|
|
4321
|
-
var __rest$
|
|
4368
|
+
var __rest$1H = (undefined && undefined.__rest) || function (s, e) {
|
|
4322
4369
|
var t = {};
|
|
4323
4370
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4324
4371
|
t[p] = s[p];
|
|
@@ -4330,7 +4377,7 @@ var __rest$1G = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4330
4377
|
return t;
|
|
4331
4378
|
};
|
|
4332
4379
|
const HeaderDialog = (props) => {
|
|
4333
|
-
const { children, id, isOpen, onClose } = props, restProps = __rest$
|
|
4380
|
+
const { children, id, isOpen, onClose } = props, restProps = __rest$1H(props, ["children", "id", "isOpen", "onClose"]);
|
|
4334
4381
|
const { classProps } = useHeaderStyleProps();
|
|
4335
4382
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
4336
4383
|
const providerValue = { id, isOpen, onClose };
|
|
@@ -4342,7 +4389,7 @@ const HeaderDialog = (props) => {
|
|
|
4342
4389
|
};
|
|
4343
4390
|
HeaderDialog.spiritComponent = 'HeaderDialog';
|
|
4344
4391
|
|
|
4345
|
-
var __rest$
|
|
4392
|
+
var __rest$1G = (undefined && undefined.__rest) || function (s, e) {
|
|
4346
4393
|
var t = {};
|
|
4347
4394
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4348
4395
|
t[p] = s[p];
|
|
@@ -4354,7 +4401,7 @@ var __rest$1F = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4354
4401
|
return t;
|
|
4355
4402
|
};
|
|
4356
4403
|
const HeaderDialogActions = (props) => {
|
|
4357
|
-
const { color = HEADER_ACTIONS_COLOR_DEFAULT } = props, restProps = __rest$
|
|
4404
|
+
const { color = HEADER_ACTIONS_COLOR_DEFAULT } = props, restProps = __rest$1G(props, ["color"]);
|
|
4358
4405
|
const { classProps } = useHeaderStyleProps({ actionsColor: color });
|
|
4359
4406
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
4360
4407
|
return (React.createElement("nav", Object.assign({}, otherProps, { className: classNames(classProps.headerDialogActions, styleProps.className), style: styleProps.style })));
|
|
@@ -4368,7 +4415,7 @@ const HeaderDialogButton = (props) => {
|
|
|
4368
4415
|
};
|
|
4369
4416
|
HeaderDialogButton.spiritComponent = 'HeaderDialogButton';
|
|
4370
4417
|
|
|
4371
|
-
var __rest$
|
|
4418
|
+
var __rest$1F = (undefined && undefined.__rest) || function (s, e) {
|
|
4372
4419
|
var t = {};
|
|
4373
4420
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4374
4421
|
t[p] = s[p];
|
|
@@ -4380,7 +4427,7 @@ var __rest$1E = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4380
4427
|
return t;
|
|
4381
4428
|
};
|
|
4382
4429
|
const HeaderDialogCloseButton = (props) => {
|
|
4383
|
-
const { label = HEADER_DIALOG_CLOSE_BUTTON_LABEL_DEFAULT, onClick } = props, restProps = __rest$
|
|
4430
|
+
const { label = HEADER_DIALOG_CLOSE_BUTTON_LABEL_DEFAULT, onClick } = props, restProps = __rest$1F(props, ["label", "onClick"]);
|
|
4384
4431
|
const { classProps } = useHeaderStyleProps();
|
|
4385
4432
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
4386
4433
|
const { id, isOpen, onClose } = useHeaderDialogContext();
|
|
@@ -4395,7 +4442,7 @@ const HeaderDialogCloseButton = (props) => {
|
|
|
4395
4442
|
};
|
|
4396
4443
|
HeaderDialogCloseButton.spiritComponent = 'HeaderDialogCloseButton';
|
|
4397
4444
|
|
|
4398
|
-
var __rest$
|
|
4445
|
+
var __rest$1E = (undefined && undefined.__rest) || function (s, e) {
|
|
4399
4446
|
var t = {};
|
|
4400
4447
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4401
4448
|
t[p] = s[p];
|
|
@@ -4407,7 +4454,7 @@ var __rest$1D = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4407
4454
|
return t;
|
|
4408
4455
|
};
|
|
4409
4456
|
const _HeaderDialogLink = (props, ref) => {
|
|
4410
|
-
const { elementType: ElementTag = 'a', children, isCurrent } = props, restProps = __rest$
|
|
4457
|
+
const { elementType: ElementTag = 'a', children, isCurrent } = props, restProps = __rest$1E(props, ["elementType", "children", "isCurrent"]);
|
|
4411
4458
|
const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });
|
|
4412
4459
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
4413
4460
|
const mergedStyleProps = mergeStyleProps(ElementTag, {
|
|
@@ -4441,7 +4488,7 @@ const HeaderDialogText = (props) => {
|
|
|
4441
4488
|
};
|
|
4442
4489
|
HeaderDialogText.spiritComponent = 'HeaderDialogText';
|
|
4443
4490
|
|
|
4444
|
-
var __rest$
|
|
4491
|
+
var __rest$1D = (undefined && undefined.__rest) || function (s, e) {
|
|
4445
4492
|
var t = {};
|
|
4446
4493
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4447
4494
|
t[p] = s[p];
|
|
@@ -4453,7 +4500,7 @@ var __rest$1C = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4453
4500
|
return t;
|
|
4454
4501
|
};
|
|
4455
4502
|
const _HeaderLink = (props, ref) => {
|
|
4456
|
-
const { elementType: ElementTag = 'a', children, isCurrent } = props, restProps = __rest$
|
|
4503
|
+
const { elementType: ElementTag = 'a', children, isCurrent } = props, restProps = __rest$1D(props, ["elementType", "children", "isCurrent"]);
|
|
4457
4504
|
const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });
|
|
4458
4505
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
4459
4506
|
const mergedStyleProps = mergeStyleProps(ElementTag, {
|
|
@@ -4466,7 +4513,7 @@ const _HeaderLink = (props, ref) => {
|
|
|
4466
4513
|
const HeaderLink = React.forwardRef(_HeaderLink);
|
|
4467
4514
|
HeaderLink.spiritComponent = 'HeaderLink';
|
|
4468
4515
|
|
|
4469
|
-
var __rest$
|
|
4516
|
+
var __rest$1C = (undefined && undefined.__rest) || function (s, e) {
|
|
4470
4517
|
var t = {};
|
|
4471
4518
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4472
4519
|
t[p] = s[p];
|
|
@@ -4478,7 +4525,7 @@ var __rest$1B = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4478
4525
|
return t;
|
|
4479
4526
|
};
|
|
4480
4527
|
const HeaderMobileActions = (props) => {
|
|
4481
|
-
const { children, dialogId, menuToggleLabel = HEADER_MENU_TOGGLE_LABEL_DEFAULT, isOpen, onOpen } = props, restProps = __rest$
|
|
4528
|
+
const { children, dialogId, menuToggleLabel = HEADER_MENU_TOGGLE_LABEL_DEFAULT, isOpen, onOpen } = props, restProps = __rest$1C(props, ["children", "dialogId", "menuToggleLabel", "isOpen", "onOpen"]);
|
|
4482
4529
|
const { classProps } = useHeaderStyleProps();
|
|
4483
4530
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
4484
4531
|
return (React.createElement("div", Object.assign({}, otherProps, { className: classNames(classProps.headerMobileActions, styleProps.className), style: styleProps.style }),
|
|
@@ -4503,7 +4550,7 @@ const HeaderNavItem = (props) => {
|
|
|
4503
4550
|
};
|
|
4504
4551
|
HeaderNavItem.spiritComponent = 'HeaderNavItem';
|
|
4505
4552
|
|
|
4506
|
-
var __rest$
|
|
4553
|
+
var __rest$1B = (undefined && undefined.__rest) || function (s, e) {
|
|
4507
4554
|
var t = {};
|
|
4508
4555
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4509
4556
|
t[p] = s[p];
|
|
@@ -4515,7 +4562,7 @@ var __rest$1A = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4515
4562
|
return t;
|
|
4516
4563
|
};
|
|
4517
4564
|
function useHeadingStyleProps(props) {
|
|
4518
|
-
const { emphasis, size, textColor } = props, restProps = __rest$
|
|
4565
|
+
const { emphasis, size, textColor } = props, restProps = __rest$1B(props, ["emphasis", "size", "textColor"]);
|
|
4519
4566
|
const headingClass = useClassNamePrefix('typography-heading');
|
|
4520
4567
|
const headingTextColorClass = useClassNamePrefix(textColor ? `text-${textColor}` : '');
|
|
4521
4568
|
const className = classNames(`${headingClass}-${size}-${emphasis}`, {
|
|
@@ -4527,7 +4574,7 @@ function useHeadingStyleProps(props) {
|
|
|
4527
4574
|
};
|
|
4528
4575
|
}
|
|
4529
4576
|
|
|
4530
|
-
var __rest$
|
|
4577
|
+
var __rest$1A = (undefined && undefined.__rest) || function (s, e) {
|
|
4531
4578
|
var t = {};
|
|
4532
4579
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4533
4580
|
t[p] = s[p];
|
|
@@ -4538,13 +4585,13 @@ var __rest$1z = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4538
4585
|
}
|
|
4539
4586
|
return t;
|
|
4540
4587
|
};
|
|
4541
|
-
const defaultProps$
|
|
4588
|
+
const defaultProps$x = {
|
|
4542
4589
|
emphasis: Emphasis.BOLD,
|
|
4543
4590
|
size: SizesExtended.MEDIUM,
|
|
4544
4591
|
};
|
|
4545
4592
|
const Heading = (props) => {
|
|
4546
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
4547
|
-
const { elementType: ElementTag, children } = propsWithDefaults, restProps = __rest$
|
|
4593
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$x), props);
|
|
4594
|
+
const { elementType: ElementTag, children } = propsWithDefaults, restProps = __rest$1A(propsWithDefaults, ["elementType", "children"]);
|
|
4548
4595
|
const { classProps, props: modifiedProps } = useHeadingStyleProps(Object.assign({}, restProps));
|
|
4549
4596
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps, {
|
|
4550
4597
|
isTextBalanced: HeadingStyleProps.isTextBalanced,
|
|
@@ -4557,6 +4604,32 @@ const Heading = (props) => {
|
|
|
4557
4604
|
};
|
|
4558
4605
|
Heading.spiritComponent = 'Heading';
|
|
4559
4606
|
|
|
4607
|
+
var __rest$1z = (undefined && undefined.__rest) || function (s, e) {
|
|
4608
|
+
var t = {};
|
|
4609
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4610
|
+
t[p] = s[p];
|
|
4611
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
4612
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
4613
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
4614
|
+
t[p[i]] = s[p[i]];
|
|
4615
|
+
}
|
|
4616
|
+
return t;
|
|
4617
|
+
};
|
|
4618
|
+
const defaultProps$w = {
|
|
4619
|
+
elementType: 'span',
|
|
4620
|
+
};
|
|
4621
|
+
const Hidden = (props) => {
|
|
4622
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$w), props);
|
|
4623
|
+
const { elementType: ElementTag = 'span', children, on, from } = propsWithDefaults, restProps = __rest$1z(propsWithDefaults, ["elementType", "children", "on", "from"]);
|
|
4624
|
+
const stylePropsWithMapping = Object.assign(Object.assign({}, restProps), { hideOn: on || restProps.hideOn, hideFrom: from || restProps.hideFrom });
|
|
4625
|
+
const { styleProps, props: otherProps } = useStyleProps(stylePropsWithMapping);
|
|
4626
|
+
const mergedStyleProps = mergeStyleProps(ElementTag, { styleProps });
|
|
4627
|
+
return (React.createElement(ElementTag, Object.assign({}, otherProps, mergedStyleProps), children));
|
|
4628
|
+
};
|
|
4629
|
+
Hidden.spiritComponent = 'Hidden';
|
|
4630
|
+
Hidden.spiritDefaultElement = 'span';
|
|
4631
|
+
Hidden.spiritDefaultProps = null;
|
|
4632
|
+
|
|
4560
4633
|
const IconBoxShapes = {
|
|
4561
4634
|
ROUNDED: 'rounded',
|
|
4562
4635
|
SQUARE: 'square',
|
|
@@ -4946,8 +5019,7 @@ const setCustomHeight = (baseVarName, propValue) => {
|
|
|
4946
5019
|
var _a;
|
|
4947
5020
|
const suffix = key === 'mobile' ? '' : `-${key}`;
|
|
4948
5021
|
const propName = `--${baseVarName}${suffix}`;
|
|
4949
|
-
acc[propName]
|
|
4950
|
-
return acc;
|
|
5022
|
+
return Object.assign(Object.assign({}, acc), { [propName]: (_a = propValue[key]) === null || _a === void 0 ? void 0 : _a.toString() });
|
|
4951
5023
|
}, {});
|
|
4952
5024
|
}
|
|
4953
5025
|
const propName = `--${baseVarName}`;
|
|
@@ -5303,7 +5375,7 @@ const _PaginationLink = (props, ref) => {
|
|
|
5303
5375
|
const { classProps } = usePaginationStyleProps({ isCurrent });
|
|
5304
5376
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
5305
5377
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps: classProps.link, styleProps, otherProps });
|
|
5306
|
-
return (React.createElement(ElementTag, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }),
|
|
5378
|
+
return (React.createElement(ElementTag, Object.assign({}, (isCurrent && { 'aria-current': 'page' }), otherProps, mergedStyleProps, { ref: ref }),
|
|
5307
5379
|
React.createElement(VisuallyHidden, null, visuallyHiddenLabel),
|
|
5308
5380
|
React.createElement("span", { "aria-hidden": "true" }, pageNumber)));
|
|
5309
5381
|
};
|
|
@@ -6179,18 +6251,20 @@ var __rest$U = (undefined && undefined.__rest) || function (s, e) {
|
|
|
6179
6251
|
return t;
|
|
6180
6252
|
};
|
|
6181
6253
|
function useRadioStyleProps(props) {
|
|
6182
|
-
const {
|
|
6254
|
+
const { inputPosition = InputPositions.START, isItem, isLabelHidden, validationState } = props, restProps = __rest$U(props, ["inputPosition", "isItem", "isLabelHidden", "validationState"]);
|
|
6183
6255
|
const { isDisabled } = restProps;
|
|
6184
6256
|
const radioClass = useClassNamePrefix('Radio');
|
|
6185
6257
|
const radioDisabledClass = `${radioClass}--disabled`;
|
|
6186
6258
|
const radioItemClass = `${radioClass}--item`;
|
|
6187
6259
|
const radioInputClass = `${radioClass}__input`;
|
|
6260
|
+
const radioInputPositionClass = useInputPositionClass(radioClass, inputPosition);
|
|
6188
6261
|
const radioLabelClass = `${radioClass}__label`;
|
|
6189
6262
|
const radioLabelHiddenClass = `${radioClass}__label--hidden`;
|
|
6190
6263
|
const radioTextClass = `${radioClass}__text`;
|
|
6191
6264
|
const radioHelperTextClass = `${radioClass}__helperText`;
|
|
6192
6265
|
const radioValidationClass = `${radioClass}--${validationState}`;
|
|
6193
6266
|
const rootStyles = classNames(radioClass, {
|
|
6267
|
+
[radioInputPositionClass]: radioInputPositionClass,
|
|
6194
6268
|
[radioDisabledClass]: isDisabled,
|
|
6195
6269
|
[radioItemClass]: isItem,
|
|
6196
6270
|
[radioValidationClass]: validationState,
|
|
@@ -8096,7 +8170,7 @@ var __rest$6 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
8096
8170
|
return t;
|
|
8097
8171
|
};
|
|
8098
8172
|
function useToggleStyleProps(props) {
|
|
8099
|
-
const {
|
|
8173
|
+
const { hasIndicators = false, inputPosition = InputPositions.END, isDisabled = false, isFluid = false, isLabelHidden = false, isRequired = false, validationState } = props, restProps = __rest$6(props, ["hasIndicators", "inputPosition", "isDisabled", "isFluid", "isLabelHidden", "isRequired", "validationState"]);
|
|
8100
8174
|
const toggleClass = useClassNamePrefix('Toggle');
|
|
8101
8175
|
const toggleFluidClass = `${toggleClass}--fluid`;
|
|
8102
8176
|
const toggleDisabledClass = `${toggleClass}--disabled`;
|
|
@@ -8107,9 +8181,11 @@ function useToggleStyleProps(props) {
|
|
|
8107
8181
|
const toggleRequiredClass = `${toggleLabelClass}--required`;
|
|
8108
8182
|
const toggleInputClass = `${toggleClass}__input`;
|
|
8109
8183
|
const toggleInputIndicatorsClass = `${toggleInputClass}--indicators`;
|
|
8184
|
+
const toggleInputPositionClass = useInputPositionClass(toggleClass, inputPosition);
|
|
8110
8185
|
const toggleHelperTextClass = `${toggleClass}__helperText`;
|
|
8111
8186
|
const toggleValidationTextClass = `${toggleClass}__validationText`;
|
|
8112
8187
|
const rootClass = classNames(toggleClass, {
|
|
8188
|
+
[toggleInputPositionClass]: toggleInputPositionClass,
|
|
8113
8189
|
[toggleFluidClass]: isFluid,
|
|
8114
8190
|
[toggleDisabledClass]: isDisabled,
|
|
8115
8191
|
[toggleValidationClass]: validationState,
|
|
@@ -8453,6 +8529,7 @@ exports.HeaderNavItem = HeaderNavItem;
|
|
|
8453
8529
|
exports.Heading = Heading;
|
|
8454
8530
|
exports.HeadingStyleProps = HeadingStyleProps;
|
|
8455
8531
|
exports.HelperText = HelperText;
|
|
8532
|
+
exports.Hidden = Hidden;
|
|
8456
8533
|
exports.ICON_BOX_SIZE = ICON_BOX_SIZE;
|
|
8457
8534
|
exports.IMAGE_DIMENSION = IMAGE_DIMENSION;
|
|
8458
8535
|
exports.IMAGE_PREVIEW_BASE64_MAX_WIDTH = IMAGE_PREVIEW_BASE64_MAX_WIDTH;
|
|
@@ -8460,6 +8537,7 @@ exports.Icon = Icon;
|
|
|
8460
8537
|
exports.IconBox = IconBox;
|
|
8461
8538
|
exports.IconsConsumer = IconsConsumer;
|
|
8462
8539
|
exports.IconsProvider = IconsProvider;
|
|
8540
|
+
exports.InputPositions = InputPositions;
|
|
8463
8541
|
exports.Intensity = Intensity;
|
|
8464
8542
|
exports.Item = Item;
|
|
8465
8543
|
exports.Label = Label;
|
|
@@ -8664,7 +8742,6 @@ exports.useDefaultResponsiveRowsStyle = useDefaultResponsiveRowsStyle;
|
|
|
8664
8742
|
exports.useDeprecationMessage = useDeprecationMessage;
|
|
8665
8743
|
exports.useDialog = useDialog;
|
|
8666
8744
|
exports.useDimensionStyle = useDimensionStyle;
|
|
8667
|
-
exports.useDirectionClass = useDirectionClass;
|
|
8668
8745
|
exports.useDividerStyleProps = useDividerStyleProps;
|
|
8669
8746
|
exports.useDragAndDrop = useDragAndDrop;
|
|
8670
8747
|
exports.useDrawerContext = useDrawerContext;
|
|
@@ -8687,6 +8764,7 @@ exports.useIconBoxColors = useIconBoxColors;
|
|
|
8687
8764
|
exports.useIconBoxStyleProps = useIconBoxStyleProps;
|
|
8688
8765
|
exports.useIconName = useIconName;
|
|
8689
8766
|
exports.useIconStyleProps = useIconStyleProps;
|
|
8767
|
+
exports.useInputPositionClass = useInputPositionClass;
|
|
8690
8768
|
exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
|
|
8691
8769
|
exports.useItemStyleProps = useItemStyleProps;
|
|
8692
8770
|
exports.useLastActiveFocus = useLastActiveFocus;
|
|
@@ -8721,6 +8799,7 @@ exports.useSpacingStyle = useSpacingStyle;
|
|
|
8721
8799
|
exports.useSpinnerStyleProps = useSpinnerStyleProps;
|
|
8722
8800
|
exports.useSplitButtonStyleProps = useSplitButtonStyleProps;
|
|
8723
8801
|
exports.useStyleProps = useStyleProps;
|
|
8802
|
+
exports.useSymmetry = useSymmetry;
|
|
8724
8803
|
exports.useTab = useTab;
|
|
8725
8804
|
exports.useTabContext = useTabContext;
|
|
8726
8805
|
exports.useTabsStyleProps = useTabsStyleProps;
|