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.
@@ -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
- :disabled {
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
- :disabled {
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
- :disabled {
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
- :disabled {
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
- disabled: disabled,
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
- :disabled {
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
- :disabled {
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
- :disabled {
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
- :disabled {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diginet-core-ui",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "description": "The DigiNet core ui",
5
5
  "homepage": "https://diginet.com.vn",
6
6
  "main": "index.js",
package/readme.md CHANGED
@@ -38,6 +38,9 @@ npm test
38
38
  ```
39
39
 
40
40
  ## Changelog
41
+ ## 1.4.7
42
+ - \[Changed\]: Button – Remove attribute disabled in button tag
43
+
41
44
  ## 1.4.6
42
45
  - \[Added\]: Icon – Add MoneyHand
43
46
  - \[Changed\]: DatePicker – Add default placeholder