@itcase/ui 1.0.62 → 1.0.64
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.
|
@@ -129,7 +129,7 @@ const Button = /*#__PURE__*/React__default.default.forwardRef(function Button(pr
|
|
|
129
129
|
label: labelStyles
|
|
130
130
|
} = useStyles.useStyles(props);
|
|
131
131
|
return /*#__PURE__*/React__default.default.createElement(index.LinkWrapper, {
|
|
132
|
-
className: clsx__default.default(className, 'button', type && `button_type_${type}`, borderWidthClass, borderColorClass, borderTypeClass, fillClass || buttonConfig.appearance[appearance] && `fill_${buttonConfig.appearance[appearance].fillClass}`.replace(/([A-Z])/g, '-$1').toLowerCase(), fillHoverClass || buttonConfig.appearance[appearance] && `fill_${buttonConfig.appearance[appearance].fillHoverClass}`.replace(/([A-Z])/g, '-$1').toLowerCase(), shapeClass, sizeClass, widthClass, elevationClass, Badge && 'button_type_badge', loading && 'button_state_loading', !label && (iconBefore || iconAfter || icon) && 'button_type_icon', label && (iconBefore || iconAfter || before || after) && `button_type_with-icon button_type_with-icon_${size}`),
|
|
132
|
+
className: clsx__default.default(className, 'button', type && `button_type_${type}`, borderWidthClass, borderColorClass, borderTypeClass, fillClass || buttonConfig.appearance[appearance] && `fill_${buttonConfig.appearance[appearance].fillClass}`.replace(/([A-Z])/g, '-$1').toLowerCase(), fillHoverClass || buttonConfig.appearance[appearance] && `fill_${buttonConfig.appearance[appearance].fillHoverClass}`.replace(/([A-Z])/g, '-$1').toLowerCase(), shapeClass, sizeClass, widthClass, elevationClass, isDisabled && 'cursor_type_default', Badge && 'button_type_badge', loading && 'button_state_loading', !label && (iconBefore || iconAfter || icon) && 'button_type_icon', label && (iconBefore || iconAfter || before || after) && `button_type_with-icon button_type_with-icon_${size}`),
|
|
133
133
|
DefaultComponent: "button",
|
|
134
134
|
disabled: isDisabled,
|
|
135
135
|
href: link || href,
|
package/dist/components/Grid.js
CHANGED
|
@@ -318,7 +318,8 @@ function GridRow(props) {
|
|
|
318
318
|
className,
|
|
319
319
|
dataTour,
|
|
320
320
|
tag: Tag,
|
|
321
|
-
htmlFor
|
|
321
|
+
htmlFor,
|
|
322
|
+
onClick
|
|
322
323
|
} = props;
|
|
323
324
|
const fillClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
324
325
|
prefix: 'fill_',
|
|
@@ -336,7 +337,8 @@ function GridRow(props) {
|
|
|
336
337
|
id: id,
|
|
337
338
|
htmlFor: htmlFor,
|
|
338
339
|
style: gridRowStyles,
|
|
339
|
-
"data-tour": dataTour
|
|
340
|
+
"data-tour": dataTour,
|
|
341
|
+
onClick: onClick
|
|
340
342
|
}, children);
|
|
341
343
|
}
|
|
342
344
|
GridRow.propTypes = {
|
|
@@ -49,6 +49,7 @@ const notificationItemConfig = {
|
|
|
49
49
|
};
|
|
50
50
|
function NotificationItem(props) {
|
|
51
51
|
const {
|
|
52
|
+
id,
|
|
52
53
|
appearance,
|
|
53
54
|
closeButton,
|
|
54
55
|
after,
|
|
@@ -63,6 +64,7 @@ function NotificationItem(props) {
|
|
|
63
64
|
title,
|
|
64
65
|
titleTextSize,
|
|
65
66
|
titleTextColor,
|
|
67
|
+
onClickClose,
|
|
66
68
|
className
|
|
67
69
|
} = props;
|
|
68
70
|
const fillClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
@@ -83,7 +85,8 @@ function NotificationItem(props) {
|
|
|
83
85
|
size: textSize,
|
|
84
86
|
textColor: textColor || notificationItemConfig.appearance[appearance] && notificationItemConfig.appearance[appearance].textColor.replace(/([A-Z])/g, '-$1').toLowerCase()
|
|
85
87
|
}, text), closeButton && /*#__PURE__*/React__default.default.createElement("div", {
|
|
86
|
-
|
|
88
|
+
onClick: () => onClickClose(id),
|
|
89
|
+
className: clsx__default.default('notification__item-close', onClickClose && 'cursor_type_pointer')
|
|
87
90
|
}, closeButton)), after);
|
|
88
91
|
}
|
|
89
92
|
NotificationItem.propTypes = {
|
|
@@ -119,6 +122,7 @@ function NotificationList(props) {
|
|
|
119
122
|
className: "notification__wrapper"
|
|
120
123
|
}, notifications.map((notification, i) => /*#__PURE__*/React__default.default.createElement(NotificationItem, {
|
|
121
124
|
key: i,
|
|
125
|
+
id: notification.id,
|
|
122
126
|
type: notification.type || type,
|
|
123
127
|
set: notification.set || set,
|
|
124
128
|
size: notification.size || size,
|
|
@@ -126,7 +130,7 @@ function NotificationList(props) {
|
|
|
126
130
|
text: notification.text,
|
|
127
131
|
status: notification.status,
|
|
128
132
|
closeButton: closeButton,
|
|
129
|
-
|
|
133
|
+
onClickClose: hideNotifications
|
|
130
134
|
}))));
|
|
131
135
|
}
|
|
132
136
|
NotificationList.propTypes = {
|