gantri-components 2.265.0 → 2.267.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.
@@ -1,12 +1,16 @@
1
1
  /// <reference types="react" />
2
2
  import { Property } from 'csstype';
3
3
  import { Color } from '../../styles';
4
+ import { DropdownMenuSurface } from './dropdown-menu.types';
5
+ type StyledSurfaceProp = {
6
+ $surface?: DropdownMenuSurface;
7
+ };
4
8
  export declare const StyledContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
5
9
  $borderColor: Color | undefined;
6
10
  $hasHeader?: boolean | undefined;
7
11
  $noShadow: boolean;
8
- }>> & string;
9
- export declare const StyledHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
12
+ } & StyledSurfaceProp>> & string;
13
+ export declare const StyledHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, StyledSurfaceProp>> & string;
10
14
  export declare const StyledItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
11
15
  $basic: boolean;
12
16
  $disabled?: boolean | undefined;
@@ -14,3 +18,4 @@ export declare const StyledItem: import("styled-components/dist/types").IStyledC
14
18
  $justifyContent: Property.JustifyContent | undefined;
15
19
  $selected?: boolean | undefined;
16
20
  }>> & string;
21
+ export {};
@@ -4,6 +4,19 @@ import { Maybe } from '../../global';
4
4
  import { Color } from '../../styles';
5
5
  import { TooltipProps } from '../tooltip/tooltip.types';
6
6
  import { DynamicListItem } from '../components.types';
7
+ /**
8
+ * Visual treatment of the dropdown menu surface.
9
+ *
10
+ * - `'solid'` (default): the existing flat popover surface. Preserves
11
+ * backward compatibility for every dropdown menu already in the app.
12
+ * - `'dynamic'`: a layered translucent "diffuser" (frosted-glass) surface
13
+ * for modern themes — luminosity + overlay blends, 32px backdrop blur,
14
+ * inner glow, and a rounded popover. Text, dividers and hover states use
15
+ * the dynamic (light/white) tokens so labels stay readable on the dark
16
+ * glass. On classic themes this falls back to the solid look, exactly like
17
+ * `Modal surface="dynamic"`.
18
+ */
19
+ export type DropdownMenuSurface = 'solid' | 'dynamic';
7
20
  export interface DropdownMenuProps<T extends DynamicListItem<Record<any, any>>> {
8
21
  autoSelectFirst?: boolean;
9
22
  borderColor?: Color;
@@ -32,6 +45,16 @@ export interface DropdownMenuProps<T extends DynamicListItem<Record<any, any>>>
32
45
  searchable?: boolean;
33
46
  /** Optionally provide to highlight multiple items as selected. */
34
47
  selectedItems?: DynamicListItem<T>[];
48
+ /**
49
+ * Visual treatment of the menu surface. Defaults to `'solid'`.
50
+ *
51
+ * Set to `'dynamic'` to render the frosted-glass diffuser surface on the
52
+ * modern themes (dark translucent glass with light text), mirroring
53
+ * `Modal surface="dynamic"`. On classic themes it falls back to the solid
54
+ * look. Fully backward compatible — omitting it keeps the existing solid
55
+ * surface.
56
+ */
57
+ surface?: DropdownMenuSurface;
35
58
  /**
36
59
  * Escape hatch for end-to-end tests when no other prop distinguishes two
37
60
  * sibling instances. When provided, the root receives