@toteat-eng/ds-react 2026.6.10-1 → 2026.6.10-2
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/CloseButton/CloseButton.d.ts +18 -0
- package/dist/components/CloseButton/index.d.ts +2 -0
- package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/dist/components/ExtrasDialog/index.d.ts +1 -1
- package/dist/components/ProductTile/index.d.ts +1 -1
- package/dist/hooks/useScrollLock.d.ts +19 -0
- package/dist/hooks/useToggle.d.ts +7 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.es.js +1384 -1227
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +10 -10
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface CloseButtonProps {
|
|
2
|
+
onClick?: () => void;
|
|
3
|
+
/** Accessible name for the dismiss button. */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Icon size in px (also drives the rendered close glyph size). */
|
|
6
|
+
size?: number;
|
|
7
|
+
/** Consumer class applied alongside the zero-specificity baseline, so the
|
|
8
|
+
* host component's exact look is preserved. */
|
|
9
|
+
className?: string;
|
|
10
|
+
"data-testid"?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Internal dismiss-button primitive. NOT part of the public API — used to
|
|
14
|
+
* de-duplicate the bespoke close buttons across Dialog, Toast, Banner and
|
|
15
|
+
* OverlayMessage. Renders a single native `<button>` containing the canonical
|
|
16
|
+
* `close-outline` icon.
|
|
17
|
+
*/
|
|
18
|
+
export declare function CloseButton({ onClick, label, size, className, "data-testid": testId, }: CloseButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,6 +15,6 @@ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBo
|
|
|
15
15
|
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
16
16
|
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
17
17
|
handleRetry: () => void;
|
|
18
|
-
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> |
|
|
18
|
+
render(): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
19
19
|
}
|
|
20
20
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { ExtrasDialogProps } from "./ExtrasDialog";
|
|
1
|
+
export type { ExtrasCategoryType, ExtrasDialogProps, SelectedExtraType } from "./ExtrasDialog";
|
|
2
2
|
export { ExtrasDialog } from "./ExtrasDialog";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { ProductTileProps } from "./ProductTile";
|
|
1
|
+
export type { ProductTileProps, ProductTileType, StockStatusType } from "./ProductTile";
|
|
2
2
|
export { ProductTile } from "./ProductTile";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface UseScrollLockOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Locking strategy.
|
|
4
|
+
* - `"fixed"` (default): pins `document.body` with `position: fixed` and
|
|
5
|
+
* restores the scroll position on release. This is Dialog's behavior —
|
|
6
|
+
* it prevents the page from jumping when the scrollbar disappears.
|
|
7
|
+
* - `"overflow"`: only sets `document.body.style.overflow = "hidden"`.
|
|
8
|
+
* This is Overlay's lighter behavior.
|
|
9
|
+
*/
|
|
10
|
+
strategy?: "fixed" | "overflow";
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Locks body scroll while `lock` is true and restores the previous state on
|
|
14
|
+
* cleanup (release / unmount). Internal hook — not part of the public API.
|
|
15
|
+
*
|
|
16
|
+
* Behavior is extracted verbatim from Dialog (`strategy: "fixed"`) and Overlay
|
|
17
|
+
* (`strategy: "overflow"`) so neither consumer changes visually or behaviorally.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useScrollLock(lock: boolean, options?: UseScrollLockOptions): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type UseToggleReturn = [boolean, () => void, React.Dispatch<React.SetStateAction<boolean>>];
|
|
2
|
+
/**
|
|
3
|
+
* Minimal boolean toggle state. Returns `[state, toggle, setState]`.
|
|
4
|
+
* Internal hook — not part of the public API. Used to de-duplicate the
|
|
5
|
+
* open/close booleans in Accordion and SidebarNavSection.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useToggle(initial?: boolean): UseToggleReturn;
|
package/dist/index.d.ts
CHANGED
|
@@ -46,6 +46,8 @@ export type { EmptyStateProps } from "./components/EmptyState";
|
|
|
46
46
|
export { EmptyState } from "./components/EmptyState";
|
|
47
47
|
export type { ErrorBoundaryProps } from "./components/ErrorBoundary";
|
|
48
48
|
export { ErrorBoundary } from "./components/ErrorBoundary";
|
|
49
|
+
export type { ExtrasCategoryType, ExtrasDialogProps, SelectedExtraType, } from "./components/ExtrasDialog";
|
|
50
|
+
export { ExtrasDialog } from "./components/ExtrasDialog";
|
|
49
51
|
export type { FormFieldProps } from "./components/FormField";
|
|
50
52
|
export { FormField } from "./components/FormField";
|
|
51
53
|
export type { GoogleSignInButtonProps } from "./components/GoogleSignInButton";
|
|
@@ -76,6 +78,8 @@ export type { PermissionGateProps } from "./components/PermissionGate";
|
|
|
76
78
|
export { PermissionGate } from "./components/PermissionGate";
|
|
77
79
|
export type { PinLockOverlayProps } from "./components/PinLockOverlay";
|
|
78
80
|
export { PinLockOverlay } from "./components/PinLockOverlay";
|
|
81
|
+
export type { ProductTileProps, ProductTileType, StockStatusType } from "./components/ProductTile";
|
|
82
|
+
export { ProductTile } from "./components/ProductTile";
|
|
79
83
|
export type { RadioProps } from "./components/Radio";
|
|
80
84
|
export { Radio } from "./components/Radio";
|
|
81
85
|
export type { SearchInputProps } from "./components/SearchInput";
|