@cashub/ui 0.44.0 → 0.44.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/button/Button.js CHANGED
@@ -7,14 +7,14 @@ exports.default = void 0;
7
7
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
8
8
  var _backgroundColor = _interopRequireDefault(require("../styles/mixin/backgroundColor"));
9
9
  var _colorOnBackground = _interopRequireDefault(require("../styles/mixin/colorOnBackground"));
10
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
10
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
13
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
14
  function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
15
15
  const Button = _styledComponents.default.button.attrs(() => ({
16
16
  primary: true
17
- }))(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n border: none;\n font-size: var(--font-button);\n line-height: var(--font-body1);\n cursor: ", ";\n border-radius: var(--border-radius-l);\n padding: 10px var(--spacing-s);\n text-transform: uppercase;\n\n > svg {\n margin-right: calc(var(--spacing-s) - 0.25rem);\n font-size: var(--font-body1);\n }\n\n &:hover {\n ", "\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), _ref => {
17
+ }))(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n border: none;\n font-size: var(--font-button);\n line-height: var(--font-body1);\n cursor: ", ";\n border-radius: var(--border-radius-l);\n padding: 10px var(--spacing-s);\n text-transform: uppercase;\n\n > svg {\n margin-right: calc(var(--spacing-s) - 0.25rem);\n font-size: var(--font-body1);\n }\n\n &:hover {\n ", "\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), _ref => {
18
18
  let {
19
19
  disabled
20
20
  } = _ref;
@@ -59,5 +59,10 @@ const Button = _styledComponents.default.button.attrs(() => ({
59
59
  filterFocus
60
60
  } = _ref9;
61
61
  return filterFocus && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n border: 2px solid var(--color-danger);\n "])));
62
+ }, _ref10 => {
63
+ let {
64
+ variant
65
+ } = _ref10;
66
+ return variant === 'link' && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background: transparent;\n color: var(--color-primary);\n border: none;\n padding: 0;\n text-decoration: underline;\n text-transform: none;\n\n &:hover {\n opacity: 0.8;\n box-shadow: none;\n }\n "])));
62
67
  });
63
68
  var _default = exports.default = Button;
@@ -8,7 +8,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
8
  var _templateObject;
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
10
  function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
11
- const FlexContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n\n ", ";\n\n ", ";\n\n ", "\n"])), _ref => {
11
+ const FlexContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n\n ", ";\n\n ", ";\n\n ", "\n\n ", "\n"])), _ref => {
12
12
  let {
13
13
  marginBottom
14
14
  } = _ref;
@@ -23,5 +23,10 @@ const FlexContainer = _styledComponents.default.div(_templateObject || (_templat
23
23
  alignCenter
24
24
  } = _ref3;
25
25
  return alignCenter && 'align-items: center;';
26
+ }, _ref4 => {
27
+ let {
28
+ spaceBetween
29
+ } = _ref4;
30
+ return spaceBetween && 'justify-content: space-between;';
26
31
  });
27
32
  var _default = exports.default = FlexContainer;
@@ -152,9 +152,7 @@ const FileDropzone = _ref => {
152
152
  if (onUploading) {
153
153
  try {
154
154
  await onUploading(file, file.name, index);
155
- setSuccessCount(previous => {
156
- return previous + 1;
157
- });
155
+ setSuccessCount(1);
158
156
  } catch (error) {
159
157
  setHasFail(true);
160
158
  setFailUploadIndexes(previous => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cashub/ui",
3
- "version": "0.44.0",
3
+ "version": "0.44.2",
4
4
  "private": false,
5
5
  "author": "CasHUB Team",
6
6
  "description": "CasHUB UI components library",