@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
@@ -0,0 +1,126 @@
1
+ @theme {
2
+ /* Font Families */
3
+ --font-sans: 'Rubik', 'Roboto', 'Helvetica', 'Arial', sans-serif;
4
+ --font-headers: 'Rubik', 'Roboto', 'Helvetica', 'Arial', sans-serif;
5
+ --font-mono: 'JetBrains Mono', 'Space Mono', 'Lucida Console', monospace;
6
+
7
+ /* Colors */
8
+ --color-primary: #0070F4;
9
+ --color-primary-light: oklch(from var(--color-primary) calc(l + 0.15) c h);
10
+ --color-primary-dark: oklch(from var(--color-primary) calc(l - 0.15) c h);
11
+ --color-secondary: #FF5B79;
12
+ --color-secondary-light: oklch(from var(--color-secondary) calc(l + 0.15) c h);
13
+ --color-secondary-dark: oklch(from var(--color-secondary) calc(l - 0.15) c h);
14
+
15
+ --color-primary-bg: oklch(from var(--color-primary) l c h / 0.1);
16
+ --color-secondary-bg: oklch(from var(--color-secondary) l c h / 0.1);
17
+
18
+ /* Field Colors */
19
+ --color-field-disabled: rgb(224 224 226);
20
+ --color-field-disabled-dark: rgb(35 35 37);
21
+
22
+ /* Text Colors — using opaque values so icon strokes render solidly */
23
+ --color-text-primary: #212121;
24
+ --color-text-secondary: #757575;
25
+ --color-text-disabled: #9e9e9e;
26
+ --color-text-primary-dark: #ffffff;
27
+ --color-text-secondary-dark: #a0a0a9;
28
+ --color-text-disabled-dark: #757580;
29
+
30
+ /* Surface Colors */
31
+ --color-surface-50: #fafafa;
32
+ --color-surface-100: #f5f5f5;
33
+ --color-surface-200: #e5e5e5;
34
+ --color-surface-300: #d4d4d4;
35
+ --color-surface-400: #a3a3a3;
36
+ --color-surface-500: #737373;
37
+ --color-surface-600: #404040;
38
+ --color-surface-700: #262626;
39
+ --color-surface-800: #111111;
40
+ --color-surface-900: #0a0a0a;
41
+ --color-surface-950: #000000;
42
+
43
+ /* Surface Accent Colors */
44
+ --color-surface-accent-50: #f8fafc;
45
+ --color-surface-accent-100: #f1f5f9;
46
+ --color-surface-accent-200: #e2e8f0;
47
+ --color-surface-accent-300: #cbd5e1;
48
+ --color-surface-accent-400: #94a3b8;
49
+ --color-surface-accent-500: #64748b;
50
+ --color-surface-accent-600: #475569;
51
+ --color-surface-accent-700: #334155;
52
+ --color-surface-accent-800: #1e293b;
53
+ --color-surface-accent-900: #172033;
54
+ --color-surface-accent-950: #0f172a;
55
+ }
56
+
57
+ /* Chrome, Safari and Opera */
58
+ .no-scrollbar::-webkit-scrollbar {
59
+ display: none;
60
+ }
61
+
62
+ .no-scrollbar {
63
+ -ms-overflow-style: none; /* IE and Edge */
64
+ scrollbar-width: none; /* Firefox */
65
+ }
66
+
67
+ .typography-h1 {
68
+ @apply text-4xl font-headers font-semibold tracking-tight;
69
+ }
70
+
71
+ .typography-h2 {
72
+ @apply text-3xl font-headers font-semibold tracking-tight;
73
+ }
74
+
75
+ .typography-h3 {
76
+ @apply text-2xl font-headers font-semibold tracking-tight;
77
+ }
78
+
79
+ .typography-h4 {
80
+ @apply text-xl font-headers font-semibold tracking-[-0.01em];
81
+ }
82
+
83
+ .typography-h5 {
84
+ @apply text-lg font-headers font-semibold tracking-[-0.01em];
85
+ }
86
+
87
+ .typography-h6 {
88
+ @apply text-base font-headers font-semibold tracking-[-0.01em];
89
+ }
90
+
91
+ .typography-subtitle1 {
92
+ @apply text-sm font-headers font-semibold tracking-[-0.01em];
93
+ }
94
+
95
+ .typography-subtitle2 {
96
+ @apply text-sm font-headers font-medium;
97
+ }
98
+
99
+ .typography-body1 {
100
+ @apply text-sm;
101
+ }
102
+
103
+ .typography-body2 {
104
+ @apply text-xs;
105
+ }
106
+
107
+ .typography-caption {
108
+ @apply text-[11px] leading-[1.4];
109
+ }
110
+
111
+ .typography-label {
112
+ @apply text-xs font-medium tracking-wide;
113
+ }
114
+
115
+ .typography-inherit {
116
+ @apply text-inherit;
117
+ }
118
+
119
+ .typography-button {
120
+ @apply text-sm font-semibold tracking-wide;
121
+ }
122
+
123
+ :focus-visible {
124
+ @apply outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-0 focus-visible:ring-offset-transparent
125
+ }
126
+
package/dist/styles.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  export declare const focusedDisabled = "focus-visible:ring-0 focus-visible:ring-offset-0";
2
2
  export declare 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 declare 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 declare 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 declare 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 declare 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 declare 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 declare const defaultBorderMixin = "border-surface-200/60 dark:border-surface-700/60 ";
