@rebasepro/ui 0.5.0 → 0.6.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.
Files changed (79) hide show
  1. package/dist/components/Autocomplete.d.ts +2 -2
  2. package/dist/components/BooleanSwitchWithLabel.d.ts +1 -1
  3. package/dist/components/Checkbox.d.ts +1 -1
  4. package/dist/components/Chip.d.ts +1 -1
  5. package/dist/components/CircularProgress.d.ts +2 -1
  6. package/dist/components/CircularProgressCenter.d.ts +2 -1
  7. package/dist/components/Collapse.d.ts +1 -1
  8. package/dist/components/ColorPicker.d.ts +2 -1
  9. package/dist/components/DebouncedTextField.d.ts +2 -1
  10. package/dist/components/Dialog.d.ts +2 -1
  11. package/dist/components/DialogActions.d.ts +1 -1
  12. package/dist/components/DialogContent.d.ts +1 -1
  13. package/dist/components/DialogTitle.d.ts +1 -1
  14. package/dist/components/ErrorBoundary.d.ts +1 -1
  15. package/dist/components/ExpandablePanel.d.ts +1 -1
  16. package/dist/components/FileUpload.d.ts +1 -1
  17. package/dist/components/InfoLabel.d.ts +1 -1
  18. package/dist/components/LoadingButton.d.ts +1 -1
  19. package/dist/components/Menu.d.ts +1 -1
  20. package/dist/components/Menubar.d.ts +16 -16
  21. package/dist/components/MultiSelect.d.ts +1 -1
  22. package/dist/components/Paper.d.ts +1 -1
  23. package/dist/components/Popover.d.ts +1 -1
  24. package/dist/components/ResizablePanels.d.ts +1 -1
  25. package/dist/components/SearchBar.d.ts +1 -1
  26. package/dist/components/Select.d.ts +2 -2
  27. package/dist/components/Separator.d.ts +1 -1
  28. package/dist/components/Skeleton.d.ts +2 -1
  29. package/dist/components/Table.d.ts +5 -5
  30. package/dist/components/Tabs.d.ts +2 -2
  31. package/dist/components/TextField.d.ts +2 -2
  32. package/dist/components/ToggleButtonGroup.d.ts +1 -1
  33. package/dist/components/Tooltip.d.ts +1 -1
  34. package/dist/components/Typography.d.ts +1 -1
  35. package/dist/components/VirtualTable/VirtualTableHeaderRow.d.ts +2 -1
  36. package/dist/components/common/SelectInputLabel.d.ts +1 -1
  37. package/dist/hooks/PortalContainerContext.d.ts +1 -1
  38. package/dist/icons/GitHubIcon.d.ts +2 -1
  39. package/dist/icons/HandleIcon.d.ts +1 -1
  40. package/dist/icons/index.d.ts +1 -1
  41. package/dist/index.css +13 -13
  42. package/dist/index.es.js +5680 -8795
  43. package/dist/index.es.js.map +1 -1
  44. package/dist/src/index.css +126 -0
  45. package/dist/styles.d.ts +9 -9
  46. package/package.json +36 -35
  47. package/src/components/Alert.tsx +1 -1
  48. package/src/components/BooleanSwitchWithLabel.tsx +1 -1
  49. package/src/components/Button.tsx +5 -5
  50. package/src/components/Chip.tsx +39 -37
  51. package/src/components/DateTimeField.tsx +2 -2
  52. package/src/components/Dialog.tsx +7 -4
  53. package/src/components/ErrorBoundary.tsx +4 -2
  54. package/src/components/ExpandablePanel.tsx +1 -1
  55. package/src/components/FileUpload.tsx +1 -1
  56. package/src/components/FilterChip.tsx +2 -2
  57. package/src/components/IconButton.tsx +1 -1
  58. package/src/components/MultiSelect.tsx +1 -1
  59. package/src/components/Select.tsx +2 -2
  60. package/src/components/Table.tsx +23 -15
  61. package/src/components/TextField.tsx +6 -6
  62. package/src/components/Tooltip.tsx +2 -1
  63. package/src/components/VirtualTable/VirtualTable.performance.test.tsx +1 -1
  64. package/src/components/VirtualTable/VirtualTable.tsx +1 -2
  65. package/src/components/VirtualTable/VirtualTableHeader.tsx +34 -21
  66. package/src/components/VirtualTable/VirtualTableRow.tsx +1 -1
  67. package/src/hooks/useDebounceCallback.tsx +1 -1
  68. package/src/icons/Icon.tsx +1 -1
  69. package/src/icons/icon_keys.ts +1 -1
  70. package/src/icons/index.ts +1 -1
  71. package/src/index.css +13 -13
  72. package/src/scripts/fixIconSizes.cjs +7 -7
  73. package/src/scripts/fixIconSizesToConst.cjs +2 -2
  74. package/src/scripts/generateIconKeys.ts +7 -7
  75. package/src/scripts/saveIconFiles.ts +1 -1
  76. package/src/styles.ts +9 -9
  77. package/src/util/debounce.ts +2 -3
  78. package/dist/index.umd.js +0 -9561
  79. package/dist/index.umd.js.map +0 -1
