@veracity/vui 0.0.12 → 0.0.14

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 (44) hide show
  1. package/alert/alert.d.ts +0 -2
  2. package/alert/alert.js +6 -8
  3. package/alert/alert.types.d.ts +6 -6
  4. package/alert/alertText.js +1 -1
  5. package/alert/alertTitle.js +1 -1
  6. package/alert/index.d.ts +0 -1
  7. package/alert/index.js +0 -1
  8. package/box/box.js +1 -1
  9. package/button/button.js +9 -9
  10. package/core/types/events.d.ts +4 -0
  11. package/icons/baseIcons/cui/cuiCheckboxIndeterminate.js +2 -3
  12. package/icons/baseIcons/cui/cuiCheckboxSelected.js +2 -3
  13. package/icons/baseIcons/fal/falBars.js +7 -0
  14. package/input/consts.d.ts +0 -8
  15. package/input/consts.js +1 -9
  16. package/input/input.js +15 -13
  17. package/input/input.types.d.ts +7 -5
  18. package/label/label.js +2 -2
  19. package/package.json +1 -1
  20. package/switch/switch.types.d.ts +5 -5
  21. package/switch/switchButton.types.d.ts +3 -3
  22. package/system/effects.d.ts +3 -2
  23. package/textarea/textarea.js +1 -1
  24. package/theme/components.d.ts +2 -2
  25. package/theme/defaultTheme.d.ts +19 -8
  26. package/theme/foundations/index.d.ts +17 -6
  27. package/theme/foundations/shadows.d.ts +17 -6
  28. package/theme/foundations/shadows.js +20 -6
  29. package/tile/theme.d.ts +2 -2
  30. package/tile/theme.js +2 -2
  31. package/utils/index.d.ts +1 -1
  32. package/utils/index.js +1 -1
  33. package/utils/styles.d.ts +4 -0
  34. package/utils/styles.js +35 -0
  35. package/alert/alertMessage.d.ts +0 -3
  36. package/alert/alertMessage.js +0 -31
  37. package/icons/baseIcons/cus/cusCheckboxSelected.js +0 -7
  38. package/icons/baseIcons/cus/cusRadio.d.ts +0 -3
  39. package/icons/baseIcons/cus/cusRadio.js +0 -7
  40. package/icons/baseIcons/cus/cusSquareMinus.d.ts +0 -3
  41. package/icons/baseIcons/cus/cusSquareMinus.js +0 -7
  42. package/utils/dom.d.ts +0 -2
  43. package/utils/dom.js +0 -12
  44. /package/icons/baseIcons/{cus/cusCheckboxSelected.d.ts → fal/falBars.d.ts} +0 -0
package/alert/alert.d.ts CHANGED
@@ -1,14 +1,12 @@
1
1
  import { AlertProps } from './alert.types';
2
2
  import AlertButton from './alertButton';
3
3
  import AlertIcon from './alertIcon';
4
- import AlertMessage from './alertMessage';
5
4
  import AlertText from './alertText';
6
5
  import AlertTitle from './alertTitle';
7
6
  import { VuiComponent } from '../core';
8
7
  export declare const Alert: VuiComponent<"div", AlertProps> & {
9
8
  Button: typeof AlertButton;
10
9
  Icon: typeof AlertIcon;
11
- Message: typeof AlertMessage;
12
10
  Text: typeof AlertText;
13
11
  Title: typeof AlertTitle;
14
12
  };
package/alert/alert.js CHANGED
@@ -48,7 +48,6 @@ exports.Alert = void 0;
48
48
  var react_1 = __importStar(require("react"));
49
49
  var alertButton_1 = __importDefault(require("./alertButton"));
50
50
  var alertIcon_1 = __importDefault(require("./alertIcon"));
51
- var alertMessage_1 = __importDefault(require("./alertMessage"));
52
51
  var alertText_1 = __importDefault(require("./alertText"));
53
52
  var alertTitle_1 = __importDefault(require("./alertTitle"));
54
53
  var consts_1 = require("./consts");
@@ -58,13 +57,12 @@ var core_1 = require("../core");
58
57
  var utils_1 = require("../utils");
