@veracity/vui 0.0.15 → 0.2.0

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 (195) hide show
  1. package/avatar/avatar.js +2 -2
  2. package/box/box.js +1 -1
  3. package/button/button.d.ts +7 -1
  4. package/button/button.js +56 -23
  5. package/button/button.types.d.ts +8 -6
  6. package/button/buttonIcon.d.ts +3 -0
  7. package/{alert/alertText.js → button/buttonIcon.js} +9 -9
  8. package/button/buttonText.d.ts +3 -0
  9. package/button/buttonText.js +30 -0
  10. package/button/buttons.d.ts +4 -3
  11. package/button/buttons.js +4 -3
  12. package/button/consts.js +3 -2
  13. package/button/context.d.ts +2 -2
  14. package/button/context.js +4 -4
  15. package/button/index.d.ts +2 -2
  16. package/button/index.js +2 -2
  17. package/button/theme.d.ts +79 -41
  18. package/button/theme.js +85 -46
  19. package/{button → buttonGroup}/buttonGroup.d.ts +3 -1
  20. package/{button → buttonGroup}/buttonGroup.js +4 -2
  21. package/buttonGroup/context.d.ts +4 -0
  22. package/buttonGroup/context.js +23 -0
  23. package/buttonGroup/helpers.d.ts +3 -0
  24. package/buttonGroup/helpers.js +10 -0
  25. package/buttonGroup/index.d.ts +4 -0
  26. package/{alert → buttonGroup}/index.js +4 -8
  27. package/card/card.d.ts +3 -0
  28. package/{tile/tile.js → card/card.js} +8 -7
  29. package/{tile/tile.types.d.ts → card/card.types.d.ts} +1 -1
  30. package/card/index.d.ts +3 -0
  31. package/{tile → card}/index.js +4 -4
  32. package/card/theme.d.ts +6 -0
  33. package/card/theme.js +10 -0
  34. package/checkbox/checkbox.js +4 -4
  35. package/checkbox/checkbox.types.d.ts +1 -1
  36. package/checkbox/checkboxGroup.types.d.ts +1 -1
  37. package/core/globalStyle.d.ts +4 -1
  38. package/core/globalStyle.js +7 -3
  39. package/core/index.d.ts +2 -0
  40. package/core/index.js +5 -1
  41. package/core/styled.d.ts +4 -0
  42. package/core/styled.js +80 -0
  43. package/core/types/component.d.ts +12 -12
  44. package/core/types/index.d.ts +1 -0
  45. package/core/types/index.js +1 -0
  46. package/core/types/styled.d.ts +11 -0
  47. package/core/utils.d.ts +2 -2
  48. package/core/utils.js +7 -7
  49. package/core/v.d.ts +182 -0
  50. package/core/v.js +6 -0
  51. package/core/vuiProvider.d.ts +13 -2
  52. package/core/vuiProvider.js +1 -1
  53. package/divider/divider.types.d.ts +1 -1
  54. package/heading/heading.types.d.ts +2 -1
  55. package/icon/helpers.d.ts +2 -3
  56. package/icon/helpers.js +6 -8
  57. package/icon/icon.js +3 -2
  58. package/icon/icon.types.d.ts +4 -2
  59. package/icons/library.js +1 -1
  60. package/icons/types.d.ts +1 -1
  61. package/image/image.d.ts +3 -0
  62. package/image/image.js +38 -0
  63. package/image/image.types.d.ts +5 -0
  64. package/image/index.d.ts +3 -0
  65. package/{label → image}/index.js +4 -4
  66. package/image/theme.d.ts +6 -0
  67. package/image/theme.js +10 -0
  68. package/index.d.ts +6 -3
  69. package/index.js +6 -3
  70. package/input/context.d.ts +4 -0
  71. package/{alert → input}/context.js +4 -4
  72. package/input/index.d.ts +2 -0
  73. package/input/index.js +2 -0
  74. package/input/input.d.ts +7 -2
  75. package/input/input.js +33 -22
  76. package/input/input.types.d.ts +7 -3
  77. package/input/inputIcon.d.ts +3 -0
  78. package/input/inputIcon.js +30 -0
  79. package/input/inputInput.d.ts +5 -0
  80. package/input/inputInput.js +36 -0
  81. package/input/theme.d.ts +40 -15
  82. package/input/theme.js +40 -16
  83. package/list/index.d.ts +3 -1
  84. package/list/index.js +3 -1
  85. package/list/list.d.ts +2 -0
  86. package/list/list.js +3 -1
  87. package/list/list.types.d.ts +19 -1
  88. package/list/listHeading.d.ts +2 -2
  89. package/list/listHeading.js +2 -2
  90. package/list/listIcon.js +1 -1
  91. package/list/listItem.d.ts +1 -1
  92. package/list/listItem.js +8 -5
  93. package/list/listText.d.ts +3 -0
  94. package/list/listText.js +30 -0
  95. package/list/theme.d.ts +20 -6
  96. package/list/theme.js +26 -12
  97. package/notification/consts.d.ts +2 -0
  98. package/{alert → notification}/consts.js +7 -7
  99. package/notification/context.d.ts +4 -0
  100. package/notification/context.js +23 -0
  101. package/notification/index.d.ts +8 -0
  102. package/notification/index.js +25 -0
  103. package/notification/notification.d.ts +13 -0
  104. package/{alert/alert.js → notification/notification.js} +25 -25
  105. package/notification/notification.types.d.ts +20 -0
  106. package/notification/notificationButton.d.ts +3 -0
  107. package/{alert/alertButton.js → notification/notificationButton.js} +8 -8
  108. package/notification/notificationIcon.d.ts +3 -0
  109. package/{alert/alertIcon.js → notification/notificationIcon.js} +9 -9
  110. package/notification/notificationText.d.ts +3 -0
  111. package/notification/notificationText.js +30 -0
  112. package/notification/notificationTitle.d.ts +3 -0
  113. package/notification/notificationTitle.js +30 -0
  114. package/{alert → notification}/theme.d.ts +0 -15
  115. package/{alert → notification}/theme.js +1 -22
  116. package/package.json +2 -3
  117. package/panel/index.d.ts +3 -0
  118. package/panel/index.js +20 -0
  119. package/panel/panel.d.ts +3 -0
  120. package/panel/panel.js +39 -0
  121. package/panel/panel.types.d.ts +4 -0
  122. package/{tile → panel}/theme.d.ts +1 -8
  123. package/{tile → panel}/theme.js +4 -11
  124. package/radio/radio.js +4 -4
  125. package/radio/radio.types.d.ts +1 -1
  126. package/radio/radioGroup.types.d.ts +1 -1
  127. package/skeleton/skeleton.types.d.ts +1 -0
  128. package/spinner/spinner.types.d.ts +1 -0
  129. package/svg/cache.js +1 -5
  130. package/svg/svg.js +2 -3
  131. package/switch/index.d.ts +0 -1
  132. package/switch/index.js +0 -1
  133. package/switch/switch.js +6 -6
  134. package/switch/switch.types.d.ts +19 -4
  135. package/switch/switchButton.d.ts +2 -2
  136. package/switch/switchButton.js +18 -19
  137. package/switch/theme.d.ts +41 -46
  138. package/switch/theme.js +50 -72
  139. package/system/borders.d.ts +3 -1
  140. package/system/custom.d.ts +24 -7
  141. package/system/custom.js +33 -13
  142. package/system/system.d.ts +2 -2
  143. package/system/system.js +1 -1
  144. package/t/t.types.d.ts +2 -1
  145. package/tag/context.d.ts +4 -0
  146. package/tag/context.js +23 -0
  147. package/tag/index.d.ts +6 -0
  148. package/tag/index.js +23 -0
  149. package/tag/tag.d.ts +11 -0
  150. package/tag/tag.js +99 -0
  151. package/{label/label.types.d.ts → tag/tag.types.d.ts} +6 -7
  152. package/tag/tag.types.js +2 -0
  153. package/tag/tagIcon.d.ts +3 -0
  154. package/{alert/alertTitle.js → tag/tagIcon.js} +9 -9
  155. package/tag/tagText.d.ts +3 -0
  156. package/tag/tagText.js +30 -0
  157. package/tag/theme.d.ts +65 -0
  158. package/tag/theme.js +78 -0
  159. package/textarea/textarea.js +2 -1
  160. package/textarea/textarea.types.d.ts +1 -0
  161. package/theme/components.d.ts +291 -223
  162. package/theme/components.js +32 -28
  163. package/theme/defaultTheme.d.ts +291 -223
  164. package/utils/assertion.d.ts +14 -0
  165. package/utils/assertion.js +34 -0
  166. package/utils/index.d.ts +1 -0
  167. package/utils/index.js +1 -0
  168. package/utils/object.d.ts +5 -18
  169. package/utils/object.js +17 -50
  170. package/utils/types.d.ts +2 -0
  171. package/alert/alert.d.ts +0 -13
  172. package/alert/alert.types.d.ts +0 -20
  173. package/alert/alertButton.d.ts +0 -3
  174. package/alert/alertIcon.d.ts +0 -3
  175. package/alert/alertText.d.ts +0 -3
  176. package/alert/alertTitle.d.ts +0 -3
  177. package/alert/consts.d.ts +0 -2
  178. package/alert/context.d.ts +0 -4
  179. package/alert/index.d.ts +0 -8
  180. package/label/index.d.ts +0 -3
  181. package/label/label.d.ts +0 -5
  182. package/label/label.js +0 -71
  183. package/label/theme.d.ts +0 -61
  184. package/label/theme.js +0 -107
  185. package/list/listItem.types.d.ts +0 -16
  186. package/switch/switchButton.types.d.ts +0 -19
  187. package/tile/index.d.ts +0 -3
  188. package/tile/tile.d.ts +0 -3
  189. /package/{button → buttonGroup}/buttonGroup.types.d.ts +0 -0
  190. /package/{button → buttonGroup}/buttonGroup.types.js +0 -0
  191. /package/{alert/alert.types.js → card/card.types.js} +0 -0
  192. /package/{label/label.types.js → core/types/styled.js} +0 -0
  193. /package/{list/listItem.types.js → image/image.types.js} +0 -0
  194. /package/{switch/switchButton.types.js → notification/notification.types.js} +0 -0
  195. /package/{tile/tile.types.js → panel/panel.types.js} +0 -0
