@layerfi/components 0.1.121 → 0.1.122-alpha

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.
@@ -65,15 +65,15 @@ import useSWRInfinite from "swr/infinite";
65
65
  import { useStoreWithEqualityFn } from "zustand/traditional";
66
66
  import { useFloating, offset, flip, shift, autoUpdate, useHover, useFocus, useDismiss, useRole, useInteractions, useTransitionStyles, useMergeRefs, FloatingPortal } from "@floating-ui/react";
67
67
  import useSWRMutation from "swr/mutation";
68
- import { Header as Header$3, Label as Label$1, Text as Text$1, ToggleButton, SelectionIndicator, ToggleButtonGroup, Button as Button$2, ModalOverlay as ModalOverlay$1, Modal as Modal$1, Dialog as Dialog$1, Heading as Heading$2, Group, SearchField as SearchField$1, Input as Input$2, Form as Form$1, TextField as TextField$1, FieldError as FieldError$1, Checkbox as Checkbox$1, DateField as DateField$1, DateInput as DateInput$1, DateSegment as DateSegment$1, DatePicker as DatePicker$2, NumberField as NumberField$1, RadioGroup as RadioGroup$1, Radio as Radio$1, Switch as Switch$1, TextArea as TextArea$1, MenuTrigger, Popover as Popover$1, Menu as Menu$1, MenuItem as MenuItem$2, GridList, GridListItem, DialogTrigger, composeRenderProps, Table as Table$2, Column as Column$1, Cell as Cell$1, TableHeader as TableHeader$1, TableBody as TableBody$2, Row as Row$1, Calendar as Calendar$1, CalendarGrid as CalendarGrid$1, CalendarGridBody as CalendarGridBody$1, CalendarCell as CalendarCell$1, CalendarGridHeader as CalendarGridHeader$1, CalendarHeaderCell as CalendarHeaderCell$1, Meter as Meter$1, Link as Link$2 } from "react-aria-components";
68
+ import { Header as Header$3, Label as Label$1, Text as Text$1, ToggleButton, SelectionIndicator, ToggleButtonGroup, Button as Button$2, ModalOverlay as ModalOverlay$1, Modal as Modal$1, Dialog as Dialog$1, Heading as Heading$2, Group, SearchField as SearchField$1, Input as Input$2, Form as Form$1, TextField as TextField$1, FieldError as FieldError$1, Checkbox as Checkbox$1, DateField as DateField$1, DateInput as DateInput$1, DateSegment as DateSegment$1, DatePicker as DatePicker$2, Calendar as Calendar$1, CalendarGrid as CalendarGrid$1, CalendarGridBody as CalendarGridBody$1, CalendarCell as CalendarCell$1, CalendarGridHeader as CalendarGridHeader$1, CalendarHeaderCell as CalendarHeaderCell$1, Popover as Popover$1, NumberField as NumberField$1, RadioGroup as RadioGroup$1, Radio as Radio$1, Switch as Switch$1, TextArea as TextArea$1, MenuTrigger, Menu as Menu$1, MenuItem as MenuItem$2, GridList, GridListItem, DialogTrigger, composeRenderProps, Table as Table$2, Column as Column$1, Cell as Cell$1, TableHeader as TableHeader$1, TableBody as TableBody$2, Row as Row$1, Meter as Meter$1, Link as Link$2, I18nProvider } from "react-aria-components";
69
69
  import { mergeRefs } from "react-merge-refs";
70
70
  import useResizeObserver from "@react-hook/resize-observer";
71
- import { LoaderCircle, X as X$1, UploadCloud as UploadCloud$1, Layers2Icon, Search, ChevronLeft as ChevronLeft$1, CopyIcon, FileSpreadsheet, FileDownIcon, Minus, Check as Check$1, Circle, RefreshCcw as RefreshCcw$1, MenuIcon, ChevronRight as ChevronRight$1, PencilRuler, Trash2, SearchX, CheckIcon, AlertCircle as AlertCircle$1, TriangleAlert, Hourglass, List, AlertTriangle, Save as Save$1, Plus as Plus$1, HandCoins, Menu as Menu$2, Send, Trash as Trash$1, Info, CheckCircle as CheckCircle$1, XCircle, RotateCcw, ExternalLink, Calendar as Calendar$2, ChevronDown as ChevronDown$1, Download, Users, Milestone, Video, Clock as Clock$1, Link as Link$3, Edit, Car, Archive, UserRoundPen } from "lucide-react";
71
+ import { LoaderCircle, X as X$1, UploadCloud as UploadCloud$1, Layers2Icon, Search, ChevronLeft as ChevronLeft$1, CopyIcon, FileSpreadsheet, FileDownIcon, Minus, Check as Check$1, TriangleAlert, Circle, RefreshCcw as RefreshCcw$1, MenuIcon, ChevronRight as ChevronRight$1, PencilRuler, Trash2, SearchX, CheckIcon, AlertCircle as AlertCircle$1, Hourglass, List, AlertTriangle, Save as Save$1, Plus as Plus$1, HandCoins, Menu as Menu$2, Send, Trash as Trash$1, Info, CheckCircle as CheckCircle$1, XCircle, RotateCcw, ExternalLink, Calendar as Calendar$2, ChevronDown as ChevronDown$1, Download, Users, Milestone, Video, Clock as Clock$1, Link as Link$3, Edit, Car, Archive, UserRoundPen } from "lucide-react";
72
72
  import pluralize from "pluralize";
73
73
  import ReactSelect, { components } from "react-select";
74
+ import CreatableSelect from "react-select/creatable";
74
75
  import { useDropzone } from "react-dropzone";
75
76
  import { createFormHookContexts, createFormHook, useForm as useForm$1, useStore as useStore$1, revalidateLogic } from "@tanstack/react-form";
76
- import BaseCreatableSelect from "react-select/creatable";
77
77
  import { useReactTable, getSortedRowModel, getCoreRowModel, flexRender, createColumnHelper, getPaginationRowModel, getExpandedRowModel } from "@tanstack/react-table";
78
78
  import { useVirtualizer } from "@tanstack/react-virtual";
79
79
  import { motion, AnimatePresence } from "motion/react";
@@ -208,7 +208,7 @@ class ErrorHandlerClass {
208
208
  }
209
209
  const errorHandler = new ErrorHandlerClass();
210
210
  const reportError = (payload) => errorHandler.onError(payload);
211
- const version = "0.1.121";
211
+ const version = "0.1.122-alpha";
212
212
  const pkg = {
213
213
  version
214
214
  };
@@ -2334,6 +2334,12 @@ Schema$1.Struct({
2334
2334
  Schema$1.fromKey("update_categorization_rules_suggestion")
2335
2335
  )
2336
2336
  });
2337
+ var BankTransactionsTableContent = /* @__PURE__ */ ((BankTransactionsTableContent2) => {
2338
+ BankTransactionsTableContent2["List"] = "List";
2339
+ BankTransactionsTableContent2["MobileList"] = "MobileList";
2340
+ BankTransactionsTableContent2["Table"] = "Table";
2341
+ return BankTransactionsTableContent2;
2342
+ })(BankTransactionsTableContent || {});
2337
2343
  const CategorizedCategories = [
2338
2344
  CategorizationStatus.CATEGORIZED,
2339
2345
  CategorizationStatus.SPLIT,
@@ -8139,11 +8145,11 @@ function buildCustomPlaceholder({
8139
8145
  "children"
8140
8146
  ]);
8141
8147
  if (!placeholder) return null;
8142
- return /* @__PURE__ */ jsx(components.Placeholder, __spreadProps(__spreadValues({}, restProps), { className: COMBO_BOX_CLASS_NAMES.PLACEHOLDER, children: /* @__PURE__ */ jsx(Span, { variant: "placeholder", ellipsis: true, children: placeholder }) }));
8148
+ return /* @__PURE__ */ jsx(components.Placeholder, __spreadProps(__spreadValues({}, restProps), { children: /* @__PURE__ */ jsx(Span, { variant: "inherit", ellipsis: true, children: placeholder }) }));
8143
8149
  };
8144
8150
  }
