glints-aries 4.1.31 → 4.1.32

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.
@@ -4,6 +4,7 @@ export declare type CurrencyInputProps = Omit<InputProps, 'type' | 'prefix' | 'o
4
4
  locale?: string;
5
5
  value?: number | null;
6
6
  allowEmptyValue?: boolean;
7
+ showPrefix?: boolean;
7
8
  onChange?: (value: number | undefined) => void;
8
9
  currencyCode: string;
9
10
  currencySymbol?: string;
@@ -12,6 +13,7 @@ export declare const CurrencyInput: React.ForwardRefExoticComponent<Omit<InputPr
12
13
  locale?: string;
13
14
  value?: number | null;
14
15
  allowEmptyValue?: boolean;
16
+ showPrefix?: boolean;
15
17
  onChange?: (value: number | undefined) => void;
16
18
  currencyCode: string;
17
19
  currencySymbol?: string;
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
- var _excluded = ["locale", "value", "allowEmptyValue", "onChange", "currencyCode", "currencySymbol"];
3
+ var _excluded = ["locale", "value", "allowEmptyValue", "showPrefix", "onChange", "currencyCode", "currencySymbol"];
4
4
  import React from 'react';
5
5
  import { Input } from '../Input/Input';
6
6
  export var CurrencyInput = /*#__PURE__*/React.forwardRef(function CurrencyInput(_ref, ref) {
@@ -10,6 +10,8 @@ export var CurrencyInput = /*#__PURE__*/React.forwardRef(function CurrencyInput(
10
10
  value = _ref.value,
11
11
  _ref$allowEmptyValue = _ref.allowEmptyValue,
12
12
  allowEmptyValue = _ref$allowEmptyValue === void 0 ? false : _ref$allowEmptyValue,
13
+ _ref$showPrefix = _ref.showPrefix,
14
+ showPrefix = _ref$showPrefix === void 0 ? true : _ref$showPrefix,
13
15
  onChange = _ref.onChange,
14
16
  currencyCode = _ref.currencyCode,
15
17
  currencySymbol = _ref.currencySymbol,
@@ -64,7 +66,7 @@ export var CurrencyInput = /*#__PURE__*/React.forwardRef(function CurrencyInput(
64
66
  return /*#__PURE__*/React.createElement(Input, _extends({
65
67
  ref: ref,
66
68
  type: "text",
67
- prefix: /*#__PURE__*/React.createElement("div", null, getCurrencySymbol(localeValue, currencyCode, currencySymbol))
69
+ prefix: showPrefix && /*#__PURE__*/React.createElement("div", null, getCurrencySymbol(localeValue, currencyCode, currencySymbol))
68
70
  }, props, {
69
71
  value: formattedValue,
70
72
  onChange: handleChange
@@ -4,6 +4,7 @@ export declare type CurrencyInputProps = Omit<InputProps, 'type' | 'prefix' | 'o
4
4
  locale?: string;
5
5
  value?: number | null;
6
6
  allowEmptyValue?: boolean;
7
+ showPrefix?: boolean;
7
8
  onChange?: (value: number | undefined) => void;
8
9
  currencyCode: string;
9
10
  currencySymbol?: string;
@@ -12,6 +13,7 @@ export declare const CurrencyInput: React.ForwardRefExoticComponent<Omit<InputPr
12
13
  locale?: string;
13
14
  value?: number | null;
14
15
  allowEmptyValue?: boolean;
16
+ showPrefix?: boolean;
15
17
  onChange?: (value: number | undefined) => void;
16
18
  currencyCode: string;
17
19
  currencySymbol?: string;
@@ -7,7 +7,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
7
7
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _Input = require("../Input/Input");
10
- var _excluded = ["locale", "value", "allowEmptyValue", "onChange", "currencyCode", "currencySymbol"];
10
+ var _excluded = ["locale", "value", "allowEmptyValue", "showPrefix", "onChange", "currencyCode", "currencySymbol"];
11
11
  var CurrencyInput = /*#__PURE__*/_react["default"].forwardRef(function CurrencyInput(_ref, ref) {
12
12
  var _formatter$format;
13
13
  var _ref$locale = _ref.locale,
@@ -15,6 +15,8 @@ var CurrencyInput = /*#__PURE__*/_react["default"].forwardRef(function CurrencyI
15
15
  value = _ref.value,
16
16
  _ref$allowEmptyValue = _ref.allowEmptyValue,
17
17
  allowEmptyValue = _ref$allowEmptyValue === void 0 ? false : _ref$allowEmptyValue,
18
+ _ref$showPrefix = _ref.showPrefix,
19
+ showPrefix = _ref$showPrefix === void 0 ? true : _ref$showPrefix,
18
20
  onChange = _ref.onChange,
19
21
  currencyCode = _ref.currencyCode,
20
22
  currencySymbol = _ref.currencySymbol,
@@ -69,7 +71,7 @@ var CurrencyInput = /*#__PURE__*/_react["default"].forwardRef(function CurrencyI
69
71
  return /*#__PURE__*/_react["default"].createElement(_Input.Input, (0, _extends2["default"])({
70
72
  ref: ref,
71
73
  type: "text",
72
- prefix: /*#__PURE__*/_react["default"].createElement("div", null, getCurrencySymbol(localeValue, currencyCode, currencySymbol))
74
+ prefix: showPrefix && /*#__PURE__*/_react["default"].createElement("div", null, getCurrencySymbol(localeValue, currencyCode, currencySymbol))
73
75
  }, props, {
74
76
  value: formattedValue,
75
77
  onChange: handleChange
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glints-aries",
3
- "version": "4.1.31",
3
+ "version": "4.1.32",
4
4
  "description": "Glints ui-kit for frontend",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",