@@ -19,7 +19,7 @@ export const Table = React.memo(({
19
19
  ...rest
20
20
  }: TableProps) => (
21
21
  <table
22
- className={cls("text-left text-surface-900 dark:text-white rounded-md overflow-x-auto", className)}
22
+ className={cls("text-left text-surface-900 dark:text-white rounded-lg overflow-x-auto", className)}
23
23
  style={style}
24
24
  {...rest}
25
25
  >
@@ -88,7 +88,7 @@ export const TableRow = React.memo(({
88
88
  style={style}
89
89
  className={cls(
90
90
  "bg-white dark:bg-surface-900",
91
- onClick ? "hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800 cursor-pointer" : "",
91
+ onClick ? "hover:bg-primary/5 dark:hover:bg-primary/5 cursor-pointer" : "",
92
92
  className
93
93
  )}
94
94
  {...rest}
@@ -137,6 +137,14 @@ export const TableCell = React.memo(({
137
137
  );
138
138
  });
139
139
 
140
+ interface ReactFiber {
141
+ return: ReactFiber;
142
+ type: string | Function;
143
+ elementType?: {
144
+ name?: string;
145
+ };
146
+ }
147
+
140
148
  // This is highly experimental and might break in the future
141
149
  function getParentName(element: HTMLElement | null): string | undefined {
142
150
  if (element) {
@@ -146,19 +154,19 @@ function getParentName(element: HTMLElement | null): string | undefined {
146
154
  key.startsWith("__reactInternalInstance$")
147
155
  );
148
156
  });
149
- // @ts-ignore
150
- const domFiber = element[key];
151
- // @ts-ignore
152
- const getComponentFiber = (fiber) => {
153
- let parentFiber = fiber.return;
154
- while (typeof parentFiber.type === "string") {
155
- parentFiber = parentFiber.return;
156
- }
157
- return parentFiber;
158
- };
159
- let fiber = getComponentFiber(domFiber);
160
- fiber = getComponentFiber(fiber);
161
- return fiber?.elementType?.name;
157
+ if (key) {
158
+ const domFiber = (element as unknown as Record<string, ReactFiber>)[key];
159
+ const getComponentFiber = (fiber: ReactFiber): ReactFiber => {
160
+ let parentFiber = fiber.return;
161
+ while (parentFiber && typeof parentFiber.type === "string") {
162
+ parentFiber = parentFiber.return;
163
+ }
164
+ return parentFiber;
165
+ };
166
+ let fiber = getComponentFiber(domFiber);
167
+ fiber = getComponentFiber(fiber);
168
+ return fiber?.elementType?.name;
169
+ }
162
170
  }
163
171
  return undefined;
164
172
  }
@@ -53,7 +53,7 @@ export type TextFieldProps<T extends string | number> = {
53
53
  * @default 1
54
54
  */
55
55
  minRows?: number | string;
56
- } & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">;
56
+ } & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "value">;
57
57
 
58
58
  export const TextField = forwardRef<HTMLDivElement, TextFieldProps<string | number>>(
59
59
  <T extends string | number>(
@@ -92,8 +92,8 @@ export const TextField = forwardRef<HTMLDivElement, TextFieldProps<string | numb
92
92
  const hasValue = value !== undefined && value !== null && value !== "";
93
93
 
94
94
  useEffect(() => {
95
- // @ts-ignore
96
- if (inputRef.current && document.activeElement === inputRef.current) {
95
+ const element = inputRef && "current" in inputRef ? inputRef.current : null;
96
+ if (element && document.activeElement === element) {
97
97
  setFocused(true);
98
98
  }
99
99
  }, []);
@@ -131,7 +131,7 @@ export const TextField = forwardRef<HTMLDivElement, TextFieldProps<string | numb
131
131
  style={inputStyle}
132
132
  className={cls(
133
133
  invisible ? focusedInvisibleMixin : "",
134
- "rounded-md resize-none w-full outline-none text-base bg-transparent min-h-[64px] px-3",
134
+ "rounded-lg resize-none w-full outline-none text-base bg-transparent min-h-[64px] px-3",
135
135
  label ? "pt-8 pb-2" : "py-2",
136
136
  disabled && "outline-none opacity-50 text-surface-accent-600 dark:text-surface-accent-500",
137
137
  inputClassName
@@ -149,7 +149,7 @@ export const TextField = forwardRef<HTMLDivElement, TextFieldProps<string | numb
149
149
  style={inputStyle}
150
150
  className={cls(
151
151
  "w-full outline-none bg-transparent leading-normal px-3",
152
- "rounded-md",
152
+ "rounded-lg",
153
153
  "focused:text-text-primary focused:dark:text-text-primary-dark",
154
154
  invisible ? focusedInvisibleMixin : "",
155
155
  disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
@@ -187,7 +187,7 @@ export const TextField = forwardRef<HTMLDivElement, TextFieldProps<string | numb
187
187
  <div
188
188
  ref={ref}
189
189
  className={cls(
190
- "rounded-md relative max-w-full",
190
+ "rounded-lg relative max-w-full",
191
191
  invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin,
192
192
  disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
193
193
  error ? "border border-red-500 dark:border-red-600" : "",
@@ -65,7 +65,8 @@ export const Tooltip = ({
65
65
 
66
66
  return (
67
67
  <TooltipPrimitive.Provider delayDuration={delayDuration}>
68
- <TooltipPrimitive.Root {...(open !== undefined ? { open, onOpenChange } : {})} defaultOpen={defaultOpen}>
68
+ <TooltipPrimitive.Root {...(open !== undefined ? { open,
69
+ onOpenChange } : {})} defaultOpen={defaultOpen}>
69
70
  {trigger}
70
71
  <TooltipPrimitive.Portal container={finalContainer}>
71
72
  <TooltipPrimitive.Content
@@ -9,7 +9,7 @@ import { VirtualTableProps } from "./VirtualTableProps";
9
9
  // Mock VirtualTableRow to track renders
10
10
  const renderCallback = jest.fn();
11
11
  jest.mock("./VirtualTableRow", () => {
12
- // eslint-disable-next-line @typescript-eslint/no-require-imports
12
+
13
13
  const React = require("react");
14
14
  // Ensure it's memoized as in the real component, otherwise it would re-render anyway if parent renders
15
15
  // But wait, if parent passes new props, it re-renders.
@@ -4,7 +4,6 @@ import React, { createContext, forwardRef, RefObject, useCallback, useEffect, us
4
4
 
5
5
  import { deepEqual as equal } from "fast-equals"
6
6
 
7
- // @ts-expect-error -- react-window does not ship type declarations and @types/react-window is not installed
8
7
  import { FixedSizeList as List } from "react-window";
9
8
  import useMeasure from "react-use-measure";
10
9
 
@@ -320,7 +319,7 @@ export const VirtualTable = React.memo<VirtualTableProps<Record<string, unknown>
320
319
  }, [checkFilterCombination, currentSort, onFilterUpdate, sortByProperty]);
321
320
 
322
321
  const empty = !loading && (data?.length ?? 0) === 0;
323
- const customView = error
322
+ const customView = (error && (data?.length ?? 0) === 0)
324
323
  ? <CenteredView maxWidth={"2xl"}
325
324
  className="flex flex-col gap-2">
326
325
 
@@ -110,10 +110,21 @@ export const VirtualTableHeader = React.memo<VirtualTableHeaderProps<Record<stri
110
110
  <div
111
111
  className={`flex items-center justify-${column.headerAlign} flex-row`}>
112
112
 
113
- {column.icon}
113
+ {column.icon && (
114
+ <div className="flex-shrink-0 flex items-center justify-center mr-1">
115
+ {React.isValidElement(column.icon) ? (
116
+ React.cloneElement(column.icon as React.ReactElement<any>, {
117
+ size: 14,
118
+ className: cls((column.icon as React.ReactElement<any>).props?.className, "flex-shrink-0")
119
+ })
120
+ ) : (
121
+ column.icon
122
+ )}
123
+ </div>
124
+ )}
114
125
 
115
126
  <div
116
- className="truncate -webkit-box w-full mx-1 overflow-hidden"
127
+ className="truncate -webkit-box w-full mr-1 overflow-hidden"
117
128
  style={{
118
129
  WebkitBoxOrient: "vertical",
119
130
  WebkitLineClamp: 2,
@@ -130,27 +141,29 @@ export const VirtualTableHeader = React.memo<VirtualTableHeaderProps<Record<stri
130
141
  <AdditionalHeaderWidget onHover={onHover || openFilter}/>}
131
142
 
132
143
  {column.sortable && (sort || hovered || openFilter) &&
133
- <Badge color="secondary"
134
- invisible={!sort}>
135
- <IconButton
136
- size={"small"}
137
- className={onHover || openFilter ? "bg-white dark:bg-surface-900" : undefined}
138
- onClick={() => {
139
- onColumnSort(column.key as Extract<keyof M, string>);
140
- }}
141
- >
142
- {!sort &&
143
- <ArrowUpIcon/>}
144
- {sort === "asc" &&
145
- <ArrowUpIcon/>}
146
- {sort === "desc" &&
147
- <ArrowUpIcon className={"rotate-180"}/>}
148
- </IconButton>
149
- </Badge>
144
+ <div className="flex-shrink-0">
145
+ <Badge color="secondary"
146
+ invisible={!sort}>
147
+ <IconButton
148
+ size={"small"}
149
+ className={onHover || openFilter ? "bg-white dark:bg-surface-900" : undefined}
150
+ onClick={() => {
151
+ onColumnSort(column.key as Extract<keyof M, string>);
152
+ }}
153
+ >
154
+ {!sort &&
155
+ <ArrowUpIcon size={14} className="flex-shrink-0" />}
156
+ {sort === "asc" &&
157
+ <ArrowUpIcon size={14} className="flex-shrink-0" />}
158
+ {sort === "desc" &&
159
+ <ArrowUpIcon size={14} className="flex-shrink-0 rotate-180" />}
160
+ </IconButton>
161
+ </Badge>
162
+ </div>
150
163
  }
151
164
  </>
152
165
 
153
- {column.filter && createFilterField && <div>
166
+ {column.filter && createFilterField && <div className="flex-shrink-0">
154
167
  <Badge color="secondary"
155
168
  invisible={!filter}>
156
169
 
@@ -164,7 +177,7 @@ export const VirtualTableHeader = React.memo<VirtualTableHeaderProps<Record<stri
164
177
  className={onHover || openFilter ? "bg-white dark:bg-surface-900" : undefined}
165
178
  size={"small"}
166
179
  onClick={handleSettingsClick}>
167
- <FilterIcon size={iconSize.small}/>
180
+ <FilterIcon size={14} className="flex-shrink-0"/>
168
181
  </IconButton>}
169
182
  >
170
183
  <FilterForm column={column}
@@ -31,7 +31,7 @@ export const VirtualTableRow = React.memo<VirtualTableRowProps<Record<string, un
31
31
  "flex min-w-full text-sm border-b border-surface-200/60 dark:border-surface-700/60 dark:bg-surface-800",
32
32
  rowClassName ? rowClassName(rowData) : "",
33
33
  {
34
- "hover:!bg-surface-50/75 dark:hover:!bg-surface-800/75": hoverRow,
34
+ "hover:!bg-primary/[0.03] dark:hover:!bg-primary/5": hoverRow,
35
35
  "cursor-pointer ": onRowClick
36
36
  }
37
37
  )}
@@ -1,6 +1,6 @@
1
1
  import { useCallback, useRef } from "react";
2
2
 
3
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3
+
4
4
  export function useDebounceCallback<T extends (...args: any[]) => unknown>(
5
5
  callback?: T,
6
6
  delay?: number
@@ -11,7 +11,7 @@ export const iconSize = {
11
11
  smallest: 16,
12
12
  small: 20,
13
13
  medium: 24,
14
- large: 28,
14
+ large: 28
15
15
  } as const satisfies Record<IconSize, number>;
16
16
 
17
17
  export type IconProps = {
@@ -1933,4 +1933,4 @@ export const iconKeys = [
1933
1933
  "ZodiacVirgo",
1934
1934
  "ZoomIn",
1935
1935
  "ZoomOut"
1936
- ];
1936
+ ];
@@ -125,5 +125,5 @@ export {
125
125
  VoteIcon,
126
126
  Wand2Icon,
127
127
  XCircleIcon,
128
- XIcon,
128
+ XIcon
129
129
  } from "lucide-react";
package/src/index.css CHANGED
@@ -65,51 +65,51 @@
65
65
  }
66
66
 
67
67
  .typography-h1 {
68
- @apply text-6xl font-headers font-light tracking-tight;
68
+ @apply text-4xl font-headers font-semibold tracking-tight;
69
69
  }
70
70
 
71
71
  .typography-h2 {
72
- @apply text-5xl font-headers font-light tracking-tight;
72
+ @apply text-3xl font-headers font-semibold tracking-tight;
73
73
  }
74
74
 
75
75
  .typography-h3 {
76
- @apply text-4xl font-headers font-normal tracking-tight;
76
+ @apply text-2xl font-headers font-semibold tracking-tight;
77
77
  }
78
78
 
79
79
  .typography-h4 {
80
- @apply text-3xl font-headers font-normal tracking-tight;
80
+ @apply text-xl font-headers font-semibold tracking-[-0.01em];
81
81
  }
82
82
 
83
83
  .typography-h5 {
84
- @apply text-2xl font-headers font-normal;
84
+ @apply text-lg font-headers font-semibold tracking-[-0.01em];
85
85
  }
86
86
 
87
87
  .typography-h6 {
88
- @apply text-xl font-headers font-normal;
88
+ @apply text-base font-headers font-semibold tracking-[-0.01em];
89
89
  }
90
90
 
91
91
  .typography-subtitle1 {
92
- @apply text-lg font-headers font-medium;
92
+ @apply text-sm font-headers font-semibold tracking-[-0.01em];
93
93
  }
94
94
 
95
95
  .typography-subtitle2 {
96
- @apply text-base font-headers font-medium;
96
+ @apply text-sm font-headers font-medium;
97
97
  }
98
98
 
99
99
  .typography-body1 {
100
- @apply text-base;
100
+ @apply text-sm;
101
101
  }
102
102
 
103
103
  .typography-body2 {
104
- @apply text-sm;
104
+ @apply text-xs;
105
105
  }
106
106
 
107
107
  .typography-caption {
108
- @apply text-xs;
108
+ @apply text-[11px] leading-[1.4];
109
109
  }
110
110
 
111
111
  .typography-label {
112
- @apply text-sm font-medium;
112
+ @apply text-xs font-medium tracking-wide;
113
113
  }
114
114
 
115
115
  .typography-inherit {
@@ -117,7 +117,7 @@
117
117
  }
118
118
 
119
119
  .typography-button {
120
- @apply text-sm font-semibold;
120
+ @apply text-sm font-semibold tracking-wide;
121
121
  }
122
122
 
123
123
  :focus-visible {
@@ -20,7 +20,7 @@ const SIZE_MAP = {
20
20
  smallest: 16,
21
21
  small: 20,
22
22
  medium: 24,
23
- large: 28,
23
+ large: 28
24
24
  };
25
25
 
26
26
  const files = process.argv.slice(2);
@@ -46,21 +46,21 @@ for (const filePath of files) {
46
46
  // We replace size={"small"} -> size={20} only when it appears on a lucide icon line
47
47
  const patterns = [
48
48
  `size={"${sizeStr}"}`,
49
- `size="${sizeStr}"`,
49
+ `size="${sizeStr}"`
50
50
  ];
51
-
51
+
52
52
  for (const pattern of patterns) {
53
53
  const replacement = `size={${sizeNum}}`;
54
-
54
+
55
55
  // Process line by line to check context
56
56
  const lines = modified.split("\n");
57
57
  for (let i = 0; i < lines.length; i++) {
58
58
  const line = lines[i];
59
59
  if (!line.includes(pattern)) continue;
60
-
60
+
61
61
  // Skip if this is IconButton, CircularProgress, or other non-lucide components
62
62
  if (/\<(IconButton|CircularProgress|Icon |AIIcon|FileIcon|IconForView|CollectionSize)/.test(line)) continue;
63
-
63
+
64
64
  // Check if this line contains a lucide-style icon component (PascalCase ending with Icon)
65
65
  if (/\<[A-Z][a-zA-Z0-9]+Icon/.test(line)) {
66
66
  const newLine = line.replace(pattern, replacement);
@@ -80,7 +80,7 @@ for (const filePath of files) {
80
80
  // Add iconSize import — but actually we're using raw numbers, not iconSize references
81
81
  // So no import needed. The migration from previous session already set up the constants.
82
82
  }
83
-
83
+
84
84
  fs.writeFileSync(filePath, modified, "utf8");
85
85
  console.log(`✅ ${path.relative(process.cwd(), filePath)}: ${fileReplacements} replacement(s)`);
86
86
  totalReplacements += fileReplacements;
@@ -16,7 +16,7 @@ const SIZE_MAP = {
16
16
  16: "iconSize.smallest",
17
17
  20: "iconSize.small",
18
18
  24: "iconSize.medium",
19
- 28: "iconSize.large",
19
+ 28: "iconSize.large"
20
20
  };
21
21
 
22
22
  // Regex to match lucide icon components with raw numeric sizes
@@ -71,7 +71,7 @@ for (const filePath of files) {
71
71
  if (!content.includes("iconSize")) {
72
72
  // This shouldn't happen since we just added it, but safety check
73
73
  }
74
-
74
+
75
75
  if (content.includes("iconSize") && !content.match(/import\s.*iconSize/)) {
76
76
  // Try to add to existing @rebasepro/ui import
77
77
  const uiImportRe = /import\s*\{([^}]+)\}\s*from\s*["']@rebasepro\/ui["']/;
@@ -4,15 +4,15 @@ import { fileURLToPath } from "url";
4
4
  import * as LucideIcons from "lucide-react";
5
5
 
6
6
  export async function generateIconKeys() {
7
- const keys = Object.keys(LucideIcons).filter(k =>
8
- k !== "createLucideIcon" &&
9
- k !== "default" &&
10
- k !== "icons" &&
11
- k !== "LucideIcon" &&
12
- k !== "Icon" &&
7
+ const keys = Object.keys(LucideIcons).filter(k =>
8
+ k !== "createLucideIcon" &&
9
+ k !== "default" &&
10
+ k !== "icons" &&
11
+ k !== "LucideIcon" &&
12
+ k !== "Icon" &&
13
13
  k !== "LucideProvider" &&
14
14
  k !== "useLucideContext" &&
15
- !k.endsWith("Node") &&
15
+ !k.endsWith("Node") &&
16
16
  !k.endsWith("Props") &&
17
17
  !k.endsWith("Icon") &&
18
18
  // Filter out Lucide-prefixed duplicates (e.g. "LucideArrowDown" duplicates "ArrowDown")
@@ -22,7 +22,7 @@ export function saveIconFiles(iconKeys: string[]) {
22
22
 
23
23
  // Ensure key works as component name
24
24
  let componentName = `${key}Icon`;
25
-
25
+
26
26
  // Handle names that might start with numbers like "10k" -> "_10k"
27
27
  if (/^[0-9]/.test(componentName)) {
28
28
  componentName = `_${componentName}`;
package/src/styles.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  export const focusedDisabled = "focus-visible:ring-0 focus-visible:ring-offset-0";
2
2
  export const focusedInvisibleMixin = "focus:bg-opacity-70 focus:bg-surface-accent-100 focus:dark:bg-surface-900 focus:dark:bg-opacity-60 focus:bg-surface-accent-100/70 dark:focus:bg-surface-900/60";
3
- export const focusedClasses = "z-30 outline-hidden outline-none ring-2 ring-primary ring-opacity-75 ring-primary/75 ring-offset-0 ring-offset-transparent ";
4
- export const fieldBackgroundMixin = "bg-opacity-50 bg-surface-accent-200 bg-surface-accent-200/50 dark:bg-surface-900 dark:bg-opacity-100 dark:bg-surface-900/100";
5
- export const fieldBackgroundInvisibleMixin = "bg-opacity-0 bg-surface-accent-100 dark:bg-surface-900 dark:bg-opacity-0 bg-surface-accent-200/0 dark:bg-surface-900/0";
6
- export const fieldBackgroundDisabledMixin = "dark:bg-surface-900 bg-opacity-50 dark:bg-opacity-90 bg-surface-accent-200/50 dark:bg-surface-900/90";
7
- export const fieldBackgroundHoverMixin = "hover:bg-opacity-70 dark:hover:bg-surface-700 dark:hover:bg-opacity-40 hover:bg-surface-accent-200/70 hover:dark:bg-surface-700/40";
8
- export const defaultBorderMixin = "border-surface-200/60 dark:border-surface-700/60 ";
9
- export const paperMixin = "bg-white rounded-md dark:bg-surface-800 border border-surface-200/60 dark:border-surface-700/60";
10
- export const cardMixin = "bg-white dark:bg-surface-900 rounded-md border border-surface-200/60 dark:border-surface-700/60 m-1 -p-1";
11
- export const cardClickableMixin = "hover:bg-surface-accent-100 dark:hover:bg-surface-800 hover:ring-1 hover:ring-primary/50 hover:shadow-sm cursor-pointer hover:bg-primary/10 dark:hover:bg-primary/10 transition-all duration-150";
3
+ export const focusedClasses = "z-30 outline-hidden outline-none ring-2 ring-primary ring-opacity-50 ring-primary/50 ring-offset-0 ring-offset-transparent ";
4
+ export const fieldBackgroundMixin = "bg-surface-accent-200/50 dark:bg-black/30";
5
+ export const fieldBackgroundInvisibleMixin = "bg-surface-accent-200/0 dark:bg-black/0";
6
+ export const fieldBackgroundDisabledMixin = "bg-surface-accent-200/50 dark:bg-black/20";
7
+ export const fieldBackgroundHoverMixin = "hover:bg-surface-accent-200/70 hover:dark:bg-black/50";
8
+ export const defaultBorderMixin = "border-surface-200 dark:border-surface-700 ";
9
+ export const paperMixin = "bg-white rounded-lg dark:bg-surface-900 border border-surface-200 dark:border-surface-700";
10
+ export const cardMixin = "bg-white dark:bg-surface-900 rounded-lg border border-surface-200 dark:border-surface-700";
11
+ export const cardClickableMixin = "hover:bg-primary/5 dark:hover:bg-primary/5 cursor-pointer transition-colors duration-150";
12
12
  export const cardSelectedMixin = "bg-primary-bg/30 dark:bg-primary-bg/10 ring-1 ring-primary/75";
@@ -1,13 +1,12 @@
1
1
  /**
2
2
  * @ignore
3
3
  */
4
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4
+
5
5
  export function debounce<T extends (...args: any[]) => unknown>(func: T, wait = 166) {
6
6
  let timeout: ReturnType<typeof setTimeout>;
7
7
 
8
- function debounced(...args: Parameters<T>) {
8
+ function debounced(this: unknown, ...args: Parameters<T>) {
9
9
  const later = () => {
10
- // @ts-ignore
11
10
  func.apply(this, args);
12
11
  };
13
12
  clearTimeout(timeout);