@toteat-eng/ds-react 2026.6.9 → 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.
@@ -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,2 @@
1
+ export type { BannerProps, BannerVariant } from "./Banner";
2
+ export { Banner } from "./Banner";
@@ -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;
@@ -0,0 +1,2 @@
1
+ export type { BreadcrumbItem, BreadcrumbProps } from "./Breadcrumb";
2
+ export { Breadcrumb } from "./Breadcrumb";
@@ -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;
@@ -0,0 +1,2 @@
1
+ export type { PermissionGateProps } from "./PermissionGate";
2
+ export { PermissionGate } from "./PermissionGate";
@@ -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,2 @@
1
+ export type { SearchInputProps } from "./SearchInput";
2
+ export { SearchInput } from "./SearchInput";
@@ -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;
@@ -0,0 +1,2 @@
1
+ export type { StepperProps } from "./Stepper";
2
+ export { Stepper } from "./Stepper";
@@ -1,5 +1,5 @@
1
1
  import { type InputHTMLAttributes } from "react";
2
- export type TextInputSize = "small" | "medium";
2
+ export type TextInputSize = "small" | "medium" | "large";
3
3
  export interface TextInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
4
4
  error?: boolean;
5
5
  showPasswordToggle?: boolean;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./tokens/base.css";
2
2
  import "./tokens/animations.css";
3
3
  import "./tokens/theme-angular.css";
4
- import "./tokens/theme-vue3.css";
4
+ import "./tokens/toteat-react-ds.css";
5
5
  export { Accordion } from "./components/Accordion";
6
6
  export type { AppleSignInButtonProps } from "./components/AppleSignInButton";
7
7
  export { AppleSignInButton } from "./components/AppleSignInButton";
@@ -9,6 +9,10 @@ export type { BackgroundWrapperProps } from "./components/BackgroundWrapper";
9
9
  export { BackgroundWrapper } from "./components/BackgroundWrapper";
10
10
  export type { BadgeProps, BadgeSize, BadgeVariant } from "./components/Badge";
11
11
  export { Badge } from "./components/Badge";
12
+ export type { BannerProps, BannerVariant } from "./components/Banner";
13
+ export { Banner } from "./components/Banner";
14
+ export type { BreadcrumbItem, BreadcrumbProps } from "./components/Breadcrumb";
15
+ export { Breadcrumb } from "./components/Breadcrumb";
12
16
  export type { ButtonProps, ButtonSize, ButtonVariant, } from "./components/Button";
13
17
  export { Button } from "./components/Button";
14
18
  export type { CardElevation, CardPadding, CardProps } from "./components/Card";
@@ -68,10 +72,14 @@ export type { OverlayMessageProps, OverlayMessageStatus } from "./components/Ove
68
72
  export { OverlayMessage } from "./components/OverlayMessage";
69
73
  export type { PageLoadingOverlayProps } from "./components/PageLoadingOverlay";
70
74
  export { PageLoadingOverlay } from "./components/PageLoadingOverlay";
75
+ export type { PermissionGateProps } from "./components/PermissionGate";
76
+ export { PermissionGate } from "./components/PermissionGate";
71
77
  export type { PinLockOverlayProps } from "./components/PinLockOverlay";
72
78
  export { PinLockOverlay } from "./components/PinLockOverlay";
73
79
  export type { RadioProps } from "./components/Radio";
74
80
  export { Radio } from "./components/Radio";
81
+ export type { SearchInputProps } from "./components/SearchInput";
82
+ export { SearchInput } from "./components/SearchInput";
75
83
  export type { SectionHeaderProps } from "./components/SectionHeader";
76
84
  export { SectionHeader } from "./components/SectionHeader";
77
85
  export type { SelectOption, SelectProps } from "./components/Select";
@@ -88,6 +96,8 @@ export type { SpinnerProps, SpinnerSize } from "./components/Spinner";
88
96
  export { Spinner } from "./components/Spinner";
89
97
  export type { StatusBadgeProps } from "./components/StatusBadge";
90
98
  export { StatusBadge } from "./components/StatusBadge";
99
+ export type { StepperProps } from "./components/Stepper";
100
+ export { Stepper } from "./components/Stepper";
91
101
  export type { TabBarProps, TabBarVariant } from "./components/TabBar";
92
102
  export { TabBar } from "./components/TabBar";
93
103
  export type { TabItem, TabsProps } from "./components/Tabs";
@@ -126,5 +136,6 @@ export { PageLayout } from "./layouts/PageLayout";
126
136
  export type { StackAlign, StackDirection, StackGap, StackJustify, StackProps, } from "./layouts/Stack";
127
137
  export { Stack } from "./layouts/Stack";
128
138
  export { cn } from "./utils/cn";
139
+ export { escapeCell, rowsToCsv } from "./utils/csv";
129
140
  export { useFocusTrap } from "./utils/focusTrap";
130
141
  export { portal } from "./utils/portal";