@automattic/vip-design-system 2.14.0 → 2.14.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/build/system/Button/Button.js +2 -1
- package/build/system/DescriptionList/DescriptionList.js +10 -7
- package/build/system/NewConfirmationDialog/NewConfirmationDialog.js +1 -1
- package/build/system/NewDialog/DialogClose.js +1 -1
- package/package.json +1 -1
- package/src/system/Button/Button.tsx +1 -1
- package/src/system/DescriptionList/DescriptionList.tsx +13 -8
- package/src/system/NewConfirmationDialog/NewConfirmationDialog.js +1 -1
- package/src/system/NewDialog/DialogClose.tsx +1 -1
|
@@ -67,7 +67,8 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
67
67
|
width: Boolean(full) === true ? '100%' : undefined
|
|
68
68
|
}, sx)
|
|
69
69
|
}, rest, disabledAttributes, {
|
|
70
|
-
variant: variant
|
|
70
|
+
variant: variant === 'danger' ? 'primary' : variant // fallback for danger variant used before the prop was added
|
|
71
|
+
,
|
|
71
72
|
onClick: handleOnClick,
|
|
72
73
|
className: classNames('vip-button-component', className),
|
|
73
74
|
"data-danger": danger,
|
|
@@ -89,7 +89,7 @@ var DescriptionListComponent = function DescriptionListComponent(_ref2) {
|
|
|
89
89
|
})]
|
|
90
90
|
});
|
|
91
91
|
};
|
|
92
|
-
var DescriptionList = /*#__PURE__*/forwardRef(function (_ref3) {
|
|
92
|
+
var DescriptionList = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
93
93
|
var sx = _ref3.sx,
|
|
94
94
|
className = _ref3.className,
|
|
95
95
|
list = _ref3.list,
|
|
@@ -99,12 +99,15 @@ var DescriptionList = /*#__PURE__*/forwardRef(function (_ref3) {
|
|
|
99
99
|
as = _ref3$as === void 0 ? 'dl' : _ref3$as,
|
|
100
100
|
title = _ref3.title;
|
|
101
101
|
var Component = as === 'table' ? TableComponent : DescriptionListComponent;
|
|
102
|
-
return _jsx(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
102
|
+
return _jsx(Box, {
|
|
103
|
+
ref: ref,
|
|
104
|
+
children: _jsx(Component, {
|
|
105
|
+
list: list,
|
|
106
|
+
className: className,
|
|
107
|
+
sx: sx,
|
|
108
|
+
labelWidth: labelWidth,
|
|
109
|
+
title: title
|
|
110
|
+
})
|
|
108
111
|
});
|
|
109
112
|
});
|
|
110
113
|
DescriptionList.displayName = 'DescriptionList';
|
|
@@ -22,7 +22,7 @@ const NewConfirmationDialogContent = ( {
|
|
|
22
22
|
} ) => (
|
|
23
23
|
<Box className={ classNames( 'vip-confirmation-dialog-component', className ) }>
|
|
24
24
|
<Flex sx={ { justifyContent: 'flex-end', mt: 4 } }>
|
|
25
|
-
<Button variant="
|
|
25
|
+
<Button variant="ghost" sx={ { mr: 2 } } onClick={ onClose }>
|
|
26
26
|
Cancel
|
|
27
27
|
</Button>
|
|
28
28
|
<NewDialog.Close>
|
|
@@ -41,7 +41,7 @@ export var DialogCloseDefault = /*#__PURE__*/forwardRef(function (_ref, forwarde
|
|
|
41
41
|
children: _jsx(Button, {
|
|
42
42
|
ref: forwardedRef,
|
|
43
43
|
"aria-label": "Close",
|
|
44
|
-
variant: "
|
|
44
|
+
variant: "ghost",
|
|
45
45
|
sx: defaultCloseStyles(variant),
|
|
46
46
|
children: _jsx(IoClose, {
|
|
47
47
|
"aria-hidden": "true",
|
package/package.json
CHANGED
|
@@ -95,7 +95,7 @@ const Button = forwardRef< HTMLButtonElement, ButtonProps >(
|
|
|
95
95
|
} }
|
|
96
96
|
{ ...rest }
|
|
97
97
|
{ ...disabledAttributes }
|
|
98
|
-
variant={ variant }
|
|
98
|
+
variant={ variant === 'danger' ? 'primary' : variant } // fallback for danger variant used before the prop was added
|
|
99
99
|
onClick={ handleOnClick }
|
|
100
100
|
className={ classNames( 'vip-button-component', className ) }
|
|
101
101
|
data-danger={ danger }
|
|
@@ -83,17 +83,22 @@ const DescriptionListComponent = ( {
|
|
|
83
83
|
);
|
|
84
84
|
|
|
85
85
|
const DescriptionList = forwardRef< HTMLDivElement, DescriptionListProps >(
|
|
86
|
-
(
|
|
86
|
+
(
|
|
87
|
+
{ sx, className, list, labelWidth = '100px', as = 'dl', title }: DescriptionListProps,
|
|
88
|
+
ref
|
|
89
|
+
) => {
|
|
87
90
|
const Component = as === 'table' ? TableComponent : DescriptionListComponent;
|
|
88
91
|
|
|
89
92
|
return (
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
<Box ref={ ref }>
|
|
94
|
+
<Component
|
|
95
|
+
list={ list }
|
|
96
|
+
className={ className }
|
|
97
|
+
sx={ sx }
|
|
98
|
+
labelWidth={ labelWidth }
|
|
99
|
+
title={ title }
|
|
100
|
+
/>
|
|
101
|
+
</Box>
|
|
97
102
|
);
|
|
98
103
|
}
|
|
99
104
|
);
|
|
@@ -22,7 +22,7 @@ const NewConfirmationDialogContent = ( {
|
|
|
22
22
|
} ) => (
|
|
23
23
|
<Box className={ classNames( 'vip-confirmation-dialog-component', className ) }>
|
|
24
24
|
<Flex sx={ { justifyContent: 'flex-end', mt: 4 } }>
|
|
25
|
-
<Button variant="
|
|
25
|
+
<Button variant="ghost" sx={ { mr: 2 } } onClick={ onClose }>
|
|
26
26
|
Cancel
|
|
27
27
|
</Button>
|
|
28
28
|
<NewDialog.Close>
|
|
@@ -47,7 +47,7 @@ export const DialogCloseDefault = forwardRef< HTMLButtonElement, DialogCloseDefa
|
|
|
47
47
|
<Button
|
|
48
48
|
ref={ forwardedRef }
|
|
49
49
|
aria-label="Close"
|
|
50
|
-
variant="
|
|
50
|
+
variant="ghost"
|
|
51
51
|
sx={ defaultCloseStyles( variant ) }
|
|
52
52
|
>
|
|
53
53
|
<IoClose aria-hidden="true" width={ 20 } height={ 20 } />
|