@veracity/vui 0.2.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 (89) 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 +12 -12
  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 +9 -9
  22. package/core/v.js +1 -1
  23. package/divider/divider.js +6 -6
  24. package/heading/heading.js +6 -6
  25. package/heading/headings.js +6 -6
  26. package/icon/icon.js +6 -6
  27. package/icons/library.js +9 -5
  28. package/image/image.js +4 -4
  29. package/input/context.js +1 -1
  30. package/input/input.js +11 -16
  31. package/input/inputIcon.js +3 -3
  32. package/input/inputInput.js +4 -4
  33. package/link/link.js +6 -6
  34. package/list/context.js +1 -1
  35. package/list/list.js +6 -11
  36. package/list/listHeading.js +3 -3
  37. package/list/listIcon.js +3 -3
  38. package/list/listItem.js +8 -8
  39. package/list/listText.js +3 -3
  40. package/notification/context.js +1 -1
  41. package/notification/notification.js +6 -11
  42. package/notification/notificationButton.js +3 -3
  43. package/notification/notificationIcon.js +3 -3
  44. package/notification/notificationText.js +3 -3
  45. package/notification/notificationTitle.js +3 -3
  46. package/p/p.js +6 -6
  47. package/package.json +1 -1
  48. package/panel/panel.js +4 -4
  49. package/radio/context.js +1 -1
  50. package/radio/radio.js +58 -13
  51. package/radio/radioGroup.js +25 -17
  52. package/radio/radioGroup.types.d.ts +1 -1
  53. package/radio/theme.js +5 -2
  54. package/skeleton/skeleton.js +6 -6
  55. package/spinner/spinner.js +5 -5
  56. package/svg/svg.js +12 -12
  57. package/switch/context.js +1 -1
  58. package/switch/switch.js +12 -50
  59. package/switch/switch.types.d.ts +2 -2
  60. package/switch/switchButton.js +19 -21
  61. package/switch/switchLabel.js +3 -3
  62. package/system/custom.d.ts +11 -7
  63. package/system/custom.js +24 -13
  64. package/system/system.d.ts +4 -3
  65. package/system/system.js +2 -2
  66. package/system/tables.d.ts +14 -0
  67. package/system/tables.js +2 -0
  68. package/t/t.js +6 -6
  69. package/tag/context.js +1 -1
  70. package/tag/index.d.ts +1 -0
  71. package/tag/index.js +1 -0
  72. package/tag/tag.d.ts +2 -0
  73. package/tag/tag.js +14 -12
  74. package/tag/tag.types.d.ts +1 -0
  75. package/tag/tagButton.d.ts +3 -0
  76. package/tag/tagButton.js +30 -0
  77. package/tag/tagIcon.js +3 -3
  78. package/tag/tagText.js +3 -3
  79. package/tag/theme.d.ts +26 -0
  80. package/tag/theme.js +32 -3
  81. package/textarea/textarea.js +9 -9
  82. package/theme/components.d.ts +26 -0
  83. package/theme/defaultTheme.d.ts +26 -0
  84. package/theme/foundations/shadows.js +2 -2
  85. package/theme/index.d.ts +16 -0
  86. package/theme/index.js +33 -1
  87. package/utils/assertion.js +1 -2
  88. package/utils/function.js +9 -5
  89. package/utils/object.js +3 -3
@@ -948,6 +948,9 @@ declare const defaultTheme: {
948
948
  h: number;
949
949
  spaceX: number;
950
950
  };
951
+ button: {
952
+ size: string;
953
+ };
951
954
  icon: {
952
955
  size: string;
953
956
  };
@@ -959,6 +962,9 @@ declare const defaultTheme: {
959
962
  h: number;
960
963
  spaceX: number;
961
964
  };
965
+ button: {
966
+ size: string;
967
+ };
962
968
  icon: {
963
969
  size: string;
964
970
  };
@@ -970,6 +976,9 @@ declare const defaultTheme: {
970
976
  h: number;
971
977
  spaceX: number;
972
978
  };
979
+ button: {
980
+ size: string;
981
+ };
973
982
  icon: {
974
983
  size: string;
975
984
  };
@@ -984,6 +993,15 @@ declare const defaultTheme: {
984
993
  bg: string;
985
994
  color: string;
986
995
  };
996
+ button: {
997
+ hoverBorderColor: string;
998
+ borderColor: string;
999
+ color: string;
1000
+ hoverBg: string;
1001
+ activeBg: string;
1002
+ bg: string;
1003
+ variant: string;
1004
+ };
987
1005
  };
