glints-aries 4.0.205 → 4.0.207

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.
@@ -1,7 +1,7 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange'> {
3
3
  id?: string;
4
- label?: string;
4
+ label?: ReactNode;
5
5
  hasError?: boolean;
6
6
  indeterminate?: boolean;
7
7
  checked?: boolean;
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
3
  var _excluded = ["canClear", "suffix", "value", "onChange"];
4
- import React, { useState } from 'react';
4
+ import React, { useEffect, useState } from 'react';
5
5
  import { Icon } from '../Icon';
6
6
  import { Input } from '../Input/Input';
7
7
  export var TextInput = /*#__PURE__*/React.forwardRef(function TextInput(_ref, ref) {
@@ -38,6 +38,9 @@ export var TextInput = /*#__PURE__*/React.forwardRef(function TextInput(_ref, re
38
38
  setSuffixValue(currSuffix);
39
39
  onChange == null ? void 0 : onChange(e);
40
40
  };
41
+ useEffect(function () {
42
+ setSuffixValue(suffix);
43
+ }, [suffix]);
41
44
  return /*#__PURE__*/React.createElement(Input, _extends({
42
45
  ref: ref,
43
46
  type: "text",
@@ -1,7 +1,7 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange'> {
3
3
  id?: string;
4
- label?: string;
4
+ label?: ReactNode;
5
5
  hasError?: boolean;
6
6
  indeterminate?: boolean;
7
7
  checked?: boolean;
@@ -45,6 +45,9 @@ var TextInput = /*#__PURE__*/_react["default"].forwardRef(function TextInput(_re
45
45
  setSuffixValue(currSuffix);
46
46
  onChange == null ? void 0 : onChange(e);
47
47
  };
48
+ (0, _react.useEffect)(function () {
49
+ setSuffixValue(suffix);
50
+ }, [suffix]);
48
51
  return /*#__PURE__*/_react["default"].createElement(_Input.Input, (0, _extends2["default"])({
49
52
  ref: ref,
50
53
  type: "text",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glints-aries",
3
- "version": "4.0.205",
3
+ "version": "4.0.207",
4
4
  "description": "Glints ui-kit for frontend",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",