glints-aries 4.1.30 → 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.
- package/es/@next/Badge/Badge.d.ts +1 -1
- package/es/@next/Badge/Badge.js +1 -1
- package/es/@next/Badge/BadgeStyle.js +2 -2
- package/es/@next/CurrencyInput/CurrencyInput.d.ts +2 -0
- package/es/@next/CurrencyInput/CurrencyInput.js +4 -2
- package/lib/@next/Badge/Badge.d.ts +1 -1
- package/lib/@next/Badge/Badge.js +1 -1
- package/lib/@next/Badge/BadgeStyle.js +2 -2
- package/lib/@next/CurrencyInput/CurrencyInput.d.ts +2 -0
- package/lib/@next/CurrencyInput/CurrencyInput.js +4 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const badgeStatusVariant: readonly ["neutral", "success", "successBright", "information", "warning", "critical", "promotion", "enticing", "attention", "primary"];
|
|
2
|
+
declare const badgeStatusVariant: readonly ["neutral", "success", "successBright", "information", "warning", "critical", "promotion", "enticing", "attention", "primary", "branding"];
|
|
3
3
|
export declare type BadgeStatusVariant = (typeof badgeStatusVariant)[number];
|
|
4
4
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
children?: React.ReactNode;
|
package/es/@next/Badge/Badge.js
CHANGED
|
@@ -4,7 +4,7 @@ var _excluded = ["children", "hasBorder", "status", "textColor"];
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Typography } from '../Typography';
|
|
6
6
|
import { BadgeStyle, badgeTextColor } from './BadgeStyle';
|
|
7
|
-
var badgeStatusVariant = ['neutral', 'success', 'successBright', 'information', 'warning', 'critical', 'promotion', 'enticing', 'attention', 'primary'];
|
|
7
|
+
var badgeStatusVariant = ['neutral', 'success', 'successBright', 'information', 'warning', 'critical', 'promotion', 'enticing', 'attention', 'primary', 'branding'];
|
|
8
8
|
var renderTextColor = function renderTextColor(textColor, status) {
|
|
9
9
|
if (textColor) {
|
|
10
10
|
return textColor;
|
|
@@ -3,8 +3,8 @@ import styled from 'styled-components';
|
|
|
3
3
|
import { borderRadius20 } from '../utilities/borderRadius';
|
|
4
4
|
import { Blue, Green, Neutral, Orange, Red, Yellow } from '../utilities/colors';
|
|
5
5
|
import { space8 } from '../utilities/spacing';
|
|
6
|
-
var badgeBackgroundColor = (_badgeBackgroundColor = {}, _badgeBackgroundColor['neutral'] = Neutral.B95, _badgeBackgroundColor['success'] = Green.B89, _badgeBackgroundColor['successBright'] = Green.B61, _badgeBackgroundColor['information'] = Blue.S08, _badgeBackgroundColor['warning'] = Orange.S21, _badgeBackgroundColor['critical'] = Red.B100, _badgeBackgroundColor['promotion'] = Yellow.S75, _badgeBackgroundColor['enticing'] = Orange.S87, _badgeBackgroundColor['attention'] = Red.B93, _badgeBackgroundColor['primary'] = Blue.S99, _badgeBackgroundColor);
|
|
7
|
-
export var badgeTextColor = (_badgeTextColor = {}, _badgeTextColor['neutral'] = Neutral.B18, _badgeTextColor['success'] = Neutral.B18, _badgeTextColor['successBright'] = Neutral.B100, _badgeTextColor['information'] = Neutral.B18, _badgeTextColor['warning'] = Neutral.B18, _badgeTextColor['critical'] = Neutral.B18, _badgeTextColor['promotion'] = Neutral.B18, _badgeTextColor['enticing'] = Neutral.B100, _badgeTextColor['attention'] = Neutral.B100, _badgeTextColor['primary'] = Neutral.B100, _badgeTextColor);
|
|
6
|
+
var badgeBackgroundColor = (_badgeBackgroundColor = {}, _badgeBackgroundColor['neutral'] = Neutral.B95, _badgeBackgroundColor['success'] = Green.B89, _badgeBackgroundColor['successBright'] = Green.B61, _badgeBackgroundColor['information'] = Blue.S08, _badgeBackgroundColor['warning'] = Orange.S21, _badgeBackgroundColor['critical'] = Red.B100, _badgeBackgroundColor['promotion'] = Yellow.S75, _badgeBackgroundColor['enticing'] = Orange.S87, _badgeBackgroundColor['attention'] = Red.B93, _badgeBackgroundColor['primary'] = Blue.S99, _badgeBackgroundColor['branding'] = Blue.Brand, _badgeBackgroundColor);
|
|
7
|
+
export var badgeTextColor = (_badgeTextColor = {}, _badgeTextColor['neutral'] = Neutral.B18, _badgeTextColor['success'] = Neutral.B18, _badgeTextColor['successBright'] = Neutral.B100, _badgeTextColor['information'] = Neutral.B18, _badgeTextColor['warning'] = Neutral.B18, _badgeTextColor['critical'] = Neutral.B18, _badgeTextColor['promotion'] = Neutral.B18, _badgeTextColor['enticing'] = Neutral.B100, _badgeTextColor['attention'] = Neutral.B100, _badgeTextColor['primary'] = Neutral.B100, _badgeTextColor['branding'] = Neutral.B100, _badgeTextColor);
|
|
8
8
|
var getBadgeBackgroundColor = function getBadgeBackgroundColor(status) {
|
|
9
9
|
if (!(status in badgeBackgroundColor)) {
|
|
10
10
|
console.warn(status + " is not a valid status, default will be used");
|
|
@@ -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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const badgeStatusVariant: readonly ["neutral", "success", "successBright", "information", "warning", "critical", "promotion", "enticing", "attention", "primary"];
|
|
2
|
+
declare const badgeStatusVariant: readonly ["neutral", "success", "successBright", "information", "warning", "critical", "promotion", "enticing", "attention", "primary", "branding"];
|
|
3
3
|
export declare type BadgeStatusVariant = (typeof badgeStatusVariant)[number];
|
|
4
4
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
children?: React.ReactNode;
|
package/lib/@next/Badge/Badge.js
CHANGED
|
@@ -9,7 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _Typography = require("../Typography");
|
|
10
10
|
var _BadgeStyle = require("./BadgeStyle");
|
|
11
11
|
var _excluded = ["children", "hasBorder", "status", "textColor"];
|
|
12
|
-
var badgeStatusVariant = ['neutral', 'success', 'successBright', 'information', 'warning', 'critical', 'promotion', 'enticing', 'attention', 'primary'];
|
|
12
|
+
var badgeStatusVariant = ['neutral', 'success', 'successBright', 'information', 'warning', 'critical', 'promotion', 'enticing', 'attention', 'primary', 'branding'];
|
|
13
13
|
var renderTextColor = function renderTextColor(textColor, status) {
|
|
14
14
|
if (textColor) {
|
|
15
15
|
return textColor;
|
|
@@ -8,8 +8,8 @@ var _borderRadius = require("../utilities/borderRadius");
|
|
|
8
8
|
var _colors = require("../utilities/colors");
|
|
9
9
|
var _spacing = require("../utilities/spacing");
|
|
10
10
|
var _badgeBackgroundColor, _badgeTextColor;
|
|
11
|
-
var badgeBackgroundColor = (_badgeBackgroundColor = {}, _badgeBackgroundColor['neutral'] = _colors.Neutral.B95, _badgeBackgroundColor['success'] = _colors.Green.B89, _badgeBackgroundColor['successBright'] = _colors.Green.B61, _badgeBackgroundColor['information'] = _colors.Blue.S08, _badgeBackgroundColor['warning'] = _colors.Orange.S21, _badgeBackgroundColor['critical'] = _colors.Red.B100, _badgeBackgroundColor['promotion'] = _colors.Yellow.S75, _badgeBackgroundColor['enticing'] = _colors.Orange.S87, _badgeBackgroundColor['attention'] = _colors.Red.B93, _badgeBackgroundColor['primary'] = _colors.Blue.S99, _badgeBackgroundColor);
|
|
12
|
-
var badgeTextColor = (_badgeTextColor = {}, _badgeTextColor['neutral'] = _colors.Neutral.B18, _badgeTextColor['success'] = _colors.Neutral.B18, _badgeTextColor['successBright'] = _colors.Neutral.B100, _badgeTextColor['information'] = _colors.Neutral.B18, _badgeTextColor['warning'] = _colors.Neutral.B18, _badgeTextColor['critical'] = _colors.Neutral.B18, _badgeTextColor['promotion'] = _colors.Neutral.B18, _badgeTextColor['enticing'] = _colors.Neutral.B100, _badgeTextColor['attention'] = _colors.Neutral.B100, _badgeTextColor['primary'] = _colors.Neutral.B100, _badgeTextColor);
|
|
11
|
+
var badgeBackgroundColor = (_badgeBackgroundColor = {}, _badgeBackgroundColor['neutral'] = _colors.Neutral.B95, _badgeBackgroundColor['success'] = _colors.Green.B89, _badgeBackgroundColor['successBright'] = _colors.Green.B61, _badgeBackgroundColor['information'] = _colors.Blue.S08, _badgeBackgroundColor['warning'] = _colors.Orange.S21, _badgeBackgroundColor['critical'] = _colors.Red.B100, _badgeBackgroundColor['promotion'] = _colors.Yellow.S75, _badgeBackgroundColor['enticing'] = _colors.Orange.S87, _badgeBackgroundColor['attention'] = _colors.Red.B93, _badgeBackgroundColor['primary'] = _colors.Blue.S99, _badgeBackgroundColor['branding'] = _colors.Blue.Brand, _badgeBackgroundColor);
|
|
12
|
+
var badgeTextColor = (_badgeTextColor = {}, _badgeTextColor['neutral'] = _colors.Neutral.B18, _badgeTextColor['success'] = _colors.Neutral.B18, _badgeTextColor['successBright'] = _colors.Neutral.B100, _badgeTextColor['information'] = _colors.Neutral.B18, _badgeTextColor['warning'] = _colors.Neutral.B18, _badgeTextColor['critical'] = _colors.Neutral.B18, _badgeTextColor['promotion'] = _colors.Neutral.B18, _badgeTextColor['enticing'] = _colors.Neutral.B100, _badgeTextColor['attention'] = _colors.Neutral.B100, _badgeTextColor['primary'] = _colors.Neutral.B100, _badgeTextColor['branding'] = _colors.Neutral.B100, _badgeTextColor);
|
|
13
13
|
exports.badgeTextColor = badgeTextColor;
|
|
14
14
|
var getBadgeBackgroundColor = function getBadgeBackgroundColor(status) {
|
|
15
15
|
if (!(status in badgeBackgroundColor)) {
|
|
@@ -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
|