@dinofront/design_system 1.13.0 → 1.15.0

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,2 @@
1
+ import { DeviceRestrictionProps } from './DeviceRestriction.types';
2
+ export declare const DeviceRestriction: import('react').ForwardRefExoticComponent<DeviceRestrictionProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,8 @@
1
+ import { TranslationLocale } from '../../types';
2
+ import { DeviceRestrictionType } from './DeviceRestriction.types';
3
+ interface DeviceRestrictionCopy {
4
+ title: string;
5
+ description: string;
6
+ }
7
+ export declare const DEVICE_RESTRICTION_TRANSLATIONS: Record<TranslationLocale, Record<DeviceRestrictionType, DeviceRestrictionCopy>>;
8
+ export {};
@@ -0,0 +1,23 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { BaseProps, TranslationLocale } from '../../types';
3
+ export type DeviceRestrictionType = 'mobile' | 'tablet' | 'desktop' | 'mobile-tablet';
4
+ export interface DeviceRestrictionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, BaseProps {
5
+ /** Which device(s) the page requires. Drives the default icon, title, and
6
+ * description. Defaults to `'desktop'`. */
7
+ type?: DeviceRestrictionType;
8
+ /** Defaults to a translated built-in string for `type`. */
9
+ title?: ReactNode;
10
+ /** Defaults to a translated built-in string for `type`. */
11
+ description?: ReactNode;
12
+ /** Defaults to a `type`-specific lucide icon in an `IconTile` — pass your
13
+ * own node to override. */
14
+ icon?: ReactNode;
15
+ /** Language for the built-in title/description. An explicit `title`/
16
+ * `description` still takes precedence over the translated default.
17
+ * Default `'en-US'`. */
18
+ locale?: TranslationLocale;
19
+ /** Stretches the component to fill its container's height (`h-full`),
20
+ * for centering inside a full-viewport-height parent. Off by default —
21
+ * the component never forces a height on its own. */
22
+ fillHeight?: boolean;
23
+ }
@@ -0,0 +1,2 @@
1
+ export { DeviceRestriction } from './DeviceRestriction';
2
+ export type { DeviceRestrictionProps, DeviceRestrictionType } from './DeviceRestriction.types';
@@ -1,3 +1,3 @@
1
1
  import { SnackbarContextValue, SnackbarProviderProps } from './Snackbar.types';
2
2
  export declare function useSnackbar(): SnackbarContextValue;
3
- export declare function SnackbarProvider({ children, dataTestId }: SnackbarProviderProps): import("react").JSX.Element;
3
+ export declare function SnackbarProvider({ children, dataTestId, position: defaultPosition, }: SnackbarProviderProps): import("react").JSX.Element;
@@ -1,14 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { BaseProps } from '../../types';
3
3
  export type SnackbarVariant = 'success' | 'warning' | 'danger' | 'info' | 'neutral';
4
- /**
5
- * A single toast entry. `dataTestId` is optional per-toast so callers can
6
- * tag a specific `show()` call for e2e selection (there's no other prop
7
- * surface to hang a QA hook off — the toast itself is never a
8
- * consumer-authored JSX element, just a data object passed to `show()`).
9
- */
4
+ export type SnackbarPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
10
5
  export interface SnackbarItem extends BaseProps {
11
6
  id: string;
7
+ /** Overrides the provider's `position` for this toast only. */
8
+ position?: SnackbarPosition;
12
9
  message: ReactNode;
13
10
  variant?: SnackbarVariant;
14
11
  duration?: number;
@@ -25,4 +22,6 @@ export interface SnackbarContextValue {
25
22
  }
26
23
  export interface SnackbarProviderProps extends BaseProps {
27
24
  children: ReactNode;
25
+ /** Default position for toasts that don't set their own. Defaults to `bottom-center`. */
26
+ position?: SnackbarPosition;
28
27
  }
@@ -1,2 +1,2 @@
1
1
  export { SnackbarProvider, useSnackbar } from './Snackbar';
2
- export type { SnackbarVariant, SnackbarItem, SnackbarContextValue, SnackbarProviderProps, } from './Snackbar.types';
2
+ export type { SnackbarVariant, SnackbarItem, SnackbarPosition, SnackbarContextValue, SnackbarProviderProps, } from './Snackbar.types';
package/dist/index.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from './components/Checkbox';
10
10
  export * from './components/Copy';
11
11
  export * from './components/Counter';
12
12
  export * from './components/DatePicker';
13
+ export * from './components/DeviceRestriction';
13
14
  export * from './components/DistributionBar';
14
15
  export * from './components/Divider';
15
16
  export * from './components/Drawer';