@toteat-eng/ds-react 2026.5.13 → 2026.6.10-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.
- package/dist/components/Accordion/Accordion.d.ts +2 -1
- package/dist/components/AppleSignInButton/AppleSignInButton.d.ts +2 -1
- package/dist/components/Badge/Badge.d.ts +2 -1
- package/dist/components/Banner/Banner.d.ts +14 -0
- package/dist/components/Banner/__stories__/Banner.stories.d.ts +16 -0
- package/dist/components/Banner/index.d.ts +2 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +14 -0
- package/dist/components/Breadcrumb/__stories__/Breadcrumb.stories.d.ts +14 -0
- package/dist/components/Breadcrumb/index.d.ts +2 -0
- package/dist/components/Charts/Charts.d.ts +6 -4
- package/dist/components/Checkbox/Checkbox.d.ts +2 -1
- package/dist/components/ComingSoon/ComingSoon.d.ts +9 -0
- package/dist/components/ComingSoon/__stories__/ComingSoon.stories.d.ts +10 -0
- package/dist/components/ComingSoon/index.d.ts +2 -0
- package/dist/components/ConfigRow/ConfigRow.d.ts +27 -0
- package/dist/components/ConfigRow/__stories__/ConfigRow.stories.d.ts +13 -0
- package/dist/components/ConfigRow/index.d.ts +2 -0
- package/dist/components/DataTable/DataTable.d.ts +2 -1
- package/dist/components/DatePicker/DatePicker.d.ts +2 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +2 -1
- package/dist/components/Dialog/Dialog.d.ts +2 -1
- package/dist/components/DropdownButton/DropdownButton.d.ts +2 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +2 -1
- package/dist/components/DsProvider/DsProvider.d.ts +2 -1
- package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +1 -0
- package/dist/components/ExtrasDialog/ExtrasDialog.d.ts +3 -1
- package/dist/components/FormField/FormField.d.ts +2 -1
- package/dist/components/GoogleSignInButton/GoogleSignInButton.d.ts +2 -1
- package/dist/components/Icon/Icon.d.ts +2 -1
- package/dist/components/LanguageSelector/LanguageSelector.d.ts +2 -1
- package/dist/components/Multiselect/Multiselect.d.ts +2 -1
- package/dist/components/NavBar/NavBar.d.ts +2 -1
- package/dist/components/PageLoadingOverlay/PageLoadingOverlay.d.ts +2 -1
- package/dist/components/PermissionGate/PermissionGate.d.ts +30 -0
- package/dist/components/PermissionGate/__stories__/PermissionGate.stories.d.ts +10 -0
- package/dist/components/PermissionGate/index.d.ts +2 -0
- package/dist/components/PinLockOverlay/PinLockOverlay.d.ts +2 -1
- package/dist/components/ProductTile/ProductTile.d.ts +2 -1
- package/dist/components/Radio/Radio.d.ts +2 -1
- package/dist/components/SearchInput/SearchInput.d.ts +21 -0
- package/dist/components/SearchInput/__stories__/SearchInput.stories.d.ts +11 -0
- package/dist/components/SearchInput/index.d.ts +2 -0
- package/dist/components/SectionHeader/SectionHeader.d.ts +13 -0
- package/dist/components/SectionHeader/__stories__/SectionHeader.stories.d.ts +15 -0
- package/dist/components/SectionHeader/index.d.ts +2 -0
- package/dist/components/SidebarNavSection/SidebarNavSection.d.ts +2 -1
- package/dist/components/Skeleton/Skeleton.d.ts +2 -1
- package/dist/components/Spinner/Spinner.d.ts +2 -1
- package/dist/components/StatusBadge/StatusBadge.d.ts +12 -0
- package/dist/components/StatusBadge/__stories__/StatusBadge.stories.d.ts +15 -0
- package/dist/components/StatusBadge/index.d.ts +2 -0
- package/dist/components/Stepper/Stepper.d.ts +18 -0
- package/dist/components/Stepper/__stories__/Stepper.stories.d.ts +11 -0
- package/dist/components/Stepper/index.d.ts +2 -0
- package/dist/components/TabBar/TabBar.d.ts +2 -1
- package/dist/components/Tabs/Tabs.d.ts +2 -1
- package/dist/components/TextInput/TextInput.d.ts +2 -1
- package/dist/components/ThemeGate/ThemeGate.d.ts +2 -1
- package/dist/components/Toast/Toast.d.ts +1 -0
- package/dist/components/Toast/useToast.d.ts +1 -0
- package/dist/components/Toggle/Toggle.d.ts +2 -1
- package/dist/components/Tooltip/Tooltip.d.ts +2 -1
- package/dist/index.d.ts +22 -1
- package/dist/index.es.js +943 -554
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +10 -9
- package/dist/index.umd.js.map +1 -1
- package/dist/layouts/AdminPageHeader/AdminPageHeader.d.ts +2 -1
- package/dist/layouts/AppShell/AppShell.d.ts +2 -1
- package/dist/layouts/Divider/Divider.d.ts +2 -1
- package/dist/layouts/Grid/Grid.d.ts +2 -1
- package/dist/layouts/LoginFooter/LoginFooter.d.ts +14 -0
- package/dist/layouts/LoginFooter/__stories__/LoginFooter.stories.d.ts +15 -0
- package/dist/layouts/LoginFooter/index.d.ts +2 -0
- package/dist/layouts/LoginPageLayout/LoginPageLayout.d.ts +2 -1
- package/dist/layouts/PageLayout/PageLayout.d.ts +2 -1
- package/dist/style.css +1 -1
- package/dist/utils/csv.d.ts +17 -0
- package/package.json +5 -5
|
@@ -8,6 +8,7 @@ interface AccordionItem {
|
|
|
8
8
|
interface AccordionProps {
|
|
9
9
|
items: AccordionItem[];
|
|
10
10
|
multiple?: boolean;
|
|
11
|
+
"data-testid"?: string;
|
|
11
12
|
}
|
|
12
|
-
export declare function Accordion({ items, multiple }: AccordionProps): ReactElement;
|
|
13
|
+
export declare function Accordion({ items, multiple, "data-testid": testId, }: AccordionProps): ReactElement;
|
|
13
14
|
export {};
|
|
@@ -3,5 +3,6 @@ export interface AppleSignInButtonProps {
|
|
|
3
3
|
isPending?: boolean;
|
|
4
4
|
isError?: boolean;
|
|
5
5
|
error?: Error | null;
|
|
6
|
+
"data-testid"?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare function AppleSignInButton({ onSignIn, isPending, isError, error, }: AppleSignInButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function AppleSignInButton({ onSignIn, isPending, isError, error, "data-testid": testId, }: AppleSignInButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,5 +6,6 @@ export interface BadgeProps {
|
|
|
6
6
|
size?: BadgeSize;
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
className?: string;
|
|
9
|
+
"data-testid"?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare function Badge({ variant, size, children, className, }: BadgeProps): React.ReactElement;
|
|
11
|
+
export declare function Badge({ variant, size, children, className, "data-testid": testId, }: BadgeProps): React.ReactElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { IconNameType } from "../Icon";
|
|
3
|
+
export type BannerVariant = "info" | "success" | "warning" | "error" | "neutral";
|
|
4
|
+
export interface BannerProps {
|
|
5
|
+
variant?: BannerVariant;
|
|
6
|
+
icon?: IconNameType;
|
|
7
|
+
onDismiss?: () => void;
|
|
8
|
+
dismissLabel?: string;
|
|
9
|
+
action?: React.ReactNode;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
"data-testid"?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function Banner({ variant, icon, onDismiss, dismissLabel, action, children, className, "data-testid": testId, }: BannerProps): React.ReactElement;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { Banner } from "../Banner";
|
|
3
|
+
declare const meta: Meta<typeof Banner>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Banner>;
|
|
6
|
+
export declare const Info: Story;
|
|
7
|
+
export declare const Success: Story;
|
|
8
|
+
export declare const Warning: Story;
|
|
9
|
+
export declare const Error: Story;
|
|
10
|
+
export declare const Neutral: Story;
|
|
11
|
+
export declare const WithIcon: Story;
|
|
12
|
+
export declare const WithDismiss: Story;
|
|
13
|
+
export declare const WithAction: Story;
|
|
14
|
+
export declare const WithDismissAndAction: Story;
|
|
15
|
+
export declare const AllVariants: Story;
|
|
16
|
+
export declare const BothThemes: Story;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface BreadcrumbItem {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
href?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface BreadcrumbProps {
|
|
7
|
+
items: BreadcrumbItem[];
|
|
8
|
+
onBack?: () => void;
|
|
9
|
+
backLabel?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
"data-testid"?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function Breadcrumb({ items, onBack, backLabel, label, className, "data-testid": testId, }: BreadcrumbProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { Breadcrumb } from "../Breadcrumb";
|
|
3
|
+
declare const meta: Meta<typeof Breadcrumb>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Breadcrumb>;
|
|
6
|
+
export declare const SingleItem: Story;
|
|
7
|
+
export declare const MultipleItems: Story;
|
|
8
|
+
export declare const WithBackButton: Story;
|
|
9
|
+
export declare const WithoutBackButton: Story;
|
|
10
|
+
export declare const ItemsWithHref: Story;
|
|
11
|
+
export declare const ItemsWithHrefAndBack: Story;
|
|
12
|
+
export declare const ThemeToteatReactDs: Story;
|
|
13
|
+
export declare const ThemeAngularLegacy: Story;
|
|
14
|
+
export declare const BothThemes: Story;
|
|
@@ -18,15 +18,17 @@ export interface BaseChartProps {
|
|
|
18
18
|
formatValue?: (value: number) => string;
|
|
19
19
|
/** Hide recharts legend */
|
|
20
20
|
hideLegend?: boolean;
|
|
21
|
+
"data-testid"?: string;
|
|
21
22
|
}
|
|
22
|
-
export declare function LineChart({ data, xKey, series, height, title, formatY, formatValue, hideLegend, }: BaseChartProps): ReactElement;
|
|
23
|
-
export declare function BarChart({ data, xKey, series, height, title, formatY, formatValue, hideLegend, }: BaseChartProps): ReactElement;
|
|
24
|
-
export declare function AreaChart({ data, xKey, series, height, title, formatY, formatValue, hideLegend, }: BaseChartProps): ReactElement;
|
|
23
|
+
export declare function LineChart({ data, xKey, series, height, title, formatY, formatValue, hideLegend, "data-testid": testId, }: BaseChartProps): ReactElement;
|
|
24
|
+
export declare function BarChart({ data, xKey, series, height, title, formatY, formatValue, hideLegend, "data-testid": testId, }: BaseChartProps): ReactElement;
|
|
25
|
+
export declare function AreaChart({ data, xKey, series, height, title, formatY, formatValue, hideLegend, "data-testid": testId, }: BaseChartProps): ReactElement;
|
|
25
26
|
export interface KpiCardProps {
|
|
26
27
|
label: string;
|
|
27
28
|
value: string | number;
|
|
28
29
|
/** e.g. "+12.5%" or "-3.2%" */
|
|
29
30
|
change?: string;
|
|
30
31
|
trend?: "up" | "down" | "neutral";
|
|
32
|
+
"data-testid"?: string;
|
|
31
33
|
}
|
|
32
|
-
export declare function KpiCard({ label, value, change, trend }: KpiCardProps): ReactElement;
|
|
34
|
+
export declare function KpiCard({ label, value, change, trend, "data-testid": testId, }: KpiCardProps): ReactElement;
|
|
@@ -2,5 +2,6 @@ import type { InputHTMLAttributes } from "react";
|
|
|
2
2
|
export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
3
3
|
label?: string;
|
|
4
4
|
ref?: React.Ref<HTMLInputElement>;
|
|
5
|
+
"data-testid"?: string;
|
|
5
6
|
}
|
|
6
|
-
export declare function Checkbox({ label, className, id, ref, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function Checkbox({ label, className, id, ref, "data-testid": testId, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { IconNameType } from "../Icon/icons";
|
|
3
|
+
export interface ComingSoonProps {
|
|
4
|
+
message?: string;
|
|
5
|
+
icon?: IconNameType;
|
|
6
|
+
className?: string;
|
|
7
|
+
"data-testid"?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function ComingSoon({ message, icon, className, "data-testid": testId, }: ComingSoonProps): React.ReactElement;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { ComingSoon } from "../ComingSoon";
|
|
3
|
+
declare const meta: Meta<typeof ComingSoon>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ComingSoon>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const CustomMessage: Story;
|
|
8
|
+
export declare const CustomIcon: Story;
|
|
9
|
+
export declare const VueTheme: Story;
|
|
10
|
+
export declare const AngularTheme: Story;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
export interface ConfigRowProps {
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
/** The control slot — Toggle, Select, Button, etc. */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* When provided the label is rendered as `<label htmlFor>`, linking it to
|
|
10
|
+
* the control by id. The CALLER MUST put a matching `id={htmlFor}` on the
|
|
11
|
+
* child control — ConfigRow renders `children` opaquely and cannot verify
|
|
12
|
+
* it; without a match the label associates with nothing. Omit when the
|
|
13
|
+
* control manages its own label.
|
|
14
|
+
*/
|
|
15
|
+
htmlFor?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Purely visual muted state (reduced opacity). Does NOT affect
|
|
18
|
+
* interactivity — to disable the control, pass `disabled` to the control
|
|
19
|
+
* inside `children` yourself.
|
|
20
|
+
*/
|
|
21
|
+
dimmed?: boolean;
|
|
22
|
+
/** Bottom border separator. Defaults to `true`. */
|
|
23
|
+
divider?: boolean;
|
|
24
|
+
className?: string;
|
|
25
|
+
"data-testid"?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function ConfigRow({ label, description, children, htmlFor, dimmed, divider, className, "data-testid": testId, }: ConfigRowProps): React.ReactElement;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { ConfigRow } from "../ConfigRow";
|
|
3
|
+
declare const meta: Meta<typeof ConfigRow>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ConfigRow>;
|
|
6
|
+
export declare const WithToggle: Story;
|
|
7
|
+
export declare const WithDescription: Story;
|
|
8
|
+
export declare const WithSelect: Story;
|
|
9
|
+
export declare const HtmlForLinked: Story;
|
|
10
|
+
export declare const Dimmed: Story;
|
|
11
|
+
export declare const NoDivider: Story;
|
|
12
|
+
export declare const MultipleRowsWithDividers: Story;
|
|
13
|
+
export declare const BothThemes: Story;
|
|
@@ -20,5 +20,6 @@ export interface DataTableProps<T> {
|
|
|
20
20
|
pageCount?: number;
|
|
21
21
|
/** Wrap with useCallback in the parent to avoid redundant fetches on re-render. */
|
|
22
22
|
onPageChange?: (pageIndex: number, pageSize: number) => void;
|
|
23
|
+
"data-testid"?: string;
|
|
23
24
|
}
|
|
24
|
-
export declare function DataTable<T>({ data, columns, isLoading, loadingSlot, pageSize, searchable, sortable, paginated, emptyMessage, searchPlaceholder, previousLabel, nextLabel, onRowClick, selectable, onSelectionChange, manualPagination, pageCount, onPageChange, }: DataTableProps<T>): React.ReactElement;
|
|
25
|
+
export declare function DataTable<T>({ data, columns, isLoading, loadingSlot, pageSize, searchable, sortable, paginated, emptyMessage, searchPlaceholder, previousLabel, nextLabel, onRowClick, selectable, onSelectionChange, manualPagination, pageCount, onPageChange, "data-testid": testId, }: DataTableProps<T>): React.ReactElement;
|
|
@@ -3,5 +3,6 @@ export interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputEleme
|
|
|
3
3
|
error?: boolean;
|
|
4
4
|
label?: string;
|
|
5
5
|
ref?: Ref<HTMLInputElement>;
|
|
6
|
+
"data-testid"?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare function DatePicker({ error, label, className, id, ref, ...props }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function DatePicker({ error, label, className, id, ref, "data-testid": testId, ...props }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,5 +10,6 @@ export interface DateRangePickerProps {
|
|
|
10
10
|
minDate?: string;
|
|
11
11
|
maxDate?: string;
|
|
12
12
|
className?: string;
|
|
13
|
+
"data-testid"?: string;
|
|
13
14
|
}
|
|
14
|
-
export declare function DateRangePicker({ startDate, endDate, onStartChange, onEndChange, startLabel, endLabel, error, disabled, minDate, maxDate, className, }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function DateRangePicker({ startDate, endDate, onStartChange, onEndChange, startLabel, endLabel, error, disabled, minDate, maxDate, className, "data-testid": testId, }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,5 +7,6 @@ export interface DialogProps {
|
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
size?: DialogSize;
|
|
9
9
|
className?: string;
|
|
10
|
+
"data-testid"?: string;
|
|
10
11
|
}
|
|
11
|
-
export declare function Dialog({ open, onClose, title, children, size, className, }: DialogProps): import("react").ReactPortal | null;
|
|
12
|
+
export declare function Dialog({ open, onClose, title, children, size, className, "data-testid": testId, }: DialogProps): import("react").ReactPortal | null;
|
|
@@ -14,5 +14,6 @@ export interface DropdownButtonProps {
|
|
|
14
14
|
onSelect?: (item: DropdownMenuItemType) => void;
|
|
15
15
|
onOpen?: () => void;
|
|
16
16
|
onClose?: () => void;
|
|
17
|
+
"data-testid"?: string;
|
|
17
18
|
}
|
|
18
|
-
export declare function DropdownButton({ text, menuItems, size, variant, disabled, onSelect, onOpen, onClose, }: DropdownButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function DropdownButton({ text, menuItems, size, variant, disabled, onSelect, onOpen, onClose, "data-testid": testId, }: DropdownButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,5 +11,6 @@ export interface DropdownMenuProps {
|
|
|
11
11
|
trigger: ReactNode;
|
|
12
12
|
items: DropdownMenuItem[];
|
|
13
13
|
align?: "left" | "right";
|
|
14
|
+
"data-testid"?: string;
|
|
14
15
|
}
|
|
15
|
-
export declare function DropdownMenu({ trigger, items, align }: DropdownMenuProps): ReactElement;
|
|
16
|
+
export declare function DropdownMenu({ trigger, items, align, "data-testid": testId, }: DropdownMenuProps): ReactElement;
|
|
@@ -4,5 +4,6 @@ export interface DsProviderProps {
|
|
|
4
4
|
theme: DsTheme;
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
className?: string;
|
|
7
|
+
"data-testid"?: string;
|
|
7
8
|
}
|
|
8
|
-
export declare function DsProvider({ theme, children, className }: DsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function DsProvider({ theme, children, className, "data-testid": testId }: DsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,6 +4,7 @@ export interface ErrorBoundaryProps {
|
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
fallback?: ReactNode | ((error: Error, retry: () => void) => ReactNode);
|
|
6
6
|
onError?: (error: Error, info: ErrorInfo) => void;
|
|
7
|
+
"data-testid"?: string;
|
|
7
8
|
}
|
|
8
9
|
interface ErrorBoundaryState {
|
|
9
10
|
hasError: boolean;
|
|
@@ -26,5 +26,7 @@ export type ExtrasDialogProps = {
|
|
|
26
26
|
onConfirm: (selections: SelectedExtraType[]) => void;
|
|
27
27
|
categories: ExtrasCategoryType[];
|
|
28
28
|
productName: string;
|
|
29
|
+
/** Forwarded to the underlying Dialog's root element. */
|
|
30
|
+
"data-testid"?: string;
|
|
29
31
|
};
|
|
30
|
-
export declare function ExtrasDialog({ open, onClose, onConfirm, categories, productName, }: ExtrasDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function ExtrasDialog({ open, onClose, onConfirm, categories, productName, "data-testid": testId, }: ExtrasDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,5 +7,6 @@ export interface FormFieldProps {
|
|
|
7
7
|
required?: boolean;
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
className?: string;
|
|
10
|
+
"data-testid"?: string;
|
|
10
11
|
}
|
|
11
|
-
export declare function FormField({ label, htmlFor, error, description, required, children, className, }: FormFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function FormField({ label, htmlFor, error, description, required, children, className, "data-testid": testId, }: FormFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,5 +3,6 @@ export interface GoogleSignInButtonProps {
|
|
|
3
3
|
isPending?: boolean;
|
|
4
4
|
isError?: boolean;
|
|
5
5
|
error?: Error | null;
|
|
6
|
+
"data-testid"?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare function GoogleSignInButton({ onSignIn, isPending, isError, error, }: GoogleSignInButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function GoogleSignInButton({ onSignIn, isPending, isError, error, "data-testid": testId, }: GoogleSignInButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,5 +7,6 @@ export interface IconProps {
|
|
|
7
7
|
color?: string;
|
|
8
8
|
"aria-label"?: string;
|
|
9
9
|
"aria-hidden"?: boolean | "true" | "false";
|
|
10
|
+
"data-testid"?: string;
|
|
10
11
|
}
|
|
11
|
-
export declare function Icon({ name, size, className, color, "aria-label": ariaLabel, "aria-hidden": ariaHidden, }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function Icon({ name, size, className, color, "aria-label": ariaLabel, "aria-hidden": ariaHidden, "data-testid": testId, }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,5 +6,6 @@ export interface LanguageSelectorProps {
|
|
|
6
6
|
value: string;
|
|
7
7
|
options: LanguageOption[];
|
|
8
8
|
onChange: (value: string) => void;
|
|
9
|
+
"data-testid"?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare function LanguageSelector({ value, options, onChange }: LanguageSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function LanguageSelector({ value, options, onChange, "data-testid": testId, }: LanguageSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,5 +13,6 @@ export interface MultiselectProps {
|
|
|
13
13
|
removeLabel?: string;
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
error?: boolean;
|
|
16
|
+
"data-testid"?: string;
|
|
16
17
|
}
|
|
17
|
-
export declare function Multiselect({ options, value, onChange, placeholder, searchPlaceholder, noResultsText, removeLabel, disabled, error, }: MultiselectProps): ReactElement;
|
|
18
|
+
export declare function Multiselect({ options, value, onChange, placeholder, searchPlaceholder, noResultsText, removeLabel, disabled, error, "data-testid": testId, }: MultiselectProps): ReactElement;
|
|
@@ -7,5 +7,6 @@ export interface NavBarProps {
|
|
|
7
7
|
isLoading?: boolean;
|
|
8
8
|
isPinLocked?: boolean;
|
|
9
9
|
rightSlot?: ReactNode;
|
|
10
|
+
"data-testid"?: string;
|
|
10
11
|
}
|
|
11
|
-
export declare function NavBar({ restaurantName, onMenuToggle, onLogoClick, onRightToggle, isLoading, isPinLocked, rightSlot, }: NavBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export declare function NavBar({ restaurantName, onMenuToggle, onLogoClick, onRightToggle, isLoading, isPinLocked, rightSlot, "data-testid": testId, }: NavBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -2,6 +2,7 @@ export interface PageLoadingOverlayProps {
|
|
|
2
2
|
isOpen: boolean;
|
|
3
3
|
/** Screen-reader announcement text. Defaults to "Cargando…" */
|
|
4
4
|
label?: string;
|
|
5
|
+
"data-testid"?: string;
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
7
8
|
* Full-screen blocking overlay for page-level loading states.
|
|
@@ -14,4 +15,4 @@ export interface PageLoadingOverlayProps {
|
|
|
14
15
|
* <PageLoadingOverlay isOpen={isPending} />
|
|
15
16
|
* <PageLoadingOverlay isOpen={isPending} label="Guardando cambios…" />
|
|
16
17
|
*/
|
|
17
|
-
export declare function PageLoadingOverlay({ isOpen, label }: PageLoadingOverlayProps): import("react").ReactPortal;
|
|
18
|
+
export declare function PageLoadingOverlay({ isOpen, label, "data-testid": testId, }: PageLoadingOverlayProps): import("react").ReactPortal;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface PermissionGateProps {
|
|
3
|
+
/** Permission decision resolved by the consumer app. When false, renders fallback. */
|
|
4
|
+
granted: boolean;
|
|
5
|
+
/** Rendered when granted is true. */
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/** Rendered when granted is false. @default null */
|
|
8
|
+
fallback?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Accepted to satisfy the DS `data-testid` convention and to let consumers spread
|
|
11
|
+
* a testid coming from a parent without a TypeScript error. It is intentionally
|
|
12
|
+
* UNUSED: this component renders a React fragment with no DOM root to attach it to
|
|
13
|
+
* (identical to `React.Fragment`, which also ignores `data-testid`). If you need a
|
|
14
|
+
* testable DOM node, put it on the children you pass in.
|
|
15
|
+
*/
|
|
16
|
+
"data-testid"?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* PermissionGate — a purely PRESENTATIONAL / STRUCTURAL primitive.
|
|
20
|
+
*
|
|
21
|
+
* It contains NO RBAC logic: no scopes, no bitwise actions, no hooks, no stores.
|
|
22
|
+
* Each consumer app computes the permission decision and passes it in as the
|
|
23
|
+
* `granted` boolean. When `granted` is true the `children` are rendered, otherwise
|
|
24
|
+
* the `fallback` (default `null`) is rendered.
|
|
25
|
+
*
|
|
26
|
+
* It renders a React fragment with NO DOM wrapper, so it never injects an anonymous
|
|
27
|
+
* layout node into a flex/grid container. There is no `.module.css` for this
|
|
28
|
+
* component because it has no visual surface of its own.
|
|
29
|
+
*/
|
|
30
|
+
export declare function PermissionGate({ granted, children, fallback }: PermissionGateProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { PermissionGate } from "../PermissionGate";
|
|
3
|
+
declare const meta: Meta<typeof PermissionGate>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof PermissionGate>;
|
|
6
|
+
export declare const Granted: Story;
|
|
7
|
+
export declare const Denied_: Story;
|
|
8
|
+
export declare const DeniedNoFallback: Story;
|
|
9
|
+
export declare const DynamicToggle: Story;
|
|
10
|
+
export declare const BothThemes: Story;
|
|
@@ -2,5 +2,6 @@ import type { ReactNode } from "react";
|
|
|
2
2
|
export interface PinLockOverlayProps {
|
|
3
3
|
isLocked: boolean;
|
|
4
4
|
children: ReactNode;
|
|
5
|
+
"data-testid"?: string;
|
|
5
6
|
}
|
|
6
|
-
export declare function PinLockOverlay({ isLocked, children }: PinLockOverlayProps): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export declare function PinLockOverlay({ isLocked, children, "data-testid": testId }: PinLockOverlayProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -14,7 +14,8 @@ export type ProductTileType = {
|
|
|
14
14
|
export type ProductTileProps = {
|
|
15
15
|
product: ProductTileType;
|
|
16
16
|
onAdd: (product: ProductTileType) => void;
|
|
17
|
+
"data-testid"?: string;
|
|
17
18
|
};
|
|
18
|
-
declare function ProductTileComponent({ product, onAdd }: ProductTileProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function ProductTileComponent({ product, onAdd, "data-testid": testId }: ProductTileProps): import("react/jsx-runtime").JSX.Element;
|
|
19
20
|
export declare const ProductTile: import("react").MemoExoticComponent<typeof ProductTileComponent>;
|
|
20
21
|
export {};
|
|
@@ -2,5 +2,6 @@ import type { InputHTMLAttributes } from "react";
|
|
|
2
2
|
export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
3
3
|
label?: string;
|
|
4
4
|
ref?: React.Ref<HTMLInputElement>;
|
|
5
|
+
"data-testid"?: string;
|
|
5
6
|
}
|
|
6
|
-
export declare function Radio({ label, className, id, ref, ...props }: RadioProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function Radio({ label, className, id, ref, "data-testid": testId, ...props }: RadioProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type InputHTMLAttributes } from "react";
|
|
2
|
+
export interface SearchInputProps {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
onClear?: () => void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
label: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
clearLabel?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Native attributes/handlers forwarded to the underlying `<input type="search">`
|
|
14
|
+
* (e.g. `name`, `autoComplete`, `onBlur`, `onKeyDown`, `aria-describedby`).
|
|
15
|
+
* The component-controlled props (`value`, `onChange`, `id`, `type`, `disabled`,
|
|
16
|
+
* `placeholder`, `className`) remain the source of truth and cannot be overridden here.
|
|
17
|
+
*/
|
|
18
|
+
inputProps?: Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "id" | "type" | "disabled" | "placeholder" | "className">;
|
|
19
|
+
"data-testid"?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function SearchInput({ value, onChange, onClear, placeholder, label, id: idProp, disabled, clearLabel, className, inputProps, "data-testid": testId, }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { SearchInput } from "../SearchInput";
|
|
3
|
+
declare const meta: Meta<typeof SearchInput>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof SearchInput>;
|
|
6
|
+
export declare const Empty: Story;
|
|
7
|
+
export declare const WithValue: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
9
|
+
export declare const DisabledWithValue: Story;
|
|
10
|
+
export declare const CustomPlaceholder: Story;
|
|
11
|
+
export declare const BothThemes: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { IconNameType as IconName } from "../Icon";
|
|
3
|
+
export interface SectionHeaderProps {
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
icon?: IconName;
|
|
7
|
+
iconSize?: number;
|
|
8
|
+
headingLevel?: 1 | 2 | 3 | 4;
|
|
9
|
+
actions?: ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
"data-testid"?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function SectionHeader({ title, description, icon, iconSize, headingLevel, actions, className, "data-testid": testId, }: SectionHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { SectionHeader } from "../SectionHeader";
|
|
3
|
+
declare const meta: Meta<typeof SectionHeader>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof SectionHeader>;
|
|
6
|
+
export declare const TitleOnly: Story;
|
|
7
|
+
export declare const TitleAndDescription: Story;
|
|
8
|
+
export declare const WithIconAndDescription: Story;
|
|
9
|
+
export declare const WithIconAndActions: Story;
|
|
10
|
+
export declare const WithMultipleActions: Story;
|
|
11
|
+
export declare const HeadingLevel1: Story;
|
|
12
|
+
export declare const HeadingLevel3: Story;
|
|
13
|
+
export declare const HeadingLevel4: Story;
|
|
14
|
+
export declare const AllHeadingLevels: Story;
|
|
15
|
+
export declare const BothThemes: Story;
|
|
@@ -7,5 +7,6 @@ export interface SidebarNavSectionProps {
|
|
|
7
7
|
isActive?: boolean;
|
|
8
8
|
className?: string;
|
|
9
9
|
children: ReactNode;
|
|
10
|
+
"data-testid"?: string;
|
|
10
11
|
}
|
|
11
|
-
export declare function SidebarNavSection({ title, icon, titleSuffix, defaultOpen, isActive, className, children, }: SidebarNavSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function SidebarNavSection({ title, icon, titleSuffix, defaultOpen, isActive, className, children, "data-testid": testId, }: SidebarNavSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,5 +4,6 @@ export interface SkeletonProps {
|
|
|
4
4
|
height?: string | number;
|
|
5
5
|
variant?: SkeletonVariant;
|
|
6
6
|
className?: string;
|
|
7
|
+
"data-testid"?: string;
|
|
7
8
|
}
|
|
8
|
-
export declare function Skeleton({ width, height, variant, className }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function Skeleton({ width, height, variant, className, "data-testid": testId, }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,5 +3,6 @@ export interface SpinnerProps {
|
|
|
3
3
|
size?: SpinnerSize;
|
|
4
4
|
label?: string;
|
|
5
5
|
className?: string;
|
|
6
|
+
"data-testid"?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare function Spinner({ size, label, className }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function Spinner({ size, label, className, "data-testid": testId, }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { BadgeSize, BadgeVariant } from "../Badge";
|
|
3
|
+
export interface StatusBadgeProps {
|
|
4
|
+
status: string;
|
|
5
|
+
labels: Record<string, string>;
|
|
6
|
+
variants: Record<string, BadgeVariant>;
|
|
7
|
+
fallbackLabel?: string;
|
|
8
|
+
fallbackVariant?: BadgeVariant;
|
|
9
|
+
size?: BadgeSize;
|
|
10
|
+
"data-testid"?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function StatusBadge({ status, labels, variants, fallbackLabel, fallbackVariant, size, "data-testid": testId, }: StatusBadgeProps): React.ReactElement;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { StatusBadge } from "../StatusBadge";
|
|
3
|
+
declare const meta: Meta<typeof StatusBadge>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof StatusBadge>;
|
|
6
|
+
export declare const Success: Story;
|
|
7
|
+
export declare const Warning: Story;
|
|
8
|
+
export declare const Error: Story;
|
|
9
|
+
export declare const Info: Story;
|
|
10
|
+
export declare const UnknownFallbackToStatus: Story;
|
|
11
|
+
export declare const UnknownWithFallbackLabel: Story;
|
|
12
|
+
export declare const SizeSmall: Story;
|
|
13
|
+
export declare const SizeMedium: Story;
|
|
14
|
+
export declare const AllVariants: Story;
|
|
15
|
+
export declare const BothSizes: Story;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface StepperProps {
|
|
2
|
+
value: number;
|
|
3
|
+
onChange: (value: number) => void;
|
|
4
|
+
/** Lower bound (inclusive). Must be ≤ `max`. @default 0 */
|
|
5
|
+
min?: number;
|
|
6
|
+
/** Upper bound (inclusive). Must be ≥ `min`. @default Number.MAX_SAFE_INTEGER */
|
|
7
|
+
max?: number;
|
|
8
|
+
/** Increment size. Must be > 0. @default 1 */
|
|
9
|
+
step?: number;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** Accessible name for the `role="group"` container. Required — an unnamed group is an a11y violation. */
|
|
12
|
+
"aria-label": string;
|
|
13
|
+
decrementLabel?: string;
|
|
14
|
+
incrementLabel?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
"data-testid"?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function Stepper({ value, onChange, min, max, step, disabled, "aria-label": ariaLabel, decrementLabel, incrementLabel, className, "data-testid": testId, }: StepperProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { Stepper } from "../Stepper";
|
|
3
|
+
declare const meta: Meta<typeof Stepper>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Stepper>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const AtMin: Story;
|
|
8
|
+
export declare const AtMax: Story;
|
|
9
|
+
export declare const FullyDisabled: Story;
|
|
10
|
+
export declare const CustomStep: Story;
|
|
11
|
+
export declare const BothThemes: Story;
|