988
1006
  subtle: (props: import("..").Dict<any>) => {
989
1007
  container: {
@@ -992,6 +1010,14 @@ declare const defaultTheme: {
992
1010
  bg: string;
993
1011
  color: string;
994
1012
  };
1013
+ button: {
1014
+ hoverBorderColor: string;
1015
+ borderColor: string;
1016
+ color: string;
1017
+ hoverBg: string;
1018
+ activeBg: string;
1019
+ variant: string;
1020
+ };
995
1021
  };
996
1022
  };
997
1023
  };
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var colors_1 = require("./colors");
4
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);
5
+ var greyLight = (0, utils_1.hexToRGB)(colors_1.grey[80], 0.4);
6
+ var greyDark = (0, utils_1.hexToRGB)(colors_1.grey[80], 0.6);
7
7
  exports.default = {
8
8
  '0': "0 0 0 0 #fff",
9
9
  '1': "0 2px 5px 0 " + greyLight,
package/theme/index.d.ts CHANGED
@@ -2,5 +2,21 @@ import defaultTheme from './defaultTheme';
2
2
  export { default as components } from './components';
3
3
  export { default as defaultTheme } from './defaultTheme';
4
4
  export { default as foundations } from './foundations';
5
+ export { default as animations } from './foundations/animations';
6
+ export { default as borders } from './foundations/borders';
7
+ export { default as colors } from './foundations/colors';
8
+ export { default as durations } from './foundations/durations';
9
+ export { default as fonts } from './foundations/fonts';
10
+ export { default as fontSizes } from './foundations/fontSizes';
11
+ export { default as fontWeights } from './foundations/fontWeights';
12
+ export { default as radii } from './foundations/radii';
13
+ export { default as ringWidths } from './foundations/ringWidths';
14
+ export { default as screens } from './foundations/screens';
15
+ export { default as shadows } from './foundations/shadows';
16
+ export { default as sizes } from './foundations/sizes';
17
+ export { default as spaces } from './foundations/spaces';
18
+ export { default as transforms } from './foundations/transforms';
19
+ export { default as transitions } from './foundations/transitions';
20
+ export { default as zIndices } from './foundations/zIndices';
5
21
  export * from './types';
6
22
  export default defaultTheme;
package/theme/index.js CHANGED
@@ -13,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  return (mod && mod.__esModule) ? mod : { "default": mod };
14
14
  };
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.foundations = exports.defaultTheme = exports.components = void 0;
16
+ exports.zIndices = exports.transitions = exports.transforms = exports.spaces = exports.sizes = exports.shadows = exports.screens = exports.ringWidths = exports.radii = exports.fontWeights = exports.fontSizes = exports.fonts = exports.durations = exports.colors = exports.borders = exports.animations = exports.foundations = exports.defaultTheme = exports.components = void 0;
17
17
  var defaultTheme_1 = __importDefault(require("./defaultTheme"));
18
18
  var components_1 = require("./components");
19
19
  Object.defineProperty(exports, "components", { enumerable: true, get: function () { return __importDefault(components_1).default; } });
@@ -21,5 +21,37 @@ var defaultTheme_2 = require("./defaultTheme");
21
21
  Object.defineProperty(exports, "defaultTheme", { enumerable: true, get: function () { return __importDefault(defaultTheme_2).default; } });
22
22
  var foundations_1 = require("./foundations");
23
23
  Object.defineProperty(exports, "foundations", { enumerable: true, get: function () { return __importDefault(foundations_1).default; } });
