@veracity/vui 0.0.1 → 0.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.
Files changed (72) hide show
  1. package/avatar/avatar.d.ts +6 -0
  2. package/avatar/avatar.js +86 -0
  3. package/avatar/avatar.types.d.ts +17 -0
  4. package/avatar/avatar.types.js +2 -0
  5. package/avatar/index.d.ts +3 -0
  6. package/avatar/index.js +20 -0
  7. package/avatar/theme.d.ts +56 -0
  8. package/avatar/theme.js +94 -0
  9. package/button/button.js +4 -2
  10. package/button/buttonGroup.d.ts +6 -0
  11. package/button/buttonGroup.js +75 -0
  12. package/button/buttonGroup.types.d.ts +9 -0
  13. package/button/buttonGroup.types.js +2 -0
  14. package/button/context.d.ts +4 -0
  15. package/button/context.js +23 -0
  16. package/button/index.d.ts +2 -0
  17. package/button/index.js +2 -0
  18. package/button/theme.d.ts +1 -0
  19. package/button/theme.js +1 -0
  20. package/checkbox/checkbox.d.ts +7 -0
  21. package/checkbox/checkbox.js +97 -0
  22. package/checkbox/checkbox.types.d.ts +25 -0
  23. package/checkbox/checkbox.types.js +2 -0
  24. package/checkbox/index.d.ts +3 -0
  25. package/checkbox/index.js +20 -0
  26. package/checkbox/theme.d.ts +24 -0
  27. package/checkbox/theme.js +31 -0
  28. package/controlLabel/controlLabel.d.ts +6 -0
  29. package/controlLabel/controlLabel.js +55 -0
  30. package/controlLabel/controlLabel.types.d.ts +10 -0
  31. package/controlLabel/controlLabel.types.js +2 -0
  32. package/controlLabel/index.d.ts +3 -0
  33. package/controlLabel/index.js +20 -0
  34. package/controlLabel/theme.d.ts +11 -0
  35. package/controlLabel/theme.js +15 -0
  36. package/core/types.d.ts +4 -0
  37. package/core/utils.js +2 -2
  38. package/divider/divider.d.ts +6 -0
  39. package/divider/divider.js +57 -0
  40. package/divider/divider.types.d.ts +10 -0
  41. package/divider/divider.types.js +2 -0
  42. package/divider/index.d.ts +3 -0
  43. package/divider/index.js +20 -0
  44. package/divider/theme.d.ts +6 -0
  45. package/divider/theme.js +10 -0
  46. package/heading/heading.js +1 -1
  47. package/index.d.ts +4 -0
  48. package/index.js +4 -0
  49. package/input/consts.d.ts +4 -0
  50. package/input/consts.js +4 -0
  51. package/input/input.js +10 -9
  52. package/input/input.types.d.ts +2 -1
  53. package/input/theme.d.ts +7 -0
  54. package/input/theme.js +9 -2
  55. package/label/label.js +1 -1
  56. package/label/theme.d.ts +16 -0
  57. package/label/theme.js +34 -1
  58. package/link/link.js +1 -1
  59. package/list/list.js +35 -6
  60. package/list/list.types.d.ts +6 -3
  61. package/list/listItem.js +8 -7
  62. package/list/listItem.types.d.ts +3 -2
  63. package/list/theme.d.ts +13 -5
  64. package/list/theme.js +27 -5
  65. package/package.json +1 -1
  66. package/system/typography.d.ts +9 -5
  67. package/t/t.types.d.ts +4 -4
  68. package/textarea/textarea.js +5 -3
  69. package/textarea/textarea.types.d.ts +2 -2
  70. package/theme/components.d.ts +120 -5
  71. package/theme/components.js +34 -26
  72. package/theme/defaultTheme.d.ts +120 -5