9
- export declare const paperMixin = "bg-white rounded-md dark:bg-surface-800 border border-surface-200/60 dark:border-surface-700/60";
10
- export declare 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 declare 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 declare 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 declare const fieldBackgroundMixin = "bg-surface-accent-200/50 dark:bg-black/30";
5
+ export declare const fieldBackgroundInvisibleMixin = "bg-surface-accent-200/0 dark:bg-black/0";
6
+ export declare const fieldBackgroundDisabledMixin = "bg-surface-accent-200/50 dark:bg-black/20";
7
+ export declare const fieldBackgroundHoverMixin = "hover:bg-surface-accent-200/70 hover:dark:bg-black/50";
8
+ export declare const defaultBorderMixin = "border-surface-200 dark:border-surface-700 ";
9
+ export declare const paperMixin = "bg-white rounded-lg dark:bg-surface-900 border border-surface-200 dark:border-surface-700";
10
+ export declare const cardMixin = "bg-white dark:bg-surface-900 rounded-lg border border-surface-200 dark:border-surface-700";
11
+ export declare const cardClickableMixin = "hover:bg-primary/5 dark:hover:bg-primary/5 cursor-pointer transition-colors duration-150";
12
12
  export declare const cardSelectedMixin = "bg-primary-bg/30 dark:bg-primary-bg/10 ring-1 ring-primary/75";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rebasepro/ui",
3
3
  "type": "module",
4
- "version": "0.5.0",
4
+ "version": "0.6.1",
5
5
  "description": "Awesome Firebase/Firestore-based headless open-source CMS",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/rebaseco"
@@ -46,31 +46,31 @@
46
46
  "@dnd-kit/core": "^6.3.1",
47
47
  "@dnd-kit/sortable": "^10.0.0",
48
48
  "@dnd-kit/utilities": "^3.2.2",