59
58
  exports.Alert = core_1.vui(function (props, ref) {
60
59
  var _a;
61
- var action = props.action, children = props.children, className = props.className, _b = props.colorScheme, colorSchemeProp = _b === void 0 ? 'blue' : _b, icon = props.icon, isVertical = props.isVertical, onClose = props.onClose, size = props.size, _c = props.status, status = _c === void 0 ? '' : _c, statusMapping = props.statusMapping, text = props.text, title = props.title, variant = props.variant, rest = __rest(props, ["action", "children", "className", "colorScheme", "icon", "isVertical", "onClose", "size", "status", "statusMapping", "text", "title", "variant"]);
60
+ var action = props.action, children = props.children, className = props.className, _b = props.colorScheme, colorSchemeProp = _b === void 0 ? 'blue' : _b, icon = props.icon, onClose = props.onClose, size = props.size, _c = props.status, status = _c === void 0 ? '' : _c, statusMapping = props.statusMapping, text = props.text, title = props.title, variant = props.variant, rest = __rest(props, ["action", "children", "className", "colorScheme", "icon", "onClose", "size", "status", "statusMapping", "text", "title", "variant"]);
62
61
  var statuses = __assign(__assign({}, consts_1.alertStatusMapping), statusMapping);
63
62
  var _d = ((_a = statuses[status]) !== null && _a !== void 0 ? _a : {}).colorScheme, colorScheme = _d === void 0 ? colorSchemeProp : _d;
64
63
  var styles = core_1.useStyleConfig('Alert', __assign({ colorScheme: colorScheme }, props));
65
- var context = react_1.useMemo(function () { return utils_1.filterUndefined({ colorScheme: colorScheme, isVertical: isVertical, size: size, status: status, variant: variant }); }, [
64
+ var context = react_1.useMemo(function () { return utils_1.filterUndefined({ colorScheme: colorScheme, size: size, status: status, variant: variant }); }, [
66
65
  colorScheme,
67
- isVertical,
68
66
  size,
69
67
  status,
70
68
  variant
@@ -72,16 +70,16 @@ exports.Alert = core_1.vui(function (props, ref) {
72
70
  return (react_1.default.createElement(context_1.AlertProvider, { value: context },
73
71
  react_1.default.createElement(box_1.default, __assign({ borderRadius: "md", className: utils_1.cs('vui-alert', className), px: 1.5, py: 1, ref: ref, w: "fit-content" }, styles.container, rest), children ? (children) : (react_1.default.createElement(react_1.default.Fragment, null,
74
72
  status ? react_1.default.createElement(alertIcon_1.default, null) : typeof icon === 'string' ? react_1.default.createElement(alertIcon_1.default, { icon: icon }) : icon,
75
- react_1.default.createElement(alertMessage_1.default, null,
76
- title && react_1.default.createElement(alertTitle_1.default, null, title),
77
- text && react_1.default.createElement(alertText_1.default, null, text)),
73
+ react_1.default.createElement(alertText_1.default, null,
74
+ typeof title === 'string' ? react_1.default.createElement(alertTitle_1.default, { text: title }) : title,
75
+ " ",
76
+ text),
78
77
  action,
79
78
  onClose && react_1.default.createElement(alertButton_1.default, { icon: "falTimes", onClick: onClose }))))));
80
79
  });
81
80
  exports.Alert.displayName = 'Alert';
82
81
  exports.Alert.Button = alertButton_1.default;
83
82
  exports.Alert.Icon = alertIcon_1.default;
84
- exports.Alert.Message = alertMessage_1.default;
85
83
  exports.Alert.Text = alertText_1.default;
86
84
  exports.Alert.Title = alertTitle_1.default;
87
85
  exports.default = exports.Alert;
@@ -1,17 +1,17 @@
1
- import React from 'react';
1
+ import { ReactNode } from 'react';
2
2
  import { BoxProps } from '../box';
3
3
  import { IconProps } from '../icon';
4
+ import { VuiIcon } from '../icons';
4
5
  import { ThemingProps } from '../theme';
5
6
  export interface AlertProps extends Omit<BoxProps, 'size' | 'variant'>, ThemingProps<'Alert'> {
6
- action?: React.ReactElement;
7
+ action?: ReactNode;
7
8
  colorScheme?: 'blue' | 'green' | 'grey' | 'prussian' | 'red' | 'yellow';
8
- icon?: React.ReactElement | string;
9
- isVertical?: boolean;
9
+ icon?: VuiIcon | (ReactNode & {});
10
10
  onClose?: () => void;
11
11
  status?: AlertStatus;
12
12
  statusMapping?: AlertStatusMapping;
13
- text?: React.ReactElement | string;
14
- title?: string;
13
+ text?: ReactNode;
14
+ title?: ReactNode;
15
15
  }
16
16
  export declare type AlertStatus = 'error' | 'info' | 'loading' | 'success' | 'warning';
17
17
  export declare type AlertStatusMapping = Record<string, {
@@ -24,7 +24,7 @@ exports.AlertText = core_1.vui(function (props, ref) {
24
24
  var alertProps = (_a = context_1.useAlert()) !== null && _a !== void 0 ? _a : {};
25
25
  var mergedProps = __assign(__assign({}, alertProps), props);
26
26
  var styles = core_1.useStyleConfig('Alert', mergedProps);
27
- return react_1.default.createElement(p_1.default, __assign({ className: "vui-alertText", ref: ref }, styles.text, props));
27
+ return react_1.default.createElement(p_1.default, __assign({ className: "vui-alertText", flex: "1", minW: 0, py: 0.5, ref: ref }, styles.text, props));
28
28
  });
29
29
  exports.AlertText.displayName = 'AlertText';
30
30
  exports.default = exports.AlertText;
@@ -24,7 +24,7 @@ exports.AlertTitle = core_1.vui(function (props, ref) {
24
24
  var alertProps = (_a = context_1.useAlert()) !== null && _a !== void 0 ? _a : {};
25
25
  var mergedProps = __assign(__assign({}, alertProps), props);
26
26
  var styles = core_1.useStyleConfig('Alert', mergedProps);
27
- return react_1.default.createElement(heading_1.H6, __assign({ className: "vui-alertTitle", lineHeight: 1.5, mr: 1, ref: ref }, styles.title, props));
27
+ return react_1.default.createElement(heading_1.H6, __assign({ className: "vui-alertTitle", display: "inline-block", ref: ref }, styles.title, props));
28
28
  });
29
29
  exports.AlertTitle.displayName = 'AlertTitle';
30
30
  exports.default = exports.AlertTitle;
package/alert/index.d.ts CHANGED
@@ -2,7 +2,6 @@ export * from './alert';
2
2
  export * from './alert.types';
3
3
  export * from './alertButton';
4
4
  export * from './alertIcon';
5
- export * from './alertMessage';
6
5
  export * from './alertText';
7
6
  export * from './alertTitle';
8
7
  export * from './context';
package/alert/index.js CHANGED
@@ -18,7 +18,6 @@ __exportStar(require("./alert"), exports);
18
18
  __exportStar(require("./alert.types"), exports);
19
19
  __exportStar(require("./alertButton"), exports);
20
20
  __exportStar(require("./alertIcon"), exports);
21
- __exportStar(require("./alertMessage"), exports);
22
21
  __exportStar(require("./alertText"), exports);
23
22
  __exportStar(require("./alertTitle"), exports);
24
23
  __exportStar(require("./context"), exports);
package/box/box.js CHANGED
@@ -35,7 +35,7 @@ var styled_components_1 = __importDefault(require("styled-components"));
35
35
  var core_1 = require("../core");
36
36
  var system_1 = require("../system");
37
37
  var utils_1 = require("../utils");
38
- exports.BoxBase = styled_components_1.default.div.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tdisplay: flex;\n\n\t", "\n"], ["\n\tdisplay: flex;\n\n\t", "\n"])), system_1.system);
38
+ exports.BoxBase = styled_components_1.default.div.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tdisplay: flex;\n\tmin-width: 0;\n\n\t", "\n"], ["\n\tdisplay: flex;\n\tmin-width: 0;\n\n\t", "\n"])), system_1.system);
39
39
  exports.Box = core_1.vui(function (props, ref) {
40
40
  var _a = core_1.omitThemingProps(props), align = _a.align, center = _a.center, centerH = _a.centerH, centerV = _a.centerV, className = _a.className, column = _a.column, direction = _a.direction, hoverShadow = _a.hoverShadow, justify = _a.justify, radius = _a.radius, shadow = _a.shadow, wrap = _a.wrap, rest = __rest(_a, ["align", "center", "centerH", "centerV", "className", "column", "direction", "hoverShadow", "justify", "radius", "shadow", "wrap"]);
41
41
  var styles = core_1.useStyleConfig('Box', props);
package/button/button.js CHANGED
@@ -40,7 +40,7 @@ var system_1 = require("../system");
40
40
  var utils_1 = require("../utils");
41
41
  var ContentWrapper = styled_components_1.default.span(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tvisibility: hidden;\n"], ["\n\tvisibility: hidden;\n"])));
42
42
  var StateWrapper = styled_components_1.default.span.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\tbottom: 0;\n\tdisplay: flex;\n\tleft: 0;\n\tposition: absolute;\n\tright: 0;\n\ttop: 0;\n\n\t", "\n"], ["\n\tbottom: 0;\n\tdisplay: flex;\n\tleft: 0;\n\tposition: absolute;\n\tright: 0;\n\ttop: 0;\n\n\t", "\n"])), system_1.system);
43
- exports.ButtonBase = styled_components_1.default.button.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n\talign-items: center;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tjustify-content: center;\n\tline-height: normal;\n\toverflow: hidden;\n\tposition: relative;\n\tuser-select: none;\n\twidth: fit-content;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t\tz-index: 1;\n\t}\n\n\t", "\n\n\t&:disabled {\n\t\t/* Specified here to avoid conflict with active/hover props */\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\talign-items: center;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tjustify-content: center;\n\tline-height: normal;\n\toverflow: hidden;\n\tposition: relative;\n\tuser-select: none;\n\twidth: fit-content;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t\tz-index: 1;\n\t}\n\n\t", "\n\n\t&:disabled {\n\t\t/* Specified here to avoid conflict with active/hover props */\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"])), system_1.system);
43
+ exports.ButtonBase = styled_components_1.default.button.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n\talign-items: center;\n\tdisplay: inline-flex;\n\tflex-shrink: 0;\n\tjustify-content: center;\n\tline-height: normal;\n\toverflow: hidden;\n\tposition: relative;\n\tuser-select: none;\n\twidth: fit-content;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t\tz-index: 1;\n\t}\n\n\t", "\n\n\t&:disabled {\n\t\t/* Specified here to avoid conflict with active/hover props */\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\talign-items: center;\n\tdisplay: inline-flex;\n\tflex-shrink: 0;\n\tjustify-content: center;\n\tline-height: normal;\n\toverflow: hidden;\n\tposition: relative;\n\tuser-select: none;\n\twidth: fit-content;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t\tz-index: 1;\n\t}\n\n\t", "\n\n\t&:disabled {\n\t\t/* Specified here to avoid conflict with active/hover props */\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"])), system_1.system);
44
44
  exports.Button = core_1.vui(function (props, ref) {
45
45
  var _a, _b;
46
46
  var buttonGroupProps = context_1.useButtonGroup();
@@ -50,22 +50,22 @@ exports.Button = core_1.vui(function (props, ref) {
50
50
  var hasState = Boolean(state);
51
51
  var states = __assign(__assign({}, consts_1.buttonStateMapping), stateMapping);
52
52
  var _e = (_a = states[state]) !== null && _a !== void 0 ? _a : {}, iconProps = _e.iconProps, stateProps = __rest(_e, ["iconProps"]);
53
- var _f = core_1.useStyleConfig('Button', mergedProps), borderWidth = _f.borderWidth, h = _f.h, _g = _f.iconSize, iconSize = _g === void 0 ? 'md' : _g, minW = _f.minW, _h = _f.spaceX, spaceXBase = _h === void 0 ? 0 : _h, styles = __rest(_f, ["borderWidth", "h", "iconSize", "minW", "spaceX"]);
53
+ var _f = core_1.useStyleConfig('Button', mergedProps), borderWidth = _f.borderWidth, h = _f.h, _g = _f.iconSize, iconSize = _g === void 0 ? 'md' : _g, minW = _f.minW, _h = _f.spaceX, spaceX = _h === void 0 ? 0 : _h, styles = __rest(_f, ["borderWidth", "h", "iconSize", "minW", "spaceX"]);
54
54
  var Content = hasState ? ContentWrapper : react_1.default.Fragment;
55
55
  var border = (_b = borderWidthProp !== null && borderWidthProp !== void 0 ? borderWidthProp : borderWidth) !== null && _b !== void 0 ? _b : 0;
56
- var spaceX = (spaceXBase - border) / 8;
57
- var spaceXText = spaceX * 2;
58
- var iconRightMl = isSplit ? 'auto' : spaceX;
59
- var iconLeft = iconLeftProp && react_1.default.createElement(icon_1.default, { icon: iconLeftProp, mr: spaceX, size: iconSize });
56
+ var spaceXItem = spaceX - border + 'px';
57
+ var spaceXText = spaceX * 2 - border + 'px';
58
+ var iconRightMl = isSplit ? 'auto' : spaceXItem;
59
+ var iconLeft = iconLeftProp && react_1.default.createElement(icon_1.default, { icon: iconLeftProp, mr: spaceXItem, size: iconSize });
60
60
  var iconRight = iconRightProp && react_1.default.createElement(icon_1.default, { icon: iconRightProp, ml: iconRightMl, size: iconSize });
61
61
  var itemLeft = itemLeftProp !== null && itemLeftProp !== void 0 ? itemLeftProp : iconLeft;
62
62
  var itemRight = itemRightProp !== null && itemRightProp !== void 0 ? itemRightProp : iconRight;
63
- var pl = icon || itemLeft ? spaceX : spaceXText;
64
- var pr = icon || itemRight ? spaceX : spaceXText;
63
+ var pl = icon || itemLeft ? spaceXItem : spaceXText;
64
+ var pr = icon || itemRight ? spaceXItem : spaceXText;
65
65
  var minWidth = !icon ? minW : undefined;
66
66
  var aliasedProps = utils_1.filterUndefined({
67
67
  borderRadius: isRound ? h / 2 : undefined,
68
- boxShadow: isElevated ? 2 : undefined,
68
+ boxShadow: isElevated ? '2' : undefined,
69
69
  pointerEvents: hasState ? 'none' : undefined,
70
70
  w: isFullWidth ? '100%' : undefined
71
71
  });
@@ -7,6 +7,10 @@ export declare type ChangeEventHandler<T = HTMLInputElement> = React.ChangeEvent
7
7
  export declare type FocusEvent<T = HTMLElement> = React.FocusEvent<T>;
8
8
  /** Type of blur/focus event handler defaulted to any html element */
9
9
  export declare type FocusEventHandler<T = HTMLElement> = React.FocusEventHandler<T>;
10
+ /** Type of keyboard event defaulted to any html element */
11
+ export declare type KeyboardEvent<T = HTMLElement> = React.KeyboardEvent<T>;
12
+ /** Type of keyboard event handler defaulted to any html element */
13
+ export declare type KeyboardEventHandler<T = HTMLElement> = React.KeyboardEventHandler<T>;
10
14
  /** Type of mouse event defaulted to any html element */
11
15
  export declare type MouseEvent<T = HTMLElement> = React.MouseEvent<T>;
12
16
  /** Type of mouse event handler defaulted to any html element */
@@ -2,7 +2,6 @@
2
2
  /* eslint-disable */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.default = {
5
- details: [20, 20, [], '', 'M0.5 3C0.5 1.61929 1.61929 0.5 3 0.5H17C18.3807 0.5 19.5 1.61929 19.5 3V17C19.5 18.3807 18.3807 19.5 17 19.5H3C1.61929 19.5 0.5 18.3807 0.5 17V3ZM15.75 8.75H4.25C3.83573 8.75 3.5 9.08573 3.5 9.5V10.5C3.5 10.9143 3.83573 11.25 4.25 11.25H15.75C16.1643 11.25 16.5 10.9143 16.5 10.5V9.5C16.5 9.08573 16.1643 8.75 15.75 8.75Z'],
6
- name: 'cuiCheckboxIndeterminate',
7
- pathProps: { stroke: 'currentColor' }
5
+ details: [20, 20, [], '', 'M3 0C1.34315 0 0 1.34315 0 3V17C0 18.6569 1.34315 20 3 20H17C18.6569 20 20 18.6569 20 17V3C20 1.34315 18.6569 0 17 0H3ZM4.25 9.17969H15.75C15.8881 9.17969 16 9.29937 16 9.4375V10.5C16 10.6381 15.8881 10.75 15.75 10.75H4.25C4.11188 10.75 4 10.6381 4 10.5V9.4375C4 9.29937 4.11188 9.17969 4.25 9.17969Z'],
6
+ name: 'cuiCheckboxIndeterminate'
8
7
  };
@@ -2,7 +2,6 @@
2
2
  /* eslint-disable */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.default = {
5
- details: [20, 20, [], '', 'M17.1595 4.87355L17.1594 4.87351L16.8059 4.51995C16.4642 4.17825 15.9101 4.17825 15.5684 4.51995L7.17153 12.9169L4.43149 10.1768C4.08976 9.8351 3.53577 9.83516 3.19407 10.1768L3.19403 10.1768L2.8405 10.5304C2.49878 10.8721 2.49884 11.4261 2.84047 11.7678L2.8405 11.7678L6.55282 15.4801C6.89454 15.8218 7.44853 15.8218 7.79023 15.4802L7.79027 15.4801L17.1594 6.11096C17.5011 5.76924 17.5011 5.21525 17.1595 4.87355ZM0.5 3C0.5 1.61929 1.61929 0.5 3 0.5H17C18.3807 0.5 19.5 1.61929 19.5 3V17C19.5 18.3807 18.3807 19.5 17 19.5H3C1.61929 19.5 0.5 18.3807 0.5 17V3Z'],
6
- name: 'cuiCheckboxSelected',
7
- pathProps: { stroke: 'currentColor' }
5
+ details: [20, 20, [], '', 'M17.8571 0C18.9913 0 19.9197 0.881093 19.9951 1.99614L20 2.14286V17.8571C20 18.9913 19.1189 19.9197 18.0039 19.9951L17.8571 20H2.14286C1.00869 20 0.080337 19.1189 0.00494355 18.0039L0 17.8571V2.14286C0 1.00869 0.881093 0.080337 1.99614 0.00494355L2.14286 0H17.8571ZM15.191 5.43326L7.89451 12.6712L4.81522 9.56705C4.60687 9.35701 4.26768 9.35563 4.05763 9.56402L3.67728 9.94129C3.46723 10.1496 3.46585 10.4888 3.67424 10.6989L7.50808 14.5637C7.71643 14.7738 8.05562 14.7751 8.26567 14.5667L16.3228 6.57424C16.5328 6.36589 16.5342 6.0267 16.3258 5.81665L15.9486 5.43629C15.7402 5.22625 15.401 5.22487 15.191 5.43326Z'],
6
+ name: 'cuiCheckboxSelected'
8
7
  };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.default = {
5
+ details: [448, 512, [], '', 'M442 114H6a6 6 0 0 1-6-6V84a6 6 0 0 1 6-6h436a6 6 0 0 1 6 6v24a6 6 0 0 1-6 6zm0 160H6a6 6 0 0 1-6-6v-24a6 6 0 0 1 6-6h436a6 6 0 0 1 6 6v24a6 6 0 0 1-6 6zm0 160H6a6 6 0 0 1-6-6v-24a6 6 0 0 1 6-6h436a6 6 0 0 1 6 6v24a6 6 0 0 1-6 6z'],
6
+ name: 'falBars'
7
+ };
package/input/consts.d.ts CHANGED
@@ -1,10 +1,2 @@
1
1
  import { InputStateMapping } from './input.types';
2
- export declare const inputLengths: {
3
- fluid: string;
4
- xs: number;
5
- sm: number;
6
- md: number;
7
- lg: number;
8
- xl: number;
9
- };
10
2
  export declare const inputStateMapping: InputStateMapping;
package/input/consts.js CHANGED
@@ -1,14 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.inputStateMapping = exports.inputLengths = void 0;
4
- exports.inputLengths = {
5
- fluid: 'none',
6
- xs: 104,
7
- sm: 160,
8
- md: 240,
9
- lg: 320,
10
- xl: 480
11
- };
3
+ exports.inputStateMapping = void 0;
12
4
  exports.inputStateMapping = {
13
5
  error: {
14
6
  colorScheme: 'red',
package/input/input.js CHANGED
@@ -74,50 +74,52 @@ var icon_1 = __importDefault(require("../icon"));
74
74
  var system_1 = require("../system");
75
75
  var t_1 = __importDefault(require("../t"));
76
76
  var utils_1 = require("../utils");
77
- exports.InputInput = styled_components_1.default.input.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\talign-self: stretch;\n\tbackground-color: transparent;\n\tborder: none;\n\tflex: 1;\n\tmargin: 0 8px;\n\tmin-width: 0;\n\toutline: none;\n\tpadding: 0;\n\n\t:disabled,\n\t:disabled::placeholder {\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"], ["\n\talign-self: stretch;\n\tbackground-color: transparent;\n\tborder: none;\n\tflex: 1;\n\tmargin: 0 8px;\n\tmin-width: 0;\n\toutline: none;\n\tpadding: 0;\n\n\t:disabled,\n\t:disabled::placeholder {\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"])), system_1.system);
78
- exports.InputBase = styled_components_1.default.div.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\talign-items: center;\n\tborder-width: 1px;\n\tdisplay: flex;\n\toutline: none;\n\tposition: relative;\n\twidth: 100%;\n\n\t&.disabled {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"], ["\n\talign-items: center;\n\tborder-width: 1px;\n\tdisplay: flex;\n\toutline: none;\n\tposition: relative;\n\twidth: 100%;\n\n\t&.disabled {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"])), system_1.system);
77
+ exports.InputInput = styled_components_1.default.input.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\talign-self: stretch;\n\tbackground-color: transparent;\n\tborder: none;\n\tflex: 1;\n\tmin-width: 0;\n\toutline: none;\n\n\t:disabled,\n\t:disabled::placeholder {\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"], ["\n\talign-self: stretch;\n\tbackground-color: transparent;\n\tborder: none;\n\tflex: 1;\n\tmin-width: 0;\n\toutline: none;\n\n\t:disabled,\n\t:disabled::placeholder {\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"])), system_1.system);
78
+ exports.InputBase = styled_components_1.default.div.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\talign-items: center;\n\tbackground-color: white;\n\tborder-width: 1px;\n\tdisplay: flex;\n\toutline: none;\n\tposition: relative;\n\twidth: 100%;\n\n\t&.disabled {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"], ["\n\talign-items: center;\n\tbackground-color: white;\n\tborder-width: 1px;\n\tdisplay: flex;\n\toutline: none;\n\tposition: relative;\n\twidth: 100%;\n\n\t&.disabled {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"])), system_1.system);
79
79
  exports.Input = core_1.vui(function (props, ref) {
80
80
  var _a, _b;
81
81
  var _c = __read(react_1.useState(helpers_1.getInitialCount(props)), 2), count = _c[0], setCount = _c[1];
82
- var _d = core_1.omitThemingProps(props), autoComplete = _d.autoComplete, autoFocus = _d.autoFocus, className = _d.className, colorSchemeProp = _d.colorScheme, defaultValue = _d.defaultValue, disabled = _d.disabled, iconLeft = _d.iconLeft, iconRight = _d.iconRight, _e = _d.inputProps, inputProps = _e === void 0 ? {} : _e, inputRef = _d.inputRef, isInvalid = _d.isInvalid, itemLeft = _d.itemLeft, itemRight = _d.itemRight, _f = _d.length, length = _f === void 0 ? 'fluid' : _f, maxLength = _d.maxLength, name = _d.name, onBlur = _d.onBlur, onChangeProp = _d.onChange, onFocus = _d.onFocus, placeholder = _d.placeholder, readOnly = _d.readOnly, required = _d.required, showCount = _d.showCount, _g = _d.state, state = _g === void 0 ? '' : _g, stateMapping = _d.stateMapping, _h = _d.type, type = _h === void 0 ? 'text' : _h, value = _d.value, rest = __rest(_d, ["autoComplete", "autoFocus", "className", "colorScheme", "defaultValue", "disabled", "iconLeft", "iconRight", "inputProps", "inputRef", "isInvalid", "itemLeft", "itemRight", "length", "maxLength", "name", "onBlur", "onChange", "onFocus", "placeholder", "readOnly", "required", "showCount", "state", "stateMapping", "type", "value"]);
82
+ var _d = core_1.omitThemingProps(props), autoComplete = _d.autoComplete, autoFocus = _d.autoFocus, className = _d.className, colorSchemeProp = _d.colorScheme, defaultValue = _d.defaultValue, disabled = _d.disabled, iconLeft = _d.iconLeft, iconRight = _d.iconRight, inputProps = _d.inputProps, inputRef = _d.inputRef, isInvalid = _d.isInvalid, itemLeft = _d.itemLeft, itemRight = _d.itemRight, max = _d.max, maxLength = _d.maxLength, min = _d.min, name = _d.name, onBlur = _d.onBlur, onChangeProp = _d.onChange, onFocus = _d.onFocus, pattern = _d.pattern, placeholder = _d.placeholder, readOnly = _d.readOnly, required = _d.required, showCount = _d.showCount, _e = _d.state, state = _e === void 0 ? '' : _e, stateMapping = _d.stateMapping, step = _d.step, _f = _d.type, type = _f === void 0 ? 'text' : _f, value = _d.value, rest = __rest(_d, ["autoComplete", "autoFocus", "className", "colorScheme", "defaultValue", "disabled", "iconLeft", "iconRight", "inputProps", "inputRef", "isInvalid", "itemLeft", "itemRight", "max", "maxLength", "min", "name", "onBlur", "onChange", "onFocus", "pattern", "placeholder", "readOnly", "required", "showCount", "state", "stateMapping", "step", "type", "value"]);
83
83
  var states = __assign(__assign({}, consts_1.inputStateMapping), stateMapping);
84
- var _j = (_a = states[state]) !== null && _a !== void 0 ? _a : {}, stateColorScheme = _j.colorScheme, stateIconProps = _j.iconProps;
84
+ var _g = (_a = states[state]) !== null && _a !== void 0 ? _a : {}, stateColorScheme = _g.colorScheme, stateIconProps = _g.iconProps;
85
85
  var stateProps = utils_1.filterUndefined({
86
86
  colorScheme: (_b = colorSchemeProp !== null && colorSchemeProp !== void 0 ? colorSchemeProp : (isInvalid ? 'red' : undefined)) !== null && _b !== void 0 ? _b : stateColorScheme
87
87
  });
88
- var _k = core_1.useStyleConfig('Input', __assign(__assign({}, stateProps), props)), fontSize = _k.fontSize, iconSize = _k.iconSize, styles = __rest(_k, ["fontSize", "iconSize"]);
88
+ var _h = core_1.useStyleConfig('Input', __assign(__assign({}, stateProps), props)), fontSize = _h.fontSize, iconSize = _h.iconSize, styles = __rest(_h, ["fontSize", "iconSize"]);
89
89
  function onChange(e) {
90
90
  setCount(e.target.value.length);
91
91
  onChangeProp === null || onChangeProp === void 0 ? void 0 : onChangeProp(e);
92
92
  }
93
93
  var iconColor = !disabled ? 'blue.80' : 'grey.50';
94
- // const iconRight = iconRightProp ?? states[state]?.iconRight
95
94
  var aliasedProps = utils_1.filterUndefined({
96
95
  bg: readOnly ? 'grey.20' : undefined,
97
96
  focusWithinBorderColor: !readOnly ? 'transparent' : undefined,
98
- focusWithinRingColor: readOnly ? 'transparent' : undefined,
99
- maxW: consts_1.inputLengths[length]
97
+ focusWithinRingColor: readOnly ? 'transparent' : undefined
100
98
  });
101
- return (react_1.default.createElement(exports.InputBase, __assign({ borderRadius: "md", className: utils_1.cs('vui-input', disabled && 'disabled', className), px: 1, ref: ref, transitionDuration: "fast" }, styles, aliasedProps, rest), itemLeft !== null && itemLeft !== void 0 ? itemLeft : (iconLeft && react_1.default.createElement(icon_1.default, { color: iconColor, icon: iconLeft, size: iconSize })),
102
- react_1.default.createElement(exports.InputInput, __assign({ className: "vui-inputInput", placeholderColor: "grey.60", ref: inputRef }, {
99
+ return (react_1.default.createElement(exports.InputBase, __assign({ borderRadius: "md", className: utils_1.cs('vui-input', disabled && 'disabled', className), ref: ref, transitionDuration: "fast" }, styles, aliasedProps, rest), itemLeft !== null && itemLeft !== void 0 ? itemLeft : (iconLeft && react_1.default.createElement(icon_1.default, { color: iconColor, icon: iconLeft, ml: 1, size: iconSize })),
100
+ react_1.default.createElement(exports.InputInput, __assign({ borderRadius: "md", className: "vui-inputInput", placeholderColor: "grey.60", px: 1, ref: inputRef }, {
103
101
  autoComplete: autoComplete,
104
102
  autoFocus: autoFocus,
105
103
  defaultValue: defaultValue,
106
104
  disabled: disabled,
107
105
  fontSize: fontSize,
106
+ max: max,
108
107
  maxLength: maxLength,
108
+ min: min,
109
109
  name: name,
110
110
  onBlur: onBlur,
111
111
  onChange: onChange,
112
112
  onFocus: onFocus,
113
+ pattern: pattern,
113
114
  placeholder: placeholder,
114
115
  readOnly: readOnly,
115
116
  required: required,
117
+ step: step,
116
118
  type: type,
117
119
  value: value
118
- }, inputProps)), itemRight !== null && itemRight !== void 0 ? itemRight : (iconRight && react_1.default.createElement(icon_1.default, { color: iconColor, icon: iconRight, size: iconSize })),
119
- state && react_1.default.createElement(icon_1.default, __assign({ size: iconSize }, stateIconProps)),
120
- showCount && (react_1.default.createElement(t_1.default, { color: "grey.80", position: "absolute", right: 0, size: "sm", top: "calc(100% + 2px)" },
120
+ }, inputProps)), itemRight !== null && itemRight !== void 0 ? itemRight : (iconRight && react_1.default.createElement(icon_1.default, { color: iconColor, icon: iconRight, mr: 1, size: iconSize })),
121
+ state && react_1.default.createElement(icon_1.default, __assign({ mr: 1, size: iconSize }, stateIconProps)),
122
+ showCount && (react_1.default.createElement(t_1.default, { color: "grey.80", position: "absolute", right: 0, size: "sm", top: "calc(100% + 1px)" },
121
123
  count,
122
124
  " / ",
123
125
  maxLength))));
@@ -1,10 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { inputLengths } from './consts';
3
2
  import { ChangeEventHandler, FocusEventHandler, PropsOf } from '../core';
4
3
  import { IconProp, IconProps } from '../icon';
5
4
  import { SystemProps } from '../system';
6
5
  import { ThemingProps } from '../theme';
7
- export declare type InputLength = keyof typeof inputLengths;
8
6
  export interface InputProps extends SystemProps, ThemingProps<'Input'> {
9
7
  autoComplete?: string;
10
8
  autoFocus?: boolean;
@@ -13,24 +11,27 @@ export interface InputProps extends SystemProps, ThemingProps<'Input'> {
13
11
  disabled?: boolean;
14
12
  iconLeft?: IconProp;
15
13
  iconRight?: IconProp;
16
- inputProps?: PropsOf<'input'>;
14
+ inputProps?: PropsOf<'input', SystemProps>;
17
15
  inputRef?: React.MutableRefObject<HTMLInputElement | null> | null;
18
16
  isInvalid?: boolean;
19
17
  itemLeft?: React.ReactNode;
20
18
  itemRight?: React.ReactNode;
21
- length?: InputLength;
19
+ max?: number | string;
22
20
  maxLength?: number;
21
+ min?: number | string;
23
22
  name?: string;
24
23
  onBlur?: FocusEventHandler;
25
24
  onChange?: ChangeEventHandler;
26
25
  onFocus?: FocusEventHandler;
26
+ pattern?: string;
27
27
  placeholder?: string;
28
28
  readOnly?: boolean;
29
29
  required?: boolean;
30
30
  showCount?: boolean;
31
31
  state?: InputState;
32
32
  stateMapping?: InputStateMapping;
33
- type?: string;
33
+ step?: number | string;
34
+ type?: InputType;
34
35
  value?: number | string;
35
36
  }
36
37
  export declare type InputState = 'default' | 'error' | 'loading' | 'success';
@@ -38,3 +39,4 @@ export declare type InputStateMapping = Record<string, {
38
39
  colorScheme?: InputProps['colorScheme'];
39
40
  iconProps: IconProps;
40
41
  }>;
42
+ export declare type InputType = 'date' | 'datetime-local' | 'email' | 'hidden' | 'month' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'time' | 'url' | 'week';
package/label/label.js CHANGED
@@ -37,7 +37,7 @@ var icon_1 = __importDefault(require("../icon"));
37
37
  var system_1 = require("../system");
38
38
  var utils_1 = require("../utils");
39
39
  var Text = styled_components_1.default.span(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), system_1.isTruncated);
40
- exports.LabelBase = styled_components_1.default.span.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\talign-items: center;\n\tdisplay: flex;\n\tjustify-content: center;\n\tline-height: normal;\n\tmin-width: 0px;\n\tposition: relative;\n\twidth: fit-content;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t}\n\n\t", "\n"], ["\n\talign-items: center;\n\tdisplay: flex;\n\tjustify-content: center;\n\tline-height: normal;\n\tmin-width: 0px;\n\tposition: relative;\n\twidth: fit-content;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t}\n\n\t", "\n"])), system_1.system);
40
+ exports.LabelBase = styled_components_1.default.span.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\talign-items: center;\n\tdisplay: inline-flex;\n\tjustify-content: center;\n\tline-height: normal;\n\tposition: relative;\n\twidth: fit-content;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t}\n\n\t", "\n"], ["\n\talign-items: center;\n\tdisplay: inline-flex;\n\tjustify-content: center;\n\tline-height: normal;\n\tposition: relative;\n\twidth: fit-content;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t}\n\n\t", "\n"])), system_1.system);
41
41
  exports.Label = core_1.vui(function (props, ref) {
42
42
  var _a = core_1.omitThemingProps(props), casing = _a.casing, children = _a.children, className = _a.className, icon = _a.icon, iconLeft = _a.iconLeft, iconRight = _a.iconRight, isElevated = _a.isElevated, isFullWidth = _a.isFullWidth, _b = _a.isInteractive, isInteractive = _b === void 0 ? props.onClick !== undefined : _b, isRound = _a.isRound, isSplit = _a.isSplit, _c = _a.isTruncated, isTruncated = _c === void 0 ? true : _c, itemLeft = _a.itemLeft, itemRight = _a.itemRight, text = _a.text, weight = _a.weight, rest = __rest(_a, ["casing", "children", "className", "icon", "iconLeft", "iconRight", "isElevated", "isFullWidth", "isInteractive", "isRound", "isSplit", "isTruncated", "itemLeft", "itemRight", "text", "weight"]);
43
43
  var _d = core_1.useStyleConfig('Label', props), activeBg = _d.activeBg, h = _d.h, hoverBg = _d.hoverBg, _e = _d.iconSize, iconSize = _e === void 0 ? 'md' : _e, _f = _d.spaceX, spaceXBase = _f === void 0 ? 0 : _f, styles = __rest(_d, ["activeBg", "h", "hoverBg", "iconSize", "spaceX"]);
@@ -58,7 +58,7 @@ exports.Label = core_1.vui(function (props, ref) {
58
58
  : {};
59
59
  var aliasedProps = utils_1.filterUndefined({
60
60
  borderRadius: isRound ? h / 2 : undefined,
61
- boxShadow: isElevated ? 2 : undefined,
61
+ boxShadow: isElevated ? '1' : undefined,
62
62
  fontWeight: weight,
63
63
  textTransform: casing,
64
64
  w: isFullWidth ? '100%' : undefined
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veracity/vui",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "Veracity UI components library based on Styled Components and @xstyled",
5
5
  "main": "index.js",
6
6
  "author": "Veracity",
@@ -1,4 +1,4 @@
1
- import { HTMLAttributes } from 'react';
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
2
  import { ChangeEventHandler, FocusEventHandler } from '../core';
3
3
  import { SystemProps } from '../system';
4
4
  import { ThemingProps } from '../theme';
@@ -6,12 +6,12 @@ export interface SwitchProps extends SystemProps, ThemingProps<'Switch'> {
6
6
  checked?: boolean;
7
7
  colorScheme?: 'blue' | 'green' | 'prussian' | 'red';
8
8
  disabled?: boolean;
9
- innerLabelOff?: React.ReactElement | string;
10
- innerLabelOn?: React.ReactElement | string;
9
+ innerLabelOff?: ReactNode;
10
+ innerLabelOn?: ReactNode;
11
11
  inputProps?: HTMLAttributes<HTMLInputElement>;
12
12
  inputRef?: React.MutableRefObject<HTMLInputElement | null> | null;
13
- labelLeft?: React.ReactElement | string;
14
- labelRight?: React.ReactElement | string;
13
+ labelLeft?: ReactNode;
14
+ labelRight?: ReactNode;
15
15
  name?: string;
16
16
  onBlur?: FocusEventHandler;
17
17
  onChange?: ChangeEventHandler;
@@ -1,4 +1,4 @@
1
- import { HTMLAttributes } from 'react';
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
2
  import { ChangeEventHandler, FocusEventHandler } from '../core';
3
3
  import { SystemProps } from '../system';
4
4
  import { ThemingProps } from '../theme';
@@ -6,8 +6,8 @@ export interface SwitchButtonProps extends SystemProps, ThemingProps<'Switch'> {
6
6
  checked?: boolean;
7
7
  colorScheme?: 'blue' | 'green' | 'prussian' | 'red';
8
8
  disabled?: boolean;
9
- innerLabelOff?: React.ReactElement | string;
10
- innerLabelOn?: React.ReactElement | string;
9
+ innerLabelOff?: ReactNode;
10
+ innerLabelOn?: ReactNode;
11
11
  inputProps?: HTMLAttributes<HTMLInputElement>;
12
12
  inputRef?: React.MutableRefObject<HTMLInputElement | null> | null;
13
13
  name?: string;
@@ -1,7 +1,8 @@
1
- import { SystemProp, VariantsType } from '@xstyled/system';
1
+ import { SystemProp } from '@xstyled/system';
2
2
  import * as CSS from 'csstype';
3
3
  import { VuiTheme } from '../theme';
4
- export declare type ShadowGetter = VariantsType<VuiTheme['shadows']>;
4
+ import { AnyString } from '../utils';
5
+ export declare type ShadowGetter = keyof VuiTheme['shadows'] | AnyString;
5
6
  declare type OpacityProp = SystemProp<CSS.Property.Opacity, VuiTheme>;
6
7
  export interface OpacityProps {
7
8
  opacity?: OpacityProp;
@@ -106,7 +106,7 @@ exports.Textarea = core_1.vui(function (props, ref) {
106
106
  resize: resize,
107
107
  value: value
108
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)" },
109
+ showCount && (react_1.default.createElement(t_1.default, { color: "grey.80", position: "absolute", right: 0, size: "sm", top: "calc(100% + 1px)" },
110
110
  count,
111
111
  " / ",
112
112
  maxLength))));
@@ -770,8 +770,8 @@ declare const _default: {
770
770
  default: {
771
771
  bg: string;
772
772
  borderRadius: string;
773
- shadow: number;
774
- hoverShadow: number;
773
+ shadow: string;
774
+ hoverShadow: string;
775
775
  p: number;
776
776
  };
777
777
  outlined: {
@@ -134,12 +134,23 @@ declare const defaultTheme: {
134
134
  xl: number;
135
135
  };
136
136
  shadows: {
137
- 0: string;
138
- 1: string;
139
- 2: string;
140
- 3: string;
141
- 4: string;
142
- 5: string;
137
+ '0': string;
138
+ '1': string;
139
+ '2': string;
140
+ '3': string;
141
+ '4': string;
142
+ t1: string;
143
+ t2: string;
144
+ t3: string;
145
+ t4: string;
146
+ r1: string;
147
+ r2: string;
148
+ r3: string;
149
+ r4: string;
150
+ l1: string;
151
+ l2: string;
152
+ l3: string;
153
+ l4: string;
143
154
  };
144
155
  sizes: {};
145
156
  spaces: {};
@@ -921,8 +932,8 @@ declare const defaultTheme: {
921
932
  default: {
922
933
  bg: string;
923
934
  borderRadius: string;
924
- shadow: number;
925
- hoverShadow: number;
935
+ shadow: string;
936
+ hoverShadow: string;
926
937
  p: number;
927
938
  };
928
939
  outlined: {
@@ -134,12 +134,23 @@ declare const _default: {
134
134
  xl: number;
135
135
  };
136
136
  shadows: {
137
- 0: string;
138
- 1: string;
139
- 2: string;
140
- 3: string;
141
- 4: string;
142
- 5: string;
137
+ '0': string;
138
+ '1': string;
139
+ '2': string;
140
+ '3': string;
141
+ '4': string;
142
+ t1: string;
143
+ t2: string;
144
+ t3: string;
145
+ t4: string;
146
+ r1: string;
147
+ r2: string;
148
+ r3: string;
149
+ r4: string;
150
+ l1: string;
151
+ l2: string;
152
+ l3: string;
153
+ l4: string;
143
154
  };
144
155
  sizes: {};
145
156
  spaces: {};
@@ -1,9 +1,20 @@
1
1
  declare const _default: {
2
- 0: string;
3
- 1: string;
4
- 2: string;
5
- 3: string;
6
- 4: string;
7
- 5: string;
2
+ '0': string;
3
+ '1': string;
4
+ '2': string;
5
+ '3': string;
6
+ '4': string;
7
+ t1: string;
8
+ t2: string;
9
+ t3: string;
10
+ t4: string;
11
+ r1: string;
12
+ r2: string;
13
+ r3: string;
14
+ r4: string;
15
+ l1: string;
16
+ l2: string;
17
+ l3: string;
18
+ l4: string;
8
19
  };
9
20
  export default _default;
@@ -1,11 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var colors_1 = require("./colors");
4
+ var utils_1 = require("../../utils");
5
+ var greyLight = utils_1.hexToRGB(colors_1.grey[80], 0.4);
6
+ var greyDark = utils_1.hexToRGB(colors_1.grey[80], 0.6);
4
7
  exports.default = {
5
- 0: "0px 0px 0px 0px " + colors_1.grey[80],
6
- 1: "0px 2px 7px -3px " + colors_1.grey[80],
7
- 2: "0px 6px 23px -8px " + colors_1.grey[80],
8
- 3: "0px 16px 42px -15px " + colors_1.grey[80],
9
- 4: "0px 18px 54px -8px " + colors_1.grey[80],
10
- 5: "0px 28px 77px -5px " + colors_1.grey[80]
8
+ '0': "0 0 0 0 #fff",
9
+ '1': "0 2px 5px 0 " + greyLight,
10
+ '2': "0 4px 12px 0 " + greyLight,
11
+ '3': "0 7px 20px 0 " + greyDark,
12
+ '4': "0 12px 30px 0 " + greyDark,
13
+ t1: "0 -2px 5px 0 " + greyLight,
14
+ t2: "0 -4px 12px 0 " + greyLight,
15
+ t3: "0 -7px 20px 0 " + greyDark,
16
+ t4: "0 -12px 30px 0 " + greyDark,
17
+ r1: "2px 0 5px 0 " + greyLight,
18
+ r2: "4px 0 12px 0 " + greyLight,
19
+ r3: "7px 0 20px 0 " + greyDark,
20
+ r4: "12px 0 30px 0 " + greyDark,
21
+ l1: "-2px 0 5px 0 " + greyLight,
22
+ l2: "-4px 0 12px 0 " + greyLight,
23
+ l3: "-7px 0 20px 0 " + greyDark,
24
+ l4: "-12px 0 30px 0 " + greyDark
11
25
  };
package/tile/theme.d.ts CHANGED
@@ -7,8 +7,8 @@ declare const _default: {
7
7
  default: {
8
8
  bg: string;
9
9
  borderRadius: string;
10
- shadow: number;
11
- hoverShadow: number;
10
+ shadow: string;
11
+ hoverShadow: string;
12
12
  p: number;
13
13
  };
14
14
  outlined: {
package/tile/theme.js CHANGED
@@ -8,8 +8,8 @@ var variants = {
8
8
  default: {
9
9
  bg: 'white',
10
10
  borderRadius: 'md',
11
- shadow: 2,
12
- hoverShadow: 4,
11
+ shadow: '1',
12
+ hoverShadow: '3',
13
13
  p: 2
14
14
  },
15
15
  outlined: {
package/utils/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './dom';
2
1
  export * from './function';
3
2
  export * from './object';
3
+ export * from './styles';
4
4
  export * from './types';
package/utils/index.js CHANGED
@@ -10,7 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./dom"), exports);
14
13
  __exportStar(require("./function"), exports);
15
14
  __exportStar(require("./object"), exports);
15
+ __exportStar(require("./styles"), exports);
16
16
  __exportStar(require("./types"), exports);
@@ -0,0 +1,4 @@
1
+ /** Concatenates individual className arguments and returns a single string. */
2
+ export declare function cs(...classNames: any[]): string;
3
+ /** Converts hex color value to rgb with optional alpha property */
4
+ export declare function hexToRGB(hex: string, alpha?: number): string;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hexToRGB = exports.cs = void 0;
4
+ /** Concatenates individual className arguments and returns a single string. */
5
+ function cs() {
6
+ var classNames = [];
7
+ for (var _i = 0; _i < arguments.length; _i++) {
8
+ classNames[_i] = arguments[_i];
9
+ }
10
+ return classNames.filter(Boolean).join(' ');
11
+ }
12
+ exports.cs = cs;
13
+ /** Converts hex color value to rgb with optional alpha property */
14
+ function hexToRGB(hex, alpha) {
15
+ var hexStr = hex;
16
+ if (hexStr.charAt(0) === '#') {
17
+ hexStr = hexStr.slice(1);
18
+ }
19
+ if (hexStr.length < 4) {
20
+ hexStr = hexStr
21
+ .split('')
22
+ .map(function (char) { return char + char; })
23
+ .join('');
24
+ }
25
+ var r = parseInt(hexStr.slice(0, 2), 16);
26
+ var g = parseInt(hexStr.slice(2, 4), 16);
27
+ var b = parseInt(hexStr.slice(4, 6), 16);
28
+ if (alpha !== undefined) {
29
+ return "rgba(" + r + ", " + g + ", " + b + ", " + alpha + ")";
30
+ }
31
+ else {
32
+ return "rgb(" + r + ", " + g + ", " + b + ")";
33
+ }
34
+ }
35
+ exports.hexToRGB = hexToRGB;
@@ -1,3 +0,0 @@
1
- import { BoxProps } from '../box';
2
- export declare const AlertMessage: import("../core").VuiComponent<"div", BoxProps>;
3
- export default AlertMessage;
@@ -1,31 +0,0 @@
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
- };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.AlertMessage = void 0;
18
- var react_1 = __importDefault(require("react"));
19
- var context_1 = require("./context");
20
- var core_1 = require("../core");
21
- var box_1 = __importDefault(require("../box"));
22
- exports.AlertMessage = core_1.vui(function (props, ref) {
23
- var _a;
24
- var alertProps = (_a = context_1.useAlert()) !== null && _a !== void 0 ? _a : {};
25
- var mergedProps = __assign(__assign({}, alertProps), props);
26
- var styles = core_1.useStyleConfig('Alert', mergedProps);
27
- var isVertical = mergedProps.isVertical;
28
- return (react_1.default.createElement(box_1.default, __assign({ className: "vui-alertMessage", column: isVertical, flex: "1", minW: 0, py: 0.5, ref: ref }, styles.message, props)));
29
- });
30
- exports.AlertMessage.displayName = 'AlertMessage';
31
- exports.default = exports.AlertMessage;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- /* eslint-disable */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.default = {
5
- details: [32, 33, [], '', 'M27 2.5C28.5878 2.5 29.8875 3.73353 29.9931 5.2946L30 5.5V27.5C30 29.0878 28.7665 30.3875 27.2054 30.4931L27 30.5H5C3.41216 30.5 2.11247 29.2665 2.00692 27.7054L2 27.5V5.5C2 3.91216 3.23353 2.61247 4.7946 2.50692L5 2.5H27ZM23.2674 10.1066L13.0523 20.2397L8.74131 15.8939C8.44963 15.5998 7.97475 15.5979 7.68069 15.8896L7.14819 16.4178C6.85413 16.7095 6.85219 17.1844 7.14394 17.4784L12.5113 22.8892C12.803 23.1833 13.2779 23.1852 13.5719 22.8934L24.8519 11.7039C25.1459 11.4123 25.1479 10.9374 24.8562 10.6433L24.328 10.1108C24.0363 9.81675 23.5614 9.81481 23.2674 10.1066Z'],
6
- name: 'cusCheckboxSelected'
7
- };
@@ -1,3 +0,0 @@
1
- import { IconDefinition } from '../../types';
2
- declare const _default: IconDefinition;
3
- export default _default;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- /* eslint-disable */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.default = {
5
- details: [32, 32, [], '', ['M16 0.5C7.4375 0.5 0.5 7.4375 0.5 16C0.5 24.5625 7.4375 31.5 16 31.5C24.5625 31.5 31.5 24.5625 31.5 16C31.5 7.4375 24.5625 0.5 16 0.5ZM29.5 16C29.5 23.4188 23.4937 29.5 16 29.5C8.58125 29.5 2.5 23.4937 2.5 16C2.5 8.58125 8.50625 2.5 16 2.5C23.4188 2.5 29.5 8.50625 29.5 16Z', 'M26 16C26 21.5228 21.5228 26 16 26C10.4772 26 6 21.5228 6 16C6 10.4772 10.4772 6 16 6C21.5228 6 26 10.4772 26 16Z']],
6
- name: 'cusRadio'
7
- };
@@ -1,3 +0,0 @@
1
- import { IconDefinition } from '../../types';
2
- declare const _default: IconDefinition;
3
- export default _default;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- /* eslint-disable */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.default = {
5
- details: [28, 28, [], '', 'M2 0C0.895431 0 0 0.895431 0 2V26C0 27.1046 0.895431 28 2 28H26C27.1046 28 28 27.1046 28 26V2C28 0.895431 27.1046 0 26 0H2ZM5 12.5C4.44772 12.5 4 12.9477 4 13.5V14.5C4 15.0523 4.44772 15.5 5 15.5H23C23.5523 15.5 24 15.0523 24 14.5V13.5C24 12.9477 23.5523 12.5 23 12.5H5Z'],
6
- name: 'cusSquareMinus'
7
- };
package/utils/dom.d.ts DELETED
@@ -1,2 +0,0 @@
1
- /** Concatenates individual className arguments and returns a single string. */
2
- export declare function cs(...classNames: any[]): string;
package/utils/dom.js DELETED
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cs = void 0;
4
- /** Concatenates individual className arguments and returns a single string. */
5
- function cs() {
6
- var classNames = [];
7
- for (var _i = 0; _i < arguments.length; _i++) {
8
- classNames[_i] = arguments[_i];
9
- }
10
- return classNames.filter(Boolean).join(' ');
11
- }
12
- exports.cs = cs;