@layerfi/components 0.1.132-alpha → 0.1.132-alpha.1

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.
@@ -4,7 +4,7 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
4
4
  import { usePlaidLink } from "react-plaid-link";
5
5
  import useSWR, { SWRConfig, unstable_serialize, useSWRConfig } from "swr";
6
6
  import useSWRMutation from "swr/mutation";
7
- import { Breadcrumb, Breadcrumbs, Button, Calendar, CalendarCell, CalendarGrid, CalendarGridBody, CalendarGridHeader, CalendarHeaderCell, Cell, Checkbox, Collection, Column, DateField, DateInput, DatePicker, DateSegment, Dialog, DialogTrigger, FieldError, Form, GridList, GridListHeader, GridListItem, GridListSection, Group, Header, Heading, I18nProvider, Input, Label, Link, Menu, MenuItem, MenuTrigger, Meter, Modal, ModalOverlay, NumberField, Popover, Radio, RadioGroup, Row, SearchField, SelectionIndicator, Switch, Table, TableBody, TableHeader, Text, TextArea, TextField, ToggleButton, ToggleButtonGroup, Tree, TreeItem, TreeItemContent, composeRenderProps } from "react-aria-components";
7
+ import { I18nProvider } from "react-aria-components/I18nProvider";
8
8
  import { I18nextProvider, Trans, useTranslation } from "react-i18next";
9
9
  import { IntlProvider, useIntl } from "react-intl";
10
10
  import i18next from "i18next";
@@ -18,22 +18,56 @@ import { Schema as Schema$1, pipe as pipe$1 } from "effect/index";
18
18
  import { useStoreWithEqualityFn } from "zustand/traditional";
19
19
  import { FloatingPortal, autoUpdate, flip, offset, shift, useDismiss, useFloating, useFocus, useHover, useInteractions, useMergeRefs, useRole, useTransitionStyles } from "@floating-ui/react";
20
20
  import { CalendarDate, ZonedDateTime, fromDate, getLocalTimeZone, parseDate, toCalendarDate, today } from "@internationalized/date";
21
+ import { ToggleButtonGroup } from "react-aria-components/ToggleButtonGroup";
22
+ import { SelectionIndicator } from "react-aria-components/SelectionIndicator";
23
+ import { ToggleButton } from "react-aria-components/ToggleButton";
24
+ import { Header } from "react-aria-components/Header";
25
+ import { Label } from "react-aria-components/Label";
26
+ import { Text } from "react-aria-components/Text";
21
27
  import { mergeRefs } from "react-merge-refs";
22
28
  import useResizeObserver from "@react-hook/resize-observer";
23
- import { AlertCircle, AlertTriangle, Archive, ArchiveRestore, ArrowRight, ArrowUpRight, Briefcase, Car, Check, CheckCircle, CheckIcon, ChevronLeft, ChevronRight, Circle, Clock, Clock3, CopyIcon, Edit, ExternalLink, FileDownIcon, FileSpreadsheet, FileText, HandCoins, Hourglass, Info, Layers2Icon, List, LoaderCircle, Lock, Menu as Menu$1, MenuIcon, Minus, PencilRuler, Play, Plus, RefreshCcw, RotateCcw, Save, Search, SearchX, Trash, Trash2, TriangleAlert, UploadCloud, UserRoundPen, Video, X, XCircle, XIcon } from "lucide-react";
29
+ import { Button } from "react-aria-components/Button";
30
+ import { AlertCircle, AlertTriangle, Archive, ArchiveRestore, ArrowRight, ArrowUpRight, Briefcase, Car, Check, CheckCircle, CheckIcon, ChevronLeft, ChevronRight, Circle, Clock, Clock3, CopyIcon, Edit, ExternalLink, FileDownIcon, FileSpreadsheet, FileText, HandCoins, Hourglass, Info, Layers2Icon, List, LoaderCircle, Lock, Menu, MenuIcon, Minus, PencilRuler, Play, Plus, RefreshCcw, RotateCcw, Save, Search, SearchX, Trash, Trash2, TriangleAlert, UploadCloud, UserRoundPen, Video, X, XCircle, XIcon } from "lucide-react";
24
31
  import { DurationFormat } from "@formatjs/intl-durationformat";
