fuse-importer 0.21.0 → 0.23.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/README.md +259 -0
- package/lib/esm/Importer/ImporterContextProvider.d.ts +31 -4
- package/lib/esm/Importer/ImporterContextProvider.js +40 -33
- package/lib/esm/Importer/Matcher/index.js +6 -5
- package/lib/esm/Importer/PreviewModeBanner.d.ts +2 -0
- package/lib/esm/Importer/PreviewModeBanner.js +20 -0
- package/lib/esm/Importer/Review/index.js +14 -18
- package/lib/esm/Importer/SpreadsheetReviewContextProvider.js +1 -1
- package/lib/esm/Importer/Stepper.js +10 -3
- package/lib/esm/Importer/Uploader/DragAndDropImporter/ImporterDropzone.js +4 -1
- package/lib/esm/Importer/Uploader/HeadersPreview.js +19 -17
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider.js +7 -5
- package/lib/esm/Importer/common/Spreadsheet/common/FieldHeader.d.ts +7 -0
- package/lib/esm/Importer/common/Spreadsheet/common/FieldHeader.js +31 -0
- package/lib/esm/Importer/common/Spreadsheet/common/fields/SpeadsheetAutocomplete.d.ts +11 -6
- package/lib/esm/Importer/common/Spreadsheet/common/fields/SpeadsheetAutocomplete.js +6 -7
- package/lib/esm/Importer/common/Spreadsheet/common/fields/SpreadsheetInput.d.ts +4 -4
- package/lib/esm/Importer/common/Spreadsheet/common/fields/SpreadsheetInput.js +4 -5
- package/lib/esm/Importer/common/Spreadsheet/common/fields/index.d.ts +6 -5
- package/lib/esm/Importer/common/Spreadsheet/common/fields/index.js +14 -6
- package/lib/esm/Importer/common/Spreadsheet/common/index.d.ts +3 -0
- package/lib/esm/Importer/common/Spreadsheet/common/index.js +53 -9
- package/lib/esm/Importer/common/Spreadsheet/index.js +28 -57
- package/lib/esm/Importer/common/Spreadsheet/inputs/Boolean.d.ts +3 -0
- package/lib/esm/Importer/common/Spreadsheet/inputs/Boolean.js +18 -0
- package/lib/esm/Importer/common/Spreadsheet/inputs/EmailInput.d.ts +3 -0
- package/lib/esm/Importer/common/Spreadsheet/inputs/EmailInput.js +14 -0
- package/lib/esm/Importer/common/Spreadsheet/inputs/EnumInput.d.ts +6 -0
- package/lib/esm/Importer/common/Spreadsheet/inputs/EnumInput.js +30 -0
- package/lib/esm/Importer/common/Spreadsheet/inputs/FloatInput.d.ts +3 -0
- package/lib/esm/Importer/common/Spreadsheet/inputs/FloatInput.js +16 -0
- package/lib/esm/Importer/common/Spreadsheet/inputs/IntegerInput.d.ts +3 -0
- package/lib/esm/Importer/common/Spreadsheet/inputs/IntegerInput.js +16 -0
- package/lib/esm/Importer/common/Spreadsheet/inputs/StringInput.d.ts +3 -0
- package/lib/esm/Importer/common/Spreadsheet/inputs/StringInput.js +14 -0
- package/lib/esm/Importer/common/Spreadsheet/inputs/index.d.ts +13 -0
- package/lib/esm/Importer/common/Spreadsheet/inputs/index.js +20 -0
- package/lib/esm/Importer/common/index.d.ts +2 -2
- package/lib/esm/Importer/common/index.js +2 -2
- package/lib/esm/Importer/index.d.ts +1 -0
- package/lib/esm/Importer/index.js +3 -4
- package/lib/esm/Importer/theme.d.ts +225 -0
- package/lib/esm/Importer/theme.js +18 -0
- package/lib/esm/common/buttons.d.ts +15 -5
- package/lib/esm/common/buttons.js +13 -11
- package/lib/esm/common/index.js +1 -1
- package/lib/esm/common/inputs/Autocomplete.d.ts +2 -2
- package/lib/esm/common/inputs/TextInput.js +8 -1
- package/lib/esm/common/logo.js +1 -1
- package/lib/esm/styled/themeType.d.ts +1 -1
- package/lib/esm/styled/utils.d.ts +3 -0
- package/lib/esm/styled/utils.js +4 -3
- package/lib/esm/types.d.ts +7 -2
- package/lib/esm/types.js +4 -1
- package/lib/main.js +1 -1
- package/package.json +2 -2
- package/lib/esm/Importer/useCustomImporter.d.ts +0 -4
- package/lib/esm/Importer/useCustomImporter.js +0 -81
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { useMemo } from "react";
|
|
25
|
+
import { SpreadsheetAutocomplete, } from "../common/fields/SpeadsheetAutocomplete";
|
|
26
|
+
export var EnumInput = function (_a) {
|
|
27
|
+
var options = _a.options, props = __rest(_a, ["options"]);
|
|
28
|
+
var mapped = useMemo(function () { return options === null || options === void 0 ? void 0 : options.map(function (o) { return ({ label: o, value: o }); }); }, [options]);
|
|
29
|
+
return _jsx(SpreadsheetAutocomplete, __assign({}, props, { options: mapped }));
|
|
30
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { SpreadsheetInput, } from "../common/fields/SpreadsheetInput";
|
|
14
|
+
export var FloatInput = function (props) {
|
|
15
|
+
return _jsx(SpreadsheetInput, __assign({}, props, { type: "text" }));
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { SpreadsheetInput, } from "../common/fields/SpreadsheetInput";
|
|
14
|
+
export var IntegerInput = function (props) {
|
|
15
|
+
return _jsx(SpreadsheetInput, __assign({}, props, { type: "text", step: "1" }));
|
|
16
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { SpreadsheetInput, } from "../common/fields/SpreadsheetInput";
|
|
14
|
+
export var StringInput = function (props) { return (_jsx(SpreadsheetInput, __assign({}, props, { type: "text" }))); };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const inputTypes: {
|
|
3
|
+
boolean: import("react").FC<import("../common/fields/SpeadsheetAutocomplete").SpreadsheetAutocompleteProps>;
|
|
4
|
+
email: import("react").FC<import("../common/fields/SpreadsheetInput").SpreadsheetTextInputArgs>;
|
|
5
|
+
enum: import("react").FC<import("./EnumInput").EnumInputProps>;
|
|
6
|
+
float: import("react").FC<import("../common/fields/SpreadsheetInput").SpreadsheetTextInputArgs>;
|
|
7
|
+
integer: import("react").FC<import("../common/fields/SpreadsheetInput").SpreadsheetTextInputArgs>;
|
|
8
|
+
string: import("react").FC<import("../common/fields/SpreadsheetInput").SpreadsheetTextInputArgs>;
|
|
9
|
+
url: import("react").FC<import("../common/fields/SpreadsheetInput").SpreadsheetTextInputArgs>;
|
|
10
|
+
date: import("react").FC<import("../common/fields/SpreadsheetInput").SpreadsheetTextInputArgs>;
|
|
11
|
+
datetime: import("react").FC<import("../common/fields/SpreadsheetInput").SpreadsheetTextInputArgs>;
|
|
12
|
+
time: import("react").FC<import("../common/fields/SpreadsheetInput").SpreadsheetTextInputArgs>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import { FieldTypes } from "../../../../types";
|
|
3
|
+
import { BooleanInput } from "./Boolean";
|
|
4
|
+
import { EmailInput } from "./EmailInput";
|
|
5
|
+
import { EnumInput } from "./EnumInput";
|
|
6
|
+
import { FloatInput } from "./FloatInput";
|
|
7
|
+
import { IntegerInput } from "./IntegerInput";
|
|
8
|
+
import { StringInput } from "./StringInput";
|
|
9
|
+
export var inputTypes = (_a = {},
|
|
10
|
+
_a[FieldTypes.boolean] = BooleanInput,
|
|
11
|
+
_a[FieldTypes.email] = EmailInput,
|
|
12
|
+
_a[FieldTypes.enum] = EnumInput,
|
|
13
|
+
_a[FieldTypes.float] = FloatInput,
|
|
14
|
+
_a[FieldTypes.integer] = IntegerInput,
|
|
15
|
+
_a[FieldTypes.string] = StringInput,
|
|
16
|
+
_a[FieldTypes.url] = StringInput,
|
|
17
|
+
_a[FieldTypes.date] = StringInput,
|
|
18
|
+
_a[FieldTypes.datetime] = StringInput,
|
|
19
|
+
_a[FieldTypes.time] = StringInput,
|
|
20
|
+
_a);
|
|
@@ -8,8 +8,8 @@ declare type GetTableHeightArgs = {
|
|
|
8
8
|
headerHeight: number;
|
|
9
9
|
rowHeight: number;
|
|
10
10
|
maxVisibleRows: number;
|
|
11
|
-
|
|
11
|
+
minimumTableHeight?: number;
|
|
12
12
|
dataCount: number;
|
|
13
13
|
};
|
|
14
|
-
export declare const getTableHeight: ({ headerHeight, rowHeight, maxVisibleRows,
|
|
14
|
+
export declare const getTableHeight: ({ headerHeight, rowHeight, maxVisibleRows, minimumTableHeight, dataCount, }: GetTableHeightArgs) => number;
|
|
15
15
|
export {};
|
|
@@ -8,6 +8,6 @@ export var baseUrls = {
|
|
|
8
8
|
};
|
|
9
9
|
var MINIMUM_TABLE_HEIGHT = 375;
|
|
10
10
|
export var getTableHeight = function (_a) {
|
|
11
|
-
var _b = _a.headerHeight, headerHeight = _b === void 0 ? defaultTableHeaderHeightPx : _b, _c = _a.rowHeight, rowHeight = _c === void 0 ? defaultTableRowHeightPx : _c, _d = _a.maxVisibleRows, maxVisibleRows = _d === void 0 ? 7 : _d, _e = _a.
|
|
12
|
-
return Math.max(headerHeight + rowHeight * Math.min(dataCount, maxVisibleRows + 0.5),
|
|
11
|
+
var _b = _a.headerHeight, headerHeight = _b === void 0 ? defaultTableHeaderHeightPx : _b, _c = _a.rowHeight, rowHeight = _c === void 0 ? defaultTableRowHeightPx : _c, _d = _a.maxVisibleRows, maxVisibleRows = _d === void 0 ? 7 : _d, _e = _a.minimumTableHeight, minimumTableHeight = _e === void 0 ? MINIMUM_TABLE_HEIGHT : _e, dataCount = _a.dataCount;
|
|
12
|
+
return Math.max(headerHeight + rowHeight * Math.min(dataCount, maxVisibleRows + 0.5), minimumTableHeight);
|
|
13
13
|
};
|
|
@@ -13,6 +13,7 @@ declare type Props = {
|
|
|
13
13
|
onValidateBatch?: OnValidateBatch;
|
|
14
14
|
onSubmit?: OnSubmit;
|
|
15
15
|
onClose: any;
|
|
16
|
+
previewMode?: boolean;
|
|
16
17
|
};
|
|
17
18
|
declare const Importer: ({ templateSlug, apiToken, onSubmit, onValidateRecord, onValidateBatch, formatRecord, options, onClose, }: Props) => JSX.Element;
|
|
18
19
|
export * from "./common/Spreadsheet";
|
|
@@ -23,12 +23,12 @@ import { GlobalStyle } from "./GlobalStyle";
|
|
|
23
23
|
import { ImporterContextProvider, useImporterContext, } from "./ImporterContextProvider";
|
|
24
24
|
import { ImporterFonts } from "./ImporterFonts";
|
|
25
25
|
import { Matcher } from "./Matcher";
|
|
26
|
+
import { PreviewModeBanner } from "./PreviewModeBanner";
|
|
26
27
|
import Review from "./Review";
|
|
27
28
|
import { SpreadsheetReviewContextProvider } from "./SpreadsheetReviewContextProvider";
|
|
28
29
|
import { Stepper } from "./Stepper";
|
|
29
30
|
import { TrialModeBanner } from "./TrialModeBanner";
|
|
30
31
|
import { Uploader } from "./Uploader";
|
|
31
|
-
import { useCustomImporter } from "./useCustomImporter";
|
|
32
32
|
import { useFullscreenOverlay } from "./useFullscreenOverlay";
|
|
33
33
|
var Content = styled(Div)(function (_a) {
|
|
34
34
|
var _b = _a.theme, colors = _b.colors, c = _b.css;
|
|
@@ -64,13 +64,12 @@ var Importer = function (_a) {
|
|
|
64
64
|
};
|
|
65
65
|
var ImporterWithContext = function (_a) {
|
|
66
66
|
var onSubmit = _a.onSubmit;
|
|
67
|
-
var _b =
|
|
68
|
-
var _c = useImporterContext(), inTrialMode = _c.inTrialMode, currentStepIndex = _c.currentStepIndex, matcherSubstep = _c.matcherSubstep, zIndex = _c.importerOptions.zIndex;
|
|
67
|
+
var _b = useImporterContext(), inTrialMode = _b.inTrialMode, currentStepIndex = _b.currentStepIndex, matcherSubstep = _b.matcherSubstep, theme = _b.theme, logoURL = _b.logoURL, zIndex = _b.importerOptions.zIndex;
|
|
69
68
|
var layoutRef = useRef(null);
|
|
70
69
|
useEffect(function () {
|
|
71
70
|
layoutRef.current.scrollTo(0, 0);
|
|
72
71
|
}, [currentStepIndex, matcherSubstep]);
|
|
73
|
-
return (_jsxs(ThemeProvider, __assign({ theme: theme }, { children: [_jsx(Toast, {}), _jsx(GlobalStyle, {}), _jsx(ImporterFonts, {}), _jsx(SpreadsheetReviewContextProvider, __assign({ onSubmit: onSubmit }, { children: _jsxs(Layout, __assign({ zIndex: zIndex, ref: layoutRef }, { children: [_jsxs(Div, { children: [_jsx(TrialModeBanner, {}), _jsx(Stepper, { stepLabels: steps.map(function (step) { return step.label; }), logoURL: logoURL })] }), _jsx(Content, { children: steps[currentStepIndex].component }), inTrialMode && (_jsx(Content, { children: _jsx(Footer, {}) }))] })) }))] })));
|
|
72
|
+
return (_jsxs(ThemeProvider, __assign({ theme: theme }, { children: [_jsx(Toast, {}), _jsx(GlobalStyle, {}), _jsx(ImporterFonts, {}), _jsx(SpreadsheetReviewContextProvider, __assign({ onSubmit: onSubmit }, { children: _jsxs(Layout, __assign({ zIndex: zIndex, ref: layoutRef }, { children: [_jsxs(Div, { children: [_jsx(PreviewModeBanner, {}), _jsx(TrialModeBanner, {}), _jsx(Stepper, { stepLabels: steps.map(function (step) { return step.label; }), logoURL: logoURL })] }), _jsx(Content, { children: steps[currentStepIndex].component }), inTrialMode && (_jsx(Content, { children: _jsx(Footer, {}) }))] })) }))] })));
|
|
74
73
|
};
|
|
75
74
|
export * from "./common/Spreadsheet";
|
|
76
75
|
export * from "./common/utils";
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { theme } from "../styled/theme";
|
|
2
|
+
export declare type ImporterStylePreferences = {
|
|
3
|
+
id: number;
|
|
4
|
+
background: string;
|
|
5
|
+
highlight1: string;
|
|
6
|
+
highlight2: string;
|
|
7
|
+
primary_color: string;
|
|
8
|
+
secondary_color: string;
|
|
9
|
+
logo_url: string;
|
|
10
|
+
};
|
|
11
|
+
export declare type Theme = typeof theme;
|
|
12
|
+
declare const getCustomTheme: (importerStylePreferences: ImporterStylePreferences) => {
|
|
13
|
+
theme: {
|
|
14
|
+
colors: {
|
|
15
|
+
backgroundInterface: string;
|
|
16
|
+
interactiveDisabled: string;
|
|
17
|
+
error: string;
|
|
18
|
+
warning01: string;
|
|
19
|
+
highlight01: string;
|
|
20
|
+
tableHeader: string;
|
|
21
|
+
outlineInputs: string;
|
|
22
|
+
text: string;
|
|
23
|
+
textPrim: string;
|
|
24
|
+
textSec: string;
|
|
25
|
+
textTert: string;
|
|
26
|
+
textLink: string;
|
|
27
|
+
placeholder: string;
|
|
28
|
+
disabled1: string;
|
|
29
|
+
disabled2: string;
|
|
30
|
+
disabled3: string;
|
|
31
|
+
background: string;
|
|
32
|
+
red: string;
|
|
33
|
+
black: string;
|
|
34
|
+
gold: string;
|
|
35
|
+
pink100: string;
|
|
36
|
+
pink300: string;
|
|
37
|
+
pink500: string;
|
|
38
|
+
pink700: string;
|
|
39
|
+
pink900: string;
|
|
40
|
+
white: string;
|
|
41
|
+
white50: string;
|
|
42
|
+
red50: string;
|
|
43
|
+
red100: string;
|
|
44
|
+
red200: string;
|
|
45
|
+
red300: string;
|
|
46
|
+
red400: string;
|
|
47
|
+
red500: string;
|
|
48
|
+
red600: string;
|
|
49
|
+
red700: string;
|
|
50
|
+
red800: string;
|
|
51
|
+
red900: string;
|
|
52
|
+
red1000: string;
|
|
53
|
+
red2000: string;
|
|
54
|
+
blue50: string;
|
|
55
|
+
blue100: string;
|
|
56
|
+
blue400: string;
|
|
57
|
+
blue500: string;
|
|
58
|
+
blue900: string;
|
|
59
|
+
gray5: string;
|
|
60
|
+
gray10: string;
|
|
61
|
+
gray50: string;
|
|
62
|
+
gray100: string;
|
|
63
|
+
gray200: string;
|
|
64
|
+
gray300: string;
|
|
65
|
+
gray390: string;
|
|
66
|
+
gray400: string;
|
|
67
|
+
gray500: string;
|
|
68
|
+
gray600: string;
|
|
69
|
+
gray700: string;
|
|
70
|
+
gray800: string;
|
|
71
|
+
gray900: string;
|
|
72
|
+
gray1000: string;
|
|
73
|
+
green50: string;
|
|
74
|
+
green100: string;
|
|
75
|
+
green200: string;
|
|
76
|
+
green300: string;
|
|
77
|
+
green400: string;
|
|
78
|
+
green500: string;
|
|
79
|
+
green600: string;
|
|
80
|
+
green700: string;
|
|
81
|
+
green800: string;
|
|
82
|
+
green900: string;
|
|
83
|
+
green1000: string;
|
|
84
|
+
orange50: string;
|
|
85
|
+
orange100: string;
|
|
86
|
+
orange200: string;
|
|
87
|
+
orange300: string;
|
|
88
|
+
orange400: string;
|
|
89
|
+
orange500: string;
|
|
90
|
+
orange600: string;
|
|
91
|
+
orange700: string;
|
|
92
|
+
orange800: string;
|
|
93
|
+
orange900: string;
|
|
94
|
+
orange1000: string;
|
|
95
|
+
};
|
|
96
|
+
textStyles: {
|
|
97
|
+
h1: import("styled-components").FlattenSimpleInterpolation;
|
|
98
|
+
h2: import("styled-components").FlattenSimpleInterpolation;
|
|
99
|
+
h3: import("styled-components").FlattenSimpleInterpolation;
|
|
100
|
+
h4: import("styled-components").FlattenSimpleInterpolation;
|
|
101
|
+
h5: import("styled-components").FlattenSimpleInterpolation;
|
|
102
|
+
h6: import("styled-components").FlattenSimpleInterpolation;
|
|
103
|
+
subtitle: import("styled-components").FlattenSimpleInterpolation;
|
|
104
|
+
body1: import("styled-components").FlattenSimpleInterpolation;
|
|
105
|
+
body2: import("styled-components").FlattenSimpleInterpolation;
|
|
106
|
+
body3: import("styled-components").FlattenSimpleInterpolation;
|
|
107
|
+
body4: import("styled-components").FlattenSimpleInterpolation;
|
|
108
|
+
label1: import("styled-components").FlattenSimpleInterpolation;
|
|
109
|
+
label2: import("styled-components").FlattenSimpleInterpolation;
|
|
110
|
+
label3: import("styled-components").FlattenSimpleInterpolation;
|
|
111
|
+
helperText: import("styled-components").FlattenSimpleInterpolation;
|
|
112
|
+
buttonText: import("styled-components").FlattenSimpleInterpolation;
|
|
113
|
+
buttonTextSmall: import("styled-components").FlattenSimpleInterpolation;
|
|
114
|
+
link: import("styled-components").FlattenSimpleInterpolation;
|
|
115
|
+
};
|
|
116
|
+
css: {
|
|
117
|
+
pt: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
118
|
+
pb: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
119
|
+
pl: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
120
|
+
pr: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
121
|
+
p: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
122
|
+
mt: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
123
|
+
mb: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
124
|
+
ml: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
125
|
+
mr: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
126
|
+
m: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
127
|
+
top: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
128
|
+
bottom: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
129
|
+
left: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
130
|
+
right: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
131
|
+
clickable: import("styled-components").FlattenSimpleInterpolation;
|
|
132
|
+
disabledWhen: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
133
|
+
selectNone: import("styled-components").FlattenSimpleInterpolation;
|
|
134
|
+
yscroll: import("styled-components").FlattenSimpleInterpolation;
|
|
135
|
+
overflowHidden: import("styled-components").FlattenSimpleInterpolation;
|
|
136
|
+
rotate180: import("styled-components").FlattenSimpleInterpolation;
|
|
137
|
+
forMobile: import("styled-components").FlattenSimpleInterpolation;
|
|
138
|
+
forDesktop: import("styled-components").FlattenSimpleInterpolation;
|
|
139
|
+
mcontainer: import("styled-components").FlattenSimpleInterpolation;
|
|
140
|
+
c: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
141
|
+
bg: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
142
|
+
css: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
143
|
+
scrollbarDark: import("styled-components").FlattenSimpleInterpolation;
|
|
144
|
+
border: import("styled-components").FlattenSimpleInterpolation;
|
|
145
|
+
outline: import("styled-components").FlattenSimpleInterpolation;
|
|
146
|
+
borderwhite: import("styled-components").FlattenSimpleInterpolation;
|
|
147
|
+
borderred: import("styled-components").FlattenSimpleInterpolation;
|
|
148
|
+
bgred: import("styled-components").FlattenSimpleInterpolation;
|
|
149
|
+
bgblue: import("styled-components").FlattenSimpleInterpolation;
|
|
150
|
+
opacity5: import("styled-components").FlattenSimpleInterpolation;
|
|
151
|
+
semiBold: import("styled-components").FlattenSimpleInterpolation;
|
|
152
|
+
bold: import("styled-components").FlattenSimpleInterpolation;
|
|
153
|
+
extraBold: import("styled-components").FlattenSimpleInterpolation;
|
|
154
|
+
fontweight_800: import("styled-components").FlattenSimpleInterpolation;
|
|
155
|
+
italic: import("styled-components").FlattenSimpleInterpolation;
|
|
156
|
+
DM4: import("styled-components").FlattenSimpleInterpolation;
|
|
157
|
+
fs: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
158
|
+
lh: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
159
|
+
ls: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
160
|
+
h1: import("styled-components").FlattenSimpleInterpolation;
|
|
161
|
+
h2: import("styled-components").FlattenSimpleInterpolation;
|
|
162
|
+
h3: import("styled-components").FlattenSimpleInterpolation;
|
|
163
|
+
h4: import("styled-components").FlattenSimpleInterpolation;
|
|
164
|
+
h5: import("styled-components").FlattenSimpleInterpolation;
|
|
165
|
+
h6: import("styled-components").FlattenSimpleInterpolation;
|
|
166
|
+
subtitle: import("styled-components").FlattenSimpleInterpolation;
|
|
167
|
+
body1: import("styled-components").FlattenSimpleInterpolation;
|
|
168
|
+
body2: import("styled-components").FlattenSimpleInterpolation;
|
|
169
|
+
body3: import("styled-components").FlattenSimpleInterpolation;
|
|
170
|
+
body4: import("styled-components").FlattenSimpleInterpolation;
|
|
171
|
+
label1: import("styled-components").FlattenSimpleInterpolation;
|
|
172
|
+
label2: import("styled-components").FlattenSimpleInterpolation;
|
|
173
|
+
label3: import("styled-components").FlattenSimpleInterpolation;
|
|
174
|
+
helperText: import("styled-components").FlattenSimpleInterpolation;
|
|
175
|
+
buttonText: import("styled-components").FlattenSimpleInterpolation;
|
|
176
|
+
buttonTextSmall: import("styled-components").FlattenSimpleInterpolation;
|
|
177
|
+
link: import("styled-components").FlattenSimpleInterpolation;
|
|
178
|
+
truncateText: import("styled-components").FlattenSimpleInterpolation;
|
|
179
|
+
dInline: import("styled-components").FlattenSimpleInterpolation;
|
|
180
|
+
flexWrap: import("styled-components").FlattenSimpleInterpolation;
|
|
181
|
+
underline: import("styled-components").FlattenSimpleInterpolation;
|
|
182
|
+
textAlignCenter: import("styled-components").FlattenSimpleInterpolation;
|
|
183
|
+
textAlignRight: import("styled-components").FlattenSimpleInterpolation;
|
|
184
|
+
uppercase: import("styled-components").FlattenSimpleInterpolation;
|
|
185
|
+
capitalize: import("styled-components").FlattenSimpleInterpolation;
|
|
186
|
+
lowercase: import("styled-components").FlattenSimpleInterpolation;
|
|
187
|
+
dflex: import("styled-components").FlattenSimpleInterpolation;
|
|
188
|
+
centered: import("styled-components").FlattenSimpleInterpolation;
|
|
189
|
+
flexColumn: import("styled-components").FlattenSimpleInterpolation;
|
|
190
|
+
flexColumnCentered: import("styled-components").FlattenSimpleInterpolation;
|
|
191
|
+
flexRowReverse: import("styled-components").FlattenSimpleInterpolation;
|
|
192
|
+
spaceBetween: import("styled-components").FlattenSimpleInterpolation;
|
|
193
|
+
spaceBetweenAligned: import("styled-components").FlattenSimpleInterpolation;
|
|
194
|
+
spaceAround: import("styled-components").FlattenSimpleInterpolation;
|
|
195
|
+
justifyEnd: import("styled-components").FlattenSimpleInterpolation;
|
|
196
|
+
justifyCenter: import("styled-components").FlattenSimpleInterpolation;
|
|
197
|
+
alignEnd: import("styled-components").FlattenSimpleInterpolation;
|
|
198
|
+
alignStart: import("styled-components").FlattenSimpleInterpolation;
|
|
199
|
+
alignCenter: import("styled-components").FlattenSimpleInterpolation;
|
|
200
|
+
grow: import("styled-components").FlattenSimpleInterpolation;
|
|
201
|
+
pAbsolute: import("styled-components").FlattenSimpleInterpolation;
|
|
202
|
+
pRelative: import("styled-components").FlattenSimpleInterpolation;
|
|
203
|
+
pSticky: import("styled-components").FlattenSimpleInterpolation;
|
|
204
|
+
floatLeft: import("styled-components").FlattenSimpleInterpolation;
|
|
205
|
+
w50: import("styled-components").FlattenSimpleInterpolation;
|
|
206
|
+
w100: import("styled-components").FlattenSimpleInterpolation;
|
|
207
|
+
h100: import("styled-components").FlattenSimpleInterpolation;
|
|
208
|
+
w: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
209
|
+
h: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
210
|
+
dim: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
211
|
+
maxw: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
212
|
+
maxh: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
213
|
+
minw: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
214
|
+
minh: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
215
|
+
br: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
216
|
+
fadeIn: import("styled-components").FlattenSimpleInterpolation;
|
|
217
|
+
};
|
|
218
|
+
media: {
|
|
219
|
+
desktop: string;
|
|
220
|
+
mobile: string;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
logoURL: string;
|
|
224
|
+
};
|
|
225
|
+
export { theme, getCustomTheme };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { theme } from "../styled/theme";
|
|
13
|
+
var getCustomTheme = function (importerStylePreferences) {
|
|
14
|
+
var primary_color = importerStylePreferences.primary_color, secondary_color = importerStylePreferences.secondary_color, highlight1 = importerStylePreferences.highlight1, highlight2 = importerStylePreferences.highlight2, background = importerStylePreferences.background;
|
|
15
|
+
var customTheme = __assign(__assign({}, theme), { colors: __assign(__assign({}, theme.colors), { pink500: primary_color, black: secondary_color, blue500: highlight1, blue100: highlight2, backgroundInterface: background }) });
|
|
16
|
+
return { theme: customTheme, logoURL: importerStylePreferences.logo_url };
|
|
17
|
+
};
|
|
18
|
+
export { theme, getCustomTheme };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { CSSProps } from "../styled/utils";
|
|
3
3
|
declare const types: readonly ["primary", "secondary", "tertiary"];
|
|
4
4
|
export declare type ButtonTypes = typeof types[number];
|
|
5
5
|
export declare type BtnProps = {
|
|
@@ -8,13 +8,23 @@ export declare type BtnProps = {
|
|
|
8
8
|
children: any;
|
|
9
9
|
isDisabled?: boolean;
|
|
10
10
|
isSmall?: boolean;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
isButtonElement?: boolean;
|
|
12
|
+
} & CSSProps;
|
|
13
|
+
export declare const ButtonWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, CSSProps & {
|
|
13
14
|
onClick?: () => void;
|
|
14
15
|
variant?: ButtonTypes;
|
|
15
16
|
children: any;
|
|
16
17
|
isDisabled?: boolean;
|
|
17
18
|
isSmall?: boolean;
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
isButtonElement?: boolean;
|
|
20
|
+
}, never>;
|
|
21
|
+
export declare const ButtonElementWrapper: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, CSSProps & {
|
|
22
|
+
onClick?: () => void;
|
|
23
|
+
variant?: ButtonTypes;
|
|
24
|
+
children: any;
|
|
25
|
+
isDisabled?: boolean;
|
|
26
|
+
isSmall?: boolean;
|
|
27
|
+
isButtonElement?: boolean;
|
|
28
|
+
}, never>;
|
|
29
|
+
export declare const Button: ({ onClick, isDisabled, variant, isSmall, children, isButtonElement, ...props }: BtnProps) => JSX.Element;
|
|
20
30
|
export {};
|
|
@@ -24,9 +24,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
24
24
|
}
|
|
25
25
|
return t;
|
|
26
26
|
};
|
|
27
|
-
import {
|
|
27
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
28
28
|
import styled, { css } from "styled-components";
|
|
29
|
-
import { Div } from "../styled/utils";
|
|
29
|
+
import { Div, HTMLButton } from "../styled/utils";
|
|
30
30
|
var types = ["primary", "secondary", "tertiary"];
|
|
31
31
|
var styles = {
|
|
32
32
|
primary: css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: ", ";\n background: ", ";\n\n border: solid 4px ", ";\n box-sizing: border-box;\n\n :hover {\n background: ", ";\n /* a3 at the end adds 0.64 opacity */\n box-shadow: 0px 0px 8px ", "a3;\n }\n :active {\n background: ", ";\n border: 4px solid ", ";\n }\n :focus {\n background: ", ";\n /* a3 at the end adds 0.64 opacity */\n box-shadow: 0px 0px 8px ", "a3;\n }\n ", "\n "], ["\n color: ", ";\n background: ", ";\n\n border: solid 4px ", ";\n box-sizing: border-box;\n\n :hover {\n background: ", ";\n /* a3 at the end adds 0.64 opacity */\n box-shadow: 0px 0px 8px ", "a3;\n }\n :active {\n background: ", ";\n border: 4px solid ", ";\n }\n :focus {\n background: ", ";\n /* a3 at the end adds 0.64 opacity */\n box-shadow: 0px 0px 8px ", "a3;\n }\n ", "\n "])), function (props) { return props.theme.colors.white; }, function (props) { return props.theme.colors.pink500; }, function (props) { return props.theme.colors.pink500; }, function (props) { return props.theme.colors.pink500; }, function (props) { return props.theme.colors.pink500; }, function (props) { return props.theme.colors.pink500; }, function (props) { return props.theme.colors.pink700; }, function (props) { return props.theme.colors.pink500; }, function (props) { return props.theme.colors.pink500; }, function (props) {
|
|
@@ -39,20 +39,22 @@ var styles = {
|
|
|
39
39
|
return props.isDisabled && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), function (props) { return props.theme.colors.gray300; });
|
|
40
40
|
}),
|
|
41
41
|
};
|
|
42
|
-
|
|
43
|
-
return
|
|
42
|
+
var commonButtonStyle = css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n height: 48px;\n ", "\n\n border: solid 1px black;\n border-radius: 24px;\n\n font-family: DM Sans;\n\n :focus {\n outline: none;\n }\n :hover {\n cursor: pointer;\n }\n\n ", "\n ", ";\n\n ", ";\n"], ["\n height: 48px;\n ", "\n\n border: solid 1px black;\n border-radius: 24px;\n\n font-family: DM Sans;\n\n :focus {\n outline: none;\n }\n :hover {\n cursor: pointer;\n }\n\n ", "\n ", ";\n\n ", ";\n"])), function (props) {
|
|
43
|
+
return props.isSmall && css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n height: 36px;\n "], ["\n height: 36px;\n "])));
|
|
44
44
|
}, function (props) {
|
|
45
45
|
return props.isDisabled && css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n pointer-events: none;\n "], ["\n pointer-events: none;\n "])));
|
|
46
46
|
}, function (props) {
|
|
47
47
|
var c = props.theme.css;
|
|
48
48
|
return [c.centered, c.buttonText];
|
|
49
49
|
}, function (props) { return styles[props.variant || "primary"]; });
|
|
50
|
+
export var ButtonWrapper = styled(Div)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), commonButtonStyle);
|
|
51
|
+
export var ButtonElementWrapper = styled(HTMLButton)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), commonButtonStyle);
|
|
50
52
|
export var Button = function (_a) {
|
|
51
|
-
var _b = _a.onClick, onClick = _b === void 0 ? null : _b, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.variant, variant = _d === void 0 ? "primary" : _d, _e = _a.isSmall, isSmall = _e === void 0 ? false : _e, children = _a.children, props = __rest(_a, ["onClick", "isDisabled", "variant", "isSmall", "children"]);
|
|
52
|
-
return (_jsx(ButtonWrapper, __assign({ w100: true, isSmall: isSmall, onKeyDown: function (_a) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
var _b = _a.onClick, onClick = _b === void 0 ? null : _b, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.variant, variant = _d === void 0 ? "primary" : _d, _e = _a.isSmall, isSmall = _e === void 0 ? false : _e, children = _a.children, _f = _a.isButtonElement, isButtonElement = _f === void 0 ? false : _f, props = __rest(_a, ["onClick", "isDisabled", "variant", "isSmall", "children", "isButtonElement"]);
|
|
54
|
+
return (_jsx(_Fragment, { children: isButtonElement ? (_jsx(ButtonElementWrapper, __assign({ w100: true, isSmall: isSmall, isDisabled: isDisabled, variant: variant, type: "submit" }, props, { children: children }))) : (_jsx(ButtonWrapper, __assign({ w100: true, isSmall: isSmall, onKeyDown: function (_a) {
|
|
55
|
+
var code = _a.code;
|
|
56
|
+
if (code === "Space" || (code === "Enter" && onClick))
|
|
57
|
+
onClick();
|
|
58
|
+
}, tabIndex: 0 }, __assign({ variant: variant, isDisabled: isDisabled, onClick: onClick }, props), { children: _jsx(_Fragment, { children: children }) }))) }));
|
|
57
59
|
};
|
|
58
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
|
|
60
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
|
package/lib/esm/common/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import styled, { css } from "styled-components";
|
|
|
18
18
|
import { Div, themeProps } from "../styled/utils";
|
|
19
19
|
import { colors } from "../styled/theme/colorPalette";
|
|
20
20
|
export var fuseImporterId = "fuse-importer-root";
|
|
21
|
-
export var MenuItem = styled(Div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-radius: 8px;\n padding: 12px 16px;\n display: flex;\n align-items: center;\n background: ", ";\n color: ", ";\n ", "\n ", ";\n ", "\n :hover {\n background: ", ";\n cursor: pointer;\n }\n"], ["\n border-radius: 8px;\n padding: 12px 16px;\n display: flex;\n align-items: center;\n background: ", ";\n color: ", ";\n ", "\n ", ";\n ", "\n :hover {\n background: ", ";\n cursor: pointer;\n }\n"])), function (props) { return props.theme.colors.white; }, function (props) { return props.theme.colors.text; }, function (props) { return props.theme.css.body1; }, function (p) { return p.theme.css.selectNone; }, function (p) {
|
|
21
|
+
export var MenuItem = styled(Div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-radius: 8px;\n padding: 12px 16px;\n display: flex;\n align-items: center;\n background: ", ";\n color: ", ";\n ", "\n ", ";\n ", "\n :hover {\n background: ", ";\n cursor: pointer;\n }\n"], ["\n border-radius: 8px;\n padding: 12px 16px;\n display: flex;\n align-items: center;\n background: ", ";\n color: ", ";\n ", "\n ", ";\n ", "\n :hover {\n background: ", ";\n cursor: pointer;\n }\n"])), function (props) { return props.theme.colors.white; }, function (props) { return props.color || props.theme.colors.text; }, function (props) { return props.theme.css.body1; }, function (p) { return p.theme.css.selectNone; }, function (p) {
|
|
22
22
|
return p.isSelected && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), function (p) { return p.theme.colors.blue500; });
|
|
23
23
|
}, function (props) { return props.theme.colors.blue100; });
|
|
24
24
|
export var FormInputLabel = styled(Div)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", ";\n color: ", ";\n ", "\n"], ["\n ", ";\n color: ", ";\n ", "\n"])), function (props) { return props.theme.css.body4; }, function (props) { return props.theme.colors.text; }, function (props) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Placement } from "@popperjs/core";
|
|
3
3
|
import { DivCSSProps } from "../../styled/utils";
|
|
4
|
-
declare type Option = {
|
|
4
|
+
export declare type Option = {
|
|
5
5
|
label: any;
|
|
6
6
|
value: any;
|
|
7
7
|
};
|
|
8
|
-
declare type Props = {
|
|
8
|
+
export declare type Props = {
|
|
9
9
|
label?: any;
|
|
10
10
|
placeholder?: string;
|
|
11
11
|
value?: any;
|
|
@@ -42,7 +42,14 @@ var TextInput = function (_a) {
|
|
|
42
42
|
var res = usePasswordVisibleIcon(type);
|
|
43
43
|
var passwordVisibleIcon = res.passwordVisibleIcon, isPasswordVisible = res.isPasswordVisible;
|
|
44
44
|
var _icon = passwordVisibleIcon || icon;
|
|
45
|
-
return (_jsxs(Div, __assign({ w100: true }, props, { children: [label && (_jsx(FormInputLabel, __assign({ isDisabled: isDisabled, mb: 8 }, { children: label }))), _jsxs(Div, __assign({ pRelative: true }, { children: [_jsx(HTMLInput, __assign({}, {
|
|
45
|
+
return (_jsxs(Div, __assign({ w100: true }, props, { children: [label && (_jsx(FormInputLabel, __assign({ isDisabled: isDisabled, mb: 8 }, { children: label }))), _jsxs(Div, __assign({ pRelative: true }, { children: [_jsx(HTMLInput, __assign({}, {
|
|
46
|
+
placeholder: placeholder,
|
|
47
|
+
isDisabled: isDisabled,
|
|
48
|
+
onFocus: onFocus,
|
|
49
|
+
hasError: hasError,
|
|
50
|
+
autoFocus: autoFocus,
|
|
51
|
+
disabled: isDisabled,
|
|
52
|
+
}, { type: isPasswordVisible ? "text" : type, value: _value || "", onChange: function (_a) {
|
|
46
53
|
var value = _a.target.value;
|
|
47
54
|
return set_Value(value);
|
|
48
55
|
}, onBlur: function () {
|