@veracity/vui 0.1.0 → 0.2.1

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 (123) hide show
  1. package/avatar/avatar.js +5 -5
  2. package/box/box.js +6 -6
  3. package/button/button.js +19 -23
  4. package/button/button.types.d.ts +33 -3
  5. package/button/buttonIcon.js +3 -3
  6. package/button/buttonText.js +3 -3
  7. package/button/buttons.js +8 -8
  8. package/button/context.js +1 -1
  9. package/button/theme.js +0 -6
  10. package/buttonGroup/buttonGroup.js +5 -10
  11. package/buttonGroup/context.js +1 -1
  12. package/card/card.js +4 -4
  13. package/checkbox/checkbox.js +13 -13
  14. package/checkbox/checkboxGroup.js +7 -7
  15. package/checkbox/checkboxGroup.types.d.ts +1 -1
  16. package/checkbox/context.js +1 -1
  17. package/checkbox/theme.js +5 -2
  18. package/core/globalStyle.js +2 -3
  19. package/core/resetCSS.js +1 -1
  20. package/core/styled.js +11 -7
  21. package/core/utils.js +10 -10
  22. package/core/v.js +1 -1
  23. package/divider/divider.js +6 -6
  24. package/divider/divider.types.d.ts +1 -0
  25. package/heading/heading.js +6 -6
  26. package/heading/headings.js +6 -6
  27. package/icon/icon.js +6 -6
  28. package/icons/library.js +9 -5
  29. package/image/image.js +4 -4
  30. package/image/image.types.d.ts +1 -0
  31. package/index.d.ts +1 -1
  32. package/index.js +1 -1
  33. package/input/context.js +1 -1
  34. package/input/input.js +13 -17
  35. package/input/inputIcon.js +3 -3
  36. package/input/inputInput.js +4 -4
  37. package/link/link.js +6 -6
  38. package/list/context.js +1 -1
  39. package/list/list.js +6 -11
  40. package/list/listHeading.js +3 -3
  41. package/list/listIcon.js +3 -3
  42. package/list/listItem.js +8 -8
  43. package/list/listText.js +3 -3
  44. package/notification/consts.d.ts +2 -0
  45. package/{alert → notification}/consts.js +7 -7
  46. package/notification/context.d.ts +4 -0
  47. package/{alert → notification}/context.js +4 -4
  48. package/notification/index.d.ts +8 -0
  49. package/{alert → notification}/index.js +8 -8
  50. package/notification/notification.d.ts +13 -0
  51. package/{alert/alert.js → notification/notification.js} +21 -26
  52. package/notification/notification.types.d.ts +20 -0
  53. package/notification/notificationButton.d.ts +3 -0
  54. package/notification/notificationButton.js +30 -0
  55. package/notification/notificationIcon.d.ts +3 -0
  56. package/{alert/alertIcon.js → notification/notificationIcon.js} +9 -9
  57. package/notification/notificationText.d.ts +3 -0
  58. package/{alert/alertText.js → notification/notificationText.js} +8 -8
  59. package/notification/notificationTitle.d.ts +3 -0
  60. package/{alert/alertTitle.js → notification/notificationTitle.js} +8 -8
  61. package/{alert → notification}/theme.d.ts +0 -17
  62. package/{alert → notification}/theme.js +0 -23
  63. package/p/p.js +6 -6
  64. package/package.json +2 -3
  65. package/panel/panel.js +4 -4
  66. package/radio/context.js +1 -1
  67. package/radio/radio.js +59 -14
  68. package/radio/radioGroup.js +25 -17
  69. package/radio/radioGroup.types.d.ts +1 -1
  70. package/radio/theme.js +5 -2
  71. package/skeleton/skeleton.js +6 -6
  72. package/skeleton/skeleton.types.d.ts +1 -0
  73. package/spinner/spinner.js +5 -5
  74. package/spinner/spinner.types.d.ts +1 -0
  75. package/svg/cache.js +1 -5
  76. package/svg/svg.js +14 -15
  77. package/switch/context.js +1 -1
  78. package/switch/switch.js +13 -51
  79. package/switch/switch.types.d.ts +2 -2
  80. package/switch/switchButton.js +21 -23
  81. package/switch/switchLabel.js +3 -3
  82. package/system/custom.d.ts +11 -7
  83. package/system/custom.js +24 -13
  84. package/system/system.d.ts +4 -3
  85. package/system/system.js +2 -2
  86. package/system/tables.d.ts +14 -0
  87. package/system/tables.js +2 -0
  88. package/t/t.js +6 -6
  89. package/tag/context.js +1 -1
  90. package/tag/index.d.ts +1 -0
  91. package/tag/index.js +1 -0
  92. package/tag/tag.d.ts +2 -0
  93. package/tag/tag.js +14 -12
  94. package/tag/tag.types.d.ts +1 -0
  95. package/tag/tagButton.d.ts +3 -0
  96. package/{alert/alertButton.js → tag/tagButton.js} +9 -9
  97. package/tag/tagIcon.js +3 -3
  98. package/tag/tagText.js +3 -3
  99. package/tag/theme.d.ts +26 -0
  100. package/tag/theme.js +32 -3
  101. package/textarea/textarea.js +10 -9
  102. package/textarea/textarea.types.d.ts +1 -0
  103. package/theme/components.d.ts +54 -44
  104. package/theme/components.js +26 -26
  105. package/theme/defaultTheme.d.ts +54 -44
  106. package/theme/foundations/shadows.js +2 -2
  107. package/theme/index.d.ts +16 -0
  108. package/theme/index.js +33 -1
  109. package/utils/assertion.d.ts +1 -1
  110. package/utils/assertion.js +1 -2
  111. package/utils/function.js +9 -5
  112. package/utils/object.d.ts +1 -12
  113. package/utils/object.js +4 -29
  114. package/alert/alert.d.ts +0 -13
  115. package/alert/alert.types.d.ts +0 -20
  116. package/alert/alertButton.d.ts +0 -3
  117. package/alert/alertIcon.d.ts +0 -3
  118. package/alert/alertText.d.ts +0 -3
  119. package/alert/alertTitle.d.ts +0 -3
  120. package/alert/consts.d.ts +0 -2
  121. package/alert/context.d.ts +0 -4
  122. package/alert/index.d.ts +0 -8
  123. /package/{alert/alert.types.js → notification/notification.types.js} +0 -0
