@rebasepro/ui 0.2.3 → 0.2.4

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.
Files changed (36) hide show
  1. package/dist/components/Button.d.ts +2 -2
  2. package/dist/components/ErrorBoundary.d.ts +25 -3
  3. package/dist/components/VirtualTable/VirtualTable.d.ts +1 -1
  4. package/dist/components/VirtualTable/VirtualTableCell.d.ts +6 -6
  5. package/dist/components/VirtualTable/VirtualTableHeader.d.ts +8 -8
  6. package/dist/components/VirtualTable/VirtualTableHeaderRow.d.ts +1 -1
  7. package/dist/components/VirtualTable/VirtualTableProps.d.ts +11 -11
  8. package/dist/components/VirtualTable/VirtualTableRow.d.ts +1 -1
  9. package/dist/components/VirtualTable/types.d.ts +9 -9
  10. package/dist/hooks/useDebounceCallback.d.ts +1 -1
  11. package/dist/index.css +1 -1
  12. package/dist/index.es.js +135 -76
  13. package/dist/index.es.js.map +1 -1
  14. package/dist/index.umd.js +130 -71
  15. package/dist/index.umd.js.map +1 -1
  16. package/dist/util/debounce.d.ts +1 -1
  17. package/package.json +2 -2
  18. package/src/components/BooleanSwitch.tsx +1 -1
  19. package/src/components/Button.tsx +11 -11
  20. package/src/components/ErrorBoundary.tsx +171 -18
  21. package/src/components/IconButton.tsx +4 -4
  22. package/src/components/MultiSelect.tsx +6 -6
  23. package/src/components/SearchBar.tsx +1 -1
  24. package/src/components/TextareaAutosize.tsx +2 -2
  25. package/src/components/VirtualTable/VirtualTable.tsx +8 -8
  26. package/src/components/VirtualTable/VirtualTableCell.tsx +6 -6
  27. package/src/components/VirtualTable/VirtualTableHeader.tsx +15 -15
  28. package/src/components/VirtualTable/VirtualTableHeaderRow.tsx +6 -6
  29. package/src/components/VirtualTable/VirtualTableProps.tsx +11 -11
  30. package/src/components/VirtualTable/VirtualTableRow.tsx +2 -2
  31. package/src/components/VirtualTable/types.tsx +9 -9
  32. package/src/hooks/useDebounceCallback.tsx +2 -1
  33. package/src/index.css +1 -1
  34. package/src/util/debounce.ts +2 -1
  35. package/src/scripts/migrateIconImports.ts +0 -108
  36. package/src/scripts/test.ts +0 -6
@@ -9,6 +9,6 @@ export type ButtonProps<C extends React.ElementType = "button"> = {
9
9
  fullWidth?: boolean;
10
10
  className?: string;
11
11
  component?: C;
12
- onClick?: React.MouseEventHandler<any>;
12
+ onClick?: React.MouseEventHandler<HTMLElement>;
13
13
  } & React.ComponentPropsWithoutRef<C>;
14
- export declare const Button: React.FC<ButtonProps<any>>;
14
+ export declare const Button: React.FC<ButtonProps<React.ElementType>>;
@@ -1,11 +1,33 @@
1
1
  import React, { ErrorInfo, PropsWithChildren } from "react";
