@veracity/vui 0.0.15 → 0.2.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/avatar/avatar.js +2 -2
- package/box/box.js +1 -1
- package/button/button.d.ts +7 -1
- package/button/button.js +56 -23
- package/button/button.types.d.ts +8 -6
- package/button/buttonIcon.d.ts +3 -0
- package/{alert/alertText.js → button/buttonIcon.js} +9 -9
- package/button/buttonText.d.ts +3 -0
- package/button/buttonText.js +30 -0
- package/button/buttons.d.ts +4 -3
- package/button/buttons.js +4 -3
- package/button/consts.js +3 -2
- package/button/context.d.ts +2 -2
- package/button/context.js +4 -4
- package/button/index.d.ts +2 -2
- package/button/index.js +2 -2
- package/button/theme.d.ts +79 -41
- package/button/theme.js +85 -46
- package/{button → buttonGroup}/buttonGroup.d.ts +3 -1
- package/{button → buttonGroup}/buttonGroup.js +4 -2
- package/buttonGroup/context.d.ts +4 -0
- package/buttonGroup/context.js +23 -0
- package/buttonGroup/helpers.d.ts +3 -0
- package/buttonGroup/helpers.js +10 -0
- package/buttonGroup/index.d.ts +4 -0
- package/{alert → buttonGroup}/index.js +4 -8
- package/card/card.d.ts +3 -0
- package/{tile/tile.js → card/card.js} +8 -7
- package/{tile/tile.types.d.ts → card/card.types.d.ts} +1 -1
- package/card/index.d.ts +3 -0
- package/{tile → card}/index.js +4 -4
- package/card/theme.d.ts +6 -0
- package/card/theme.js +10 -0
- package/checkbox/checkbox.js +4 -4
- package/checkbox/checkbox.types.d.ts +1 -1
- package/checkbox/checkboxGroup.types.d.ts +1 -1
- package/core/globalStyle.d.ts +4 -1
- package/core/globalStyle.js +7 -3
- package/core/index.d.ts +2 -0
- package/core/index.js +5 -1
- package/core/styled.d.ts +4 -0
- package/core/styled.js +80 -0
- package/core/types/component.d.ts +12 -12
- package/core/types/index.d.ts +1 -0
- package/core/types/index.js +1 -0
- package/core/types/styled.d.ts +11 -0
- package/core/utils.d.ts +2 -2
- package/core/utils.js +7 -7
- package/core/v.d.ts +182 -0
- package/core/v.js +6 -0
- package/core/vuiProvider.d.ts +13 -2
- package/core/vuiProvider.js +1 -1
- package/divider/divider.types.d.ts +1 -1
- package/heading/heading.types.d.ts +2 -1
- package/icon/helpers.d.ts +2 -3
- package/icon/helpers.js +6 -8
- package/icon/icon.js +3 -2
- package/icon/icon.types.d.ts +4 -2
- package/icons/library.js +1 -1
- package/icons/types.d.ts +1 -1
- package/image/image.d.ts +3 -0
- package/image/image.js +38 -0
- package/image/image.types.d.ts +5 -0
- package/image/index.d.ts +3 -0
- package/{label → image}/index.js +4 -4
- package/image/theme.d.ts +6 -0
- package/image/theme.js +10 -0
- package/index.d.ts +6 -3
- package/index.js +6 -3
- package/input/context.d.ts +4 -0
- package/{alert → input}/context.js +4 -4
- package/input/index.d.ts +2 -0
- package/input/index.js +2 -0
- package/input/input.d.ts +7 -2
- package/input/input.js +33 -22
- package/input/input.types.d.ts +7 -3
- package/input/inputIcon.d.ts +3 -0
- package/input/inputIcon.js +30 -0
- package/input/inputInput.d.ts +5 -0
- package/input/inputInput.js +36 -0
- package/input/theme.d.ts +40 -15
- package/input/theme.js +40 -16
- package/list/index.d.ts +3 -1
- package/list/index.js +3 -1
- package/list/list.d.ts +2 -0
- package/list/list.js +3 -1
- package/list/list.types.d.ts +19 -1
- package/list/listHeading.d.ts +2 -2
- package/list/listHeading.js +2 -2
- package/list/listIcon.js +1 -1
- package/list/listItem.d.ts +1 -1
- package/list/listItem.js +8 -5
- package/list/listText.d.ts +3 -0
- package/list/listText.js +30 -0
- package/list/theme.d.ts +20 -6
- package/list/theme.js +26 -12
- package/notification/consts.d.ts +2 -0
- package/{alert → notification}/consts.js +7 -7
- package/notification/context.d.ts +4 -0
- package/notification/context.js +23 -0
- package/notification/index.d.ts +8 -0
- package/notification/index.js +25 -0
- package/notification/notification.d.ts +13 -0
- package/{alert/alert.js → notification/notification.js} +25 -25
- package/notification/notification.types.d.ts +20 -0
- package/notification/notificationButton.d.ts +3 -0
- package/{alert/alertButton.js → notification/notificationButton.js} +8 -8
- package/notification/notificationIcon.d.ts +3 -0
- package/{alert/alertIcon.js → notification/notificationIcon.js} +9 -9
- package/notification/notificationText.d.ts +3 -0
- package/notification/notificationText.js +30 -0
- package/notification/notificationTitle.d.ts +3 -0
- package/notification/notificationTitle.js +30 -0
- package/{alert → notification}/theme.d.ts +0 -15
- package/{alert → notification}/theme.js +1 -22
- package/package.json +2 -3
- package/panel/index.d.ts +3 -0
- package/panel/index.js +20 -0
- package/panel/panel.d.ts +3 -0
- package/panel/panel.js +39 -0
- package/panel/panel.types.d.ts +4 -0
- package/{tile → panel}/theme.d.ts +1 -8
- package/{tile → panel}/theme.js +4 -11
- package/radio/radio.js +4 -4
- package/radio/radio.types.d.ts +1 -1
- package/radio/radioGroup.types.d.ts +1 -1
- package/skeleton/skeleton.types.d.ts +1 -0
- package/spinner/spinner.types.d.ts +1 -0
- package/svg/cache.js +1 -5
- package/svg/svg.js +2 -3
- package/switch/index.d.ts +0 -1
- package/switch/index.js +0 -1
- package/switch/switch.js +6 -6
- package/switch/switch.types.d.ts +19 -4
- package/switch/switchButton.d.ts +2 -2
- package/switch/switchButton.js +18 -19
- package/switch/theme.d.ts +41 -46
- package/switch/theme.js +50 -72
- package/system/borders.d.ts +3 -1
- package/system/custom.d.ts +24 -7
- package/system/custom.js +33 -13
- package/system/system.d.ts +2 -2
- package/system/system.js +1 -1
- package/t/t.types.d.ts +2 -1
- package/tag/context.d.ts +4 -0
- package/tag/context.js +23 -0
- package/tag/index.d.ts +6 -0
- package/tag/index.js +23 -0
- package/tag/tag.d.ts +11 -0
- package/tag/tag.js +99 -0
- package/{label/label.types.d.ts → tag/tag.types.d.ts} +6 -7
- package/tag/tag.types.js +2 -0
- package/tag/tagIcon.d.ts +3 -0
- package/{alert/alertTitle.js → tag/tagIcon.js} +9 -9
- package/tag/tagText.d.ts +3 -0
- package/tag/tagText.js +30 -0
- package/tag/theme.d.ts +65 -0
- package/tag/theme.js +78 -0
- package/textarea/textarea.js +2 -1
- package/textarea/textarea.types.d.ts +1 -0
- package/theme/components.d.ts +291 -223
- package/theme/components.js +32 -28
- package/theme/defaultTheme.d.ts +291 -223
- package/utils/assertion.d.ts +14 -0
- package/utils/assertion.js +34 -0
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -0
- package/utils/object.d.ts +5 -18
- package/utils/object.js +17 -50
- package/utils/types.d.ts +2 -0
- package/alert/alert.d.ts +0 -13
- package/alert/alert.types.d.ts +0 -20
- package/alert/alertButton.d.ts +0 -3
- package/alert/alertIcon.d.ts +0 -3
- package/alert/alertText.d.ts +0 -3
- package/alert/alertTitle.d.ts +0 -3
- package/alert/consts.d.ts +0 -2
- package/alert/context.d.ts +0 -4
- package/alert/index.d.ts +0 -8
- package/label/index.d.ts +0 -3
- package/label/label.d.ts +0 -5
- package/label/label.js +0 -71
- package/label/theme.d.ts +0 -61
- package/label/theme.js +0 -107
- package/list/listItem.types.d.ts +0 -16
- package/switch/switchButton.types.d.ts +0 -19
- package/tile/index.d.ts +0 -3
- package/tile/tile.d.ts +0 -3
- /package/{button → buttonGroup}/buttonGroup.types.d.ts +0 -0
- /package/{button → buttonGroup}/buttonGroup.types.js +0 -0
- /package/{alert/alert.types.js → card/card.types.js} +0 -0
- /package/{label/label.types.js → core/types/styled.js} +0 -0
- /package/{list/listItem.types.js → image/image.types.js} +0 -0
- /package/{switch/switchButton.types.js → notification/notification.types.js} +0 -0
- /package/{tile/tile.types.js → panel/panel.types.js} +0 -0
package/tag/theme.d.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Dict } from '../utils';
|
|
2
|
+
declare function variantSolid(props: Dict): {
|
|
3
|
+
container: {
|
|
4
|
+
hoverBg: string;
|
|
5
|
+
activeBg: string;
|
|
6
|
+
bg: string;
|
|
7
|
+
color: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
declare function variantSubtle(props: Dict): {
|
|
11
|
+
container: {
|
|
12
|
+
hoverBg: string;
|
|
13
|
+
activeBg: string;
|
|
14
|
+
bg: string;
|
|
15
|
+
color: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
declare const _default: {
|
|
19
|
+
defaultProps: {
|
|
20
|
+
colorScheme: string;
|
|
21
|
+
size: string;
|
|
22
|
+
variant: string;
|
|
23
|
+
};
|
|
24
|
+
parts: string[];
|
|
25
|
+
sizes: {
|
|
26
|
+
sm: {
|
|
27
|
+
container: {
|
|
28
|
+
fontSize: string;
|
|
29
|
+
h: number;
|
|
30
|
+
spaceX: number;
|
|
31
|
+
};
|
|
32
|
+
icon: {
|
|
33
|
+
size: string;
|
|
34
|
+
};
|
|
35
|
+
text: {};
|
|
36
|
+
};
|
|
37
|
+
md: {
|
|
38
|
+
container: {
|
|
39
|
+
fontSize: string;
|
|
40
|
+
h: number;
|
|
41
|
+
spaceX: number;
|
|
42
|
+
};
|
|
43
|
+
icon: {
|
|
44
|
+
size: string;
|
|
45
|
+
};
|
|
46
|
+
text: {};
|
|
47
|
+
};
|
|
48
|
+
lg: {
|
|
49
|
+
container: {
|
|
50
|
+
fontSize: string;
|
|
51
|
+
h: number;
|
|
52
|
+
spaceX: number;
|
|
53
|
+
};
|
|
54
|
+
icon: {
|
|
55
|
+
size: string;
|
|
56
|
+
};
|
|
57
|
+
text: {};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
variants: {
|
|
61
|
+
solid: typeof variantSolid;
|
|
62
|
+
subtle: typeof variantSubtle;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
export default _default;
|
package/tag/theme.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function variantSolid(props) {
|
|
4
|
+
var c = props.colorScheme;
|
|
5
|
+
var container = {
|
|
6
|
+
hoverBg: c + ".90",
|
|
7
|
+
activeBg: c + ".100",
|
|
8
|
+
bg: c + ".80",
|
|
9
|
+
color: 'white'
|
|
10
|
+
};
|
|
11
|
+
if (c === 'yellow') {
|
|
12
|
+
container.hoverBg = c + ".80";
|
|
13
|
+
container.activeBg = c + ".90";
|
|
14
|
+
container.bg = c + ".70";
|
|
15
|
+
}
|
|
16
|
+
return { container: container };
|
|
17
|
+
}
|
|
18
|
+
function variantSubtle(props) {
|
|
19
|
+
var c = props.colorScheme;
|
|
20
|
+
var container = {
|
|
21
|
+
hoverBg: c + ".30",
|
|
22
|
+
activeBg: c + ".40",
|
|
23
|
+
bg: c + ".20",
|
|
24
|
+
color: 'prussian.80'
|
|
25
|
+
};
|
|
26
|
+
return { container: container };
|
|
27
|
+
}
|
|
28
|
+
var defaultProps = {
|
|
29
|
+
colorScheme: 'blue',
|
|
30
|
+
size: 'md',
|
|
31
|
+
variant: 'subtle'
|
|
32
|
+
};
|
|
33
|
+
var parts = ['container', 'icon', 'text'];
|
|
34
|
+
var sizes = {
|
|
35
|
+
sm: {
|
|
36
|
+
container: {
|
|
37
|
+
fontSize: 'sm',
|
|
38
|
+
h: 24,
|
|
39
|
+
spaceX: 4
|
|
40
|
+
},
|
|
41
|
+
icon: {
|
|
42
|
+
size: 'xs'
|
|
43
|
+
},
|
|
44
|
+
text: {}
|
|
45
|
+
},
|
|
46
|
+
md: {
|
|
47
|
+
container: {
|
|
48
|
+
fontSize: 'sm',
|
|
49
|
+
h: 32,
|
|
50
|
+
spaceX: 6
|
|
51
|
+
},
|
|
52
|
+
icon: {
|
|
53
|
+
size: 'sm'
|
|
54
|
+
},
|
|
55
|
+
text: {}
|
|
56
|
+
},
|
|
57
|
+
lg: {
|
|
58
|
+
container: {
|
|
59
|
+
fontSize: 'md',
|
|
60
|
+
h: 40,
|
|
61
|
+
spaceX: 8
|
|
62
|
+
},
|
|
63
|
+
icon: {
|
|
64
|
+
size: 'md'
|
|
65
|
+
},
|
|
66
|
+
text: {}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
var variants = {
|
|
70
|
+
solid: variantSolid,
|
|
71
|
+
subtle: variantSubtle
|
|
72
|
+
};
|
|
73
|
+
exports.default = {
|
|
74
|
+
defaultProps: defaultProps,
|
|
75
|
+
parts: parts,
|
|
76
|
+
sizes: sizes,
|
|
77
|
+
variants: variants
|
|
78
|
+
};
|
package/textarea/textarea.js
CHANGED
|
@@ -76,7 +76,7 @@ exports.TextareaTextarea = styled_components_1.default.textarea.withConfig(core_
|
|
|
76
76
|
exports.TextareaBase = styled_components_1.default.div.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\tdisplay: flex;\n\tflex-direction: column;\n\tmin-height: 80px;\n\tposition: relative;\n\twidth: 100%;\n\n\t", "\n"], ["\n\tdisplay: flex;\n\tflex-direction: column;\n\tmin-height: 80px;\n\tposition: relative;\n\twidth: 100%;\n\n\t", "\n"])), system_1.system);
|
|
77
77
|
exports.Textarea = core_1.vui(function (props, ref) {
|
|
78
78
|
var _a = __read(react_1.useState(helpers_1.getInitialCount(props)), 2), count = _a[0], setCount = _a[1];
|
|
79
|
-
var _b = core_1.omitThemingProps(props), autoFocus = _b.autoFocus, className = _b.className, colorSchemeProp = _b.colorScheme, defaultValue = _b.defaultValue, disabled = _b.disabled, isInvalid = _b.isInvalid, maxLength = _b.maxLength, name = _b.name, onBlur = _b.onBlur, onChangeProp = _b.onChange, onFocus = _b.onFocus, placeholder = _b.placeholder, readOnly = _b.readOnly, required = _b.required, resize = _b.resize, showCount = _b.showCount, _c = _b.textareaProps, textareaProps = _c === void 0 ? {} : _c, textareaRef = _b.textareaRef, value = _b.value, rest = __rest(_b, ["autoFocus", "className", "colorScheme", "defaultValue", "disabled", "isInvalid", "maxLength", "name", "onBlur", "onChange", "onFocus", "placeholder", "readOnly", "required", "resize", "showCount", "textareaProps", "textareaRef", "value"]);
|
|
79
|
+
var _b = core_1.omitThemingProps(props), autoFocus = _b.autoFocus, className = _b.className, colorSchemeProp = _b.colorScheme, defaultValue = _b.defaultValue, disabled = _b.disabled, id = _b.id, isInvalid = _b.isInvalid, maxLength = _b.maxLength, name = _b.name, onBlur = _b.onBlur, onChangeProp = _b.onChange, onFocus = _b.onFocus, placeholder = _b.placeholder, readOnly = _b.readOnly, required = _b.required, resize = _b.resize, showCount = _b.showCount, _c = _b.textareaProps, textareaProps = _c === void 0 ? {} : _c, textareaRef = _b.textareaRef, value = _b.value, rest = __rest(_b, ["autoFocus", "className", "colorScheme", "defaultValue", "disabled", "id", "isInvalid", "maxLength", "name", "onBlur", "onChange", "onFocus", "placeholder", "readOnly", "required", "resize", "showCount", "textareaProps", "textareaRef", "value"]);
|
|
80
80
|
var colorProps = utils_1.filterUndefined({
|
|
81
81
|
colorScheme: colorSchemeProp !== null && colorSchemeProp !== void 0 ? colorSchemeProp : (isInvalid ? 'red' : undefined)
|
|
82
82
|
});
|
|
@@ -95,6 +95,7 @@ exports.Textarea = core_1.vui(function (props, ref) {
|
|
|
95
95
|
autoFocus: autoFocus,
|
|
96
96
|
defaultValue: defaultValue,
|
|
97
97
|
disabled: disabled,
|
|
98
|
+
id: id,
|
|
98
99
|
maxLength: maxLength,
|
|
99
100
|
name: name,
|
|
100
101
|
onBlur: onBlur,
|
|
@@ -4,6 +4,7 @@ import { SystemProps } from '../system';
|
|
|
4
4
|
import { ThemingProps } from '../theme';
|
|
5
5
|
export interface TextareaProps extends SystemProps, ThemingProps<'Textarea'> {
|
|
6
6
|
autoFocus?: boolean;
|
|
7
|
+
children?: never;
|
|
7
8
|
colorScheme?: 'green' | 'grey' | 'red';
|
|
8
9
|
cols?: number;
|
|
9
10
|
defaultValue?: number | string;
|