-
- Deployment
-
+
+
+
+ /
+
+
+
+ Deployment
+
+
);
@@ -107,11 +164,14 @@ function Component() {
isPending,
isSuccess,
} = useListDeployments();
+
const size = services ? services.size : 0;
- const isEmpty = isSuccess && (!deployments || deployments.size === 0);
const [isScrolling, setIsScrolling] = useState(false);
const masonryId = useId();
+ const [filter, setFilter] = useState('');
+ const filterQuery = useDeferredValue(filter);
+
useLayoutEffect(() => {
let isCanceled = false;
const resizeObserver = new ResizeObserver(() => {
@@ -135,7 +195,8 @@ function Component() {
isCanceled = true;
resizeObserver.unobserve(document.body);
};
- }, [masonryId, sortedServiceNames]);
+ }, [masonryId, sortedServiceNames, filterQuery]);
+ const isEmpty = isSuccess && (!deployments || deployments.size === 0);
// TODO: Handle isLoading & isError
@@ -150,11 +211,12 @@ function Component() {
style={{ gap: 'calc(8rem + 150px)' }}
className={layoutStyles({ isScrolling, className: masonryId })}
>
- {sortedServiceNames?.map((serviceName, i) => (
+ {sortedServiceNames?.map((serviceName) => (
))}
{size === 1 &&
}
@@ -163,7 +225,12 @@ function Component() {
{isEmpty && }
- {size > 1 &&
}
+ {size > 1 && (
+
+ )}
>
);
}
diff --git a/libs/features/overview-route/src/lib/types.ts b/libs/features/overview-route/src/lib/types.ts
deleted file mode 100644
index 4609b65d..00000000
--- a/libs/features/overview-route/src/lib/types.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import type { Deployment } from '@restate/data-access/admin-api';
-
-export type HTTPDeployment = Exclude
;
-export type LambdaDeployment = Exclude;
-export type DeploymentType = 'uri' | 'arn';
-export function isHttpDeployment(
- deployment: Deployment
-): deployment is HTTPDeployment {
- return 'uri' in deployment;
-}
-export function isLambdaDeployment(
- deployment: Deployment
-): deployment is LambdaDeployment {
- return 'arn' in deployment;
-}
-export function getEndpoint(deployment?: Deployment) {
- if (!deployment) {
- return undefined;
- }
- if (isHttpDeployment(deployment)) {
- return deployment.uri;
- } else {
- return deployment.arn;
- }
-}
diff --git a/libs/ui/button/src/lib/Button.tsx b/libs/ui/button/src/lib/Button.tsx
index 26afcd97..bcc7188d 100644
--- a/libs/ui/button/src/lib/Button.tsx
+++ b/libs/ui/button/src/lib/Button.tsx
@@ -21,7 +21,6 @@ export interface ButtonProps {
className?: string;
form?: string;
slot?: string;
- onHover?: VoidFunction;
}
const styles = tv({
@@ -30,7 +29,7 @@ const styles = tv({
variants: {
variant: {
primary:
- 'bg-gradient-to-b from-blue-600/90 to-blue-600 hover:from-blue-700 hover:to-blue-700 pressed:from-blue-800 pressed:to-blue-800 text-white shadow-[inset_0_1px_0_0_rgba(255,255,255,0.2)] drop-shadow-sm hover:shadow-none pressed:shadow-none',
+ 'bg-gradient-to-b from-blue-600/90 to-blue-600 disabled:bg-gray-400 disabled:shadow-none disabled:drop-shadow-none disabled:text-gray-200 hover:from-blue-700 hover:to-blue-700 pressed:from-blue-800 pressed:to-blue-800 text-white shadow-[inset_0_1px_0_0_rgba(255,255,255,0.2)] drop-shadow-sm hover:shadow-none pressed:shadow-none',
secondary: 'bg-white hover:bg-gray-100 pressed:bg-gray-200 text-gray-800',
destructive:
'bg-gradient-to-b from-red-700/95 to-red-700 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.15)] drop-shadow-sm hover:from-red-800 hover:to-red-800 pressed:from-red-900 pressed:to-red-900 text-white hover:shadow-none pressed:shadow-none',
@@ -48,11 +47,10 @@ const styles = tv({
export const Button = forwardRef<
HTMLButtonElement,
PropsWithChildren
->(({ variant, onClick, disabled, onHover, ...props }, ref) => {
+>(({ variant, onClick, disabled, ...props }, ref) => {
return (
void;
+ isOpen?: boolean;
+}
-export function Dropdown({ children }: PropsWithChildren) {
- return {children};
+export function Dropdown({
+ children,
+ defaultOpen,
+ onOpenChange,
+ isOpen,
+}: PropsWithChildren) {
+ return (
+
+ {children}
+
+ );
}
diff --git a/libs/ui/dropdown/src/lib/DropdownPopover.tsx b/libs/ui/dropdown/src/lib/DropdownPopover.tsx
index 2c487836..59131ffc 100644
--- a/libs/ui/dropdown/src/lib/DropdownPopover.tsx
+++ b/libs/ui/dropdown/src/lib/DropdownPopover.tsx
@@ -1,9 +1,11 @@
import { PopoverContent } from '@restate/ui/popover';
import type { PropsWithChildren } from 'react';
+import { Placement } from 'react-aria';
import { tv } from 'tailwind-variants';
interface DropdownPopoverProps {
className?: string;
+ placement?: Placement;
}
const styles = tv({
@@ -13,9 +15,10 @@ const styles = tv({
export function DropdownPopover({
children,
className,
+ ...props
}: PropsWithChildren) {
return (
-
+
{children}
);
diff --git a/libs/ui/dropdown/src/lib/DropdownSection.tsx b/libs/ui/dropdown/src/lib/DropdownSection.tsx
index 85dea7f5..0ab1ab91 100644
--- a/libs/ui/dropdown/src/lib/DropdownSection.tsx
+++ b/libs/ui/dropdown/src/lib/DropdownSection.tsx
@@ -11,7 +11,7 @@ const styles = tv({
slots: {
container: 'px-1',
header: 'text-sm font-semibold text-gray-500 px-4 py-1 pt-2 truncate',
- menu: 'bg-white rounded-xl border [&_.dropdown-item]:rounded-lg [&:last-child]:mb-1',
+ menu: 'bg-white [&:not(:has(*))]:hidden rounded-xl border [&_.dropdown-item]:rounded-lg [&:last-child]:mb-1',
},
});
export function DropdownSection({
diff --git a/libs/ui/form-field/src/index.ts b/libs/ui/form-field/src/index.ts
index f35ae948..9bcc7710 100644
--- a/libs/ui/form-field/src/index.ts
+++ b/libs/ui/form-field/src/index.ts
@@ -1,3 +1,4 @@
+export { FormFieldMultiCombobox } from './lib/MultiCombobox/MultiCombobox';
export * from './lib/FormFieldError';
export * from './lib/FormFieldGroup';
export * from './lib/FormFieldLabel';
@@ -7,3 +8,4 @@ export * from './lib/FormFieldCheckbox';
export * from './lib/FormFieldSelect';
export * from './lib/FormFieldNumberInput';
export * from './lib/FormFieldCombobox';
+export * from './lib/FormFieldDateTimeInput';
diff --git a/libs/ui/form-field/src/lib/FormFieldCombobox.tsx b/libs/ui/form-field/src/lib/FormFieldCombobox.tsx
index 1bcbcfdd..9d594c0a 100644
--- a/libs/ui/form-field/src/lib/FormFieldCombobox.tsx
+++ b/libs/ui/form-field/src/lib/FormFieldCombobox.tsx
@@ -89,7 +89,7 @@ export function FormFieldCombobox({