@rebasepro/ui 0.0.1-canary.eae7889 → 0.1.0
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.
- package/dist/components/FileUpload.d.ts +1 -1
- package/dist/components/SearchBar.d.ts +5 -1
- package/dist/index.css +1 -0
- package/dist/index.es.js +89 -77
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +89 -77
- package/dist/index.umd.js.map +1 -1
- package/dist/styles.d.ts +2 -2
- package/package.json +3 -4
- package/src/components/Alert.tsx +5 -5
- package/src/components/BooleanSwitch.tsx +3 -3
- package/src/components/Button.tsx +10 -10
- package/src/components/Checkbox.tsx +1 -1
- package/src/components/DateTimeField.tsx +1 -1
- package/src/components/Dialog.tsx +2 -2
- package/src/components/ExpandablePanel.tsx +1 -1
- package/src/components/FileUpload.tsx +1 -1
- package/src/components/IconButton.tsx +1 -1
- package/src/components/SearchBar.tsx +8 -3
- package/src/components/Select.tsx +1 -1
- package/src/components/Separator.tsx +2 -2
- package/src/components/Skeleton.tsx +2 -2
- package/src/components/Tabs.tsx +1 -1
- package/src/components/ToggleButtonGroup.tsx +1 -1
- package/src/components/Tooltip.tsx +1 -1
- package/src/components/VirtualTable/VirtualTable.tsx +6 -4
- package/src/index.css +1 -0
- package/src/styles.ts +2 -2
package/dist/styles.d.ts
CHANGED
|
@@ -7,6 +7,6 @@ export declare const fieldBackgroundDisabledMixin = "dark:bg-surface-900 bg-opac
|
|
|
7
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
8
|
export declare const defaultBorderMixin = "border-surface-200/60 dark:border-surface-700/60 ";
|
|
9
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-
|
|
11
|
-
export declare const cardClickableMixin = "hover:bg-surface-accent-100 dark:hover:bg-surface-800 hover:ring-
|
|
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";
|
|
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.
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"description": "Awesome Firebase/Firestore-based headless open-source CMS",
|
|
6
6
|
"funding": {
|
|
7
7
|
"url": "https://github.com/sponsors/rebaseco"
|
|
@@ -62,14 +62,14 @@
|
|
|
62
62
|
"@radix-ui/react-visually-hidden": "^1.2.4",
|
|
63
63
|
"clsx": "^2.1.1",
|
|
64
64
|
"cmdk": "^1.1.1",
|
|
65
|
-
"fast-equals": "
|
|
65
|
+
"fast-equals": "6.0.0",
|
|
66
66
|
"lucide-react": "1.14.0",
|
|
67
67
|
"markdown-it": "^14.1.0",
|
|
68
68
|
"react-dropzone": "^14.3.8",
|
|
69
69
|
"react-use-measure": "^2.1.7",
|
|
70
70
|
"react-window": "^1.8.11",
|
|
71
71
|
"tailwind-merge": "^2.6.0",
|
|
72
|
-
"@rebasepro/types": "0.
|
|
72
|
+
"@rebasepro/types": "0.1.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"react": ">=19.0.0",
|
|
@@ -95,7 +95,6 @@
|
|
|
95
95
|
"rollup-preserve-directives": "^1.1.3",
|
|
96
96
|
"tailwindcss": "^4.1.3",
|
|
97
97
|
"ts-jest": "^29.4.5",
|
|
98
|
-
"ts-node": "^10.9.2",
|
|
99
98
|
"tsd": "^0.31.2",
|
|
100
99
|
"typescript": "^5.9.3",
|
|
101
100
|
"vite": "^7.2.4",
|
package/src/components/Alert.tsx
CHANGED
|
@@ -26,16 +26,16 @@ const getSizeClasses = (size: "small" | "medium" | "large") => {
|
|
|
26
26
|
const getColorClasses = (severity: string) => {
|
|
27
27
|
switch (severity) {
|
|
28
28
|
case "error":
|
|
29
|
-
return "bg-red-50 dark:bg-red-800 dark:text-red-100 text-red-900";
|
|
29
|
+
return "bg-red-50 dark:bg-red-800 dark:text-red-100 text-red-900 border-l-[3px] border-l-red-500";
|
|
30
30
|
case "warning":
|
|
31
|
-
return "bg-amber-50 dark:bg-amber-800 dark:text-amber-100 text-amber-900";
|
|
31
|
+
return "bg-amber-50 dark:bg-amber-800 dark:text-amber-100 text-amber-900 border-l-[3px] border-l-amber-500";
|
|
32
32
|
case "info":
|
|
33
|
-
return "bg-blue-100 dark:bg-blue-800 dark:text-blue-100 text-blue-900";
|
|
33
|
+
return "bg-blue-100 dark:bg-blue-800 dark:text-blue-100 text-blue-900 border-l-[3px] border-l-blue-500";
|
|
34
34
|
case "success":
|
|
35
|
-
return "bg-emerald-50 dark:bg-emerald-800 dark:text-emerald-100 text-emerald-900";
|
|
35
|
+
return "bg-emerald-50 dark:bg-emerald-800 dark:text-emerald-100 text-emerald-900 border-l-[3px] border-l-emerald-500";
|
|
36
36
|
case "base":
|
|
37
37
|
default:
|
|
38
|
-
return "bg-surface-accent-50 dark:bg-surface-accent-800 dark:text-white text-surface-accent-900";
|
|
38
|
+
return "bg-surface-accent-50 dark:bg-surface-accent-800 dark:text-white text-surface-accent-900 border-l-[3px] border-l-surface-accent-400";
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -56,7 +56,7 @@ export const BooleanSwitch = React.forwardRef(function BooleanSwitch({
|
|
|
56
56
|
{allowIndeterminate && (value === null || value === undefined) && <div
|
|
57
57
|
key={"knob"}
|
|
58
58
|
className={cls(
|
|
59
|
-
"block rounded-full transition-transform duration-100 transform will-change-auto",
|
|
59
|
+
"block rounded-full transition-transform duration-100 ease-out transform will-change-auto shadow-sm",
|
|
60
60
|
disabled ? "bg-surface-accent-400 dark:bg-surface-accent-600" : "bg-surface-accent-400 dark:bg-surface-accent-600",
|
|
61
61
|
{
|
|
62
62
|
"w-[21px] h-[10px]": size === "medium" || size === "large",
|
|
@@ -72,8 +72,8 @@ export const BooleanSwitch = React.forwardRef(function BooleanSwitch({
|
|
|
72
72
|
{!(allowIndeterminate && (value === null || value === undefined)) && <div
|
|
73
73
|
key={"knob"}
|
|
74
74
|
className={cls(
|
|
75
|
-
"block rounded-full transition-transform duration-100 transform will-change-auto",
|
|
76
|
-
disabled ? "bg-surface-accent-300 dark:bg-surface-
|
|
75
|
+
"block rounded-full transition-transform duration-100 ease-out transform will-change-auto shadow-sm",
|
|
76
|
+
disabled ? "bg-surface-accent-300 dark:bg-surface-700" : (value ? "bg-white shadow" : "bg-surface-accent-600 dark:bg-surface-accent-400"),
|
|
77
77
|
{
|
|
78
78
|
"w-[21px] h-[21px]": size === "medium" || size === "large",
|
|
79
79
|
"w-[19px] h-[19px]": size === "small",
|
|
@@ -32,32 +32,32 @@ const ButtonInner = React.memo(React.forwardRef<
|
|
|
32
32
|
}: ButtonProps<any>, 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 ease-in-out duration-150 gap-2";
|
|
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]";
|
|
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 hover:
|
|
43
|
-
"border border-secondary bg-secondary focus:ring-secondary shadow hover:
|
|
44
|
-
"border border-red-500 bg-red-500 hover:bg-red-
|
|
45
|
-
"border border-surface-accent-200 bg-surface-accent-200 hover:bg-surface-accent-300 focus:ring-surface-accent-400 shadow hover:
|
|
46
|
-
"border border-transparent bg-surface-100 hover:bg-surface-accent-200 text-text-primary dark:bg-surface-
|
|
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,
|
|
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
|
|
49
49
|
"border border-transparent text-primary hover:text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800": variant === "text" && color === "primary" && !disabled,
|
|
50
50
|
"border border-transparent text-secondary hover:text-secondary hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800": variant === "text" && color === "secondary" && !disabled,
|
|
51
51
|
"border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10 hover:bg-red-500/10": variant === "text" && color === "error" && !disabled,
|
|
52
|
-
"border border-transparent text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark hover:bg-surface-accent-200 hover:dark:bg-surface-
|
|
53
|
-
"border border-transparent text-text-primary hover:text-text-primary hover:bg-surface-accent-200 dark:text-text-primary-dark dark:hover:text-text-primary-dark dark:hover:bg-surface-accent-
|
|
52
|
+
"border border-transparent text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800": variant === "text" && color === "text" && !disabled,
|
|
53
|
+
"border border-transparent text-text-primary hover:text-text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:text-text-primary-dark dark:hover:text-text-primary-dark dark:hover:bg-surface-accent-800": variant === "text" && color === "neutral" && !disabled,
|
|
54
54
|
|
|
55
55
|
// Outlined Variants
|
|
56
56
|
"border border-primary text-primary hover:text-primary hover:bg-primary-bg hover:bg-primary/10": variant === "outlined" && color === "primary" && !disabled,
|
|
57
57
|
"border border-secondary text-secondary hover:text-secondary hover:bg-secondary-bg": variant === "outlined" && color === "secondary" && !disabled,
|
|
58
58
|
"border border-red-500 text-red-500 hover:text-red-500 hover:bg-red-500 hover:text-white": variant === "outlined" && color === "error" && !disabled,
|
|
59
|
-
"border border-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:bg-surface-accent-200": variant === "outlined" && color === "text" && !disabled,
|
|
60
|
-
"border border-surface-300 text-text-primary hover:bg-surface-accent-200 dark:border-surface-600 dark:text-text-primary-dark dark:hover:bg-surface-accent-
|
|
59
|
+
"border border-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark dark:border-surface-accent-600 hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800": variant === "outlined" && color === "text" && !disabled,
|
|
60
|
+
"border border-surface-300 text-text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:border-surface-600 dark:text-text-primary-dark dark:hover:bg-surface-accent-800": variant === "outlined" && color === "neutral" && !disabled,
|
|
61
61
|
|
|
62
62
|
// Disabled states for all variants
|
|
63
63
|
"text-text-disabled dark:text-text-disabled-dark": disabled,
|
|
@@ -89,7 +89,7 @@ export const Checkbox = React.memo(({
|
|
|
89
89
|
(indeterminate || isChecked) ? "text-surface-accent-100 dark:text-surface-accent-900" : "",
|
|
90
90
|
disabled
|
|
91
91
|
? "border-transparent"
|
|
92
|
-
: (indeterminate || isChecked ? "border-transparent" : "border-surface-accent-800 dark:border-surface-accent-
|
|
92
|
+
: (indeterminate || isChecked ? "border-transparent" : "border-surface-accent-800 dark:border-surface-accent-500")
|
|
93
93
|
)}>
|
|
94
94
|
<CheckboxPrimitive.Indicator asChild>
|
|
95
95
|
{indeterminate
|
|
@@ -92,7 +92,7 @@ export const Dialog = ({
|
|
|
92
92
|
<div className={cls("fixed inset-0 z-50", containerClassName)}>
|
|
93
93
|
|
|
94
94
|
<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
|
|
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",
|
|
96
96
|
displayed && open ? "opacity-100" : "opacity-0",
|
|
97
97
|
"z-50 fixed top-0 left-0 w-full h-full flex justify-center items-center"
|
|
98
98
|
)}
|
|
@@ -127,7 +127,7 @@ export const Dialog = ({
|
|
|
127
127
|
fullScreen ? "h-screen w-screen" : "max-h-[90vh] shadow-xl",
|
|
128
128
|
"ease-in-out duration-200",
|
|
129
129
|
scrollable && "overflow-y-auto",
|
|
130
|
-
displayed && open ? "opacity-100" : "opacity-0",
|
|
130
|
+
displayed && open ? "opacity-100 scale-100" : "opacity-0 scale-[0.97]",
|
|
131
131
|
maxWidth && !fullScreen ? widthClasses[maxWidth] : undefined,
|
|
132
132
|
className
|
|
133
133
|
)}>
|
|
@@ -96,7 +96,7 @@ export function ExpandablePanel({
|
|
|
96
96
|
<div
|
|
97
97
|
className={cls(
|
|
98
98
|
"rounded-t flex items-center justify-between w-full min-h-[52px]",
|
|
99
|
-
"hover:bg-surface-accent-200 hover:bg-opacity-40 hover:bg-surface-accent-200/40 dark:hover:bg-surface-800 dark:hover:bg-opacity-40 dark:hover:bg-surface-800/40",
|
|
99
|
+
"hover:bg-surface-accent-200 hover:bg-opacity-40 hover:bg-surface-accent-200/40 dark:hover:bg-surface-800 dark:hover:bg-opacity-40 dark:hover:bg-surface-800/40 active:bg-surface-accent-300/50 dark:active:bg-surface-700/50",
|
|
100
100
|
invisible ? "border-b px-2" : "p-4",
|
|
101
101
|
open ? "py-6" : "py-4",
|
|
102
102
|
"transition-all duration-200",
|
|
@@ -19,7 +19,7 @@ export type OnFilesUploadAdded = (files: File[]) => void;
|
|
|
19
19
|
|
|
20
20
|
export type FileUploadProps = {
|
|
21
21
|
// e.g. accept={{ "*/image": [] }}
|
|
22
|
-
accept
|
|
22
|
+
accept?: Record<string, string[]>,
|
|
23
23
|
onFilesAdded: OnFilesUploadAdded,
|
|
24
24
|
onFilesRejected?: OnFileUploadRejected,
|
|
25
25
|
maxSize?: number,
|
|
@@ -15,7 +15,7 @@ export type IconButtonProps<C extends React.ElementType> =
|
|
|
15
15
|
"aria-label"?: string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
const buttonClasses = "hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800 hover:scale-
|
|
18
|
+
const buttonClasses = "hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800 hover:scale-[1.04] active:scale-95 transition-transform";
|
|
19
19
|
const baseClasses = "inline-flex items-center justify-center p-2 text-sm font-medium focus:outline-none transition-colors ease-in-out duration-150";
|
|
20
20
|
const colorClasses = "text-surface-accent-500 visited:text-surface-accent-500 dark:text-surface-accent-300 dark:visited:text-surface-300";
|
|
21
21
|
const sizeClasses = {
|
|
@@ -28,6 +28,10 @@ interface SearchBarProps {
|
|
|
28
28
|
disabled?: boolean;
|
|
29
29
|
loading?: boolean;
|
|
30
30
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
31
|
+
/**
|
|
32
|
+
* Optional initial value for the search input, e.g. from URL params.
|
|
33
|
+
*/
|
|
34
|
+
initialValue?: string;
|
|
31
35
|
}
|
|
32
36
|
|
|
33
37
|
export function SearchBar({
|
|
@@ -41,10 +45,11 @@ export function SearchBar({
|
|
|
41
45
|
autoFocus,
|
|
42
46
|
disabled,
|
|
43
47
|
loading,
|
|
44
|
-
inputRef
|
|
48
|
+
inputRef,
|
|
49
|
+
initialValue
|
|
45
50
|
}: SearchBarProps) {
|
|
46
51
|
|
|
47
|
-
const [searchText, setSearchText] = useState<string>("");
|
|
52
|
+
const [searchText, setSearchText] = useState<string>(initialValue ?? "");
|
|
48
53
|
const [active, setActive] = useState<boolean>(false);
|
|
49
54
|
|
|
50
55
|
const deferredValues = useDebounceValue(searchText, 200);
|
|
@@ -81,7 +86,7 @@ export function SearchBar({
|
|
|
81
86
|
heightClass,
|
|
82
87
|
"bg-surface-accent-50 dark:bg-surface-900 border",
|
|
83
88
|
defaultBorderMixin,
|
|
84
|
-
"focus-within:ring-
|
|
89
|
+
"focus-within:ring-1 focus-within:ring-primary/60 focus-within:border-primary focus-within:shadow-[0_0_0_3px_rgba(0,112,244,0.1)]",
|
|
85
90
|
"rounded-lg overflow-hidden",
|
|
86
91
|
className)}>
|
|
87
92
|
<div
|
|
@@ -237,7 +237,7 @@ export const Select = forwardRef<HTMLDivElement, SelectProps>(({
|
|
|
237
237
|
{/* Pass the calculated finalContainer */}
|
|
238
238
|
<SelectPrimitive.Portal container={finalContainer}>
|
|
239
239
|
<SelectPrimitive.Content position={position}
|
|
240
|
-
className={cls(focusedDisabled, "z-50 relative overflow-hidden border bg-white dark:bg-surface-800 p-2 rounded-lg", defaultBorderMixin)}>
|
|
240
|
+
className={cls(focusedDisabled, "z-50 relative overflow-hidden border bg-white dark:bg-surface-800 p-2 rounded-lg shadow-lg animate-in fade-in-0 zoom-in-95 duration-150", defaultBorderMixin)}>
|
|
241
241
|
<SelectPrimitive.Viewport className={cls("p-1", viewportClassName)}
|
|
242
242
|
style={{ maxHeight: "var(--radix-select-content-available-height)" }}>
|
|
243
243
|
{children}
|
|
@@ -15,12 +15,12 @@ export function Separator({
|
|
|
15
15
|
<SeparatorPrimitive.Root
|
|
16
16
|
decorative={decorative}
|
|
17
17
|
orientation="horizontal"
|
|
18
|
-
className={cls("dark:bg-
|
|
18
|
+
className={cls("dark:bg-surface-700 bg-surface-200 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px my-4", className)}/>
|
|
19
19
|
);
|
|
20
20
|
else
|
|
21
21
|
return (
|
|
22
22
|
<SeparatorPrimitive.Root
|
|
23
|
-
className={cls("dark:bg-
|
|
23
|
+
className={cls("dark:bg-surface-700 bg-surface-200 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px mx-4", className)}
|
|
24
24
|
decorative={decorative}
|
|
25
25
|
orientation="vertical"
|
|
26
26
|
/>
|
|
@@ -40,8 +40,8 @@ export function Skeleton({
|
|
|
40
40
|
className)
|
|
41
41
|
}>
|
|
42
42
|
<span
|
|
43
|
-
className="absolute inset-0 bg-gradient-to-r from-transparent via-white/
|
|
44
|
-
style={{ animation: "shimmer
|
|
43
|
+
className="absolute inset-0 bg-gradient-to-r from-transparent via-white/50 dark:via-white/8 to-transparent"
|
|
44
|
+
style={{ animation: "shimmer 1.8s ease-in-out infinite" }}
|
|
45
45
|
/>
|
|
46
46
|
</span>;
|
|
47
47
|
}
|
package/src/components/Tabs.tsx
CHANGED
|
@@ -161,7 +161,7 @@ export function Tab({
|
|
|
161
161
|
"inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-white transition-all",
|
|
162
162
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-surface-400 focus-visible:ring-offset-2",
|
|
163
163
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
164
|
-
variant === "standard" && "rounded-sm px-3 py-1.5 data-[state=active]:bg-white data-[state=active]:text-surface-900 dark:data-[state=active]:bg-surface-900 dark:data-[state=active]:text-surface-50",
|
|
164
|
+
variant === "standard" && "rounded-sm px-3 py-1.5 data-[state=active]:bg-white data-[state=active]:text-surface-900 data-[state=active]:shadow-sm dark:data-[state=active]:bg-surface-900 dark:data-[state=active]:text-surface-50",
|
|
165
165
|
variant === "boxy" && cls(
|
|
166
166
|
"flex-shrink-0 flex items-center gap-1.5 px-3.5 h-9 border-r border-surface-200 dark:border-surface-800 cursor-pointer text-[12px] font-medium transition-colors group relative box-border overflow-hidden",
|
|
167
167
|
"border-b-2 border-b-transparent",
|
|
@@ -55,7 +55,7 @@ export function ToggleButtonGroup<T extends string = string>({
|
|
|
55
55
|
className={cls(
|
|
56
56
|
"flex flex-row items-center justify-center gap-2 py-3 px-4 rounded-md transition-colors",
|
|
57
57
|
value === option.value
|
|
58
|
-
? "bg-white dark:bg-surface-900 text-primary dark:text-primary-300"
|
|
58
|
+
? "bg-white dark:bg-surface-900 text-primary dark:text-primary-300 shadow-sm"
|
|
59
59
|
: "text-surface-500 dark:text-surface-400 hover:bg-surface-100 dark:hover:bg-surface-700",
|
|
60
60
|
option.disabled && "opacity-50 cursor-not-allowed"
|
|
61
61
|
)}
|
|
@@ -65,7 +65,7 @@ export const Tooltip = ({
|
|
|
65
65
|
|
|
66
66
|
return (
|
|
67
67
|
<TooltipPrimitive.Provider delayDuration={delayDuration}>
|
|
68
|
-
<TooltipPrimitive.Root open
|
|
68
|
+
<TooltipPrimitive.Root {...(open !== undefined ? { open, onOpenChange } : {})} defaultOpen={defaultOpen}>
|
|
69
69
|
{trigger}
|
|
70
70
|
<TooltipPrimitive.Portal container={finalContainer}>
|
|
71
71
|
<TooltipPrimitive.Content
|
|
@@ -8,7 +8,7 @@ import { deepEqual as equal } from "fast-equals"
|
|
|
8
8
|
import { FixedSizeList as List } from "react-window";
|
|
9
9
|
import useMeasure from "react-use-measure";
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { CircularProgress } from "../CircularProgress";
|
|
12
12
|
import {
|
|
13
13
|
OnVirtualTableColumnResizeParams,
|
|
14
14
|
VirtualTableColumn,
|
|
@@ -74,7 +74,7 @@ const innerElementType = forwardRef<HTMLDivElement, InnerElementProps>(({
|
|
|
74
74
|
}}>
|
|
75
75
|
<div style={{ position: "sticky",
|
|
76
76
|
top: 0,
|
|
77
|
-
zIndex:
|
|
77
|
+
zIndex: 20 }}>
|
|
78
78
|
<VirtualTableHeaderRow {...virtualTableProps}/>
|
|
79
79
|
</div>
|
|
80
80
|
{!customView && children}
|
|
@@ -333,9 +333,11 @@ export const VirtualTable = React.memo<VirtualTableProps<any>>(
|
|
|
333
333
|
</CenteredView>
|
|
334
334
|
: (empty
|
|
335
335
|
? (loading
|
|
336
|
-
? <
|
|
336
|
+
? <div className="flex items-center justify-center py-12 px-8">
|
|
337
|
+
<CircularProgress size="small"/>
|
|
338
|
+
</div>
|
|
337
339
|
: <div
|
|
338
|
-
className="flex flex-col overflow-auto items-center justify-center
|
|
340
|
+
className="flex flex-col overflow-auto items-center justify-center py-12 px-8">
|
|
339
341
|
{emptyComponent}
|
|
340
342
|
</div>)
|
|
341
343
|
: undefined);
|
package/src/index.css
CHANGED
package/src/styles.ts
CHANGED
|
@@ -7,6 +7,6 @@ export const fieldBackgroundDisabledMixin = "dark:bg-surface-900 bg-opacity-50 d
|
|
|
7
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
8
|
export const defaultBorderMixin = "border-surface-200/60 dark:border-surface-700/60 ";
|
|
9
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-
|
|
11
|
-
export const cardClickableMixin = "hover:bg-surface-accent-100 dark:hover:bg-surface-800 hover:ring-
|
|
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";
|
|
12
12
|
export const cardSelectedMixin = "bg-primary-bg/30 dark:bg-primary-bg/10 ring-1 ring-primary/75";
|