@veracity/vui 2.14.8-beta.0 → 2.14.8-beta.2
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/dist/cjs/input/consts.d.ts +6 -0
- package/dist/cjs/input/consts.d.ts.map +1 -1
- package/dist/cjs/input/consts.js +7 -1
- package/dist/cjs/input/input.d.ts.map +1 -1
- package/dist/cjs/input/input.js +1 -1
- package/dist/esm/input/consts.d.ts +6 -0
- package/dist/esm/input/consts.d.ts.map +1 -1
- package/dist/esm/input/consts.js +6 -0
- package/dist/esm/input/input.d.ts.map +1 -1
- package/dist/esm/input/input.js +2 -2
- package/package.json +1 -1
- package/src/input/consts.ts +7 -0
- package/src/input/input.tsx +9 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../src/input/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEjD,eAAO,MAAM,WAAW;;;;;;;;;;;CAWvB,CAAA;AAED,eAAO,MAAM,UAAU;;;;CAItB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAuB/B,CAAA;AAED,eAAO,MAAM,wBAAwB;;;;;CAKpC,CAAA"}
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../src/input/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEjD,eAAO,MAAM,WAAW;;;;;;;;;;;CAWvB,CAAA;AAED,eAAO,MAAM,UAAU;;;;CAItB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAuB/B,CAAA;AAED,eAAO,MAAM,wBAAwB;;;;;CAKpC,CAAA;AAED,eAAO,MAAM,aAAa;;;;;CAKzB,CAAA"}
|
package/dist/cjs/input/consts.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.displayValueOnlyTextSize = exports.inputStateMapping = exports.stateIcons = exports.inputColors = void 0;
|
|
3
|
+
exports.clearIconSize = exports.displayValueOnlyTextSize = exports.inputStateMapping = exports.stateIcons = exports.inputColors = void 0;
|
|
4
4
|
exports.inputColors = {
|
|
5
5
|
border: 'sandstone.60',
|
|
6
6
|
placeholder: 'sandstone.55',
|
|
@@ -48,3 +48,9 @@ exports.displayValueOnlyTextSize = {
|
|
|
48
48
|
lg: 'md',
|
|
49
49
|
xl: 'lg'
|
|
50
50
|
};
|
|
51
|
+
exports.clearIconSize = {
|
|
52
|
+
sm: 'sm',
|
|
53
|
+
md: 'sm',
|
|
54
|
+
lg: 'md',
|
|
55
|
+
xl: 'lg'
|
|
56
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/input/input.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA+B,YAAY,EAAE,MAAM,SAAS,CAAA;AAOnE,OAAO,QAAQ,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,SAAS,MAAM,aAAa,CAAA;AACnC,OAAO,UAAU,MAAM,cAAc,CAAA;AAErC,eAAO,MAAM,SAAS,+HAmBrB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,KAAK;
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/input/input.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA+B,YAAY,EAAE,MAAM,SAAS,CAAA;AAOnE,OAAO,QAAQ,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,SAAS,MAAM,aAAa,CAAA;AACnC,OAAO,UAAU,MAAM,cAAc,CAAA;AAErC,eAAO,MAAM,SAAS,+HAmBrB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,KAAK;UAuKV,gBAAgB;WACf,iBAAiB;cACd,eAAe;CAC1B,CAAA;AAOD,eAAe,KAAK,CAAA"}
|
package/dist/cjs/input/input.js
CHANGED
|
@@ -138,7 +138,7 @@ exports.Input = (0, core_1.vui)((props, ref) => {
|
|
|
138
138
|
(0, utils_1.isString)(iconRight) ? react_1.default.createElement(inputIcon_1.default, { mr: 1, name: iconRight }) : iconRight,
|
|
139
139
|
itemRight,
|
|
140
140
|
state && react_1.default.createElement(inputIcon_1.default, Object.assign({ mr: 1 }, (_b = states[state]) === null || _b === void 0 ? void 0 : _b.iconProps)),
|
|
141
|
-
allowClear && (react_1.default.createElement(button_1.IconButton, { disabled: !valueInternal, icon: "falTimes", mr: 0.5, onClick: onClear, title: "Clear" })),
|
|
141
|
+
allowClear && (react_1.default.createElement(button_1.IconButton, { disabled: !valueInternal, icon: "falTimes", mr: 0.5, onClick: onClear, size: consts_1.clearIconSize[size], title: "Clear" })),
|
|
142
142
|
showCount && (react_1.default.createElement(t_1.T, { className: "vui-inputCount", color: maxLength && count > maxLength ? consts_1.inputColors.error : consts_1.inputColors.helpText, position: "absolute", right: 0, size: "sm", top: "calc(100% + 1px)" },
|
|
143
143
|
count,
|
|
144
144
|
" ",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../src/input/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEjD,eAAO,MAAM,WAAW;;;;;;;;;;;CAWvB,CAAA;AAED,eAAO,MAAM,UAAU;;;;CAItB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAuB/B,CAAA;AAED,eAAO,MAAM,wBAAwB;;;;;CAKpC,CAAA"}
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../src/input/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEjD,eAAO,MAAM,WAAW;;;;;;;;;;;CAWvB,CAAA;AAED,eAAO,MAAM,UAAU;;;;CAItB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAuB/B,CAAA;AAED,eAAO,MAAM,wBAAwB;;;;;CAKpC,CAAA;AAED,eAAO,MAAM,aAAa;;;;;CAKzB,CAAA"}
|
package/dist/esm/input/consts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/input/input.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA+B,YAAY,EAAE,MAAM,SAAS,CAAA;AAOnE,OAAO,QAAQ,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,SAAS,MAAM,aAAa,CAAA;AACnC,OAAO,UAAU,MAAM,cAAc,CAAA;AAErC,eAAO,MAAM,SAAS,+HAmBrB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,KAAK;
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/input/input.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA+B,YAAY,EAAE,MAAM,SAAS,CAAA;AAOnE,OAAO,QAAQ,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,SAAS,MAAM,aAAa,CAAA;AACnC,OAAO,UAAU,MAAM,cAAc,CAAA;AAErC,eAAO,MAAM,SAAS,+HAmBrB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,KAAK;UAuKV,gBAAgB;WACf,iBAAiB;cACd,eAAe;CAC1B,CAAA;AAOD,eAAe,KAAK,CAAA"}
|
package/dist/esm/input/input.js
CHANGED
|
@@ -4,7 +4,7 @@ import { styled, useStyleConfig, vui } from '../core';
|
|
|
4
4
|
import { T } from '../t';
|
|
5
5
|
import { cs, filterUndefined, isString } from '../utils';
|
|
6
6
|
import AutoCompletePopover from './autoCompletePopover';
|
|
7
|
-
import { displayValueOnlyTextSize, inputColors, inputStateMapping } from './consts';
|
|
7
|
+
import { clearIconSize, displayValueOnlyTextSize, inputColors, inputStateMapping } from './consts';
|
|
8
8
|
import { InputProvider } from './context';
|
|
9
9
|
import { getInitialCount } from './helpers';
|
|
10
10
|
import HelpText from './helpText';
|
|
@@ -97,7 +97,7 @@ export const Input = vui((props, ref) => {
|
|
|
97
97
|
isString(iconRight) ? React.createElement(InputIcon, { mr: 1, name: iconRight }) : iconRight,
|
|
98
98
|
itemRight,
|
|
99
99
|
state && React.createElement(InputIcon, { mr: 1, ...states[state]?.iconProps }),
|
|
100
|
-
allowClear && (React.createElement(IconButton, { disabled: !valueInternal, icon: "falTimes", mr: 0.5, onClick: onClear, title: "Clear" })),
|
|
100
|
+
allowClear && (React.createElement(IconButton, { disabled: !valueInternal, icon: "falTimes", mr: 0.5, onClick: onClear, size: clearIconSize[size], title: "Clear" })),
|
|
101
101
|
showCount && (React.createElement(T, { className: "vui-inputCount", color: maxLength && count > maxLength ? inputColors.error : inputColors.helpText, position: "absolute", right: 0, size: "sm", top: "calc(100% + 1px)" },
|
|
102
102
|
count,
|
|
103
103
|
" ",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veracity/vui",
|
|
3
|
-
"version": "2.14.8-beta.
|
|
3
|
+
"version": "2.14.8-beta.2",
|
|
4
4
|
"description": "Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
package/src/input/consts.ts
CHANGED
package/src/input/input.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { styled, useStyleConfig, vui, VuiComponent } from '../core'
|
|
|
5
5
|
import { T } from '../t'
|
|
6
6
|
import { ChangeEvent, cs, filterUndefined, isString } from '../utils'
|
|
7
7
|
import AutoCompletePopover from './autoCompletePopover'
|
|
8
|
-
import { displayValueOnlyTextSize, inputColors, inputStateMapping } from './consts'
|
|
8
|
+
import { clearIconSize, displayValueOnlyTextSize, inputColors, inputStateMapping } from './consts'
|
|
9
9
|
import { InputProvider } from './context'
|
|
10
10
|
import { getInitialCount } from './helpers'
|
|
11
11
|
import HelpText from './helpText'
|
|
@@ -176,7 +176,14 @@ export const Input = vui<'div', InputProps>((props, ref) => {
|
|
|
176
176
|
{itemRight}
|
|
177
177
|
{state && <InputIcon mr={1} {...states[state]?.iconProps} />}
|
|
178
178
|
{allowClear && (
|
|
179
|
-
<IconButton
|
|
179
|
+
<IconButton
|
|
180
|
+
disabled={!valueInternal}
|
|
181
|
+
icon="falTimes"
|
|
182
|
+
mr={0.5}
|
|
183
|
+
onClick={onClear}
|
|
184
|
+
size={clearIconSize[size] as 'md' | 'sm' | 'lg'}
|
|
185
|
+
title="Clear"
|
|
186
|
+
/>
|
|
180
187
|
)}
|
|
181
188
|
{showCount && (
|
|
182
189
|
<T
|