@veracity/vui 0.0.9 → 0.0.11
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/alert/alert.js +3 -3
- package/alert/alert.types.d.ts +2 -1
- package/alert/alertIcon.js +3 -3
- package/alert/alertTitle.d.ts +1 -1
- package/alert/alertTitle.js +1 -1
- package/alert/consts.js +17 -5
- package/avatar/avatar.d.ts +3 -4
- package/avatar/avatar.js +2 -2
- package/avatar/avatar.types.d.ts +2 -6
- package/box/box.d.ts +3 -4
- package/box/box.js +3 -4
- package/box/box.types.d.ts +2 -4
- package/button/button.d.ts +3 -4
- package/button/button.js +19 -14
- package/button/button.types.d.ts +9 -5
- package/button/buttonGroup.d.ts +3 -2
- package/button/buttonGroup.js +3 -4
- package/button/buttonGroup.types.d.ts +2 -4
- package/button/consts.d.ts +2 -0
- package/button/consts.js +26 -0
- package/button/theme.d.ts +1 -0
- package/button/theme.js +1 -0
- package/checkbox/checkbox.d.ts +3 -2
- package/checkbox/checkbox.js +5 -7
- package/checkbox/checkbox.types.d.ts +4 -6
- package/checkbox/checkboxGroup.d.ts +3 -2
- package/checkbox/checkboxGroup.js +3 -4
- package/checkbox/checkboxGroup.types.d.ts +2 -4
- package/divider/divider.d.ts +3 -2
- package/divider/divider.js +3 -4
- package/divider/divider.types.d.ts +2 -4
- package/heading/heading.d.ts +3 -4
- package/heading/heading.js +2 -4
- package/heading/heading.types.d.ts +2 -4
- package/icons/baseIcons/fad/fadSpinnerThird.d.ts +3 -0
- package/icons/baseIcons/fad/fadSpinnerThird.js +7 -0
- package/icons/baseIcons/fal/falSignIn.d.ts +3 -0
- package/icons/baseIcons/fal/falSignIn.js +7 -0
- package/icons/baseIcons/types.d.ts +1 -1
- package/icons/consts.js +2 -0
- package/input/consts.js +13 -7
- package/input/helpers.d.ts +2 -0
- package/input/helpers.js +9 -0
- package/input/input.d.ts +4 -5
- package/input/input.js +66 -13
- package/input/input.types.d.ts +10 -12
- package/input/theme.d.ts +0 -1
- package/input/theme.js +2 -4
- package/label/label.d.ts +3 -4
- package/label/label.js +5 -9
- package/label/label.types.d.ts +2 -5
- package/link/link.d.ts +3 -4
- package/link/link.js +4 -6
- package/link/link.types.d.ts +4 -5
- package/link/theme.d.ts +5 -0
- package/link/theme.js +14 -1
- package/list/list.d.ts +3 -2
- package/list/list.js +3 -4
- package/list/list.types.d.ts +2 -4
- package/list/listItem.d.ts +3 -2
- package/list/listItem.js +3 -4
- package/list/listItem.types.d.ts +2 -4
- package/p/p.d.ts +3 -4
- package/p/p.js +2 -4
- package/p/p.types.d.ts +2 -4
- package/package.json +1 -1
- package/radio/radio.d.ts +3 -2
- package/radio/radio.js +5 -7
- package/radio/radio.types.d.ts +4 -6
- package/radio/radioGroup.d.ts +3 -2
- package/radio/radioGroup.js +3 -4
- package/radio/radioGroup.types.d.ts +2 -4
- package/skeleton/skeleton.d.ts +3 -2
- package/skeleton/skeleton.js +3 -4
- package/skeleton/skeleton.types.d.ts +2 -4
- package/spinner/spinner.js +3 -4
- package/spinner/spinner.types.d.ts +2 -2
- package/svg/svg.d.ts +4 -3
- package/svg/svg.js +8 -8
- package/svg/svg.types.d.ts +3 -11
- package/switch/switch.d.ts +3 -2
- package/switch/switch.js +3 -4
- package/switch/switch.types.d.ts +2 -4
- package/switch/switchButton.d.ts +5 -4
- package/switch/switchButton.js +6 -9
- package/switch/switchButton.types.d.ts +2 -8
- package/system/animations.d.ts +9 -7
- package/system/backgrounds.d.ts +8 -8
- package/system/borders.d.ts +138 -129
- package/system/colors.d.ts +1 -2
- package/system/effects.d.ts +15 -12
- package/system/flexboxes.d.ts +43 -54
- package/system/index.d.ts +2 -0
- package/system/index.js +7 -0
- package/system/interactivity.d.ts +17 -23
- package/system/layout.d.ts +69 -74
- package/system/sizing.d.ts +27 -27
- package/system/space.d.ts +89 -87
- package/system/system.d.ts +17 -0
- package/system/system.js +5 -0
- package/system/transforms.d.ts +53 -53
- package/system/transitions.d.ts +20 -25
- package/system/typography.d.ts +68 -61
- package/t/t.d.ts +3 -4
- package/t/t.js +2 -4
- package/t/t.types.d.ts +2 -4
- package/textarea/helpers.d.ts +2 -0
- package/textarea/helpers.js +9 -0
- package/textarea/textarea.d.ts +5 -5
- package/textarea/textarea.js +79 -10
- package/textarea/textarea.types.d.ts +22 -4
- package/textarea/theme.d.ts +7 -3
- package/textarea/theme.js +7 -4
- package/theme/components.d.ts +12 -4
- package/theme/defaultTheme.d.ts +12 -4
- package/theme/foundations/animations.js +6 -6
- package/tile/tile.types.d.ts +2 -4
package/system/typography.d.ts
CHANGED
|
@@ -1,68 +1,75 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SystemProp, VariantsType } from '@xstyled/system';
|
|
2
2
|
import { Globals, Property } from 'csstype';
|
|
3
3
|
import { ColorGetter } from './colors';
|
|
4
4
|
import { VuiTheme } from '../theme';
|
|
5
|
-
export declare type FontGetter
|
|
6
|
-
export declare type FontSizeGetter
|
|
7
|
-
export declare type FontWeightGetter
|
|
8
|
-
export declare type LineHeightGetter
|
|
9
|
-
declare type FontFamilyProp
|
|
10
|
-
export interface FontFamilyProps
|
|
11
|
-
fontFamily?: FontFamilyProp
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
declare type
|
|
30
|
-
export interface
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
placeholderColor?: ColorProp<T>;
|
|
40
|
-
}
|
|
41
|
-
declare type TextTransformProp<T extends ITheme> = SystemProp<Property.TextTransform, T>;
|
|
42
|
-
export interface TextTransformProps<T extends ITheme = VuiTheme> {
|
|
43
|
-
textTransform?: TextTransformProp<T>;
|
|
44
|
-
hoverTextTransform?: TextTransformProp<T>;
|
|
5
|
+
export declare type FontGetter = VariantsType<VuiTheme['fonts']>;
|
|
6
|
+
export declare type FontSizeGetter = VariantsType<VuiTheme['fontSizes']>;
|
|
7
|
+
export declare type FontWeightGetter = VariantsType<VuiTheme['fontWeights']>;
|
|
8
|
+
export declare type LineHeightGetter = VariantsType<unknown>;
|
|
9
|
+
declare type FontFamilyProp = SystemProp<FontGetter, VuiTheme>;
|
|
10
|
+
export interface FontFamilyProps {
|
|
11
|
+
fontFamily?: FontFamilyProp;
|
|
12
|
+
}
|
|
13
|
+
declare type FontSizeProp = SystemProp<FontSizeGetter, VuiTheme>;
|
|
14
|
+
export interface FontSizeProps {
|
|
15
|
+
fontSize?: FontSizeProp;
|
|
16
|
+
}
|
|
17
|
+
declare type FontStyleProp = SystemProp<Property.FontStyle, VuiTheme>;
|
|
18
|
+
export interface FontStyleProps {
|
|
19
|
+
fontStyle?: FontStyleProp;
|
|
20
|
+
}
|
|
21
|
+
declare type FontWeightProp = SystemProp<FontWeightGetter, VuiTheme>;
|
|
22
|
+
export interface FontWeightProps {
|
|
23
|
+
fontWeight?: FontWeightProp;
|
|
24
|
+
}
|
|
25
|
+
declare type LineHeightProp = SystemProp<LineHeightGetter, VuiTheme>;
|
|
26
|
+
export interface LineHeightProps {
|
|
27
|
+
lineHeight?: LineHeightProp;
|
|
28
|
+
}
|
|
29
|
+
declare type ColorProp = ColorGetter;
|
|
30
|
+
export interface ColorProps {
|
|
31
|
+
color?: ColorProp;
|
|
32
|
+
disabledColor?: ColorProp;
|
|
33
|
+
hoverColor?: ColorProp;
|
|
34
|
+
placeholderColor?: ColorProp;
|
|
35
|
+
}
|
|
36
|
+
declare type TextTransformProp = SystemProp<Property.TextTransform, VuiTheme>;
|
|
37
|
+
export interface TextTransformProps {
|
|
38
|
+
textTransform?: TextTransformProp;
|
|
45
39
|
}
|
|
46
40
|
declare type TextDecoration = Globals | 'overline' | 'underline' | 'line-through';
|
|
47
|
-
declare type TextDecorationProp
|
|
48
|
-
export interface TextDecorationProps
|
|
49
|
-
textDecoration?: TextDecorationProp
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
41
|
+
declare type TextDecorationProp = SystemProp<TextDecoration, VuiTheme>;
|
|
42
|
+
export interface TextDecorationProps {
|
|
43
|
+
textDecoration?: TextDecorationProp;
|
|
44
|
+
}
|
|
45
|
+
declare type TextAlignProp = SystemProp<Property.TextAlign, VuiTheme>;
|
|
46
|
+
export interface TextAlignProps {
|
|
47
|
+
textAlign?: TextAlignProp;
|
|
48
|
+
}
|
|
49
|
+
declare type VerticalAlignProp = SystemProp<Property.VerticalAlign, VuiTheme>;
|
|
50
|
+
export interface VerticalAlignProps {
|
|
51
|
+
verticalAlign?: VerticalAlignProp;
|
|
52
|
+
}
|
|
53
|
+
declare type LetterSpacingProp = SystemProp<Property.LetterSpacing, VuiTheme>;
|
|
54
|
+
export interface LetterSpacingProps {
|
|
55
|
+
letterSpacing?: LetterSpacingProp;
|
|
56
|
+
}
|
|
57
|
+
declare type WhiteSpaceProp = SystemProp<Property.WhiteSpace, VuiTheme>;
|
|
58
|
+
export interface WhiteSpaceProps {
|
|
59
|
+
whiteSpace?: WhiteSpaceProp;
|
|
60
|
+
}
|
|
61
|
+
declare type TextOverflowProp = SystemProp<Property.TextOverflow, VuiTheme>;
|
|
62
|
+
export interface TextOverflowProps {
|
|
63
|
+
textOverflow?: TextOverflowProp;
|
|
64
|
+
}
|
|
65
|
+
declare type ListStyleTypeProp = SystemProp<Property.ListStyleType, VuiTheme>;
|
|
66
|
+
export interface ListStyleTypeProps {
|
|
67
|
+
listStyleType?: ListStyleTypeProp;
|
|
68
|
+
}
|
|
69
|
+
declare type ListStylePositionProp = SystemProp<Property.ListStylePosition, VuiTheme>;
|
|
70
|
+
export interface ListStylePositionProps {
|
|
71
|
+
listStylePosition?: ListStylePositionProp;
|
|
72
|
+
}
|
|
73
|
+
export interface TypographyProps extends FontFamilyProps, FontSizeProps, FontStyleProps, FontWeightProps, LineHeightProps, ColorProps, TextTransformProps, TextDecorationProps, TextAlignProps, VerticalAlignProps, LetterSpacingProps, WhiteSpaceProps, TextOverflowProps, ListStyleTypeProps, ListStylePositionProps {
|
|
67
74
|
}
|
|
68
75
|
export {};
|
package/t/t.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { TProps
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}, never>;
|
|
1
|
+
import { TProps } from './t.types';
|
|
2
|
+
import { SystemProps } from '../system';
|
|
3
|
+
export declare const TBase: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, SystemProps, never>;
|
|
5
4
|
export declare const T: import("../core").VuiComponent<"span", TProps>;
|
|
6
5
|
export default T;
|
package/t/t.js
CHANGED
|
@@ -30,14 +30,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
30
30
|
};
|
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
32
|
exports.T = exports.TBase = void 0;
|
|
33
|
-
var styled_components_1 = require("@xstyled/styled-components");
|
|
34
33
|
var react_1 = __importDefault(require("react"));
|
|
35
|
-
var
|
|
34
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
36
35
|
var core_1 = require("../core");
|
|
37
36
|
var system_1 = require("../system");
|
|
38
37
|
var utils_1 = require("../utils");
|
|
39
|
-
|
|
40
|
-
exports.TBase = styled_components_2.default.span.withConfig(core_1.forwardPropConfig(generator))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), generator);
|
|
38
|
+
exports.TBase = styled_components_1.default.span.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), system_1.system);
|
|
41
39
|
exports.T = core_1.vui(function (props, ref) {
|
|
42
40
|
var _a = core_1.omitThemingProps(props), align = _a.align, casing = _a.casing, centerV = _a.centerV, children = _a.children, className = _a.className, decoration = _a.decoration, isFlex = _a.isFlex, text = _a.text, weight = _a.weight, rest = __rest(_a, ["align", "casing", "centerV", "children", "className", "decoration", "isFlex", "text", "weight"]);
|
|
43
41
|
var styles = core_1.useStyleConfig('T', props);
|
package/t/t.types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SystemProps, TypographyProps } from '../system';
|
|
2
2
|
import { ThemingProps } from '../theme';
|
|
3
|
-
export interface TProps extends
|
|
3
|
+
export interface TProps extends SystemProps, ThemingProps<'T'> {
|
|
4
4
|
align?: TypographyProps['textAlign'];
|
|
5
5
|
casing?: TypographyProps['textTransform'];
|
|
6
6
|
centerV?: boolean;
|
|
@@ -9,5 +9,3 @@ export interface TProps extends TStyleProps, ThemingProps<'T'> {
|
|
|
9
9
|
text?: number | string;
|
|
10
10
|
weight?: TypographyProps['fontWeight'];
|
|
11
11
|
}
|
|
12
|
-
export interface TStyleProps extends BackgroundColorProps, BordersProps, CursorProps, FlexboxesProps, IsTruncatedProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps {
|
|
13
|
-
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getInitialCount = void 0;
|
|
4
|
+
function getInitialCount(props) {
|
|
5
|
+
var _a, _b;
|
|
6
|
+
var defaultValue = props.defaultValue, value = props.value;
|
|
7
|
+
return (_b = (_a = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.toString().length) !== null && _a !== void 0 ? _a : value === null || value === void 0 ? void 0 : value.toString().length) !== null && _b !== void 0 ? _b : 0;
|
|
8
|
+
}
|
|
9
|
+
exports.getInitialCount = getInitialCount;
|
package/textarea/textarea.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TextareaProps
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare const Textarea: import("../core").VuiComponent<"
|
|
1
|
+
import { TextareaProps } from './textarea.types';
|
|
2
|
+
import { SystemProps } from '../system';
|
|
3
|
+
export declare const TextareaTextarea: import("styled-components").StyledComponent<"textarea", import("styled-components").DefaultTheme, SystemProps, never>;
|
|
4
|
+
export declare const TextareaBase: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, SystemProps, never>;
|
|
5
|
+
export declare const Textarea: import("../core").VuiComponent<"div", TextareaProps>;
|
|
6
6
|
export default Textarea;
|
package/textarea/textarea.js
CHANGED
|
@@ -14,6 +14,25 @@ var __assign = (this && this.__assign) || function () {
|
|
|
14
14
|
};
|
|
15
15
|
return __assign.apply(this, arguments);
|
|
16
16
|
};
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
17
36
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
37
|
var t = {};
|
|
19
38
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -25,23 +44,73 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
25
44
|
}
|
|
26
45
|
return t;
|
|
27
46
|
};
|
|
47
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
48
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
49
|
+
if (!m) return o;
|
|
50
|
+
var i = m.call(o), r, ar = [], e;
|
|
51
|
+
try {
|
|
52
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
53
|
+
}
|
|
54
|
+
catch (error) { e = { error: error }; }
|
|
55
|
+
finally {
|
|
56
|
+
try {
|
|
57
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
58
|
+
}
|
|
59
|
+
finally { if (e) throw e.error; }
|
|
60
|
+
}
|
|
61
|
+
return ar;
|
|
62
|
+
};
|
|
28
63
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
64
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
65
|
};
|
|
31
66
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.Textarea = exports.TextareaBase = void 0;
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
67
|
+
exports.Textarea = exports.TextareaBase = exports.TextareaTextarea = void 0;
|
|
68
|
+
var react_1 = __importStar(require("react"));
|
|
69
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
70
|
+
var helpers_1 = require("./helpers");
|
|
36
71
|
var core_1 = require("../core");
|
|
72
|
+
var system_1 = require("../system");
|
|
73
|
+
var t_1 = __importDefault(require("../t"));
|
|
37
74
|
var utils_1 = require("../utils");
|
|
38
|
-
|
|
39
|
-
exports.TextareaBase =
|
|
75
|
+
exports.TextareaTextarea = styled_components_1.default.textarea.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tborder-width: 1px;\n\theight: 100%;\n\toutline: none;\n\tresize: none;\n\twidth: 100%;\n\n\t:disabled,\n\t:disabled::placeholder {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tborder-color: var(--vui-colors-disabled-border);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"], ["\n\tborder-width: 1px;\n\theight: 100%;\n\toutline: none;\n\tresize: none;\n\twidth: 100%;\n\n\t:disabled,\n\t:disabled::placeholder {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tborder-color: var(--vui-colors-disabled-border);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"])), system_1.system);
|
|
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);
|
|
40
77
|
exports.Textarea = core_1.vui(function (props, ref) {
|
|
41
|
-
var _a =
|
|
42
|
-
var
|
|
43
|
-
|
|
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"]);
|
|
80
|
+
var colorProps = utils_1.filterUndefined({
|
|
81
|
+
colorScheme: colorSchemeProp !== null && colorSchemeProp !== void 0 ? colorSchemeProp : (isInvalid ? 'red' : undefined)
|
|
82
|
+
});
|
|
83
|
+
var styles = core_1.useStyleConfig('Textarea', __assign(__assign({}, colorProps), props));
|
|
84
|
+
function onChange(e) {
|
|
85
|
+
setCount(e.target.value.length);
|
|
86
|
+
onChangeProp === null || onChangeProp === void 0 ? void 0 : onChangeProp(e);
|
|
87
|
+
}
|
|
88
|
+
var aliasedProps = utils_1.filterUndefined({
|
|
89
|
+
bg: readOnly ? 'grey.20' : undefined,
|
|
90
|
+
focusBorderColor: !readOnly ? 'transparent' : undefined,
|
|
91
|
+
focusRing: readOnly ? 0 : undefined
|
|
92
|
+
});
|
|
93
|
+
return (react_1.default.createElement(exports.TextareaBase, __assign({ className: utils_1.cs('vui-textarea', className), ref: ref }, styles.container, rest),
|
|
94
|
+
react_1.default.createElement(exports.TextareaTextarea, __assign({ borderRadius: "md", className: "vui-textareaTextarea", p: 1, placeholderColor: "grey.60", ref: textareaRef, transitionDuration: "fast" }, {
|
|
95
|
+
autoFocus: autoFocus,
|
|
96
|
+
defaultValue: defaultValue,
|
|
97
|
+
disabled: disabled,
|
|
98
|
+
maxLength: maxLength,
|
|
99
|
+
name: name,
|
|
100
|
+
onBlur: onBlur,
|
|
101
|
+
onChange: onChange,
|
|
102
|
+
onFocus: onFocus,
|
|
103
|
+
placeholder: placeholder,
|
|
104
|
+
readOnly: readOnly,
|
|
105
|
+
required: required,
|
|
106
|
+
resize: resize,
|
|
107
|
+
value: value
|
|
108
|
+
}, styles.textarea, aliasedProps, textareaProps)),
|
|
109
|
+
showCount && (react_1.default.createElement(t_1.default, { color: "grey.80", position: "absolute", right: 0, size: "sm", top: "calc(100% + 2px)" },
|
|
110
|
+
count,
|
|
111
|
+
" / ",
|
|
112
|
+
maxLength))));
|
|
44
113
|
});
|
|
45
114
|
exports.Textarea.displayName = 'Textarea';
|
|
46
115
|
exports.default = exports.Textarea;
|
|
47
|
-
var templateObject_1;
|
|
116
|
+
var templateObject_1, templateObject_2;
|
|
@@ -1,7 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChangeEventHandler, FocusEventHandler, PropsOf } from '../core';
|
|
3
|
+
import { SystemProps } from '../system';
|
|
2
4
|
import { ThemingProps } from '../theme';
|
|
3
|
-
export interface TextareaProps extends
|
|
5
|
+
export interface TextareaProps extends SystemProps, ThemingProps<'Textarea'> {
|
|
6
|
+
autoFocus?: boolean;
|
|
4
7
|
colorScheme?: 'green' | 'grey' | 'red';
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
cols?: number;
|
|
9
|
+
defaultValue?: number | string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
isInvalid?: boolean;
|
|
12
|
+
maxLength?: number;
|
|
13
|
+
name?: string;
|
|
14
|
+
onBlur?: FocusEventHandler<HTMLTextAreaElement>;
|
|
15
|
+
onChange?: ChangeEventHandler<HTMLTextAreaElement>;
|
|
16
|
+
onFocus?: FocusEventHandler<HTMLTextAreaElement>;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
readOnly?: boolean;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
rows?: number;
|
|
21
|
+
showCount?: boolean;
|
|
22
|
+
textareaProps?: PropsOf<'textarea', SystemProps>;
|
|
23
|
+
textareaRef?: React.MutableRefObject<HTMLTextAreaElement | null> | null;
|
|
24
|
+
value?: number | string;
|
|
7
25
|
}
|
package/textarea/theme.d.ts
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { Dict } from '../utils';
|
|
2
2
|
declare function variantDefault(props: Dict): {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
container: {};
|
|
4
|
+
textarea: {
|
|
5
|
+
borderColor: string;
|
|
6
|
+
focusRing: number;
|
|
7
|
+
focusRingColor: string;
|
|
8
|
+
};
|
|
6
9
|
};
|
|
7
10
|
declare const _default: {
|
|
8
11
|
defaultProps: {
|
|
9
12
|
colorScheme: string;
|
|
10
13
|
variant: string;
|
|
11
14
|
};
|
|
15
|
+
parts: string[];
|
|
12
16
|
sizes: {};
|
|
13
17
|
variants: {
|
|
14
18
|
default: typeof variantDefault;
|
package/textarea/theme.js
CHANGED
|
@@ -2,27 +2,30 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
function variantDefault(props) {
|
|
4
4
|
var c = props.colorScheme;
|
|
5
|
-
var
|
|
5
|
+
var container = {};
|
|
6
|
+
var textarea = {
|
|
6
7
|
borderColor: c + ".80",
|
|
7
8
|
focusRing: 2,
|
|
8
9
|
focusRingColor: c + ".80"
|
|
9
10
|
};
|
|
10
11
|
if (c === 'grey') {
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
textarea.borderColor = c + ".60";
|
|
13
|
+
textarea.focusRingColor = 'blue.50';
|
|
13
14
|
}
|
|
14
|
-
return
|
|
15
|
+
return { container: container, textarea: textarea };
|
|
15
16
|
}
|
|
16
17
|
var defaultProps = {
|
|
17
18
|
colorScheme: 'grey',
|
|
18
19
|
variant: 'default'
|
|
19
20
|
};
|
|
21
|
+
var parts = ['container', 'textarea'];
|
|
20
22
|
var sizes = {};
|
|
21
23
|
var variants = {
|
|
22
24
|
default: variantDefault
|
|
23
25
|
};
|
|
24
26
|
exports.default = {
|
|
25
27
|
defaultProps: defaultProps,
|
|
28
|
+
parts: parts,
|
|
26
29
|
sizes: sizes,
|
|
27
30
|
variants: variants
|
|
28
31
|
};
|
package/theme/components.d.ts
CHANGED
|
@@ -143,6 +143,7 @@ declare const _default: {
|
|
|
143
143
|
borderWidth: number;
|
|
144
144
|
};
|
|
145
145
|
solid: (props: import("..").Dict<any>) => {
|
|
146
|
+
borderColor: string;
|
|
146
147
|
hoverBg: string;
|
|
147
148
|
activeBg: string;
|
|
148
149
|
bg: string;
|
|
@@ -307,7 +308,6 @@ declare const _default: {
|
|
|
307
308
|
borderColor: string;
|
|
308
309
|
focusWithinRing: number;
|
|
309
310
|
focusWithinRingColor: string;
|
|
310
|
-
iconColor: string;
|
|
311
311
|
};
|
|
312
312
|
};
|
|
313
313
|
};
|
|
@@ -391,6 +391,10 @@ declare const _default: {
|
|
|
391
391
|
color: string;
|
|
392
392
|
hoverColor: string;
|
|
393
393
|
};
|
|
394
|
+
light: (props: import("..").Dict<any>) => {
|
|
395
|
+
color: string;
|
|
396
|
+
hoverColor: string;
|
|
397
|
+
};
|
|
394
398
|
};
|
|
395
399
|
};
|
|
396
400
|
List: {
|
|
@@ -744,12 +748,16 @@ declare const _default: {
|
|
|
744
748
|
colorScheme: string;
|
|
745
749
|
variant: string;
|
|
746
750
|
};
|
|
751
|
+
parts: string[];
|
|
747
752
|
sizes: {};
|
|
748
753
|
variants: {
|
|
749
754
|
default: (props: import("..").Dict<any>) => {
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
755
|
+
container: {};
|
|
756
|
+
textarea: {
|
|
757
|
+
borderColor: string;
|
|
758
|
+
focusRing: number;
|
|
759
|
+
focusRingColor: string;
|
|
760
|
+
};
|
|
753
761
|
};
|
|
754
762
|
};
|
|
755
763
|
};
|
package/theme/defaultTheme.d.ts
CHANGED
|
@@ -294,6 +294,7 @@ declare const defaultTheme: {
|
|
|
294
294
|
borderWidth: number;
|
|
295
295
|
};
|
|
296
296
|
solid: (props: import("..").Dict<any>) => {
|
|
297
|
+
borderColor: string;
|
|
297
298
|
hoverBg: string;
|
|
298
299
|
activeBg: string;
|
|
299
300
|
bg: string;
|
|
@@ -458,7 +459,6 @@ declare const defaultTheme: {
|
|
|
458
459
|
borderColor: string;
|
|
459
460
|
focusWithinRing: number;
|
|
460
461
|
focusWithinRingColor: string;
|
|
461
|
-
iconColor: string;
|
|
462
462
|
};
|
|
463
463
|
};
|
|
464
464
|
};
|
|
@@ -542,6 +542,10 @@ declare const defaultTheme: {
|
|
|
542
542
|
color: string;
|
|
543
543
|
hoverColor: string;
|
|
544
544
|
};
|
|
545
|
+
light: (props: import("..").Dict<any>) => {
|
|
546
|
+
color: string;
|
|
547
|
+
hoverColor: string;
|
|
548
|
+
};
|
|
545
549
|
};
|
|
546
550
|
};
|
|
547
551
|
List: {
|
|
@@ -895,12 +899,16 @@ declare const defaultTheme: {
|
|
|
895
899
|
colorScheme: string;
|
|
896
900
|
variant: string;
|
|
897
901
|
};
|
|
902
|
+
parts: string[];
|
|
898
903
|
sizes: {};
|
|
899
904
|
variants: {
|
|
900
905
|
default: (props: import("..").Dict<any>) => {
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
906
|
+
container: {};
|
|
907
|
+
textarea: {
|
|
908
|
+
borderColor: string;
|
|
909
|
+
focusRing: number;
|
|
910
|
+
focusRingColor: string;
|
|
911
|
+
};
|
|
904
912
|
};
|
|
905
913
|
};
|
|
906
914
|
};
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
bounce: 'vui-bounce 1s infinite',
|
|
5
|
-
fadeDown: 'vui-fadeDown 0.
|
|
6
|
-
fadeIn: 'vui-fadeIn 0.
|
|
7
|
-
fadeLeft: 'vui-fadeLeft 0.
|
|
8
|
-
fadeOut: 'vui-fadeOut 0.
|
|
9
|
-
fadeRight: 'vui-fadeRight 0.
|
|
10
|
-
fadeUp: 'vui-fadeUp 0.
|
|
5
|
+
fadeDown: 'vui-fadeDown 0.2s ease-in-out',
|
|
6
|
+
fadeIn: 'vui-fadeIn 0.2s ease-in-out',
|
|
7
|
+
fadeLeft: 'vui-fadeLeft 0.2s ease-in-out',
|
|
8
|
+
fadeOut: 'vui-fadeOut 0.2s ease-in-out',
|
|
9
|
+
fadeRight: 'vui-fadeRight 0.2s ease-in-out',
|
|
10
|
+
fadeUp: 'vui-fadeUp 0.2s ease-in-out',
|
|
11
11
|
pulse: 'vui-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite',
|
|
12
12
|
spin: 'vui-spin 1s linear infinite'
|
|
13
13
|
};
|
package/tile/tile.types.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { BoxProps
|
|
1
|
+
import { BoxProps } from '../box';
|
|
2
2
|
import { ThemingProps } from '../theme';
|
|
3
|
-
export interface TileProps extends Omit<BoxProps, 'size' | 'variant'>,
|
|
3
|
+
export interface TileProps extends Omit<BoxProps, 'size' | 'variant'>, ThemingProps<'Tile'> {
|
|
4
4
|
isInteractive?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export interface TileStyleProps extends BoxStyleProps {
|
|
7
|
-
}
|