diginet-core-ui 1.4.6 → 1.4.7
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/components/button/icon.js +6 -7
- package/components/button/index.js +6 -10
- package/package.json +1 -1
- package/readme.md +3 -0
|
@@ -98,10 +98,9 @@ const ButtonIcon = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
98
98
|
css: [_ButtonRootCSS, _ButtonSizeCSS],
|
|
99
99
|
ref: ref,
|
|
100
100
|
id: id,
|
|
101
|
-
disabled: disabled,
|
|
102
101
|
style: style,
|
|
103
102
|
onClick: _onClick,
|
|
104
|
-
className: classNames('DGN-UI-ButtonIcon', viewType, size, className)
|
|
103
|
+
className: classNames('DGN-UI-ButtonIcon', disabled && 'disabled', viewType, size, className)
|
|
105
104
|
}, loading && IconLoadingView(iconSize), !loading && jsx("span", {
|
|
106
105
|
className: 'DGN-UI-ButtonIcon-Icon',
|
|
107
106
|
css: _ButtonIconCSS
|
|
@@ -181,7 +180,7 @@ const ButtonRootCSS = (circular, colorHover, color, name, isColorDefault, viewTy
|
|
|
181
180
|
}
|
|
182
181
|
`)}// &:hover | &:focus | &:active
|
|
183
182
|
`}
|
|
184
|
-
|
|
183
|
+
&.disabled {
|
|
185
184
|
${borderColor('system/disabled')};
|
|
186
185
|
${bgColor('transparent')};
|
|
187
186
|
}
|
|
@@ -210,9 +209,8 @@ const ButtonRootCSS = (circular, colorHover, color, name, isColorDefault, viewTy
|
|
|
210
209
|
${bgColor(colorHover)};
|
|
211
210
|
}
|
|
212
211
|
`}
|
|
213
|
-
|
|
212
|
+
&.disabled {
|
|
214
213
|
${bgColor('fill/disabled')};
|
|
215
|
-
filter: brightness(1);
|
|
216
214
|
}
|
|
217
215
|
`}
|
|
218
216
|
${viewType === 'text' && css`
|
|
@@ -238,7 +236,7 @@ const ButtonRootCSS = (circular, colorHover, color, name, isColorDefault, viewTy
|
|
|
238
236
|
}
|
|
239
237
|
`)}
|
|
240
238
|
`}
|
|
241
|
-
|
|
239
|
+
&.disabled {
|
|
242
240
|
${bgColor('transparent')};
|
|
243
241
|
}
|
|
244
242
|
`}
|
|
@@ -265,9 +263,10 @@ const ButtonRootCSS = (circular, colorHover, color, name, isColorDefault, viewTy
|
|
|
265
263
|
}
|
|
266
264
|
`}
|
|
267
265
|
`}
|
|
268
|
-
|
|
266
|
+
&.disabled {
|
|
269
267
|
${cursorNotAllowed};
|
|
270
268
|
${textColor('system/disabled')};
|
|
269
|
+
filter: brightness(1);
|
|
271
270
|
}
|
|
272
271
|
`;
|
|
273
272
|
ButtonIcon.defaultProps = {
|
|
@@ -193,8 +193,7 @@ const Button = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
193
193
|
onClick: _onClick,
|
|
194
194
|
id: id,
|
|
195
195
|
type: type,
|
|
196
|
-
|
|
197
|
-
className: classNames('DGN-UI-Button', viewType, size, className),
|
|
196
|
+
className: classNames('DGN-UI-Button', disabled && 'disabled', viewType, size, className),
|
|
198
197
|
href: urlState || null,
|
|
199
198
|
...props
|
|
200
199
|
}, start, jsx(Typography, {
|
|
@@ -282,7 +281,7 @@ const ButtonRootCSS = (color, isColorDefault, viewType, loading) => css`
|
|
|
282
281
|
}
|
|
283
282
|
`)} // &:hover | &:focus | &:active
|
|
284
283
|
`}
|
|
285
|
-
|
|
284
|
+
&.disabled {
|
|
286
285
|
${borderColor('system/disabled')};
|
|
287
286
|
${bgColor('transparent')};
|
|
288
287
|
}
|
|
@@ -311,9 +310,8 @@ const ButtonRootCSS = (color, isColorDefault, viewType, loading) => css`
|
|
|
311
310
|
${bgColor('system/active')};
|
|
312
311
|
}
|
|
313
312
|
`}
|
|
314
|
-
|
|
313
|
+
&.disabled {
|
|
315
314
|
${bgColor('fill/disabled')};
|
|
316
|
-
filter: brightness(1);
|
|
317
315
|
}
|
|
318
316
|
`}
|
|
319
317
|
${viewType === 'text' && css`
|
|
@@ -339,7 +337,7 @@ const ButtonRootCSS = (color, isColorDefault, viewType, loading) => css`
|
|
|
339
337
|
}
|
|
340
338
|
`)}
|
|
341
339
|
`}
|
|
342
|
-
|
|
340
|
+
&.disabled {
|
|
343
341
|
${bgColor('transparent')};
|
|
344
342
|
}
|
|
345
343
|
`}
|
|
@@ -357,13 +355,11 @@ const ButtonRootCSS = (color, isColorDefault, viewType, loading) => css`
|
|
|
357
355
|
&:active {
|
|
358
356
|
filter: brightness(0.7);
|
|
359
357
|
}
|
|
360
|
-
:disabled {
|
|
361
|
-
filter: brightness(1);
|
|
362
|
-
}
|
|
363
358
|
`}
|
|
364
|
-
|
|
359
|
+
&.disabled {
|
|
365
360
|
${cursorNotAllowed};
|
|
366
361
|
${textColor('system/disabled')};
|
|
362
|
+
filter: brightness(1);
|
|
367
363
|
}
|
|
368
364
|
`;
|
|
369
365
|
Button.defaultProps = {
|
package/package.json
CHANGED