32
+ import { Dialog, DialogTrigger } from "react-aria-components/Dialog";
33
+ import { Modal, ModalOverlay } from "react-aria-components/Modal";
34
+ import { Heading } from "react-aria-components/Heading";
25
35
  import Select, { components } from "react-select";
36
+ import { Group } from "react-aria-components/Group";
37
+ import { Input } from "react-aria-components/Input";
38
+ import { SearchField } from "react-aria-components/SearchField";
39
+ import { GridList, GridListHeader, GridListItem, GridListSection } from "react-aria-components/GridList";
40
+ import { composeRenderProps } from "react-aria-components/composeRenderProps";
41
+ import { Checkbox } from "react-aria-components/Checkbox";
26
42
  import CreatableSelect from "react-select/creatable";
27
43
  import { useDropzone } from "react-dropzone";
28
44
  import { createFormHook, createFormHookContexts, revalidateLogic, useForm, useStore as useStore$1 } from "@tanstack/react-form";
45
+ import { FieldError } from "react-aria-components/FieldError";
46
+ import { Form } from "react-aria-components/Form";
47
+ import { TextField } from "react-aria-components/TextField";
48
+ import { DateField, DateInput, DateSegment } from "react-aria-components/DateField";
49
+ import { DatePicker } from "react-aria-components/DatePicker";
50
+ import { Calendar, CalendarCell, CalendarGrid, CalendarGridBody, CalendarGridHeader, CalendarHeaderCell } from "react-aria-components/Calendar";
51
+ import { Popover } from "react-aria-components/Popover";
52
+ import { NumberField } from "react-aria-components/NumberField";
53
+ import { Radio, RadioGroup } from "react-aria-components/RadioGroup";
54
+ import { Switch } from "react-aria-components/Switch";
55
+ import { TextArea } from "react-aria-components/TextArea";
29
56
  import { createColumnHelper, flexRender, getCoreRowModel, getExpandedRowModel, getPaginationRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
30
57
  import { useVirtualizer } from "@tanstack/react-virtual";
58
+ import { Cell, Column, Row, Table, TableBody, TableHeader } from "react-aria-components/Table";
59
+ import { Menu as Menu$1, MenuItem, MenuTrigger, Popover as Popover$1 } from "react-aria-components/Menu";
31
60
  import { AnimatePresence, motion } from "motion/react";
32
61
  import { v4 } from "uuid";
33
62
  import CurrencyInput from "react-currency-input-field";
34
63
  import { Bar, BarChart, CartesianGrid, Cell as Cell$1, ComposedChart, DefaultZIndexes, Label as Label$1, LabelList, Legend, Line, Pie, PieChart, Rectangle, ReferenceLine, ResponsiveContainer, Text as Text$1, Tooltip, XAxis, YAxis, ZIndexLayer } from "recharts";
35
64
  import { createPortal } from "react-dom";
36
65
  import { PopupModal, useCalendlyEventListener } from "react-calendly";
66
+ import { Meter } from "react-aria-components/Meter";
67
+ import { Collection } from "react-aria-components/Collection";
68
+ import { Tree, TreeItem, TreeItemContent } from "react-aria-components/Tree";
69
+ import { Breadcrumb, Breadcrumbs } from "react-aria-components/Breadcrumbs";
70
+ import { Link } from "react-aria-components/Link";
37
71
  //#region \0rolldown/runtime.js
38
72
  var __defProp = Object.defineProperty;
39
73
  var __exportAll = (all, no_symbols) => {
@@ -216,7 +250,7 @@ var getIntlLocale = (locale) => {
216
250
  };
217
251
  var package_default = {
218
252
  name: "@layerfi/components",
219
- version: "0.1.132-alpha",
253
+ version: "0.1.132-alpha.1",
220
254
  description: "Layer React Components",
221
255
  main: "dist/cjs/index.cjs",
222
256
  module: "dist/esm/index.mjs",
@@ -318,7 +352,7 @@ var package_default = {
318
352
  "lodash-es": "^4.17.21",
319
353
  "lucide-react": "^0.507.0",
320
354
  "motion": "^12.23.11",
321
- "react-aria-components": "^1.13.0",
355
+ "react-aria-components": "^1.17.0",
322
356
  "react-calendly": "^4.4.0",
323
357
  "react-currency-input-field": "^3.10.0",
324
358
  "react-dropzone": "^14.3.8",
@@ -11199,8 +11233,8 @@ var CategorySelectDrawerWithTrigger = ({ selectedValue, onSelectedValueChange, s
11199
11233
  };
11200
11234
  //#endregion
11201
11235
  //#region src/components/TaxCodeSelect/useTaxCodeSelect.ts
11202
- var EMPTY_ARRAY$6 = [];
11203
- var useTaxCodeSelect = ({ options = EMPTY_ARRAY$6, selectedValue, onSelectedValueChange }) => {
11236
+ var EMPTY_ARRAY$7 = [];
11237
+ var useTaxCodeSelect = ({ options = EMPTY_ARRAY$7, selectedValue, onSelectedValueChange }) => {
11204
11238
  const { t } = useTranslation();
11205
11239
  const noTaxCodeOption = useMemo(() => TaxCodeComboBoxOption.noTaxCode(t("bankTransactions:action.no_tax_code", "No tax code")), [t]);
11206
11240
  const optionsWithNoTaxCode = useMemo(() => [noTaxCodeOption, ...options], [noTaxCodeOption, options]);
@@ -11362,7 +11396,7 @@ var MobileListSection = ({ label, items, renderItem, onClickItem }) => /* @__PUR
11362
11396
  });
11363
11397
  //#endregion
11364
11398
  //#region src/components/ui/MobileList/MobileList.tsx
11365
- var EMPTY_ARRAY$5 = [];
11399
+ var EMPTY_ARRAY$6 = [];
11366
11400
  var isSelectionEnabled = (props) => props.selectionMode !== "none" && props.enableSelection;
11367
11401
  var isGrouped = (data) => !!data && !Array.isArray(data);
11368
11402
  var MobileList = ({ ariaLabel, data, slots, renderItem, onClickItem, isLoading, isError, variant = "default", enableSelection = false, selectionMode = "none", selectedKeys, onSelectionChange }) => {
@@ -11396,7 +11430,7 @@ var MobileList = ({ ariaLabel, data, slots, renderItem, onClickItem, isLoading,
11396
11430
  items: group.items,
11397
11431
  renderItem,
11398
11432
  onClickItem
11399
- }, group.label)) : (data !== null && data !== void 0 ? data : EMPTY_ARRAY$5).map(renderRow)
11433
+ }, group.label)) : (data !== null && data !== void 0 ? data : EMPTY_ARRAY$6).map(renderRow)
11400
11434
  });
11401
11435
  };
11402
11436
  //#endregion
@@ -13223,7 +13257,7 @@ var DatePickerInput = ({ errorText, variant, onClick, isReadOnly }) => {
13223
13257
  //#region src/components/ui/Popover/Popover.tsx
13224
13258
  var _excluded$68 = ["flexInline"];
13225
13259
  var POPOVER_CLASS_NAMES = `Layer__Portal Layer__Popover`;
13226
- var Popover$1 = forwardRef(function Popover$2(_ref, ref) {
13260
+ var Popover$2 = forwardRef(function Popover$3(_ref, ref) {
13227
13261
  let { flexInline = false } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$68);
13228
13262
  const dataProperties = toDataProperties({ "flex-inline": flexInline });
13229
13263
  return /* @__PURE__ */ jsx(Popover, _objectSpread2(_objectSpread2(_objectSpread2({}, restProps), dataProperties), {}, {
@@ -13242,7 +13276,7 @@ function ResponsivePopover({ children, triggerRef }) {
13242
13276
  isDismissable: true,
13243
13277
  children
13244
13278
  });
13245
- return /* @__PURE__ */ jsx(Popover$1, {
13279
+ return /* @__PURE__ */ jsx(Popover$2, {
13246
13280
  triggerRef,
13247
13281
  placement: "bottom left",
13248
13282
  flexInline: true,
@@ -14560,7 +14594,7 @@ var DEFAULT_NUM_ROWS = 15;
14560
14594
  var HEADER_HEIGHT = 52;
14561
14595
  var DEFAULT_TABLE_HEIGHT = DEFAULT_ROW_HEIGHT * DEFAULT_NUM_ROWS + HEADER_HEIGHT - 1;
14562
14596
  var CSS_PREFIX = "Layer__UI__VirtualizedTable";
14563
- var EMPTY_ARRAY$4 = [];
14597
+ var EMPTY_ARRAY$5 = [];
14564
14598
  var VirtualizedDataTable = ({ columnConfig, data, isLoading, isError, componentName, ariaLabel, slots, shrinkHeightToFitRows = false, height = DEFAULT_TABLE_HEIGHT, rowHeight = DEFAULT_ROW_HEIGHT, overscan = DEFAULT_OVERSCAN }) => {
14565
14599
  const { EmptyState, ErrorState } = slots;
14566
14600
  const containerRef = useRef(null);
@@ -14576,7 +14610,7 @@ var VirtualizedDataTable = ({ columnConfig, data, isLoading, isError, componentN
14576
14610
  shrinkHeightToFitRows
14577
14611
  ]);
14578
14612
  const table = useReactTable({
14579
- data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$4,
14613
+ data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$5,
14580
14614
  columns: getColumnDefs(columnConfig),
14581
14615
  getCoreRowModel: getCoreRowModel(),
14582
14616
  getSortedRowModel: getSortedRowModel()
@@ -14946,7 +14980,7 @@ var MenuItem$2 = ({ children, onClick, isDisabled }) => {
14946
14980
  };
14947
14981
  var MenuList = ({ children }) => {
14948
14982
  const { variant } = useDropdownMenu();
14949
- return /* @__PURE__ */ jsx(Menu, _objectSpread2(_objectSpread2({ className: "Layer__UI__DropdownMenu__Menu" }, toDataProperties({ variant })), {}, { children }));
14983
+ return /* @__PURE__ */ jsx(Menu$1, _objectSpread2(_objectSpread2({ className: "Layer__UI__DropdownMenu__Menu" }, toDataProperties({ variant })), {}, { children }));
14950
14984
  };
14951
14985
  var DropdownMenu = ({ children, ariaLabel, variant, slots, slotProps }) => {
14952
14986
  var _slotProps$Dialog;
@@ -14954,7 +14988,7 @@ var DropdownMenu = ({ children, ariaLabel, variant, slots, slotProps }) => {
14954
14988
  const { Trigger } = slots;
14955
14989
  const width = slotProps === null || slotProps === void 0 || (_slotProps$Dialog = slotProps.Dialog) === null || _slotProps$Dialog === void 0 ? void 0 : _slotProps$Dialog.width;
14956
14990
  const dataProps = toDataProperties({ variant });
14957
- return /* @__PURE__ */ jsxs(MenuTrigger, { children: [/* @__PURE__ */ jsx(Trigger, { "aria-label": t("ui:label.menu", "Menu") }), /* @__PURE__ */ jsx(Popover, {
14991
+ return /* @__PURE__ */ jsxs(MenuTrigger, { children: [/* @__PURE__ */ jsx(Trigger, { "aria-label": t("ui:label.menu", "Menu") }), /* @__PURE__ */ jsx(Popover$1, {
14958
14992
  placement: "bottom right",
14959
14993
  className: "Layer__UI__DropdownMenu__Popover Layer__variables",
14960
14994
  children: /* @__PURE__ */ jsx(Dialog, _objectSpread2(_objectSpread2({
@@ -20202,13 +20236,13 @@ var Pagination = ({ onPageChange, totalCount, siblingCount = 1, currentPage, pag
20202
20236
  //#endregion
20203
20237
  //#region src/components/ui/MobileList/PaginatedMobileList.tsx
20204
20238
  var _excluded$39 = ["data", "paginationProps"];
20205
- var EMPTY_ARRAY$3 = [];
20239
+ var EMPTY_ARRAY$4 = [];
20206
20240
  var PaginatedMobileList = (props) => {
20207
20241
  var _data$length;
20208
20242
  const { data, paginationProps } = props, listProps = _objectWithoutProperties(props, _excluded$39);
20209
20243
  const { initialPage = 0, onSetPage, pageSize = 20, hasMore, fetchMore, autoResetPageIndexRef } = paginationProps;
20210
20244
  const { pageItems, pageIndex, setPage } = usePaginatedList({
20211
- data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$3,
20245
+ data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$4,
20212
20246
  pageSize,
20213
20247
  initialPage,
20214
20248
  onSetPage
@@ -20434,7 +20468,20 @@ var DataTableSkeleton = ({ numColumns, nonAria }) => {
20434
20468
  }, `loading-${rowIndex}`)) });
20435
20469
  };
20436
20470
  //#endregion
20471
+ //#region src/components/utility/ConditionalList.tsx
20472
+ function ConditionalList({ list, Empty, Container, isLoading, Loading, isError, Error, children }) {
20473
+ if (isError) return Error;
20474
+ if (isLoading) return Loading;
20475
+ if (list.length === 0) return Empty;
20476
+ const listItems = list.map((item, index) => children({
20477
+ item,
20478
+ index
20479
+ }));
20480
+ return Container ? /* @__PURE__ */ jsx(Container, { children: listItems }) : listItems;
20481
+ }
20482
+ //#endregion
20437
20483
  //#region src/components/DataTable/DataTable.tsx
20484
+ var EMPTY_ARRAY$3 = [];
20438
20485
  var DataTable = ({ isLoading, isError, componentName, ariaLabel, slots, dependencies, data, headerGroups, numColumns, withClickableRow }) => {
20439
20486
  const scrollContainerRef = useRef(null);
20440
20487
  const nonAria = headerGroups.length > 1 || numColumns === 0;
@@ -20442,66 +20489,49 @@ var DataTable = ({ isLoading, isError, componentName, ariaLabel, slots, dependen
20442
20489
  const hasHorizontalOverflow = useHorizontalOverflow(scrollContainerRef, { dependencies: [data, numColumns] });
20443
20490
  const showLoadingFallbackHeaders = isLoading && numColumns === 0;
20444
20491
  const { headerRef, pinningStyles } = useColumnPinningStyles(headerGroups);
20445
- const isEmptyTable = (data === null || data === void 0 ? void 0 : data.length) === 0;
20446
- const renderTableBody = useMemo(() => {
20447
- if (isError) return /* @__PURE__ */ jsx(Row$1, {
20448
- className: "Layer__DataTable__EmptyState__Row",
20492
+ const renderHeaderColumn = useCallback((header) => {
20493
+ var _header$column$column, _header$column$column2;
20494
+ return /* @__PURE__ */ jsx(Column$1, {
20495
+ isRowHeader: (_header$column$column = header.column.columnDef.meta) === null || _header$column$column === void 0 ? void 0 : _header$column$column.isRowHeader,
20496
+ className: `Layer__UI__Table-Column__${componentName}--${header.id}`,
20497
+ alignment: (_header$column$column2 = header.column.columnDef.meta) === null || _header$column$column2 === void 0 ? void 0 : _header$column$column2.alignment,
20498
+ pinned: header.column.getIsPinned(),
20499
+ style: pinningStyles.get(header.column.id),
20449
20500
  nonAria,
20450
- children: /* @__PURE__ */ jsx(Cell$2, {
20451
- className: "Layer__DataTable__EmptyState__Cell",
20452
- colSpan: numColumns,
20453
- nonAria,
20454
- children: /* @__PURE__ */ jsx(ErrorState, {})
20455
- })
20456
- });
20457
- if (isLoading) return /* @__PURE__ */ jsx(DataTableSkeleton, {
20458
- numColumns,
20459
- nonAria
20460
- });
20461
- if (isEmptyTable) return /* @__PURE__ */ jsx(Row$1, {
20462
- className: "Layer__DataTable__EmptyState__Row",
20501
+ colSpan: header.colSpan,
20502
+ children: header.isPlaceholder ? null : typeof header.column.columnDef.header === "function" ? header.column.columnDef.header(header.getContext()) : header.column.columnDef.header
20503
+ }, header.id);
20504
+ }, [
20505
+ componentName,
20506
+ nonAria,
20507
+ pinningStyles
20508
+ ]);
20509
+ const renderHeaderContent = useMemo(() => {
20510
+ if (showLoadingFallbackHeaders) return /* @__PURE__ */ jsx(DataTableHeaderSkeleton, {
20463
20511
  nonAria,
20464
- children: /* @__PURE__ */ jsx(Cell$2, {
20465
- className: "Layer__DataTable__EmptyState__Cell",
20466
- colSpan: numColumns,
20467
- nonAria,
20468
- children: /* @__PURE__ */ jsx(EmptyState, {})
20469
- })
20512
+ numColumns: 3
20470
20513
  });
20471
- return /* @__PURE__ */ jsx(Fragment$1, { children: data === null || data === void 0 ? void 0 : data.map((row) => {
20472
- const isClickable = withClickableRow === null || withClickableRow === void 0 ? void 0 : withClickableRow.isRowClickable(row);
20473
- const onAction = isClickable && (withClickableRow === null || withClickableRow === void 0 ? void 0 : withClickableRow.onRowClick) ? () => withClickableRow.onRowClick(row) : void 0;
20474
- return /* @__PURE__ */ jsx(Row$1, {
20475
- depth: row.depth,
20476
- nonAria,
20477
- onAction,
20478
- className: isClickable ? "Layer__DataTable__ClickableRow" : void 0,
20479
- children: row.getVisibleCells().map((cell) => {
20480
- var _cell$column$columnDe;
20481
- return /* @__PURE__ */ jsx(Cell$2, {
20482
- className: `Layer__UI__Table-Cell__${componentName}--${cell.column.id}`,
20483
- alignment: (_cell$column$columnDe = cell.column.columnDef.meta) === null || _cell$column$columnDe === void 0 ? void 0 : _cell$column$columnDe.alignment,
20484
- pinned: cell.column.getIsPinned(),
20485
- style: pinningStyles.get(cell.column.id),
20486
- nonAria,
20487
- children: flexRender(cell.column.columnDef.cell, cell.getContext())
20488
- }, `${row.id}-${cell.id}`);
20489
- })
20490
- }, row.id);
20491
- }) });
20514
+ if (nonAria) return headerGroups.map((headerGroup) => /* @__PURE__ */ jsx(Row$1, {
20515
+ nonAria,
20516
+ children: headerGroup.headers.map((header) => renderHeaderColumn(header))
20517
+ }, headerGroup.id));
20518
+ return headerGroups.flatMap((headerGroup) => headerGroup.headers.map((header) => renderHeaderColumn(header)));
20492
20519
  }, [
20493
- isError,
20494
- isLoading,
20495
- isEmptyTable,
20496
- data,
20520
+ showLoadingFallbackHeaders,
20497
20521
  nonAria,
20498
- numColumns,
20499
- ErrorState,
20500
- EmptyState,
20501
- withClickableRow,
20502
- componentName,
20503
- pinningStyles
20522
+ headerGroups,
20523
+ renderHeaderColumn
20504
20524
  ]);
20525
+ const FullWidthCellRow = useCallback(({ children }) => /* @__PURE__ */ jsx(Row$1, {
20526
+ className: "Layer__DataTable__EmptyState__Row",
20527
+ nonAria,
20528
+ children: /* @__PURE__ */ jsx(Cell$2, {
20529
+ className: "Layer__DataTable__EmptyState__Cell",
20530
+ colSpan: numColumns,
20531
+ nonAria,
20532
+ children
20533
+ })
20534
+ }), [nonAria, numColumns]);
20505
20535
  return /* @__PURE__ */ jsx("div", {
20506
20536
  ref: scrollContainerRef,
20507
20537
  className: classNames("Layer__UI__Table-ScrollContainer", hasHorizontalOverflow && "Layer__UI__Table-ScrollContainer--has-horizontal-overflow"),
@@ -20512,29 +20542,42 @@ var DataTable = ({ isLoading, isError, componentName, ariaLabel, slots, dependen
20512
20542
  children: [/* @__PURE__ */ jsx(TableHeader$1, {
20513
20543
  ref: headerRef,
20514
20544
  nonAria,
20515
- children: showLoadingFallbackHeaders ? /* @__PURE__ */ jsx(DataTableHeaderSkeleton, {
20516
- nonAria,
20517
- numColumns: 3
20518
- }) : headerGroups.map((headerGroup) => /* @__PURE__ */ jsx(Row$1, {
20519
- nonAria,
20520
- children: headerGroup.headers.map((header) => {
20521
- var _header$column$column, _header$column$column2;
20522
- return /* @__PURE__ */ jsx(Column$1, {
20523
- isRowHeader: (_header$column$column = header.column.columnDef.meta) === null || _header$column$column === void 0 ? void 0 : _header$column$column.isRowHeader,
20524
- className: `Layer__UI__Table-Column__${componentName}--${header.id}`,
20525
- alignment: (_header$column$column2 = header.column.columnDef.meta) === null || _header$column$column2 === void 0 ? void 0 : _header$column$column2.alignment,
20526
- pinned: header.column.getIsPinned(),
20527
- style: pinningStyles.get(header.column.id),
20528
- nonAria,
20529
- colSpan: header.colSpan,
20530
- children: header.isPlaceholder ? null : typeof header.column.columnDef.header === "function" ? header.column.columnDef.header(header.getContext()) : header.column.columnDef.header
20531
- }, header.id);
20532
- })
20533
- }, headerGroup.id))
20545
+ children: renderHeaderContent
20534
20546
  }), /* @__PURE__ */ jsx(TableBody$2, {
20535
20547
  dependencies,
20536
20548
  nonAria,
20537
- children: renderTableBody
20549
+ children: /* @__PURE__ */ jsx(ConditionalList, {
20550
+ list: data !== null && data !== void 0 ? data : EMPTY_ARRAY$3,
20551
+ isLoading,
20552
+ isError,
20553
+ Loading: /* @__PURE__ */ jsx(DataTableSkeleton, {
20554
+ numColumns,
20555
+ nonAria
20556
+ }),
20557
+ Error: /* @__PURE__ */ jsx(FullWidthCellRow, { children: /* @__PURE__ */ jsx(ErrorState, {}) }),
20558
+ Empty: /* @__PURE__ */ jsx(FullWidthCellRow, { children: /* @__PURE__ */ jsx(EmptyState, {}) }),
20559
+ children: ({ item: row }) => {
20560
+ const isClickable = withClickableRow === null || withClickableRow === void 0 ? void 0 : withClickableRow.isRowClickable(row);
20561
+ const onAction = isClickable && (withClickableRow === null || withClickableRow === void 0 ? void 0 : withClickableRow.onRowClick) ? () => withClickableRow.onRowClick(row) : void 0;
20562
+ return /* @__PURE__ */ jsx(Row$1, {
20563
+ depth: row.depth,
20564
+ nonAria,
20565
+ onAction,
20566
+ className: isClickable ? "Layer__DataTable__ClickableRow" : void 0,
20567
+ children: row.getVisibleCells().map((cell) => {
20568
+ var _cell$column$columnDe;
20569
+ return /* @__PURE__ */ jsx(Cell$2, {
20570
+ className: `Layer__UI__Table-Cell__${componentName}--${cell.column.id}`,
20571
+ alignment: (_cell$column$columnDe = cell.column.columnDef.meta) === null || _cell$column$columnDe === void 0 ? void 0 : _cell$column$columnDe.alignment,
20572
+ pinned: cell.column.getIsPinned(),
20573
+ style: pinningStyles.get(cell.column.id),
20574
+ nonAria,
20575
+ children: flexRender(cell.column.columnDef.cell, cell.getContext())
20576
+ }, `${row.id}-${cell.id}`);
20577
+ })
20578
+ }, row.id);
20579
+ }
20580
+ })
20538
20581
  })]
20539
20582
  }, `${componentName}-cols-${numColumns}`)
20540
20583
  });
@@ -22466,18 +22509,6 @@ function LinkedAccountToConfirm({ account, isConfirmed, onChangeConfirmed }) {
22466
22509
  });
22467
22510
  }
22468
22511
  //#endregion
22469
- //#region src/components/utility/ConditionalList.tsx
22470
- function ConditionalList({ list, Empty, Container, isLoading, Loading, isError, Error, children }) {
22471
- if (isError) return Error;
22472
- if (isLoading) return Loading;
22473
- if (list.length === 0) return Empty;
22474
- const listItems = list.map((item, index) => children({
22475
- item,
22476
- index
22477
- }));
22478
- return Container ? /* @__PURE__ */ jsx(Container, { children: listItems }) : listItems;
22479
- }
22480
- //#endregion
22481
22512
  //#region src/components/LinkedAccounts/ConfirmationModal/LinkedAccountsConfirmationModal.tsx
22482
22513
  function useLinkedAccountsConfirmationModal() {
22483
22514
  const { data, refetchAccounts } = useLinkedAccounts();
@@ -22653,8 +22684,8 @@ function LinkedAccountsConfirmationModal() {
22653
22684
  //#endregion
22654
22685
  //#region src/components/ui/Menu/Menu.tsx
22655
22686
  var MENU_CLASS_NAME = "Layer__Menu";
22656
- var Menu$2 = forwardRef(function Menu$3({ children }, ref) {
22657
- return /* @__PURE__ */ jsx(Menu, {
22687
+ var Menu$2 = forwardRef(function Menu({ children }, ref) {
22688
+ return /* @__PURE__ */ jsx(Menu$1, {
22658
22689
  className: MENU_CLASS_NAME,
22659
22690
  ref,
22660
22691
  children
@@ -22694,7 +22725,7 @@ function LinkedAccountPill({ label, items }) {
22694
22725
  status: "error",
22695
22726
  onPress: () => setIsOpen(true),
22696
22727
  children: [/* @__PURE__ */ jsx(AlertCircle$1, { size: 14 }), label]
22697
- }), /* @__PURE__ */ jsx(Popover, {
22728
+ }), /* @__PURE__ */ jsx(Popover$1, {
22698
22729
  className: "Layer__Portal",
22699
22730
  placement: "bottom end",
22700
22731
  children: /* @__PURE__ */ jsx(Menu$2, { children: items.map(({ action, name }, index) => /* @__PURE__ */ jsx(MenuItem$1, {
@@ -36916,7 +36947,7 @@ var InvoiceDetailHeaderMenu = ({ onEditInvoice }) => {
36916
36947
  return /* @__PURE__ */ jsx(Button$1, {
36917
36948
  icon: true,
36918
36949
  variant: "outlined",
36919
- children: /* @__PURE__ */ jsx(Menu$1, { size: 14 })
36950
+ children: /* @__PURE__ */ jsx(Menu, { size: 14 })
36920
36951
  });
36921
36952
  }, []);
36922
36953
  if (viewState.mode === UpsertInvoiceMode.Create) return null;
@@ -46264,7 +46295,7 @@ var TaxEstimatesViewHeader = () => {
46264
46295
  return /* @__PURE__ */ jsx(Button$1, {
46265
46296
  icon: true,
46266
46297
  variant: "outlined",
46267
- children: /* @__PURE__ */ jsx(Menu$1, { size: 14 })
46298
+ children: /* @__PURE__ */ jsx(Menu, { size: 14 })
46268
46299
  });
46269
46300
  }, []);
46270
46301
  return /* @__PURE__ */ jsxs(HStack, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layerfi/components",
3
- "version": "0.1.132-alpha",
3
+ "version": "0.1.132-alpha.1",
4
4
  "description": "Layer React Components",
5
5
  "main": "dist/cjs/index.cjs",
6
6
  "module": "dist/esm/index.mjs",
@@ -108,7 +108,7 @@
108
108
  "lodash-es": "^4.17.21",
109
109
  "lucide-react": "^0.507.0",
110
110
  "motion": "^12.23.11",
111
- "react-aria-components": "^1.13.0",
111
+ "react-aria-components": "^1.17.0",
112
112
  "react-calendly": "^4.4.0",
113
113
  "react-currency-input-field": "^3.10.0",
114
114
  "react-dropzone": "^14.3.8",