package/label/theme.js CHANGED
@@ -1,5 +1,21 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
+ function variantOutlined(props) {
15
+ var c = props.colorScheme;
16
+ var styles = __assign({ borderColor: c + ".80", borderWidth: 1 }, variantText(props));
17
+ return styles;
18
+ }
3
19
  function variantSolid(props) {
4
20
  var c = props.colorScheme;
5
21
  var colors = {
@@ -38,6 +54,21 @@ function variantSubtle(props) {
38
54
  }
39
55
  return colors;
40
56
  }
57
+ function variantText(props) {
58
+ var c = props.colorScheme;
59
+ var styles = {
60
+ hoverBg: c + ".20",
61
+ activeBg: c + ".30",
62
+ bg: 'transparent',
63
+ color: c + ".80"
64
+ };
65
+ // Special cases
66
+ if (c === 'prussian') {
67
+ styles.activeBg = 'blue.30';
68
+ styles.hoverBg = 'blue.20';
69
+ }
70
+ return styles;
71
+ }
41
72
  var defaultProps = {
42
73
  colorScheme: 'blue',
43
74
  size: 'md',
@@ -64,8 +95,10 @@ var sizes = {
64
95
  }
65
96
  };
66
97
  var variants = {
98
+ outlined: variantOutlined,
67
99
  solid: variantSolid,
68
- subtle: variantSubtle
100
+ subtle: variantSubtle,
101
+ text: variantText
69
102
  };
70
103
  exports.default = {
71
104
  defaultProps: defaultProps,
package/link/link.js CHANGED
@@ -39,7 +39,7 @@ var utils_1 = require("../utils");
39
39
  var generator = styled_components_1.compose(styled_components_1.borders, system_1.isTruncated, styled_components_1.sizing, styled_components_1.space, styled_components_1.transitions, styled_components_1.typography);
40
40
  exports.BaseLink = styled_components_2.default.a.withConfig({
41
41
  shouldForwardProp: core_1.shouldForwardProp(generator.meta.props)
42
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tcursor: pointer;\n\toutline: none;\n\ttext-decoration: none;\n\ttransition: all 0s ease-in-out;\n\n\t", "\n"], ["\n\tcursor: pointer;\n\toutline: none;\n\ttext-decoration: none;\n\ttransition: all 0s ease-in-out;\n\n\t", "\n"])), generator);
42
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\toutline: none;\n\ttext-decoration: none;\n\ttransition: all 0s ease-in-out;\n\n\t", "\n"], ["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\toutline: none;\n\ttext-decoration: none;\n\ttransition: all 0s ease-in-out;\n\n\t", "\n"])), generator);
43
43
  exports.Link = core_1.forwardRef(function (props, ref) {
44
44
  var _a = core_1.omitThemingProps(props), className = _a.className, decoration = _a.decoration, _b = _a.hoverDecoration, hoverDecoration = _b === void 0 ? 'underline' : _b, isExternal = _a.isExternal, weight = _a.weight, rest = __rest(_a, ["className", "decoration", "hoverDecoration", "isExternal", "weight"]);
45
45
  var styles = core_1.useStyleConfig('Link', props);
package/list/list.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)
@@ -31,20 +50,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
31
50
  Object.defineProperty(exports, "__esModule", { value: true });
32
51
  exports.List = exports.BaseList = void 0;
33
52
  var styled_components_1 = require("@xstyled/styled-components");
34
- var react_1 = __importDefault(require("react"));
53
+ var react_1 = __importStar(require("react"));
35
54
  var styled_components_2 = __importDefault(require("styled-components"));
36
55
  var context_1 = require("./context");
56
+ var listItem_1 = __importDefault(require("./listItem"));
37
57
  var core_1 = require("../core");
38
58
  var utils_1 = require("../utils");
39
- var generator = styled_components_1.compose(styled_components_1.sizing, styled_components_1.space);
59
+ var generator = styled_components_1.compose(styled_components_1.sizing, styled_components_1.space, styled_components_1.typography);
40
60
  exports.BaseList = styled_components_2.default.ul.withConfig({
41
61
  shouldForwardProp: core_1.shouldForwardProp(generator.meta.props)
42
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tposition: relative;\n\n\t", "\n"], ["\n\tposition: relative;\n\n\t", "\n"])), generator);
62
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), generator);
43
63
  exports.List = core_1.forwardRef(function (props, ref) {
44
- var _a = core_1.omitThemingProps(props), className = _a.className, rest = __rest(_a, ["className"]);
64
+ var children = props.children, className = props.className, colorScheme = props.colorScheme, isInteractive = props.isInteractive, size = props.size, subheader = props.subheader, variant = props.variant, rest = __rest(props, ["children", "className", "colorScheme", "isInteractive", "size", "subheader", "variant"]);
45
65
  var styles = core_1.useStyleConfig('List', props);
46
- return (react_1.default.createElement(context_1.ListProvider, { value: styles },
47
- react_1.default.createElement(exports.BaseList, __assign({ className: utils_1.cs('vui-list', className), ref: ref }, styles.list, rest))));
66
+ var context = react_1.useMemo(function () { return utils_1.filterUndefined({ colorScheme: colorScheme, isInteractive: isInteractive, size: size, styles: styles, variant: variant }); }, [
67
+ colorScheme,
68
+ isInteractive,
69
+ size,
70
+ variant
71
+ ]);
72
+ var listStyleType = props.as === 'ol' ? 'decimal' : 'disc';
73
+ return (react_1.default.createElement(context_1.ListProvider, { value: context },
74
+ react_1.default.createElement(exports.BaseList, __assign({ className: utils_1.cs('vui-list', className), listStyleType: listStyleType, ref: ref }, styles.list, rest),
75
+ subheader && (react_1.default.createElement(listItem_1.default, { className: "vui-listSubheader", color: "grey.80", fontSize: "sm", fontWeight: "medium" }, subheader)),
76
+ children)));
48
77
  });
49
78
  exports.List.displayName = 'List';
50
79
  exports.default = exports.List;
@@ -1,7 +1,10 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import { SizingProps, SpaceProps, TransitionsProps } from '../system';
2
+ import { SizingProps, SpaceProps, TransitionsProps, TypographyProps } from '../system';
3
3
  import { ThemingProps } from '../theme';
4
- export interface ListProps extends HTMLAttributes<HTMLUListElement>, ListStyleProps, ThemingProps<'List'> {
4
+ export interface ListProps extends Omit<HTMLAttributes<HTMLUListElement>, 'color'>, ListStyleProps, ThemingProps<'List'> {
5
+ colorScheme?: 'blue' | 'grey';
6
+ isInteractive?: boolean;
7
+ subheader?: string;
5
8
  }
6
- export interface ListStyleProps extends SizingProps, SpaceProps, TransitionsProps {
9
+ export interface ListStyleProps extends SizingProps, SpaceProps, TransitionsProps, TypographyProps {
7
10
  }
package/list/listItem.js CHANGED
@@ -36,15 +36,16 @@ var styled_components_2 = __importDefault(require("styled-components"));
36
36
  var context_1 = require("./context");
37
37
  var core_1 = require("../core");
38
38
  var utils_1 = require("../utils");
39
- var generator = styled_components_1.compose(styled_components_1.backgroundColor, styled_components_1.borders, styled_components_1.color, styled_components_1.flexboxes, styled_components_1.fontSize, styled_components_1.interactivity, styled_components_1.sizing, styled_components_1.space, styled_components_1.transitions);
39
+ var generator = styled_components_1.compose(styled_components_1.backgroundColor, styled_components_1.borders, styled_components_1.flexboxes, styled_components_1.interactivity, styled_components_1.sizing, styled_components_1.space, styled_components_1.transitions, styled_components_1.typography);
40
40
  exports.BaseListItem = styled_components_2.default.li.withConfig({
41
41
  shouldForwardProp: core_1.shouldForwardProp(generator.meta.props)
42
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\talign-items: center;\n\tdisplay: flex;\n\tline-height: 1.1;\n\toutline: none;\n\ttransition: all 0s ease-in-out;\n\n\t", "\n"], ["\n\talign-items: center;\n\tdisplay: flex;\n\tline-height: 1.1;\n\toutline: none;\n\ttransition: all 0s ease-in-out;\n\n\t", "\n"])), generator);
42
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\talign-items: center;\n\tdisplay: flex;\n\tline-height: 1.1;\n\toutline: none;\n\ttransition: all 0s ease-in-out;\n\n\t&.disabled {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\tcursor: not-allowed;\n\t\tuser-select: none;\n\t}\n\n\t", "\n"], ["\n\talign-items: center;\n\tdisplay: flex;\n\tline-height: 1.1;\n\toutline: none;\n\ttransition: all 0s ease-in-out;\n\n\t&.disabled {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\tcursor: not-allowed;\n\t\tuser-select: none;\n\t}\n\n\t", "\n"])), core_1.th('colors.grey.20'), core_1.th('colors.grey.50'), generator);
43
43
  exports.ListItem = core_1.forwardRef(function (props, ref) {
44
- var className = props.className, _a = props.isInteractive, isInteractive = _a === void 0 ? props.onClick !== undefined : _a, isSelected = props.isSelected, rest = __rest(props, ["className", "isInteractive", "isSelected"]);
45
- var styles = context_1.useList();
46
- var _b = styles.item, activeBg = _b.activeBg, hoverBg = _b.hoverBg, hoverColor = _b.hoverColor, itemStyles = __rest(_b, ["activeBg", "hoverBg", "hoverColor"]);
47
- var interactiveProps = isInteractive
44
+ var _a;
45
+ var listContext = context_1.useList();
46
+ var className = props.className, disabled = props.disabled, _b = props.isInteractive, isInteractive = _b === void 0 ? (_a = listContext.isInteractive) !== null && _a !== void 0 ? _a : props.onClick !== undefined : _b, isSelected = props.isSelected, onClick = props.onClick, rest = __rest(props, ["className", "disabled", "isInteractive", "isSelected", "onClick"]);
47
+ var _c = listContext.styles.item, activeBg = _c.activeBg, hoverBg = _c.hoverBg, hoverColor = _c.hoverColor, itemStyles = __rest(_c, ["activeBg", "hoverBg", "hoverColor"]);
48
+ var interactiveProps = !disabled && isInteractive
48
49
  ? {
49
50
  cursor: 'pointer',
50
51
  focusVisibleRing: 3,
@@ -60,7 +61,7 @@ exports.ListItem = core_1.forwardRef(function (props, ref) {
60
61
  bg: isSelected ? hoverBg : undefined,
61
62
  color: isSelected ? hoverColor : undefined
62
63
  });
63
- return (react_1.default.createElement(exports.BaseListItem, __assign({ className: utils_1.cs('vui-listItem', className), px: 1, ref: ref, transitionDuration: "fast" }, itemStyles, interactiveProps, aliasedProps, rest)));
64
+ return (react_1.default.createElement(exports.BaseListItem, __assign({ className: utils_1.cs('vui-listItem', className, disabled && 'disabled'), onClick: !disabled ? onClick : undefined, px: 1, ref: ref, transitionDuration: "fast" }, itemStyles, interactiveProps, aliasedProps, rest)));
64
65
  });
65
66
  exports.ListItem.displayName = 'ListItem';
66
67
  exports.default = exports.ListItem;
@@ -1,8 +1,9 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import { BackgroundColorProps, ColorProps, FlexboxesProps, FontSizeProps, InteractivityProps, SizingProps, SpaceProps, TransitionsProps } from '../system';
2
+ import { BackgroundColorProps, FlexboxesProps, InteractivityProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps } from '../system';
3
3
  export interface ListItemProps extends Omit<HTMLAttributes<HTMLLIElement>, 'color'>, ListItemStyleProps {
4
+ disabled?: boolean;
4
5
  isInteractive?: boolean;
5
6
  isSelected?: boolean;
6
7
  }
7
- export interface ListItemStyleProps extends BackgroundColorProps, ColorProps, FlexboxesProps, FontSizeProps, InteractivityProps, SizingProps, SpaceProps, TransitionsProps {
8
+ export interface ListItemStyleProps extends BackgroundColorProps, FlexboxesProps, InteractivityProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps {
8
9
  }
package/list/theme.d.ts CHANGED
@@ -1,5 +1,11 @@
1
+ import { Dict } from '../utils';
2
+ declare function variantDefault(props: Dict): {
3
+ item: Dict<any>;
4
+ list: Dict<any>;
5
+ };
1
6
  declare const _default: {
2
7
  defaultProps: {
8
+ colorScheme: string;
3
9
  size: string;
4
10
  variant: string;
5
11
  };
@@ -25,12 +31,14 @@ declare const _default: {
25
31
  };
26
32
  };
27
33
  variants: {
28
- default: {
34
+ default: typeof variantDefault;
35
+ unstyled: {
29
36
  item: {
30
- activeBg: string;
31
- borderRadius: string;
32
- hoverBg: string;
33
- hoverColor: string;
37
+ display: string;
38
+ h: undefined;
39
+ };
40
+ list: {
41
+ pl: number;
34
42
  };
35
43
  };
36
44
  };
package/list/theme.js CHANGED
@@ -1,6 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ function variantDefault(props) {
4
+ var c = props.colorScheme;
5
+ var itemStyles = {
6
+ activeBg: c + ".30",
7
+ borderRadius: 'md',
8
+ hoverBg: c + ".20"
9
+ };
10
+ var listStyles = {
11
+ px: 1
12
+ };
13
+ // Special cases
14
+ if (c === 'blue') {
15
+ itemStyles.hoverColor = 'blue.80';
16
+ }
17
+ return {
18
+ item: itemStyles,
19
+ list: listStyles
20
+ };
21
+ }
3
22
  var defaultProps = {
23
+ colorScheme: 'blue',
4
24
  size: 'md',
5
25
  variant: 'default'
6
26
  };
@@ -26,12 +46,14 @@ var sizes = {
26
46
  }
27
47
  };
28
48
  var variants = {
29
- default: {
49
+ default: variantDefault,
50
+ unstyled: {
30
51
  item: {
31
- activeBg: 'blue.30',
32
- borderRadius: 'md',
33
- hoverBg: 'blue.20',
34
- hoverColor: 'blue.80'
52
+ display: 'list-item',
53
+ h: undefined
54
+ },
55
+ list: {
56
+ pl: 3
35
57
  }
36
58
  }
37
59
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veracity/vui",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Veracity UI components library based on Styled Components and @xstyled",
5
5
  "main": "index.js",
6
6
  "author": "Veracity",
@@ -1,5 +1,5 @@
1
1
  import { ITheme, SystemProp, VariantsType } from '@xstyled/system';
2
- import * as CSS from 'csstype';
2
+ import { Globals, Property } from 'csstype';
3
3
  import { ColorGetter } from './colors';
4
4
  import { VuiTheme } from '../theme';
5
5
  export declare type FontGetter<T extends ITheme = VuiTheme> = VariantsType<T['fonts']>;
@@ -26,7 +26,7 @@ export interface FontWeightProps<T extends ITheme = VuiTheme> {
26
26
  fontWeight?: FontWeightProp<T>;
27
27
  hoverFontWeight?: FontWeightProp<T>;
28
28
  }
29
- declare type FontStyleProp<T extends ITheme> = SystemProp<CSS.Property.FontStyle, T>;
29
+ declare type FontStyleProp<T extends ITheme> = SystemProp<Property.FontStyle, T>;
30
30
  export interface FontStyleProps<T extends ITheme = VuiTheme> {
31
31
  fontStyle?: FontStyleProp<T>;
32
32
  hoverFontStyle?: FontStyleProp<T>;
@@ -38,22 +38,26 @@ export interface ColorProps<T extends ITheme = VuiTheme> {
38
38
  hoverColor?: ColorProp<T>;
39
39
  placeholderColor?: ColorProp<T>;
40
40
  }
41
- declare type TextTransformProp<T extends ITheme> = SystemProp<CSS.Property.TextTransform, T>;
41
+ declare type TextTransformProp<T extends ITheme> = SystemProp<Property.TextTransform, T>;
42
42
  export interface TextTransformProps<T extends ITheme = VuiTheme> {
43
43
  textTransform?: TextTransformProp<T>;
44
44
  hoverTextTransform?: TextTransformProp<T>;
45
45
  }
46
- declare type TextDecoration = CSS.Globals | 'overline' | 'underline' | 'line-through';
46
+ declare type TextDecoration = Globals | 'overline' | 'underline' | 'line-through';
47
47
  declare type TextDecorationProp<T extends ITheme> = SystemProp<TextDecoration, T>;
48
48
  export interface TextDecorationProps<T extends ITheme = VuiTheme> {
49
49
  textDecoration?: TextDecorationProp<T>;
50
50
  hoverTextDecoration?: TextDecorationProp<T>;
51
51
  }
52
- declare type TextAlignProp<T extends ITheme> = SystemProp<CSS.Property.TextAlign, T>;
52
+ declare type TextAlignProp<T extends ITheme> = SystemProp<Property.TextAlign, T>;
53
53
  export interface TextAlignProps<T extends ITheme = VuiTheme> {
54
54
  textAlign?: TextAlignProp<T>;
55
55
  hoverTextAlign?: TextAlignProp<T>;
56
56
  }
57
+ declare type ListStyleTypeProp<T extends ITheme> = SystemProp<Property.ListStyleType, T>;
58
+ export interface ListStyleTypeProps<T extends ITheme = VuiTheme> {
59
+ listStyleType?: ListStyleTypeProp<T>;
60
+ }
57
61
  export interface TypographyProps<T extends ITheme = VuiTheme> extends FontFamilyProps<T>, FontSizeProps<T>, FontStyleProps<T>, LineHeightProps<T>, FontWeightProps<T>, TextAlignProps<T>, ColorProps<T>, TextTransformProps<T>, TextDecorationProps<T> {
58
62
  }
59
63
  export {};
package/t/t.types.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
  import { IsTruncatedProps, SizingProps, SpaceProps, TextAlignProps, TextDecorationProps, TextTransformProps, TransitionsProps, TypographyProps } from '../system';
3
- import { FontWeight, ThemingProps, VuiTheme } from '../theme';
3
+ import { FontWeight, ThemingProps } from '../theme';
4
4
  import { AnyString } from '../utils';
5
5
  export interface TProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'>, TStyleProps, ThemingProps<'T'> {
6
6
  align?: TextAlignProps['textAlign'];
7
- casing?: TextTransformProps<VuiTheme>['textTransform'];
8
- decoration?: TextDecorationProps<VuiTheme>['textDecoration'];
7
+ casing?: TextTransformProps['textTransform'];
8
+ decoration?: TextDecorationProps['textDecoration'];
9
9
  weight?: FontWeight | AnyString | number;
10
10
  }
11
- export interface TStyleProps extends IsTruncatedProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps<VuiTheme> {
11
+ export interface TStyleProps extends IsTruncatedProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps {
12
12
  }
@@ -38,11 +38,13 @@ var utils_1 = require("../utils");
38
38
  var generator = styled_components_1.compose(styled_components_1.backgroundColor, styled_components_1.borders, styled_components_1.color, styled_components_1.fontSize, styled_components_1.resize, styled_components_1.sizing, styled_components_1.space, styled_components_1.transitions);
39
39
  exports.BaseTextarea = styled_components_2.default.textarea.withConfig({
40
40
  shouldForwardProp: core_1.shouldForwardProp(generator.meta.props)
41
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tborder-width: 1px;\n\tmin-height: 80px;\n\toutline: none;\n\tresize: none;\n\twidth: 100%;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t}\n\n\t", "\n"], ["\n\tborder-width: 1px;\n\tmin-height: 80px;\n\toutline: none;\n\tresize: none;\n\twidth: 100%;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t}\n\n\t", "\n"])), generator);
41
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tborder-width: 1px;\n\tmin-height: 80px;\n\toutline: none;\n\tresize: none;\n\twidth: 100%;\n\n\t&:disabled {\n\t\tcursor: not-allowed;\n\t}\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t}\n\n\t", "\n"], ["\n\tborder-width: 1px;\n\tmin-height: 80px;\n\toutline: none;\n\tresize: none;\n\twidth: 100%;\n\n\t&:disabled {\n\t\tcursor: not-allowed;\n\t}\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t}\n\n\t", "\n"])), generator);
42
42
  exports.Textarea = core_1.forwardRef(function (props, ref) {
43
- var _a = core_1.omitThemingProps(props), className = _a.className, rest = __rest(_a, ["className"]);
43
+ var _a = core_1.omitThemingProps(props), className = _a.className, disabled = _a.disabled, rest = __rest(_a, ["className", "disabled"]);
44
44
  var styles = core_1.useStyleConfig('Textarea', props);
45
- return (react_1.default.createElement(exports.BaseTextarea, __assign({ borderRadius: "md", className: utils_1.cs('vui-textarea', className), p: 1, ref: ref, transitionDuration: "fast" }, styles, rest)));
45
+ var disabledTextColor = 'grey.50';
46
+ var placeholderColor = disabled ? disabledTextColor : 'grey.60';
47
+ return (react_1.default.createElement(exports.BaseTextarea, __assign({ borderRadius: "md", className: utils_1.cs('vui-textarea', className), disabled: disabled, disabledBg: "grey.20", disabledBorderColor: "transparent", disabledColor: disabledTextColor, p: 1, placeholderColor: placeholderColor, ref: ref, transitionDuration: "fast" }, styles, rest)));
46
48
  });
47
49
  exports.Textarea.displayName = 'Textarea';
48
50
  exports.default = exports.Textarea;
@@ -1,8 +1,8 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import { BackgroundColorProps, BorderProps, ColorProps, FontSizeProps, ResizeProps, SizingProps, SpaceProps, TransitionsProps } from '../system';
2
+ import { BackgroundColorProps, BordersProps, ColorProps, FontSizeProps, ResizeProps, SizingProps, SpaceProps, TransitionsProps } from '../system';
3
3
  import { ThemingProps } from '../theme';
4
4
  export interface TextareaProps extends Omit<HTMLAttributes<HTMLTextAreaElement>, 'color'>, TextareaStyleProps, ThemingProps<'Textarea'> {
5
5
  colorScheme?: 'green' | 'grey' | 'red';
6
6
  }
7
- export interface TextareaStyleProps extends BackgroundColorProps, BorderProps, ColorProps, FontSizeProps, ResizeProps, SizingProps, SpaceProps, TransitionsProps {
7
+ export interface TextareaStyleProps extends BackgroundColorProps, BordersProps, ColorProps, FontSizeProps, ResizeProps, SizingProps, SpaceProps, TransitionsProps {
8
8
  }
@@ -1,4 +1,55 @@
1
1
  declare const _default: {
2
+ Avatar: {
3
+ defaultProps: {
4
+ colorScheme: string;
5
+ size: string;
6
+ variant: string;
7
+ };
8
+ sizes: {
9
+ xs: {
10
+ fontSize: string;
11
+ h: number;
12
+ iconSize: string;
13
+ };
14
+ sm: {
15
+ fontSize: string;
16
+ h: number;
17
+ iconSize: string;
18
+ };
19
+ md: {
20
+ fontSize: string;
21
+ h: number;
22
+ iconSize: string;
23
+ };
24
+ lg: {
25
+ fontSize: string;
26
+ h: number;
27
+ iconSize: string;
28
+ };
29
+ };
30
+ variants: {
31
+ outlined: (props: import("..").Dict<any>) => {
32
+ borderColor: string;
33
+ borderWidth: number;
34
+ hoverBg: string;
35
+ activeBg: string;
36
+ bg: string;
37
+ color: string;
38
+ };
39
+ solid: (props: import("..").Dict<any>) => {
40
+ hoverBg: string;
41
+ activeBg: string;
42
+ bg: string;
43
+ color: string;
44
+ };
45
+ subtle: (props: import("..").Dict<any>) => {
46
+ hoverBg: string;
47
+ activeBg: string;
48
+ bg: string;
49
+ color: string;
50
+ };
51
+ };
52
+ };
2
53
  Box: {
3
54
  defaultProps: {};
4
55
  sizes: {};
@@ -50,6 +101,7 @@ declare const _default: {
50
101
  borderWidth: number;
51
102
  };
52
103
  solid: (props: import("..").Dict<any>) => {
104
+ borderColor: string;
53
105
  hoverBg: string;
54
106
  activeBg: string;
55
107
  bg: string;
@@ -63,6 +115,42 @@ declare const _default: {
63
115
  };
64
116
  };
65
117
  };
118
+ Checkbox: {
119
+ defaultProps: {
120
+ colorScheme: string;
121
+ size: string;
122
+ variant: string;
123
+ };
124
+ sizes: {
125
+ sm: {
126
+ h: number;
127
+ };
128
+ md: {
129
+ h: number;
130
+ };
131
+ };
132
+ variants: {
133
+ default: (props: import("..").Dict<any>) => {
134
+ color: string;
135
+ hoverColor: string;
136
+ };
137
+ };
138
+ };
139
+ ControlLabel: {
140
+ defaultProps: {
141
+ size: string;
142
+ };
143
+ sizes: {
144
+ sm: {};
145
+ md: {};
146
+ };
147
+ variants: {};
148
+ };
149
+ Divider: {
150
+ defaultProps: {};
151
+ sizes: {};
152
+ variants: {};
153
+ };
66
154
  Heading: {
67
155
  defaultProps: {
68
156
  size: string;
@@ -132,13 +220,20 @@ declare const _default: {
132
220
  variant: string;
133
221
  };
134
222
  sizes: {
223
+ sm: {
224
+ fontSize: string;
225
+ h: number;
226
+ iconSize: string;
227
+ };
135
228
  md: {
136
229
  fontSize: string;
137
230
  h: number;
231
+ iconSize: string;
138
232
  };
139
233
  lg: {
140
234
  fontSize: string;
141
235
  h: number;
236
+ iconSize: string;
142
237
  };
143
238
  };
144
239
  variants: {
@@ -177,6 +272,14 @@ declare const _default: {
177
272
  };
178
273
  };
179
274
  variants: {
275
+ outlined: (props: import("..").Dict<any>) => {
276
+ hoverBg: string;
277
+ activeBg: string;
278
+ bg: string;
279
+ color: string;
280
+ borderColor: string;
281
+ borderWidth: number;
282
+ };
180
283
  solid: (props: import("..").Dict<any>) => {
181
284
  hoverBg: string;
182
285
  activeBg: string;
@@ -189,6 +292,12 @@ declare const _default: {
189
292
  bg: string;
190
293
  color: string;
191
294
  };
295
+ text: (props: import("..").Dict<any>) => {
296
+ hoverBg: string;
297
+ activeBg: string;
298
+ bg: string;
299
+ color: string;
300
+ };
192
301
  };
193
302
  };
194
303
  Link: {
@@ -198,6 +307,7 @@ declare const _default: {
198
307
  };
199
308
  List: {
200
309
  defaultProps: {
310
+ colorScheme: string;
201
311
  size: string;
202
312
  variant: string;
203
313
  };
@@ -223,12 +333,17 @@ declare const _default: {
223
333
  };
224
334
  };
225
335
  variants: {
226
- default: {
336
+ default: (props: import("..").Dict<any>) => {
337
+ item: import("..").Dict<any>;
338
+ list: import("..").Dict<any>;
339
+ };
340
+ unstyled: {
227
341
  item: {
228
- activeBg: string;
229
- borderRadius: string;
230
- hoverBg: string;
231
- hoverColor: string;
342
+ display: string;
343
+ h: undefined;
344
+ };
345
+ list: {
346
+ pl: number;
232
347
  };
233
348
  };
234
349
  };
@@ -3,31 +3,39 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- var theme_1 = __importDefault(require("../box/theme"));
7
- var theme_2 = __importDefault(require("../button/theme"));
8
- var theme_3 = __importDefault(require("../heading/theme"));
9
- var theme_4 = __importDefault(require("../icon/theme"));
10
- var theme_5 = __importDefault(require("../input/theme"));
11
- var theme_6 = __importDefault(require("../label/theme"));
12
- var theme_7 = __importDefault(require("../link/theme"));
13
- var theme_8 = __importDefault(require("../list/theme"));
14
- var theme_9 = __importDefault(require("../p/theme"));
15
- var theme_10 = __importDefault(require("../skeleton/theme"));
16
- var theme_11 = __importDefault(require("../t/theme"));
17
- var theme_12 = __importDefault(require("../textarea/theme"));
18
- var theme_13 = __importDefault(require("../tile/theme"));
6
+ var theme_1 = __importDefault(require("../avatar/theme"));
7
+ var theme_2 = __importDefault(require("../box/theme"));
8
+ var theme_3 = __importDefault(require("../button/theme"));
9
+ var theme_4 = __importDefault(require("../checkbox/theme"));
10
+ var theme_5 = __importDefault(require("../controlLabel/theme"));
11
+ var theme_6 = __importDefault(require("../divider/theme"));
12
+ var theme_7 = __importDefault(require("../heading/theme"));
13
+ var theme_8 = __importDefault(require("../icon/theme"));
14
+ var theme_9 = __importDefault(require("../input/theme"));
15
+ var theme_10 = __importDefault(require("../label/theme"));
16
+ var theme_11 = __importDefault(require("../link/theme"));
17
+ var theme_12 = __importDefault(require("../list/theme"));
18
+ var theme_13 = __importDefault(require("../p/theme"));
19
+ var theme_14 = __importDefault(require("../skeleton/theme"));
20
+ var theme_15 = __importDefault(require("../t/theme"));
21
+ var theme_16 = __importDefault(require("../textarea/theme"));
22
+ var theme_17 = __importDefault(require("../tile/theme"));
19
23
  exports.default = {
20
- Box: theme_1.default,
21
- Button: theme_2.default,
22
- Heading: theme_3.default,
23
- Icon: theme_4.default,
24
- Input: theme_5.default,
25
- Label: theme_6.default,
26
- Link: theme_7.default,
27
- List: theme_8.default,
28
- P: theme_9.default,
29
- Skeleton: theme_10.default,
30
- T: theme_11.default,
31
- Textarea: theme_12.default,
32
- Tile: theme_13.default
24
+ Avatar: theme_1.default,
25
+ Box: theme_2.default,
26
+ Button: theme_3.default,
27
+ Checkbox: theme_4.default,
28
+ ControlLabel: theme_5.default,
29
+ Divider: theme_6.default,
30
+ Heading: theme_7.default,
31
+ Icon: theme_8.default,
32
+ Input: theme_9.default,
33
+ Label: theme_10.default,
34
+ Link: theme_11.default,
35
+ List: theme_12.default,
36
+ P: theme_13.default,
37
+ Skeleton: theme_14.default,
38
+ T: theme_15.default,
39
+ Textarea: theme_16.default,
40
+ Tile: theme_17.default
33
41
  };