@invoicebox/ui 0.1.0-alpha.110 → 0.1.0-alpha.112
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/dist/components/common/AppCardLink/index.d.ts +1 -2
- package/dist/components/common/AppCardLink/index.js +3 -4
- package/dist/components/common/AppCardLink/index.stories.js +2 -3
- package/dist/components/common/InvoiceboxLogo/index.d.ts +1 -2
- package/dist/components/common/InvoiceboxLogo/index.js +3 -4
- package/dist/components/common/InvoiceboxLogo/index.stories.js +2 -3
- package/dist/components/form/TextInput/index.d.ts +10 -0
- package/dist/components/form/TextInput/index.js +55 -0
- package/dist/components/form/TextInput/index.stories.d.ts +5 -0
- package/dist/components/form/TextInput/index.stories.js +49 -0
- package/dist/components/form/TextInput/styles.d.ts +3 -0
- package/dist/components/form/TextInput/styles.js +16 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +21 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports
|
|
7
|
+
exports.AppCardLink = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _GooglePlayRu = _interopRequireDefault(require("./components/GooglePlayRu"));
|
|
10
10
|
var _ApkRu = _interopRequireDefault(require("./components/ApkRu"));
|
|
@@ -14,7 +14,7 @@ var S = _interopRequireWildcard(require("./styles"));
|
|
|
14
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
15
|
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 && Object.prototype.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; }
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
-
var AppCardLink = function AppCardLink(_ref) {
|
|
17
|
+
var AppCardLink = exports.AppCardLink = function AppCardLink(_ref) {
|
|
18
18
|
var height = _ref.height,
|
|
19
19
|
variant = _ref.variant,
|
|
20
20
|
href = _ref.href;
|
|
@@ -31,5 +31,4 @@ var AppCardLink = function AppCardLink(_ref) {
|
|
|
31
31
|
}, /*#__PURE__*/_react["default"].createElement(AppCardComponent, {
|
|
32
32
|
height: height
|
|
33
33
|
}));
|
|
34
|
-
};
|
|
35
|
-
var _default = exports["default"] = AppCardLink;
|
|
34
|
+
};
|
|
@@ -4,11 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.Default = void 0;
|
|
7
|
-
var _ =
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
7
|
+
var _ = require(".");
|
|
9
8
|
var meta = {
|
|
10
9
|
title: 'common/AppCardLink',
|
|
11
|
-
component: _
|
|
10
|
+
component: _.AppCardLink,
|
|
12
11
|
tags: ['autodocs']
|
|
13
12
|
};
|
|
14
13
|
var _default = exports["default"] = meta;
|
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.InvoiceboxLogo = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _LogoDarkRu = _interopRequireDefault(require("./components/LogoDarkRu"));
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
-
var InvoiceboxLogo = function InvoiceboxLogo(_ref) {
|
|
10
|
+
var InvoiceboxLogo = exports.InvoiceboxLogo = function InvoiceboxLogo(_ref) {
|
|
11
11
|
var height = _ref.height;
|
|
12
12
|
return /*#__PURE__*/_react["default"].createElement(_LogoDarkRu["default"], {
|
|
13
13
|
height: height
|
|
14
14
|
});
|
|
15
|
-
};
|
|
16
|
-
var _default = exports["default"] = InvoiceboxLogo;
|
|
15
|
+
};
|
|
@@ -4,11 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.Default = void 0;
|
|
7
|
-
var _ =
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
7
|
+
var _ = require(".");
|
|
9
8
|
var meta = {
|
|
10
9
|
title: 'common/InvoiceboxLogo',
|
|
11
|
-
component: _
|
|
10
|
+
component: _.InvoiceboxLogo,
|
|
12
11
|
tags: ['autodocs']
|
|
13
12
|
};
|
|
14
13
|
var _default = exports["default"] = meta;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { TProps as TInputLabelProps } from '../InputLabel';
|
|
3
|
+
import { TProps as TPureInputProps } from '../PureInput';
|
|
4
|
+
export type TProps = Pick<TInputLabelProps, 'label'> & Pick<TPureInputProps, 'placeholder' | 'hasError' | 'onFocus' | 'onBlur' | 'disabled' | 'name' | 'paddingRight'> & {
|
|
5
|
+
value: string;
|
|
6
|
+
onChange: (value: string) => void;
|
|
7
|
+
maxLength?: number;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export declare const TextInput: FC<TProps>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.TextInput = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var S = _interopRequireWildcard(require("./styles"));
|
|
10
|
+
var _InputLabel = require("../InputLabel");
|
|
11
|
+
var _PureInput = require("../PureInput");
|
|
12
|
+
var _useInputFocus2 = require("../../../hooks/useInputFocus");
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
|
+
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 && Object.prototype.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; }
|
|
15
|
+
var TextInput = exports.TextInput = function TextInput(_ref) {
|
|
16
|
+
var _ref$hasError = _ref.hasError,
|
|
17
|
+
hasError = _ref$hasError === void 0 ? false : _ref$hasError,
|
|
18
|
+
onFocus = _ref.onFocus,
|
|
19
|
+
onBlur = _ref.onBlur,
|
|
20
|
+
value = _ref.value,
|
|
21
|
+
onChange = _ref.onChange,
|
|
22
|
+
label = _ref.label,
|
|
23
|
+
name = _ref.name,
|
|
24
|
+
maxLength = _ref.maxLength,
|
|
25
|
+
disabled = _ref.disabled,
|
|
26
|
+
placeholder = _ref.placeholder,
|
|
27
|
+
paddingRight = _ref.paddingRight,
|
|
28
|
+
children = _ref.children;
|
|
29
|
+
var _useInputFocus = (0, _useInputFocus2.useInputFocus)({
|
|
30
|
+
onFocus: onFocus,
|
|
31
|
+
onBlur: onBlur
|
|
32
|
+
}),
|
|
33
|
+
inFocus = _useInputFocus.inFocus,
|
|
34
|
+
handleFocus = _useInputFocus.handleFocus,
|
|
35
|
+
handleBlur = _useInputFocus.handleBlur;
|
|
36
|
+
var handleChange = (0, _react.useCallback)(function (event) {
|
|
37
|
+
onChange(event.target.value.slice(0, maxLength !== null && maxLength !== void 0 ? maxLength : Infinity));
|
|
38
|
+
}, [onChange, maxLength]);
|
|
39
|
+
return /*#__PURE__*/_react["default"].createElement(_InputLabel.InputLabel, {
|
|
40
|
+
inFocus: inFocus,
|
|
41
|
+
label: label,
|
|
42
|
+
disabled: disabled
|
|
43
|
+
}, /*#__PURE__*/_react["default"].createElement(S.InputLabelContent, null, /*#__PURE__*/_react["default"].createElement(_PureInput.PureInput, {
|
|
44
|
+
name: name,
|
|
45
|
+
disabled: disabled,
|
|
46
|
+
hasError: hasError,
|
|
47
|
+
inFocus: inFocus,
|
|
48
|
+
onFocus: handleFocus,
|
|
49
|
+
onBlur: handleBlur,
|
|
50
|
+
value: value,
|
|
51
|
+
onChange: handleChange,
|
|
52
|
+
placeholder: placeholder,
|
|
53
|
+
paddingRight: paddingRight
|
|
54
|
+
}), children && /*#__PURE__*/_react["default"].createElement(S.ChildrenWrapper, null, children)));
|
|
55
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = exports.Default = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _addonActions = require("@storybook/addon-actions");
|
|
10
|
+
var _ = require(".");
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
12
|
+
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 && Object.prototype.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; }
|
|
13
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
18
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
19
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
+
var meta = {
|
|
21
|
+
title: 'form/TextInput',
|
|
22
|
+
component: _.TextInput,
|
|
23
|
+
tags: ['autodocs']
|
|
24
|
+
};
|
|
25
|
+
var _default = exports["default"] = meta;
|
|
26
|
+
var Component = function Component(props) {
|
|
27
|
+
var _useState = (0, _react.useState)(''),
|
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
+
value = _useState2[0],
|
|
30
|
+
setValue = _useState2[1];
|
|
31
|
+
return /*#__PURE__*/_react["default"].createElement(_.TextInput, _extends({}, props, {
|
|
32
|
+
value: value,
|
|
33
|
+
onChange: setValue
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
36
|
+
var Default = exports.Default = {
|
|
37
|
+
args: {
|
|
38
|
+
hasError: false,
|
|
39
|
+
label: 'Label',
|
|
40
|
+
name: 'name',
|
|
41
|
+
onBlur: (0, _addonActions.action)('blur'),
|
|
42
|
+
onFocus: (0, _addonActions.action)('focus'),
|
|
43
|
+
maxLength: 30,
|
|
44
|
+
placeholder: 'Placeholder',
|
|
45
|
+
disabled: false,
|
|
46
|
+
children: /*#__PURE__*/_react["default"].createElement("div", null, "Children")
|
|
47
|
+
},
|
|
48
|
+
render: Component
|
|
49
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ChildrenWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
3
|
+
export declare const InputLabelContent: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.InputLabelContent = exports.ChildrenWrapper = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
+
var ChildrenWrapper = exports.ChildrenWrapper = _styledComponents["default"].div.withConfig({
|
|
10
|
+
displayName: "styles__ChildrenWrapper",
|
|
11
|
+
componentId: "sc-7b8uh6-0"
|
|
12
|
+
})(["position:absolute;right:12px;top:50%;transform:translateY(-50%);display:flex;justify-content:center;align-items:center;"]);
|
|
13
|
+
var InputLabelContent = exports.InputLabelContent = _styledComponents["default"].div.withConfig({
|
|
14
|
+
displayName: "styles__InputLabelContent",
|
|
15
|
+
componentId: "sc-7b8uh6-1"
|
|
16
|
+
})(["position:relative;"]);
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export { InputLabel } from './components/form/InputLabel';
|
|
|
8
8
|
export { PureInput } from './components/form/PureInput';
|
|
9
9
|
export { PositiveIntegerInput } from './components/form/PositiveIntegerInput';
|
|
10
10
|
export type { TProps as TPositiveIntegerInputProps } from './components/form/PositiveIntegerInput';
|
|
11
|
+
export { TextInput } from './components/form/TextInput';
|
|
12
|
+
export type { TProps as TTextInputProps } from './components/form/TextInput';
|
|
11
13
|
export { Dropdown } from './components/common/Dropdown';
|
|
12
14
|
export type { TProps as TDropdownProps } from './components/common/Dropdown';
|
|
13
15
|
export { Scrollbar } from './components/common/Scrollbar';
|
|
@@ -33,6 +35,8 @@ export { phoneLogic } from './components/form/PhoneInput/externalPhoneLogic';
|
|
|
33
35
|
export { BgCard } from './components/common/BgCard';
|
|
34
36
|
export { ToastContainer, toast } from './components/common/Toast';
|
|
35
37
|
export { PaymentCard } from './components/payment/PaymentCard';
|
|
38
|
+
export { AppCardLink } from './components/common/AppCardLink';
|
|
39
|
+
export { InvoiceboxLogo } from './components/common/InvoiceboxLogo';
|
|
36
40
|
export { PaletteProvider, defaultAbstractPalette } from './palette';
|
|
37
41
|
export type { TAbstractPalette } from './palette';
|
|
38
42
|
export { useOutsideClick } from './hooks/useOutsideClick';
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "AppCardLink", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _AppCardLink.AppCardLink;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "Arrow", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function get() {
|
|
@@ -63,6 +69,12 @@ Object.defineProperty(exports, "InvoiceboxLoader", {
|
|
|
63
69
|
return _InvoiceboxLoader.InvoiceboxLoader;
|
|
64
70
|
}
|
|
65
71
|
});
|
|
72
|
+
Object.defineProperty(exports, "InvoiceboxLogo", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function get() {
|
|
75
|
+
return _InvoiceboxLogo.InvoiceboxLogo;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
66
78
|
Object.defineProperty(exports, "InvoiceboxSpinner", {
|
|
67
79
|
enumerable: true,
|
|
68
80
|
get: function get() {
|
|
@@ -129,6 +141,12 @@ Object.defineProperty(exports, "Skeleton", {
|
|
|
129
141
|
return _Skeleton.Skeleton;
|
|
130
142
|
}
|
|
131
143
|
});
|
|
144
|
+
Object.defineProperty(exports, "TextInput", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function get() {
|
|
147
|
+
return _TextInput.TextInput;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
132
150
|
Object.defineProperty(exports, "ToastContainer", {
|
|
133
151
|
enumerable: true,
|
|
134
152
|
get: function get() {
|
|
@@ -222,6 +240,7 @@ var _Arrow = require("./components/common/Arrow");
|
|
|
222
240
|
var _InputLabel = require("./components/form/InputLabel");
|
|
223
241
|
var _PureInput = require("./components/form/PureInput");
|
|
224
242
|
var _PositiveIntegerInput = require("./components/form/PositiveIntegerInput");
|
|
243
|
+
var _TextInput = require("./components/form/TextInput");
|
|
225
244
|
var _Dropdown = require("./components/common/Dropdown");
|
|
226
245
|
var _Scrollbar = require("./components/common/Scrollbar");
|
|
227
246
|
var _Select = require("./components/form/Select");
|
|
@@ -237,6 +256,8 @@ var _externalPhoneLogic = require("./components/form/PhoneInput/externalPhoneLog
|
|
|
237
256
|
var _BgCard = require("./components/common/BgCard");
|
|
238
257
|
var _Toast = require("./components/common/Toast");
|
|
239
258
|
var _PaymentCard = require("./components/payment/PaymentCard");
|
|
259
|
+
var _AppCardLink = require("./components/common/AppCardLink");
|
|
260
|
+
var _InvoiceboxLogo = require("./components/common/InvoiceboxLogo");
|
|
240
261
|
var _palette = require("./palette");
|
|
241
262
|
var _useOutsideClick = require("./hooks/useOutsideClick");
|
|
242
263
|
var _useInputFocus = require("./hooks/useInputFocus");
|