package/core/utils.js CHANGED
@@ -68,7 +68,7 @@ function createContext(options) {
68
68
  exports.createContext = createContext;
69
69
  /** Merges provided theme extensions and overrides with default VUI theme */
70
70
  function extendTheme(extensions) {
71
- return utils_1.merge(theme_1.default, extensions);
71
+ return (0, utils_1.merge)(theme_1.default, extensions);
72
72
  }
73
73
  exports.extendTheme = extendTheme;
74
74
  /**
@@ -121,7 +121,7 @@ exports.shouldForwardProp = shouldForwardProp;
121
121
  /** Re-export of xstyled 'th' with custom typing and screen getter */
122
122
  var th = styled_components_1.th;
123
123
  exports.th = th;
124
- th.screen = styled_components_1.themeGetter({
124
+ th.screen = (0, styled_components_1.themeGetter)({
125
125
  name: 'screen',
126
126
  key: 'screens',
127
127
  compose: styled_components_1.getPx
@@ -142,7 +142,7 @@ exports.useDown = useDown;
142
142
  /** Returns viewport width and provided screen width as a number */
143
143
  function useMedia(width) {
144
144
  var theme = useTheme();
145
- var viewportWidth = styled_components_1.useViewportWidth();
145
+ var viewportWidth = (0, styled_components_1.useViewportWidth)();
146
146
  var valueString = th.screen(width)({ theme: theme });
147
147
  var value = Number(valueString.replace('px', ''));
148
148
  return { value: value, viewportWidth: viewportWidth };
@@ -157,22 +157,22 @@ function useStyleConfig(component, props) {
157
157
  var _a;
158
158
  if (props === void 0) { props = {}; }
159
159
  var theme = useTheme();
160
- var _b = (_a = theme.components[component]) !== null && _a !== void 0 ? _a : {}, defaultProps = _b.defaultProps, _c = _b.parts, parts = _c === void 0 ? [] : _c, sizes = _b.sizes, variants = _b.variants;
160
+ var _b = (_a = theme === null || theme === void 0 ? void 0 : theme.components[component]) !== null && _a !== void 0 ? _a : {}, defaultProps = _b.defaultProps, _c = _b.parts, parts = _c === void 0 ? [] : _c, sizes = _b.sizes, variants = _b.variants;
161
161
  var mergedProps = __assign(__assign({}, defaultProps), props);
162
162
  var colorScheme = mergedProps.colorScheme, size = mergedProps.size, variant = mergedProps.variant;
163
- return react_1.useMemo(function () {
163
+ return (0, react_1.useMemo)(function () {
164
164
  var _a, _b;
165
- var sizeStyles = (_a = utils_1.runIfFn(sizes === null || sizes === void 0 ? void 0 : sizes[size], mergedProps)) !== null && _a !== void 0 ? _a : {};
166
- var variantStyles = (_b = utils_1.runIfFn(variants === null || variants === void 0 ? void 0 : variants[variant], mergedProps)) !== null && _b !== void 0 ? _b : {};
165
+ var sizeStyles = (_a = (0, utils_1.runIfFn)(sizes === null || sizes === void 0 ? void 0 : sizes[size], mergedProps)) !== null && _a !== void 0 ? _a : {};
166
+ var variantStyles = (_b = (0, utils_1.runIfFn)(variants === null || variants === void 0 ? void 0 : variants[variant], mergedProps)) !== null && _b !== void 0 ? _b : {};
167
167
  var styles = {};
168
168
  if (parts.length > 0) {
169
169
  parts.forEach(function (part) {
170
170
  var _a, _b;
171
- styles[part] = utils_1.merge((_a = sizeStyles[part]) !== null && _a !== void 0 ? _a : {}, (_b = variantStyles[part]) !== null && _b !== void 0 ? _b : {});
171
+ styles[part] = (0, utils_1.merge)((_a = sizeStyles[part]) !== null && _a !== void 0 ? _a : {}, (_b = variantStyles[part]) !== null && _b !== void 0 ? _b : {});
172
172
  });
173
173
  }
174
174
  else {
175
- styles = utils_1.merge(sizeStyles, variantStyles);
175
+ styles = (0, utils_1.merge)(sizeStyles, variantStyles);
176
176
  }
177
177
  return styles;
178
178
  }, [colorScheme, size, variant]);
@@ -186,7 +186,7 @@ function useTh(path, defaultValue) {
186
186
  exports.useTh = useTh;
187
187
  /** Returns the theme object with extensions */
188
188
  function useTheme() {
189
- return styled_components_2.useTheme();
189
+ return (0, styled_components_2.useTheme)();
190
190
  }
191
191
  exports.useTheme = useTheme;
192
192
  /** Returns true of current viewport width is larger or equal to provided width */
package/core/v.js CHANGED
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var styled_components_1 = require("@xstyled/styled-components");
4
4
  var system_1 = require("../system");
5
- var v = styled_components_1.createX(system_1.system);
5
+ var v = (0, styled_components_1.createX)(system_1.system);
6
6
  exports.default = v;
@@ -35,18 +35,18 @@ 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.DividerBase = styled_components_1.default.hr.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), system_1.system);
39
- exports.Divider = core_1.vui(function (props, ref) {
38
+ exports.DividerBase = styled_components_1.default.hr.withConfig((0, core_1.forwardPropConfig)(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), system_1.system);
39
+ exports.Divider = (0, core_1.vui)(function (props, ref) {
40
40
  var _a;
41
- var _b = core_1.omitThemingProps(props), className = _b.className, isVertical = _b.isVertical, width = _b.width, rest = __rest(_b, ["className", "isVertical", "width"]);
42
- var styles = core_1.useStyleConfig('Divider', props);
41
+ var _b = (0, core_1.omitThemingProps)(props), className = _b.className, isVertical = _b.isVertical, width = _b.width, rest = __rest(_b, ["className", "isVertical", "width"]);
42
+ var styles = (0, core_1.useStyleConfig)('Divider', props);
43
43
  var borderSide = isVertical ? 'Right' : 'Bottom';
44
44
  var borderWidth = "border" + borderSide + "Width";
45
45
  var height = isVertical ? '100%' : '';
46
- var aliasedProps = utils_1.filterUndefined((_a = {},
46
+ var aliasedProps = (0, utils_1.filterUndefined)((_a = {},
47
47
  _a[borderWidth] = width !== null && width !== void 0 ? width : 1,
48
48
  _a));
49
- return (react_1.default.createElement(exports.DividerBase, __assign({ borderColor: "grey.30", className: utils_1.cs('vui-divider', className), h: height, ref: ref }, styles, aliasedProps, rest)));
49
+ return (react_1.default.createElement(exports.DividerBase, __assign({ borderColor: "grey.30", className: (0, utils_1.cs)('vui-divider', className), h: height, ref: ref }, styles, aliasedProps, rest)));
50
50
  });
51
51
  exports.Divider.displayName = 'Divider';
52
52
  exports.default = exports.Divider;
@@ -1,6 +1,7 @@
1
1
  import { BordersProps, SystemProps } from '../system';
2
2
  import { ThemingProps } from '../theme';
3
3
  export interface DividerProps extends SystemProps, ThemingProps<'Divider'> {
4
+ children?: never;
4
5
  isVertical?: boolean;
5
6
  width?: BordersProps['borderWidth'];
6
7
  }
@@ -35,18 +35,18 @@ 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.HeadingBase = styled_components_1.default.h2.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), system_1.system);
39
- exports.Heading = core_1.vui(function (props, ref) {
40
- var _a = core_1.omitThemingProps(props), align = _a.align, casing = _a.casing, children = _a.children, className = _a.className, decoration = _a.decoration, text = _a.text, weight = _a.weight, rest = __rest(_a, ["align", "casing", "children", "className", "decoration", "text", "weight"]);
41
- var styles = core_1.useStyleConfig('Heading', props);
38
+ exports.HeadingBase = styled_components_1.default.h2.withConfig((0, core_1.forwardPropConfig)(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), system_1.system);
39
+ exports.Heading = (0, core_1.vui)(function (props, ref) {
40
+ var _a = (0, core_1.omitThemingProps)(props), align = _a.align, casing = _a.casing, children = _a.children, className = _a.className, decoration = _a.decoration, text = _a.text, weight = _a.weight, rest = __rest(_a, ["align", "casing", "children", "className", "decoration", "text", "weight"]);
41
+ var styles = (0, core_1.useStyleConfig)('Heading', props);
42
42
  var hClassName = props.size ? "vui-" + props.size : '';
43
- var aliasedProps = utils_1.filterUndefined({
43
+ var aliasedProps = (0, utils_1.filterUndefined)({
44
44
  fontWeight: weight,
45
45
  textAlign: align,
46
46
  textDecoration: decoration,
47
47
  textTransform: casing
48
48
  });
49
- return (react_1.default.createElement(exports.HeadingBase, __assign({ className: utils_1.cs('vui-heading', hClassName, className), fontWeight: "demi", ref: ref, transitionDuration: "fast" }, styles, aliasedProps, rest), children !== null && children !== void 0 ? children : text));
49
+ return (react_1.default.createElement(exports.HeadingBase, __assign({ className: (0, utils_1.cs)('vui-heading', hClassName, className), fontWeight: "demi", ref: ref, transitionDuration: "fast" }, styles, aliasedProps, rest), children !== null && children !== void 0 ? children : text));
50
50
  });
51
51
  exports.Heading.displayName = 'Heading';
52
52
  exports.default = exports.Heading;
@@ -18,9 +18,9 @@ exports.H6 = exports.H5 = exports.H4 = exports.H3 = exports.H2 = exports.H1 = vo
18
18
  var react_1 = __importDefault(require("react"));
19
19
  var heading_1 = __importDefault(require("./heading"));
20
20
  var core_1 = require("../core");
21
- exports.H1 = core_1.vui(function (props, ref) { return react_1.default.createElement(heading_1.default, __assign({ ref: ref, size: "h1" }, props)); });
22
- exports.H2 = core_1.vui(function (props, ref) { return react_1.default.createElement(heading_1.default, __assign({ ref: ref, size: "h2" }, props)); });
23
- exports.H3 = core_1.vui(function (props, ref) { return react_1.default.createElement(heading_1.default, __assign({ ref: ref, size: "h3" }, props)); });
24
- exports.H4 = core_1.vui(function (props, ref) { return react_1.default.createElement(heading_1.default, __assign({ ref: ref, size: "h4" }, props)); });
25
- exports.H5 = core_1.vui(function (props, ref) { return react_1.default.createElement(heading_1.default, __assign({ ref: ref, size: "h5" }, props)); });
26
- exports.H6 = core_1.vui(function (props, ref) { return react_1.default.createElement(heading_1.default, __assign({ ref: ref, size: "h6" }, props)); });
21
+ exports.H1 = (0, core_1.vui)(function (props, ref) { return react_1.default.createElement(heading_1.default, __assign({ ref: ref, size: "h1" }, props)); });
22
+ exports.H2 = (0, core_1.vui)(function (props, ref) { return react_1.default.createElement(heading_1.default, __assign({ ref: ref, size: "h2" }, props)); });
23
+ exports.H3 = (0, core_1.vui)(function (props, ref) { return react_1.default.createElement(heading_1.default, __assign({ ref: ref, size: "h3" }, props)); });
24
+ exports.H4 = (0, core_1.vui)(function (props, ref) { return react_1.default.createElement(heading_1.default, __assign({ ref: ref, size: "h4" }, props)); });
25
+ exports.H5 = (0, core_1.vui)(function (props, ref) { return react_1.default.createElement(heading_1.default, __assign({ ref: ref, size: "h5" }, props)); });
26
+ exports.H6 = (0, core_1.vui)(function (props, ref) { return react_1.default.createElement(heading_1.default, __assign({ ref: ref, size: "h6" }, props)); });
package/icon/icon.js CHANGED
@@ -31,18 +31,18 @@ var helpers_1 = require("./helpers");
31
31
  var core_1 = require("../core");
32
32
  var svg_1 = require("../svg");
33
33
  var utils_1 = require("../utils");
34
- exports.Icon = core_1.vui(function (props, ref) {
34
+ exports.Icon = (0, core_1.vui)(function (props, ref) {
35
35
  /* eslint-disable-next-line @typescript-eslint/no-unused-vars */
36
- var _a = core_1.omitThemingProps(props), className = _a.className, icon = _a.icon, _b = _a.name, name = _b === void 0 ? props.icon : _b, rotate = _a.rotate, scale = _a.scale, rest = __rest(_a, ["className", "icon", "name", "rotate", "scale"]);
37
- var styles = core_1.useStyleConfig('Icon', props);
38
- var _c = helpers_1.getIconDetails(name), customIcon = _c.customIcon, src = _c.src;
36
+ var _a = (0, core_1.omitThemingProps)(props), className = _a.className, icon = _a.icon, _b = _a.name, name = _b === void 0 ? props.icon : _b, rotate = _a.rotate, scale = _a.scale, rest = __rest(_a, ["className", "icon", "name", "rotate", "scale"]);
37
+ var styles = (0, core_1.useStyleConfig)('Icon', props);
38
+ var _c = (0, helpers_1.getIconDetails)(name), customIcon = _c.customIcon, src = _c.src;
39
39
  var scaledSize = scale ? 16 * scale : undefined;
40
- var aliasedProps = utils_1.filterUndefined({
40
+ var aliasedProps = (0, utils_1.filterUndefined)({
41
41
  h: scaledSize,
42
42
  transform: rotate !== undefined ? "rotate(" + rotate + "deg)" : undefined,
43
43
  w: scaledSize
44
44
  });
45
- return (react_1.default.createElement(svg_1.Svg, __assign({ className: utils_1.cs('vui-icon', className), display: "inline-flex", flexShrink: 0, ref: ref, src: src }, styles, customIcon === null || customIcon === void 0 ? void 0 : customIcon.svgProps, aliasedProps, rest), customIcon === null || customIcon === void 0 ? void 0 : customIcon.d.map(function (d, i) { return (react_1.default.createElement("path", __assign({ d: d, fill: "currentColor", key: i }, customIcon.pathProps[i]))); })));
45
+ return (react_1.default.createElement(svg_1.Svg, __assign({ className: (0, utils_1.cs)('vui-icon', className), display: "inline-flex", flexShrink: 0, ref: ref, src: src }, styles, customIcon === null || customIcon === void 0 ? void 0 : customIcon.svgProps, aliasedProps, rest), customIcon === null || customIcon === void 0 ? void 0 : customIcon.d.map(function (d, i) { return (react_1.default.createElement("path", __assign({ d: d, fill: "currentColor", key: i }, customIcon.pathProps[i]))); })));
46
46
  });
47
47
  exports.Icon.displayName = 'Icon';
48
48
  exports.default = exports.Icon;
package/icons/library.js CHANGED
@@ -15,10 +15,14 @@ var __read = (this && this.__read) || function (o, n) {
15
15
  }
16
16
  return ar;
17
17
  };
18
- var __spreadArray = (this && this.__spreadArray) || function (to, from) {
19
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
20
- to[j] = from[i];
21
- return to;
18
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
19
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
20
+ if (ar || !(i in from)) {
21
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
22
+ ar[i] = from[i];
23
+ }
24
+ }
25
+ return to.concat(ar || Array.prototype.slice.call(from));
22
26
  };
23
27
  Object.defineProperty(exports, "__esModule", { value: true });
24
28
  var consts_1 = require("./consts");
@@ -47,7 +51,7 @@ var Library = /** @class */ (function () {
47
51
  return _this.cache.has(name);
48
52
  };
49
53
  this.init = function () {
50
- _this.add.apply(_this, __spreadArray([], __read(Object.values(consts_1.defaultIcons))));
54
+ _this.add.apply(_this, __spreadArray([], __read(Object.values(consts_1.defaultIcons)), false));
51
55
  };
52
56
  this.reset = function () {
53
57
  _this.cache.clear();
package/image/image.js CHANGED
@@ -29,10 +29,10 @@ exports.Image = void 0;
29
29
  var react_1 = __importDefault(require("react"));
30
30
  var core_1 = require("../core");
31
31
  var utils_1 = require("../utils");
32
- exports.Image = core_1.vui(function (props, ref) {
33
- var _a = core_1.omitThemingProps(props), className = _a.className, rest = __rest(_a, ["className"]);
34
- var styles = core_1.useStyleConfig('Image', props);
35
- return react_1.default.createElement(core_1.v.img, __assign({ className: utils_1.cs('vui-image', className), ref: ref }, styles, rest));
32
+ exports.Image = (0, core_1.vui)(function (props, ref) {
33
+ var _a = (0, core_1.omitThemingProps)(props), className = _a.className, rest = __rest(_a, ["className"]);
34
+ var styles = (0, core_1.useStyleConfig)('Image', props);
35
+ return react_1.default.createElement(core_1.v.img, __assign({ className: (0, utils_1.cs)('vui-image', className), ref: ref }, styles, rest));
36
36
  });
37
37
  exports.Image.displayName = 'Image';
38
38
  exports.default = exports.Image;
@@ -1,4 +1,5 @@
1
1
  import { SystemProps } from '../system';
2
2
  import { ThemingProps } from '../theme';
3
3
  export interface ImageProps extends SystemProps, ThemingProps<'Image'> {
4
+ children?: never;
4
5
  }
package/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export * from './alert';
2
1
  export * from './avatar';
3
2
  export * from './box';
4
3
  export * from './button';
@@ -14,6 +13,7 @@ export * from './image';
14
13
  export * from './input';
15
14
  export * from './link';
16
15
  export * from './list';
16
+ export * from './notification';
17
17
  export * from './p';
18
18
  export * from './panel';
19
19
  export * from './radio';
package/index.js CHANGED
@@ -10,7 +10,6 @@ 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("./alert"), exports);
14
13
  __exportStar(require("./avatar"), exports);
15
14
  __exportStar(require("./box"), exports);
16
15
  __exportStar(require("./button"), exports);
@@ -26,6 +25,7 @@ __exportStar(require("./image"), exports);
26
25
  __exportStar(require("./input"), exports);
27
26
  __exportStar(require("./link"), exports);
28
27
  __exportStar(require("./list"), exports);
28
+ __exportStar(require("./notification"), exports);
29
29
  __exportStar(require("./p"), exports);
30
30
  __exportStar(require("./panel"), exports);
31
31
  __exportStar(require("./radio"), exports);
package/input/context.js CHANGED
@@ -18,6 +18,6 @@ var __read = (this && this.__read) || function (o, n) {
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.useInput = exports.InputProvider = void 0;
20
20
  var core_1 = require("../core");
21
- var _a = __read(core_1.createContext({ isOptional: true }), 2), InputProvider = _a[0], useInput = _a[1];
21
+ var _a = __read((0, core_1.createContext)({ isOptional: true }), 2), InputProvider = _a[0], useInput = _a[1];
22
22
  exports.InputProvider = InputProvider;
23
23
  exports.useInput = useInput;
package/input/input.js CHANGED
@@ -76,39 +76,35 @@ var core_1 = require("../core");
76
76
  var system_1 = require("../system");
77
77
  var t_1 = __importDefault(require("../t"));
78
78
  var utils_1 = require("../utils");
79
- exports.InputBase = styled_components_1.default.div.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_1 || (templateObject_1 = __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);
80
- exports.Input = core_1.vui(function (props, ref) {
79
+ exports.InputBase = styled_components_1.default.div.withConfig((0, core_1.forwardPropConfig)(system_1.system))(templateObject_1 || (templateObject_1 = __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);
80
+ exports.Input = (0, core_1.vui)(function (props, ref) {
81
81
  var _a, _b, _c, _d;
82
- var _e = __read(react_1.useState(helpers_1.getInitialCount(props)), 2), count = _e[0], setCount = _e[1];
83
- var autoComplete = props.autoComplete, autoFocus = props.autoFocus, children = props.children, className = props.className, colorScheme = props.colorScheme, defaultValue = props.defaultValue, disabled = props.disabled, iconLeft = props.iconLeft, iconRight = props.iconRight, input = props.input, inputProps = props.inputProps, inputRef = props.inputRef, isInvalid = props.isInvalid, itemLeft = props.itemLeft, itemRight = props.itemRight, max = props.max, maxLength = props.maxLength, min = props.min, name = props.name, onBlur = props.onBlur, onChangeProp = props.onChange, onFocus = props.onFocus, pattern = props.pattern, placeholder = props.placeholder, readOnly = props.readOnly, required = props.required, showCount = props.showCount, size = props.size, _f = props.state, state = _f === void 0 ? '' : _f, stateMapping = props.stateMapping, step = props.step, _g = props.type, type = _g === void 0 ? 'text' : _g, value = props.value, variant = props.variant, rest = __rest(props, ["autoComplete", "autoFocus", "children", "className", "colorScheme", "defaultValue", "disabled", "iconLeft", "iconRight", "input", "inputProps", "inputRef", "isInvalid", "itemLeft", "itemRight", "max", "maxLength", "min", "name", "onBlur", "onChange", "onFocus", "pattern", "placeholder", "readOnly", "required", "showCount", "size", "state", "stateMapping", "step", "type", "value", "variant"]);
82
+ var _e = __read((0, react_1.useState)((0, helpers_1.getInitialCount)(props)), 2), count = _e[0], setCount = _e[1];
83
+ var autoComplete = props.autoComplete, autoFocus = props.autoFocus, children = props.children, className = props.className, colorScheme = props.colorScheme, defaultValue = props.defaultValue, disabled = props.disabled, iconLeft = props.iconLeft, iconRight = props.iconRight, id = props.id, input = props.input, inputProps = props.inputProps, inputRef = props.inputRef, isInvalid = props.isInvalid, itemLeft = props.itemLeft, itemRight = props.itemRight, max = props.max, maxLength = props.maxLength, min = props.min, name = props.name, onBlur = props.onBlur, onChangeProp = props.onChange, onFocus = props.onFocus, pattern = props.pattern, placeholder = props.placeholder, readOnly = props.readOnly, required = props.required, showCount = props.showCount, size = props.size, _f = props.state, state = _f === void 0 ? '' : _f, stateMapping = props.stateMapping, step = props.step, _g = props.type, type = _g === void 0 ? 'text' : _g, value = props.value, variant = props.variant, rest = __rest(props, ["autoComplete", "autoFocus", "children", "className", "colorScheme", "defaultValue", "disabled", "iconLeft", "iconRight", "id", "input", "inputProps", "inputRef", "isInvalid", "itemLeft", "itemRight", "max", "maxLength", "min", "name", "onBlur", "onChange", "onFocus", "pattern", "placeholder", "readOnly", "required", "showCount", "size", "state", "stateMapping", "step", "type", "value", "variant"]);
84
84
  var states = __assign(__assign({}, consts_1.inputStateMapping), stateMapping);
85
- var computedColorScheme = utils_1.filterUndefined({
85
+ var computedColorScheme = (0, utils_1.filterUndefined)({
86
86
  colorScheme: (_a = colorScheme !== null && colorScheme !== void 0 ? colorScheme : (isInvalid ? 'red' : undefined)) !== null && _a !== void 0 ? _a : (_b = states[state]) === null || _b === void 0 ? void 0 : _b.colorScheme
87
87
  });
88
- var styles = core_1.useStyleConfig('Input', __assign(__assign({}, computedColorScheme), props));
89
- var context = react_1.useMemo(function () { return utils_1.filterUndefined({ colorScheme: colorScheme, disabled: disabled, size: size, variant: variant }); }, [
90
- colorScheme,
91
- disabled,
92
- size,
93
- variant
94
- ]);
88
+ var styles = (0, core_1.useStyleConfig)('Input', __assign(__assign({}, computedColorScheme), props));
89
+ var context = (0, react_1.useMemo)(function () { return (0, utils_1.filterUndefined)({ colorScheme: colorScheme, disabled: disabled, size: size, variant: variant }); }, [colorScheme, disabled, size, variant]);
95
90
  function onChange(e) {
96
91
  setCount(e.target.value.length);
97
92
  onChangeProp === null || onChangeProp === void 0 ? void 0 : onChangeProp(e);
98
93
  }
99
- var aliasedProps = utils_1.filterUndefined({
100
- bg: readOnly ? 'grey.20' : undefined,
94
+ var aliasedProps = (0, utils_1.filterUndefined)({
95
+ bg: readOnly ? 'grey.10' : undefined,
101
96
  focusWithinBorderColor: !readOnly ? 'transparent' : undefined,
102
97
  focusWithinRingColor: readOnly ? 'transparent' : undefined
103
98
  });
104
99
  return (react_1.default.createElement(context_1.InputProvider, { value: context },
105
- react_1.default.createElement(exports.InputBase, __assign({ borderRadius: "md", className: utils_1.cs('vui-input', disabled && 'disabled', className), ref: ref, transitionDuration: "fast" }, styles.container, aliasedProps, rest),
100
+ react_1.default.createElement(exports.InputBase, __assign({ borderRadius: "md", className: (0, utils_1.cs)('vui-input', disabled && 'disabled', className), ref: ref, transitionDuration: "fast" }, styles.container, aliasedProps, rest),
106
101
  itemLeft,
107
- utils_1.isString(iconLeft) ? react_1.default.createElement(inputIcon_1.default, { ml: 1, name: iconLeft }) : iconLeft, (_c = children !== null && children !== void 0 ? children : input) !== null && _c !== void 0 ? _c : (react_1.default.createElement(inputInput_1.default, __assign({ ref: inputRef }, {
102
+ (0, utils_1.isString)(iconLeft) ? react_1.default.createElement(inputIcon_1.default, { ml: 1, name: iconLeft }) : iconLeft, (_c = children !== null && children !== void 0 ? children : input) !== null && _c !== void 0 ? _c : (react_1.default.createElement(inputInput_1.default, __assign({ ref: inputRef }, {
108
103
  autoComplete: autoComplete,
109
104
  autoFocus: autoFocus,
110
105
  defaultValue: defaultValue,
111
106
  disabled: disabled,
107
+ id: id,
112
108
  max: max,
113
109
  maxLength: maxLength,
114
110
  min: min,
@@ -124,7 +120,7 @@ exports.Input = core_1.vui(function (props, ref) {
124
120
  type: type,
125
121
  value: value
126
122
  }, inputProps))),
127
- utils_1.isString(iconRight) ? react_1.default.createElement(inputIcon_1.default, { mr: 1, name: iconRight }) : iconRight,
123
+ (0, utils_1.isString)(iconRight) ? react_1.default.createElement(inputIcon_1.default, { mr: 1, name: iconRight }) : iconRight,
128
124
  itemRight,
129
125
  state && react_1.default.createElement(inputIcon_1.default, __assign({ mr: 1 }, (_d = states[state]) === null || _d === void 0 ? void 0 : _d.iconProps)),
130
126
  showCount && (react_1.default.createElement(t_1.default, { color: "grey.80", position: "absolute", right: 0, size: "sm", top: "calc(100% + 1px)" },
@@ -19,10 +19,10 @@ var react_1 = __importDefault(require("react"));
19
19
  var context_1 = require("./context");
20
20
  var core_1 = require("../core");
21
21
  var icon_1 = __importDefault(require("../icon"));
22
- exports.InputIcon = core_1.vui(function (props, ref) {
23
- var inputProps = context_1.useInput();
22
+ exports.InputIcon = (0, core_1.vui)(function (props, ref) {
23
+ var inputProps = (0, context_1.useInput)();
24
24
  var mergedProps = __assign(__assign({}, inputProps), props);
25
- var styles = core_1.useStyleConfig('Input', mergedProps);
25
+ var styles = (0, core_1.useStyleConfig)('Input', mergedProps);
26
26
  var color = !mergedProps.disabled ? 'blue.80' : 'grey.50';
27
27
  return react_1.default.createElement(icon_1.default, __assign({ className: "vui-inputIcon", color: color, ref: ref }, styles.icon, props));
28
28
  });
@@ -24,11 +24,11 @@ var styled_components_1 = __importDefault(require("styled-components"));
24
24
  var context_1 = require("./context");
25
25
  var core_1 = require("../core");
26
26
  var system_1 = require("../system");
27
- exports.InputInputBase = 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\tfont-size: inherit;\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\tfont-size: inherit;\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);
28
- exports.InputInput = core_1.vui(function (props, ref) {
29
- var inputProps = context_1.useInput();
27
+ exports.InputInputBase = styled_components_1.default.input.withConfig((0, 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\tfont-size: inherit;\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\tfont-size: inherit;\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);
28
+ exports.InputInput = (0, core_1.vui)(function (props, ref) {
29
+ var inputProps = (0, context_1.useInput)();
30
30
  var mergedProps = __assign(__assign({}, inputProps), props);
31
- var styles = core_1.useStyleConfig('Input', mergedProps);
31
+ var styles = (0, core_1.useStyleConfig)('Input', mergedProps);
32
32
  return (react_1.default.createElement(exports.InputInputBase, __assign({ borderRadius: "md", className: "vui-inputInput", placeholderColor: "grey.60", px: 1, ref: ref }, styles.input, props)));
33
33
  });
34
34
  exports.InputInput.displayName = 'InputInput';
package/link/link.js CHANGED
@@ -35,18 +35,18 @@ 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.LinkBase = styled_components_1.default.a.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\toutline: none;\n\ttext-decoration: none;\n\twidth: fit-content;\n\n\t", "\n"], ["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\toutline: none;\n\ttext-decoration: none;\n\twidth: fit-content;\n\n\t", "\n"])), system_1.system);
39
- exports.Link = core_1.vui(function (props, ref) {
40
- var _a = core_1.omitThemingProps(props), children = _a.children, className = _a.className, decoration = _a.decoration, _b = _a.hoverDecoration, hoverDecoration = _b === void 0 ? 'underline' : _b, isExternal = _a.isExternal, isUnderlined = _a.isUnderlined, text = _a.text, weight = _a.weight, rest = __rest(_a, ["children", "className", "decoration", "hoverDecoration", "isExternal", "isUnderlined", "text", "weight"]);
41
- var styles = core_1.useStyleConfig('Link', props);
42
- var aliasedProps = utils_1.filterUndefined({
38
+ exports.LinkBase = styled_components_1.default.a.withConfig((0, core_1.forwardPropConfig)(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\toutline: none;\n\ttext-decoration: none;\n\twidth: fit-content;\n\n\t", "\n"], ["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\toutline: none;\n\ttext-decoration: none;\n\twidth: fit-content;\n\n\t", "\n"])), system_1.system);
39
+ exports.Link = (0, core_1.vui)(function (props, ref) {
40
+ var _a = (0, core_1.omitThemingProps)(props), children = _a.children, className = _a.className, decoration = _a.decoration, _b = _a.hoverDecoration, hoverDecoration = _b === void 0 ? 'underline' : _b, isExternal = _a.isExternal, isUnderlined = _a.isUnderlined, text = _a.text, weight = _a.weight, rest = __rest(_a, ["children", "className", "decoration", "hoverDecoration", "isExternal", "isUnderlined", "text", "weight"]);
41
+ var styles = (0, core_1.useStyleConfig)('Link', props);
42
+ var aliasedProps = (0, utils_1.filterUndefined)({
43
43
  fontWeight: weight,
44
44
  hoverTextDecoration: hoverDecoration,
45
45
  rel: isExternal ? 'noopener' : undefined,
46
46
  target: isExternal ? '_blank' : undefined,
47
47
  textDecoration: decoration !== null && decoration !== void 0 ? decoration : (isUnderlined ? 'underline' : undefined)
48
48
  });
49
- return (react_1.default.createElement(exports.LinkBase, __assign({ borderRadius: "sm", className: utils_1.cs('vui-link', className), focusRing: 2, ref: ref, transitionDuration: "instant" }, styles, aliasedProps, rest), children !== null && children !== void 0 ? children : text));
49
+ return (react_1.default.createElement(exports.LinkBase, __assign({ borderRadius: "sm", className: (0, utils_1.cs)('vui-link', className), focusRing: 2, ref: ref, transitionDuration: "instant" }, styles, aliasedProps, rest), children !== null && children !== void 0 ? children : text));
50
50
  });
51
51
  exports.Link.displayName = 'Link';
52
52
  exports.default = exports.Link;
package/list/context.js CHANGED
@@ -18,6 +18,6 @@ var __read = (this && this.__read) || function (o, n) {
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.useList = exports.ListProvider = void 0;
20
20
  var core_1 = require("../core");
21
- var _a = __read(core_1.createContext({ isOptional: true }), 2), ListProvider = _a[0], useList = _a[1];
21
+ var _a = __read((0, core_1.createContext)({ isOptional: true }), 2), ListProvider = _a[0], useList = _a[1];
22
22
  exports.ListProvider = ListProvider;
23
23
  exports.useList = useList;
package/list/list.js CHANGED
@@ -59,19 +59,14 @@ var listText_1 = __importDefault(require("./listText"));
59
59
  var core_1 = require("../core");
60
60
  var system_1 = require("../system");
61
61
  var utils_1 = require("../utils");
62
- exports.ListBase = styled_components_1.default.ul.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), system_1.system);
63
- exports.List = core_1.vui(function (props, ref) {
62
+ exports.ListBase = styled_components_1.default.ul.withConfig((0, core_1.forwardPropConfig)(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), system_1.system);
63
+ exports.List = (0, core_1.vui)(function (props, ref) {
64
64
  var children = props.children, className = props.className, colorScheme = props.colorScheme, heading = props.heading, isInteractive = props.isInteractive, size = props.size, variant = props.variant, rest = __rest(props, ["children", "className", "colorScheme", "heading", "isInteractive", "size", "variant"]);
65
- var styles = core_1.useStyleConfig('List', props);
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
- ]);
65
+ var styles = (0, core_1.useStyleConfig)('List', props);
66
+ var context = (0, react_1.useMemo)(function () { return (0, utils_1.filterUndefined)({ colorScheme: colorScheme, isInteractive: isInteractive, size: size, styles: styles, variant: variant }); }, [colorScheme, isInteractive, size, variant]);
72
67
  return (react_1.default.createElement(context_1.ListProvider, { value: context },
73
- react_1.default.createElement(exports.ListBase, __assign({ className: utils_1.cs('vui-list', className), ref: ref }, styles.container, rest),
74
- utils_1.isReactText(heading) ? react_1.default.createElement(listHeading_1.default, { text: heading }) : heading,
68
+ react_1.default.createElement(exports.ListBase, __assign({ className: (0, utils_1.cs)('vui-list', className), ref: ref }, styles.container, rest),
69
+ (0, utils_1.isReactText)(heading) ? react_1.default.createElement(listHeading_1.default, { text: heading }) : heading,
75
70
  children)));
76
71
  });
77
72
  exports.List.displayName = 'List';
@@ -19,11 +19,11 @@ var react_1 = __importDefault(require("react"));
19
19
  var context_1 = require("./context");
20
20
  var core_1 = require("../core");
21
21
  var t_1 = require("../t");
22
- exports.ListHeading = core_1.vui(function (props, ref) {
22
+ exports.ListHeading = (0, core_1.vui)(function (props, ref) {
23
23
  var _a;
24
- var listProps = (_a = context_1.useList()) !== null && _a !== void 0 ? _a : {};
24
+ var listProps = (_a = (0, context_1.useList)()) !== null && _a !== void 0 ? _a : {};
25
25
  var mergedProps = __assign(__assign({}, listProps), props);
26
- var styles = core_1.useStyleConfig('List', mergedProps);
26
+ var styles = (0, core_1.useStyleConfig)('List', mergedProps);
27
27
  return (react_1.default.createElement(t_1.T, __assign({ className: "vui-listHeading", color: "grey.80", display: "inline-block", fontSize: "sm", px: 1, py: 0.5, ref: ref, textTransform: "uppercase", weight: "medium" }, styles.heading, props)));
28
28
  });
29
29
  exports.ListHeading.displayName = 'ListHeading';
package/list/listIcon.js CHANGED
@@ -19,11 +19,11 @@ var react_1 = __importDefault(require("react"));
19
19
  var context_1 = require("./context");
20
20
  var core_1 = require("../core");
21
21
  var icon_1 = __importDefault(require("../icon"));
22
- exports.ListIcon = core_1.vui(function (props, ref) {
22
+ exports.ListIcon = (0, core_1.vui)(function (props, ref) {
23
23
  var _a;
24
- var listProps = (_a = context_1.useList()) !== null && _a !== void 0 ? _a : {};
24
+ var listProps = (_a = (0, context_1.useList)()) !== null && _a !== void 0 ? _a : {};
25
25
  var mergedProps = __assign(__assign({}, listProps), props);
26
- var styles = core_1.useStyleConfig('List', mergedProps);
26
+ var styles = (0, core_1.useStyleConfig)('List', mergedProps);
27
27
  return react_1.default.createElement(icon_1.default, __assign({ className: "vui-listIcon", ref: ref }, styles.icon, props));
28
28
  });
29
29
  exports.ListIcon.displayName = 'ListIcon';
package/list/listItem.js CHANGED
@@ -38,12 +38,12 @@ var listText_1 = __importDefault(require("./listText"));
38
38
  var core_1 = require("../core");
39
39
  var system_1 = require("../system");
40
40
  var utils_1 = require("../utils");
41
- exports.ListItemBase = styled_components_1.default.li.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tdisplay: flex;\n\tline-height: normal;\n\tmargin-bottom: 1px;\n\toutline: none;\n\n\t&[data-disabled='true'] {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t\tuser-select: none;\n\t}\n\n\t", "\n"], ["\n\tdisplay: flex;\n\tline-height: normal;\n\tmargin-bottom: 1px;\n\toutline: none;\n\n\t&[data-disabled='true'] {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t\tuser-select: none;\n\t}\n\n\t", "\n"])), system_1.system);
42
- exports.ListItem = core_1.vui(function (props, ref) {
43
- var listProps = context_1.useList();
41
+ exports.ListItemBase = styled_components_1.default.li.withConfig((0, core_1.forwardPropConfig)(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tdisplay: flex;\n\tline-height: normal;\n\tmargin-bottom: 1px;\n\toutline: none;\n\n\t&[data-disabled='true'] {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t\tuser-select: none;\n\t}\n\n\t", "\n"], ["\n\tdisplay: flex;\n\tline-height: normal;\n\tmargin-bottom: 1px;\n\toutline: none;\n\n\t&[data-disabled='true'] {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t\tuser-select: none;\n\t}\n\n\t", "\n"])), system_1.system);
42
+ exports.ListItem = (0, core_1.vui)(function (props, ref) {
43
+ var listProps = (0, context_1.useList)();
44
44
  var mergedProps = __assign(__assign({}, listProps), props);
45
45
  var children = mergedProps.children, center = mergedProps.center, centerH = mergedProps.centerH, _a = mergedProps.centerV, centerV = _a === void 0 ? true : _a, className = mergedProps.className, column = mergedProps.column, disabled = mergedProps.disabled, iconLeft = mergedProps.iconLeft, iconRight = mergedProps.iconRight, _b = mergedProps.isInteractive, isInteractive = _b === void 0 ? props.onClick !== undefined : _b, isSelected = mergedProps.isSelected, isTruncated = mergedProps.isTruncated, itemLeft = mergedProps.itemLeft, itemRight = mergedProps.itemRight, onClick = mergedProps.onClick, text = mergedProps.text, rest = __rest(mergedProps, ["children", "center", "centerH", "centerV", "className", "column", "disabled", "iconLeft", "iconRight", "isInteractive", "isSelected", "isTruncated", "itemLeft", "itemRight", "onClick", "text"]);
46
- var styles = core_1.useStyleConfig('List', mergedProps);
46
+ var styles = (0, core_1.useStyleConfig)('List', mergedProps);
47
47
  var _c = styles.item, activeBg = _c.activeBg, hoverBg = _c.hoverBg, itemStyles = __rest(_c, ["activeBg", "hoverBg"]);
48
48
  var alignItems = (center || (column ? centerH : centerV)) && 'center';
49
49
  var flexDirection = column && 'column';
@@ -58,17 +58,17 @@ exports.ListItem = core_1.vui(function (props, ref) {
58
58
  userSelect: 'none'
59
59
  }
60
60
  : {};
61
- var aliasedProps = utils_1.filterUndefined({
61
+ var aliasedProps = (0, utils_1.filterUndefined)({
62
62
  alignItems: alignItems,
63
63
  bg: isSelected ? hoverBg : undefined,
64
64
  'data-disabled': disabled,
65
65
  flexDirection: flexDirection,
66
66
  justifyContent: justifyContent
67
67
  });
68
- return (react_1.default.createElement(exports.ListItemBase, __assign({ className: utils_1.cs('vui-listItem', className), onClick: !disabled ? onClick : undefined, px: 1, ref: ref, transitionDuration: "fast" }, itemStyles, interactiveProps, aliasedProps, rest),
68
+ return (react_1.default.createElement(exports.ListItemBase, __assign({ className: (0, utils_1.cs)('vui-listItem', className), onClick: !disabled ? onClick : undefined, px: 1, ref: ref, transitionDuration: "fast" }, itemStyles, interactiveProps, aliasedProps, rest),
69
69
  itemLeft,
70
- utils_1.isString(iconLeft) ? react_1.default.createElement(listIcon_1.default, { mr: 1, name: iconLeft }) : iconLeft, children !== null && children !== void 0 ? children : (utils_1.isReactText(text) ? react_1.default.createElement(listText_1.default, { isTruncated: isTruncated, text: text }) : text),
71
- utils_1.isString(iconRight) ? react_1.default.createElement(listIcon_1.default, { ml: "auto", name: iconRight }) : iconRight,
70
+ (0, utils_1.isString)(iconLeft) ? react_1.default.createElement(listIcon_1.default, { mr: 1, name: iconLeft }) : iconLeft, children !== null && children !== void 0 ? children : ((0, utils_1.isReactText)(text) ? react_1.default.createElement(listText_1.default, { isTruncated: isTruncated, text: text }) : text),
71
+ (0, utils_1.isString)(iconRight) ? react_1.default.createElement(listIcon_1.default, { ml: "auto", name: iconRight }) : iconRight,
72
72
  itemRight));
73
73
  });
74
74
  exports.ListItem.displayName = 'ListItem';
package/list/listText.js CHANGED
@@ -19,11 +19,11 @@ var react_1 = __importDefault(require("react"));
19
19
  var context_1 = require("./context");
20
20
  var core_1 = require("../core");
21
21
  var t_1 = __importDefault(require("../t"));
22
- exports.ListText = core_1.vui(function (props, ref) {
22
+ exports.ListText = (0, core_1.vui)(function (props, ref) {
23
23
  var _a;
24
- var listProps = (_a = context_1.useList()) !== null && _a !== void 0 ? _a : {};
24
+ var listProps = (_a = (0, context_1.useList)()) !== null && _a !== void 0 ? _a : {};
25
25
  var mergedProps = __assign(__assign({}, listProps), props);
26
- var styles = core_1.useStyleConfig('List', mergedProps);
26
+ var styles = (0, core_1.useStyleConfig)('List', mergedProps);
27
27
  return react_1.default.createElement(t_1.default, __assign({ className: "vui-listText", fontSize: "inherit", ref: ref }, styles.text, props));
28
28
  });
29
29
  exports.ListText.displayName = 'ListText';
@@ -0,0 +1,2 @@
1
+ import { NotificationStatusMapping } from './notification.types';
2
+ export declare const notificationStatusMapping: NotificationStatusMapping;
@@ -1,17 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.alertStatusMapping = void 0;
4
- exports.alertStatusMapping = {
3
+ exports.notificationStatusMapping = void 0;
4
+ exports.notificationStatusMapping = {
5
5
  error: {
6
6
  colorScheme: 'red',
7
7
  iconProps: {
8
- icon: 'falTimesCircle'
8
+ name: 'falTimesCircle'
9
9
  }
10
10
  },
11
11
  info: {
12
12
  colorScheme: 'blue',
13
13
  iconProps: {
14
- icon: 'falInfoCircle'
14
+ name: 'falInfoCircle'
15
15
  }
16
16
  },
17
17
  loading: {
@@ -19,19 +19,19 @@ exports.alertStatusMapping = {
19
19
  iconProps: {
20
20
  animation: 'vui-spin 0.6s linear infinite',
21
21
  fill: ['blue.40', 'blue.60'],
22
- icon: 'fadSpinnerThird'
22
+ name: 'fadSpinnerThird'
23
23
  }
24
24
  },
25
25
  success: {
26
26
  colorScheme: 'green',
27
27
  iconProps: {
28
- icon: 'falCheckCircle'
28
+ name: 'falCheckCircle'
29
29
  }
30
30
  },
31
31
  warning: {
32
32
  colorScheme: 'yellow',
33
33
  iconProps: {
34
- icon: 'falExclamationCircle'
34
+ name: 'falExclamationCircle'
35
35
  }
36
36
  }
37
37
  };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { NotificationProps } from './notification.types';
3
+ declare const NotificationProvider: import("react").Provider<Partial<NotificationProps>>, useNotification: () => Partial<NotificationProps>;
4
+ export { NotificationProvider, useNotification };