24
+ var animations_1 = require("./foundations/animations");
25
+ Object.defineProperty(exports, "animations", { enumerable: true, get: function () { return __importDefault(animations_1).default; } });
26
+ var borders_1 = require("./foundations/borders");
27
+ Object.defineProperty(exports, "borders", { enumerable: true, get: function () { return __importDefault(borders_1).default; } });
28
+ var colors_1 = require("./foundations/colors");
29
+ Object.defineProperty(exports, "colors", { enumerable: true, get: function () { return __importDefault(colors_1).default; } });
30
+ var durations_1 = require("./foundations/durations");
31
+ Object.defineProperty(exports, "durations", { enumerable: true, get: function () { return __importDefault(durations_1).default; } });
32
+ var fonts_1 = require("./foundations/fonts");
33
+ Object.defineProperty(exports, "fonts", { enumerable: true, get: function () { return __importDefault(fonts_1).default; } });
34
+ var fontSizes_1 = require("./foundations/fontSizes");
35
+ Object.defineProperty(exports, "fontSizes", { enumerable: true, get: function () { return __importDefault(fontSizes_1).default; } });
36
+ var fontWeights_1 = require("./foundations/fontWeights");
37
+ Object.defineProperty(exports, "fontWeights", { enumerable: true, get: function () { return __importDefault(fontWeights_1).default; } });
38
+ var radii_1 = require("./foundations/radii");
39
+ Object.defineProperty(exports, "radii", { enumerable: true, get: function () { return __importDefault(radii_1).default; } });
40
+ var ringWidths_1 = require("./foundations/ringWidths");
41
+ Object.defineProperty(exports, "ringWidths", { enumerable: true, get: function () { return __importDefault(ringWidths_1).default; } });
42
+ var screens_1 = require("./foundations/screens");
43
+ Object.defineProperty(exports, "screens", { enumerable: true, get: function () { return __importDefault(screens_1).default; } });
44
+ var shadows_1 = require("./foundations/shadows");
45
+ Object.defineProperty(exports, "shadows", { enumerable: true, get: function () { return __importDefault(shadows_1).default; } });
46
+ var sizes_1 = require("./foundations/sizes");
47
+ Object.defineProperty(exports, "sizes", { enumerable: true, get: function () { return __importDefault(sizes_1).default; } });
48
+ var spaces_1 = require("./foundations/spaces");
49
+ Object.defineProperty(exports, "spaces", { enumerable: true, get: function () { return __importDefault(spaces_1).default; } });
50
+ var transforms_1 = require("./foundations/transforms");
51
+ Object.defineProperty(exports, "transforms", { enumerable: true, get: function () { return __importDefault(transforms_1).default; } });
52
+ var transitions_1 = require("./foundations/transitions");
53
+ Object.defineProperty(exports, "transitions", { enumerable: true, get: function () { return __importDefault(transitions_1).default; } });
54
+ var zIndices_1 = require("./foundations/zIndices");
55
+ Object.defineProperty(exports, "zIndices", { enumerable: true, get: function () { return __importDefault(zIndices_1).default; } });
24
56
  __exportStar(require("./types"), exports);
25
57
  exports.default = defaultTheme_1.default;
@@ -18,8 +18,7 @@ function isNumber(value) {
18
18
  exports.isNumber = isNumber;
19
19
  /** Is value an object. */
20
20
  function isObject(value) {
21
- var type = typeof value;
22
- return value !== null && (type === 'object' || type === 'function') && !isArray(value);
21
+ return !!value && typeof value === 'object' && !isFunction(value) && !isArray(value);
23
22
  }
24
23
  exports.isObject = isObject;
25
24
  /** Is value a valid ReactText - string or number */
package/utils/function.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
  exports.runIfFn = void 0;
@@ -31,6 +35,6 @@ function runIfFn(value) {
31
35
  for (var _i = 1; _i < arguments.length; _i++) {
32
36
  args[_i - 1] = arguments[_i];
33
37
  }
34
- return typeof value === 'function' ? value.apply(void 0, __spreadArray([], __read(args))) : value;
38
+ return typeof value === 'function' ? value.apply(void 0, __spreadArray([], __read(args), false)) : value;
35
39
  }
36
40
  exports.runIfFn = runIfFn;
package/utils/object.js CHANGED
@@ -24,15 +24,15 @@ exports.filterUndefined = filterUndefined;
24
24
  */
25
25
  function merge(target, source) {
26
26
  var output = __assign({}, target);
27
- if (assertion_1.isObject(target) && assertion_1.isObject(source)) {
27
+ if ((0, assertion_1.isObject)(target) && (0, assertion_1.isObject)(source)) {
28
28
  Object.keys(source).forEach(function (key) {
29
29
  var _a;
30
30
  if (key === '__proto__')
31
31
  return;
32
- if (key in target && assertion_1.isObject(target[key]) && assertion_1.isObject(source[key])) {
32
+ if (key in target && (0, assertion_1.isObject)(target[key]) && (0, assertion_1.isObject)(source[key])) {
33
33
  output[key] = merge(target[key], source[key]);
34
34
  }
35
- else if (key in target && assertion_1.isArray(target[key]) && assertion_1.isArray(source[key])) {
35
+ else if (key in target && (0, assertion_1.isArray)(target[key]) && (0, assertion_1.isArray)(source[key])) {
36
36
  output[key] = (_a = target[key]) === null || _a === void 0 ? void 0 : _a.concat(source[key]);
37
37
  }
38
38
  else {