diff --git a/src/app/(main)/profile/LanguageSetting.tsx b/src/app/(main)/profile/LanguageSetting.tsx
index efa9168e..86503713 100644
--- a/src/app/(main)/profile/LanguageSetting.tsx
+++ b/src/app/(main)/profile/LanguageSetting.tsx
@@ -1,5 +1,5 @@
import { useState } from 'react';
-import { Button, Dropdown, Item, Flexbox } from '@umami/react-zen';
+import { Button, Select, ListItem, Flexbox } from '@umami/react-zen';
import { useLocale, useMessages } from '@/components/hooks';
import { DEFAULT_LOCALE } from '@/lib/constants';
import { languages } from '@/lib/lang';
@@ -20,22 +20,19 @@ export function LanguageSetting() {
const handleReset = () => saveLocale(DEFAULT_LOCALE);
- const renderValue = (value: string | number) => languages?.[value]?.label;
-
return (
- saveLocale(val as string)}
allowSearch={true}
onSearch={setSearch}
menuProps={{ className: styles.menu }}
>
- {item => - {languages[item].label}
}
-
-
+ {item => {languages[item].label}}
+
+
);
}
diff --git a/src/app/(main)/profile/TimezoneSetting.tsx b/src/app/(main)/profile/TimezoneSetting.tsx
index c5dd851d..6a7e861d 100644
--- a/src/app/(main)/profile/TimezoneSetting.tsx
+++ b/src/app/(main)/profile/TimezoneSetting.tsx
@@ -1,5 +1,5 @@
import { useState } from 'react';
-import { Dropdown, Item, Button, Flexbox } from '@umami/react-zen';
+import { Row, Select, ListItem, Button } from '@umami/react-zen';
import { useTimezone, useMessages } from '@/components/hooks';
import { getTimezone } from '@/lib/date';
import styles from './TimezoneSetting.module.css';
@@ -17,19 +17,22 @@ export function TimezoneSetting() {
const handleReset = () => saveTimezone(getTimezone());
return (
-
-
+
-
-
+ {item => (
+
+ {item}
+
+ )}
+
+
+
);
}
diff --git a/src/app/(main)/reports/[reportId]/FieldParameters.tsx b/src/app/(main)/reports/[reportId]/FieldParameters.tsx
index 9c1ed938..024f8c65 100644
--- a/src/app/(main)/reports/[reportId]/FieldParameters.tsx
+++ b/src/app/(main)/reports/[reportId]/FieldParameters.tsx
@@ -1,7 +1,7 @@
import { useFields, useMessages } from '@/components/hooks';
import { Icons } from '@/components/icons';
import { useContext } from 'react';
-import { Button, FormRow, Icon, Popup, PopupTrigger } from '@umami/react-zen';
+import { Button, Row, Label, Icon, Popover, MenuTrigger } from '@umami/react-zen';
import { FieldSelectForm } from '../[reportId]/FieldSelectForm';
import { ParameterList } from '../[reportId]/ParameterList';
import { PopupForm } from '../[reportId]/PopupForm';
@@ -26,27 +26,26 @@ export function FieldParameters() {
const AddButton = () => {
return (
-
+
-
-
- !fields.find(f => f.name === name))}
- onSelect={handleAdd}
- showType={false}
- />
-
-
-
+
+ !fields.find(f => f.name === name))}
+ onSelect={handleAdd}
+ showType={false}
+ />
+
+
);
};
return (
- }>
+
+
{fields.map(({ name }) => {
return (
@@ -56,6 +55,7 @@ export function FieldParameters() {
);
})}
-
+
+
);
}
diff --git a/src/app/(main)/reports/[reportId]/FilterParameters.tsx b/src/app/(main)/reports/[reportId]/FilterParameters.tsx
index 39f15d82..0c546c29 100644
--- a/src/app/(main)/reports/[reportId]/FilterParameters.tsx
+++ b/src/app/(main)/reports/[reportId]/FilterParameters.tsx
@@ -1,7 +1,7 @@
import { useContext } from 'react';
import { useMessages, useFormat, useFilters, useFields } from '@/components/hooks';
import { Icons } from '@/components/icons';
-import { Button, FormRow, Icon, Popup, PopupTrigger } from '@umami/react-zen';
+import { Button, Text, Row, Label, Icon, Popover, MenuTrigger } from '@umami/react-zen';
import { FilterSelectForm } from '../[reportId]/FilterSelectForm';
import { ParameterList } from '../[reportId]/ParameterList';
import { PopupForm } from '../[reportId]/PopupForm';
@@ -44,13 +44,13 @@ export function FilterParameters() {
const AddButton = () => {
return (
-
+
-
+
-
-
+
+
);
};
return (
- }>
+ <>
+
+
+
+
{filters.map(
({ name, operator, value }: { name: string; operator: string; value: string }) => {
@@ -90,7 +94,7 @@ export function FilterParameters() {
},
)}
-
+ >
);
}
@@ -108,29 +112,27 @@ const FilterParameter = ({
const { operatorLabels } = useFilters();
return (
-
+
{label}
{operatorLabels[operator]}
{value}
-
+
{(close: any) => (
-
-
-
+
)}
-
-
+
+
);
};
diff --git a/src/app/(main)/reports/[reportId]/ReportMenu.tsx b/src/app/(main)/reports/[reportId]/ReportMenu.tsx
index 2e5c5f24..22846d2a 100644
--- a/src/app/(main)/reports/[reportId]/ReportMenu.tsx
+++ b/src/app/(main)/reports/[reportId]/ReportMenu.tsx
@@ -1,8 +1,8 @@
import { useContext, useState } from 'react';
-import { ReportContext } from './Report';
-import styles from './ReportMenu.module.css';
import { Icon, Icons } from '@umami/react-zen';
import classNames from 'classnames';
+import { ReportContext } from './Report';
+import styles from './ReportMenu.module.css';
export function ReportMenu({ children }) {
const [collapsed, setCollapsed] = useState(false);
@@ -16,7 +16,7 @@ export function ReportMenu({ children }) {
setCollapsed(!collapsed)}>
-
+
{!collapsed && children}
diff --git a/src/app/(main)/reports/funnel/FunnelStepAddForm.tsx b/src/app/(main)/reports/funnel/FunnelStepAddForm.tsx
index 067adb6e..8069dc0f 100644
--- a/src/app/(main)/reports/funnel/FunnelStepAddForm.tsx
+++ b/src/app/(main)/reports/funnel/FunnelStepAddForm.tsx
@@ -1,6 +1,15 @@
import { useState } from 'react';
import { useMessages } from '@/components/hooks';
-import { Button, FormRow, TextField, Flexbox, Dropdown, Item } from '@umami/react-zen';
+import {
+ Button,
+ Column,
+ Row,
+ TextField,
+ Label,
+ Select,
+ ListItem,
+ FormButtons,
+} from '@umami/react-zen';
import styles from './FunnelStepAddForm.module.css';
export interface FunnelStepAddFormProps {
@@ -39,40 +48,34 @@ export function FunnelStepAddForm({
}
};
- const renderTypeValue = (value: any) => {
- return items.find(item => item.value === value)?.label;
- };
-
return (
-
-
-
- setType(value)}
- >
- {({ value, label }) => {
- return - {label}
;
- }}
-
-
-
-
-
-
-
+
+
);
}
diff --git a/src/app/(main)/reports/goals/GoalsAddForm.tsx b/src/app/(main)/reports/goals/GoalsAddForm.tsx
index cdeb526c..507e639e 100644
--- a/src/app/(main)/reports/goals/GoalsAddForm.tsx
+++ b/src/app/(main)/reports/goals/GoalsAddForm.tsx
@@ -1,6 +1,15 @@
import { useMessages } from '@/components/hooks';
import { useState } from 'react';
-import { Button, Dropdown, Flexbox, FormRow, Item, TextField } from '@umami/react-zen';
+import {
+ Button,
+ Row,
+ Column,
+ Select,
+ Label,
+ ListItem,
+ TextField,
+ FormButtons,
+} from '@umami/react-zen';
import styles from './GoalsAddForm.module.css';
export function GoalsAddForm({
@@ -71,44 +80,43 @@ export function GoalsAddForm({
};
return (
-
-
-
- setType(value)}
- >
- {({ value, label }) => {
- return - {label}
;
- }}
-
- handleChange(e, setValue)}
- autoFocus={true}
- autoComplete="off"
- onKeyDown={handleKeyDown}
- />
-
-
+
+
+
+
+ handleChange(e, setValue)}
+ autoFocus={true}
+ autoComplete="off"
+ onKeyDown={handleKeyDown}
+ />
+
{type === 'event-data' && (
-
-
-
+
+
+
+
-
-
+
+
)}
-
-
+
+
+
-
-
-
-
+
+
+
+
{formatMessage(defaultValue ? labels.update : labels.add)}
-
-
+
+
);
}
diff --git a/src/app/(main)/reports/goals/GoalsParameters.tsx b/src/app/(main)/reports/goals/GoalsParameters.tsx
index d387601f..75ec995a 100644
--- a/src/app/(main)/reports/goals/GoalsParameters.tsx
+++ b/src/app/(main)/reports/goals/GoalsParameters.tsx
@@ -4,18 +4,17 @@ import { formatNumber } from '@/lib/format';
import { useContext } from 'react';
import {
Button,
- Flexbox,
Form,
FormButtons,
- FormRow,
+ FormField,
Icon,
- Popup,
- PopupTrigger,
- SubmitButton,
+ Popover,
+ MenuTrigger,
+ FormSubmitButton,
+ Column,
} from '@umami/react-zen';
import { BaseParameters } from '../[reportId]/BaseParameters';
import { ParameterList } from '../[reportId]/ParameterList';
-import { PopupForm } from '../[reportId]/PopupForm';
import { ReportContext } from '../[reportId]/Report';
import { GoalsAddForm } from './GoalsAddForm';
import styles from './GoalsParameters.module.css';
@@ -60,25 +59,24 @@ export function GoalsParameters() {
const AddGoalsButton = () => {
return (
-
+
-
-
-
-
-
-
+
+
+
+
);
};
return (