@veracity/vui 2.22.3 → 2.23.0
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/button/button.d.ts.map +1 -1
- package/dist/cjs/button/button.js +12 -5
- package/dist/cjs/button/button.js.map +1 -1
- package/dist/cjs/icons/baseIcons/cul/culReupload.d.ts +4 -0
- package/dist/cjs/icons/baseIcons/cul/culReupload.d.ts.map +1 -0
- package/dist/cjs/icons/baseIcons/cul/culReupload.js +9 -0
- package/dist/cjs/icons/baseIcons/cul/culReupload.js.map +1 -0
- package/dist/cjs/icons/baseIcons/icons.d.ts +1 -0
- package/dist/cjs/icons/baseIcons/icons.d.ts.map +1 -1
- package/dist/cjs/icons/baseIcons/icons.js +10 -8
- package/dist/cjs/icons/baseIcons/icons.js.map +1 -1
- package/dist/cjs/icons/baseIcons/types.d.ts +1 -1
- package/dist/cjs/icons/baseIcons/types.d.ts.map +1 -1
- package/dist/cjs/input/input.d.ts.map +1 -1
- package/dist/cjs/input/input.js +7 -3
- package/dist/cjs/input/input.js.map +1 -1
- package/dist/cjs/input/input.types.d.ts +2 -0
- package/dist/cjs/input/input.types.d.ts.map +1 -1
- package/dist/esm/button/button.d.ts.map +1 -1
- package/dist/esm/button/button.js +8 -1
- package/dist/esm/button/button.js.map +1 -1
- package/dist/esm/icons/baseIcons/cul/culReupload.d.ts +4 -0
- package/dist/esm/icons/baseIcons/cul/culReupload.d.ts.map +1 -0
- package/dist/esm/icons/baseIcons/cul/culReupload.js +7 -0
- package/dist/esm/icons/baseIcons/cul/culReupload.js.map +1 -0
- package/dist/esm/icons/baseIcons/icons.d.ts +1 -0
- package/dist/esm/icons/baseIcons/icons.d.ts.map +1 -1
- package/dist/esm/icons/baseIcons/icons.js +1 -0
- package/dist/esm/icons/baseIcons/icons.js.map +1 -1
- package/dist/esm/icons/baseIcons/types.d.ts +1 -1
- package/dist/esm/icons/baseIcons/types.d.ts.map +1 -1
- package/dist/esm/input/input.d.ts.map +1 -1
- package/dist/esm/input/input.js +7 -3
- package/dist/esm/input/input.js.map +1 -1
- package/dist/esm/input/input.types.d.ts +2 -0
- package/dist/esm/input/input.types.d.ts.map +1 -1
- package/dist/tsconfig.legacy.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/button/button.tsx +9 -0
- package/src/icons/baseIcons/cul/culReupload.ts +9 -0
- package/src/icons/baseIcons/icons.ts +1 -0
- package/src/icons/baseIcons/types.ts +1 -0
- package/src/input/input.tsx +9 -2
- package/src/input/input.types.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veracity/vui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.23.0",
|
|
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/button/button.tsx
CHANGED
|
@@ -103,6 +103,14 @@ export const Button = vui<'button', ButtonProps>((props, ref) => {
|
|
|
103
103
|
|
|
104
104
|
if (title) ariaLabel = title
|
|
105
105
|
|
|
106
|
+
const isActiveProps = isActive
|
|
107
|
+
? filterUndefined({
|
|
108
|
+
bg: styles?.container?.activeBg,
|
|
109
|
+
borderBg: styles?.container?.activeBorderBg,
|
|
110
|
+
color: styles?.container?.activeColor,
|
|
111
|
+
})
|
|
112
|
+
: {}
|
|
113
|
+
|
|
106
114
|
const disabledProps = disabled
|
|
107
115
|
? {
|
|
108
116
|
'aria-disabled': disabled,
|
|
@@ -146,6 +154,7 @@ export const Button = vui<'button', ButtonProps>((props, ref) => {
|
|
|
146
154
|
type="button"
|
|
147
155
|
variant={variant}
|
|
148
156
|
{...buttonStyles}
|
|
157
|
+
{...isActiveProps}
|
|
149
158
|
{...disabledProps}
|
|
150
159
|
{...aliasedProps}
|
|
151
160
|
{...rest}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
|
|
3
|
+
import { IconDefinition } from '../../types'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
details: [32, 32, [], '', ['M16.1746 12C11.6888 12 8 15.5352 8 19.9597C8 22.8477 9.42228 25.6066 12.3468 27.1453L12.377 27.1612L12.4081 27.175C15.0889 28.36 17.4329 28.0824 19.0992 27.497C19.9255 27.2067 20.5833 26.8422 21.0378 26.5479C21.2657 26.4003 21.4443 26.2692 21.5695 26.1718C21.6322 26.1231 21.6817 26.0827 21.7174 26.0527L21.7341 26.0386L21.7607 26.0158L21.7745 26.0036L21.7795 25.9993L21.7815 25.9975L21.7823 25.9967C21.7823 25.9967 21.7831 25.996 21.1151 25.2519L21.7831 25.996C22.1941 25.6271 22.2281 24.9948 21.8592 24.5838C21.4912 24.1739 20.8613 24.139 20.4502 24.5049L20.4494 24.5057L20.432 24.5205C20.4142 24.5354 20.3839 24.5602 20.3417 24.5931C20.2571 24.6588 20.1254 24.756 19.9507 24.8691C19.6001 25.0962 19.0843 25.3825 18.4363 25.6101C17.1602 26.0584 15.3644 26.285 13.2481 25.3595C11.0482 24.1887 10 22.1497 10 19.9597C10 16.6967 12.7356 14 16.1746 14C18.0976 14 19.9454 14.8954 21.1445 16.2195H18.8C18.2477 16.2195 17.8 16.6673 17.8 17.2195C17.8 17.7718 18.2477 18.2195 18.8 18.2195H24V13C24 12.4477 23.5523 12 23 12C22.4477 12 22 12.4477 22 13V14.2537C20.4467 12.8643 18.3422 12 16.1746 12Z', 'M6.99785 0C5.3396 0 4 1.34455 4 3V29C4 30.6569 5.34314 32 7 32H25C26.656 32 28 30.6591 28 29.0014V7.92426C28 7.6533 27.9092 7.41971 27.8513 7.28763C27.7829 7.1318 27.6944 6.97431 27.6014 6.82474C27.4145 6.52407 27.1612 6.179 26.8753 5.81847C26.3002 5.0932 25.5359 4.23376 24.754 3.41406C23.9719 2.59425 23.1547 1.79582 22.4699 1.19567C22.1298 0.897547 21.8051 0.633154 21.5237 0.437468C21.3843 0.340433 21.2353 0.246088 21.0867 0.172103C20.97 0.114029 20.7239 0 20.4282 0H6.99785ZM6 3C6 2.44632 6.44697 2 6.99785 2H18.0575V8.71382C18.0575 9.37656 18.5948 9.91382 19.2575 9.91382H26V29.0014C26 29.5528 25.5532 30 25 30H7C6.44772 30 6 29.5523 6 29V3ZM20.0575 7.91382V2H20.2613C20.2923 2.01902 20.3322 2.04493 20.3817 2.07931C20.5751 2.21384 20.8363 2.42331 21.1517 2.69979C21.7782 3.24885 22.5513 4.00256 23.3068 4.79455C24.0624 5.58663 24.7829 6.39862 25.3082 7.06111C25.5725 7.39446 25.7734 7.67235 25.903 7.8808L25.9233 7.91382H20.0575ZM20.1782 1.95487C20.1782 1.95487 20.1831 1.95644 20.1939 1.96177C20.1837 1.9579 20.1782 1.95487 20.1782 1.95487Z']],
|
|
7
|
+
name: 'culReupload',
|
|
8
|
+
pathProps: {"fillRule":"evenodd","clipRule":"evenodd"}
|
|
9
|
+
} as IconDefinition
|
|
@@ -80,6 +80,7 @@ export { default as culListDense } from './cul/culListDense'
|
|
|
80
80
|
export { default as culMapMarkerStar } from './cul/culMapMarkerStar'
|
|
81
81
|
export { default as culNumber1 } from './cul/culNumber1'
|
|
82
82
|
export { default as culPlusThin } from './cul/culPlusThin'
|
|
83
|
+
export { default as culReupload } from './cul/culReupload'
|
|
83
84
|
export { default as culScreenshot } from './cul/culScreenshot'
|
|
84
85
|
export { default as culScreenshotAlt } from './cul/culScreenshotAlt'
|
|
85
86
|
export { default as culShoppingCartPlus } from './cul/culShoppingCartPlus'
|
package/src/input/input.tsx
CHANGED
|
@@ -70,6 +70,7 @@ export const Input = vui<'div', InputProps>((props, ref) => {
|
|
|
70
70
|
max,
|
|
71
71
|
maxLength,
|
|
72
72
|
min,
|
|
73
|
+
minLength,
|
|
73
74
|
name,
|
|
74
75
|
onBlur,
|
|
75
76
|
onChange: onChangeProp,
|
|
@@ -101,8 +102,13 @@ export const Input = vui<'div', InputProps>((props, ref) => {
|
|
|
101
102
|
const context = useMemo(() => filterUndefined({ disabled, size, variant }), [disabled, size, variant])
|
|
102
103
|
|
|
103
104
|
function onChange(e: ChangeEvent) {
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
const inputValue = e.target.value
|
|
106
|
+
|
|
107
|
+
// Limit input length if maxLength is set
|
|
108
|
+
const value = maxLength ? inputValue.slice(0, maxLength) : inputValue
|
|
109
|
+
|
|
110
|
+
setValueInternal(value)
|
|
111
|
+
setCount(value?.length)
|
|
106
112
|
onChangeProp?.(e)
|
|
107
113
|
}
|
|
108
114
|
|
|
@@ -184,6 +190,7 @@ export const Input = vui<'div', InputProps>((props, ref) => {
|
|
|
184
190
|
max,
|
|
185
191
|
maxLength,
|
|
186
192
|
min,
|
|
193
|
+
minLength,
|
|
187
194
|
name,
|
|
188
195
|
onBlur,
|
|
189
196
|
onChange,
|
package/src/input/input.types.ts
CHANGED
|
@@ -60,6 +60,8 @@ export type InputProps = SystemProps &
|
|
|
60
60
|
/** Passed to the inner input. */
|
|
61
61
|
min?: number | string
|
|
62
62
|
/** Passed to the inner input. */
|
|
63
|
+
minLength?: number
|
|
64
|
+
/** Passed to the inner input. */
|
|
63
65
|
name?: string
|
|
64
66
|
/** Passed to the inner input. */
|
|
65
67
|
onBlur?: FocusEventHandler
|