@veracity/vui 2.0.0 → 2.0.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/footer/footerHeading.d.ts.map +1 -1
- package/dist/cjs/footer/footerHeading.js +1 -1
- package/dist/cjs/footer/footerLink.js +1 -1
- package/dist/cjs/input/input.d.ts.map +1 -1
- package/dist/cjs/input/input.js +3 -4
- package/dist/esm/footer/footerHeading.d.ts.map +1 -1
- package/dist/esm/footer/footerHeading.js +1 -1
- package/dist/esm/footer/footerLink.js +1 -1
- package/dist/esm/input/input.d.ts.map +1 -1
- package/dist/esm/input/input.js +3 -4
- package/package.json +1 -1
- package/src/footer/footerHeading.tsx +9 -1
- package/src/footer/footerLink.tsx +1 -1
- package/src/input/input.tsx +3 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footerHeading.d.ts","sourceRoot":"","sources":["../../../src/footer/footerHeading.tsx"],"names":[],"mappings":"AAGA,OAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAIlD,kCAAkC;AAClC,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"footerHeading.d.ts","sourceRoot":"","sources":["../../../src/footer/footerHeading.tsx"],"names":[],"mappings":"AAGA,OAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAIlD,kCAAkC;AAClC,eAAO,MAAM,aAAa,oDAexB,CAAA;AAEF,eAAe,aAAa,CAAA"}
|
|
@@ -24,6 +24,6 @@ const context_1 = require("./context");
|
|
|
24
24
|
exports.FooterHeading = (0, core_1.vui)((props, ref) => {
|
|
25
25
|
const { className } = props, rest = __rest(props, ["className"]);
|
|
26
26
|
const styles = (0, core_1.useStyleConfig)('Footer', (0, context_1.useFooterContext)());
|
|
27
|
-
return (react_1.default.createElement(heading_1.default, Object.assign({ className: (0, utils_1.cs)('vui-footerHeading', className), mb: 1, ref: ref, size: "h5" }, styles.heading, rest)));
|
|
27
|
+
return (react_1.default.createElement(heading_1.default, Object.assign({ className: (0, utils_1.cs)('vui-footerHeading', className), color: "white", mb: 1, ref: ref, size: "h5" }, styles.heading, rest)));
|
|
28
28
|
});
|
|
29
29
|
exports.default = exports.FooterHeading;
|
|
@@ -24,6 +24,6 @@ const context_1 = require("./context");
|
|
|
24
24
|
exports.FooterLink = (0, core_1.vui)((props, ref) => {
|
|
25
25
|
const { className } = props, rest = __rest(props, ["className"]);
|
|
26
26
|
const styles = (0, core_1.useStyleConfig)('Footer', (0, context_1.useFooterContext)());
|
|
27
|
-
return (react_1.default.createElement(link_1.default, Object.assign({ className: (0, utils_1.cs)('vui-footerLink', className),
|
|
27
|
+
return (react_1.default.createElement(link_1.default, Object.assign({ className: (0, utils_1.cs)('vui-footerLink', className), py: 0.5, ref: ref, size: "sm", variant: "white" }, styles.link, rest)));
|
|
28
28
|
});
|
|
29
29
|
exports.default = exports.FooterLink;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/input/input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA+B,YAAY,EAAE,MAAM,SAAS,CAAA;AAMnE,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,+
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/input/input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA+B,YAAY,EAAE,MAAM,SAAS,CAAA;AAMnE,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,+HAgBrB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,KAAK;UA+HV,gBAAgB;WACf,iBAAiB;cACd,eAAe;CAC1B,CAAA;AAMD,eAAe,KAAK,CAAA"}
|
package/dist/cjs/input/input.js
CHANGED
|
@@ -61,8 +61,7 @@ exports.InputBase = core_1.styled.divBox `
|
|
|
61
61
|
width: 100%;
|
|
62
62
|
|
|
63
63
|
&[aria-disabled='true'] {
|
|
64
|
-
|
|
65
|
-
color: disabled.color;
|
|
64
|
+
opacity: 0.5;
|
|
66
65
|
cursor: not-allowed;
|
|
67
66
|
}
|
|
68
67
|
`;
|
|
@@ -75,7 +74,7 @@ exports.Input = (0, core_1.vui)((props, ref) => {
|
|
|
75
74
|
var _a, _b, _c, _d;
|
|
76
75
|
const { autoComplete, autoFocus, children, className, colorScheme, defaultValue, disabled, errorText, iconLeft, iconRight, id, input, inputProps, inputRef, isInvalid, itemLeft, itemRight, helpText, max, maxLength, min, name, onBlur, onChange: onChangeProp, onFocus, pattern, placeholder, readOnly, required, showCount, size, state = '', stateMapping, step, type = 'text', value, variant } = props, rest = __rest(props, ["autoComplete", "autoFocus", "children", "className", "colorScheme", "defaultValue", "disabled", "errorText", "iconLeft", "iconRight", "id", "input", "inputProps", "inputRef", "isInvalid", "itemLeft", "itemRight", "helpText", "max", "maxLength", "min", "name", "onBlur", "onChange", "onFocus", "pattern", "placeholder", "readOnly", "required", "showCount", "size", "state", "stateMapping", "step", "type", "value", "variant"]);
|
|
77
76
|
const [count, setCount] = (0, react_1.useState)((0, helpers_1.getInitialCount)(props));
|
|
78
|
-
const [valueInternal, setValueInternal] = (0, react_1.useState)(defaultValue);
|
|
77
|
+
const [valueInternal, setValueInternal] = (0, react_1.useState)(defaultValue || '');
|
|
79
78
|
const states = Object.assign(Object.assign({}, consts_1.inputStateMapping), stateMapping);
|
|
80
79
|
const computedColorScheme = (0, utils_1.filterUndefined)({
|
|
81
80
|
colorScheme: (_a = colorScheme !== null && colorScheme !== void 0 ? colorScheme : (isInvalid ? consts_1.redColor : undefined)) !== null && _a !== void 0 ? _a : (_b = states[state]) === null || _b === void 0 ? void 0 : _b.colorScheme
|
|
@@ -95,7 +94,7 @@ exports.Input = (0, core_1.vui)((props, ref) => {
|
|
|
95
94
|
});
|
|
96
95
|
(0, react_1.useEffect)(() => {
|
|
97
96
|
var _a;
|
|
98
|
-
setValueInternal(value);
|
|
97
|
+
setValueInternal(value !== null && value !== void 0 ? value : '');
|
|
99
98
|
setCount(((_a = `${value}`) === null || _a === void 0 ? void 0 : _a.length) ? `${value}`.length : 0);
|
|
100
99
|
}, [value]);
|
|
101
100
|
return (react_1.default.createElement(context_1.InputProvider, { value: context },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footerHeading.d.ts","sourceRoot":"","sources":["../../../src/footer/footerHeading.tsx"],"names":[],"mappings":"AAGA,OAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAIlD,kCAAkC;AAClC,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"footerHeading.d.ts","sourceRoot":"","sources":["../../../src/footer/footerHeading.tsx"],"names":[],"mappings":"AAGA,OAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAIlD,kCAAkC;AAClC,eAAO,MAAM,aAAa,oDAexB,CAAA;AAEF,eAAe,aAAa,CAAA"}
|
|
@@ -7,6 +7,6 @@ import { useFooterContext } from './context';
|
|
|
7
7
|
export const FooterHeading = vui((props, ref) => {
|
|
8
8
|
const { className, ...rest } = props;
|
|
9
9
|
const styles = useStyleConfig('Footer', useFooterContext());
|
|
10
|
-
return (React.createElement(Heading, { className: cs('vui-footerHeading', className), mb: 1, ref: ref, size: "h5", ...styles.heading, ...rest }));
|
|
10
|
+
return (React.createElement(Heading, { className: cs('vui-footerHeading', className), color: "white", mb: 1, ref: ref, size: "h5", ...styles.heading, ...rest }));
|
|
11
11
|
});
|
|
12
12
|
export default FooterHeading;
|
|
@@ -7,6 +7,6 @@ import { useFooterContext } from './context';
|
|
|
7
7
|
export const FooterLink = vui((props, ref) => {
|
|
8
8
|
const { className, ...rest } = props;
|
|
9
9
|
const styles = useStyleConfig('Footer', useFooterContext());
|
|
10
|
-
return (React.createElement(Link, { className: cs('vui-footerLink', className),
|
|
10
|
+
return (React.createElement(Link, { className: cs('vui-footerLink', className), py: 0.5, ref: ref, size: "sm", variant: "white", ...styles.link, ...rest }));
|
|
11
11
|
});
|
|
12
12
|
export default FooterLink;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/input/input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA+B,YAAY,EAAE,MAAM,SAAS,CAAA;AAMnE,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,+
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/input/input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA+B,YAAY,EAAE,MAAM,SAAS,CAAA;AAMnE,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,+HAgBrB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,KAAK;UA+HV,gBAAgB;WACf,iBAAiB;cACd,eAAe;CAC1B,CAAA;AAMD,eAAe,KAAK,CAAA"}
|
package/dist/esm/input/input.js
CHANGED
|
@@ -21,8 +21,7 @@ export const InputBase = styled.divBox `
|
|
|
21
21
|
width: 100%;
|
|
22
22
|
|
|
23
23
|
&[aria-disabled='true'] {
|
|
24
|
-
|
|
25
|
-
color: disabled.color;
|
|
24
|
+
opacity: 0.5;
|
|
26
25
|
cursor: not-allowed;
|
|
27
26
|
}
|
|
28
27
|
`;
|
|
@@ -34,7 +33,7 @@ export const InputBase = styled.divBox `
|
|
|
34
33
|
export const Input = vui((props, ref) => {
|
|
35
34
|
const { autoComplete, autoFocus, children, className, colorScheme, defaultValue, disabled, errorText, iconLeft, iconRight, id, input, inputProps, inputRef, isInvalid, itemLeft, itemRight, helpText, max, maxLength, min, name, onBlur, onChange: onChangeProp, onFocus, pattern, placeholder, readOnly, required, showCount, size, state = '', stateMapping, step, type = 'text', value, variant, ...rest } = props;
|
|
36
35
|
const [count, setCount] = useState(getInitialCount(props));
|
|
37
|
-
const [valueInternal, setValueInternal] = useState(defaultValue);
|
|
36
|
+
const [valueInternal, setValueInternal] = useState(defaultValue || '');
|
|
38
37
|
const states = { ...inputStateMapping, ...stateMapping };
|
|
39
38
|
const computedColorScheme = filterUndefined({
|
|
40
39
|
colorScheme: colorScheme ?? (isInvalid ? redColor : undefined) ?? states[state]?.colorScheme
|
|
@@ -53,7 +52,7 @@ export const Input = vui((props, ref) => {
|
|
|
53
52
|
focusWithinRingColor: readOnly ? 'transparent' : undefined
|
|
54
53
|
});
|
|
55
54
|
useEffect(() => {
|
|
56
|
-
setValueInternal(value);
|
|
55
|
+
setValueInternal(value ?? '');
|
|
57
56
|
setCount(`${value}`?.length ? `${value}`.length : 0);
|
|
58
57
|
}, [value]);
|
|
59
58
|
return (React.createElement(InputProvider, { value: context },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veracity/vui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.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",
|
|
@@ -11,7 +11,15 @@ export const FooterHeading = vui<'h5', HeadingProps>((props, ref) => {
|
|
|
11
11
|
const styles = useStyleConfig('Footer', useFooterContext())
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
|
-
<Heading
|
|
14
|
+
<Heading
|
|
15
|
+
className={cs('vui-footerHeading', className)}
|
|
16
|
+
color="white"
|
|
17
|
+
mb={1}
|
|
18
|
+
ref={ref}
|
|
19
|
+
size="h5"
|
|
20
|
+
{...styles.heading}
|
|
21
|
+
{...rest}
|
|
22
|
+
/>
|
|
15
23
|
)
|
|
16
24
|
})
|
|
17
25
|
|
|
@@ -13,10 +13,10 @@ export const FooterLink = vui<'a', LinkProps>((props, ref) => {
|
|
|
13
13
|
return (
|
|
14
14
|
<Link
|
|
15
15
|
className={cs('vui-footerLink', className)}
|
|
16
|
-
colorScheme="white"
|
|
17
16
|
py={0.5}
|
|
18
17
|
ref={ref}
|
|
19
18
|
size="sm"
|
|
19
|
+
variant="white"
|
|
20
20
|
{...styles.link}
|
|
21
21
|
{...rest}
|
|
22
22
|
/>
|
package/src/input/input.tsx
CHANGED
|
@@ -24,8 +24,7 @@ export const InputBase = styled.divBox`
|
|
|
24
24
|
width: 100%;
|
|
25
25
|
|
|
26
26
|
&[aria-disabled='true'] {
|
|
27
|
-
|
|
28
|
-
color: disabled.color;
|
|
27
|
+
opacity: 0.5;
|
|
29
28
|
cursor: not-allowed;
|
|
30
29
|
}
|
|
31
30
|
`
|
|
@@ -78,7 +77,7 @@ export const Input = vui<'div', InputProps>((props, ref) => {
|
|
|
78
77
|
} = props
|
|
79
78
|
|
|
80
79
|
const [count, setCount] = useState(getInitialCount(props))
|
|
81
|
-
const [valueInternal, setValueInternal] = useState(defaultValue)
|
|
80
|
+
const [valueInternal, setValueInternal] = useState(defaultValue || '')
|
|
82
81
|
const states = { ...inputStateMapping, ...stateMapping }
|
|
83
82
|
const computedColorScheme = filterUndefined({
|
|
84
83
|
colorScheme: colorScheme ?? (isInvalid ? redColor : undefined) ?? states[state]?.colorScheme
|
|
@@ -105,7 +104,7 @@ export const Input = vui<'div', InputProps>((props, ref) => {
|
|
|
105
104
|
})
|
|
106
105
|
|
|
107
106
|
useEffect(() => {
|
|
108
|
-
setValueInternal(value)
|
|
107
|
+
setValueInternal(value ?? '')
|
|
109
108
|
setCount(`${value}`?.length ? `${value}`.length : 0)
|
|
110
109
|
}, [value])
|
|
111
110
|
|