8145
8151
  function buildCustomSingleValue({
8146
- SelectedValue
8152
+ SingleValue
8147
8153
  }) {
8148
8154
  return function CustomSingleValue(_a) {
8149
8155
  var _b = _a, {
@@ -8151,7 +8157,8 @@ function buildCustomSingleValue({
8151
8157
  } = _b, restProps = __objRest(_b, [
8152
8158
  "children"
8153
8159
  ]);
8154
- return /* @__PURE__ */ jsx(components.SingleValue, __spreadProps(__spreadValues({}, restProps), { children: SelectedValue != null ? SelectedValue : children }));
8160
+ const defaultRenderedSingleValue = /* @__PURE__ */ jsx(Span, { ellipsis: true, children });
8161
+ return /* @__PURE__ */ jsx(components.SingleValue, __spreadProps(__spreadValues({}, restProps), { children: SingleValue ? /* @__PURE__ */ jsx(SingleValue, { option: restProps.data, fallback: defaultRenderedSingleValue }) : defaultRenderedSingleValue }));
8155
8162
  };
8156
8163
  }
8157
8164
  function useComboBoxSubcomponents({
@@ -8159,7 +8166,7 @@ function useComboBoxSubcomponents({
8159
8166
  slots,
8160
8167
  displayDisabledAsSelected
8161
8168
  }) {
8162
- const { EmptyMessage, SelectedValue, GroupHeading, Option: Option2 } = slots != null ? slots : {};
8169
+ const { EmptyMessage, SingleValue, GroupHeading, Option: Option2 } = slots != null ? slots : {};
8163
8170
  const ClearIndicatorRef = useRef(buildCustomClearIndicator());
8164
8171
  const DropdownIndicatorRef = useRef(buildCustomDropdownIndicator());
8165
8172
  const LoadingIndicatorRef = useRef(buildCustomLoadingIndicator());
@@ -8181,8 +8188,8 @@ function useComboBoxSubcomponents({
8181
8188
  [placeholder]
8182
8189
  );
8183
8190
  const SingleValueComponent = useMemo(
8184
- () => buildCustomSingleValue({ SelectedValue }),
8185
- [SelectedValue]
8191
+ () => buildCustomSingleValue({ SingleValue }),
8192
+ [SingleValue]
8186
8193
  );
8187
8194
  return useMemo(() => ({
8188
8195
  ClearIndicator: ClearIndicatorRef.current,
@@ -8212,6 +8219,7 @@ function useCommonComboBoxProps({
8212
8219
  slots,
8213
8220
  displayDisabledAsSelected,
8214
8221
  isDisabled,
8222
+ isError,
8215
8223
  isReadOnly = false,
8216
8224
  isClearable = true,
8217
8225
  isSearchable = true,
@@ -8234,10 +8242,14 @@ function useCommonComboBoxProps({
8234
8242
  COMBO_BOX_CLASS_NAMES.CONTROL,
8235
8243
  isFocused && `${COMBO_BOX_CLASS_NAMES.CONTROL}--focused`,
8236
8244
  isDisabled2 && `${COMBO_BOX_CLASS_NAMES.CONTROL}--disabled`,
8245
+ isError && `${COMBO_BOX_CLASS_NAMES.CONTROL}--error`,
8237
8246
  isReadOnly && `${COMBO_BOX_CLASS_NAMES.CONTROL}--readonly`
8238
8247
  ),
8239
8248
  valueContainer: () => COMBO_BOX_CLASS_NAMES.VALUE_CONTAINER,
8240
- placeholder: () => COMBO_BOX_CLASS_NAMES.PLACEHOLDER,
8249
+ placeholder: () => classNames(
8250
+ COMBO_BOX_CLASS_NAMES.PLACEHOLDER,
8251
+ isError && `${COMBO_BOX_CLASS_NAMES.PLACEHOLDER}--error`
8252
+ ),
8241
8253
  indicatorsContainer: () => classNames(
8242
8254
  COMBO_BOX_CLASS_NAMES.INDICATORS_CONTAINER,
8243
8255
  isReadOnly && `${COMBO_BOX_CLASS_NAMES.INDICATORS_CONTAINER}--readonly`
@@ -8245,7 +8257,7 @@ function useCommonComboBoxProps({
8245
8257
  menu: () => COMBO_BOX_CLASS_NAMES.MENU,
8246
8258
  menuList: () => COMBO_BOX_CLASS_NAMES.MENU_LIST,
8247
8259
  group: () => COMBO_BOX_CLASS_NAMES.GROUP
8248
- }), [isReadOnly]);
8260
+ }), [isError, isReadOnly]);
8249
8261
  const styles = useMemo(() => ({
8250
8262
  menuPortal: (base) => __spreadProps(__spreadValues({}, base), { zIndex: 101 })
8251
8263
  }), []);
@@ -8305,7 +8317,7 @@ function ComboBox(_la) {
8305
8317
  "selectedValue",
8306
8318
  "onSelectedValueChange"
8307
8319
  ]);
8308
- const commonSelectProps = useCommonComboBoxProps(__spreadValues({ className, slots }, props));
8320
+ const commonSelectProps = useCommonComboBoxProps(__spreadValues({ className, slots, isError }, props));
8309
8321
  return /* @__PURE__ */ jsxs(VStack, { gap: "3xs", fluid: true, className: className ? `${className}__Container` : void 0, children: [
8310
8322
  /* @__PURE__ */ jsx(ReactSelect, __spreadProps(__spreadValues({}, commonSelectProps), { value: selectedValue, onChange: onSelectedValueChange })),
8311
8323
  /* @__PURE__ */ jsx(ComboBoxErrorMessage, { isError, errorMessage: slots == null ? void 0 : slots.ErrorMessage })
@@ -8803,7 +8815,7 @@ const BankTransactionCategoryComboBox = ({
8803
8815
  const numMatchOptions = (matchGroup == null ? void 0 : matchGroup.options.length) || 0;
8804
8816
  const loadingSuggestions = bankTransaction && isLoadingSuggestions(bankTransaction) && selectedValue === null;
8805
8817
  const placeholder = numMatchOptions > 1 ? `${numMatchOptions} possible matches...` : loadingSuggestions ? "Generating suggestions..." : includeSuggestedMatches ? "Categorize or match..." : "Select category";
8806
- const SelectedValue = useMemo(() => {
8818
+ const SingleValue = useCallback(() => {
8807
8819
  return /* @__PURE__ */ jsx(BankTransactionsUncategorizedSelectedValue, { selectedValue });
8808
8820
  }, [selectedValue]);
8809
8821
  return /* @__PURE__ */ jsx(
@@ -8816,7 +8828,7 @@ const BankTransactionCategoryComboBox = ({
8816
8828
  selectedValue,
8817
8829
  placeholder,
8818
8830
  slots: {
8819
- SelectedValue,
8831
+ SingleValue,
8820
8832
  Option: BankTransactionCategoryComboBoxOption,
8821
8833
  GroupHeading: BankTransactionCategoryComboBoxGroupHeading
8822
8834
  },
@@ -9826,6 +9838,45 @@ function useCustomAccountParseCsv() {
9826
9838
  }
9827
9839
  );
9828
9840
  }
9841
+ const returnTrue = () => true;
9842
+ function CreatableComboBox(_Ba) {
9843
+ var _Ca = _Ba, {
9844
+ className,
9845
+ slots,
9846
+ isError,
9847
+ selectedValue,
9848
+ onSelectedValueChange,
9849
+ onCreateOption,
9850
+ formatCreateLabel: formatCreateLabel2,
9851
+ createOptionPosition = "first",
9852
+ isValidNewOption = returnTrue
9853
+ } = _Ca, props = __objRest(_Ca, [
9854
+ "className",
9855
+ "slots",
9856
+ "isError",
9857
+ "selectedValue",
9858
+ "onSelectedValueChange",
9859
+ "onCreateOption",
9860
+ "formatCreateLabel",
9861
+ "createOptionPosition",
9862
+ "isValidNewOption"
9863
+ ]);
9864
+ const commonSelectProps = useCommonComboBoxProps(__spreadValues({ className, slots, isError }, props));
9865
+ return /* @__PURE__ */ jsxs(VStack, { gap: "3xs", fluid: true, className: className ? `${className}__Container` : void 0, children: [
9866
+ /* @__PURE__ */ jsx(
9867
+ CreatableSelect,
9868
+ __spreadProps(__spreadValues({}, commonSelectProps), {
9869
+ value: selectedValue,
9870
+ onChange: onSelectedValueChange,
9871
+ onCreateOption,
9872
+ isValidNewOption,
9873
+ formatCreateLabel: formatCreateLabel2,
9874
+ createOptionPosition
9875
+ })
9876
+ ),
9877
+ /* @__PURE__ */ jsx(ComboBoxErrorMessage, { isError, errorMessage: slots == null ? void 0 : slots.ErrorMessage })
9878
+ ] });
9879
+ }
9829
9880
  const copyTextToClipboard = (text) => {
9830
9881
  navigator.clipboard.writeText(text).catch(() => {
9831
9882
  });
@@ -9842,8 +9893,8 @@ const CopyTemplateHeadersButtonGroup = ({ headers, className }) => {
9842
9893
  key
9843
9894
  )) });
9844
9895
  };
9845
- const CloseIcon = (_Ba) => {
9846
- var _Ca = _Ba, { size = 12 } = _Ca, props = __objRest(_Ca, ["size"]);
9896
+ const CloseIcon = (_Da) => {
9897
+ var _Ea = _Da, { size = 12 } = _Ea, props = __objRest(_Ea, ["size"]);
9847
9898
  return /* @__PURE__ */ jsxs(
9848
9899
  "svg",
9849
9900
  __spreadProps(__spreadValues({
@@ -10155,15 +10206,15 @@ function useCreateCustomAccount() {
10155
10206
  }
10156
10207
  const FORM_CLASS_NAME = "Layer__UI__Form";
10157
10208
  const Form = forwardRef(
10158
- function Form2(_Da, ref) {
10159
- var _Ea = _Da, { children, className } = _Ea, restProps = __objRest(_Ea, ["children", "className"]);
10209
+ function Form2(_Fa, ref) {
10210
+ var _Ga = _Fa, { children, className } = _Ga, restProps = __objRest(_Ga, ["children", "className"]);
10160
10211
  return /* @__PURE__ */ jsx(Form$1, __spreadProps(__spreadValues({}, restProps), { className: classNames(FORM_CLASS_NAME, className), ref, children }));
10161
10212
  }
10162
10213
  );
10163
10214
  const TEXT_FIELD_CLASS_NAME = "Layer__UI__TextField";
10164
10215
  const TextField = forwardRef(
10165
- function TextField2(_Fa, ref) {
10166
- var _Ga = _Fa, { children, inline, textarea, className } = _Ga, restProps = __objRest(_Ga, ["children", "inline", "textarea", "className"]);
10216
+ function TextField2(_Ha, ref) {
10217
+ var _Ia = _Ha, { children, inline, textarea, className } = _Ia, restProps = __objRest(_Ia, ["children", "inline", "textarea", "className"]);
10167
10218
  const dataProperties = toDataProperties({ inline, textarea });
10168
10219
  return /* @__PURE__ */ jsx(TextField$1, __spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), { className: classNames(TEXT_FIELD_CLASS_NAME, className), ref, children: withRenderProp(children, (node) => node) }));
10169
10220
  }
@@ -10293,8 +10344,8 @@ function formatBigDecimalToString(value, options2 = {
10293
10344
  }
10294
10345
  const INPUT_CLASS_NAME = "Layer__UI__Input";
10295
10346
  const Input$1 = forwardRef(
10296
- function Input2(_Ha, ref) {
10297
- var _Ia = _Ha, { inset, placement } = _Ia, restProps = __objRest(_Ia, ["inset", "placement"]);
10347
+ function Input2(_Ja, ref) {
10348
+ var _Ka = _Ja, { inset, placement } = _Ka, restProps = __objRest(_Ka, ["inset", "placement"]);
10298
10349
  const dataProperties = toDataProperties({ inset, placement });
10299
10350
  return /* @__PURE__ */ jsx(
10300
10351
  Input$2,
@@ -10305,39 +10356,17 @@ const Input$1 = forwardRef(
10305
10356
  );
10306
10357
  }
10307
10358
  );
10308
- const DEFAULT_MAX_VALUE = BigDecimal.fromBigInt(BigInt(1e7));
10309
- const DEFAULT_MIN_DECIMAL_PLACES = 0;
10310
- const DEFAULT_MAX_DECIMAL_PLACES = 3;
10311
10359
  const DECORATOR_CHARS_REGEX = /[,%$]/g;
10312
- const withForceUpdate = (value) => {
10313
- return Object.defineProperty(value, "__forceUpdate", {
10314
- value: Symbol(),
10315
- enumerable: true,
10316
- configurable: true,
10317
- writable: false
10318
- });
10319
- };
10320
- function FormBigDecimalField(_Ja) {
10321
- var _Ka = _Ja, {
10322
- mode = "decimal",
10323
- allowNegative = false,
10324
- maxValue = mode === "percent" ? BIG_DECIMAL_ONE : DEFAULT_MAX_VALUE,
10325
- minDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MIN_DECIMAL_PLACES,
10326
- maxDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MAX_DECIMAL_PLACES,
10327
- slots,
10328
- placeholder
10329
- } = _Ka, restProps = __objRest(_Ka, [
10330
- "mode",
10331
- "allowNegative",
10332
- "maxValue",
10333
- "minDecimalPlaces",
10334
- "maxDecimalPlaces",
10335
- "slots",
10336
- "placeholder"
10337
- ]);
10338
- const field = useFieldContext();
10339
- const { name, state, handleChange, handleBlur } = field;
10340
- const { value } = state;
10360
+ function useBigDecimalInput({
10361
+ value,
10362
+ onChange,
10363
+ onBlur,
10364
+ mode,
10365
+ maxValue,
10366
+ maxDecimalPlaces,
10367
+ minDecimalPlaces,
10368
+ allowNegative
10369
+ }) {
10341
10370
  const formattingProps = useMemo(() => ({
10342
10371
  minDecimalPlaces,
10343
10372
  maxDecimalPlaces,
@@ -10359,11 +10388,11 @@ function FormBigDecimalField(_Ja) {
10359
10388
  const normalized = BigDecimal.normalize(adjustedForPercent);
10360
10389
  const clamped = BigDecimal.min(normalized, maxValue);
10361
10390
  if (!BigDecimal.equals(clamped, value)) {
10362
- handleChange(withForceUpdate(clamped));
10391
+ onChange(clamped);
10363
10392
  }
10364
- handleBlur();
10393
+ onBlur();
10365
10394
  setInputValue(formatBigDecimalToString(clamped, formattingProps));
10366
- }, [inputValue, mode, maxValue, maxDecimalPlaces, value, handleBlur, formattingProps, handleChange]);
10395
+ }, [inputValue, maxDecimalPlaces, mode, maxValue, value, onBlur, formattingProps, onChange]);
10367
10396
  const allowedChars = useMemo(
10368
10397
  () => buildDecimalCharRegex({ allowNegative, allowPercent: mode === "percent", allowDollar: mode === "currency" }),
10369
10398
  [allowNegative, mode]
@@ -10382,6 +10411,48 @@ function FormBigDecimalField(_Ja) {
10382
10411
  useEffect(() => {
10383
10412
  setInputValue(formatBigDecimalToString(value, formattingProps));
10384
10413
  }, [value, formattingProps]);
10414
+ return {
10415
+ inputValue,
10416
+ onInputChange,
10417
+ onInputBlur,
10418
+ onBeforeInput,
10419
+ onPaste
10420
+ };
10421
+ }
10422
+ const DEFAULT_MAX_VALUE$1 = BigDecimal.fromBigInt(BigInt(1e7));
10423
+ const DEFAULT_MIN_DECIMAL_PLACES$1 = 0;
10424
+ const DEFAULT_MAX_DECIMAL_PLACES$1 = 3;
10425
+ function FormBigDecimalField(_La) {
10426
+ var _Ma = _La, {
10427
+ mode = "decimal",
10428
+ allowNegative = false,
10429
+ maxValue = mode === "percent" ? BIG_DECIMAL_ONE : DEFAULT_MAX_VALUE$1,
10430
+ minDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MIN_DECIMAL_PLACES$1,
10431
+ maxDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MAX_DECIMAL_PLACES$1,
10432
+ slots,
10433
+ placeholder
10434
+ } = _Ma, restProps = __objRest(_Ma, [
10435
+ "mode",
10436
+ "allowNegative",
10437
+ "maxValue",
10438
+ "minDecimalPlaces",
10439
+ "maxDecimalPlaces",
10440
+ "slots",
10441
+ "placeholder"
10442
+ ]);
10443
+ const field = useFieldContext();
10444
+ const { name, state, handleChange, handleBlur } = field;
10445
+ const { value } = state;
10446
+ const { inputValue, onInputChange, onInputBlur, onBeforeInput, onPaste } = useBigDecimalInput({
10447
+ value,
10448
+ onChange: handleChange,
10449
+ onBlur: handleBlur,
10450
+ mode,
10451
+ maxValue,
10452
+ maxDecimalPlaces,
10453
+ minDecimalPlaces,
10454
+ allowNegative
10455
+ });
10385
10456
  return /* @__PURE__ */ jsx(BaseFormTextField, __spreadProps(__spreadValues({}, restProps), { inputMode: "decimal", children: /* @__PURE__ */ jsxs(InputGroup$1, { slot: "input", actionCount: slots ? 2 : void 0, children: [
10386
10457
  /* @__PURE__ */ jsx(
10387
10458
  Input$1,
@@ -10406,8 +10477,8 @@ const CHECK_SIZE = {
10406
10477
  md: 14,
10407
10478
  lg: 16
10408
10479
  };
10409
- function Checkbox(_La) {
10410
- var _Ma = _La, { children, className, variant = "default", size = "sm", isIndeterminate } = _Ma, props = __objRest(_Ma, ["children", "className", "variant", "size", "isIndeterminate"]);
10480
+ function Checkbox(_Na) {
10481
+ var _Oa = _Na, { children, className, variant = "default", size = "sm", isIndeterminate } = _Oa, props = __objRest(_Oa, ["children", "className", "variant", "size", "isIndeterminate"]);
10411
10482
  const dataProperties = useMemo(() => toDataProperties({
10412
10483
  size,
10413
10484
  variant,
@@ -10425,8 +10496,8 @@ function Checkbox(_La) {
10425
10496
  })
10426
10497
  );
10427
10498
  }
10428
- function CheckboxWithTooltip(_Na) {
10429
- var _Oa = _Na, { tooltip } = _Oa, props = __objRest(_Oa, ["tooltip"]);
10499
+ function CheckboxWithTooltip(_Pa) {
10500
+ var _Qa = _Pa, { tooltip } = _Qa, props = __objRest(_Qa, ["tooltip"]);
10430
10501
  return /* @__PURE__ */ jsx("div", { className: "Layer__checkbox-wrapper", children: /* @__PURE__ */ jsxs(DeprecatedTooltip, { disabled: !tooltip, children: [
10431
10502
  /* @__PURE__ */ jsx(DeprecatedTooltipTrigger, { className: "Layer__input-tooltip", children: /* @__PURE__ */ jsx(Checkbox, __spreadValues({}, props)) }),
10432
10503
  /* @__PURE__ */ jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", children: tooltip })
@@ -10470,10 +10541,11 @@ function FormCheckboxField({
10470
10541
  })
10471
10542
  );
10472
10543
  }
10544
+ const DATE_PICKER_CLASS_NAME = "Layer__UI__DatePicker";
10473
10545
  const DATE_FIELD_CLASS_NAME = "Layer__UI__DateField";
10474
10546
  const DateField = forwardRef(
10475
- function DateField2(_Pa, ref) {
10476
- var _Qa = _Pa, { inline, className, isReadOnly } = _Qa, restProps = __objRest(_Qa, ["inline", "className", "isReadOnly"]);
10547
+ function DateField2(_Ra, ref) {
10548
+ var _Sa = _Ra, { inline, className, isReadOnly } = _Sa, restProps = __objRest(_Sa, ["inline", "className", "isReadOnly"]);
10477
10549
  const dataProperties = toDataProperties({ inline, readonly: isReadOnly });
10478
10550
  return /* @__PURE__ */ jsx(
10479
10551
  DateField$1,
@@ -10487,8 +10559,8 @@ const DateField = forwardRef(
10487
10559
  );
10488
10560
  const DATE_INPUT_CLASS_NAME = "Layer__UI__DateInput";
10489
10561
  const DateInput = forwardRef(
10490
- function DateInput2(_Ra, ref) {
10491
- var _Sa = _Ra, { inset, pointerEvents } = _Sa, restProps = __objRest(_Sa, ["inset", "pointerEvents"]);
10562
+ function DateInput2(_Ta, ref) {
10563
+ var _Ua = _Ta, { inset, pointerEvents } = _Ua, restProps = __objRest(_Ua, ["inset", "pointerEvents"]);
10492
10564
  const dataProperties = toDataProperties({ inset, "pointer-events": pointerEvents });
10493
10565
  return /* @__PURE__ */ jsx(
10494
10566
  DateInput$1,
@@ -10501,8 +10573,8 @@ const DateInput = forwardRef(
10501
10573
  );
10502
10574
  const DATE_SEGMENT_CLASS_NAME = "Layer__UI__DateSegment";
10503
10575
  const DateSegment = forwardRef(
10504
- function DateSegment2(_Ta, ref) {
10505
- var _Ua = _Ta, { isReadOnly } = _Ua, restProps = __objRest(_Ua, ["isReadOnly"]);
10576
+ function DateSegment2(_Va, ref) {
10577
+ var _Wa = _Va, { isReadOnly } = _Wa, restProps = __objRest(_Wa, ["isReadOnly"]);
10506
10578
  const dataProperties = toDataProperties({ interactive: !isReadOnly });
10507
10579
  return /* @__PURE__ */ jsx(
10508
10580
  DateSegment$1,
@@ -10513,13 +10585,13 @@ const DateSegment = forwardRef(
10513
10585
  );
10514
10586
  }
10515
10587
  );
10516
- const DATE_PICKER_CLASS_NAME = "Layer__UI__DatePicker";
10517
10588
  const DatePicker$1 = forwardRef(
10518
- function DatePicker2(props, ref) {
10589
+ function DatePicker2(_Xa, ref) {
10590
+ var _Ya = _Xa, { className } = _Ya, restProps = __objRest(_Ya, ["className"]);
10519
10591
  return /* @__PURE__ */ jsx(
10520
10592
  DatePicker$2,
10521
- __spreadProps(__spreadValues({}, props), {
10522
- className: DATE_PICKER_CLASS_NAME,
10593
+ __spreadProps(__spreadValues({}, restProps), {
10594
+ className: classNames(DATE_PICKER_CLASS_NAME, className),
10523
10595
  ref
10524
10596
  })
10525
10597
  );
@@ -10581,10 +10653,349 @@ function FormDateField({
10581
10653
  })
10582
10654
  );
10583
10655
  }
10656
+ const ChevronLeft = (_Za) => {
10657
+ var props = __objRest(_Za, []);
10658
+ return /* @__PURE__ */ jsx(
10659
+ "svg",
10660
+ __spreadProps(__spreadValues({
10661
+ xmlns: "http://www.w3.org/2000/svg",
10662
+ width: "18",
10663
+ height: "18",
10664
+ viewBox: "0 0 18 18",
10665
+ fill: "none"
10666
+ }, props), {
10667
+ children: /* @__PURE__ */ jsx(
10668
+ "path",
10669
+ {
10670
+ d: "M11.25 13.5L6.75 9L11.25 4.5",
10671
+ stroke: "currentColor",
10672
+ strokeLinecap: "round",
10673
+ strokeLinejoin: "round"
10674
+ }
10675
+ )
10676
+ })
10677
+ );
10678
+ };
10679
+ const CALENDAR_CLASS_NAME = "Layer__UI__Calendar";
10680
+ const Calendar = forwardRef(
10681
+ function Calendar2(__a, ref) {
10682
+ var _$a = __a, { className, isReadOnly } = _$a, restProps = __objRest(_$a, ["className", "isReadOnly"]);
10683
+ const dataProperties = toDataProperties({ readonly: isReadOnly });
10684
+ return /* @__PURE__ */ jsx(
10685
+ Calendar$1,
10686
+ __spreadProps(__spreadValues(__spreadValues({}, dataProperties), restProps), {
10687
+ isReadOnly,
10688
+ className: classNames(CALENDAR_CLASS_NAME, className),
10689
+ ref
10690
+ })
10691
+ );
10692
+ }
10693
+ );
10694
+ const CALENDAR_GRID_CLASS_NAME = "Layer__UI__CalendarGrid";
10695
+ const CalendarGrid = forwardRef(
10696
+ function CalendarGrid2(_ab, ref) {
10697
+ var _bb = _ab, { className } = _bb, restProps = __objRest(_bb, ["className"]);
10698
+ return /* @__PURE__ */ jsx(
10699
+ CalendarGrid$1,
10700
+ __spreadProps(__spreadValues({}, restProps), {
10701
+ className: classNames(CALENDAR_GRID_CLASS_NAME, className),
10702
+ ref
10703
+ })
10704
+ );
10705
+ }
10706
+ );
10707
+ const CALENDAR_GRID_BODY_CLASS_NAME = "Layer__UI__CalendarGridBody";
10708
+ const CalendarGridBody = forwardRef(
10709
+ function CalendarGridBody2(_cb, ref) {
10710
+ var _db = _cb, { className } = _db, restProps = __objRest(_db, ["className"]);
10711
+ return /* @__PURE__ */ jsx(
10712
+ CalendarGridBody$1,
10713
+ __spreadProps(__spreadValues({}, restProps), {
10714
+ className: classNames(CALENDAR_GRID_BODY_CLASS_NAME, className),
10715
+ ref
10716
+ })
10717
+ );
10718
+ }
10719
+ );
10720
+ const CALENDAR_CELL_CLASS_NAME = "Layer__UI__CalendarCell";
10721
+ const CalendarCell = forwardRef(
10722
+ function CalendarCell2(_eb, ref) {
10723
+ var _fb = _eb, { className, size = "sm" } = _fb, restProps = __objRest(_fb, ["className", "size"]);
10724
+ const dataProperties = toDataProperties({ size });
10725
+ return /* @__PURE__ */ jsx(
10726
+ CalendarCell$1,
10727
+ __spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
10728
+ className: classNames(CALENDAR_CELL_CLASS_NAME, className),
10729
+ ref
10730
+ })
10731
+ );
10732
+ }
10733
+ );
10734
+ const CALENDAR_GRID_HEADER_CLASS_NAME = "Layer__UI__CalendarGridHeader";
10735
+ const CalendarGridHeader = forwardRef(
10736
+ function CalendarGridHeader2(_gb, ref) {
10737
+ var _hb = _gb, { className } = _hb, restProps = __objRest(_hb, ["className"]);
10738
+ return /* @__PURE__ */ jsx(
10739
+ CalendarGridHeader$1,
10740
+ __spreadProps(__spreadValues({}, restProps), {
10741
+ className: classNames(CALENDAR_GRID_HEADER_CLASS_NAME, className),
10742
+ ref
10743
+ })
10744
+ );
10745
+ }
10746
+ );
10747
+ const CALENDAR_HEADER_CELL_CLASS_NAME = "Layer__UI__CalendarHeaderCell";
10748
+ const CalendarHeaderCell = forwardRef(
10749
+ function CalendarHeaderCell2(_ib, ref) {
10750
+ var _jb = _ib, { className, size = "sm" } = _jb, restProps = __objRest(_jb, ["className", "size"]);
10751
+ const dataProperties = toDataProperties({ size });
10752
+ return /* @__PURE__ */ jsx(
10753
+ CalendarHeaderCell$1,
10754
+ __spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
10755
+ className: classNames(CALENDAR_HEADER_CELL_CLASS_NAME, className),
10756
+ ref
10757
+ })
10758
+ );
10759
+ }
10760
+ );
10761
+ const DateCalendar = ({ minDate, maxDate, variant }) => {
10762
+ return /* @__PURE__ */ jsxs(Calendar, { minValue: minDate, maxValue: maxDate, children: [
10763
+ /* @__PURE__ */ jsxs(HStack, { align: "center", justify: "space-between", pb: "xs", pi: "xs", className: "Layer__DateCalendar__Header", children: [
10764
+ /* @__PURE__ */ jsx(Button, { icon: true, inset: true, variant: "ghost", slot: "previous", children: /* @__PURE__ */ jsx(ChevronLeft, { size: 20 }) }),
10765
+ /* @__PURE__ */ jsx(Heading$1, { weight: "normal", size: "sm" }),
10766
+ /* @__PURE__ */ jsx(Button, { icon: true, inset: true, variant: "ghost", slot: "next", children: /* @__PURE__ */ jsx(ChevronRight, { size: 20 }) })
10767
+ ] }),
10768
+ /* @__PURE__ */ jsx(HStack, { pb: "xs", pi: "xs", children: /* @__PURE__ */ jsxs(CalendarGrid, { children: [
10769
+ /* @__PURE__ */ jsx(CalendarGridHeader, { children: (day) => /* @__PURE__ */ jsx(CalendarHeaderCell, { size: variant === "mobile" ? "md" : "sm", children: day }) }),
10770
+ /* @__PURE__ */ jsx(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx(CalendarCell, { date, size: variant === "mobile" ? "md" : "sm" }) })
10771
+ ] }) })
10772
+ ] });
10773
+ };
10774
+ const PickerDropdownIndicator = ({ onClick }) => /* @__PURE__ */ jsx(Button$2, { className: "Layer__PickerDropdownIndicator", onPress: onClick, children: /* @__PURE__ */ jsx(ChevronDown, { size: 16 }) });
10775
+ const DatePickerInput = ({ errorText, variant, onClick, isReadOnly }) => {
10776
+ const errorTriangle = useMemo(() => {
10777
+ if (variant === "mobile" || !errorText) return null;
10778
+ return /* @__PURE__ */ jsxs(DeprecatedTooltip, { offset: 12, children: [
10779
+ /* @__PURE__ */ jsx(DeprecatedTooltipTrigger, { children: /* @__PURE__ */ jsx(FieldError, { children: /* @__PURE__ */ jsx(TriangleAlert, { size: 18 }) }) }),
10780
+ /* @__PURE__ */ jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", width: "md", children: errorText })
10781
+ ] });
10782
+ }, [errorText, variant]);
10783
+ if (variant === "mobile") {
10784
+ return /* @__PURE__ */ jsx(InputGroup$1, { slot: "input", isInvalid: !!errorText, onClick: isReadOnly ? void 0 : onClick, children: /* @__PURE__ */ jsx(DateInput, { inset: true, pointerEvents: "none", children: (segment) => /* @__PURE__ */ jsx(DateSegment, { isReadOnly: true, segment }) }) });
10785
+ }
10786
+ return /* @__PURE__ */ jsxs(InputGroup$1, { slot: "input", isInvalid: !!errorText, children: [
10787
+ /* @__PURE__ */ jsx(DateInput, { inset: true, children: (segment) => /* @__PURE__ */ jsx(DateSegment, { segment, isReadOnly }) }),
10788
+ /* @__PURE__ */ jsxs(HStack, { gap: "3xs", align: "center", pie: "4xs", children: [
10789
+ errorTriangle,
10790
+ !isReadOnly && /* @__PURE__ */ jsx(PickerDropdownIndicator, { onClick })
10791
+ ] })
10792
+ ] });
10793
+ };
10794
+ const POPOVER_CLASS_NAME = "Layer__Popover";
10795
+ const POPOVER_CLASS_NAMES = `Layer__Portal ${POPOVER_CLASS_NAME}`;
10796
+ const Popover = forwardRef(
10797
+ function Popover2(_kb, ref) {
10798
+ var _lb = _kb, { flexInline = false } = _lb, restProps = __objRest(_lb, ["flexInline"]);
10799
+ const dataProperties = toDataProperties({ "flex-inline": flexInline });
10800
+ return /* @__PURE__ */ jsx(
10801
+ Popover$1,
10802
+ __spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
10803
+ className: POPOVER_CLASS_NAMES,
10804
+ ref
10805
+ })
10806
+ );
10807
+ }
10808
+ );
10809
+ function ResponsivePopover({ children, triggerRef }) {
10810
+ const { isMobile } = useSizeClass();
10811
+ if (isMobile) {
10812
+ return /* @__PURE__ */ jsx(
10813
+ Modal,
10814
+ {
10815
+ flexBlock: true,
10816
+ flexInline: true,
10817
+ variant: "mobile-popover",
10818
+ isDismissable: true,
10819
+ children
10820
+ }
10821
+ );
10822
+ }
10823
+ return /* @__PURE__ */ jsx(
10824
+ Popover,
10825
+ {
10826
+ triggerRef,
10827
+ placement: "bottom left",
10828
+ flexInline: true,
10829
+ children
10830
+ }
10831
+ );
10832
+ }
10833
+ const DatePicker = ({
10834
+ label,
10835
+ showLabel = true,
10836
+ date,
10837
+ minDate,
10838
+ maxDate,
10839
+ isInvalid,
10840
+ errorText,
10841
+ onBlur,
10842
+ onChange,
10843
+ isDisabled,
10844
+ isReadOnly,
10845
+ className,
10846
+ slotProps
10847
+ }) => {
10848
+ const additionalAriaProps = !showLabel && { "aria-label": label };
10849
+ const { value } = useSizeClass();
10850
+ const [isPopoverOpen, setPopoverOpen] = useState(false);
10851
+ return /* @__PURE__ */ jsxs(
10852
+ DatePicker$1,
10853
+ __spreadProps(__spreadValues({
10854
+ granularity: "day",
10855
+ value: date,
10856
+ onBlur,
10857
+ onChange,
10858
+ isInvalid
10859
+ }, additionalAriaProps), {
10860
+ isOpen: isPopoverOpen,
10861
+ onOpenChange: setPopoverOpen,
10862
+ isDisabled,
10863
+ isReadOnly,
10864
+ className: classNames(DATE_PICKER_CLASS_NAME, className),
10865
+ children: [
10866
+ showLabel && /* @__PURE__ */ jsx(Label, __spreadProps(__spreadValues({ slot: "label", size: "sm" }, slotProps == null ? void 0 : slotProps.Label), { children: label })),
10867
+ /* @__PURE__ */ jsx(DatePickerInput, { errorText, variant: value, onClick: () => setPopoverOpen(true), isReadOnly }),
10868
+ /* @__PURE__ */ jsx(ResponsivePopover, { children: /* @__PURE__ */ jsx(Dialog$1, { children: /* @__PURE__ */ jsx(DateCalendar, { minDate, maxDate, variant: value }) }) })
10869
+ ]
10870
+ })
10871
+ );
10872
+ };
10873
+ const FORM_DATE_PICKER_FIELD_CLASSNAME = "Layer__FormDatePickerField";
10874
+ function FormDatePickerField({
10875
+ label,
10876
+ className,
10877
+ inline = false,
10878
+ showLabel = true,
10879
+ showFieldError = true,
10880
+ isReadOnly = false,
10881
+ minDate,
10882
+ maxDate
10883
+ }) {
10884
+ const field = useFieldContext();
10885
+ const { state, handleChange, handleBlur } = field;
10886
+ const { meta, value } = state;
10887
+ const { errors, isValid: isValid2 } = meta;
10888
+ const [localDate, setLocalDate] = useState(value);
10889
+ useEffect(() => {
10890
+ setLocalDate(value);
10891
+ }, [value]);
10892
+ const onChange = useCallback((newValue) => {
10893
+ setLocalDate(newValue);
10894
+ }, []);
10895
+ const onBlur = useCallback(() => {
10896
+ handleChange(localDate);
10897
+ handleBlur();
10898
+ }, [handleBlur, handleChange, localDate]);
10899
+ const errorMessage = errors.length !== 0 ? errors[0] : void 0;
10900
+ const shouldShowErrorMessage = showFieldError && errorMessage;
10901
+ const datePickerClassNames = classNames(
10902
+ FORM_DATE_PICKER_FIELD_CLASSNAME,
10903
+ inline && `${FORM_DATE_PICKER_FIELD_CLASSNAME}--inline`,
10904
+ className
10905
+ );
10906
+ return /* @__PURE__ */ jsx(
10907
+ DatePicker,
10908
+ {
10909
+ label,
10910
+ showLabel,
10911
+ date: localDate,
10912
+ onChange,
10913
+ onBlur,
10914
+ minDate,
10915
+ maxDate,
10916
+ isInvalid: !isValid2,
10917
+ errorText: shouldShowErrorMessage ? errorMessage : null,
10918
+ isReadOnly,
10919
+ className: datePickerClassNames
10920
+ }
10921
+ );
10922
+ }
10923
+ const NonRecursiveBigDecimalSchema = Schema.Struct({
10924
+ value: Schema.BigIntFromSelf,
10925
+ scale: Schema.Int
10926
+ });
10927
+ const NRBD_ZERO = { value: /* @__PURE__ */ BigInt("0"), scale: 0 };
10928
+ const NRBD_ONE = { value: /* @__PURE__ */ BigInt("1"), scale: 0 };
10929
+ const toNonRecursiveBigDecimal = (bd) => {
10930
+ const normalized = BigDecimal.normalize(bd);
10931
+ return { value: normalized.value, scale: normalized.scale };
10932
+ };
10933
+ const fromNonRecursiveBigDecimal = (nrbd) => {
10934
+ return BigDecimal.make(nrbd.value, nrbd.scale);
10935
+ };
10936
+ const nrbdEquals = (a, b) => {
10937
+ return BigDecimal.equals(fromNonRecursiveBigDecimal(a), fromNonRecursiveBigDecimal(b));
10938
+ };
10939
+ const DEFAULT_MAX_VALUE = BigDecimal.fromBigInt(BigInt(1e7));
10940
+ const DEFAULT_MIN_DECIMAL_PLACES = 0;
10941
+ const DEFAULT_MAX_DECIMAL_PLACES = 3;
10942
+ function FormNonRecursiveBigDecimalField(_mb) {
10943
+ var _nb = _mb, {
10944
+ mode = "decimal",
10945
+ allowNegative = false,
10946
+ maxValue = mode === "percent" ? BIG_DECIMAL_ONE : DEFAULT_MAX_VALUE,
10947
+ minDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MIN_DECIMAL_PLACES,
10948
+ maxDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MAX_DECIMAL_PLACES,
10949
+ slots,
10950
+ placeholder
10951
+ } = _nb, restProps = __objRest(_nb, [
10952
+ "mode",
10953
+ "allowNegative",
10954
+ "maxValue",
10955
+ "minDecimalPlaces",
10956
+ "maxDecimalPlaces",
10957
+ "slots",
10958
+ "placeholder"
10959
+ ]);
10960
+ const field = useFieldContext();
10961
+ const { name, state, handleChange, handleBlur } = field;
10962
+ const { value: nrbdValue } = state;
10963
+ const value = useMemo(() => fromNonRecursiveBigDecimal(nrbdValue), [nrbdValue]);
10964
+ const onChange = useCallback((bd) => {
10965
+ handleChange(toNonRecursiveBigDecimal(bd));
10966
+ }, [handleChange]);
10967
+ const { inputValue, onInputChange, onInputBlur, onBeforeInput, onPaste } = useBigDecimalInput({
10968
+ value,
10969
+ onChange,
10970
+ onBlur: handleBlur,
10971
+ mode,
10972
+ maxValue,
10973
+ maxDecimalPlaces,
10974
+ minDecimalPlaces,
10975
+ allowNegative
10976
+ });
10977
+ return /* @__PURE__ */ jsx(BaseFormTextField, __spreadProps(__spreadValues({}, restProps), { inputMode: "decimal", children: /* @__PURE__ */ jsxs(InputGroup$1, { slot: "input", actionCount: slots ? 2 : void 0, children: [
10978
+ /* @__PURE__ */ jsx(
10979
+ Input$1,
10980
+ {
10981
+ inset: true,
10982
+ id: name,
10983
+ name,
10984
+ value: inputValue,
10985
+ onChange: onInputChange,
10986
+ onBlur: onInputBlur,
10987
+ onBeforeInput,
10988
+ onPaste,
10989
+ placeholder
10990
+ }
10991
+ ),
10992
+ (slots == null ? void 0 : slots.badge) && /* @__PURE__ */ jsx(HStack, { children: slots.badge })
10993
+ ] }) }));
10994
+ }
10584
10995
  const NUMBER_FIELD_CLASS_NAME = "Layer__UI__NumberField";
10585
10996
  const NumberField = forwardRef(
10586
- function NumberField2(_Va, ref) {
10587
- var _Wa = _Va, { inline, className, isReadOnly } = _Wa, restProps = __objRest(_Wa, ["inline", "className", "isReadOnly"]);
10997
+ function NumberField2(_ob, ref) {
10998
+ var _pb = _ob, { inline, className, isReadOnly } = _pb, restProps = __objRest(_pb, ["inline", "className", "isReadOnly"]);
10588
10999
  const dataProperties = toDataProperties({ inline, readonly: isReadOnly });
10589
11000
  return /* @__PURE__ */ jsx(
10590
11001
  NumberField$1,
@@ -10653,17 +11064,13 @@ function FormNumberField({
10653
11064
  }
10654
11065
  const RADIO_GROUP_CLASS_NAME = "Layer__RadioGroup";
10655
11066
  const RADIO_CLASS_NAME = "Layer__Radio";
10656
- const INDICATOR_SIZE = {
10657
- sm: 8,
10658
- md: 10,
10659
- lg: 12
10660
- };
10661
- function RadioGroup(_Xa) {
10662
- var _Ya = _Xa, {
11067
+ const INDICATOR_SIZE = 10;
11068
+ function RadioGroup(_qb) {
11069
+ var _rb = _qb, {
10663
11070
  children,
10664
11071
  className,
10665
11072
  onChange
10666
- } = _Ya, restProps = __objRest(_Ya, [
11073
+ } = _rb, restProps = __objRest(_rb, [
10667
11074
  "children",
10668
11075
  "className",
10669
11076
  "onChange"
@@ -10677,26 +11084,20 @@ function RadioGroup(_Xa) {
10677
11084
  })
10678
11085
  );
10679
11086
  }
10680
- function Radio(_Za) {
10681
- var __a = _Za, {
11087
+ function Radio(_sb) {
11088
+ var _tb = _sb, {
10682
11089
  children,
10683
- className,
10684
- size = "sm"
10685
- } = __a, restProps = __objRest(__a, [
11090
+ className
11091
+ } = _tb, restProps = __objRest(_tb, [
10686
11092
  "children",
10687
- "className",
10688
- "size"
11093
+ "className"
10689
11094
  ]);
10690
- const dataProperties = useMemo(() => toDataProperties({
10691
- size,
10692
- labeled: typeof children === "string" && children.length > 0
10693
- }), [children, size]);
10694
11095
  return /* @__PURE__ */ jsx(
10695
11096
  Radio$1,
10696
- __spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
11097
+ __spreadProps(__spreadValues({}, restProps), {
10697
11098
  className: classNames(RADIO_CLASS_NAME, className),
10698
11099
  children: withRenderProp(children, (node) => /* @__PURE__ */ jsxs(Fragment, { children: [
10699
- /* @__PURE__ */ jsx("div", { slot: "radio", children: /* @__PURE__ */ jsx(Circle, { size: INDICATOR_SIZE[size] }) }),
11100
+ /* @__PURE__ */ jsx("div", { slot: "radio", children: /* @__PURE__ */ jsx(Circle, { size: INDICATOR_SIZE }) }),
10700
11101
  node
10701
11102
  ] }))
10702
11103
  })
@@ -10717,7 +11118,6 @@ function FormRadioGroupField({
10717
11118
  const { name, state, handleChange, handleBlur } = field;
10718
11119
  const { meta, value } = state;
10719
11120
  const { errors, isValid: isValid2 } = meta;
10720
- const errorMessage = errors.length !== 0 ? errors[0] : void 0;
10721
11121
  const labelId = useId();
10722
11122
  const additionalAriaProps = showLabel ? { "aria-labelledby": labelId } : { "aria-label": label };
10723
11123
  const radioGroupClassNames = classNames(
@@ -10725,25 +11125,30 @@ function FormRadioGroupField({
10725
11125
  inline && `${FORM_RADIO_GROUP_FIELD_CLASSNAME$1}--inline`,
10726
11126
  className
10727
11127
  );
10728
- return /* @__PURE__ */ jsxs("div", { className: radioGroupClassNames, children: [
10729
- showLabel && /* @__PURE__ */ jsx(Label, { slot: "label", size: "sm", id: labelId, children: label }),
10730
- /* @__PURE__ */ jsx(
10731
- RadioGroup,
10732
- __spreadProps(__spreadValues({
10733
- slot: "radiogroup",
10734
- value,
10735
- onChange: handleChange,
10736
- onBlur: handleBlur,
10737
- name,
10738
- orientation,
10739
- isReadOnly,
10740
- isInvalid: !isValid2
10741
- }, additionalAriaProps), {
10742
- children: options2.map((option) => /* @__PURE__ */ jsx(Radio, { value: option.value, size: "md", children: /* @__PURE__ */ jsx(Span, { size: "md", slot: "description", children: option.label }) }, option.value))
10743
- })
10744
- ),
10745
- showFieldError && errorMessage && /* @__PURE__ */ jsx("span", { slot: "error", className: `${FORM_RADIO_GROUP_FIELD_CLASSNAME$1}__Error`, children: errorMessage })
10746
- ] });
11128
+ const errorMessage = errors.length !== 0 ? errors[0] : void 0;
11129
+ const shouldShowErrorMessage = showFieldError && errorMessage;
11130
+ return /* @__PURE__ */ jsxs(
11131
+ RadioGroup,
11132
+ __spreadProps(__spreadValues({
11133
+ slot: "radiogroup",
11134
+ value,
11135
+ onChange: handleChange,
11136
+ onBlur: handleBlur,
11137
+ name,
11138
+ orientation,
11139
+ isReadOnly,
11140
+ isInvalid: !isValid2,
11141
+ className: radioGroupClassNames
11142
+ }, additionalAriaProps), {
11143
+ children: [
11144
+ showLabel && /* @__PURE__ */ jsx(Label, { slot: "label", size: "sm", id: labelId, children: label }),
11145
+ /* @__PURE__ */ jsxs(VStack, { slot: "options", gap: "3xs", children: [
11146
+ /* @__PURE__ */ jsx(Stack, { direction: orientation === "horizontal" ? "row" : "column", gap: orientation === "horizontal" ? "sm" : "xs", children: options2.map((option) => /* @__PURE__ */ jsx(Radio, { value: option.value, children: /* @__PURE__ */ jsx(Span, { slot: "description", children: option.label }) }, option.value)) }),
11147
+ shouldShowErrorMessage && /* @__PURE__ */ jsx(FieldError, { children: errorMessage })
11148
+ ] })
11149
+ ]
11150
+ })
11151
+ );
10747
11152
  }
10748
11153
  const FORM_RADIO_GROUP_FIELD_CLASSNAME = "Layer__FormRadioGroupField";
10749
11154
  function FormRadioGroupYesNoField({
@@ -10760,6 +11165,7 @@ function FormRadioGroupYesNoField({
10760
11165
  const { meta, value } = state;
10761
11166
  const { errors, isValid: isValid2 } = meta;
10762
11167
  const errorMessage = errors.length !== 0 ? errors[0] : void 0;
11168
+ const shouldShowErrorMessage = showFieldError && errorMessage;
10763
11169
  const labelId = useId();
10764
11170
  const additionalAriaProps = showLabel ? { "aria-labelledby": labelId } : { "aria-label": label };
10765
11171
  const radioGroupClassNames = classNames(
@@ -10771,35 +11177,38 @@ function FormRadioGroupYesNoField({
10771
11177
  const handleRadioChange = (newValue) => {
10772
11178
  handleChange(newValue === "yes");
10773
11179
  };
10774
- return /* @__PURE__ */ jsxs("div", { className: radioGroupClassNames, children: [
10775
- showLabel && /* @__PURE__ */ jsx(Label, { slot: "label", size: "sm", id: labelId, children: label }),
10776
- /* @__PURE__ */ jsxs(
10777
- RadioGroup,
10778
- __spreadProps(__spreadValues({
10779
- slot: "radiogroup",
10780
- value: radioValue,
10781
- onChange: handleRadioChange,
10782
- onBlur: handleBlur,
10783
- name,
10784
- orientation,
10785
- isReadOnly,
10786
- isInvalid: !isValid2
10787
- }, additionalAriaProps), {
10788
- children: [
10789
- /* @__PURE__ */ jsx(Radio, { value: "no", size: "md", children: /* @__PURE__ */ jsx(Span, { size: "md", slot: "description", children: "No" }) }),
10790
- /* @__PURE__ */ jsx(Radio, { value: "yes", size: "md", children: /* @__PURE__ */ jsx(Span, { size: "md", slot: "description", children: "Yes" }) })
10791
- ]
10792
- })
10793
- ),
10794
- showFieldError && errorMessage && /* @__PURE__ */ jsx("span", { slot: "error", className: `${FORM_RADIO_GROUP_FIELD_CLASSNAME}__Error`, children: errorMessage })
10795
- ] });
11180
+ return /* @__PURE__ */ jsxs(
11181
+ RadioGroup,
11182
+ __spreadProps(__spreadValues({
11183
+ slot: "radiogroup",
11184
+ value: radioValue,
11185
+ onChange: handleRadioChange,
11186
+ onBlur: handleBlur,
11187
+ name,
11188
+ orientation,
11189
+ isReadOnly,
11190
+ isInvalid: !isValid2,
11191
+ className: radioGroupClassNames
11192
+ }, additionalAriaProps), {
11193
+ children: [
11194
+ showLabel && /* @__PURE__ */ jsx(Label, { slot: "label", size: "sm", id: labelId, children: label }),
11195
+ /* @__PURE__ */ jsxs(VStack, { slot: "options", gap: "3xs", children: [
11196
+ /* @__PURE__ */ jsxs(Stack, { direction: orientation === "horizontal" ? "row" : "column", gap: orientation === "horizontal" ? "sm" : "xs", children: [
11197
+ /* @__PURE__ */ jsx(Radio, { value: "no", children: /* @__PURE__ */ jsx(Span, { slot: "description", children: "No" }) }),
11198
+ /* @__PURE__ */ jsx(Radio, { value: "yes", children: /* @__PURE__ */ jsx(Span, { slot: "description", children: "Yes" }) })
11199
+ ] }),
11200
+ shouldShowErrorMessage && /* @__PURE__ */ jsx(FieldError, { children: errorMessage })
11201
+ ] })
11202
+ ]
11203
+ })
11204
+ );
10796
11205
  }
10797
11206
  const SWITCH_CLASS_NAME = "Layer__UI__Switch";
10798
- const Switch = forwardRef((_$a, ref) => {
10799
- var _ab = _$a, {
11207
+ const Switch = forwardRef((_ub, ref) => {
11208
+ var _vb = _ub, {
10800
11209
  children,
10801
11210
  className
10802
- } = _ab, props = __objRest(_ab, [
11211
+ } = _vb, props = __objRest(_vb, [
10803
11212
  "children",
10804
11213
  "className"
10805
11214
  ]);
@@ -10849,8 +11258,8 @@ function FormSwitchField({
10849
11258
  }
10850
11259
  const TEXTAREA_CLASS_NAME = "Layer__UI__TextArea";
10851
11260
  const TextArea = forwardRef(
10852
- function TextArea2(_bb, ref) {
10853
- var _cb = _bb, { resize = "none" } = _cb, restProps = __objRest(_cb, ["resize"]);
11261
+ function TextArea2(_wb, ref) {
11262
+ var _xb = _wb, { resize = "none" } = _xb, restProps = __objRest(_xb, ["resize"]);
10854
11263
  const dataProperties = toDataProperties({ resize });
10855
11264
  return /* @__PURE__ */ jsx(
10856
11265
  TextArea$1,
@@ -10861,8 +11270,8 @@ const TextArea = forwardRef(
10861
11270
  );
10862
11271
  }
10863
11272
  );
10864
- function FormTextAreaField(_db) {
10865
- var _eb = _db, { placeholder } = _eb, props = __objRest(_eb, ["placeholder"]);
11273
+ function FormTextAreaField(_yb) {
11274
+ var _zb = _yb, { placeholder } = _zb, props = __objRest(_zb, ["placeholder"]);
10866
11275
  const field = useFieldContext();
10867
11276
  const { name, state, handleChange, handleBlur } = field;
10868
11277
  const { value } = state;
@@ -10882,8 +11291,8 @@ function FormTextAreaField(_db) {
10882
11291
  }
10883
11292
  ) }));
10884
11293
  }
10885
- function FormTextField(_fb) {
10886
- var _gb = _fb, { placeholder } = _gb, props = __objRest(_gb, ["placeholder"]);
11294
+ function FormTextField(_Ab) {
11295
+ var _Bb = _Ab, { placeholder } = _Bb, props = __objRest(_Bb, ["placeholder"]);
10887
11296
  const field = useFieldContext();
10888
11297
  const { name, state, handleChange, handleBlur } = field;
10889
11298
  const { value } = state;
@@ -10910,6 +11319,8 @@ const { useAppForm: useRawAppForm } = createFormHook({
10910
11319
  FormBigDecimalField,
10911
11320
  FormCheckboxField,
10912
11321
  FormDateField,
11322
+ FormDatePickerField,
11323
+ FormNonRecursiveBigDecimalField,
10913
11324
  FormNumberField,
10914
11325
  FormRadioGroupField,
10915
11326
  FormRadioGroupYesNoField,
@@ -10974,13 +11385,13 @@ const useCustomAccountForm = ({ onSuccess }) => {
10974
11385
  const isFormValid = useStore$1(form.store, (state) => state.isValid);
10975
11386
  return { form, submitError, isFormValid };
10976
11387
  };
10977
- const Input = (_hb) => {
10978
- var _ib = _hb, {
11388
+ const Input = (_Cb) => {
11389
+ var _Db = _Cb, {
10979
11390
  className,
10980
11391
  isInvalid,
10981
11392
  errorMessage,
10982
11393
  leftText
10983
- } = _ib, props = __objRest(_ib, [
11394
+ } = _Db, props = __objRest(_Db, [
10984
11395
  "className",
10985
11396
  "isInvalid",
10986
11397
  "errorMessage",
@@ -11026,8 +11437,8 @@ const InputGroup = ({
11026
11437
  children
11027
11438
  ] });
11028
11439
  };
11029
- const ChevronDownFill = (_jb) => {
11030
- var _kb = _jb, { size = 18 } = _kb, props = __objRest(_kb, ["size"]);
11440
+ const ChevronDownFill = (_Eb) => {
11441
+ var _Fb = _Eb, { size = 18 } = _Fb, props = __objRest(_Fb, ["size"]);
11031
11442
  return /* @__PURE__ */ jsxs(
11032
11443
  "svg",
11033
11444
  __spreadProps(__spreadValues({
@@ -11052,10 +11463,10 @@ const ChevronDownFill = (_jb) => {
11052
11463
  })
11053
11464
  );
11054
11465
  };
11055
- const SelectMenuPortal = (_lb) => {
11056
- var _mb = _lb, {
11466
+ const SelectMenuPortal = (_Gb) => {
11467
+ var _Hb = _Gb, {
11057
11468
  children
11058
- } = _mb, restProps = __objRest(_mb, [
11469
+ } = _Hb, restProps = __objRest(_Hb, [
11059
11470
  "children"
11060
11471
  ]);
11061
11472
  const dataProperties = toDataProperties({ "react-aria-top-layer": true });
@@ -11080,7 +11491,7 @@ const Select = ({
11080
11491
  errorMessage,
11081
11492
  inputId,
11082
11493
  isLoading,
11083
- formatOptionLabel: formatOptionLabel2
11494
+ formatOptionLabel
11084
11495
  }) => {
11085
11496
  const baseClassName2 = classNames(
11086
11497
  "Layer__select",
@@ -11098,7 +11509,7 @@ const Select = ({
11098
11509
  classNamePrefix,
11099
11510
  placeholder: placeholder != null ? placeholder : "Select...",
11100
11511
  options: options2,
11101
- formatOptionLabel: formatOptionLabel2,
11512
+ formatOptionLabel,
11102
11513
  value,
11103
11514
  onChange: (newValue) => newValue && onChange(newValue),
11104
11515
  menuPortalTarget: document.body,
@@ -11111,8 +11522,8 @@ const Select = ({
11111
11522
  /* @__PURE__ */ jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", children: errorMessage })
11112
11523
  ] });
11113
11524
  };
11114
- const ErrorText = (_nb) => {
11115
- var _ob = _nb, { className } = _ob, props = __objRest(_ob, ["className"]);
11525
+ const ErrorText = (_Ib) => {
11526
+ var _Jb = _Ib, { className } = _Jb, props = __objRest(_Jb, ["className"]);
11116
11527
  return /* @__PURE__ */ jsx(Text, __spreadProps(__spreadValues({}, props), { status: "error", className }));
11117
11528
  };
11118
11529
  const accountTypeOptions = [
@@ -11222,61 +11633,6 @@ const CustomAccountForm = ({ initialAccountName, onCancel, onSuccess }) => {
11222
11633
  }
11223
11634
  );
11224
11635
  };
11225
- const CreatableSelect = ({
11226
- name,
11227
- options: options2,
11228
- className,
11229
- classNamePrefix = "Layer__select",
11230
- value,
11231
- onChange,
11232
- disabled,
11233
- placeholder,
11234
- isInvalid,
11235
- errorMessage,
11236
- formatOptionLabel: formatOptionLabel2,
11237
- onCreateOption,
11238
- isValidNewOption,
11239
- formatCreateLabel: formatCreateLabel2,
11240
- inputId,
11241
- isLoading,
11242
- isClearable,
11243
- createOptionPosition = "first"
11244
- }) => {
11245
- const baseClassName2 = classNames(
11246
- "Layer__select",
11247
- isInvalid ? "Layer__select--error" : "",
11248
- className
11249
- );
11250
- const DropdownIndicator = useCallback((props) => /* @__PURE__ */ jsx(components.DropdownIndicator, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx(ChevronDownFill, {}) })), []);
11251
- return /* @__PURE__ */ jsxs(DeprecatedTooltip, { disabled: !isInvalid || !errorMessage, children: [
11252
- /* @__PURE__ */ jsx(DeprecatedTooltipTrigger, { className: "Layer__input-tooltip", children: /* @__PURE__ */ jsx(
11253
- BaseCreatableSelect,
11254
- {
11255
- inputId,
11256
- name,
11257
- className: baseClassName2,
11258
- classNamePrefix,
11259
- placeholder: placeholder != null ? placeholder : "Select...",
11260
- options: options2,
11261
- formatOptionLabel: formatOptionLabel2,
11262
- value,
11263
- onChange: (newValue) => onChange(newValue),
11264
- onCreateOption,
11265
- isValidNewOption,
11266
- formatCreateLabel: formatCreateLabel2,
11267
- menuPortalTarget: document.body,
11268
- styles: { menuPortal: (base) => __spreadProps(__spreadValues({}, base), { zIndex: 9999 }) },
11269
- components: { DropdownIndicator, MenuPortal: SelectMenuPortal },
11270
- isLoading,
11271
- isDisabled: disabled,
11272
- isClearable,
11273
- escapeClearsValue: isClearable,
11274
- createOptionPosition
11275
- }
11276
- ) }),
11277
- /* @__PURE__ */ jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", children: errorMessage })
11278
- ] });
11279
- };
11280
11636
  const templateHeaders = {
11281
11637
  date: "Date",
11282
11638
  description: "Description",
@@ -11304,18 +11660,27 @@ const templateExampleTransactions = [
11304
11660
  const formatCreateLabel$1 = (inputValue) => {
11305
11661
  return inputValue ? `Create "${inputValue}"` : "Create account";
11306
11662
  };
11307
- const formatOptionLabel = (option, meta) => {
11663
+ const AccountOption = ({ option, fallback }) => {
11308
11664
  if (option.account && !option.__isNew__) {
11309
- return /* @__PURE__ */ jsxs(VStack, { children: [
11310
- /* @__PURE__ */ jsx(Span, { ellipsis: true, children: option.account.accountName }),
11311
- (meta == null ? void 0 : meta.context) === "menu" && /* @__PURE__ */ jsxs(Span, { size: "sm", variant: "subtle", noWrap: true, children: [
11312
- option.account.institutionName,
11313
- " · ",
11314
- humanizeEnum(option.account.accountSubtype)
11665
+ return /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
11666
+ /* @__PURE__ */ jsx(Check, { size: 16, className: COMBO_BOX_CLASS_NAMES.OPTION_CHECK_ICON }),
11667
+ /* @__PURE__ */ jsxs(VStack, { children: [
11668
+ /* @__PURE__ */ jsx(Span, { ellipsis: true, children: option.account.accountName }),
11669
+ /* @__PURE__ */ jsxs(Span, { size: "sm", variant: "subtle", noWrap: true, children: [
11670
+ option.account.institutionName,
11671
+ " · ",
11672
+ humanizeEnum(option.account.accountSubtype)
11673
+ ] })
11315
11674
  ] })
11316
11675
  ] });
11317
11676
  }
11318
- return /* @__PURE__ */ jsx(Span, { children: option.label });
11677
+ return fallback;
11678
+ };
11679
+ const AccountSingleValue = ({ option, fallback }) => {
11680
+ if (option.account && !option.__isNew__) {
11681
+ return /* @__PURE__ */ jsx(Span, { ellipsis: true, children: option.account.accountName });
11682
+ }
11683
+ return fallback;
11319
11684
  };
11320
11685
  function UploadTransactionsUploadCsvStep({ selectedAccount, onSelectAccount, selectedFile, onSelectFile, onParseCsv }) {
11321
11686
  var _a;
@@ -11370,30 +11735,27 @@ function UploadTransactionsUploadCsvStep({ selectedAccount, onSelectAccount, sel
11370
11735
  setHasParseCsvError(true);
11371
11736
  });
11372
11737
  }, [selectedAccount, isCreatingNewAccount, selectedFile, parseCsv2, onParseCsv, next]);
11373
- const inputClassName = classNames(
11374
- "Layer__upload-transactions__select-account-name-input",
11375
- !!customAccountsError && "Layer__upload-transactions__select-account-name-input--error"
11376
- );
11377
11738
  const hasSelectedAccount = selectedAccount && !isCreatingNewAccount;
11378
11739
  return /* @__PURE__ */ jsxs(VStack, { gap: "lg", children: [
11379
- /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "Layer__upload-transactions__select-account-name-field", children: [
11740
+ /* @__PURE__ */ jsxs(VStack, { pis: "3xs", gap: "xs", children: [
11380
11741
  /* @__PURE__ */ jsx(Label, { size: "md", htmlFor: "account_name", children: "Which account are these transactions from?" }),
11381
11742
  /* @__PURE__ */ jsx(
11382
- CreatableSelect,
11743
+ CreatableComboBox,
11383
11744
  {
11384
11745
  inputId: "account_name",
11385
11746
  placeholder: customAccountsError ? "Failed to load options" : "Select account...",
11386
11747
  options: accountOptions,
11387
- formatOptionLabel,
11388
- onChange: onSelectAccount,
11748
+ onSelectedValueChange: onSelectAccount,
11389
11749
  onCreateOption,
11390
11750
  formatCreateLabel: formatCreateLabel$1,
11391
11751
  isValidNewOption: () => true,
11392
- value: selectedAccount,
11752
+ selectedValue: selectedAccount,
11393
11753
  isClearable: true,
11394
11754
  isLoading: isLoadingCustomAccounts,
11395
- disabled: !!customAccountsError,
11396
- className: inputClassName
11755
+ isDisabled: !!customAccountsError,
11756
+ isError: !!customAccountsError,
11757
+ className: "Layer__upload-transactions__select-account-name-input",
11758
+ slots: { Option: AccountOption, SingleValue: AccountSingleValue }
11397
11759
  }
11398
11760
  )
11399
11761
  ] }),
@@ -11760,7 +12122,8 @@ function UploadTransactionsHeader({ currentStep, isValid: isValid2, onClose }) {
11760
12122
  {
11761
12123
  heading: /* @__PURE__ */ jsx(Heading$1, { level: 1, size: "sm", children: title }),
11762
12124
  description: /* @__PURE__ */ jsx(Heading$1, { level: 2, size: "xs", variant: "subtle", weight: "normal", children: description }),
11763
- onClose
12125
+ onClose,
12126
+ hideBottomPadding: true
11764
12127
  }
11765
12128
  );
11766
12129
  }
@@ -11970,8 +12333,8 @@ const BulkActionsModule = ({ showSelectedLabel = true, fullWidth = false, slots
11970
12333
  /* @__PURE__ */ jsx(slots.BulkActions, {})
11971
12334
  ] });
11972
12335
  };
11973
- const DownloadCloud = (_pb) => {
11974
- var _qb = _pb, { size = 18 } = _qb, props = __objRest(_qb, ["size"]);
12336
+ const DownloadCloud = (_Kb) => {
12337
+ var _Lb = _Kb, { size = 18 } = _Lb, props = __objRest(_Lb, ["size"]);
11975
12338
  return /* @__PURE__ */ jsxs(
11976
12339
  "svg",
11977
12340
  __spreadProps(__spreadValues({
@@ -12189,45 +12552,6 @@ function MonthCalendar({
12189
12552
  )
12190
12553
  ] });
12191
12554
  }
12192
- const POPOVER_CLASS_NAME = "Layer__Popover";
12193
- const POPOVER_CLASS_NAMES = `Layer__Portal ${POPOVER_CLASS_NAME}`;
12194
- const Popover = forwardRef(
12195
- function Popover2(_rb, ref) {
12196
- var _sb = _rb, { flexInline = false } = _sb, restProps = __objRest(_sb, ["flexInline"]);
12197
- const dataProperties = toDataProperties({ "flex-inline": flexInline });
12198
- return /* @__PURE__ */ jsx(
12199
- Popover$1,
12200
- __spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
12201
- className: POPOVER_CLASS_NAMES,
12202
- ref
12203
- })
12204
- );
12205
- }
12206
- );
12207
- function ResponsivePopover({ children, triggerRef }) {
12208
- const { isMobile } = useSizeClass();
12209
- if (isMobile) {
12210
- return /* @__PURE__ */ jsx(
12211
- Modal,
12212
- {
12213
- flexBlock: true,
12214
- flexInline: true,
12215
- variant: "mobile-popover",
12216
- isDismissable: true,
12217
- children
12218
- }
12219
- );
12220
- }
12221
- return /* @__PURE__ */ jsx(
12222
- Popover,
12223
- {
12224
- triggerRef,
12225
- placement: "bottom left",
12226
- flexInline: true,
12227
- children
12228
- }
12229
- );
12230
- }
12231
12555
  const MonthPicker = ({
12232
12556
  label,
12233
12557
  showLabel = true,
@@ -12247,7 +12571,7 @@ const MonthPicker = ({
12247
12571
  const inputValue = format(date.toDate(), truncateMonth ? MONTH_YEAR_FORMAT_SHORT : MONTH_YEAR_FORMAT);
12248
12572
  const additionalAriaProps = !showLabel && { "aria-label": label };
12249
12573
  return /* @__PURE__ */ jsxs(DialogTrigger, { isOpen: isPopoverOpen, onOpenChange: setPopoverOpen, children: [
12250
- showLabel && /* @__PURE__ */ jsx(Label, { children: label }),
12574
+ showLabel && /* @__PURE__ */ jsx(Label, { slot: "label", size: "sm", children: label }),
12251
12575
  /* @__PURE__ */ jsxs(
12252
12576
  InputGroup$1,
12253
12577
  {
@@ -12257,7 +12581,7 @@ const MonthPicker = ({
12257
12581
  onClick: () => setPopoverOpen(true),
12258
12582
  children: [
12259
12583
  /* @__PURE__ */ jsx(Input$1, __spreadProps(__spreadValues({ inset: true }, additionalAriaProps), { value: inputValue, readOnly: true })),
12260
- /* @__PURE__ */ jsx(HStack, { gap: "3xs", align: "center", children: /* @__PURE__ */ jsx(Button, { icon: true, inset: true, variant: "ghost", children: /* @__PURE__ */ jsx(ChevronDown, { size: 20 }) }) })
12584
+ /* @__PURE__ */ jsx(PickerDropdownIndicator, { onClick: () => setPopoverOpen(true) })
12261
12585
  ]
12262
12586
  }
12263
12587
  ),
@@ -12432,8 +12756,7 @@ const DownloadButton = ({
12432
12756
  const BankTransactionsHeader = ({
12433
12757
  shiftStickyHeader,
12434
12758
  asWidget,
12435
- mobileComponent,
12436
- listView,
12759
+ tableContentMode,
12437
12760
  stringOverrides,
12438
12761
  isSyncing,
12439
12762
  withUploadMenu,
@@ -12463,7 +12786,8 @@ const BankTransactionsHeader = ({
12463
12786
  }, [setFilters]);
12464
12787
  const { count } = useCountSelectedIds();
12465
12788
  const showBulkActions = count > 0;
12466
- const isMobileList = listView && mobileComponent === "mobileList";
12789
+ const isMobileList = tableContentMode === BankTransactionsTableContent.MobileList;
12790
+ const isListView = isMobileList || tableContentMode === BankTransactionsTableContent.List;
12467
12791
  const headerTopRow = useMemo(() => /* @__PURE__ */ jsxs("div", { className: "Layer__bank-transactions__header__content", children: [
12468
12792
  /* @__PURE__ */ jsxs(HStack, { align: "center", children: [
12469
12793
  /* @__PURE__ */ jsx(
@@ -12479,7 +12803,7 @@ const BankTransactionsHeader = ({
12479
12803
  {
12480
12804
  timeSync: 5,
12481
12805
  inProgress: true,
12482
- hideContent: listView
12806
+ hideContent: isListView
12483
12807
  }
12484
12808
  )
12485
12809
  ] }),
@@ -12499,7 +12823,7 @@ const BankTransactionsHeader = ({
12499
12823
  activationDate,
12500
12824
  asWidget,
12501
12825
  isSyncing,
12502
- listView,
12826
+ isListView,
12503
12827
  monthPickerDate,
12504
12828
  setDateRange,
12505
12829
  stringOverrides == null ? void 0 : stringOverrides.header,
@@ -12534,7 +12858,8 @@ const BankTransactionsHeader = ({
12534
12858
  }
12535
12859
  );
12536
12860
  }, [isMobileList]);
12537
- const statusToggle = isCategorizationEnabled && showStatusToggle ? /* @__PURE__ */ jsx(
12861
+ const isStatusToggleVisible = isCategorizationEnabled && showStatusToggle;
12862
+ const statusToggle = isStatusToggleVisible ? /* @__PURE__ */ jsx(
12538
12863
  Toggle,
12539
12864
  {
12540
12865
  ariaLabel: "Categorization status",
@@ -12547,50 +12872,34 @@ const BankTransactionsHeader = ({
12547
12872
  fullWidth: isMobileList
12548
12873
  }
12549
12874
  ) : null;
12550
- if (isMobileList) {
12875
+ if (isListView) {
12551
12876
  return /* @__PURE__ */ jsx(
12552
12877
  Header$1,
12553
12878
  {
12554
12879
  className: classNames(
12555
12880
  "Layer__bank-transactions__header",
12556
12881
  withDatePicker && "Layer__bank-transactions__header--with-date-picker",
12557
- "Layer__bank-transactions__header--mobile"
12882
+ isMobileList && "Layer__bank-transactions__header--mobile"
12558
12883
  ),
12559
12884
  style: { top: shiftStickyHeader },
12560
- children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
12885
+ children: /* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
12561
12886
  headerTopRow,
12562
- /* @__PURE__ */ jsx(HStack, { justify: "space-between", align: "center", gap: "xs", children: showBulkActions ? /* @__PURE__ */ jsx(
12887
+ showBulkActions && /* @__PURE__ */ jsx(
12563
12888
  BulkActionsModule,
12564
12889
  {
12565
- showSelectedLabel: false,
12566
- fullWidth: true,
12890
+ showSelectedLabel: !isMobileList,
12891
+ fullWidth: isMobileList,
12567
12892
  slots: { BulkActions }
12568
12893
  }
12569
- ) : /* @__PURE__ */ jsxs(Fragment, { children: [
12570
- statusToggle,
12571
- /* @__PURE__ */ jsx(BankTransactionsHeaderMenu, { actions: headerMenuActions, isDisabled: showBulkActions })
12572
- ] }) }),
12573
- /* @__PURE__ */ jsx(TransactionsSearch, { isDisabled: showBulkActions })
12574
- ] })
12575
- }
12576
- );
12577
- }
12578
- if (listView) {
12579
- return /* @__PURE__ */ jsx(
12580
- Header$1,
12581
- {
12582
- className: classNames(
12583
- "Layer__bank-transactions__header",
12584
- withDatePicker && "Layer__bank-transactions__header--with-date-picker"
12585
- ),
12586
- style: { top: shiftStickyHeader },
12587
- children: /* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
12588
- headerTopRow,
12589
- /* @__PURE__ */ jsx(HStack, { justify: "space-between", align: "center", gap: "xs", children: showBulkActions ? /* @__PURE__ */ jsx(BulkActionsModule, { slots: { BulkActions } }) : /* @__PURE__ */ jsxs(Fragment, { children: [
12894
+ ),
12895
+ !showBulkActions && isStatusToggleVisible && /* @__PURE__ */ jsxs(HStack, { justify: "space-between", align: "center", gap: "xs", children: [
12590
12896
  statusToggle,
12591
- /* @__PURE__ */ jsx(BankTransactionsHeaderMenu, { actions: headerMenuActions, isDisabled: showBulkActions })
12592
- ] }) }),
12593
- /* @__PURE__ */ jsx(TransactionsSearch, { isDisabled: showBulkActions })
12897
+ /* @__PURE__ */ jsx(BankTransactionsHeaderMenu, { actions: headerMenuActions })
12898
+ ] }),
12899
+ /* @__PURE__ */ jsxs(HStack, { className: "Layer__bank-transactions__header__search-and-menu", align: "center", gap: "xs", children: [
12900
+ /* @__PURE__ */ jsx(TransactionsSearch, { isDisabled: showBulkActions }),
12901
+ !isStatusToggleVisible && /* @__PURE__ */ jsx(BankTransactionsHeaderMenu, { actions: headerMenuActions, isDisabled: showBulkActions })
12902
+ ] })
12594
12903
  ] })
12595
12904
  }
12596
12905
  );
@@ -12616,7 +12925,7 @@ const BankTransactionsHeader = ({
12616
12925
  DownloadButton,
12617
12926
  {
12618
12927
  downloadButtonTextOverride: stringOverrides == null ? void 0 : stringOverrides.downloadButton,
12619
- iconOnly: listView,
12928
+ iconOnly: isListView,
12620
12929
  disabled: showBulkActions
12621
12930
  }
12622
12931
  ),
@@ -13000,8 +13309,8 @@ function useDelayedVisibility({
13000
13309
  );
13001
13310
  return { isVisible };
13002
13311
  }
13003
- const File$1 = (_tb) => {
13004
- var _ub = _tb, { size = 12 } = _ub, props = __objRest(_ub, ["size"]);
13312
+ const File$1 = (_Mb) => {
13313
+ var _Nb = _Mb, { size = 12 } = _Nb, props = __objRest(_Nb, ["size"]);
13005
13314
  return /* @__PURE__ */ jsxs(
13006
13315
  "svg",
13007
13316
  __spreadProps(__spreadValues({
@@ -13084,15 +13393,15 @@ const variants = {
13084
13393
  }
13085
13394
  }
13086
13395
  };
13087
- function AnimatedPresenceElementInner(_vb, ref) {
13088
- var _wb = _vb, {
13396
+ function AnimatedPresenceElementInner(_Ob, ref) {
13397
+ var _Pb = _Ob, {
13089
13398
  as,
13090
13399
  children,
13091
13400
  variant,
13092
13401
  isOpen,
13093
13402
  slotProps = { AnimatePresence: { initial: false } },
13094
13403
  motionKey
13095
- } = _wb, props = __objRest(_wb, [
13404
+ } = _Pb, props = __objRest(_Pb, [
13096
13405
  "as",
13097
13406
  "children",
13098
13407
  "variant",
@@ -13291,8 +13600,8 @@ function useBookkeepingPeriods() {
13291
13600
  }
13292
13601
  });
13293
13602
  }
13294
- const Clock = (_xb) => {
13295
- var _yb = _xb, { size = 18 } = _yb, props = __objRest(_yb, ["size"]);
13603
+ const Clock = (_Qb) => {
13604
+ var _Rb = _Qb, { size = 18 } = _Rb, props = __objRest(_Rb, ["size"]);
13296
13605
  return /* @__PURE__ */ jsxs(
13297
13606
  "svg",
13298
13607
  __spreadProps(__spreadValues({
@@ -13618,8 +13927,8 @@ const useSplitsForm = ({
13618
13927
  saveLocalSplitsToCategoryStore
13619
13928
  };
13620
13929
  };
13621
- const ScissorsFullOpen = (_zb) => {
13622
- var _Ab = _zb, { size = 12 } = _Ab, props = __objRest(_Ab, ["size"]);
13930
+ const ScissorsFullOpen = (_Sb) => {
13931
+ var _Tb = _Sb, { size = 12 } = _Tb, props = __objRest(_Tb, ["size"]);
13623
13932
  return /* @__PURE__ */ jsx(
13624
13933
  "svg",
13625
13934
  __spreadProps(__spreadValues({
@@ -13684,8 +13993,8 @@ const ScissorsFullOpen = (_zb) => {
13684
13993
  })
13685
13994
  );
13686
13995
  };
13687
- const Trash = (_Bb) => {
13688
- var _Cb = _Bb, { size = 18 } = _Cb, props = __objRest(_Cb, ["size"]);
13996
+ const Trash = (_Ub) => {
13997
+ var _Vb = _Ub, { size = 18 } = _Vb, props = __objRest(_Vb, ["size"]);
13689
13998
  return /* @__PURE__ */ jsxs(
13690
13999
  "svg",
13691
14000
  __spreadProps(__spreadValues({
@@ -13936,8 +14245,8 @@ const ReceiptsProvider = ({
13936
14245
  const contextData = useReceipts({ bankTransaction, isActive });
13937
14246
  return /* @__PURE__ */ jsx(ReceiptsContext.Provider, { value: contextData, children });
13938
14247
  };
13939
- const Eye = (_Db) => {
13940
- var _Eb = _Db, { size = 18 } = _Eb, props = __objRest(_Eb, ["size"]);
14248
+ const Eye = (_Wb) => {
14249
+ var _Xb = _Wb, { size = 18 } = _Xb, props = __objRest(_Xb, ["size"]);
13941
14250
  return /* @__PURE__ */ jsx(
13942
14251
  "svg",
13943
14252
  __spreadProps(__spreadValues({
@@ -14073,11 +14382,11 @@ const FileThumb = ({
14073
14382
  }
14074
14383
  );
14075
14384
  };
14076
- const TextButton = (_Fb) => {
14077
- var _Gb = _Fb, {
14385
+ const TextButton = (_Yb) => {
14386
+ var _Zb = _Yb, {
14078
14387
  className,
14079
14388
  children
14080
- } = _Gb, props = __objRest(_Gb, [
14389
+ } = _Zb, props = __objRest(_Zb, [
14081
14390
  "className",
14082
14391
  "children"
14083
14392
  ]);
@@ -14165,8 +14474,8 @@ const openReceiptInNewTab = (url, index) => (e) => {
14165
14474
  `);
14166
14475
  }
14167
14476
  };
14168
- const BankTransactionReceiptsWithProvider = forwardRef((_Hb, ref) => {
14169
- var _Ib = _Hb, { bankTransaction, isActive } = _Ib, props = __objRest(_Ib, ["bankTransaction", "isActive"]);
14477
+ const BankTransactionReceiptsWithProvider = forwardRef((__b, ref) => {
14478
+ var _$b = __b, { bankTransaction, isActive } = _$b, props = __objRest(_$b, ["bankTransaction", "isActive"]);
14170
14479
  return /* @__PURE__ */ jsx(ReceiptsProvider, { bankTransaction, isActive, children: /* @__PURE__ */ jsx(BankTransactionReceipts, __spreadProps(__spreadValues({}, props), { ref })) });
14171
14480
  });
14172
14481
  BankTransactionReceiptsWithProvider.displayName = "BankTransactionReceiptsWithProvider";
@@ -14228,8 +14537,8 @@ const transformCurrencyValue = (rawValue) => {
14228
14537
  }
14229
14538
  return cleaned;
14230
14539
  };
14231
- const AmountInput = (_Jb) => {
14232
- var _Kb = _Jb, {
14540
+ const AmountInput = (_ac) => {
14541
+ var _bc = _ac, {
14233
14542
  onChange,
14234
14543
  className,
14235
14544
  leftText,
@@ -14237,7 +14546,7 @@ const AmountInput = (_Jb) => {
14237
14546
  isInvalid,
14238
14547
  badge,
14239
14548
  placeholder = "$0.00"
14240
- } = _Kb, props = __objRest(_Kb, [
14549
+ } = _bc, props = __objRest(_bc, [
14241
14550
  "onChange",
14242
14551
  "className",
14243
14552
  "leftText",
@@ -14551,12 +14860,12 @@ const useBankTransactionMemo = ({ bankTransactionId }) => {
14551
14860
  isSaved
14552
14861
  }), [form, isErrorUpdatingMemo, isUpdatingMemo, isSaved]);
14553
14862
  };
14554
- const Textarea = (_Lb) => {
14555
- var _Mb = _Lb, {
14863
+ const Textarea = (_cc) => {
14864
+ var _dc = _cc, {
14556
14865
  className,
14557
14866
  isInvalid,
14558
14867
  errorMessage
14559
- } = _Mb, props = __objRest(_Mb, [
14868
+ } = _dc, props = __objRest(_dc, [
14560
14869
  "className",
14561
14870
  "isInvalid",
14562
14871
  "errorMessage"
@@ -15535,9 +15844,6 @@ function useTagDimensionByKey({ isEnabled = true, dimensionKey }) {
15535
15844
  );
15536
15845
  return new TagDimensionByKeySWRResponse(swrResponse);
15537
15846
  }
15538
- function usePreloadTagDimensionByKey(parameters) {
15539
- useTagDimensionByKey(parameters);
15540
- }
15541
15847
  class TagValueDefinitionAsOption {
15542
15848
  constructor(tagValueDefinition) {
15543
15849
  __publicField(this, "tagValueDefinition");
@@ -16343,8 +16649,8 @@ const BankTransactionsMobileListItemCheckbox = ({
16343
16649
  }
16344
16650
  ) });
16345
16651
  };
16346
- const Paperclip = (_Nb) => {
16347
- var _Ob = _Nb, { size = 20 } = _Ob, props = __objRest(_Ob, ["size"]);
16652
+ const Paperclip = (_ec) => {
16653
+ var _fc = _ec, { size = 20 } = _fc, props = __objRest(_fc, ["size"]);
16348
16654
  return /* @__PURE__ */ jsx(
16349
16655
  "svg",
16350
16656
  __spreadProps(__spreadValues({
@@ -18065,8 +18371,8 @@ function useArchiveCategorizationRule() {
18065
18371
  }
18066
18372
  });
18067
18373
  }
18068
- const BackArrow = (_Pb) => {
18069
- var _Qb = _Pb, { size = 18 } = _Qb, props = __objRest(_Qb, ["size"]);
18374
+ const BackArrow = (_gc) => {
18375
+ var _hc = _gc, { size = 18 } = _hc, props = __objRest(_hc, ["size"]);
18070
18376
  return /* @__PURE__ */ jsx(
18071
18377
  "svg",
18072
18378
  __spreadProps(__spreadValues({
@@ -18233,31 +18539,8 @@ const usePaginationRange = ({
18233
18539
  }, [totalCount, pageSize, siblingCount, currentPage]);
18234
18540
  return paginationRange;
18235
18541
  };
18236
- const ChevronLeft = (_Rb) => {
18237
- var props = __objRest(_Rb, []);
18238
- return /* @__PURE__ */ jsx(
18239
- "svg",
18240
- __spreadProps(__spreadValues({
18241
- xmlns: "http://www.w3.org/2000/svg",
18242
- width: "18",
18243
- height: "18",
18244
- viewBox: "0 0 18 18",
18245
- fill: "none"
18246
- }, props), {
18247
- children: /* @__PURE__ */ jsx(
18248
- "path",
18249
- {
18250
- d: "M11.25 13.5L6.75 9L11.25 4.5",
18251
- stroke: "currentColor",
18252
- strokeLinecap: "round",
18253
- strokeLinejoin: "round"
18254
- }
18255
- )
18256
- })
18257
- );
18258
- };
18259
- const PaginationButton = (_Sb) => {
18260
- var _Tb = _Sb, { children, isSelected } = _Tb, buttonProps = __objRest(_Tb, ["children", "isSelected"]);
18542
+ const PaginationButton = (_ic) => {
18543
+ var _jc = _ic, { children, isSelected } = _jc, buttonProps = __objRest(_jc, ["children", "isSelected"]);
18261
18544
  return /* @__PURE__ */ jsx(
18262
18545
  Button,
18263
18546
  __spreadProps(__spreadValues({
@@ -18458,8 +18741,8 @@ const getColumnDefs = (columnConfig2) => {
18458
18741
  const CSS_PREFIX$1 = "Layer__UI__Table";
18459
18742
  const getClassName = (component, additionalClassNames, withHidden) => classNames(`${CSS_PREFIX$1}-${component}`, withHidden && `${CSS_PREFIX$1}-${component}--hidden`, additionalClassNames);
18460
18743
  const Table$1 = forwardRef(
18461
- (_Ub, ref) => {
18462
- var _Vb = _Ub, { children, className, nonAria, slot } = _Vb, restProps = __objRest(_Vb, ["children", "className", "nonAria", "slot"]);
18744
+ (_kc, ref) => {
18745
+ var _lc = _kc, { children, className, nonAria, slot } = _lc, restProps = __objRest(_lc, ["children", "className", "nonAria", "slot"]);
18463
18746
  const TableComponent = nonAria ? "table" : Table$2;
18464
18747
  return /* @__PURE__ */ jsx(
18465
18748
  TableComponent,
@@ -18474,8 +18757,8 @@ const Table$1 = forwardRef(
18474
18757
  }
18475
18758
  );
18476
18759
  Table$1.displayName = "Table";
18477
- const TableHeaderInner = (_Wb, ref) => {
18478
- var _Xb = _Wb, { children, className, hideHeader, nonAria } = _Xb, restProps = __objRest(_Xb, ["children", "className", "hideHeader", "nonAria"]);
18760
+ const TableHeaderInner = (_mc, ref) => {
18761
+ var _nc = _mc, { children, className, hideHeader, nonAria } = _nc, restProps = __objRest(_nc, ["children", "className", "hideHeader", "nonAria"]);
18479
18762
  const TableHeaderComponent = nonAria ? "thead" : TableHeader$1;
18480
18763
  return /* @__PURE__ */ jsx(
18481
18764
  TableHeaderComponent,
@@ -18489,8 +18772,8 @@ const TableHeaderInner = (_Wb, ref) => {
18489
18772
  };
18490
18773
  const TableHeader = forwardRef(TableHeaderInner);
18491
18774
  TableHeader.displayName = "TableHeader";
18492
- const TableBodyInner = (_Yb, ref) => {
18493
- var _Zb = _Yb, { children, className, nonAria } = _Zb, restProps = __objRest(_Zb, ["children", "className", "nonAria"]);
18775
+ const TableBodyInner = (_oc, ref) => {
18776
+ var _pc = _oc, { children, className, nonAria } = _pc, restProps = __objRest(_pc, ["children", "className", "nonAria"]);
18494
18777
  const TableBodyComponent = nonAria ? "tbody" : TableBody$2;
18495
18778
  return /* @__PURE__ */ jsx(
18496
18779
  TableBodyComponent,
@@ -18504,8 +18787,8 @@ const TableBodyInner = (_Yb, ref) => {
18504
18787
  };
18505
18788
  const TableBody$1 = forwardRef(TableBodyInner);
18506
18789
  TableBody$1.displayName = "TableBody";
18507
- const RowInner = (__b, ref) => {
18508
- var _$b = __b, { children, className, depth = 0, nonAria, id } = _$b, restProps = __objRest(_$b, ["children", "className", "depth", "nonAria", "id"]);
18790
+ const RowInner = (_qc, ref) => {
18791
+ var _rc = _qc, { children, className, depth = 0, nonAria, id } = _rc, restProps = __objRest(_rc, ["children", "className", "depth", "nonAria", "id"]);
18509
18792
  const dataProperties = toDataProperties({ depth });
18510
18793
  const RowComponent = nonAria ? "tr" : Row$1;
18511
18794
  return /* @__PURE__ */ jsx(
@@ -18522,8 +18805,8 @@ const RowInner = (__b, ref) => {
18522
18805
  const Row = forwardRef(RowInner);
18523
18806
  Row.displayName = "Row";
18524
18807
  const Column = forwardRef(
18525
- (_ac, ref) => {
18526
- var _bc = _ac, { children, className, nonAria, id, textAlign = "left", colSpan = 1 } = _bc, restProps = __objRest(_bc, ["children", "className", "nonAria", "id", "textAlign", "colSpan"]);
18808
+ (_sc, ref) => {
18809
+ var _tc = _sc, { children, className, nonAria, id, textAlign = "left", colSpan = 1 } = _tc, restProps = __objRest(_tc, ["children", "className", "nonAria", "id", "textAlign", "colSpan"]);
18527
18810
  const dataProperties = toDataProperties({ "text-align": textAlign });
18528
18811
  const columnClassName = getClassName("Column", className);
18529
18812
  const ColumnComponent = nonAria ? "th" : Column$1;
@@ -18542,8 +18825,8 @@ const Column = forwardRef(
18542
18825
  );
18543
18826
  Column.displayName = "Column";
18544
18827
  const Cell = forwardRef(
18545
- (_cc, ref) => {
18546
- var _dc = _cc, { children, className, nonAria, id } = _dc, restProps = __objRest(_dc, ["children", "className", "nonAria", "id"]);
18828
+ (_uc, ref) => {
18829
+ var _vc = _uc, { children, className, nonAria, id } = _vc, restProps = __objRest(_vc, ["children", "className", "nonAria", "id"]);
18547
18830
  const CellComponent = nonAria ? "td" : Cell$1;
18548
18831
  return /* @__PURE__ */ jsx(
18549
18832
  CellComponent,
@@ -19456,8 +19739,8 @@ function useTagDimensions({ isEnabled = true } = {}) {
19456
19739
  function usePreloadTagDimensions(parameters) {
19457
19740
  useTagDimensions(parameters);
19458
19741
  }
19459
- const Inbox = (_ec) => {
19460
- var _fc = _ec, { size = 18 } = _fc, props = __objRest(_fc, ["size"]);
19742
+ const Inbox = (_wc) => {
19743
+ var _xc = _wc, { size = 18 } = _xc, props = __objRest(_xc, ["size"]);
19461
19744
  return /* @__PURE__ */ jsxs(
19462
19745
  "svg",
19463
19746
  __spreadProps(__spreadValues({
@@ -19537,8 +19820,8 @@ function BankTransactionsListWithEmptyStates({
19537
19820
  return slots.List;
19538
19821
  }
19539
19822
  const COMPONENT_NAME$d = "bank-transactions";
19540
- const BankTransactions = (_gc) => {
19541
- var _hc = _gc, {
19823
+ const BankTransactions = (_yc) => {
19824
+ var _zc = _yc, {
19542
19825
  onError,
19543
19826
  showTags = false,
19544
19827
  showCustomerVendor = false,
@@ -19547,7 +19830,7 @@ const BankTransactions = (_gc) => {
19547
19830
  mode,
19548
19831
  renderInAppLink,
19549
19832
  filters
19550
- } = _hc, restProps = __objRest(_hc, [
19833
+ } = _zc, restProps = __objRest(_zc, [
19551
19834
  "onError",
19552
19835
  "showTags",
19553
19836
  "showCustomerVendor",
@@ -19642,7 +19925,7 @@ const BankTransactionsTableView = ({
19642
19925
  }
19643
19926
  });
19644
19927
  const isLastPage = data && !hasMore && Math.ceil(((data == null ? void 0 : data.length) || 0) / pageSize) === currentPage;
19645
- const tableContentMode = listView && mobileComponent === "mobileList" ? "MobileList" : listView ? "List" : "Table";
19928
+ const tableContentMode = listView && mobileComponent === "mobileList" ? BankTransactionsTableContent.MobileList : listView ? BankTransactionsTableContent.List : BankTransactionsTableContent.Table;
19646
19929
  const BankTransactionsTableViewContent = useMemo(() => {
19647
19930
  return /* @__PURE__ */ jsx("div", { className: "Layer__bank-transactions__table-wrapper", children: /* @__PURE__ */ jsx(
19648
19931
  BankTransactionsTable,
@@ -19697,16 +19980,16 @@ const BankTransactionsTableView = ({
19697
19980
  }, [bankTransactions, showDescriptions, showReceiptUploads, showTooltips]);
19698
19981
  const slots = useMemo(() => {
19699
19982
  switch (tableContentMode) {
19700
- case "Table":
19983
+ case BankTransactionsTableContent.Table:
19701
19984
  return {
19702
19985
  List: BankTransactionsTableViewContent
19703
19986
  };
19704
- case "List":
19987
+ case BankTransactionsTableContent.List:
19705
19988
  return {
19706
19989
  List: BankTransactionsListView,
19707
19990
  Loader: BankTransactionsListLoader
19708
19991
  };
19709
- case "MobileList":
19992
+ case BankTransactionsTableContent.MobileList:
19710
19993
  return {
19711
19994
  List: BankTransactionsMobileListView,
19712
19995
  Loader: /* @__PURE__ */ jsx(MobileListSkeleton, {})
@@ -19740,8 +20023,7 @@ const BankTransactionsTableView = ({
19740
20023
  {
19741
20024
  shiftStickyHeader,
19742
20025
  asWidget,
19743
- mobileComponent,
19744
- listView,
20026
+ tableContentMode,
19745
20027
  stringOverrides: stringOverrides == null ? void 0 : stringOverrides.bankTransactionsHeader,
19746
20028
  isSyncing,
19747
20029
  withUploadMenu: showUploadOptions,
@@ -19757,7 +20039,7 @@ const BankTransactionsTableView = ({
19757
20039
  isOpen: !!ruleSuggestion,
19758
20040
  onOpenChange: handleRuleSuggestionOpenChange,
19759
20041
  ruleSuggestion,
19760
- variant: tableContentMode === "MobileList" ? "drawer" : "modal"
20042
+ variant: tableContentMode === BankTransactionsTableContent.MobileList ? "drawer" : "modal"
19761
20043
  }
19762
20044
  ),
19763
20045
  !isMonthlyViewMode && !isLoading && /* @__PURE__ */ jsx(HStack, { justify: "end", children: /* @__PURE__ */ jsx(
@@ -19854,8 +20136,8 @@ function QuickbooksContextProvider({ children }) {
19854
20136
  const quickbooksContextData = useQuickbooks();
19855
20137
  return /* @__PURE__ */ jsx(QuickbooksContext.Provider, { value: quickbooksContextData, children });
19856
20138
  }
19857
- const Cog = (_ic) => {
19858
- var _jc = _ic, { size = 12 } = _jc, props = __objRest(_jc, ["size"]);
20139
+ const Cog = (_Ac) => {
20140
+ var _Bc = _Ac, { size = 12 } = _Bc, props = __objRest(_Bc, ["size"]);
19859
20141
  const id = useId();
19860
20142
  return /* @__PURE__ */ jsxs(
19861
20143
  "svg",
@@ -19876,8 +20158,8 @@ const Cog = (_ic) => {
19876
20158
  })
19877
20159
  );
19878
20160
  };
19879
- const QuickbooksIcon = (_kc) => {
19880
- var _lc = _kc, { size = 24 } = _lc, props = __objRest(_lc, ["size"]);
20161
+ const QuickbooksIcon = (_Cc) => {
20162
+ var _Dc = _Cc, { size = 24 } = _Dc, props = __objRest(_Dc, ["size"]);
19881
20163
  return /* @__PURE__ */ jsxs(
19882
20164
  "svg",
19883
20165
  __spreadProps(__spreadValues({
@@ -20036,8 +20318,8 @@ function IntegrationsQuickbooksUnlinkConfirmationModal({ isOpen, onOpenChange })
20036
20318
  }
20037
20319
  );
20038
20320
  }
20039
- const MoreVertical = (_mc) => {
20040
- var _nc = _mc, { size = 18 } = _nc, props = __objRest(_nc, ["size"]);
20321
+ const MoreVertical = (_Ec) => {
20322
+ var _Fc = _Ec, { size = 18 } = _Fc, props = __objRest(_Fc, ["size"]);
20041
20323
  return /* @__PURE__ */ jsxs(
20042
20324
  "svg",
20043
20325
  __spreadProps(__spreadValues({
@@ -20266,8 +20548,8 @@ const IntegrationsComponent = ({
20266
20548
  (quickbooksConnectionStatus == null ? void 0 : quickbooksConnectionStatus.is_connected) && /* @__PURE__ */ jsx(IntegrationsContent, {})
20267
20549
  ] });
20268
20550
  };
20269
- const PlusIcon = (_oc) => {
20270
- var _pc = _oc, { size = 14 } = _pc, props = __objRest(_pc, ["size"]);
20551
+ const PlusIcon = (_Gc) => {
20552
+ var _Hc = _Gc, { size = 14 } = _Hc, props = __objRest(_Hc, ["size"]);
20271
20553
  return /* @__PURE__ */ jsxs(
20272
20554
  "svg",
20273
20555
  __spreadProps(__spreadValues({
@@ -20309,8 +20591,8 @@ const PlusIcon = (_oc) => {
20309
20591
  })
20310
20592
  );
20311
20593
  };
20312
- const InstitutionIcon = (_qc) => {
20313
- var _rc = _qc, { size = 18 } = _rc, props = __objRest(_rc, ["size"]);
20594
+ const InstitutionIcon = (_Ic) => {
20595
+ var _Jc = _Ic, { size = 18 } = _Jc, props = __objRest(_Jc, ["size"]);
20314
20596
  return /* @__PURE__ */ jsxs(
20315
20597
  "svg",
20316
20598
  __spreadProps(__spreadValues({
@@ -20928,8 +21210,8 @@ const MenuItem = forwardRef(
20928
21210
  );
20929
21211
  const PILL_CLASS_NAME = "Layer__Pill";
20930
21212
  const Pill = forwardRef(
20931
- function Pill2(_sc, ref) {
20932
- var _tc = _sc, { children, status } = _tc, restProps = __objRest(_tc, ["children", "status"]);
21213
+ function Pill2(_Kc, ref) {
21214
+ var _Lc = _Kc, { children, status } = _Lc, restProps = __objRest(_Lc, ["children", "status"]);
20933
21215
  const dataProperties = toDataProperties({ status });
20934
21216
  return /* @__PURE__ */ jsx(
20935
21217
  Button$2,
@@ -21290,158 +21572,9 @@ const LinkedAccountsContent = ({
21290
21572
  /* @__PURE__ */ jsx(LinkedAccountsConfirmationModal, {})
21291
21573
  ] });
21292
21574
  };
21293
- const CALENDAR_CLASS_NAME = "Layer__UI__Calendar";
21294
- const Calendar = forwardRef(
21295
- function Calendar2(_uc, ref) {
21296
- var _vc = _uc, { className, isReadOnly } = _vc, restProps = __objRest(_vc, ["className", "isReadOnly"]);
21297
- const dataProperties = toDataProperties({ readonly: isReadOnly });
21298
- return /* @__PURE__ */ jsx(
21299
- Calendar$1,
21300
- __spreadProps(__spreadValues(__spreadValues({}, dataProperties), restProps), {
21301
- isReadOnly,
21302
- className: classNames(CALENDAR_CLASS_NAME, className),
21303
- ref
21304
- })
21305
- );
21306
- }
21307
- );
21308
- const CALENDAR_GRID_CLASS_NAME = "Layer__UI__CalendarGrid";
21309
- const CalendarGrid = forwardRef(
21310
- function CalendarGrid2(_wc, ref) {
21311
- var _xc = _wc, { className } = _xc, restProps = __objRest(_xc, ["className"]);
21312
- return /* @__PURE__ */ jsx(
21313
- CalendarGrid$1,
21314
- __spreadProps(__spreadValues({}, restProps), {
21315
- className: classNames(CALENDAR_GRID_CLASS_NAME, className),
21316
- ref
21317
- })
21318
- );
21319
- }
21320
- );
21321
- const CALENDAR_GRID_BODY_CLASS_NAME = "Layer__UI__CalendarGridBody";
21322
- const CalendarGridBody = forwardRef(
21323
- function CalendarGridBody2(_yc, ref) {
21324
- var _zc = _yc, { className } = _zc, restProps = __objRest(_zc, ["className"]);
21325
- return /* @__PURE__ */ jsx(
21326
- CalendarGridBody$1,
21327
- __spreadProps(__spreadValues({}, restProps), {
21328
- className: classNames(CALENDAR_GRID_BODY_CLASS_NAME, className),
21329
- ref
21330
- })
21331
- );
21332
- }
21333
- );
21334
- const CALENDAR_CELL_CLASS_NAME = "Layer__UI__CalendarCell";
21335
- const CalendarCell = forwardRef(
21336
- function CalendarCell2(_Ac, ref) {
21337
- var _Bc = _Ac, { className, size = "sm" } = _Bc, restProps = __objRest(_Bc, ["className", "size"]);
21338
- const dataProperties = toDataProperties({ size });
21339
- return /* @__PURE__ */ jsx(
21340
- CalendarCell$1,
21341
- __spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
21342
- className: classNames(CALENDAR_CELL_CLASS_NAME, className),
21343
- ref
21344
- })
21345
- );
21346
- }
21347
- );
21348
- const CALENDAR_GRID_HEADER_CLASS_NAME = "Layer__UI__CalendarGridHeader";
21349
- const CalendarGridHeader = forwardRef(
21350
- function CalendarGridHeader2(_Cc, ref) {
21351
- var _Dc = _Cc, { className } = _Dc, restProps = __objRest(_Dc, ["className"]);
21352
- return /* @__PURE__ */ jsx(
21353
- CalendarGridHeader$1,
21354
- __spreadProps(__spreadValues({}, restProps), {
21355
- className: classNames(CALENDAR_GRID_HEADER_CLASS_NAME, className),
21356
- ref
21357
- })
21358
- );
21359
- }
21360
- );
21361
- const CALENDAR_HEADER_CELL_CLASS_NAME = "Layer__UI__CalendarHeaderCell";
21362
- const CalendarHeaderCell = forwardRef(
21363
- function CalendarHeaderCell2(_Ec, ref) {
21364
- var _Fc = _Ec, { className, size = "sm" } = _Fc, restProps = __objRest(_Fc, ["className", "size"]);
21365
- const dataProperties = toDataProperties({ size });
21366
- return /* @__PURE__ */ jsx(
21367
- CalendarHeaderCell$1,
21368
- __spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
21369
- className: classNames(CALENDAR_HEADER_CELL_CLASS_NAME, className),
21370
- ref
21371
- })
21372
- );
21373
- }
21374
- );
21375
- const DateCalendar = ({ minDate, maxDate, variant }) => {
21376
- return /* @__PURE__ */ jsxs(Calendar, { minValue: minDate, maxValue: maxDate, children: [
21377
- /* @__PURE__ */ jsxs(HStack, { align: "center", justify: "space-between", pb: "xs", pi: "xs", className: "Layer__DateCalendar__Header", children: [
21378
- /* @__PURE__ */ jsx(Button, { icon: true, inset: true, variant: "ghost", slot: "previous", children: /* @__PURE__ */ jsx(ChevronLeft, { size: 20 }) }),
21379
- /* @__PURE__ */ jsx(Heading$1, { weight: "normal", size: "sm" }),
21380
- /* @__PURE__ */ jsx(Button, { icon: true, inset: true, variant: "ghost", slot: "next", children: /* @__PURE__ */ jsx(ChevronRight, { size: 20 }) })
21381
- ] }),
21382
- /* @__PURE__ */ jsx(HStack, { pb: "xs", pi: "xs", children: /* @__PURE__ */ jsxs(CalendarGrid, { children: [
21383
- /* @__PURE__ */ jsx(CalendarGridHeader, { children: (day) => /* @__PURE__ */ jsx(CalendarHeaderCell, { size: variant === "mobile" ? "md" : "sm", children: day }) }),
21384
- /* @__PURE__ */ jsx(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx(CalendarCell, { date, size: variant === "mobile" ? "md" : "sm" }) })
21385
- ] }) })
21386
- ] });
21387
- };
21388
- const DatePickerInput = ({ errorText, variant, onClick }) => {
21389
- const errorTriangle = useMemo(() => {
21390
- if (variant === "mobile" || !errorText) return null;
21391
- return /* @__PURE__ */ jsxs(DeprecatedTooltip, { offset: 12, children: [
21392
- /* @__PURE__ */ jsx(DeprecatedTooltipTrigger, { children: /* @__PURE__ */ jsx(FieldError, { children: /* @__PURE__ */ jsx(TriangleAlert, { size: 18 }) }) }),
21393
- /* @__PURE__ */ jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", width: "md", children: errorText })
21394
- ] });
21395
- }, [errorText, variant]);
21396
- if (variant === "mobile") {
21397
- return /* @__PURE__ */ jsx(InputGroup$1, { slot: "input", isInvalid: !!errorText, onClick, children: /* @__PURE__ */ jsx(DateInput, { inset: true, pointerEvents: "none", children: (segment) => /* @__PURE__ */ jsx(DateSegment, { isReadOnly: true, segment }) }) });
21398
- }
21399
- return /* @__PURE__ */ jsxs(InputGroup$1, { slot: "input", isInvalid: !!errorText, children: [
21400
- /* @__PURE__ */ jsx(DateInput, { inset: true, children: (segment) => /* @__PURE__ */ jsx(DateSegment, { segment }) }),
21401
- /* @__PURE__ */ jsxs(HStack, { gap: "3xs", align: "center", children: [
21402
- errorTriangle,
21403
- /* @__PURE__ */ jsx(Button, { icon: true, inset: true, variant: "ghost", onClick, children: /* @__PURE__ */ jsx(ChevronDown, { size: 20 }) })
21404
- ] })
21405
- ] });
21406
- };
21407
- const DatePicker = ({
21408
- label,
21409
- showLabel = true,
21410
- date,
21411
- minDate,
21412
- maxDate,
21413
- isInvalid,
21414
- errorText,
21415
- onBlur,
21416
- onChange,
21417
- isDisabled
21418
- }) => {
21419
- const additionalAriaProps = !showLabel && { "aria-label": label };
21420
- const { value } = useSizeClass();
21421
- const [isPopoverOpen, setPopoverOpen] = useState(false);
21422
- return /* @__PURE__ */ jsxs(
21423
- DatePicker$1,
21424
- __spreadProps(__spreadValues({
21425
- granularity: "day",
21426
- value: date,
21427
- onBlur,
21428
- onChange,
21429
- isInvalid
21430
- }, additionalAriaProps), {
21431
- isOpen: isPopoverOpen,
21432
- onOpenChange: setPopoverOpen,
21433
- isDisabled,
21434
- children: [
21435
- showLabel && /* @__PURE__ */ jsx(Label, { children: label }),
21436
- /* @__PURE__ */ jsx(DatePickerInput, { errorText, variant: value, onClick: () => setPopoverOpen(true) }),
21437
- /* @__PURE__ */ jsx(ResponsivePopover, { children: /* @__PURE__ */ jsx(Dialog$1, { children: /* @__PURE__ */ jsx(DateCalendar, { minDate, maxDate, variant: value }) }) })
21438
- ]
21439
- })
21440
- );
21441
- };
21442
21575
  const getIsDateInvalid = (date, { minDate, maxDate }) => {
21443
21576
  if (date === null) return "Cannot select empty date";
21444
- if (minDate && date.compare(minDate) < 0) return "Cannot select date before the business activation date";
21577
+ if (minDate && date.compare(minDate) < 0) return `Cannot select date before ${formatDate(minDate.toDate())}`;
21445
21578
  if (maxDate && date.compare(maxDate) > 0) return "Cannot select date in the future";
21446
21579
  return null;
21447
21580
  };
@@ -22469,14 +22602,14 @@ const formatYAxisValue = (value) => {
22469
22602
  return value;
22470
22603
  }
22471
22604
  };
22472
- const CustomizedYTick = (_Gc) => {
22473
- var _Hc = _Gc, {
22605
+ const CustomizedYTick = (_Mc) => {
22606
+ var _Nc = _Mc, {
22474
22607
  verticalAnchor: _verticalAnchor,
22475
22608
  visibleTicksCount: _visibleTicksCount,
22476
22609
  tickFormatter: _tickFormatter,
22477
22610
  format: format2,
22478
22611
  payload
22479
- } = _Hc, restProps = __objRest(_Hc, [
22612
+ } = _Nc, restProps = __objRest(_Nc, [
22480
22613
  "verticalAnchor",
22481
22614
  "visibleTicksCount",
22482
22615
  "tickFormatter",
@@ -22485,8 +22618,8 @@ const CustomizedYTick = (_Gc) => {
22485
22618
  ]);
22486
22619
  return /* @__PURE__ */ jsx("text", __spreadProps(__spreadValues({}, restProps), { className: "Layer__ChartYAxis__tick", children: /* @__PURE__ */ jsx("tspan", { dy: "0.355em", children: format2(payload.value) }) }));
22487
22620
  };
22488
- const ChartYAxis = (_Ic) => {
22489
- var _Jc = _Ic, { format: format2 = formatYAxisValue } = _Jc, props = __objRest(_Jc, ["format"]);
22621
+ const ChartYAxis = (_Oc) => {
22622
+ var _Pc = _Oc, { format: format2 = formatYAxisValue } = _Pc, props = __objRest(_Pc, ["format"]);
22490
22623
  const tick = (tickProps) => /* @__PURE__ */ jsx(CustomizedYTick, __spreadProps(__spreadValues({}, tickProps), { format: format2 }));
22491
22624
  return /* @__PURE__ */ jsx(YAxis, __spreadValues({ tick }, props));
22492
22625
  };
@@ -22734,8 +22867,8 @@ const renderLegendContent = () => {
22734
22867
  )) });
22735
22868
  };
22736
22869
  const ProfitAndLossChartLegend = () => /* @__PURE__ */ jsx(Legend, { verticalAlign: "top", align: "right", content: renderLegendContent });
22737
- const BarChart2 = (_Kc) => {
22738
- var _Lc = _Kc, { size = 12 } = _Lc, props = __objRest(_Lc, ["size"]);
22870
+ const BarChart2 = (_Qc) => {
22871
+ var _Rc = _Qc, { size = 12 } = _Rc, props = __objRest(_Rc, ["size"]);
22739
22872
  return /* @__PURE__ */ jsxs(
22740
22873
  "svg",
22741
22874
  __spreadProps(__spreadValues({
@@ -22815,13 +22948,13 @@ const ChartTooltipCursor = ({ width, points, height }) => {
22815
22948
  }
22816
22949
  ) });
22817
22950
  };
22818
- const ChartTooltip = (_Mc) => {
22819
- var _Nc = _Mc, {
22951
+ const ChartTooltip = (_Sc) => {
22952
+ var _Tc = _Sc, {
22820
22953
  content,
22821
22954
  cursorWidth,
22822
22955
  animationDuration = 100,
22823
22956
  animationEasing = "ease-out"
22824
- } = _Nc, props = __objRest(_Nc, [
22957
+ } = _Tc, props = __objRest(_Tc, [
22825
22958
  "content",
22826
22959
  "cursorWidth",
22827
22960
  "animationDuration",
@@ -23083,11 +23216,11 @@ const ProfitAndLossChart = ({ tagFilter }) => {
23083
23216
  isSyncing ? /* @__PURE__ */ jsx(ProfitAndLossChartStateCard, {}) : null
23084
23217
  ] });
23085
23218
  };
23086
- const BackButton = (_Oc) => {
23087
- var _Pc = _Oc, {
23219
+ const BackButton = (_Uc) => {
23220
+ var _Vc = _Uc, {
23088
23221
  className,
23089
23222
  textOnly = false
23090
- } = _Pc, props = __objRest(_Pc, [
23223
+ } = _Vc, props = __objRest(_Vc, [
23091
23224
  "className",
23092
23225
  "textOnly"
23093
23226
  ]);
@@ -23141,8 +23274,8 @@ const TASKS_CHARTS_COLORS = {
23141
23274
  done: "#3B9C63",
23142
23275
  pending: "#DFA000"
23143
23276
  };
23144
- const SortArrows = (_Qc) => {
23145
- var _Rc = _Qc, { size = 13 } = _Rc, props = __objRest(_Rc, ["size"]);
23277
+ const SortArrows = (_Wc) => {
23278
+ var _Xc = _Wc, { size = 13 } = _Xc, props = __objRest(_Xc, ["size"]);
23146
23279
  return /* @__PURE__ */ jsxs(
23147
23280
  "svg",
23148
23281
  __spreadProps(__spreadValues({
@@ -23673,11 +23806,11 @@ const LedgerAccountsContext = createContext({
23673
23806
  fetchMore: () => {
23674
23807
  }
23675
23808
  });
23676
- const CloseButton = (_Sc) => {
23677
- var _Tc = _Sc, {
23809
+ const CloseButton = (_Yc) => {
23810
+ var _Zc = _Yc, {
23678
23811
  className,
23679
23812
  textOnly = false
23680
- } = _Tc, props = __objRest(_Tc, [
23813
+ } = _Zc, props = __objRest(_Zc, [
23681
23814
  "className",
23682
23815
  "textOnly"
23683
23816
  ]);
@@ -24687,16 +24820,21 @@ const DateSelectionComboBox = () => {
24687
24820
  const nextRange = rangeForPreset(nextPreset);
24688
24821
  setDateRange(nextRange);
24689
24822
  }, [setDateRange]);
24690
- return /* @__PURE__ */ jsx(
24691
- ComboBox,
24692
- {
24693
- options: options$4,
24694
- onSelectedValueChange,
24695
- selectedValue: selectedOption,
24696
- isSearchable: false,
24697
- isClearable: false
24698
- }
24699
- );
24823
+ const inputId = useId();
24824
+ return /* @__PURE__ */ jsxs(VStack, { children: [
24825
+ /* @__PURE__ */ jsx(Label, { size: "2xs", htmlFor: inputId, children: "Date Range" }),
24826
+ /* @__PURE__ */ jsx(
24827
+ ComboBox,
24828
+ {
24829
+ options: options$4,
24830
+ onSelectedValueChange,
24831
+ selectedValue: selectedOption,
24832
+ isSearchable: false,
24833
+ isClearable: false,
24834
+ inputId
24835
+ }
24836
+ )
24837
+ ] });
24700
24838
  };
24701
24839
  const GlobalDateRangePicker = () => {
24702
24840
  const { startDate: globalStartDate, endDate: globalEndDate } = useGlobalDateRange({ dateSelectionMode: "full" });
@@ -24738,28 +24876,36 @@ const GlobalDateRangePicker = () => {
24738
24876
  DatePicker,
24739
24877
  {
24740
24878
  label: "Start Date",
24741
- showLabel: false,
24742
24879
  date: localStartDate,
24743
24880
  onChange: onChangeStartDate,
24744
24881
  minDate: minStartDate,
24745
24882
  maxDate: maxStartDate,
24746
24883
  isInvalid: startDateInvalid,
24747
24884
  errorText: startDateErrorText,
24748
- onBlur: onBlurStartDate
24885
+ onBlur: onBlurStartDate,
24886
+ slotProps: {
24887
+ Label: {
24888
+ size: "2xs"
24889
+ }
24890
+ }
24749
24891
  }
24750
24892
  ),
24751
24893
  /* @__PURE__ */ jsx(
24752
24894
  DatePicker,
24753
24895
  {
24754
24896
  label: "End Date",
24755
- showLabel: false,
24756
24897
  date: localEndDate,
24757
24898
  onChange: onChangeEndDate,
24758
24899
  minDate: minEndDate,
24759
24900
  maxDate: maxEndDate,
24760
24901
  isInvalid: endDateInvalid,
24761
24902
  errorText: endDateErrorText,
24762
- onBlur: onBlurEndDate
24903
+ onBlur: onBlurEndDate,
24904
+ slotProps: {
24905
+ Label: {
24906
+ size: "2xs"
24907
+ }
24908
+ }
24763
24909
  }
24764
24910
  )
24765
24911
  ] });
@@ -26221,10 +26367,10 @@ function Internal_ProfitAndLossSummaries({
26221
26367
  unstable_AdditionalListItems.map((item, index) => /* @__PURE__ */ jsx(ProfitAndLossSummariesListItem, { children: item }, index))
26222
26368
  ] }) });
26223
26369
  }
26224
- function ProfitAndLossSummaries(_Uc) {
26225
- var _Vc = _Uc, {
26370
+ function ProfitAndLossSummaries(__c) {
26371
+ var _$c = __c, {
26226
26372
  onTransactionsToReviewClick
26227
- } = _Vc, restProps = __objRest(_Vc, [
26373
+ } = _$c, restProps = __objRest(_$c, [
26228
26374
  "onTransactionsToReviewClick"
26229
26375
  ]);
26230
26376
  return /* @__PURE__ */ jsx(
@@ -26423,8 +26569,8 @@ function BalanceSheetDownloadButton({
26423
26569
  /* @__PURE__ */ jsx(InvisibleDownload, { ref: invisibleDownloadRef })
26424
26570
  ] });
26425
26571
  }
26426
- const Collapse = (_Wc) => {
26427
- var props = __objRest(_Wc, []);
26572
+ const Collapse = (_ad) => {
26573
+ var props = __objRest(_ad, []);
26428
26574
  return /* @__PURE__ */ jsxs(
26429
26575
  "svg",
26430
26576
  __spreadProps(__spreadValues({
@@ -26457,8 +26603,8 @@ const Collapse = (_Wc) => {
26457
26603
  })
26458
26604
  );
26459
26605
  };
26460
- const Expand = (_Xc) => {
26461
- var props = __objRest(_Xc, []);
26606
+ const Expand = (_bd) => {
26607
+ var props = __objRest(_bd, []);
26462
26608
  return /* @__PURE__ */ jsxs(
26463
26609
  "svg",
26464
26610
  __spreadProps(__spreadValues({
@@ -26625,14 +26771,18 @@ const GlobalDatePicker = () => {
26625
26771
  DatePicker,
26626
26772
  {
26627
26773
  label: "Effective Date",
26628
- showLabel: false,
26629
26774
  date: localDate,
26630
26775
  onChange,
26631
26776
  minDate: minDateZdt,
26632
26777
  maxDate: maxDateZdt,
26633
26778
  isInvalid,
26634
26779
  errorText,
26635
- onBlur
26780
+ onBlur,
26781
+ slotProps: {
26782
+ Label: {
26783
+ size: "2xs"
26784
+ }
26785
+ }
26636
26786
  }
26637
26787
  );
26638
26788
  };
@@ -28146,8 +28296,8 @@ const ChartOfAccountsContext = createContext(
28146
28296
  }
28147
28297
  }
28148
28298
  );
28149
- const Plus = (_Yc) => {
28150
- var _Zc = _Yc, { size = 14 } = _Zc, props = __objRest(_Zc, ["size"]);
28299
+ const Plus = (_cd) => {
28300
+ var _dd = _cd, { size = 14 } = _dd, props = __objRest(_dd, ["size"]);
28151
28301
  return /* @__PURE__ */ jsxs(
28152
28302
  "svg",
28153
28303
  __spreadProps(__spreadValues({
@@ -28518,8 +28668,8 @@ var LedgerAccountNodeType = /* @__PURE__ */ ((LedgerAccountNodeType2) => {
28518
28668
  LedgerAccountNodeType2["Parent"] = "Parent";
28519
28669
  return LedgerAccountNodeType2;
28520
28670
  })(LedgerAccountNodeType || {});
28521
- const Edit2 = (__c) => {
28522
- var _$c = __c, { size = 18 } = _$c, props = __objRest(_$c, ["size"]);
28671
+ const Edit2 = (_ed) => {
28672
+ var _fd = _ed, { size = 18 } = _fd, props = __objRest(_fd, ["size"]);
28523
28673
  return /* @__PURE__ */ jsx(
28524
28674
  "svg",
28525
28675
  __spreadProps(__spreadValues({
@@ -31150,8 +31300,8 @@ const TasksHeader = ({
31150
31300
  }) => {
31151
31301
  return /* @__PURE__ */ jsx("div", { className: "Layer__tasks-header", children: /* @__PURE__ */ jsx(Text, { size: TextSize.lg, children: tasksHeader }) });
31152
31302
  };
31153
- const SmileIcon = (_ad) => {
31154
- var _bd = _ad, { size = 12 } = _bd, props = __objRest(_bd, ["size"]);
31303
+ const SmileIcon = (_gd) => {
31304
+ var _hd = _gd, { size = 12 } = _hd, props = __objRest(_hd, ["size"]);
31155
31305
  return /* @__PURE__ */ jsxs(
31156
31306
  "svg",
31157
31307
  __spreadProps(__spreadValues({
@@ -31996,8 +32146,8 @@ const useBookkeepingYearsStatus = () => {
31996
32146
  isLoading
31997
32147
  };
31998
32148
  };
31999
- const ArrowRightCircle = (_cd) => {
32000
- var _dd = _cd, { size = 18 } = _dd, props = __objRest(_dd, ["size"]);
32149
+ const ArrowRightCircle = (_id) => {
32150
+ var _jd = _id, { size = 18 } = _jd, props = __objRest(_jd, ["size"]);
32001
32151
  return /* @__PURE__ */ jsxs(
32002
32152
  "svg",
32003
32153
  __spreadProps(__spreadValues({
@@ -34045,12 +34195,12 @@ const FormSection = ({ children, title }) => {
34045
34195
  children
34046
34196
  ] });
34047
34197
  };
34048
- const PhoneInput = (_ed) => {
34049
- var _fd = _ed, {
34198
+ const PhoneInput = (_kd) => {
34199
+ var _ld = _kd, {
34050
34200
  value,
34051
34201
  onChange,
34052
34202
  placeholder = "Phone number"
34053
- } = _fd, props = __objRest(_fd, [
34203
+ } = _ld, props = __objRest(_ld, [
34054
34204
  "value",
34055
34205
  "onChange",
34056
34206
  "placeholder"
@@ -34342,8 +34492,8 @@ const SummaryStep = ({ onNext, title = defaultTitle$1, description = defaultDesc
34342
34492
  /* @__PURE__ */ jsx(Button$1, { onClick: onNext, children: nextBtnText })
34343
34493
  ] });
34344
34494
  };
34345
- const Document = (_gd) => {
34346
- var _hd = _gd, { size = 20 } = _hd, props = __objRest(_hd, ["size"]);
34495
+ const Document = (_md) => {
34496
+ var _nd = _md, { size = 20 } = _nd, props = __objRest(_nd, ["size"]);
34347
34497
  return /* @__PURE__ */ jsxs(
34348
34498
  "svg",
34349
34499
  __spreadProps(__spreadValues({
@@ -34448,8 +34598,8 @@ const Document = (_gd) => {
34448
34598
  })
34449
34599
  );
34450
34600
  };
34451
- const TrendingUp = (_id) => {
34452
- var _jd = _id, { size = 20 } = _jd, props = __objRest(_jd, ["size"]);
34601
+ const TrendingUp = (_od) => {
34602
+ var _pd = _od, { size = 20 } = _pd, props = __objRest(_pd, ["size"]);
34453
34603
  return /* @__PURE__ */ jsxs(
34454
34604
  "svg",
34455
34605
  __spreadProps(__spreadValues({
@@ -34706,8 +34856,8 @@ const PlatformOnboarding = ({ onComplete }) => {
34706
34856
  /* @__PURE__ */ jsx("div", { className: "Layer__platform-onboarding-layout__footer", children: renderStepFooter() })
34707
34857
  ] }) });
34708
34858
  };
34709
- const CoffeeIcon = (_kd) => {
34710
- var _ld = _kd, { size = 11 } = _ld, props = __objRest(_ld, ["size"]);
34859
+ const CoffeeIcon = (_qd) => {
34860
+ var _rd = _qd, { size = 11 } = _rd, props = __objRest(_rd, ["size"]);
34711
34861
  return /* @__PURE__ */ jsxs(
34712
34862
  "svg",
34713
34863
  __spreadProps(__spreadValues({
@@ -34778,8 +34928,8 @@ const CoffeeIcon = (_kd) => {
34778
34928
  })
34779
34929
  );
34780
34930
  };
34781
- const Link = (_md) => {
34782
- var _nd = _md, {
34931
+ const Link = (_sd) => {
34932
+ var _td = _sd, {
34783
34933
  className,
34784
34934
  children,
34785
34935
  variant = ButtonVariant.primary,
@@ -34789,7 +34939,7 @@ const Link = (_md) => {
34789
34939
  iconAsPrimary = false,
34790
34940
  justify = "center",
34791
34941
  fullWidth
34792
- } = _nd, props = __objRest(_nd, [
34942
+ } = _td, props = __objRest(_td, [
34793
34943
  "className",
34794
34944
  "children",
34795
34945
  "variant",
@@ -34881,8 +35031,8 @@ const BookkeepingUpsellBar = ({
34881
35031
  onClick ? /* @__PURE__ */ jsx(Button$1, { variant: ButtonVariant.secondary, onClick, children: "Schedule a demo" }) : href ? /* @__PURE__ */ jsx(Link, { href, target: "_blank", variant: ButtonVariant.secondary, children: "Schedule a demo" }) : null
34882
35032
  ] });
34883
35033
  };
34884
- const ChevronRightFill = (_od) => {
34885
- var _pd = _od, { size = 18 } = _pd, props = __objRest(_pd, ["size"]);
35034
+ const ChevronRightFill = (_ud) => {
35035
+ var _vd = _ud, { size = 18 } = _vd, props = __objRest(_vd, ["size"]);
34886
35036
  return /* @__PURE__ */ jsxs(
34887
35037
  "svg",
34888
35038
  __spreadProps(__spreadValues({
@@ -35178,7 +35328,11 @@ const InvoiceSchema = Schema.Struct({
35178
35328
  Schema.propertySignature(Schema.NullOr(Schema.Date)),
35179
35329
  Schema.fromKey("updated_at")
35180
35330
  ),
35181
- memo: Schema.NullOr(Schema.String)
35331
+ memo: Schema.NullOr(Schema.String),
35332
+ customPaymentInstructions: pipe(
35333
+ Schema.propertySignature(Schema.NullOr(Schema.String)),
35334
+ Schema.fromKey("custom_payment_instructions")
35335
+ )
35182
35336
  });
35183
35337
  const UpsertInvoiceTaxLineItemSchema = Schema.Struct({
35184
35338
  amount: Schema.Number
@@ -35215,6 +35369,9 @@ const UpsertInvoiceSchema = Schema.Struct({
35215
35369
  Schema.fromKey("customer_id")
35216
35370
  ),
35217
35371
  memo: Schema.optional(Schema.String),
35372
+ customPaymentInstructions: Schema.optional(Schema.String).pipe(
35373
+ Schema.fromKey("custom_payment_instructions")
35374
+ ),
35218
35375
  lineItems: pipe(
35219
35376
  Schema.propertySignature(Schema.Array(UpsertInvoiceLineItemSchema)),
35220
35377
  Schema.fromKey("line_items")
@@ -35225,12 +35382,10 @@ const UpsertInvoiceSchema = Schema.Struct({
35225
35382
  });
35226
35383
  const InvoiceFormLineItemSchema = Schema.Struct({
35227
35384
  description: Schema.String,
35228
- unitPrice: Schema.BigDecimal,
35229
- quantity: Schema.BigDecimal,
35230
- amount: Schema.BigDecimal,
35231
- isTaxable: Schema.Boolean,
35232
- accountIdentifier: Schema.NullOr(AccountIdentifierSchema),
35233
- tags: Schema.Array(TagSchema)
35385
+ unitPrice: NonRecursiveBigDecimalSchema,
35386
+ quantity: NonRecursiveBigDecimalSchema,
35387
+ amount: NonRecursiveBigDecimalSchema,
35388
+ isTaxable: Schema.Boolean
35234
35389
  });
35235
35390
  const InvoiceFormLineItemEquivalence = Schema.equivalence(InvoiceFormLineItemSchema);
35236
35391
  const InvoiceTermsValuesSchema = Schema.Enums(InvoiceTermsValues);
@@ -35726,7 +35881,7 @@ const InvoiceTable = () => {
35726
35881
  };
35727
35882
  }, [fetchMore, hasMore]);
35728
35883
  const options2 = useMemo(() => Object.values(InvoiceStatusOptionConfig), []);
35729
- const SelectedValue = useMemo(() => {
35884
+ const SingleValue = useCallback(() => {
35730
35885
  const label = selectedInvoiceStatusOption.label;
35731
35886
  return label ? `Status: ${label}` : "Status";
35732
35887
  }, [selectedInvoiceStatusOption.label]);
@@ -35741,11 +35896,11 @@ const InvoiceTable = () => {
35741
35896
  isSearchable: false,
35742
35897
  isClearable: false,
35743
35898
  placeholder: "Status",
35744
- slots: { SelectedValue },
35899
+ slots: { SingleValue },
35745
35900
  "aria-label": "Status Filter"
35746
35901
  }
35747
35902
  ),
35748
- [SelectedValue, options2, selectedInvoiceStatusOption, setTableFilters]
35903
+ [SingleValue, options2, selectedInvoiceStatusOption, setTableFilters]
35749
35904
  );
35750
35905
  const CreateInvoiceButton = useCallback(
35751
35906
  () => /* @__PURE__ */ jsxs(Button, { onPress: toCreateInvoice, children: [
@@ -37723,8 +37878,8 @@ const useCustomerForm = (props) => {
37723
37878
  }, [form, formDefaults]);
37724
37879
  return useMemo(() => ({ form, submitError }), [form, submitError]);
37725
37880
  };
37726
- const CustomerForm = (_qd) => {
37727
- var _rd = _qd, { onSuccess, isReadOnly } = _rd, formState = __objRest(_rd, ["onSuccess", "isReadOnly"]);
37881
+ const CustomerForm = (_wd) => {
37882
+ var _xd = _wd, { onSuccess, isReadOnly } = _xd, formState = __objRest(_xd, ["onSuccess", "isReadOnly"]);
37728
37883
  const { form, submitError } = useCustomerForm(__spreadValues({ onSuccess }, formState));
37729
37884
  const blockNativeOnSubmit = useCallback((e) => {
37730
37885
  e.preventDefault();
@@ -37826,7 +37981,8 @@ const CustomerFormDrawer = (props) => {
37826
37981
  }
37827
37982
  );
37828
37983
  };
37829
- const InvoiceFormErrorBanner = ({ form, submitError }) => {
37984
+ const InvoiceFormErrorBanner = ({ submitError }) => {
37985
+ const form = useFormContext();
37830
37986
  return /* @__PURE__ */ jsx(form.Subscribe, { selector: (state) => state.errorMap, children: (errorMap) => {
37831
37987
  const validationErrors = flattenValidationErrors(errorMap);
37832
37988
  if (validationErrors.length > 0 || submitError) {
@@ -37844,9 +38000,9 @@ const InvoiceFormErrorBanner = ({ form, submitError }) => {
37844
38000
  } });
37845
38001
  };
37846
38002
  function computeSubtotal(lineItems) {
37847
- return lineItems.reduce((sum, item) => BigDecimal.sum(sum, item.amount), BIG_DECIMAL_ZERO);
38003
+ return lineItems.reduce((sum, item) => BigDecimal.sum(sum, fromNonRecursiveBigDecimal(item.amount)), BIG_DECIMAL_ZERO);
37848
38004
  }
37849
- const computeRawTaxableSubtotal = (lineItems) => lineItems.filter((item) => item.isTaxable).reduce((sum, item) => BigDecimal.sum(sum, item.amount), BIG_DECIMAL_ZERO);
38005
+ const computeRawTaxableSubtotal = (lineItems) => lineItems.filter((item) => item.isTaxable).reduce((sum, item) => BigDecimal.sum(sum, fromNonRecursiveBigDecimal(item.amount)), BIG_DECIMAL_ZERO);
37850
38006
  function computeAdditionalDiscount({
37851
38007
  subtotal,
37852
38008
  discountRate
@@ -37890,15 +38046,22 @@ const getGrandTotalFromInvoice = (invoice) => {
37890
38046
  const grandTotal = computeGrandTotal({ subtotal, additionalDiscount, taxes });
37891
38047
  return grandTotal;
37892
38048
  };
37893
- const INVOICE_MECE_TAG_DIMENSION = "Job";
37894
38049
  const EMPTY_LINE_ITEM = {
37895
38050
  description: "",
37896
- unitPrice: BIG_DECIMAL_ZERO,
37897
- quantity: BIG_DECIMAL_ONE,
37898
- amount: BIG_DECIMAL_ZERO,
37899
- isTaxable: false,
37900
- accountIdentifier: null,
37901
- tags: []
38051
+ unitPrice: NRBD_ZERO,
38052
+ quantity: NRBD_ONE,
38053
+ amount: NRBD_ZERO,
38054
+ isTaxable: false
38055
+ };
38056
+ const computeLineItemAmount = (unitPrice, quantity) => {
38057
+ const bdUnitPrice = fromNonRecursiveBigDecimal(unitPrice);
38058
+ const bdQuantity = fromNonRecursiveBigDecimal(quantity);
38059
+ return toNonRecursiveBigDecimal(BigDecimal.round(BigDecimal.normalize(BigDecimal.multiply(bdUnitPrice, bdQuantity)), { scale: 2 }));
38060
+ };
38061
+ const computeLineItemUnitPrice = (amount, quantity) => {
38062
+ const bdAmount = fromNonRecursiveBigDecimal(amount);
38063
+ const bdQuantity = fromNonRecursiveBigDecimal(quantity);
38064
+ return toNonRecursiveBigDecimal(BigDecimal.round(BigDecimal.normalize(safeDivide(bdAmount, bdQuantity)), { scale: 2 }));
37902
38065
  };
37903
38066
  const getEmptyInvoiceFormValues = () => {
37904
38067
  const sentAt = fromDate(startOfToday(), getLocalTimeZone());
@@ -37917,13 +38080,6 @@ const getEmptyInvoiceFormValues = () => {
37917
38080
  taxRate: BIG_DECIMAL_ZERO
37918
38081
  };
37919
38082
  };
37920
- const getAdditionalTags = (tags) => {
37921
- return tags.filter((obj) => obj.key.toLowerCase() !== INVOICE_MECE_TAG_DIMENSION.toLowerCase());
37922
- };
37923
- const getSelectedTag = (tags) => {
37924
- var _a;
37925
- return (_a = tags.find((obj) => obj.key.toLowerCase() === INVOICE_MECE_TAG_DIMENSION.toLowerCase())) != null ? _a : null;
37926
- };
37927
38083
  const getInvoiceLineItemAmount = (lineItem) => {
37928
38084
  const { unitPrice, quantity } = lineItem;
37929
38085
  return BigDecimal.multiply(quantity, convertCentsToBigDecimal(unitPrice));
@@ -37932,12 +38088,10 @@ const getInvoiceFormLineItem = (lineItem) => {
37932
38088
  const { description, unitPrice, quantity } = lineItem;
37933
38089
  return {
37934
38090
  description: description || "",
37935
- quantity: BigDecimal.normalize(quantity),
37936
- unitPrice: convertCentsToBigDecimal(unitPrice),
37937
- amount: getInvoiceLineItemAmount(lineItem),
37938
- isTaxable: lineItem.salesTaxTotal > 0,
37939
- accountIdentifier: lineItem.accountIdentifier,
37940
- tags: lineItem.transactionTags.map(makeTagFromTransactionTag)
38091
+ quantity: toNonRecursiveBigDecimal(quantity),
38092
+ unitPrice: toNonRecursiveBigDecimal(convertCentsToBigDecimal(unitPrice)),
38093
+ amount: toNonRecursiveBigDecimal(getInvoiceLineItemAmount(lineItem)),
38094
+ isTaxable: lineItem.salesTaxTotal > 0
37941
38095
  };
37942
38096
  };
37943
38097
  const getInvoiceFormInitialValues = (invoice) => {
@@ -37995,14 +38149,6 @@ const validateInvoiceForm = ({ value: invoice }) => {
37995
38149
  errors.push({ lineItems: "Invoice requires at least one non-empty line item." });
37996
38150
  }
37997
38151
  nonEmptyLineItems.some((item) => {
37998
- if (item.accountIdentifier === null) {
37999
- errors.push({ lineItems: "Invoice has incomplete line items. Please include required field: Revenue account." });
38000
- return true;
38001
- }
38002
- if (getSelectedTag(item.tags) === null) {
38003
- errors.push({ lineItems: `Invoice has incomplete line items. Please include required field: ${INVOICE_MECE_TAG_DIMENSION}.` });
38004
- return true;
38005
- }
38006
38152
  if (item.description.trim() === "") {
38007
38153
  errors.push({ lineItems: "Invoice has incomplete line items. Please include required field: Description." });
38008
38154
  return true;
@@ -38023,14 +38169,14 @@ const convertInvoiceFormToParams = (form) => {
38023
38169
  invoiceNumber: form.invoiceNumber.trim(),
38024
38170
  memo: form.memo.trim(),
38025
38171
  lineItems: form.lineItems.filter((item) => !InvoiceFormLineItemEquivalence(EMPTY_LINE_ITEM, item)).map((item) => {
38026
- const baseLineItem = __spreadValues({
38172
+ const baseLineItem = {
38027
38173
  description: item.description.trim(),
38028
- unitPrice: convertBigDecimalToCents(item.unitPrice),
38029
- quantity: item.quantity,
38030
- tags: item.tags.map(makeTagKeyValueFromTag)
38031
- }, item.accountIdentifier && { accountIdentifier: item.accountIdentifier });
38174
+ unitPrice: convertBigDecimalToCents(fromNonRecursiveBigDecimal(item.unitPrice)),
38175
+ quantity: fromNonRecursiveBigDecimal(item.quantity)
38176
+ };
38032
38177
  if (!item.isTaxable || BigDecimal.equals(form.taxRate, BIG_DECIMAL_ZERO)) return baseLineItem;
38033
- const itemTaxableSubtotal = computeTaxableSubtotal({ rawTaxableSubtotal: item.amount, discountRate: form.discountRate });
38178
+ const itemAmount = fromNonRecursiveBigDecimal(item.amount);
38179
+ const itemTaxableSubtotal = computeTaxableSubtotal({ rawTaxableSubtotal: itemAmount, discountRate: form.discountRate });
38034
38180
  const itemTaxes = computeTaxes({ taxableSubtotal: itemTaxableSubtotal, taxRate: form.taxRate });
38035
38181
  return __spreadProps(__spreadValues({}, baseLineItem), { salesTaxes: [{ amount: convertBigDecimalToCents(itemTaxes) }] });
38036
38182
  })
@@ -38041,50 +38187,13 @@ const convertInvoiceFormToParams = (form) => {
38041
38187
  });
38042
38188
  };
38043
38189
  const InvoiceFormLineItemRow = ({ form, index, isReadOnly, onDeleteLine }) => {
38044
- return /* @__PURE__ */ jsx(VStack, { gap: "xs", children: /* @__PURE__ */ jsxs(
38190
+ return /* @__PURE__ */ jsx(VStack, { children: /* @__PURE__ */ jsxs(
38045
38191
  HStack,
38046
38192
  {
38047
38193
  gap: "xs",
38048
38194
  align: "end",
38049
38195
  className: classNames("Layer__InvoiceForm__LineItem", isReadOnly && "Layer__InvoiceForm__LineItem--readonly"),
38050
38196
  children: [
38051
- /* @__PURE__ */ jsx(form.Field, { name: `lineItems[${index}].accountIdentifier`, children: (field) => {
38052
- const onValueChange = (value) => {
38053
- if (value && !isClassificationAccountIdentifier(value)) {
38054
- return;
38055
- }
38056
- field.setValue(value);
38057
- };
38058
- return /* @__PURE__ */ jsx(
38059
- LedgerAccountCombobox,
38060
- {
38061
- label: "Revenue account (hidden)",
38062
- value: field.state.value,
38063
- mode: CategoriesListMode.Revenue,
38064
- onValueChange,
38065
- isReadOnly,
38066
- showLabel: index === 0
38067
- }
38068
- );
38069
- } }),
38070
- /* @__PURE__ */ jsx(form.Field, { name: `lineItems[${index}].tags`, children: (field) => {
38071
- const additionalTags = getAdditionalTags(field.state.value);
38072
- const selectedTag = getSelectedTag(field.state.value);
38073
- const onValueChange = (value) => {
38074
- field.setValue(value ? [...additionalTags, value] : additionalTags);
38075
- };
38076
- return /* @__PURE__ */ jsx(
38077
- TagDimensionCombobox,
38078
- {
38079
- dimensionKey: INVOICE_MECE_TAG_DIMENSION,
38080
- isReadOnly,
38081
- value: selectedTag,
38082
- onValueChange,
38083
- showLabel: index === 0,
38084
- isClearable: false
38085
- }
38086
- );
38087
- } }),
38088
38197
  /* @__PURE__ */ jsx(form.AppField, { name: `lineItems[${index}].description`, children: (field) => /* @__PURE__ */ jsx(field.FormTextField, { label: "Description", showLabel: index === 0, isReadOnly }) }),
38089
38198
  /* @__PURE__ */ jsx(
38090
38199
  form.AppField,
@@ -38094,13 +38203,13 @@ const InvoiceFormLineItemRow = ({ form, index, isReadOnly, onDeleteLine }) => {
38094
38203
  onBlur: ({ value: quantity }) => {
38095
38204
  const amount = form.getFieldValue(`lineItems[${index}].amount`);
38096
38205
  const unitPrice = form.getFieldValue(`lineItems[${index}].unitPrice`);
38097
- const nextAmount = BigDecimal.round(BigDecimal.normalize(BigDecimal.multiply(unitPrice, quantity)), { scale: 2 });
38098
- if (!BigDecimal.equals(amount, nextAmount)) {
38099
- form.setFieldValue(`lineItems[${index}].amount`, withForceUpdate(nextAmount));
38206
+ const nextAmount = computeLineItemAmount(unitPrice, quantity);
38207
+ if (!nrbdEquals(amount, nextAmount)) {
38208
+ form.setFieldValue(`lineItems[${index}].amount`, nextAmount);
38100
38209
  }
38101
38210
  }
38102
38211
  },
38103
- children: (field) => /* @__PURE__ */ jsx(field.FormBigDecimalField, { label: "Quantity", showLabel: index === 0, isReadOnly })
38212
+ children: (field) => /* @__PURE__ */ jsx(field.FormNonRecursiveBigDecimalField, { label: "Quantity", showLabel: index === 0, isReadOnly })
38104
38213
  }
38105
38214
  ),
38106
38215
  /* @__PURE__ */ jsx(
@@ -38111,13 +38220,13 @@ const InvoiceFormLineItemRow = ({ form, index, isReadOnly, onDeleteLine }) => {
38111
38220
  onBlur: ({ value: unitPrice }) => {
38112
38221
  const amount = form.getFieldValue(`lineItems[${index}].amount`);
38113
38222
  const quantity = form.getFieldValue(`lineItems[${index}].quantity`);
38114
- const nextAmount = BigDecimal.round(BigDecimal.normalize(BigDecimal.multiply(unitPrice, quantity)), { scale: 2 });
38115
- if (!BigDecimal.equals(amount, nextAmount)) {
38116
- form.setFieldValue(`lineItems[${index}].amount`, withForceUpdate(nextAmount));
38223
+ const nextAmount = computeLineItemAmount(unitPrice, quantity);
38224
+ if (!nrbdEquals(amount, nextAmount)) {
38225
+ form.setFieldValue(`lineItems[${index}].amount`, nextAmount);
38117
38226
  }
38118
38227
  }
38119
38228
  },
38120
- children: (field) => /* @__PURE__ */ jsx(field.FormBigDecimalField, { label: "Rate", mode: "currency", showLabel: index === 0, allowNegative: true, isReadOnly })
38229
+ children: (field) => /* @__PURE__ */ jsx(field.FormNonRecursiveBigDecimalField, { label: "Rate", mode: "currency", showLabel: index === 0, allowNegative: true, isReadOnly })
38121
38230
  }
38122
38231
  ),
38123
38232
  /* @__PURE__ */ jsx(
@@ -38128,13 +38237,13 @@ const InvoiceFormLineItemRow = ({ form, index, isReadOnly, onDeleteLine }) => {
38128
38237
  onBlur: ({ value: amount }) => {
38129
38238
  const unitPrice = form.getFieldValue(`lineItems[${index}].unitPrice`);
38130
38239
  const quantity = form.getFieldValue(`lineItems[${index}].quantity`);
38131
- const nextUnitPrice = BigDecimal.round(BigDecimal.normalize(safeDivide(amount, quantity)), { scale: 2 });
38132
- if (!BigDecimal.equals(unitPrice, nextUnitPrice)) {
38133
- form.setFieldValue(`lineItems[${index}].unitPrice`, withForceUpdate(nextUnitPrice));
38240
+ const nextUnitPrice = computeLineItemUnitPrice(amount, quantity);
38241
+ if (!nrbdEquals(unitPrice, nextUnitPrice)) {
38242
+ form.setFieldValue(`lineItems[${index}].unitPrice`, nextUnitPrice);
38134
38243
  }
38135
38244
  }
38136
38245
  },
38137
- children: (field) => /* @__PURE__ */ jsx(field.FormBigDecimalField, { label: "Amount", mode: "currency", showLabel: index === 0, allowNegative: true, isReadOnly })
38246
+ children: (field) => /* @__PURE__ */ jsx(field.FormNonRecursiveBigDecimalField, { label: "Amount", mode: "currency", showLabel: index === 0, allowNegative: true, isReadOnly })
38138
38247
  }
38139
38248
  ),
38140
38249
  /* @__PURE__ */ jsx(form.AppField, { name: `lineItems[${index}].isTaxable`, children: (field) => /* @__PURE__ */ jsx(field.FormCheckboxField, { label: "Taxable", showLabel: index === 0, isReadOnly }) }),
@@ -38148,7 +38257,16 @@ const InvoiceFormLineItemsSection = ({
38148
38257
  isReadOnly
38149
38258
  }) => {
38150
38259
  return /* @__PURE__ */ jsx(form.Field, { name: "lineItems", mode: "array", children: (field) => /* @__PURE__ */ jsxs(VStack, { gap: "xs", align: "baseline", children: [
38151
- field.state.value.map((_value, index) => /* @__PURE__ */ jsx(InvoiceFormLineItemRow, { form, index, isReadOnly, onDeleteLine: () => field.removeValue(index) }, index)),
38260
+ field.state.value.map((_lineItem, index) => /* @__PURE__ */ jsx(
38261
+ InvoiceFormLineItemRow,
38262
+ {
38263
+ form,
38264
+ index,
38265
+ isReadOnly,
38266
+ onDeleteLine: () => field.removeValue(index)
38267
+ },
38268
+ index
38269
+ )),
38152
38270
  !isReadOnly && /* @__PURE__ */ jsxs(Button, { variant: "outlined", onClick: () => field.pushValue(EMPTY_LINE_ITEM), children: [
38153
38271
  "Add line item",
38154
38272
  /* @__PURE__ */ jsx(Plus$1, { size: 16 })
@@ -38183,45 +38301,6 @@ const InvoiceFormMetadataSection = ({
38183
38301
  ] })
38184
38302
  ] }) });
38185
38303
  };
38186
- const returnTrue = () => true;
38187
- function CreatableComboBox(_sd) {
38188
- var _td = _sd, {
38189
- className,
38190
- slots,
38191
- isError,
38192
- selectedValue,
38193
- onSelectedValueChange,
38194
- onCreateOption,
38195
- formatCreateLabel: formatCreateLabel2,
38196
- createOptionPosition = "first",
38197
- isValidNewOption = returnTrue
38198
- } = _td, props = __objRest(_td, [
38199
- "className",
38200
- "slots",
38201
- "isError",
38202
- "selectedValue",
38203
- "onSelectedValueChange",
38204
- "onCreateOption",
38205
- "formatCreateLabel",
38206
- "createOptionPosition",
38207
- "isValidNewOption"
38208
- ]);
38209
- const commonSelectProps = useCommonComboBoxProps(__spreadValues({ className, slots }, props));
38210
- return /* @__PURE__ */ jsxs(VStack, { gap: "3xs", fluid: true, className: className ? `${className}__Container` : void 0, children: [
38211
- /* @__PURE__ */ jsx(
38212
- BaseCreatableSelect,
38213
- __spreadProps(__spreadValues({}, commonSelectProps), {
38214
- value: selectedValue,
38215
- onChange: onSelectedValueChange,
38216
- onCreateOption,
38217
- isValidNewOption,
38218
- formatCreateLabel: formatCreateLabel2,
38219
- createOptionPosition
38220
- })
38221
- ),
38222
- /* @__PURE__ */ jsx(ComboBoxErrorMessage, { isError, errorMessage: slots == null ? void 0 : slots.ErrorMessage })
38223
- ] });
38224
- }
38225
38304
  function MaybeCreatableComboBox(props) {
38226
38305
  if (props.isCreatable) {
38227
38306
  return /* @__PURE__ */ jsx(CreatableComboBox, __spreadValues({}, props));
@@ -38431,7 +38510,7 @@ const InvoiceFormTermsSection = ({
38431
38510
  updateDueAtFromTermsAndSentAt(terms, sentAt);
38432
38511
  }
38433
38512
  },
38434
- children: (field) => /* @__PURE__ */ jsx(field.FormDateField, { label: "Invoice date", inline: true, className: "Layer__InvoiceForm__Field__SentAt", isReadOnly })
38513
+ children: (field) => /* @__PURE__ */ jsx(field.FormDatePickerField, { label: "Invoice date", inline: true, className: "Layer__InvoiceForm__Field__SentAt", isReadOnly })
38435
38514
  }
38436
38515
  ),
38437
38516
  /* @__PURE__ */ jsx(
@@ -38449,7 +38528,7 @@ const InvoiceFormTermsSection = ({
38449
38528
  lastDueAtRef.current = dueAt;
38450
38529
  }
38451
38530
  },
38452
- children: (field) => /* @__PURE__ */ jsx(field.FormDateField, { label: "Due date", inline: true, className: "Layer__InvoiceForm__Field__DueAt", isReadOnly })
38531
+ children: (field) => /* @__PURE__ */ jsx(field.FormDatePickerField, { label: "Due date", inline: true, className: "Layer__InvoiceForm__Field__DueAt", isReadOnly })
38453
38532
  }
38454
38533
  )
38455
38534
  ] })
@@ -38502,23 +38581,26 @@ const useInvoiceForm = (props) => {
38502
38581
  const upsertInvoiceProps = mode === UpsertInvoiceMode.Update ? { mode, invoiceId: props.invoice.id } : { mode };
38503
38582
  const { trigger: upsertInvoice } = useUpsertInvoice(upsertInvoiceProps);
38504
38583
  const invoice = isUpdateMode(props) ? props.invoice : null;
38505
- const defaultValuesRef = useRef(getInvoiceFormDefaultValues(invoice));
38506
- const defaultValues = defaultValuesRef.current;
38507
- const onSubmit = useCallback((_0) => __async(null, [_0], function* ({ value, meta }) {
38508
- try {
38509
- const upsertInvoiceParams = convertInvoiceFormToParams(value);
38510
- const upsertInvoiceRequest = Schema.encodeUnknownSync(UpsertInvoiceSchema)(upsertInvoiceParams);
38511
- const { data: invoice2 } = yield upsertInvoice(upsertInvoiceRequest);
38512
- setSubmitError(void 0);
38513
- onSuccess(invoice2);
38514
- if (meta.submitAction === "send" && onSendInvoice) {
38515
- yield onSendInvoice(invoice2.id);
38584
+ const defaultValues = useMemo(() => getInvoiceFormDefaultValues(invoice), [invoice]);
38585
+ const onSubmit = useCallback(
38586
+ (_0) => __async(null, [_0], function* ({ value, meta, formApi }) {
38587
+ try {
38588
+ const upsertInvoiceParams = convertInvoiceFormToParams(value);
38589
+ const upsertInvoiceRequest = Schema.encodeUnknownSync(UpsertInvoiceSchema)(upsertInvoiceParams);
38590
+ const { data: invoice2 } = yield upsertInvoice(upsertInvoiceRequest);
38591
+ setSubmitError(void 0);
38592
+ onSuccess(invoice2);
38593
+ formApi.reset();
38594
+ if (meta.submitAction === "send" && onSendInvoice) {
38595
+ yield onSendInvoice(invoice2.id);
38596
+ }
38597
+ } catch (e) {
38598
+ console.error(e);
38599
+ setSubmitError("Something went wrong. Please try again.");
38516
38600
  }
38517
- } catch (e) {
38518
- console.error(e);
38519
- setSubmitError("Something went wrong. Please try again.");
38520
- }
38521
- }), [onSendInvoice, onSuccess, upsertInvoice]);
38601
+ }),
38602
+ [onSendInvoice, onSuccess, upsertInvoice]
38603
+ );
38522
38604
  const validators = useMemo(() => ({
38523
38605
  onDynamic: validateInvoiceForm
38524
38606
  }), []);
@@ -38605,7 +38687,7 @@ const InvoiceForm = forwardRef((props, ref) => {
38605
38687
  }, [formState, onChangeFormState]);
38606
38688
  return /* @__PURE__ */ jsxs(Fragment, { children: [
38607
38689
  /* @__PURE__ */ jsxs(Form, { className: "Layer__InvoiceForm", onSubmit: blockNativeOnSubmit, children: [
38608
- /* @__PURE__ */ jsx(InvoiceFormErrorBanner, { form, submitError }),
38690
+ /* @__PURE__ */ jsx(form.AppForm, { children: /* @__PURE__ */ jsx(InvoiceFormErrorBanner, { submitError }) }),
38609
38691
  /* @__PURE__ */ jsx(
38610
38692
  InvoiceFormTermsSection,
38611
38693
  {
@@ -38715,8 +38797,8 @@ const getClassnameForSubComponent = (className, suffix) => {
38715
38797
  };
38716
38798
  const METER_CLASS_NAME = "Layer__Meter";
38717
38799
  const Meter = forwardRef(
38718
- function Meter2(_ud, ref) {
38719
- var _vd = _ud, { className, label, meterOnly } = _vd, restProps = __objRest(_vd, ["className", "label", "meterOnly"]);
38800
+ function Meter2(_yd, ref) {
38801
+ var _zd = _yd, { className, label, meterOnly } = _zd, restProps = __objRest(_zd, ["className", "label", "meterOnly"]);
38720
38802
  return /* @__PURE__ */ jsx(Meter$1, __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, restProps), { className: classNames(METER_CLASS_NAME, className), ref }), meterOnly && { "aria-label": label }), { children: ({ percentage, valueText }) => /* @__PURE__ */ jsxs(VStack, { gap: "3xs", fluid: true, children: [
38721
38803
  !meterOnly && /* @__PURE__ */ jsxs(HStack, { justify: "space-between", children: [
38722
38804
  /* @__PURE__ */ jsx(Label, { slot: "label", children: label }),
@@ -39143,15 +39225,9 @@ const InvoiceOverview = () => {
39143
39225
  /* @__PURE__ */ jsx(InvoiceTable, {})
39144
39226
  ] });
39145
39227
  };
39146
- const Invoices = ({
39147
- showTitle = true,
39148
- stringOverrides,
39149
- onSendInvoice
39150
- }) => {
39228
+ const Invoices = ({ stringOverrides, onSendInvoice }) => {
39151
39229
  usePreloadCustomers();
39152
- usePreloadCategories({ mode: CategoriesListMode.Revenue });
39153
- usePreloadTagDimensionByKey({ dimensionKey: INVOICE_MECE_TAG_DIMENSION });
39154
- return /* @__PURE__ */ jsx(InvoicesProvider, { onSendInvoice, children: /* @__PURE__ */ jsx(View, { title: (stringOverrides == null ? void 0 : stringOverrides.title) || "Invoices", showHeader: showTitle, children: /* @__PURE__ */ jsx(InvoicesContent, {}) }) });
39230
+ return /* @__PURE__ */ jsx(InvoicesProvider, { onSendInvoice, children: /* @__PURE__ */ jsx(View, { title: (stringOverrides == null ? void 0 : stringOverrides.title) || "Invoices", children: /* @__PURE__ */ jsx(InvoicesContent, {}) }) });
39155
39231
  };
39156
39232
  const InvoicesContent = () => {
39157
39233
  const routeState = useInvoiceRouteState();
@@ -39162,11 +39238,11 @@ const ProfitAndLossView = (props) => {
39162
39238
  const containerRef = useRef(null);
39163
39239
  return /* @__PURE__ */ jsx(Container, { name: COMPONENT_NAME$4, ref: containerRef, children: /* @__PURE__ */ jsx(ProfitAndLoss, { children: /* @__PURE__ */ jsx(ProfitAndLossPanel, __spreadValues({ containerRef }, props)) }) });
39164
39240
  };
39165
- const ProfitAndLossPanel = (_wd) => {
39166
- var _xd = _wd, {
39241
+ const ProfitAndLossPanel = (_Ad) => {
39242
+ var _Bd = _Ad, {
39167
39243
  containerRef,
39168
39244
  stringOverrides
39169
- } = _xd, props = __objRest(_xd, [
39245
+ } = _Bd, props = __objRest(_Bd, [
39170
39246
  "containerRef",
39171
39247
  "stringOverrides"
39172
39248
  ]);
@@ -39417,14 +39493,14 @@ function ExpandableDataTable({
39417
39493
  );
39418
39494
  }
39419
39495
  const UNIFIED_REPORT_TAG_KEY = "#unified-report";
39420
- function buildKey$g(_yd) {
39421
- var _zd = _yd, {
39496
+ function buildKey$g(_Cd) {
39497
+ var _Dd = _Cd, {
39422
39498
  access_token: accessToken,
39423
39499
  apiUrl,
39424
39500
  businessId,
39425
39501
  report,
39426
39502
  groupBy
39427
- } = _zd, dateParams = __objRest(_zd, [
39503
+ } = _Dd, dateParams = __objRest(_Dd, [
39428
39504
  "access_token",
39429
39505
  "apiUrl",
39430
39506
  "businessId",
@@ -39442,8 +39518,8 @@ function buildKey$g(_yd) {
39442
39518
  }, dateParams);
39443
39519
  }
39444
39520
  }
39445
- const getUnifiedReport = get((_Ad) => {
39446
- var _Bd = _Ad, { businessId, report, groupBy } = _Bd, dateParams = __objRest(_Bd, ["businessId", "report", "groupBy"]);
39521
+ const getUnifiedReport = get((_Ed) => {
39522
+ var _Fd = _Ed, { businessId, report, groupBy } = _Fd, dateParams = __objRest(_Fd, ["businessId", "report", "groupBy"]);
39447
39523
  const parameters = toDefinedSearchParameters(__spreadProps(__spreadValues({}, dateParams), { groupBy }));
39448
39524
  return `/v1/businesses/${businessId}/reports/unified/${report}?${parameters}`;
39449
39525
  });
@@ -39468,8 +39544,8 @@ class UnifiedReportSWRResponse {
39468
39544
  return this.swrResponse.mutate;
39469
39545
  }
39470
39546
  }
39471
- function useUnifiedReport(_Cd) {
39472
- var _Dd = _Cd, { report, groupBy } = _Dd, dateParams = __objRest(_Dd, ["report", "groupBy"]);
39547
+ function useUnifiedReport(_Gd) {
39548
+ var _Hd = _Gd, { report, groupBy } = _Hd, dateParams = __objRest(_Hd, ["report", "groupBy"]);
39473
39549
  const { data: auth } = useAuth();
39474
39550
  const { apiUrl } = useEnvironment();
39475
39551
  const { businessId } = useLayerContext();
@@ -39588,8 +39664,8 @@ const S3PresignedUrlSchema = Schema.Struct({
39588
39664
  createdAt: Schema.Date,
39589
39665
  documentId: Schema.NullishOr(Schema.UUID)
39590
39666
  });
39591
- const getUnifiedReportExcel = get((_Ed) => {
39592
- var _Fd = _Ed, { businessId, report, groupBy } = _Fd, dateParams = __objRest(_Fd, ["businessId", "report", "groupBy"]);
39667
+ const getUnifiedReportExcel = get((_Id) => {
39668
+ var _Jd = _Id, { businessId, report, groupBy } = _Jd, dateParams = __objRest(_Jd, ["businessId", "report", "groupBy"]);
39593
39669
  const parameters = toDefinedSearchParameters(__spreadProps(__spreadValues({}, dateParams), { groupBy }));
39594
39670
  return `/v1/businesses/${businessId}/reports/unified/${report}/exports/excel?${parameters}`;
39595
39671
  });
@@ -41002,19 +41078,19 @@ const VendorsProvider = ({ children }) => {
41002
41078
  const vendors = useVendors();
41003
41079
  return /* @__PURE__ */ jsx(VendorsContext.Provider, { value: vendors, children });
41004
41080
  };
41005
- const SelectVendor = (_Gd) => {
41006
- var _Hd = _Gd, { withContext = true } = _Hd, props = __objRest(_Hd, ["withContext"]);
41081
+ const SelectVendor = (_Kd) => {
41082
+ var _Ld = _Kd, { withContext = true } = _Ld, props = __objRest(_Ld, ["withContext"]);
41007
41083
  if (withContext) {
41008
41084
  return /* @__PURE__ */ jsx(VendorsProvider, { children: /* @__PURE__ */ jsx(SelectVendorContent, __spreadValues({}, props)) });
41009
41085
  }
41010
41086
  return /* @__PURE__ */ jsx(SelectVendorContent, __spreadValues({}, props));
41011
41087
  };
41012
- const SelectVendorContent = (_Id) => {
41013
- var _Jd = _Id, {
41088
+ const SelectVendorContent = (_Md) => {
41089
+ var _Nd = _Md, {
41014
41090
  value,
41015
41091
  onChange,
41016
41092
  placeholder = "Select vendor"
41017
- } = _Jd, props = __objRest(_Jd, [
41093
+ } = _Nd, props = __objRest(_Nd, [
41018
41094
  "value",
41019
41095
  "onChange",
41020
41096
  "placeholder"
@@ -41752,8 +41828,8 @@ const BillsTableWithPanel = ({
41752
41828
  }
41753
41829
  );
41754
41830
  };
41755
- const Bills = (_Kd) => {
41756
- var _Ld = _Kd, { context = true } = _Ld, props = __objRest(_Ld, ["context"]);
41831
+ const Bills = (_Od) => {
41832
+ var _Pd = _Od, { context = true } = _Pd, props = __objRest(_Pd, ["context"]);
41757
41833
  if (context) {
41758
41834
  return /* @__PURE__ */ jsx(BillsProvider, { children: /* @__PURE__ */ jsx(BillsContent, __spreadValues({}, props)) });
41759
41835
  }
@@ -41808,8 +41884,8 @@ const getTimezoneDisplay = (date) => {
41808
41884
  }
41809
41885
  };
41810
41886
  const LinkButton = forwardRef(
41811
- function LinkButton2(_Md, ref) {
41812
- var _Nd = _Md, {
41887
+ function LinkButton2(_Qd, ref) {
41888
+ var _Rd = _Qd, {
41813
41889
  children,
41814
41890
  ellipsis,
41815
41891
  icon,
@@ -41822,7 +41898,7 @@ const LinkButton = forwardRef(
41822
41898
  href,
41823
41899
  target,
41824
41900
  rel
41825
- } = _Nd, restProps = __objRest(_Nd, [
41901
+ } = _Rd, restProps = __objRest(_Rd, [
41826
41902
  "children",
41827
41903
  "ellipsis",
41828
41904
  "icon",
@@ -46603,11 +46679,11 @@ const TaxPaymentsMobileList = ({ data, isLoading, isError, slots }) => {
46603
46679
  ) });
46604
46680
  };
46605
46681
  const EMPTY_ARRAY = [];
46606
- const SimpleDataTable = (_Od) => {
46607
- var _Pd = _Od, {
46682
+ const SimpleDataTable = (_Sd) => {
46683
+ var _Td = _Sd, {
46608
46684
  data,
46609
46685
  columnConfig: columnConfig2
46610
- } = _Pd, rest = __objRest(_Pd, [
46686
+ } = _Td, rest = __objRest(_Td, [
46611
46687
  "data",
46612
46688
  "columnConfig"
46613
46689
  ]);
@@ -47719,14 +47795,14 @@ const BusinessProvider = ({
47719
47795
  }
47720
47796
  );
47721
47797
  };
47722
- const LayerProvider = (_Qd) => {
47723
- var _Rd = _Qd, {
47798
+ const LayerProvider = (_Ud) => {
47799
+ var _Vd = _Ud, {
47724
47800
  appId,
47725
47801
  appSecret,
47726
47802
  businessAccessToken,
47727
47803
  environment,
47728
47804
  usePlaidSandbox
47729
- } = _Rd, restProps = __objRest(_Rd, [
47805
+ } = _Vd, restProps = __objRest(_Vd, [
47730
47806
  "appId",
47731
47807
  "appSecret",
47732
47808
  "businessAccessToken",
@@ -47734,7 +47810,7 @@ const LayerProvider = (_Qd) => {
47734
47810
  "usePlaidSandbox"
47735
47811
  ]);
47736
47812
  const [cache] = useState(() => /* @__PURE__ */ new Map());
47737
- return /* @__PURE__ */ jsx(SWRConfig, { value: __spreadProps(__spreadValues({}, DEFAULT_SWR_CONFIG), { provider: () => cache }), children: /* @__PURE__ */ jsx(EnvironmentInputProvider, { environment, usePlaidSandbox, children: /* @__PURE__ */ jsx(
47813
+ return /* @__PURE__ */ jsx(SWRConfig, { value: __spreadProps(__spreadValues({}, DEFAULT_SWR_CONFIG), { provider: () => cache }), children: /* @__PURE__ */ jsx(I18nProvider, { locale: "en-US", children: /* @__PURE__ */ jsx(EnvironmentInputProvider, { environment, usePlaidSandbox, children: /* @__PURE__ */ jsx(
47738
47814
  AuthInputProvider,
47739
47815
  {
47740
47816
  appId,
@@ -47742,7 +47818,7 @@ const LayerProvider = (_Qd) => {
47742
47818
  businessAccessToken,
47743
47819
  children: /* @__PURE__ */ jsx(GlobalDateStoreProvider, { children: /* @__PURE__ */ jsx(BusinessProvider, __spreadValues({}, restProps)) })
47744
47820
  }
47745
- ) }) });
47821
+ ) }) }) });
47746
47822
  };
47747
47823
  export {
47748
47824
  AccountingOverview,