49
- "@radix-ui/react-checkbox": "^1.3.3",
50
- "@radix-ui/react-collapsible": "^1.1.12",
51
- "@radix-ui/react-dialog": "^1.1.15",
52
- "@radix-ui/react-dropdown-menu": "^2.1.16",
53
- "@radix-ui/react-label": "^2.1.8",
54
- "@radix-ui/react-menubar": "^1.1.16",
55
- "@radix-ui/react-popover": "^1.1.15",
56
- "@radix-ui/react-portal": "^1.1.10",
57
- "@radix-ui/react-radio-group": "^1.3.8",
58
- "@radix-ui/react-select": "^2.2.6",
59
- "@radix-ui/react-separator": "^1.1.8",
60
- "@radix-ui/react-slider": "^1.3.6",
61
- "@radix-ui/react-slot": "^1.2.4",
62
- "@radix-ui/react-tabs": "^1.1.13",
63
- "@radix-ui/react-tooltip": "^1.2.8",
64
- "@radix-ui/react-visually-hidden": "^1.2.4",
49
+ "@radix-ui/react-checkbox": "^1.3.4",
50
+ "@radix-ui/react-collapsible": "^1.1.13",
51
+ "@radix-ui/react-dialog": "^1.1.16",
52
+ "@radix-ui/react-dropdown-menu": "^2.1.17",
53
+ "@radix-ui/react-label": "^2.1.9",
54
+ "@radix-ui/react-menubar": "^1.1.17",
55
+ "@radix-ui/react-popover": "^1.1.16",
56
+ "@radix-ui/react-portal": "^1.1.11",
57
+ "@radix-ui/react-radio-group": "^1.4.0",
58
+ "@radix-ui/react-select": "^2.3.0",
59
+ "@radix-ui/react-separator": "^1.1.9",
60
+ "@radix-ui/react-slider": "^1.4.0",
61
+ "@radix-ui/react-slot": "^1.2.5",
62
+ "@radix-ui/react-tabs": "^1.1.14",
63
+ "@radix-ui/react-tooltip": "^1.2.9",
64
+ "@radix-ui/react-visually-hidden": "^1.2.5",
65
65
  "clsx": "^2.1.1",
66
66
  "cmdk": "^1.1.1",
67
67
  "fast-equals": "6.0.0",
68
- "lucide-react": "1.14.0",
69
- "markdown-it": "^14.1.1",
70
- "tailwind-merge": "^2.6.1",
71
- "react-dropzone": "^14.4.1",
68
+ "lucide-react": "1.18.0",
69
+ "markdown-it": "^14.2.0",
70
+ "react-dropzone": "^15.0.0",
72
71
  "react-use-measure": "^2.1.7",
73
- "react-window": "^1.8.11"
72
+ "react-window": "^1.8.11",
73
+ "tailwind-merge": "^3.6.0"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "react": ">=19.0.0",
@@ -81,24 +81,25 @@
81
81
  "@testing-library/jest-dom": "^6.9.1",
82
82
  "@testing-library/react": "^16.3.2",
83
83
  "@testing-library/user-event": "^14.6.1",
84
- "@types/jest": "^29.5.14",
84
+ "@types/jest": "^30.0.0",
85
85
  "@types/markdown-it": "^14.1.2",
86
- "@types/node": "^20.19.41",
86
+ "@types/node": "^25.9.3",
87
87
  "@types/object-hash": "^3.0.6",
88
- "@types/react": "^19.2.15",
88
+ "@types/react": "^19.2.17",
89
89
  "@types/react-dom": "^19.2.3",
90
90
  "@types/react-measure": "^2.0.12",
91
- "@vitejs/plugin-react": "^4.7.0",
91
+ "@types/react-window": "^1.8.8",
92
+ "@vitejs/plugin-react": "^6.0.2",
92
93
  "babel-plugin-react-compiler": "beta",
93
- "cross-env": "^7.0.3",
94
- "jest": "^29.7.0",
94
+ "cross-env": "^10.1.0",
95
+ "jest": "^30.4.2",
95
96
  "rollup-preserve-directives": "^1.1.3",
96
- "tailwindcss": "^4.3.0",
97
- "ts-jest": "^29.4.10",
98
- "tsd": "^0.31.2",
99
- "typescript": "^5.9.3",
100
- "vite": "^7.3.3",
101
- "vite-plugin-static-copy": "^3.4.0"
97
+ "tailwindcss": "^4.3.1",
98
+ "ts-jest": "^29.4.11",
99
+ "tsd": "^0.33.0",
100
+ "typescript": "^6.0.3",
101
+ "vite": "^8.0.16",
102
+ "vite-plugin-static-copy": "^4.1.1"
102
103
  },