2
- export declare class ErrorBoundary extends React.Component<PropsWithChildren<Record<string, unknown>>, {
2
+ export interface ErrorBoundaryProps {
3
+ /**
4
+ * When true, renders a full-page centered error screen instead of the
5
+ * compact inline error. Intended for wrapping top-level app roots or
6
+ * major route sections.
7
+ */
8
+ fullPage?: boolean;
9
+ /**
10
+ * Optional callback invoked when the user clicks "Try again". If provided,
11
+ * the boundary resets its error state and calls this handler. If omitted,
12
+ * the "Try again" button resets the boundary state, re-mounting children.
13
+ */
14
+ onReset?: () => void;
15
+ }
16
+ interface ErrorBoundaryState {
3
17
  error: Error | null;
4
- }> {
5
- constructor(props: any);
18
+ showDetails: boolean;
19
+ }
20
+ export declare class ErrorBoundary extends React.Component<PropsWithChildren<ErrorBoundaryProps>, ErrorBoundaryState> {
21
+ constructor(props: PropsWithChildren<ErrorBoundaryProps>);
6
22
  static getDerivedStateFromError(error: Error): {
7
23
  error: Error;
8
24
  };
9
25
  componentDidCatch(error: Error, _errorInfo: ErrorInfo): void;
26
+ private handleReset;
27
+ private handleReload;
28
+ private toggleDetails;
10
29
  render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
30
+ private renderInline;
31
+ private renderFullPage;
11
32
  }
33
+ export {};
@@ -8,4 +8,4 @@ import { VirtualTableProps } from "./VirtualTableProps";
8
8
  *
9
9
  * @group Components
10
10
  */
11
- export declare const VirtualTable: React.NamedExoticComponent<VirtualTableProps<any>>;
11
+ export declare const VirtualTable: React.NamedExoticComponent<VirtualTableProps<Record<string, unknown>>>;
@@ -4,18 +4,18 @@ type VirtualTableCellProps<T> = {
4
4
  dataKey: string;
5
5
  column: VirtualTableColumn;
6
6
  columns: VirtualTableColumn[];
7
- rowData: any;
8
- cellData: any;
9
- rowIndex: any;
7
+ rowData: T;
8
+ cellData: unknown;
9
+ rowIndex: number;
10
10
  columnIndex: number;
11
11
  cellRenderer: (props: CellRendererParams<T>) => React.ReactNode;
12
12
  sortableNodeRef?: (node: HTMLElement | null) => void;
13
13
  sortableStyle?: React.CSSProperties;
14
- sortableAttributes?: Record<string, any>;
14
+ sortableAttributes?: Record<string, unknown>;
15
15
  isDragging?: boolean;
16
16
  isDraggable?: boolean;
17
17
  frozen?: boolean;
18
- extraData?: any;
18
+ extraData?: unknown;
19
19
  };
20
- export declare const VirtualTableCell: React.NamedExoticComponent<VirtualTableCellProps<any>>;
20
+ export declare const VirtualTableCell: React.NamedExoticComponent<VirtualTableCellProps<unknown>>;
21
21
  export {};
@@ -2,28 +2,28 @@ import React from "react";
2
2
  import { VirtualTableColumn, VirtualTableSort, VirtualTableWhereFilterOp } from "./VirtualTableProps";
3
3
  export type FilterFormFieldProps<CustomProps> = {
4
4
  id: React.Key;
5
- filterValue: [VirtualTableWhereFilterOp, any] | undefined;
6
- setFilterValue: (filterValue?: [VirtualTableWhereFilterOp, any]) => void;
5
+ filterValue: [VirtualTableWhereFilterOp, unknown] | undefined;
6
+ setFilterValue: (filterValue?: [VirtualTableWhereFilterOp, unknown]) => void;
7
7
  column: VirtualTableColumn<CustomProps>;
8
8
  hidden: boolean;
9
9
  setHidden: (hidden: boolean) => void;
10
10
  };
11
- type VirtualTableHeaderProps<M extends Record<string, any>> = {
11
+ type VirtualTableHeaderProps<M extends Record<string, unknown>> = {
12
12
  resizeHandleRef: React.Ref<HTMLDivElement>;
13
13
  columnIndex: number;
14
14
  isResizingIndex: number;
15
- column: VirtualTableColumn<any>;
15
+ column: VirtualTableColumn<unknown>;
16
16
  onColumnSort: (key: Extract<keyof M, string>) => void;
17
- filter?: [VirtualTableWhereFilterOp, any];
17
+ filter?: [VirtualTableWhereFilterOp, unknown];
18
18
  sort: VirtualTableSort;
19
- onFilterUpdate: (column: VirtualTableColumn, filterForProperty?: [VirtualTableWhereFilterOp, any]) => void;
19
+ onFilterUpdate: (column: VirtualTableColumn, filterForProperty?: [VirtualTableWhereFilterOp, unknown]) => void;
20
20
  onClickResizeColumn?: (columnIndex: number, column: VirtualTableColumn) => void;
21
- createFilterField?: (props: FilterFormFieldProps<any>) => React.ReactNode;
21
+ createFilterField?: (props: FilterFormFieldProps<unknown>) => React.ReactNode;
22
22
  AdditionalHeaderWidget?: (props: {
23
23
  onHover: boolean;
24
24
  }) => React.ReactNode;
25
25
  isDragging?: boolean;
26
26
  isDraggable?: boolean;
27
27
  };
28
- export declare const VirtualTableHeader: React.FunctionComponent<VirtualTableHeaderProps<any>>;
28
+ export declare const VirtualTableHeader: React.FunctionComponent<VirtualTableHeaderProps<Record<string, unknown>>>;
29
29
  export {};
@@ -1,2 +1,2 @@
1
1
  import { VirtualTableContextProps } from "./types";
2
- export declare const VirtualTableHeaderRow: ({ columns, currentSort, onColumnSort, onFilterUpdate, sortByProperty, filter, onColumnResize, onColumnResizeEnd, createFilterField, AddColumnComponent, onColumnsOrderChange, data, cellRenderer: CellRenderer, rowHeight, draggingColumnId, headerHeight }: VirtualTableContextProps<any>) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const VirtualTableHeaderRow: ({ columns, currentSort, onColumnSort, onFilterUpdate, sortByProperty, filter, onColumnResize, onColumnResizeEnd, createFilterField, AddColumnComponent, onColumnsOrderChange, data, cellRenderer: CellRenderer, rowHeight, draggingColumnId, headerHeight }: VirtualTableContextProps<Record<string, unknown>>) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { FilterFormFieldProps } from "./VirtualTableHeader";
3
- export type OnRowClickParams<T extends Record<string, any>> = {
3
+ export type OnRowClickParams<T extends Record<string, unknown>> = {
4
4
  rowData: T;
5
5
  rowIndex: number;
6
6
  event: React.SyntheticEvent;
@@ -9,7 +9,7 @@ export type OnRowClickParams<T extends Record<string, any>> = {
9
9
  * @see Table
10
10
  * @group Components
11
11
  */
12
- export interface VirtualTableProps<T extends Record<string, any>> {
12
+ export interface VirtualTableProps<T extends Record<string, unknown>> {
13
13
  /**
14
14
  * Array of arbitrary data
15
15
  */
@@ -61,12 +61,12 @@ export interface VirtualTableProps<T extends Record<string, any>> {
61
61
  /**
62
62
  * In case this table should have some filters set by default
63
63
  */
64
- filter?: VirtualTableFilterValues<any>;
64
+ filter?: VirtualTableFilterValues<string>;
65
65
  /**
66
66
  * Callback used when filters are updated
67
67
  * @param filter
68
68
  */
69
- onFilterUpdate?: (filter?: VirtualTableFilterValues<any> | undefined) => void;
69
+ onFilterUpdate?: (filter?: VirtualTableFilterValues<string> | undefined) => void;
70
70
  /**
71
71
  * Callback when the table is scrolled
72
72
  * @param props
@@ -111,7 +111,7 @@ export interface VirtualTableProps<T extends Record<string, any>> {
111
111
  * Callback to create a filter field, displayed in the header as a dropdown
112
112
  * @param props
113
113
  */
114
- createFilterField?: (props: FilterFormFieldProps<any>) => React.ReactNode;
114
+ createFilterField?: (props: FilterFormFieldProps<unknown>) => React.ReactNode;
115
115
  /**
116
116
  * Class name applied to the table
117
117
  */
@@ -141,9 +141,9 @@ export interface VirtualTableProps<T extends Record<string, any>> {
141
141
  /**
142
142
  * Extra data passed to the cell renderer
143
143
  */
144
- extraData?: any;
144
+ extraData?: unknown;
145
145
  }
146
- export type CellRendererParams<T = any> = {
146
+ export type CellRendererParams<T = unknown> = {
147
147
  column: VirtualTableColumn;
148
148
  columns: VirtualTableColumn[];
149
149
  columnIndex: number;
@@ -153,17 +153,17 @@ export type CellRendererParams<T = any> = {
153
153
  isScrolling?: boolean;
154
154
  sortableNodeRef?: (node: HTMLElement | null) => void;
155
155
  sortableStyle?: React.CSSProperties;
156
- sortableAttributes?: Record<string, any>;
156
+ sortableAttributes?: Record<string, unknown>;
157
157
  isDragging?: boolean;
158
158
  isDraggable?: boolean;
159
159
  frozen?: boolean;
160
- extraData?: any;
160
+ extraData?: unknown;
161
161
  };
162
162
  /**
163
163
  * @see Table
164
164
  * @group Components
165
165
  */
166
- export interface VirtualTableColumn<CustomProps = any> {
166
+ export interface VirtualTableColumn<CustomProps = unknown> {
167
167
  /**
168
168
  * Data key for the cell value, could be "a.b.c"
169
169
  */
@@ -233,7 +233,7 @@ export type VirtualTableSort = "asc" | "desc" | undefined;
233
233
  * @see Table
234
234
  * @group Components
235
235
  */
236
- export type VirtualTableFilterValues<Key extends string> = Partial<Record<Key, [VirtualTableWhereFilterOp, any]>>;
236
+ export type VirtualTableFilterValues<Key extends string> = Partial<Record<Key, [VirtualTableWhereFilterOp, unknown]>>;
237
237
  /**
238
238
  * Filter conditions in a `Query.where()` clause are specified using the
239
239
  * strings `<`, `<=`, `==`, `>=`, `>`, `array-contains`, `in`, and `array-contains-any`.
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
2
  import { VirtualTableRowProps } from "./types";
3
- export declare const VirtualTableRow: React.NamedExoticComponent<VirtualTableRowProps<any>>;
3
+ export declare const VirtualTableRow: React.NamedExoticComponent<VirtualTableRowProps<Record<string, unknown>>>;
@@ -1,12 +1,12 @@
1
1
  import React from "react";
2
2
  import { CellRendererParams, OnRowClickParams, OnVirtualTableColumnResizeParams, VirtualTableColumn, VirtualTableFilterValues, VirtualTableWhereFilterOp } from "./VirtualTableProps";
3
3
  import { FilterFormFieldProps } from "./VirtualTableHeader";
4
- export type VirtualTableRowProps<T> = {
5
- style: any;
4
+ export type VirtualTableRowProps<T extends Record<string, unknown>> = {
5
+ style: React.CSSProperties;
6
6
  rowHeight: number;
7
7
  rowData: T;
8
8
  rowIndex: number;
9
- onRowClick?: (props: OnRowClickParams<any>) => void;
9
+ onRowClick?: (props: OnRowClickParams<Record<string, unknown>>) => void;
10
10
  children: React.ReactNode[];
11
11
  columns: VirtualTableColumn[];
12
12
  hoverRow?: boolean;
@@ -19,20 +19,20 @@ export type VirtualTableContextProps<T> = {
19
19
  columns: VirtualTableColumn[];
20
20
  cellRenderer: React.ComponentType<CellRendererParams<T>>;
21
21
  currentSort: "asc" | "desc" | undefined;
22
- filter?: VirtualTableFilterValues<any>;
23
- onRowClick?: (props: OnRowClickParams<any>) => void;
24
- onColumnSort: (key: string) => any;
22
+ filter?: VirtualTableFilterValues<string>;
23
+ onRowClick?: (props: OnRowClickParams<Record<string, unknown>>) => void;
24
+ onColumnSort: (key: string) => void;
25
25
  onColumnResize: (params: OnVirtualTableColumnResizeParams) => void;
26
26
  onColumnResizeEnd: (params: OnVirtualTableColumnResizeParams) => void;
27
- onFilterUpdate: (column: VirtualTableColumn, filterForProperty?: [VirtualTableWhereFilterOp, any]) => void;
27
+ onFilterUpdate: (column: VirtualTableColumn, filterForProperty?: [VirtualTableWhereFilterOp, unknown]) => void;
28
28
  sortByProperty?: string;
29
29
  customView?: React.ReactNode;
30
30
  hoverRow: boolean;
31
- createFilterField?: (props: FilterFormFieldProps<any>) => React.ReactNode;
31
+ createFilterField?: (props: FilterFormFieldProps<unknown>) => React.ReactNode;
32
32
  rowClassName?: (rowData: T) => string | undefined;
33
33
  endAdornment?: React.ReactNode;
34
34
  AddColumnComponent?: React.ComponentType;
35
35
  onColumnsOrderChange?: (columns: VirtualTableColumn[]) => void;
36
36
  draggingColumnId?: string | null;
37
- extraData?: Record<string, any>;
37
+ extraData?: unknown;
38
38
  };
@@ -1 +1 @@
1
- export declare function useDebounceCallback<T extends (...args: any[]) => any>(callback?: T, delay?: number): T;
1
+ export declare function useDebounceCallback<T extends (...args: any[]) => unknown>(callback?: T, delay?: number): T;
package/dist/index.css CHANGED
@@ -117,7 +117,7 @@
117
117
  }
118
118
 
119
119
  .typography-button {
120
- @apply text-sm font-semibold;
120
+ @apply text-[13px] font-semibold;
121
121
  }
122
122
 
123
123
  :focus-visible {
package/dist/index.es.js CHANGED
@@ -6,8 +6,8 @@ import { twMerge } from "tailwind-merge";
6
6
  import * as React from "react";
7
7
  import React__default, { createContext, useContext, useEffect, useRef, useState, Children, forwardRef, useLayoutEffect, useId, useDeferredValue, useMemo, createRef, useCallback } from "react";
8
8
  import * as Collapsible from "@radix-ui/react-collapsible";
9
- import { AlertCircleIcon, MinusIcon, CheckIcon, CalendarIcon, XIcon, ChevronDownIcon, ChevronRightIcon, SearchIcon, ChevronLeftIcon, ArrowUpIcon, FilterIcon } from "lucide-react";
10
- import { AlertCircleIcon as AlertCircleIcon2, AlertTriangleIcon, AlignLeftIcon, AppWindow, ArrowDownToLineIcon, ArrowLeftIcon, ArrowRightFromLineIcon, ArrowRightIcon, ArrowRightToLineIcon, ArrowUpToLineIcon, BoldIcon, BookOpenIcon, CalendarIcon as CalendarIcon2, CheckCircleIcon, CheckIcon as CheckIcon2, CheckSquareIcon, ChevronDownIcon as ChevronDownIcon2, ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon as ChevronRightIcon2, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpDownIcon, CircleIcon, CircleUserIcon, CodeIcon, ColumnsIcon, CopyIcon, DatabaseIcon, DownloadIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileIcon, FileSearchIcon, FileTextIcon, FilterIcon as FilterIcon2, FilterXIcon, FlagIcon, FolderIcon, FolderPlusIcon, FolderUpIcon, FunctionSquareIcon, GitBranchIcon, GlobeIcon, HashIcon, Heading1Icon, Heading2Icon, Heading3Icon, HelpCircleIcon, HistoryIcon, HomeIcon, ImageIcon, ImageOffIcon, InfoIcon, ItalicIcon, KanbanIcon, KeyIcon, KeyRoundIcon, LanguagesIcon, LayoutGridIcon, LinkIcon, ListIcon, ListOrderedIcon, LoaderIcon, LogOutIcon, MailIcon, Maximize2Icon, MenuIcon, MinusCircleIcon, MinusIcon as MinusIcon2, MoonIcon, MoreVerticalIcon, Music2Icon, PanelLeftIcon, PauseIcon, PencilIcon, PhoneIcon, PlayIcon, PlusIcon, QuoteIcon, RefreshCcwIcon, RefreshCwIcon, RepeatIcon, Rows3Icon, SaveIcon, SearchIcon as SearchIcon2, SendIcon, SettingsIcon, ShieldIcon, ShoppingCartIcon, SlidersHorizontalIcon, SquareIcon, StarIcon, StrikethroughIcon, SunIcon, SunMoonIcon, TableIcon, TagIcon, TerminalIcon, TextIcon, Trash2Icon, TypeIcon, UnderlineIcon, UndoIcon, UploadCloudIcon, UploadIcon, UserCheckIcon, UserIcon, VideoIcon, VoteIcon, Wand2Icon, XCircleIcon, XIcon as XIcon2, icons } from "lucide-react";
9
+ import { AlertCircleIcon, ShieldAlertIcon, ArrowLeftIcon, RefreshCwIcon, ChevronUpIcon, ChevronDownIcon, MinusIcon, CheckIcon, CalendarIcon, XIcon, ChevronRightIcon, SearchIcon, ChevronLeftIcon, ArrowUpIcon, FilterIcon } from "lucide-react";
10
+ import { AlertCircleIcon as AlertCircleIcon2, AlertTriangleIcon, AlignLeftIcon, AppWindow, ArrowDownToLineIcon, ArrowLeftIcon as ArrowLeftIcon2, ArrowRightFromLineIcon, ArrowRightIcon, ArrowRightToLineIcon, ArrowUpToLineIcon, BoldIcon, BookOpenIcon, CalendarIcon as CalendarIcon2, CheckCircleIcon, CheckIcon as CheckIcon2, CheckSquareIcon, ChevronDownIcon as ChevronDownIcon2, ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon as ChevronRightIcon2, ChevronUpIcon as ChevronUpIcon2, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpDownIcon, CircleIcon, CircleUserIcon, CodeIcon, ColumnsIcon, CopyIcon, DatabaseIcon, DownloadIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileIcon, FileSearchIcon, FileTextIcon, FilterIcon as FilterIcon2, FilterXIcon, FlagIcon, FolderIcon, FolderPlusIcon, FolderUpIcon, FunctionSquareIcon, GitBranchIcon, GlobeIcon, HashIcon, Heading1Icon, Heading2Icon, Heading3Icon, HelpCircleIcon, HistoryIcon, HomeIcon, ImageIcon, ImageOffIcon, InfoIcon, ItalicIcon, KanbanIcon, KeyIcon, KeyRoundIcon, LanguagesIcon, LayoutGridIcon, LinkIcon, ListIcon, ListOrderedIcon, LoaderIcon, LogOutIcon, MailIcon, Maximize2Icon, MenuIcon, MinusCircleIcon, MinusIcon as MinusIcon2, MoonIcon, MoreVerticalIcon, Music2Icon, PanelLeftIcon, PauseIcon, PencilIcon, PhoneIcon, PlayIcon, PlusIcon, QuoteIcon, RefreshCcwIcon, RefreshCwIcon as RefreshCwIcon2, RepeatIcon, Rows3Icon, SaveIcon, SearchIcon as SearchIcon2, SendIcon, SettingsIcon, ShieldIcon, ShoppingCartIcon, SlidersHorizontalIcon, SquareIcon, StarIcon, StrikethroughIcon, SunIcon, SunMoonIcon, TableIcon, TagIcon, TerminalIcon, TextIcon, Trash2Icon, TypeIcon, UnderlineIcon, UndoIcon, UploadCloudIcon, UploadIcon, UserCheckIcon, UserIcon, VideoIcon, VoteIcon, Wand2Icon, XCircleIcon, XIcon as XIcon2, icons } from "lucide-react";
11
11
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
12
12
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
13
13
  import * as DialogPrimitive from "@radix-ui/react-dialog";
@@ -985,15 +985,15 @@ const ButtonInner = React__default.memo(React__default.forwardRef((t0, ref) => {
985
985
  "border border-transparent bg-surface-300 dark:bg-surface-500 opacity-40 bg-surface-300/40 dark:bg-surface-500/40": t25
986
986
  });
987
987
  const sizeClasses2 = cls({
988
- "py-1 px-2": size === "small",
989
- "py-2 px-4": size === "medium",
990
- "py-2.5 px-5": size === "large",
991
- "py-3 px-6": size === "xl",
992
- "py-4 px-10": size === "2xl"
988
+ "py-0.5 px-1.5": size === "small",
989
+ "py-1.5 px-3": size === "medium",
990
+ "py-2 px-4": size === "large",
991
+ "py-2.5 px-5": size === "xl",
992
+ "py-3 px-6": size === "2xl"
993
993
  });
994
994
  const iconColorClass = (color === "neutral" || color === "text") && !disabled ? "[&>svg]:text-surface-accent-500 dark:[&>svg]:text-surface-accent-300" : "";
995
995
  if (Component) {
996
- t30 = /* @__PURE__ */ jsxs(Component, { ref, onClick: props.onClick, className: cls(startIcon ? "pl-3" : "", "typography-button h-fit rounded-md whitespace-nowrap inline-flex items-center justify-center p-2 px-4 focus:outline-none transition-all ease-in-out duration-150 gap-2 active:scale-[0.98]", buttonClasses2, sizeClasses2, iconColorClass, className), ...props, children: [
996
+ t30 = /* @__PURE__ */ jsxs(Component, { ref, onClick: props.onClick, className: cls(startIcon ? "pl-3" : "", "typography-button h-fit rounded-md whitespace-nowrap inline-flex items-center justify-center p-1.5 px-3 focus:outline-none transition-all ease-in-out duration-150 gap-1.5 active:scale-[0.98]", buttonClasses2, sizeClasses2, iconColorClass, className), ...props, children: [
997
997
  startIcon,
998
998
  children
999
999
  ] });
@@ -1002,7 +1002,7 @@ const ButtonInner = React__default.memo(React__default.forwardRef((t0, ref) => {
1002
1002
  t26 = ref;
1003
1003
  t27 = props.type ?? "button";
1004
1004
  t28 = props.onClick;
1005
- t29 = cls(startIcon ? "pl-3" : "", "typography-button h-fit rounded-md whitespace-nowrap inline-flex items-center justify-center p-2 px-4 focus:outline-none transition-all ease-in-out duration-150 gap-2 active:scale-[0.98]", buttonClasses2, sizeClasses2, iconColorClass, className);
1005
+ t29 = cls(startIcon ? "pl-3" : "", "typography-button h-fit rounded-md whitespace-nowrap inline-flex items-center justify-center p-1.5 px-3 focus:outline-none transition-all ease-in-out duration-150 gap-1.5 active:scale-[0.98]", buttonClasses2, sizeClasses2, iconColorClass, className);
1006
1006
  }
1007
1007
  $[11] = Component;
1008
1008
  $[12] = children;
@@ -1548,11 +1548,18 @@ const colorClassesMapping = {
1548
1548
  disabled: "text-text-disabled dark:text-text-disabled-dark",
1549
1549
  error: "text-red-500"
1550
1550
  };
1551
+ function isPermissionError(error) {
1552
+ if (!error) return false;
1553
+ const msg = error.message?.toLowerCase() ?? "";
1554
+ const code = error.code?.toLowerCase() ?? "";
1555
+ return msg.includes("permission") || msg.includes("insufficient") || msg.includes("unauthorized") || msg.includes("forbidden") || msg.includes("access denied") || code === "permission_denied" || code === "insufficient_permissions" || error.status === 403;
1556
+ }
1551
1557
  class ErrorBoundary extends React__default.Component {
1552
1558
  constructor(props) {
1553
1559
  super(props);
1554
1560
  this.state = {
1555
- error: null
1561
+ error: null,
1562
+ showDetails: false
1556
1563
  };
1557
1564
  }
1558
1565
  static getDerivedStateFromError(error) {
@@ -1563,18 +1570,71 @@ class ErrorBoundary extends React__default.Component {
1563
1570
  componentDidCatch(error, _errorInfo) {
1564
1571
  console.error(error);
1565
1572
  }
1573
+ handleReset = () => {
1574
+ this.setState({
1575
+ error: null,
1576
+ showDetails: false
1577
+ });
1578
+ this.props.onReset?.();
1579
+ };
1580
+ handleReload = () => {
1581
+ window.location.reload();
1582
+ };
1583
+ toggleDetails = () => {
1584
+ this.setState((prev) => ({
1585
+ showDetails: !prev.showDetails
1586
+ }));
1587
+ };
1566
1588
  render() {
1567
1589
  if (this.state.error) {
1568
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col m-2", children: [
1569
- /* @__PURE__ */ jsxs("div", { className: "flex items-center m-2", children: [
1570
- /* @__PURE__ */ jsx(AlertCircleIcon, { className: "text-red-500", size: iconSize.small }),
1571
- /* @__PURE__ */ jsx("div", { className: "ml-4", children: "Error" })
1572
- ] }),
1573
- /* @__PURE__ */ jsx(Typography, { variant: "caption", children: this.state.error?.message ?? "See the error in the console" })
1574
- ] });
1590
+ if (this.props.fullPage) {
1591
+ return this.renderFullPage();
1592
+ }
1593
+ return this.renderInline();
1575
1594
  }
1576
1595
  return this.props.children;
1577
1596
  }
1597
+ renderInline() {
1598
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col m-2", children: [
1599
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center m-2", children: [
1600
+ /* @__PURE__ */ jsx(AlertCircleIcon, { className: "text-red-500", size: iconSize.small }),
1601
+ /* @__PURE__ */ jsx("div", { className: "ml-4", children: "Error" })
1602
+ ] }),
1603
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", children: this.state.error?.message ?? "See the error in the console" })
1604
+ ] });
1605
+ }
1606
+ renderFullPage() {
1607
+ const {
1608
+ error,
1609
+ showDetails
1610
+ } = this.state;
1611
+ const isPermission = isPermissionError(error);
1612
+ const Icon = isPermission ? ShieldAlertIcon : AlertCircleIcon;
1613
+ const title = isPermission ? "Access denied" : "Something went wrong";
1614
+ const description = isPermission ? "You don't have permission to access this resource. Please check your account permissions or contact your administrator." : "An unexpected error occurred. You can try reloading the page or going back.";
1615
+ return /* @__PURE__ */ jsx("div", { className: cls("flex items-center justify-center min-h-[400px] h-full w-full", "bg-surface-50 dark:bg-surface-950"), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center max-w-md px-6 py-10 text-center", children: [
1616
+ /* @__PURE__ */ jsx("div", { className: cls("flex items-center justify-center w-14 h-14 rounded-2xl mb-6", isPermission ? "bg-amber-100 dark:bg-amber-900/30" : "bg-red-100 dark:bg-red-900/30"), children: /* @__PURE__ */ jsx(Icon, { size: 28, className: isPermission ? "text-amber-600 dark:text-amber-400" : "text-red-500 dark:text-red-400" }) }),
1617
+ /* @__PURE__ */ jsx(Typography, { variant: "h6", className: "text-text-primary dark:text-text-primary-dark mb-2", children: title }),
1618
+ /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-text-secondary dark:text-text-secondary-dark mb-8", children: description }),
1619
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
1620
+ /* @__PURE__ */ jsxs(Button, { variant: "outlined", color: "neutral", size: "medium", onClick: this.handleReset, children: [
1621
+ /* @__PURE__ */ jsx(ArrowLeftIcon, { size: 16 }),
1622
+ "Try again"
1623
+ ] }),
1624
+ /* @__PURE__ */ jsxs(Button, { variant: "filled", color: "primary", size: "medium", onClick: this.handleReload, children: [
1625
+ /* @__PURE__ */ jsx(RefreshCwIcon, { size: 16 }),
1626
+ "Reload page"
1627
+ ] })
1628
+ ] }),
1629
+ error?.message && /* @__PURE__ */ jsxs("div", { className: "mt-8 w-full", children: [
1630
+ /* @__PURE__ */ jsxs("button", { onClick: this.toggleDetails, className: cls("flex items-center gap-1 mx-auto text-xs", "text-text-disabled dark:text-text-disabled-dark", "hover:text-text-secondary dark:hover:text-text-secondary-dark", "transition-colors cursor-pointer bg-transparent border-none p-0"), children: [
1631
+ "Technical details",
1632
+ showDetails ? /* @__PURE__ */ jsx(ChevronUpIcon, { size: 14 }) : /* @__PURE__ */ jsx(ChevronDownIcon, { size: 14 })
1633
+ ] }),
1634
+ showDetails && /* @__PURE__ */ jsx("div", { className: cls("mt-3 p-3 rounded-lg text-left text-xs", "bg-surface-100 dark:bg-surface-800", "text-text-secondary dark:text-text-secondary-dark", "font-mono break-all"), children: error.message })
1635
+ ] })
1636
+ ] }) });
1637
+ }
1578
1638
  }
1579
1639
  const sizeClasses$2 = {
1580
1640
  large: "w-6 h-6 rounded flex items-center justify-center",
@@ -2087,10 +2147,10 @@ const buttonClasses = "hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-
2087
2147
  const baseClasses = "inline-flex items-center justify-center p-2 text-sm font-medium focus:outline-none transition-colors ease-in-out duration-150";
2088
2148
  const colorClasses$1 = "text-surface-accent-500 visited:text-surface-accent-500 dark:text-surface-accent-300 dark:visited:text-surface-300";
2089
2149
  const sizeClasses$1 = {
2090
- medium: "w-10 !h-10 min-w-10 min-h-10",
2091
- small: "w-8 !h-8 min-w-8 min-h-8",
2092
- smallest: "w-6 !h-6 min-w-6 min-h-6",
2093
- large: "w-12 !h-12 min-w-12 min-h-12"
2150
+ medium: "w-9 !h-9 min-w-9 min-h-9",
2151
+ small: "w-7 !h-7 min-w-7 min-h-7",
2152
+ smallest: "w-5 !h-5 min-w-5 min-h-5",
2153
+ large: "w-10 !h-10 min-w-10 min-h-10"
2094
2154
  };
2095
2155
  const shapeClasses = {
2096
2156
  circular: "rounded-full",
@@ -4321,7 +4381,7 @@ const MultiSelect = React.forwardRef((t0, ref) => {
4321
4381
  if (selectedValues.some((v_0) => String(v_0) === String(newValue))) {
4322
4382
  newSelectedValues = selectedValues.filter((v) => String(v) !== String(newValue));
4323
4383
  } else {
4324
- newSelectedValues = [...selectedValues, newValue];
4384
+ newSelectedValues = [...selectedValues, String(newValue)];
4325
4385
  }
4326
4386
  updateValues(newSelectedValues);
4327
4387
  };
@@ -5243,88 +5303,87 @@ function SearchBar(t0) {
5243
5303
  t10 = $[17];
5244
5304
  }
5245
5305
  const t11 = searchText ?? "";
5246
- const t12 = inputRef;
5247
- const t13 = !onTextSearch;
5248
- let t14;
5306
+ const t12 = !onTextSearch;
5307
+ let t13;
5249
5308
  if ($[18] !== onTextSearch) {
5250
- t14 = onTextSearch ? (event) => {
5309
+ t13 = onTextSearch ? (event) => {
5251
5310
  setSearchText(event.target.value);
5252
5311
  } : void 0;
5253
5312
  $[18] = onTextSearch;
5254
- $[19] = t14;
5313
+ $[19] = t13;
5255
5314
  } else {
5256
- t14 = $[19];
5315
+ t13 = $[19];
5257
5316
  }
5317
+ let t14;
5258
5318
  let t15;
5259
- let t16;
5260
5319
  if ($[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5261
- t15 = () => setActive(true);
5262
- t16 = () => setActive(false);
5263
- $[20] = t15;
5264
- $[21] = t16;
5320
+ t14 = () => setActive(true);
5321
+ t15 = () => setActive(false);
5322
+ $[20] = t14;
5323
+ $[21] = t15;
5265
5324
  } else {
5266
- t15 = $[20];
5267
- t16 = $[21];
5325
+ t14 = $[20];
5326
+ t15 = $[21];
5268
5327
  }
5269
- const t17 = (disabled || loading) && "pointer-events-none";
5270
- const t18 = size === "small" ? "text-sm" : "";
5271
- const t19 = expandable ? active ? "w-[220px]" : "w-[180px]" : "";
5272
- let t20;
5273
- if ($[22] !== innerClassName || $[23] !== inputPaddingClass || $[24] !== t17 || $[25] !== t18 || $[26] !== t19) {
5274
- t20 = cls(t17, "placeholder-text-disabled dark:placeholder-text-disabled-dark", "relative flex items-center transition-all bg-transparent outline-none focus:outline-none focus:ring-0 appearance-none border-none focus:border-transparent", inputPaddingClass, "h-full w-full text-current", t18, t19, innerClassName);
5328
+ const t16 = (disabled || loading) && "pointer-events-none";
5329
+ const t17 = size === "small" ? "text-sm" : "";
5330
+ const t18 = expandable ? active ? "w-[220px]" : "w-[180px]" : "";
5331
+ let t19;
5332
+ if ($[22] !== innerClassName || $[23] !== inputPaddingClass || $[24] !== t16 || $[25] !== t17 || $[26] !== t18) {
5333
+ t19 = cls(t16, "placeholder-text-disabled dark:placeholder-text-disabled-dark", "relative flex items-center transition-all bg-transparent outline-none focus:outline-none focus:ring-0 appearance-none border-none focus:border-transparent", inputPaddingClass, "h-full w-full text-current", t17, t18, innerClassName);
5275
5334
  $[22] = innerClassName;
5276
5335
  $[23] = inputPaddingClass;
5277
- $[24] = t17;
5278
- $[25] = t18;
5279
- $[26] = t19;
5280
- $[27] = t20;
5336
+ $[24] = t16;
5337
+ $[25] = t17;
5338
+ $[26] = t18;
5339
+ $[27] = t19;
5281
5340
  } else {
5282
- t20 = $[27];
5341
+ t19 = $[27];
5283
5342
  }
5284
- let t21;
5285
- if ($[28] !== autoFocus || $[29] !== onClick || $[30] !== placeholder || $[31] !== t11 || $[32] !== t12 || $[33] !== t13 || $[34] !== t14 || $[35] !== t20) {
5286
- t21 = /* @__PURE__ */ jsx("input", { value: t11, ref: t12, onClick, placeholder, "aria-label": placeholder, readOnly: t13, onChange: t14, autoFocus, onFocus: t15, onBlur: t16, className: t20 });
5343
+ let t20;
5344
+ if ($[28] !== autoFocus || $[29] !== inputRef || $[30] !== onClick || $[31] !== placeholder || $[32] !== t11 || $[33] !== t12 || $[34] !== t13 || $[35] !== t19) {
5345
+ t20 = /* @__PURE__ */ jsx("input", { value: t11, ref: inputRef, onClick, placeholder, "aria-label": placeholder, readOnly: t12, onChange: t13, autoFocus, onFocus: t14, onBlur: t15, className: t19 });
5287
5346
  $[28] = autoFocus;
5288
- $[29] = onClick;
5289
- $[30] = placeholder;
5290
- $[31] = t11;
5291
- $[32] = t12;
5292
- $[33] = t13;
5293
- $[34] = t14;
5294
- $[35] = t20;
5295
- $[36] = t21;
5347
+ $[29] = inputRef;
5348
+ $[30] = onClick;
5349
+ $[31] = placeholder;
5350
+ $[32] = t11;
5351
+ $[33] = t12;
5352
+ $[34] = t13;
5353
+ $[35] = t19;
5354
+ $[36] = t20;
5296
5355
  } else {
5297
- t21 = $[36];
5356
+ t20 = $[36];
5298
5357
  }
5299
- let t22;
5358
+ let t21;
5300
5359
  if ($[37] !== clearText || $[38] !== searchText || $[39] !== size) {
5301
- t22 = searchText ? /* @__PURE__ */ jsx(IconButton, { className: `${size === "small" ? "mr-0 top-0" : "mr-1 top-0"} absolute right-0 z-10`, size: "small", "aria-label": "Clear search", onClick: clearText, children: /* @__PURE__ */ jsx(XIcon, { size: iconSize.smallest }) }) : /* @__PURE__ */ jsx("div", { style: {
5360
+ t21 = searchText ? /* @__PURE__ */ jsx(IconButton, { className: `${size === "small" ? "mr-0 top-0" : "mr-1 top-0"} absolute right-0 z-10`, size: "small", "aria-label": "Clear search", onClick: clearText, children: /* @__PURE__ */ jsx(XIcon, { size: iconSize.smallest }) }) : /* @__PURE__ */ jsx("div", { style: {
5302
5361
  width: 26
5303
5362
  } });
5304
5363
  $[37] = clearText;
5305
5364
  $[38] = searchText;
5306
5365
  $[39] = size;
5307
- $[40] = t22;
5366
+ $[40] = t21;
5308
5367
  } else {
5309
- t22 = $[40];
5368
+ t21 = $[40];
5310
5369
  }
5311
- let t23;
5312
- if ($[41] !== onClick || $[42] !== t10 || $[43] !== t21 || $[44] !== t22 || $[45] !== t7) {
5313
- t23 = /* @__PURE__ */ jsxs("div", { role: "search", "aria-label": "Search", onClick, className: t7, children: [
5370
+ let t22;
5371
+ if ($[41] !== onClick || $[42] !== t10 || $[43] !== t20 || $[44] !== t21 || $[45] !== t7) {
5372
+ t22 = /* @__PURE__ */ jsxs("div", { role: "search", "aria-label": "Search", onClick, className: t7, children: [
5314
5373
  t10,
5315
- t21,
5316
- t22
5374
+ t20,
5375
+ t21
5317
5376
  ] });
5318
5377
  $[41] = onClick;
5319
5378
  $[42] = t10;
5320
- $[43] = t21;
5321
- $[44] = t22;
5379
+ $[43] = t20;
5380
+ $[44] = t21;
5322
5381
  $[45] = t7;
5323
- $[46] = t23;
5382
+ $[46] = t22;
5324
5383
  } else {
5325
- t23 = $[46];
5384
+ t22 = $[46];
5326
5385
  }
5327
- return t23;
5386
+ return t22;
5328
5387
  }
5329
5388
  const Select = forwardRef((t0, ref) => {
5330
5389
  const $ = c(123);
@@ -8760,7 +8819,7 @@ function MemoizedList({
8760
8819
  zIndex: 1
8761
8820
  }, children: endAdornment });
8762
8821
  }
8763
- const rowData = data && data[index];
8822
+ const rowData = data ? data[index] : void 0;
8764
8823
  return /* @__PURE__ */ jsxs(VirtualTableRow, { rowData, rowIndex: index, onRowClick, columns, hoverRow, rowClassName, style: {
8765
8824
  ...style,
8766
8825
  top: `calc(${style.top}px + ${headerHeight ?? 48}px)`
@@ -8902,7 +8961,7 @@ export {
8902
8961
  AlignLeftIcon,
8903
8962
  AppWindow,
8904
8963
  ArrowDownToLineIcon,
8905
- ArrowLeftIcon,
8964
+ ArrowLeftIcon2 as ArrowLeftIcon,
8906
8965
  ArrowRightFromLineIcon,
8907
8966
  ArrowRightIcon,
8908
8967
  ArrowRightToLineIcon,
@@ -8927,7 +8986,7 @@ export {
8927
8986
  ChevronDownIcon2 as ChevronDownIcon,
8928
8987
  ChevronLeftIcon2 as ChevronLeftIcon,
8929
8988
  ChevronRightIcon2 as ChevronRightIcon,
8930
- ChevronUpIcon,
8989
+ ChevronUpIcon2 as ChevronUpIcon,
8931
8990
  ChevronsLeftIcon,
8932
8991
  ChevronsRightIcon,
8933
8992
  ChevronsUpDownIcon,
@@ -9042,7 +9101,7 @@ export {
9042
9101
  RadioGroup,
9043
9102
  RadioGroupItem,
9044
9103
  RefreshCcwIcon,
9045
- RefreshCwIcon,
9104
+ RefreshCwIcon2 as RefreshCwIcon,
9046
9105
  RepeatIcon,
9047
9106
  ResizablePanels,
9048
9107
  Rows3Icon,