@layerfi/components 0.1.102-alpha → 0.1.102-alpha.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/dist/cjs/index.cjs +623 -629
- package/dist/esm/index.mjs +93 -99
- package/dist/index.css +4 -1
- package/dist/index.d.ts +31 -3
- package/package.json +1 -1
package/dist/esm/index.mjs
CHANGED
|
@@ -5570,7 +5570,7 @@ import { useState as useState8 } from "react";
|
|
|
5570
5570
|
import { useReducer, useEffect as useEffect4 } from "react";
|
|
5571
5571
|
|
|
5572
5572
|
// package.json
|
|
5573
|
-
var version = "0.1.102-alpha";
|
|
5573
|
+
var version = "0.1.102-alpha.2";
|
|
5574
5574
|
|
|
5575
5575
|
// src/models/APIError.ts
|
|
5576
5576
|
var APIError = class _APIError extends Error {
|
|
@@ -11540,20 +11540,34 @@ function ModalActions({ children }) {
|
|
|
11540
11540
|
}
|
|
11541
11541
|
|
|
11542
11542
|
// src/components/ui/Stack/Stack.tsx
|
|
11543
|
+
import { forwardRef as forwardRef11 } from "react";
|
|
11543
11544
|
import classNames22 from "classnames";
|
|
11544
11545
|
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
11545
11546
|
var CLASS_NAME2 = "Layer__Stack";
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
|
|
11549
|
-
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
|
|
11554
|
-
|
|
11555
|
-
|
|
11556
|
-
|
|
11547
|
+
var Stack = forwardRef11(
|
|
11548
|
+
(_a, ref) => {
|
|
11549
|
+
var _b = _a, { align, children, direction, gap, justify, pbs, pbe, pis, pie, fluid, className } = _b, restProps = __objRest(_b, ["align", "children", "direction", "gap", "justify", "pbs", "pbe", "pis", "pie", "fluid", "className"]);
|
|
11550
|
+
const dataProperties = toDataProperties({ align, direction, gap, justify, pbs, pbe, pis, pie, fluid });
|
|
11551
|
+
return /* @__PURE__ */ jsx71(
|
|
11552
|
+
"div",
|
|
11553
|
+
__spreadProps(__spreadValues(__spreadValues({
|
|
11554
|
+
ref
|
|
11555
|
+
}, restProps), dataProperties), {
|
|
11556
|
+
className: classNames22(CLASS_NAME2, className),
|
|
11557
|
+
children
|
|
11558
|
+
})
|
|
11559
|
+
);
|
|
11560
|
+
}
|
|
11561
|
+
);
|
|
11562
|
+
Stack.displayName = "Stack";
|
|
11563
|
+
var VStack = forwardRef11((props, ref) => {
|
|
11564
|
+
return /* @__PURE__ */ jsx71(Stack, __spreadProps(__spreadValues({}, props), { ref, direction: "column" }));
|
|
11565
|
+
});
|
|
11566
|
+
VStack.displayName = "VStack";
|
|
11567
|
+
var HStack = forwardRef11((props, ref) => {
|
|
11568
|
+
return /* @__PURE__ */ jsx71(Stack, __spreadProps(__spreadValues({}, props), { ref, direction: "row" }));
|
|
11569
|
+
});
|
|
11570
|
+
HStack.displayName = "HStack";
|
|
11557
11571
|
var Spacer = () => /* @__PURE__ */ jsx71("div", { className: "Layer__Spacer" });
|
|
11558
11572
|
|
|
11559
11573
|
// src/components/utility/ConditionalList.tsx
|
|
@@ -12225,39 +12239,6 @@ var Select = ({
|
|
|
12225
12239
|
// src/components/Input/InputWithBadge.tsx
|
|
12226
12240
|
import classNames28 from "classnames";
|
|
12227
12241
|
import { jsx as jsx84, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
12228
|
-
var InputWithBadge = (_a) => {
|
|
12229
|
-
var _b = _a, {
|
|
12230
|
-
className,
|
|
12231
|
-
isInvalid,
|
|
12232
|
-
errorMessage,
|
|
12233
|
-
leftText,
|
|
12234
|
-
badge,
|
|
12235
|
-
variant = "default" /* DEFAULT */
|
|
12236
|
-
} = _b, props = __objRest(_b, [
|
|
12237
|
-
"className",
|
|
12238
|
-
"isInvalid",
|
|
12239
|
-
"errorMessage",
|
|
12240
|
-
"leftText",
|
|
12241
|
-
"badge",
|
|
12242
|
-
"variant"
|
|
12243
|
-
]);
|
|
12244
|
-
const baseClassName = classNames28(
|
|
12245
|
-
"Layer__input",
|
|
12246
|
-
isInvalid ? "Layer__input--error" : "",
|
|
12247
|
-
leftText ? "Layer__input--with-left-text" : "",
|
|
12248
|
-
className
|
|
12249
|
-
);
|
|
12250
|
-
return /* @__PURE__ */ jsxs47(Tooltip, { disabled: !isInvalid || !errorMessage, children: [
|
|
12251
|
-
/* @__PURE__ */ jsxs47(TooltipTrigger, { className: "Layer__input-tooltip", children: [
|
|
12252
|
-
/* @__PURE__ */ jsxs47("div", { className: "Layer__input-with-badge", children: [
|
|
12253
|
-
/* @__PURE__ */ jsx84("input", __spreadProps(__spreadValues({}, props), { className: baseClassName })),
|
|
12254
|
-
badge && /* @__PURE__ */ jsx84(Badge, { variant, children: badge })
|
|
12255
|
-
] }),
|
|
12256
|
-
leftText && /* @__PURE__ */ jsx84("span", { className: "Layer__input-left-text", children: leftText })
|
|
12257
|
-
] }),
|
|
12258
|
-
/* @__PURE__ */ jsx84(TooltipContent, { className: "Layer__tooltip", children: errorMessage })
|
|
12259
|
-
] });
|
|
12260
|
-
};
|
|
12261
12242
|
|
|
12262
12243
|
// src/components/Input/MultiSelect.tsx
|
|
12263
12244
|
import { useCallback as useCallback4 } from "react";
|
|
@@ -12326,6 +12307,7 @@ var AmountInput = (_a) => {
|
|
|
12326
12307
|
leftText,
|
|
12327
12308
|
errorMessage,
|
|
12328
12309
|
isInvalid,
|
|
12310
|
+
badge,
|
|
12329
12311
|
placeholder = "$0.00"
|
|
12330
12312
|
} = _b, props = __objRest(_b, [
|
|
12331
12313
|
"onChange",
|
|
@@ -12333,30 +12315,38 @@ var AmountInput = (_a) => {
|
|
|
12333
12315
|
"leftText",
|
|
12334
12316
|
"errorMessage",
|
|
12335
12317
|
"isInvalid",
|
|
12318
|
+
"badge",
|
|
12336
12319
|
"placeholder"
|
|
12337
12320
|
]);
|
|
12338
12321
|
const baseClassName = classNames30(
|
|
12339
12322
|
"Layer__input Layer__amount-input",
|
|
12323
|
+
badge ? "Layer__amount-input--align-left" : "Layer__amount-input--align-right",
|
|
12340
12324
|
isInvalid ? "Layer__input--error" : "",
|
|
12341
12325
|
leftText ? "Layer__input--with-left-text" : "",
|
|
12342
12326
|
className
|
|
12343
12327
|
);
|
|
12328
|
+
const currencyInput = /* @__PURE__ */ jsx86(
|
|
12329
|
+
CurrencyInput,
|
|
12330
|
+
__spreadProps(__spreadValues({}, props), {
|
|
12331
|
+
intlConfig: {
|
|
12332
|
+
locale: "en-US",
|
|
12333
|
+
currency: "USD"
|
|
12334
|
+
},
|
|
12335
|
+
prefix: "$",
|
|
12336
|
+
placeholder,
|
|
12337
|
+
decimalScale: 2,
|
|
12338
|
+
decimalsLimit: 2,
|
|
12339
|
+
disableAbbreviations: true,
|
|
12340
|
+
onValueChange: onChange,
|
|
12341
|
+
className: baseClassName
|
|
12342
|
+
})
|
|
12343
|
+
);
|
|
12344
12344
|
return /* @__PURE__ */ jsxs49(Tooltip, { disabled: !isInvalid || !errorMessage, children: [
|
|
12345
12345
|
/* @__PURE__ */ jsxs49(TooltipTrigger, { className: "Layer__input-tooltip", children: [
|
|
12346
|
-
/* @__PURE__ */
|
|
12347
|
-
|
|
12348
|
-
|
|
12349
|
-
|
|
12350
|
-
locale: "en-US",
|
|
12351
|
-
currency: "USD"
|
|
12352
|
-
},
|
|
12353
|
-
prefix: "$",
|
|
12354
|
-
placeholder,
|
|
12355
|
-
decimalsLimit: 2,
|
|
12356
|
-
onValueChange: onChange,
|
|
12357
|
-
className: baseClassName
|
|
12358
|
-
})
|
|
12359
|
-
),
|
|
12346
|
+
badge ? /* @__PURE__ */ jsxs49("div", { className: "Layer__input-with-badge", children: [
|
|
12347
|
+
currencyInput,
|
|
12348
|
+
badge
|
|
12349
|
+
] }) : currencyInput,
|
|
12360
12350
|
leftText && /* @__PURE__ */ jsx86("span", { className: "Layer__input-left-text", children: leftText })
|
|
12361
12351
|
] }),
|
|
12362
12352
|
/* @__PURE__ */ jsx86(TooltipContent, { className: "Layer__tooltip", children: errorMessage })
|
|
@@ -13036,10 +13026,14 @@ var humanizeEnum = (text) => {
|
|
|
13036
13026
|
};
|
|
13037
13027
|
var convertNumberToCurrency = (amount) => {
|
|
13038
13028
|
if (typeof amount !== "number" || isNaN(amount)) return "";
|
|
13039
|
-
const formattedValue = amount.toLocaleString("en-US"
|
|
13040
|
-
|
|
13029
|
+
const formattedValue = amount.toLocaleString("en-US", {
|
|
13030
|
+
style: "currency",
|
|
13031
|
+
currency: "USD",
|
|
13032
|
+
minimumFractionDigits: 2,
|
|
13033
|
+
maximumFractionDigits: 2
|
|
13034
|
+
});
|
|
13035
|
+
return formattedValue;
|
|
13041
13036
|
};
|
|
13042
|
-
var convertCurrencyToNumber = (amount) => amount.replace("$", "").replace(",", "").replace(/[^\d.]/g, "").replace(/(?!^)-/g, "").replace(/(\..*)\./g, "$1").replace(/(\.\d{2})\d+/, "$1").replace(/^0(?!\.)/, "");
|
|
13043
13037
|
var convertToCents = (amount) => {
|
|
13044
13038
|
try {
|
|
13045
13039
|
if (amount === void 0 || amount === null) {
|
|
@@ -14167,7 +14161,6 @@ function ValidateCsvTable({ data, headers, formatters: formatters2, className })
|
|
|
14167
14161
|
getCoreRowModel: getCoreRowModel(),
|
|
14168
14162
|
getSortedRowModel: getSortedRowModel()
|
|
14169
14163
|
});
|
|
14170
|
-
const tableContainerRef = useRef9(null);
|
|
14171
14164
|
return /* @__PURE__ */ jsxs59("div", { className: `${className} Layer__csv-upload__validate-csv-table__container`, children: [
|
|
14172
14165
|
/* @__PURE__ */ jsx100("table", { className: "Layer__table", children: /* @__PURE__ */ jsx100("thead", { className: "Layer__csv-upload__validate-csv-table__thead", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx100("tr", { className: "Layer__csv-upload__validate-csv-table__header-row", children: headerGroup.headers.map((header) => {
|
|
14173
14166
|
const headerCellClassName = classNames35(
|
|
@@ -14177,19 +14170,20 @@ function ValidateCsvTable({ data, headers, formatters: formatters2, className })
|
|
|
14177
14170
|
);
|
|
14178
14171
|
return /* @__PURE__ */ jsx100("th", { className: headerCellClassName, children: flexRender(header.column.columnDef.header, header.getContext()) }, header.id);
|
|
14179
14172
|
}) }, headerGroup.id)) }) }),
|
|
14180
|
-
/* @__PURE__ */ jsx100(
|
|
14173
|
+
/* @__PURE__ */ jsx100(ValidateCsvTableBody, { table })
|
|
14181
14174
|
] });
|
|
14182
14175
|
}
|
|
14183
|
-
function ValidateCsvTableBody({ table
|
|
14176
|
+
function ValidateCsvTableBody({ table }) {
|
|
14184
14177
|
const { rows } = table.getRowModel();
|
|
14178
|
+
const containerRef = useRef9(null);
|
|
14185
14179
|
const rowVirtualizer = useVirtualizer({
|
|
14186
14180
|
count: rows.length,
|
|
14187
14181
|
estimateSize: () => ROW_HEIGHT,
|
|
14188
|
-
getScrollElement: () =>
|
|
14182
|
+
getScrollElement: () => containerRef.current,
|
|
14189
14183
|
measureElement: typeof window !== "undefined" && navigator.userAgent.indexOf("Firefox") === -1 ? (element) => element == null ? void 0 : element.getBoundingClientRect().height : void 0,
|
|
14190
14184
|
overscan: 5
|
|
14191
14185
|
});
|
|
14192
|
-
return /* @__PURE__ */ jsxs59("tbody", { children: [
|
|
14186
|
+
return /* @__PURE__ */ jsx100("div", { ref: containerRef, className: "Layer__csv-upload__validate-csv-table__scroll_container", children: /* @__PURE__ */ jsx100("table", { className: "Layer__table", children: /* @__PURE__ */ jsxs59("tbody", { children: [
|
|
14193
14187
|
/* @__PURE__ */ jsx100("tr", { style: { height: BODY_HEIGHT }, children: /* @__PURE__ */ jsx100("td", { style: { height: BODY_HEIGHT, padding: 0 }, colSpan: table.getAllColumns().length - 1 }) }),
|
|
14194
14188
|
rowVirtualizer.getVirtualItems().map((virtualRow) => {
|
|
14195
14189
|
const row = rows[virtualRow.index];
|
|
@@ -14203,7 +14197,7 @@ function ValidateCsvTableBody({ table, tableContainerRef }) {
|
|
|
14203
14197
|
row.id
|
|
14204
14198
|
);
|
|
14205
14199
|
})
|
|
14206
|
-
] });
|
|
14200
|
+
] }) }) });
|
|
14207
14201
|
}
|
|
14208
14202
|
function ValidateCsvTableRow({ row, virtualRow, rowVirtualizer }) {
|
|
14209
14203
|
const tableRowClassName = classNames35(
|
|
@@ -14305,17 +14299,18 @@ function UploadTransactions({ onComplete }) {
|
|
|
14305
14299
|
setFile(file2);
|
|
14306
14300
|
setParseCsvResponse(null);
|
|
14307
14301
|
}, []);
|
|
14308
|
-
const goBack = useCallback12((step = 1) => setCurrentStep(currentStep - step), [currentStep]);
|
|
14309
|
-
const goForward = useCallback12((step = 1) => setCurrentStep(currentStep + step), [currentStep]);
|
|
14310
14302
|
const onParseCsv = useCallback12((parseCsvResponse2) => {
|
|
14311
14303
|
setParseCsvResponse(parseCsvResponse2);
|
|
14312
|
-
|
|
14313
|
-
}, [
|
|
14304
|
+
setCurrentStep(1 /* ValidateCsv */);
|
|
14305
|
+
}, []);
|
|
14306
|
+
const goRestartFlow = useCallback12(() => {
|
|
14307
|
+
setCurrentStep(0 /* UploadCsv */);
|
|
14308
|
+
}, []);
|
|
14314
14309
|
const onReupload = useCallback12(() => {
|
|
14315
14310
|
setFile(null);
|
|
14316
14311
|
setParseCsvResponse(null);
|
|
14317
|
-
|
|
14318
|
-
}, [
|
|
14312
|
+
setCurrentStep(0 /* UploadCsv */);
|
|
14313
|
+
}, []);
|
|
14319
14314
|
return /* @__PURE__ */ jsx102("section", { className: "Layer__component", children: /* @__PURE__ */ jsxs61(
|
|
14320
14315
|
Wizard,
|
|
14321
14316
|
{
|
|
@@ -14351,7 +14346,7 @@ function UploadTransactions({ onComplete }) {
|
|
|
14351
14346
|
{
|
|
14352
14347
|
selectedAccountId: selectedAccount.value,
|
|
14353
14348
|
parseCsvResponse,
|
|
14354
|
-
onGoBack:
|
|
14349
|
+
onGoBack: goRestartFlow,
|
|
14355
14350
|
onReupload
|
|
14356
14351
|
}
|
|
14357
14352
|
)
|
|
@@ -15295,7 +15290,7 @@ var CategorySelect = ({
|
|
|
15295
15290
|
|
|
15296
15291
|
// src/components/ExpandedBankTransactionRow/ExpandedBankTransactionRow.tsx
|
|
15297
15292
|
import {
|
|
15298
|
-
forwardRef as
|
|
15293
|
+
forwardRef as forwardRef13,
|
|
15299
15294
|
useImperativeHandle as useImperativeHandle2,
|
|
15300
15295
|
useState as useState28,
|
|
15301
15296
|
useCallback as useCallback14,
|
|
@@ -15430,7 +15425,7 @@ var Trash = (_a) => {
|
|
|
15430
15425
|
var Trash_default = Trash;
|
|
15431
15426
|
|
|
15432
15427
|
// src/components/BankTransactionReceipts/BankTransactionReceipts.tsx
|
|
15433
|
-
import { forwardRef as
|
|
15428
|
+
import { forwardRef as forwardRef12, useImperativeHandle } from "react";
|
|
15434
15429
|
|
|
15435
15430
|
// src/contexts/ReceiptsContext/ReceiptsContext.ts
|
|
15436
15431
|
import { createContext as createContext11, useContext as useContext18 } from "react";
|
|
@@ -15750,12 +15745,12 @@ var openReceiptInNewTab = (url, index) => (e) => {
|
|
|
15750
15745
|
`);
|
|
15751
15746
|
}
|
|
15752
15747
|
};
|
|
15753
|
-
var BankTransactionReceiptsWithProvider =
|
|
15748
|
+
var BankTransactionReceiptsWithProvider = forwardRef12((_a, ref) => {
|
|
15754
15749
|
var _b = _a, { bankTransaction, isActive } = _b, props = __objRest(_b, ["bankTransaction", "isActive"]);
|
|
15755
15750
|
return /* @__PURE__ */ jsx118(ReceiptsProvider, { bankTransaction, isActive, children: /* @__PURE__ */ jsx118(BankTransactionReceipts, __spreadProps(__spreadValues({}, props), { ref })) });
|
|
15756
15751
|
});
|
|
15757
15752
|
BankTransactionReceiptsWithProvider.displayName = "BankTransactionReceiptsWithProvider";
|
|
15758
|
-
var BankTransactionReceipts =
|
|
15753
|
+
var BankTransactionReceipts = forwardRef12(
|
|
15759
15754
|
({
|
|
15760
15755
|
classNamePrefix = "Layer",
|
|
15761
15756
|
floatingActions = false,
|
|
@@ -16619,7 +16614,7 @@ var validateSplit = (splitData) => {
|
|
|
16619
16614
|
});
|
|
16620
16615
|
return valid;
|
|
16621
16616
|
};
|
|
16622
|
-
var ExpandedBankTransactionRow =
|
|
16617
|
+
var ExpandedBankTransactionRow = forwardRef13(
|
|
16623
16618
|
({
|
|
16624
16619
|
bankTransaction,
|
|
16625
16620
|
isOpen = false,
|
|
@@ -19472,7 +19467,7 @@ function useBankTransactionsDownload() {
|
|
|
19472
19467
|
}
|
|
19473
19468
|
|
|
19474
19469
|
// src/components/utility/InvisibleDownload.tsx
|
|
19475
|
-
import { forwardRef as
|
|
19470
|
+
import { forwardRef as forwardRef14, useCallback as useCallback15, useImperativeHandle as useImperativeHandle3, useRef as useRef20 } from "react";
|
|
19476
19471
|
|
|
19477
19472
|
// src/utils/delay/runDelayed.ts
|
|
19478
19473
|
var DEFAULT_DELAY_MS = 50;
|
|
@@ -19493,7 +19488,7 @@ function useInvisibleDownload() {
|
|
|
19493
19488
|
return { invisibleDownloadRef, triggerInvisibleDownload };
|
|
19494
19489
|
}
|
|
19495
19490
|
var CLASS_NAME9 = "Layer__InvisibleDownload";
|
|
19496
|
-
var InvisibleDownload =
|
|
19491
|
+
var InvisibleDownload = forwardRef14((_props, ref) => {
|
|
19497
19492
|
const internalRef = useRef20(null);
|
|
19498
19493
|
useImperativeHandle3(ref, () => ({
|
|
19499
19494
|
trigger: (_0) => __async(null, [_0], function* ({ url }) {
|
|
@@ -23156,11 +23151,11 @@ import { useContext as useContext31 } from "react";
|
|
|
23156
23151
|
|
|
23157
23152
|
// src/components/Header/Header.tsx
|
|
23158
23153
|
import {
|
|
23159
|
-
forwardRef as
|
|
23154
|
+
forwardRef as forwardRef15
|
|
23160
23155
|
} from "react";
|
|
23161
23156
|
import classNames59 from "classnames";
|
|
23162
23157
|
import { jsx as jsx191 } from "react/jsx-runtime";
|
|
23163
|
-
var Header3 =
|
|
23158
|
+
var Header3 = forwardRef15(
|
|
23164
23159
|
({ className, children, style, sticky, asHeader, rounded }, ref) => {
|
|
23165
23160
|
const baseClassName = classNames59(
|
|
23166
23161
|
"Layer__header",
|
|
@@ -23256,7 +23251,7 @@ var Panel = ({
|
|
|
23256
23251
|
};
|
|
23257
23252
|
|
|
23258
23253
|
// src/components/View/View.tsx
|
|
23259
|
-
import { forwardRef as
|
|
23254
|
+
import { forwardRef as forwardRef16 } from "react";
|
|
23260
23255
|
|
|
23261
23256
|
// src/components/ViewHeader/ViewHeader.tsx
|
|
23262
23257
|
import classNames63 from "classnames";
|
|
@@ -23271,7 +23266,7 @@ var ViewHeader = ({ title, className, children }) => {
|
|
|
23271
23266
|
// src/components/View/View.tsx
|
|
23272
23267
|
import classNames64 from "classnames";
|
|
23273
23268
|
import { jsx as jsx196, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
23274
|
-
var View =
|
|
23269
|
+
var View = forwardRef16(
|
|
23275
23270
|
({
|
|
23276
23271
|
title,
|
|
23277
23272
|
showHeader = true,
|
|
@@ -23495,10 +23490,10 @@ function ProfitAndLossSummariesMiniChart({
|
|
|
23495
23490
|
}
|
|
23496
23491
|
|
|
23497
23492
|
// src/components/ui/Typography/MoneyText.tsx
|
|
23498
|
-
import { forwardRef as
|
|
23493
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
23499
23494
|
import { jsx as jsx200 } from "react/jsx-runtime";
|
|
23500
23495
|
var CLASS_NAME10 = "Layer__MoneyText";
|
|
23501
|
-
var MoneySpan =
|
|
23496
|
+
var MoneySpan = forwardRef17(
|
|
23502
23497
|
(_a, ref) => {
|
|
23503
23498
|
var _b = _a, { amount, bold, size } = _b, restProps = __objRest(_b, ["amount", "bold", "size"]);
|
|
23504
23499
|
const dataProperties = toDataProperties({
|
|
@@ -27983,20 +27978,19 @@ var JournalFormEntryLines = ({
|
|
|
27983
27978
|
className: "Layer__journal__form__input-group__line-item",
|
|
27984
27979
|
children: [
|
|
27985
27980
|
/* @__PURE__ */ jsx241(InputGroup, { name: direction, label: "Amount", inline: true, children: /* @__PURE__ */ jsx241(
|
|
27986
|
-
|
|
27981
|
+
AmountInput,
|
|
27987
27982
|
{
|
|
27988
27983
|
name: direction,
|
|
27989
|
-
|
|
27990
|
-
value:
|
|
27984
|
+
onChange: (value) => changeFormData("amount", value, idx2),
|
|
27985
|
+
value: item.amount,
|
|
27991
27986
|
disabled: sendingForm,
|
|
27992
|
-
|
|
27993
|
-
|
|
27994
|
-
|
|
27995
|
-
|
|
27996
|
-
|
|
27997
|
-
|
|
27998
|
-
|
|
27999
|
-
idx2
|
|
27987
|
+
allowNegativeValue: false,
|
|
27988
|
+
badge: /* @__PURE__ */ jsx241(
|
|
27989
|
+
Badge,
|
|
27990
|
+
{
|
|
27991
|
+
variant: item.direction === "CREDIT" ? "success" /* SUCCESS */ : "warning" /* WARNING */,
|
|
27992
|
+
children: humanizeEnum(direction)
|
|
27993
|
+
}
|
|
28000
27994
|
),
|
|
28001
27995
|
isInvalid: Boolean(
|
|
28002
27996
|
(_a = form == null ? void 0 : form.errors) == null ? void 0 : _a.lineItems.find(
|
package/dist/index.css
CHANGED
|
@@ -3217,7 +3217,10 @@
|
|
|
3217
3217
|
padding: var(--spacing-2xs);
|
|
3218
3218
|
color: var(--label-color);
|
|
3219
3219
|
}
|
|
3220
|
-
.Layer__amount-input {
|
|
3220
|
+
.Layer__amount-input--align-left {
|
|
3221
|
+
text-align: left;
|
|
3222
|
+
}
|
|
3223
|
+
.Layer__amount-input--align-right {
|
|
3221
3224
|
text-align: right;
|
|
3222
3225
|
}
|
|
3223
3226
|
.Layer__textarea {
|
package/dist/index.d.ts
CHANGED
|
@@ -2639,14 +2639,16 @@ declare module '@layerfi/components/components/IconBox/index' {
|
|
|
2639
2639
|
|
|
2640
2640
|
}
|
|
2641
2641
|
declare module '@layerfi/components/components/Input/AmountInput' {
|
|
2642
|
+
import { type ReactNode } from 'react';
|
|
2642
2643
|
import { CurrencyInputProps } from 'react-currency-input-field';
|
|
2643
2644
|
export interface AmountInputProps extends Omit<CurrencyInputProps, 'onChange'> {
|
|
2644
2645
|
onChange?: (value?: string) => void;
|
|
2645
2646
|
isInvalid?: boolean;
|
|
2646
2647
|
errorMessage?: string;
|
|
2647
2648
|
leftText?: string;
|
|
2649
|
+
badge?: ReactNode;
|
|
2648
2650
|
}
|
|
2649
|
-
export const AmountInput: ({ onChange, className, leftText, errorMessage, isInvalid, placeholder, ...props }: AmountInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
2651
|
+
export const AmountInput: ({ onChange, className, leftText, errorMessage, isInvalid, badge, placeholder, ...props }: AmountInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
2650
2652
|
|
|
2651
2653
|
}
|
|
2652
2654
|
declare module '@layerfi/components/components/Input/BusinessTypeSelect' {
|
|
@@ -4919,8 +4921,34 @@ declare module '@layerfi/components/components/ui/Stack/Stack' {
|
|
|
4919
4921
|
slot?: string;
|
|
4920
4922
|
className?: string;
|
|
4921
4923
|
}>;
|
|
4922
|
-
export
|
|
4923
|
-
|
|
4924
|
+
export const VStack: import("react").ForwardRefExoticComponent<{
|
|
4925
|
+
align?: "start" | "center";
|
|
4926
|
+
gap?: Spacing;
|
|
4927
|
+
justify?: "start" | "center" | "end";
|
|
4928
|
+
pbs?: Spacing;
|
|
4929
|
+
pbe?: Spacing;
|
|
4930
|
+
pis?: Spacing;
|
|
4931
|
+
pie?: Spacing;
|
|
4932
|
+
fluid?: boolean;
|
|
4933
|
+
slot?: string;
|
|
4934
|
+
className?: string;
|
|
4935
|
+
} & {
|
|
4936
|
+
children?: import("react").ReactNode | undefined;
|
|
4937
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
4938
|
+
export const HStack: import("react").ForwardRefExoticComponent<{
|
|
4939
|
+
align?: "start" | "center";
|
|
4940
|
+
gap?: Spacing;
|
|
4941
|
+
justify?: "start" | "center" | "end";
|
|
4942
|
+
pbs?: Spacing;
|
|
4943
|
+
pbe?: Spacing;
|
|
4944
|
+
pis?: Spacing;
|
|
4945
|
+
pie?: Spacing;
|
|
4946
|
+
fluid?: boolean;
|
|
4947
|
+
slot?: string;
|
|
4948
|
+
className?: string;
|
|
4949
|
+
} & {
|
|
4950
|
+
children?: import("react").ReactNode | undefined;
|
|
4951
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
4924
4952
|
export const Spacer: () => import("react/jsx-runtime").JSX.Element;
|
|
4925
4953
|
|
|
4926
4954
|
}
|