103
104
  "files": [
104
105
  "dist",
@@ -111,7 +112,7 @@
111
112
  },
112
113
  "scripts": {
113
114
  "watch": "vite build --watch",
114
- "build": "rm -rf dist || true && vite build && tsc --emitDeclarationOnly -p tsconfig.prod.json",
115
+ "build": "rm -rf dist || true && vite build && cp dist/src/index.css dist/index.css 2>/dev/null; tsc --emitDeclarationOnly -p tsconfig.prod.json",
115
116
  "test:lint": "eslint \"src/**\" --quiet",
116
117
  "test": "jest --passWithNoTests",
117
118
  "clean": "rm -rf dist && find ./src -name '*.js' -type f | xargs rm -f",
@@ -58,7 +58,7 @@ export const Alert: React.FC<AlertProps> = ({
58
58
  getSizeClasses(size),
59
59
  "w-full",
60
60
  "font-medium",
61
- "rounded-md flex items-center gap-2",
61
+ "rounded-lg flex items-center gap-2",
62
62
  classes,
63
63
  outerClassName)}>
64
64
  <div className={cls("grow", className)}>{children}</div>
@@ -69,7 +69,7 @@ export const BooleanSwitchWithLabel = function BooleanSwitchWithLabel({
69
69
  !invisible && fieldBackgroundMixin,
70
70
  !invisible && (disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin),
71
71
  disabled ? "cursor-default" : "cursor-pointer",
72
- "rounded-md max-w-full justify-between box-border relative inline-flex items-center",
72
+ "rounded-lg max-w-full justify-between box-border relative inline-flex items-center",
73
73
  !invisible && focus && !disabled ? focusedClasses : "",
74
74
  error ? "text-red-500 dark:text-red-600" : (focus && !disabled ? "text-primary" : (!disabled ? "text-text-primary dark:text-text-primary-dark" : "text-text-secondary dark:text-text-secondary-dark")),
75
75
  {
@@ -32,17 +32,17 @@ const ButtonInner = React.memo(React.forwardRef<
32
32
  }: ButtonProps<React.ElementType>, ref) => {
33
33
 
34
34
  const baseClasses =
35
- "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]";
35
+ "typography-button h-fit rounded-lg whitespace-nowrap inline-flex items-center justify-center p-2 px-4 focus:outline-none transition-colors ease-in-out duration-150 gap-2";
36
36
 
37
37
  const buttonClasses = cls({
38
38
  "w-full": fullWidth,
39
39
  "w-fit": !fullWidth,
40
40
 
41
41
  // Filled Variants
42
- "border border-primary bg-primary focus:ring-primary shadow-sm hover:shadow-md hover:brightness-110 text-white hover:text-white": variant === "filled" && color === "primary" && !disabled,
43
- "border border-secondary bg-secondary focus:ring-secondary shadow-sm hover:shadow-md hover:brightness-110 text-white hover:text-white": variant === "filled" && color === "secondary" && !disabled,
44
- "border border-red-500 bg-red-500 hover:bg-red-600 focus:ring-red-500 shadow-sm hover:shadow-md text-white hover:text-white": variant === "filled" && color === "error" && !disabled,
45
- "border border-surface-accent-200 bg-surface-accent-200 hover:bg-surface-accent-300 focus:ring-surface-accent-400 shadow-sm hover:shadow-md text-text-primary hover:text-text-primary dark:border-surface-accent-700 dark:bg-surface-accent-700 dark:hover:bg-surface-accent-600 dark:text-text-primary-dark hover:dark:text-text-primary-dark": variant === "filled" && color === "text" && !disabled,
42
+ "border border-primary bg-primary focus:ring-primary text-white hover:text-white hover:brightness-105": variant === "filled" && color === "primary" && !disabled,
43
+ "border border-secondary bg-secondary focus:ring-secondary text-white hover:text-white hover:brightness-105": variant === "filled" && color === "secondary" && !disabled,
44
+ "border border-red-500 bg-red-500 hover:bg-red-600 focus:ring-red-500 text-white hover:text-white": variant === "filled" && color === "error" && !disabled,
45
+ "border border-surface-accent-200 bg-surface-accent-200 hover:bg-surface-accent-300 focus:ring-surface-accent-400 text-text-primary hover:text-text-primary dark:border-surface-accent-700 dark:bg-surface-accent-700 dark:hover:bg-surface-accent-600 dark:text-text-primary-dark hover:dark:text-text-primary-dark": variant === "filled" && color === "text" && !disabled,
46
46
  "border border-transparent bg-surface-100 hover:bg-surface-accent-200 text-text-primary dark:bg-surface-700 dark:hover:bg-surface-accent-700 dark:text-text-primary-dark hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark": variant === "filled" && color === "neutral" && !disabled,
47
47
 
48
48
  // Text Variants
@@ -25,10 +25,10 @@ export interface ChipProps {
25
25
  }
26
26
 
27
27
  const sizeClassNames = {
28
- smallest: "px-1.5 text-xs",
29
- small: "px-2 py-0.5 text-sm",
30
- medium: "px-3 py-1 text-sm",
31
- large: "px-4 py-1.5 text-sm"
28
+ smallest: "px-1.5 py-px text-[10px]",
29
+ small: "px-2 py-0.5 text-xs",
30
+ medium: "px-2.5 py-0.5 text-xs",
31
+ large: "px-3 py-1 text-xs"
32
32
  }
33
33
 
34
34
  /**
@@ -40,6 +40,21 @@ function isDarkMode(): boolean {
40
40
  document.documentElement.classList.contains("dark");
41
41
  }
42
42
 
43
+ /**
44
+ * Helper to generate rgba from hex or standard colors.
45
+ */
46
+ function getRgba(hex: string, alpha: number): string {
47
+ if (!hex || !hex.startsWith("#")) return hex;
48
+ let color = hex.slice(1);
49
+ if (color.length === 3) {
50
+ color = color[0] + color[0] + color[1] + color[1] + color[2] + color[2];
51
+ }
52
+ const r = parseInt(color.slice(0, 2), 16);
53
+ const g = parseInt(color.slice(2, 4), 16);
54
+ const b = parseInt(color.slice(4, 6), 16);
55
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`;
56
+ }
57
+
43
58
  /**
44
59
  * @group Preview components
45
60
  */
@@ -50,28 +65,15 @@ export function Chip({
50
65
  outlined,
51
66
  onClick,
52
67
  icon,
53
- size = "large",
68
+ size = "medium",
54
69
  className,
55
70
  style
56
71
  }: ChipProps) {
57
72
 
58
73
  const usedColorScheme = typeof colorScheme === "string" ? getColorSchemeForKey(colorScheme) : colorScheme;
59
-
60
- // Resolve theme-aware colors
61
74
  const dark = isDarkMode();
62
75
 
63
- // Helper to generate rgba from hex or standard colors
64
- const getRgba = (hex: string, alpha: number): string => {
65
- if (!hex || !hex.startsWith("#")) return hex;
66
- let color = hex.slice(1);
67
- if (color.length === 3) {
68
- color = color[0] + color[0] + color[1] + color[1] + color[2] + color[2];
69
- }
70
- const r = parseInt(color.slice(0, 2), 16);
71
- const g = parseInt(color.slice(2, 4), 16);
72
- const b = parseInt(color.slice(4, 6), 16);
73
- return `rgba(${r}, ${g}, ${b}, ${alpha})`;
74
- };
76
+ const hasScheme = error || usedColorScheme;
75
77
 
76
78
  let textColor = "";
77
79
  let bgColor = "";
@@ -81,44 +83,44 @@ export function Chip({
81
83
  textColor = dark ? "#f87171" : "#dc2626";
82
84
  } else if (usedColorScheme) {
83
85
  textColor = dark && usedColorScheme.darkText ? usedColorScheme.darkText : usedColorScheme.text;
84
- } else {
85
- textColor = dark ? "#d4d4d4" : "#404040";
86
86
  }
87
87
 
88
- if (outlined) {
89
- bgColor = getRgba(textColor, dark ? 0.12 : 0.06);
90
- border = `1px solid ${getRgba(textColor, dark ? 0.25 : 0.18)}`;
91
- } else {
92
- if (error) {
93
- bgColor = dark ? "rgba(220, 38, 38, 0.2)" : "rgba(239, 68, 68, 0.15)";
94
- border = `1px solid ${dark ? "rgba(220, 38, 38, 0.4)" : "rgba(239, 68, 68, 0.3)"}`;
88
+ if (hasScheme) {
89
+ if (outlined) {
90
+ bgColor = getRgba(textColor, dark ? 0.1 : 0.06);
91
+ border = `1px solid ${getRgba(textColor, dark ? 0.2 : 0.14)}`;
92
+ } else if (error) {
93
+ bgColor = dark ? "rgba(220, 38, 38, 0.15)" : "rgba(239, 68, 68, 0.1)";
94
+ border = `1px solid ${dark ? "rgba(220, 38, 38, 0.3)" : "rgba(239, 68, 68, 0.2)"}`;
95
95
  } else if (usedColorScheme) {
96
96
  bgColor = dark && usedColorScheme.darkColor ? usedColorScheme.darkColor : usedColorScheme.color;
97
- } else {
98
- bgColor = dark ? "#1f1f1f" : "#f4f4f5";
99
- border = `1px solid ${dark ? "#2e2e30" : "#e4e4e7"}`;
100
97
  }
101
98
  }
102
99
 
103
100
  return (
104
101
  <div
105
- className={cls("rounded-lg max-w-full w-max h-fit font-regular inline-flex gap-1",
102
+ className={cls("rounded-lg max-w-full w-max h-fit font-medium inline-flex gap-1",
106
103
  "text-ellipsis",
107
104
  "items-center",
108
- onClick ? "cursor-pointer hover:bg-surface-accent-300 dark:hover:bg-surface-accent-700" : "",
105
+ "transition-colors duration-150",
106
+ !hasScheme && "bg-surface-100 dark:bg-surface-800 text-text-secondary dark:text-text-secondary-dark border border-surface-200 dark:border-surface-700",
107
+ !hasScheme && outlined && "bg-transparent dark:bg-transparent",
108
+ onClick ? "cursor-pointer hover:bg-primary/5 dark:hover:bg-primary/5" : "",
109
109
  sizeClassNames[size],
110
110
  className)}
111
111
  onClick={onClick}
112
112
  style={{
113
- backgroundColor: bgColor,
114
- color: textColor,
115
- border: border || undefined,
113
+ ...(hasScheme ? {
114
+ backgroundColor: bgColor,
115
+ color: textColor,
116
+ border: border || undefined,
117
+ } : {}),
116
118
  overflow: "hidden",
117
119
  ...style
118
120
  }}
119
121
  >
120
- {children}
121
122
  {icon}
123
+ {children}
122
124
  </div>
123
125
  );
124
126
  }
@@ -225,7 +225,7 @@ hour12: false,
225
225
  <style>{inputStyles}</style>
226
226
  <div
227
227
  className={cls(
228
- "rounded-md relative max-w-full",
228
+ "rounded-lg relative max-w-full",
229
229
  !invisible && fieldBackgroundMixin,
230
230
  disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
231
231
  {
@@ -272,7 +272,7 @@ hour12: false,
272
272
  className={cls(
273
273
  "w-full outline-hidden bg-transparent leading-normal text-base px-3",
274
274
  clearable ? "pr-14" : "pr-12",
275
- "rounded-md",
275
+ "rounded-lg",
276
276
  {
277
277
  "min-h-[28px]": size === "smallest",
278
278
  "min-h-[32px]": size === "small",
@@ -26,6 +26,7 @@ export type DialogProps = {
26
26
  */
27
27
  disableInitialFocus?: boolean;
28
28
  portalContainer?: HTMLElement | null;
29
+ "aria-describedby"?: string;
29
30
  };
30
31
 
31
32
  const widthClasses = {
@@ -60,7 +61,8 @@ export const Dialog = ({
60
61
  onPointerDownOutside,
61
62
  onInteractOutside,
62
63
  disableInitialFocus = true,
63
- portalContainer
64
+ portalContainer,
65
+ "aria-describedby": ariaDescribedby
64
66
  }: DialogProps) => {
65
67
  const [displayed, setDisplayed] = useState(false);
66
68
 
@@ -92,7 +94,7 @@ export const Dialog = ({
92
94
  <div className={cls("fixed inset-0 z-50", containerClassName)}>
93
95
 
94
96
  <DialogPrimitive.Overlay
95
- className={cls("fixed inset-0 transition-opacity ease-in-out duration-200 bg-black dark:bg-opacity-60 dark:bg-black/60 bg-opacity-50 bg-black/50 backdrop-blur-sm",
97
+ className={cls("fixed inset-0 transition-opacity ease-in-out duration-200 bg-black/50 dark:bg-black/60 backdrop-blur-sm",
96
98
  displayed && open ? "opacity-100" : "opacity-0",
97
99
  "z-50 fixed top-0 left-0 w-full h-full flex justify-center items-center"
98
100
  )}
@@ -111,7 +113,8 @@ export const Dialog = ({
111
113
  }}
112
114
  onPointerDownOutside={onPointerDownOutside}
113
115
  onInteractOutside={onInteractOutside}
114
- className={cls("h-full outline-none flex justify-center items-center z-60 opacity-100 transition-all duration-200 ease-in-out")}
116
+ aria-describedby={ariaDescribedby}
117
+ className={cls("relative h-full outline-none flex justify-center items-center z-60 opacity-100 transition-all duration-200 ease-in-out")}
115
118
  >
116
119
  <div
117
120
  className={cls(paperMixin,
@@ -124,7 +127,7 @@ export const Dialog = ({
124
127
  fullHeight && !fullScreen ? "h-full" : undefined,
125
128
  "text-surface-accent-900 dark:text-white",
126
129
  "justify-center items-center",
127
- fullScreen ? "h-screen w-screen" : "max-h-[90vh] shadow-xl",
130
+ fullScreen ? "h-screen w-screen" : "max-h-[90vh] shadow-lg",
128
131
  "ease-in-out duration-200",
129
132
  scrollable && "overflow-y-auto",
130
133
  displayed && open ? "opacity-100 scale-100" : "opacity-0 scale-[0.97]",
@@ -48,7 +48,8 @@ interface ErrorBoundaryState {
48
48
  export class ErrorBoundary extends React.Component<PropsWithChildren<ErrorBoundaryProps>, ErrorBoundaryState> {
49
49
  constructor(props: PropsWithChildren<ErrorBoundaryProps>) {
50
50
  super(props);
51
- this.state = { error: null, showDetails: false };
51
+ this.state = { error: null,
52
+ showDetails: false };
52
53
  }
53
54
 
54
55
  static getDerivedStateFromError(error: Error) {
@@ -60,7 +61,8 @@ export class ErrorBoundary extends React.Component<PropsWithChildren<ErrorBounda
60
61
  }
61
62
 
62
63
  private handleReset = () => {
63
- this.setState({ error: null, showDetails: false });
64
+ this.setState({ error: null,
65
+ showDetails: false });
64
66
  this.props.onReset?.();
65
67
  };
66
68
 
@@ -82,7 +82,7 @@ export function ExpandablePanel({
82
82
  <Collapsible.Root
83
83
  className={cls(
84
84
  !invisible && defaultBorderMixin + " border",
85
- "rounded-md",
85
+ "rounded-lg",
86
86
  "w-full",
87
87
  className
88
88
  )}
@@ -70,7 +70,7 @@ export function FileUpload({
70
70
  className={cls(
71
71
  fieldBackgroundMixin,
72
72
  "flex gap-2",
73
- "p-4 box-border relative items-center border-2 border-solid border-transparent outline-hidden rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid",
73
+ "p-4 box-border relative items-center border-2 border-solid border-transparent outline-hidden rounded-lg duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid",
74
74
  {
75
75
  "h-44": size === "large",
76
76
  "h-28": size === "medium",
@@ -58,14 +58,14 @@ export const FilterChip = React.forwardRef<HTMLButtonElement, FilterChipProps>(f
58
58
  className={cls(
59
59
  "inline-flex items-center gap-1 rounded-full",
60
60
  "font-medium whitespace-nowrap select-none shrink-0",
61
- "transition-all duration-150",
61
+ "transition-colors duration-150",
62
62
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50",
63
63
  sizeClasses[size],
64
64
  active
65
65
  ? "bg-primary/12 text-primary dark:bg-primary/20 dark:text-primary shadow-[inset_0_0_0_1.5px_var(--color-primary)]"
66
66
  : cls(
67
67
  "bg-surface-accent-100 text-text-secondary dark:bg-surface-accent-800 dark:text-text-secondary-dark",
68
- !disabled && "cursor-pointer hover:bg-surface-accent-200 dark:hover:bg-surface-accent-700"
68
+ !disabled && "cursor-pointer hover:bg-primary/5 dark:hover:bg-primary/5"
69
69
  ),
70
70
  disabled && "opacity-50 cursor-not-allowed",
71
71
  className
@@ -21,7 +21,7 @@ const colorClasses = "text-surface-accent-500 visited:text-surface-accent-500 da
21
21
  const sizeClasses = {
22
22
  medium: "w-10 !h-10 min-w-10 min-h-10",
23
23
  small: "w-8 !h-8 min-w-8 min-h-8",
24
- smallest: "w-6 !h-6 min-w-6 min-h-6",
24
+ smallest: "w-7 !h-7 min-w-7 min-h-7",
25
25
  large: "w-12 !h-12 min-w-12 min-h-12"
26
26
  }
27
27
  const shapeClasses = {
@@ -235,7 +235,7 @@ export const MultiSelect = React.forwardRef<
235
235
  "px-2": size === "small" || size === "smallest",
236
236
  "px-4": size === "medium" || size === "large"
237
237
  },
238
- "select-none rounded-md text-sm",
238
+ "select-none rounded-lg text-sm",
239
239
  "focus:ring-0 focus-visible:ring-0 outline-none focus:outline-none focus-visible:outline-none",
240
240
  invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin,
241
241
  disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
@@ -139,7 +139,7 @@ export const Select = forwardRef<HTMLDivElement, SelectProps>(({
139
139
  {...props}>
140
140
  {typeof label === "string" ? <SelectInputLabel error={error}>{label}</SelectInputLabel> : label}
141
141
  <div className={cls(
142
- "select-none rounded-md text-sm",
142
+ "select-none rounded-lg text-sm",
143
143
  invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin,
144
144
  disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
145
145
  "relative flex items-center",
@@ -169,7 +169,7 @@ export const Select = forwardRef<HTMLDivElement, SelectProps>(({
169
169
  } : "",
170
170
  "outline-hidden focus:outline-hidden",
171
171
  "outline-none focus:outline-none",
172
- "select-none rounded-md text-sm",
172
+ "select-none rounded-lg text-sm",
173
173
  error ? "text-red-500 dark:text-red-600" : "focus:text-text-primary dark:focus:text-text-primary-dark",
174
174
  error ? "border border-red-500 dark:border-red-600" : "",
175
175
  disabled ? "text-surface-accent-600 dark:text-surface-accent-400" : "text-surface-accent-800 dark:text-white",