@@ -1,18 +1,4 @@
1
1
  import { Dict } from '../utils';
2
- declare function variantSolid(props: Dict): {
3
- container: {
4
- bg: string;
5
- color: string;
6
- };
7
- button: {
8
- bg: string;
9
- hoverBg: string;
10
- };
11
- icon: {};
12
- message: {};
13
- text: {};
14
- title: {};
15
- };
16
2
  declare function variantSubtle(props: Dict): {
17
3
  container: {
18
4
  bg: string;
@@ -39,7 +25,6 @@ declare const _default: {
39
25
  parts: string[];
40
26
  sizes: {};
41
27
  variants: {
42
- solid: typeof variantSolid;
43
28
  subtle: typeof variantSubtle;
44
29
  };
45
30
  };
@@ -1,21 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- function variantSolid(props) {
4
- var c = props.colorScheme;
5
- var container = {
6
- bg: c + ".70",
7
- color: 'white'
8
- };
9
- var button = {
10
- bg: c + ".70",
11
- hoverBg: c + ".80"
12
- };
13
- var icon = {};
14
- var message = {};
15
- var text = {};
16
- var title = {};
17
- return { container: container, button: button, icon: icon, message: message, text: text, title: title };
18
- }
19
3
  function variantSubtle(props) {
20
4
  var c = props.colorScheme;
21
5
  var container = {
@@ -34,13 +18,9 @@ function variantSubtle(props) {
34
18
  var message = {};
35
19
  var text = {};
36
20
  var title = {};
37
- if (c === 'grey') {
38
- button.color = 'prussian.80';
39
- container.color = 'prussian.80';
40
- }
41
21
  if (c === 'yellow') {
42
- button.color = 'yellow.100';
43
22
  container.color = 'yellow.100';
23
+ button.color = 'yellow.100';
44
24
  }
45
25
  return { container: container, button: button, icon: icon, message: message, text: text, title: title };
46
26
  }
@@ -51,7 +31,6 @@ var defaultProps = {
51
31
  var parts = ['container', 'button', 'icon', 'message', 'text', 'title'];
52
32
  var sizes = {};
53
33
  var variants = {
54
- solid: variantSolid,
55
34
  subtle: variantSubtle
56
35
  };
57
36
  exports.default = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veracity/vui",
3
- "version": "0.0.15",
3
+ "version": "0.2.0",
4
4
  "description": "Veracity UI React components library based on Styled Components and @xstyled",
5
5
  "main": "index.js",
6
6
  "author": "Veracity",
@@ -17,8 +17,7 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@xstyled/styled-components": "^2.4.1",
20
- "axios": "^0.21.1",
21
- "styled-components": "^5.2.1"
20
+ "styled-components": "^5.3.1"
22
21
  },
23
22
  "peerDependencies": {
24
23
  "react": "^17.0.1",
@@ -0,0 +1,3 @@
1
+ export * from './panel';
2
+ export * from './panel.types';
3
+ export { default } from './panel';
package/panel/index.js ADDED
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ var __importDefault = (this && this.__importDefault) || function (mod) {
13
+ return (mod && mod.__esModule) ? mod : { "default": mod };
14
+ };
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.default = void 0;
17
+ __exportStar(require("./panel"), exports);
18
+ __exportStar(require("./panel.types"), exports);
19
+ var panel_1 = require("./panel");
20
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(panel_1).default; } });
@@ -0,0 +1,3 @@
1
+ import { PanelProps } from './panel.types';
2
+ export declare const Panel: import("../core").VuiComponent<"div", PanelProps>;
3
+ export default Panel;
package/panel/panel.js ADDED
@@ -0,0 +1,39 @@
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 __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ var __importDefault = (this && this.__importDefault) || function (mod) {
25
+ return (mod && mod.__esModule) ? mod : { "default": mod };
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.Panel = void 0;
29
+ var react_1 = __importDefault(require("react"));
30
+ var box_1 = __importDefault(require("../box"));
31
+ var core_1 = require("../core");
32
+ var utils_1 = require("../utils");
33
+ exports.Panel = core_1.vui(function (props, ref) {
34
+ var _a = core_1.omitThemingProps(props), className = _a.className, rest = __rest(_a, ["className"]);
35
+ var styles = core_1.useStyleConfig('Panel', props);
36
+ return (react_1.default.createElement(box_1.default, __assign({ bg: "white", borderRadius: "md", className: utils_1.cs('vui-panel', className), p: 2, ref: ref }, styles, rest)));
37
+ });
38
+ exports.Panel.displayName = 'Panel';
39
+ exports.default = exports.Panel;
@@ -0,0 +1,4 @@
1
+ import { BoxProps } from '../box';
2
+ import { ThemingProps } from '../theme';
3
+ export interface PanelProps extends Omit<BoxProps, 'size' | 'variant'>, ThemingProps<'Panel'> {
4
+ }
@@ -4,19 +4,12 @@ declare const _default: {
4
4
  };
5
5
  sizes: {};
6
6
  variants: {
7
- default: {
8
- bg: string;
9
- borderRadius: string;
7
+ elevated: {
10
8
  shadow: string;
11
- hoverShadow: string;
12
- p: number;
13
9
  };
14
10
  outlined: {
15
- bg: string;
16
11
  border: number;
17
12
  borderColor: string;
18
- borderRadius: string;
19
- p: number;
20
13
  };
21
14
  };
22
15
  };
@@ -1,23 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var defaultProps = {
4
- variant: 'default'
4
+ variant: 'elevated'
5
5
  };
6
6
  var sizes = {};
7
7
  var variants = {
8
- default: {
9
- bg: 'white',
10
- borderRadius: 'md',
11
- shadow: '1',
12
- hoverShadow: '3',
13
- p: 2
8
+ elevated: {
9
+ shadow: '1'
14
10
  },
15
11
  outlined: {
16
- bg: 'white',
17
12
  border: 1,
18
- borderColor: 'grey.40',
19
- borderRadius: 'md',
20
- p: 2
13
+ borderColor: 'grey.40'
21
14
  }
22
15
  };
23
16
  exports.default = {
package/radio/radio.js CHANGED
@@ -45,12 +45,12 @@ exports.Radio = core_1.vui(function (props, ref) {
45
45
  var _a;
46
46
  var _b = (_a = context_1.useRadioGroup()) !== null && _a !== void 0 ? _a : {}, groupOnChange = _b.onChange, groupValue = _b.value, radioGroupProps = __rest(_b, ["onChange", "value"]);
47
47
  var mergedProps = __assign(__assign({}, radioGroupProps), props);
48
- var _c = core_1.omitThemingProps(mergedProps), _d = _c.checked, checked = _d === void 0 ? groupValue !== undefined ? props.value === groupValue : undefined : _d, children = _c.children, className = _c.className, defaultChecked = _c.defaultChecked, disabled = _c.disabled, _e = _c.icon, iconProp = _e === void 0 ? 'cuiRadioUnselected' : _e, _f = _c.iconChecked, iconChecked = _f === void 0 ? 'cuiRadioSelected' : _f, inputProps = _c.inputProps, inputRef = _c.inputRef, label = _c.label, name = _c.name, onChange = _c.onChange, required = _c.required, value = _c.value, rest = __rest(_c, ["checked", "children", "className", "defaultChecked", "disabled", "icon", "iconChecked", "inputProps", "inputRef", "label", "name", "onChange", "required", "value"]);
48
+ var _c = core_1.omitThemingProps(mergedProps), _d = _c.checked, checked = _d === void 0 ? groupValue !== undefined ? props.value === groupValue : undefined : _d, children = _c.children, className = _c.className, defaultChecked = _c.defaultChecked, disabled = _c.disabled, _e = _c.icon, iconProp = _e === void 0 ? 'cuiRadioUnselected' : _e, _f = _c.iconChecked, iconChecked = _f === void 0 ? 'cuiRadioSelected' : _f, id = _c.id, inputProps = _c.inputProps, inputRef = _c.inputRef, label = _c.label, name = _c.name, onChange = _c.onChange, required = _c.required, value = _c.value, rest = __rest(_c, ["checked", "children", "className", "defaultChecked", "disabled", "icon", "iconChecked", "id", "inputProps", "inputRef", "label", "name", "onChange", "required", "value"]);
49
49
  var styles = core_1.useStyleConfig('Radio', mergedProps);
50
50
  var _g = styles.control, controlColor = _g.color, hoverColor = _g.hoverColor, controlStyles = __rest(_g, ["color", "hoverColor"]);
51
51
  var icon = checked ? iconChecked : iconProp;
52
52
  var controlMr = children || label ? 1 : 0;
53
- var color = checked ? controlColor : 'grey.50';
53
+ var color = checked ? controlColor : 'grey.60';
54
54
  var controlHoverColor = checked ? hoverColor : 'grey.90';
55
55
  function handleOnChange(e) {
56
56
  groupOnChange === null || groupOnChange === void 0 ? void 0 : groupOnChange(e);
@@ -58,8 +58,8 @@ exports.Radio = core_1.vui(function (props, ref) {
58
58
  }
59
59
  return (react_1.default.createElement(exports.RadioBase, __assign({ className: utils_1.cs('vui-radio', disabled && 'disabled', className), controlHoverColor: controlHoverColor, ref: ref }, styles.container, rest),
60
60
  react_1.default.createElement(exports.RadioControl, __assign({ borderRadius: "50%", className: "vui-radioControl", color: color, focusWithinRing: 3, mr: controlMr, transitionDuration: "fast" }, controlStyles),
61
- react_1.default.createElement(exports.RadioInput, __assign({ className: "vui-radioInput", onChange: handleOnChange, ref: inputRef, type: "radio" }, { checked: checked, defaultChecked: defaultChecked, disabled: disabled, name: name, required: required, value: value }, inputProps)),
62
- react_1.default.createElement(icon_1.default, { className: "vui-radioIcon", h: "100%", icon: icon, w: "100%" })), children !== null && children !== void 0 ? children : (label && (react_1.default.createElement(t_1.default, __assign({ className: "vui-radioLabel", lineHeight: "normal" }, styles.label), label)))));
61
+ react_1.default.createElement(exports.RadioInput, __assign({ className: "vui-radioInput", onChange: handleOnChange, ref: inputRef, type: "radio" }, { checked: checked, defaultChecked: defaultChecked, disabled: disabled, id: id, name: name, required: required, value: value }, inputProps)),
62
+ react_1.default.createElement(icon_1.default, { className: "vui-radioIcon", h: "100%", name: icon, w: "100%" })), children !== null && children !== void 0 ? children : (label && (react_1.default.createElement(t_1.default, __assign({ className: "vui-radioLabel", lineHeight: "normal" }, styles.label), label)))));
63
63
  });
64
64
  exports.Radio.displayName = 'Radio';
65
65
  exports.default = exports.Radio;
@@ -5,7 +5,7 @@ import { SystemProps } from '../system';
5
5
  import { ThemingProps } from '../theme';
6
6
  export interface RadioProps extends SystemProps, ThemingProps<'Radio'> {
7
7
  checked?: boolean;
8
- colorScheme?: 'blue' | 'green' | 'prussian' | 'red';
8
+ colorScheme?: 'blue' | 'prussian';
9
9
  disabled?: boolean;
10
10
  icon?: IconProp;
11
11
  iconChecked?: IconProp;
@@ -2,7 +2,7 @@ import { ChangeEventHandler, FocusEventHandler } from '../core';
2
2
  import { SystemProps } from '../system';
3
3
  import { ThemingProps } from '../theme';
4
4
  export interface RadioGroupProps extends SystemProps, ThemingProps<'Radio'> {
5
- colorScheme?: 'blue' | 'green' | 'prussian' | 'red';
5
+ colorScheme?: 'blue' | 'prussian';
6
6
  disabled?: boolean;
7
7
  name?: string;
8
8
  onBlur?: FocusEventHandler;
@@ -1,6 +1,7 @@
1
1
  import { SystemProps } from '../system';
2
2
  import { ThemingProps } from '../theme';
3
3
  export interface SkeletonProps extends SystemProps, ThemingProps<'Skeleton'> {
4
+ children?: never;
4
5
  colorScheme?: 'blue' | 'grey';
5
6
  repeat?: number;
6
7
  }
@@ -5,6 +5,7 @@ export interface SpinnerCircleStyleProps extends SystemProps {
5
5
  speed?: string;
6
6
  }
7
7
  export interface SpinnerProps extends Omit<BoxProps, 'size' | 'variant'>, Omit<ThemingProps<'Spinner'>, 'size'> {
8
+ children?: never;
8
9
  colorScheme?: 'blue' | 'grey' | 'prussian';
9
10
  emptyColor?: string;
10
11
  speed?: string;
package/svg/cache.js CHANGED
@@ -1,9 +1,5 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- var axios_1 = __importDefault(require("axios"));
7
3
  /**
8
4
  * Provides svg caching functionality to avoid redundant XHR requests.
9
5
  * When the retrieved item doesn't exist in cache yet, a request is sent
@@ -20,7 +16,7 @@ var Cache = /** @class */ (function () {
20
16
  this.get = function (src) {
21
17
  var item = _this.cache.get(src);
22
18
  if (!item) {
23
- var promise = axios_1.default.get(src).then(function (res) { return res.data; });
19
+ var promise = fetch(src).then(function (res) { return res.text(); });
24
20
  _this.add(src, promise);
25
21
  return promise;
26
22
  }
package/svg/svg.js CHANGED
@@ -114,6 +114,8 @@ exports.Svg = core_1.vui(function (props, ref) {
114
114
  var _a = __read(react_1.useState(helpers_1.initState()), 2), state = _a[0], setState = _a[1];
115
115
  var isMountedRef = react_1.useRef(false);
116
116
  var srcRef = react_1.useRef(src);
117
+ var _b = state.content, content = _b === void 0 ? '' : _b, _c = state.svgAttributes, svgAttributes = _c === void 0 ? {} : _c;
118
+ var innerHTML = !children ? { __html: content } : undefined;
117
119
  react_1.useEffect(function () {
118
120
  isMountedRef.current = true;
119
121
  return function () {
@@ -155,9 +157,6 @@ exports.Svg = core_1.vui(function (props, ref) {
155
157
  }
156
158
  src && loadSvg(src);
157
159
  }, [src]);
158
- var _b = state.content, content = _b === void 0 ? '' : _b, _c = state.svgAttributes, svgAttributes = _c === void 0 ? {} : _c;
159
- var innerHTML = !children ? { __html: content } : undefined;
160
- // const pathFill = Array.isArray(fill) ? fill : [fill]
161
160
  return (react_1.default.createElement(exports.SvgBase, __assign({ className: utils_1.cs('vui-svg', className), dangerouslySetInnerHTML: innerHTML, ref: ref, xmlns: "http://www.w3.org/2000/svg" }, svgAttributes, rest), children));
162
161
  });
163
162
  exports.Svg.displayName = 'Svg';
package/switch/index.d.ts CHANGED
@@ -2,6 +2,5 @@ export * from './context';
2
2
  export * from './switch';
3
3
  export * from './switch.types';
4
4
  export * from './switchButton';
5
- export * from './switchButton.types';
6
5
  export * from './switchLabel';
7
6
  export { default } from './switch';
package/switch/index.js CHANGED
@@ -18,7 +18,6 @@ __exportStar(require("./context"), exports);
18
18
  __exportStar(require("./switch"), exports);
19
19
  __exportStar(require("./switch.types"), exports);
20
20
  __exportStar(require("./switchButton"), exports);
21
- __exportStar(require("./switchButton.types"), exports);
22
21
  __exportStar(require("./switchLabel"), exports);
23
22
  var switch_1 = require("./switch");
24
23
  Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(switch_1).default; } });
package/switch/switch.js CHANGED
@@ -76,8 +76,9 @@ var t_1 = require("../t");
76
76
  var utils_1 = require("../utils");
77
77
  exports.SwitchBase = styled_components_1.default.label.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\tline-height: normal;\n\twidth: fit-content;\n\n\t&[data-disabled='true'] {\n\t\tcursor: not-allowed;\n\n\t\t", " {\n\t\t\tcolor: var(--vui-colors-disabled-font);\n\t\t}\n\t}\n\n\t", "\n"], ["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\tline-height: normal;\n\twidth: fit-content;\n\n\t&[data-disabled='true'] {\n\t\tcursor: not-allowed;\n\n\t\t", " {\n\t\t\tcolor: var(--vui-colors-disabled-font);\n\t\t}\n\t}\n\n\t", "\n"])), t_1.TBase, system_1.system);
78
78
  exports.Switch = core_1.vui(function (props, ref) {
79
- var checked = props.checked, children = props.children, className = props.className, colorScheme = props.colorScheme, defaultChecked = props.defaultChecked, disabled = props.disabled, innerLabelOff = props.innerLabelOff, innerLabelOn = props.innerLabelOn, inputProps = props.inputProps, inputRef = props.inputRef, labelLeft = props.labelLeft, labelRight = props.labelRight, name = props.name, onBlur = props.onBlur, onChange = props.onChange, onFocus = props.onFocus, required = props.required, size = props.size, value = props.value, variant = props.variant, rest = __rest(props, ["checked", "children", "className", "colorScheme", "defaultChecked", "disabled", "innerLabelOff", "innerLabelOn", "inputProps", "inputRef", "labelLeft", "labelRight", "name", "onBlur", "onChange", "onFocus", "required", "size", "value", "variant"]);
80
- var _a = __read(react_1.useState(defaultChecked), 2), isChecked = _a[0], setIsChecked = _a[1];
79
+ var _a;
80
+ var button = props.button, checked = props.checked, children = props.children, className = props.className, colorScheme = props.colorScheme, defaultChecked = props.defaultChecked, disabled = props.disabled, id = props.id, innerLabelOff = props.innerLabelOff, innerLabelOn = props.innerLabelOn, inputRef = props.inputRef, labelLeft = props.labelLeft, labelRight = props.labelRight, name = props.name, onBlur = props.onBlur, onChange = props.onChange, onFocus = props.onFocus, required = props.required, size = props.size, value = props.value, variant = props.variant, rest = __rest(props, ["button", "checked", "children", "className", "colorScheme", "defaultChecked", "disabled", "id", "innerLabelOff", "innerLabelOn", "inputRef", "labelLeft", "labelRight", "name", "onBlur", "onChange", "onFocus", "required", "size", "value", "variant"]);
81
+ var _b = __read(react_1.useState(defaultChecked), 2), isChecked = _b[0], setIsChecked = _b[1];
81
82
  var styles = core_1.useStyleConfig('Switch', props);
82
83
  react_1.useEffect(function () {
83
84
  checked !== undefined && setIsChecked(checked);
@@ -120,10 +121,9 @@ exports.Switch = core_1.vui(function (props, ref) {
120
121
  'data-disabled': disabled ? true : false
121
122
  });
122
123
  return (react_1.default.createElement(context_1.SwitchProvider, { value: context },
123
- react_1.default.createElement(exports.SwitchBase, __assign({ className: utils_1.cs('vui-switch', className), ref: ref }, styles.container, aliasedProps, rest), children ? (children) : (react_1.default.createElement(react_1.default.Fragment, null,
124
- labelLeft && react_1.default.createElement(switchLabel_1.SwitchLabel, { mr: 1 }, labelLeft),
125
- react_1.default.createElement(switchButton_1.SwitchButton, __assign({}, { innerLabelOff: innerLabelOff, innerLabelOn: innerLabelOn, inputProps: inputProps, inputRef: inputRef })),
126
- labelRight && react_1.default.createElement(switchLabel_1.SwitchLabel, { ml: 1 }, labelRight))))));
124
+ react_1.default.createElement(exports.SwitchBase, __assign({ className: utils_1.cs('vui-switch', className), ref: ref }, styles.container, aliasedProps, rest),
125
+ utils_1.isReactText(labelLeft) ? react_1.default.createElement(switchLabel_1.SwitchLabel, { mr: 1, text: labelLeft }) : labelLeft, (_a = children !== null && children !== void 0 ? children : button) !== null && _a !== void 0 ? _a : react_1.default.createElement(switchButton_1.SwitchButton, __assign({}, { id: id, innerLabelOff: innerLabelOff, innerLabelOn: innerLabelOn, inputRef: inputRef })),
126
+ utils_1.isReactText(labelRight) ? react_1.default.createElement(switchLabel_1.SwitchLabel, { ml: 1, text: labelRight }) : labelRight)));
127
127
  });
128
128
  exports.Switch.displayName = 'Switch';
129
129
  exports.Switch.Button = switchButton_1.SwitchButton;
@@ -1,14 +1,29 @@
1
- import { HTMLAttributes, ReactNode } from 'react';
2
- import { ChangeEventHandler, FocusEventHandler } from '../core';
1
+ import { ReactNode, ReactText } from 'react';
2
+ import { ChangeEventHandler, FocusEventHandler, PropsOf } from '../core';
3
3
  import { SystemProps } from '../system';
4
4
  import { ThemingProps } from '../theme';
5
+ export interface SwitchButtonProps extends SystemProps, ThemingProps<'Switch'> {
6
+ checked?: boolean;
7
+ colorScheme?: 'blue' | 'green' | 'prussian' | 'red';
8
+ disabled?: boolean;
9
+ innerLabelOff?: ReactNode;
10
+ innerLabelOn?: ReactNode;
11
+ inputProps?: PropsOf<'input', SystemProps>;
12
+ inputRef?: React.MutableRefObject<HTMLInputElement | null> | null;
13
+ name?: string;
14
+ onBlur?: FocusEventHandler;
15
+ onChange?: ChangeEventHandler;
16
+ onFocus?: FocusEventHandler;
17
+ required?: boolean;
18
+ value?: number | string;
19
+ }
5
20
  export interface SwitchProps extends SystemProps, ThemingProps<'Switch'> {
21
+ button?: ReactNode;
6
22
  checked?: boolean;
7
23
  colorScheme?: 'blue' | 'green' | 'prussian' | 'red';
8
24
  disabled?: boolean;
9
25
  innerLabelOff?: ReactNode;
10
26
  innerLabelOn?: ReactNode;
11
- inputProps?: HTMLAttributes<HTMLInputElement>;
12
27
  inputRef?: React.MutableRefObject<HTMLInputElement | null> | null;
13
28
  labelLeft?: ReactNode;
14
29
  labelRight?: ReactNode;
@@ -17,5 +32,5 @@ export interface SwitchProps extends SystemProps, ThemingProps<'Switch'> {
17
32
  onChange?: ChangeEventHandler;
18
33
  onFocus?: FocusEventHandler;
19
34
  required?: boolean;
20
- value?: number | string;
35
+ value?: ReactText;
21
36
  }
@@ -1,6 +1,6 @@
1
- import { SwitchButtonProps } from './switchButton.types';
1
+ import { SwitchButtonProps } from './switch.types';
2
2
  import { SystemProps } from '../system';
3
- export declare const SwitchInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const SwitchInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, SystemProps, never>;
4
4
  export declare const SwitchThumb: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, SystemProps, never>;
5
5
  export declare const SwitchTrack: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, SystemProps, never>;
6
6
  export declare const SwitchButtonBase: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, SystemProps, never>;
@@ -71,18 +71,19 @@ var context_1 = require("./context");
71
71
  var core_1 = require("../core");
72
72
  var system_1 = require("../system");
73
73
  var utils_1 = require("../utils");
74
- exports.SwitchInput = styled_components_1.default.input(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tcursor: inherit;\n\theight: calc(100% + 10px);\n\tleft: -5px;\n\tmargin: 0;\n\topacity: 0;\n\tpadding: 0;\n\tposition: absolute;\n\ttop: -5px;\n\twidth: calc(100% + 10px);\n\tz-index: 1;\n"], ["\n\tcursor: inherit;\n\theight: calc(100% + 10px);\n\tleft: -5px;\n\tmargin: 0;\n\topacity: 0;\n\tpadding: 0;\n\tposition: absolute;\n\ttop: -5px;\n\twidth: calc(100% + 10px);\n\tz-index: 1;\n"])));
74
+ exports.SwitchInput = styled_components_1.default.input.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tcursor: inherit;\n\theight: calc(100% + 10px);\n\tleft: -5px;\n\tmargin: 0;\n\topacity: 0;\n\tpadding: 0;\n\tposition: absolute;\n\ttop: -5px;\n\twidth: calc(100% + 10px);\n\tz-index: 1;\n\n\t", "\n"], ["\n\tcursor: inherit;\n\theight: calc(100% + 10px);\n\tleft: -5px;\n\tmargin: 0;\n\topacity: 0;\n\tpadding: 0;\n\tposition: absolute;\n\ttop: -5px;\n\twidth: calc(100% + 10px);\n\tz-index: 1;\n\n\t", "\n"])), system_1.system);
75
75
  exports.SwitchThumb = styled_components_1.default.span.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\tdisplay: inline-flex;\n\tflex-shrink: 0;\n\tposition: absolute;\n\n\t", "\n"], ["\n\tdisplay: inline-flex;\n\tflex-shrink: 0;\n\tposition: absolute;\n\n\t", "\n"])), system_1.system);
76
- exports.SwitchTrack = styled_components_1.default.span.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n\talign-items: center;\n\tdisplay: inline-flex;\n\tposition: relative;\n\n\t", "\n"], ["\n\talign-items: center;\n\tdisplay: inline-flex;\n\tposition: relative;\n\n\t", "\n"])), system_1.system);
77
- exports.SwitchButtonBase = styled_components_1.default.span.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n\tcolor: white;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\tflex-shrink: 0;\n\tposition: relative;\n\n\t&[data-disabled='true'] {\n\t\tcursor: not-allowed;\n\n\t\t", " {\n\t\t\tborder-color: var(--vui-colors-disabled-border);\n\t\t\tbackground-color: var(--vui-colors-disabled-font);\n\t\t}\n\n\t\t", " {\n\t\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\t}\n\t}\n\n\t", "\n"], ["\n\tcolor: white;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\tflex-shrink: 0;\n\tposition: relative;\n\n\t&[data-disabled='true'] {\n\t\tcursor: not-allowed;\n\n\t\t", " {\n\t\t\tborder-color: var(--vui-colors-disabled-border);\n\t\t\tbackground-color: var(--vui-colors-disabled-font);\n\t\t}\n\n\t\t", " {\n\t\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\t}\n\t}\n\n\t", "\n"])), exports.SwitchThumb, exports.SwitchTrack, system_1.system);
76
+ exports.SwitchTrack = styled_components_1.default.span.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n\talign-items: center;\n\tdisplay: inline-flex;\n\tflex: 1;\n\tposition: relative;\n\n\t", "\n"], ["\n\talign-items: center;\n\tdisplay: inline-flex;\n\tflex: 1;\n\tposition: relative;\n\n\t", "\n"])), system_1.system);
77
+ exports.SwitchButtonBase = styled_components_1.default.span.withConfig(core_1.forwardPropConfig(system_1.system))(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n\tcolor: white;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\tflex-shrink: 0;\n\tposition: relative;\n\n\t&[data-disabled='true'] {\n\t\tcursor: not-allowed;\n\n\t\t", " {\n\t\t\tborder-color: var(--vui-colors-disabled-border);\n\t\t\tbackground-color: var(--vui-colors-disabled-font);\n\t\t}\n\n\t\t", " {\n\t\t\t--x-ring-color: var(--vui-colors-disabled-border);\n\t\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\t}\n\t}\n\n\t", "\n"], ["\n\tcolor: white;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\tflex-shrink: 0;\n\tposition: relative;\n\n\t&[data-disabled='true'] {\n\t\tcursor: not-allowed;\n\n\t\t", " {\n\t\t\tborder-color: var(--vui-colors-disabled-border);\n\t\t\tbackground-color: var(--vui-colors-disabled-font);\n\t\t}\n\n\t\t", " {\n\t\t\t--x-ring-color: var(--vui-colors-disabled-border);\n\t\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\t}\n\t}\n\n\t", "\n"])), exports.SwitchThumb, exports.SwitchTrack, system_1.system);
78
78
  exports.SwitchButton = core_1.vui(function (props, ref) {
79
79
  var _a;
80
80
  var _b = (_a = context_1.useSwitch()) !== null && _a !== void 0 ? _a : {}, switchIsChecked = _b.isChecked, switchProps = __rest(_b, ["isChecked"]);
81
81
  var mergedProps = __assign(__assign({}, switchProps), props);
82
- var _c = core_1.omitThemingProps(mergedProps), checked = _c.checked, className = _c.className, defaultChecked = _c.defaultChecked, disabled = _c.disabled, innerLabelOff = _c.innerLabelOff, innerLabelOn = _c.innerLabelOn, inputProps = _c.inputProps, inputRef = _c.inputRef, name = _c.name, onBlur = _c.onBlur, onChange = _c.onChange, onFocus = _c.onFocus, required = _c.required, value = _c.value, rest = __rest(_c, ["checked", "className", "defaultChecked", "disabled", "innerLabelOff", "innerLabelOn", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "required", "value"]);
82
+ var _c = core_1.omitThemingProps(mergedProps), checked = _c.checked, className = _c.className, defaultChecked = _c.defaultChecked, disabled = _c.disabled, id = _c.id, innerLabelOff = _c.innerLabelOff, innerLabelOn = _c.innerLabelOn, inputProps = _c.inputProps, inputRef = _c.inputRef, name = _c.name, onBlur = _c.onBlur, onChange = _c.onChange, onFocus = _c.onFocus, required = _c.required, value = _c.value, rest = __rest(_c, ["checked", "className", "defaultChecked", "disabled", "id", "innerLabelOff", "innerLabelOn", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "required", "value"]);
83
83
  var _d = __read(react_1.useState(defaultChecked), 2), isChecked = _d[0], setIsChecked = _d[1];
84
84
  var _e = __read(react_1.useState(false), 2), isFocused = _e[0], setIsFocused = _e[1];
85
85
  var styles = core_1.useStyleConfig('Switch', mergedProps);
86
+ var _f = styles.button, thumbStyles = _f.thumb, trackStyles = _f.track, buttonStyles = __rest(_f, ["thumb", "track"]);
86
87
  var isControlled = checked !== undefined || switchIsChecked !== undefined;
87
88
  react_1.useEffect(function () {
88
89
  if (isControlled) {
@@ -101,31 +102,29 @@ exports.SwitchButton = core_1.vui(function (props, ref) {
101
102
  setIsFocused(true);
102
103
  onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
103
104
  }
104
- var hDiff = (styles.thumb.h - styles.track.h) / 2;
105
- var thumbOffset = "calc(100% - " + Math.abs(hDiff - styles.thumb.h) + "px)";
106
- var labelOffset = styles.thumb.h - hDiff + 4 + "px";
107
- var buttonProps = utils_1.filterUndefined({
105
+ var hDiff = (thumbStyles.h - trackStyles.h) / 2;
106
+ var thumbOffset = "calc(100% - " + Math.abs(hDiff - thumbStyles.h) + "px)";
107
+ var labelOffset = thumbStyles.h - hDiff + 4 + "px";
108
+ var buttonAliasedProps = utils_1.filterUndefined({
108
109
  'data-checked': isChecked ? true : false,
109
110
  'data-disabled': disabled ? true : false,
110
111
  'data-focused': isFocused ? true : false
111
112
  });
112
- var thumbProps = utils_1.filterUndefined({
113
+ var thumbAliasedProps = utils_1.filterUndefined({
113
114
  left: isChecked ? thumbOffset : -hDiff,
114
- ring: isFocused ? styles.thumb.ring : 0
115
+ ring: isFocused ? thumbStyles.ring : 0
115
116
  });
116
- var trackProps = utils_1.filterUndefined({
117
- bg: isChecked ? styles.track.bg : 'grey.50',
117
+ var trackAliasedProps = utils_1.filterUndefined({
118
+ bg: isChecked ? trackStyles.bg : 'grey.50',
118
119
  pl: isChecked ? 1 : labelOffset,
119
120
  pr: isChecked ? labelOffset : 1,
120
- ring: isFocused ? styles.track.ring : 0
121
+ ring: isFocused ? trackStyles.ring : disabled ? 1 : 0
121
122
  });
122
- return (react_1.default.createElement(exports.SwitchButtonBase, __assign({ className: utils_1.cs('vui-switchButton', className),
123
- // p={1}
124
- ref: ref }, styles.button, buttonProps, rest),
125
- react_1.default.createElement(exports.SwitchInput, __assign({ className: "vui-switchInput", onBlur: handleOnBlur, onChange: handleOnChange, onFocus: handleOnFocus, ref: inputRef, type: "checkbox" }, { checked: checked, defaultChecked: defaultChecked, disabled: disabled, name: name, required: required, value: value }, inputProps)),
126
- react_1.default.createElement(exports.SwitchTrack, __assign({ borderRadius: 100, className: "vui-switchTrack", transitionDuration: "fast" }, styles.track, trackProps),
123
+ return (react_1.default.createElement(exports.SwitchButtonBase, __assign({ className: utils_1.cs('vui-switchButton', className), ref: ref }, buttonStyles, buttonAliasedProps, rest),
124
+ react_1.default.createElement(exports.SwitchInput, __assign({ className: "vui-switchInput", onBlur: handleOnBlur, onChange: handleOnChange, onFocus: handleOnFocus, ref: inputRef, type: "checkbox" }, { checked: checked, defaultChecked: defaultChecked, disabled: disabled, id: id, name: name, required: required, value: value }, inputProps)),
125
+ react_1.default.createElement(exports.SwitchTrack, __assign({ borderRadius: "round", className: "vui-switchTrack", transitionDuration: "fast" }, trackStyles, trackAliasedProps),
127
126
  !isChecked && innerLabelOff,
128
- react_1.default.createElement(exports.SwitchThumb, __assign({ borderRadius: "50%", className: "vui-switchThumb", transitionDuration: "fast" }, styles.thumb, thumbProps)),
127
+ react_1.default.createElement(exports.SwitchThumb, __assign({ borderRadius: "round", className: "vui-switchThumb", transitionDuration: "fast" }, thumbStyles, thumbAliasedProps)),
129
128
  isChecked && innerLabelOn)));
130
129
  });
131
130
  exports.SwitchButton.displayName = 'SwitchButton';
package/switch/theme.d.ts CHANGED
@@ -1,71 +1,67 @@
1
1
  import { Dict } from '../utils';
2
- declare function sizeLg(props: Dict): {
2
+ declare function sizeLg(): {
3
+ container: {};
3
4
  button: {
4
5
  fontSize: string;
6
+ minW: number;
7
+ thumb: {
8
+ h: number;
9
+ w: number;
10
+ };
11
+ track: {
12
+ h: number;
13
+ };
5
14
  };
6
15
  label: {
7
16
  size: string;
8
17
  };
9
- thumb: {
10
- h: number;
11
- w: number;
12
- };
13
- track: {
14
- h: number;
15
- minW: number;
16
- };
17
18
  };
18
- declare function sizeMd(props: Dict): {
19
+ declare function sizeMd(): {
20
+ container: {};
19
21
  button: {
20
22
  fontSize: string;
23
+ minW: number;
24
+ thumb: {
25
+ h: number;
26
+ w: number;
27
+ };
28
+ track: {
29
+ h: number;
30
+ };
21
31
  };
22
32
  label: {
23
33
  size: string;
24
34
  };
25
- thumb: {
26
- h: number;
27
- w: number;
28
- };
29
- track: {
30
- h: number;
31
- minW: number;
32
- };
33
35
  };
34
- declare function sizeSm(props: Dict): {
36
+ declare function sizeSm(): {
37
+ container: {};
35
38
  button: {
36
39
  fontSize: string;
40
+ minW: number;
41
+ thumb: {
42
+ h: number;
43
+ w: number;
44
+ };
45
+ track: {
46
+ h: number;
47
+ };
37
48
  };
38
49
  label: {
39
50
  size: string;
40
51
  };
41
- thumb: {
42
- h: number;
43
- w: number;
44
- };
45
- track: {
46
- h: number;
47
- minW: number;
48
- };
49
52
  };
50
53
  declare function variantContained(props: Dict): {
51
- thumb: {
52
- bg: string;
53
- };
54
- track: {
55
- bg: string;
56
- ring: number;
57
- };
58
- };
59
- declare function variantThin(props: Dict): {
60
- thumb: {
61
- bg: string;
62
- borderColor: string;
63
- borderWidth: number;
64
- ring: number;
65
- };
66
- track: {
67
- bg: string;
68
- };
54
+ container: {};
55
+ button: {
56
+ thumb: {
57
+ bg: string;
58
+ };
59
+ track: {
60
+ bg: string;
61
+ ring: number;
62
+ };
63
+ };
64
+ label: {};
69
65
  };
70
66
  declare const _default: {
71
67
  defaultProps: {
@@ -81,7 +77,6 @@ declare const _default: {
81
77
  };
82
78
  variants: {
83
79
  contained: typeof variantContained;
84
- thin: typeof variantThin;
85
80
  };
86
81
  };
87
82
  export default _default;