@tap-payments/os-micro-frontend-shared 0.3.228-test.5 → 0.3.228-test.7

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.
Files changed (78) hide show
  1. package/build/_chunks/{chunk-ACYZKBPV.js → chunk-DBFH6OKQ.js} +1 -1
  2. package/build/_chunks/chunk-DEQ2OTPX.js +1 -0
  3. package/build/_chunks/{chunk-SK6KKISG.js → chunk-GAL3X7PR.js} +1 -1
  4. package/build/_chunks/chunk-LZDMCI4Q.js +2 -0
  5. package/build/_chunks/{chunk-TJEYGSF4.js → chunk-MQOX7MKN.js} +1 -1
  6. package/build/_chunks/{chunk-FKG3SYY6.js → chunk-TETJCQSC.js} +1 -1
  7. package/build/_chunks/{chunk-B26W6GO2.js → chunk-U62XSJM5.js} +1 -1
  8. package/build/_chunks/chunk-V2Z6RD2T.js +1 -0
  9. package/build/_chunks/{chunk-VMU2XKPL.js → chunk-W4PURLBP.js} +1 -1
  10. package/build/components/AppServices/index.js +1 -1
  11. package/build/components/AppServicesBar/index.js +1 -1
  12. package/build/components/AppWindowWrapper/index.js +1 -1
  13. package/build/components/AvatarStack/AnimatedStack.d.ts +9 -0
  14. package/build/components/AvatarStack/AvatarStack.d.ts +5 -0
  15. package/build/components/AvatarStack/AvatarStackItem.d.ts +4 -0
  16. package/build/components/AvatarStack/StaticStack.d.ts +4 -0
  17. package/build/components/AvatarStack/constants.d.ts +29 -0
  18. package/build/components/AvatarStack/hooks/useAnimatedStack.d.ts +25 -0
  19. package/build/components/AvatarStack/index.d.ts +4 -0
  20. package/build/components/AvatarStack/index.js +1 -0
  21. package/build/components/AvatarStack/style.d.ts +303 -0
  22. package/build/components/AvatarStack/type.d.ts +122 -0
  23. package/build/components/AvatarStack/utils.d.ts +55 -0
  24. package/build/components/BrandLogo/index.js +1 -1
  25. package/build/components/ColumnViews/index.js +1 -1
  26. package/build/components/DateFilter/index.js +1 -1
  27. package/build/components/ExpandableSideBar/index.js +1 -1
  28. package/build/components/FileInputPreview/index.js +1 -1
  29. package/build/components/FilterDropdown/index.js +1 -1
  30. package/build/components/FormSelect/index.js +1 -1
  31. package/build/components/JSONViewer/index.js +1 -1
  32. package/build/components/ListColumnFilter/index.js +1 -1
  33. package/build/components/ListHeader/index.js +1 -1
  34. package/build/components/MerchantLogo/index.js +1 -1
  35. package/build/components/MultiSelect/index.js +1 -1
  36. package/build/components/NestedMultiSelect/BranchMenuItem.d.ts +2 -2
  37. package/build/components/NestedMultiSelect/FieldSelectedValues.d.ts +2 -6
  38. package/build/components/NestedMultiSelect/NodeMenuItem.d.ts +2 -3
  39. package/build/components/NestedMultiSelect/SelectableOption.d.ts +1 -2
  40. package/build/components/NestedMultiSelect/constants.d.ts +3 -8
  41. package/build/components/NestedMultiSelect/index.d.ts +1 -2
  42. package/build/components/NestedMultiSelect/index.js +1 -1
  43. package/build/components/NestedMultiSelect/style.d.ts +9 -3
  44. package/build/components/NestedMultiSelect/type.d.ts +9 -39
  45. package/build/components/NestedMultiSelect/utils.d.ts +11 -42
  46. package/build/components/PaymentSourceFilter/index.js +1 -1
  47. package/build/components/PhoneFilter/index.js +1 -1
  48. package/build/components/RangeCalender/index.js +1 -1
  49. package/build/components/ReferenceTypeFilter/index.js +1 -1
  50. package/build/components/StatusFilter/index.js +1 -1
  51. package/build/components/StatusIcons/index.js +1 -1
  52. package/build/components/TableCells/index.js +1 -1
  53. package/build/components/TableReports/index.js +1 -1
  54. package/build/components/VerificationIcon/index.js +1 -1
  55. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  56. package/build/components/VirtualTables/index.js +1 -1
  57. package/build/components/WindowSideBar/index.js +1 -1
  58. package/build/components/index.d.ts +3 -2
  59. package/build/components/index.js +1 -1
  60. package/build/index.js +1 -1
  61. package/package.json +2 -2
  62. package/build/_chunks/chunk-A3NFFHVK.js +0 -2
  63. package/build/_chunks/chunk-WE7NB24K.js +0 -1
  64. package/build/_chunks/chunk-XR6MZIKM.js +0 -2
  65. package/build/components/ChipStack/ChipStack.d.ts +0 -67
  66. package/build/components/ChipStack/components/AnimatedStack.d.ts +0 -24
  67. package/build/components/ChipStack/components/ChipStackFaceSlot.d.ts +0 -11
  68. package/build/components/ChipStack/components/OverlapChip.d.ts +0 -9
  69. package/build/components/ChipStack/components/StaticStack.d.ts +0 -12
  70. package/build/components/ChipStack/constants.d.ts +0 -14
  71. package/build/components/ChipStack/hooks/useAnimatedStack.d.ts +0 -28
  72. package/build/components/ChipStack/index.d.ts +0 -10
  73. package/build/components/ChipStack/index.js +0 -1
  74. package/build/components/ChipStack/style.d.ts +0 -31
  75. package/build/components/ChipStack/types.d.ts +0 -127
  76. package/build/components/ChipStack/util.d.ts +0 -74
  77. package/build/components/NestedMultiSelect/SelectedChips.d.ts +0 -16
  78. package/build/components/NestedMultiSelect/icons.d.ts +0 -2
@@ -1,67 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ChipStackProps } from './types';
3
- /**
4
- * Overlapping chip row for avatars, logos, flags, or any circular content.
5
- *
6
- * ### Variant
7
- * Pick one of four variants — the variant encodes both the render mode and fan-out direction:
8
- *
9
- * | Variant | Behavior |
10
- * |---|---|
11
- * | `"static"` *(default)* | Overlapping row, no animation |
12
- * | `"fanout-right"` | Fans right on hover (anchor: leftmost chip) |
13
- * | `"fanout-left"` | Fans left on hover (anchor: rightmost chip) |
14
- * | `"fanout-center"` | Fans both ways on hover (anchor: middle chip) |
15
- *
16
- * Add `compact` to show only the anchor chip until hovered.
17
- *
18
- * ### Input styles
19
- * - **Data-driven** — `items` + `getItemKey` + `renderItem`
20
- * - **Compositional** — `children` (wrap in `<OverlapChip>` for static, or pass raw nodes)
21
- *
22
- * When both are provided, `children` takes precedence. Face avatars: `ChipStackFaceSlot` in `renderItem` with `getChipStackFaceItemKey` as `getItemKey`.
23
- * Hoist `renderItem` to module scope when referential stability matters.
24
- *
25
- * ---
26
- *
27
- * ### Examples
28
- *
29
- * ```tsx
30
- * <ChipStack
31
- * variant="fanout-right"
32
- * items={members}
33
- * getItemKey={getChipStackFaceItemKey}
34
- * renderItem={(item, index, { slotSize }) => (
35
- * <ChipStackFaceSlot item={item} sourceIndex={index} slotSize={slotSize} />
36
- * )}
37
- * />
38
- * ```
39
- *
40
- * ```tsx
41
- * // Brand logos — static overlap row
42
- * <ChipStack variant="static" maxItems={4}>
43
- * {methods.map((m) => (
44
- * <OverlapChip key={m.id} title={m.label}>
45
- * <img src={m.logo} alt={m.label} />
46
- * </OverlapChip>
47
- * ))}
48
- * </ChipStack>
49
- * ```
50
- *
51
- * ```tsx
52
- * // Custom overflow slot
53
- * <ChipStack
54
- * variant="fanout-right"
55
- * items={assignees}
56
- * getItemKey={(a) => a.id}
57
- * renderItem={renderFaceItem}
58
- * maxItems={3}
59
- * renderOverflow={({ overflowItems, size }) => (
60
- * <MyBadge count={overflowItems.length} size={size} />
61
- * )}
62
- * />
63
- * ```
64
- */
65
- declare function ChipStack<T = unknown>(props: Readonly<ChipStackProps<T>>): import("react").JSX.Element | null;
66
- export default ChipStack;
67
- export { ChipStack };
@@ -1,24 +0,0 @@
1
- import type { BoxProps } from '@mui/material/Box';
2
- import type { ReactNode } from 'react';
3
- import type { ChipStackOverflowRenderArgs, ChipStackFanOutDirection, ChipStackItemRenderContext, ChipStackSlotProps } from '../types';
4
- type AnimatedStackProps<T> = {
5
- children?: ReactNode;
6
- items?: readonly T[];
7
- maxItems?: number;
8
- getItemKey?: (item: T, index: number) => string;
9
- renderItem?: (item: T, index: number, ctx: ChipStackItemRenderContext) => ReactNode;
10
- renderOverflow?: (args: ChipStackOverflowRenderArgs<T>) => ReactNode;
11
- /** Fan-out direction derived from `variant` in the parent. */
12
- fanOutDirection: ChipStackFanOutDirection;
13
- /**
14
- * When `true` (`compact` prop on `ChipStack`), only the anchor chip is
15
- * visible while idle. Hovering reveals all chips with the fan-out animation.
16
- */
17
- compact?: boolean;
18
- 'data-testid'?: string;
19
- sx?: BoxProps['sx'];
20
- className?: string;
21
- slotProps?: Pick<ChipStackSlotProps, 'shell' | 'track' | 'layout'>;
22
- };
23
- export default function AnimatedStack<T>({ items, children, maxItems, getItemKey, renderItem, renderOverflow, fanOutDirection, compact, 'data-testid': dataTestId, sx, className, slotProps, }: Readonly<AnimatedStackProps<T>>): import("react").JSX.Element | null;
24
- export {};
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ChipStackFaceItem } from '../types';
3
- type Props = {
4
- item: ChipStackFaceItem;
5
- sourceIndex: number;
6
- slotSize: number;
7
- };
8
- export type ChipStackFaceSlotProps = Props;
9
- /** Face chip for `ChipStack` `renderItem`. */
10
- declare function ChipStackFaceSlot({ item, sourceIndex, slotSize }: Props): import("react").JSX.Element;
11
- export default ChipStackFaceSlot;
@@ -1,9 +0,0 @@
1
- import type { ComponentProps } from 'react';
2
- import { StyledOverlapChip } from '../style';
3
- /**
4
- * Single circular chip used inside `ChipStack` (**static** variant). Pass an icon, image, or text node as children.
5
- * Use a `title` for the hover tooltip.
6
- */
7
- declare function OverlapChip(props: ComponentProps<typeof StyledOverlapChip>): import("react").JSX.Element;
8
- declare const _default: import("react").MemoExoticComponent<typeof OverlapChip>;
9
- export default _default;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import type { BoxProps } from '@mui/material/Box';
3
- import type { ReactNode } from 'react';
4
- import type { ChipStackOverflowRenderArgs } from '../types';
5
- export type StaticStackProps = BoxProps & {
6
- maxItems?: number;
7
- renderOverflow?: (args: ChipStackOverflowRenderArgs<ReactNode>) => ReactNode;
8
- slotSize?: number;
9
- };
10
- declare function StaticStack({ children, maxItems, renderOverflow, slotSize, sx, ...props }: StaticStackProps): React.JSX.Element;
11
- declare const _default: React.MemoExoticComponent<typeof StaticStack>;
12
- export default _default;
@@ -1,14 +0,0 @@
1
- /** Default circular slot size (px); used to derive stack step, gap, and min track width. */
2
- export declare const OVERLAP_STACK_SIZE_PX = 24;
3
- export declare const OVERLAP_STACK_GAP_PX = 3;
4
- export declare const OVERLAP_STACK_MIN_TRACK_WIDTH_PX = 60;
5
- /** Fan-out animation duration (s) for the animated variant (per-slot translate transitions). */
6
- export declare const CHIP_STACK_ANIMATED_DURATION_S = 0.22;
7
- /** Hover-leave debounce (ms) before collapsing the row, to absorb pointer jitter between slots. */
8
- export declare const CHIP_STACK_HOVER_LEAVE_MS = 120;
9
- /** Default elevated z-index applied to the track while hovered. */
10
- export declare const CHIP_STACK_DEFAULT_HOVER_Z_INDEX = 1000;
11
- /** Minimum legible font size for the overflow chip. */
12
- export declare const CHIP_STACK_OVERFLOW_MIN_FONT_PX = 8;
13
- /** Reference font size for the overflow chip at the default slot size. */
14
- export declare const CHIP_STACK_OVERFLOW_REF_FONT_PX = 8.5;
@@ -1,28 +0,0 @@
1
- /// <reference types="react" />
2
- export type UseAnimatedStackArgs = {
3
- slotCount: number;
4
- /** Anchor slot index — resolved from fan direction in `AnimatedStack`. */
5
- anchorIndex: number;
6
- size: number;
7
- stackStep: number;
8
- gap: number;
9
- /** Whether hover should expand the row into the fanned layout. */
10
- fanOutEnabled: boolean;
11
- /**
12
- * When `true` (`compact` prop on `ChipStack`), non-anchor chips are
13
- * invisible while idle and animate into view on hover.
14
- */
15
- compact: boolean;
16
- };
17
- export declare function useAnimatedStack({ slotCount, anchorIndex, size, stackStep, gap, fanOutEnabled, compact }: UseAnimatedStackArgs): {
18
- isHovering: boolean;
19
- handleMouseEnter: () => void;
20
- handleMouseLeave: () => void;
21
- slotRefs: import("react").MutableRefObject<(HTMLDivElement | null)[]>;
22
- translateX: number[];
23
- slotOpacity: number[];
24
- collapsedStackWidthPx: number;
25
- fannedRowWidthPx: number;
26
- trackWidth: number;
27
- hoverZIndexActive: boolean;
28
- };
@@ -1,10 +0,0 @@
1
- import ChipStack from './ChipStack';
2
- export default ChipStack;
3
- export { ChipStack };
4
- export { default as OverlapChip } from './components/OverlapChip';
5
- export { default as ChipStackFaceSlot } from './components/ChipStackFaceSlot';
6
- export type { ChipStackFaceSlotProps } from './components/ChipStackFaceSlot';
7
- export { getChipStackFaceItemKey } from './util';
8
- export { OVERLAP_STACK_SIZE_PX, CHIP_STACK_ANIMATED_DURATION_S } from './constants';
9
- export { CHIP_STACK_VARIANTS, DEFAULT_CHIP_STACK_VARIANT } from './types';
10
- export type { ChipStackProps, ChipStackFaceItem, ChipStackVariant, ChipStackSlotProps, ChipStackItemRenderContext, ChipStackOverflowRenderArgs, } from './types';
@@ -1 +0,0 @@
1
- export{s as CHIP_STACK_ANIMATED_DURATION_S,v as CHIP_STACK_VARIANTS,x as ChipStack,y as ChipStackFaceSlot,w as DEFAULT_CHIP_STACK_VARIANT,r as OVERLAP_STACK_SIZE_PX,u as OverlapChip,z as default,t as getChipStackFaceItemKey}from'../../_chunks/chunk-WE7NB24K.js';import'../../_chunks/chunk-TIO3V7XA.js';import'../../_chunks/chunk-4XXNGLS6.js';import'../../_chunks/chunk-V2RLDP5A.js';import'../../_chunks/chunk-ZDBICST5.js';
@@ -1,31 +0,0 @@
1
- import { type BoxProps } from '@mui/material/Box';
2
- import type { Theme } from '@mui/material/styles';
3
- import type { ReactNode } from 'react';
4
- import type { ChipStackOverflowRenderArgs } from './types';
5
- export declare const AnimatedStackShell: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
7
- }, keyof import("@mui/system").BoxOwnProps<Theme>> & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
8
- export declare const AnimatedStackTrack: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme> & {
9
- trackWidth: number;
10
- minTrackWidth: number;
11
- slotSize: number;
12
- hoverZIndex?: number | undefined;
13
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
14
- export declare const OverlapChipRow: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
15
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
16
- }, keyof import("@mui/system").BoxOwnProps<Theme>> & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
17
- export declare const StyledOverlapChip: import("@emotion/styled").StyledComponent<Omit<BoxProps, "title"> & {
18
- title?: ReactNode;
19
- } & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
20
- /** Default styled `+N` chip for the **static** variant overflow slot. */
21
- export declare const ChipStackStaticOverflowChip: import("@emotion/styled").StyledComponent<Omit<BoxProps, "title"> & {
22
- title?: ReactNode;
23
- } & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
24
- /** Default overflow renderer used when `renderOverflow` is not provided. */
25
- export declare function ChipStackOverflowDefault({ overflowItems, size }: Readonly<ChipStackOverflowRenderArgs>): import("react").JSX.Element;
26
- export declare const ChipStackFace: import("@emotion/styled").StyledComponent<Omit<Omit<import("../primitives").AvatarProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
27
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
28
- } & import("@mui/system").MUIStyledCommonProps<Theme> & {
29
- faceSize: number;
30
- avatarFill: string;
31
- }, {}, {}>;
@@ -1,127 +0,0 @@
1
- import type { BoxProps } from '@mui/material/Box';
2
- import type { HTMLAttributes, ReactNode } from 'react';
3
- /**
4
- * Controls both the render mode and (for fanout variants) the fan-out direction.
5
- *
6
- * - `"static"` — overlapping row, no hover animation **(default)**
7
- * - `"fanout-right"` — fans right on hover (anchor: leftmost chip)
8
- * - `"fanout-left"` — fans left on hover (anchor: rightmost chip)
9
- * - `"fanout-center"` — fans both ways on hover (anchor: middle chip)
10
- */
11
- export type ChipStackVariant = 'static' | 'fanout-right' | 'fanout-left' | 'fanout-center';
12
- /** All variant values — useful for building selects/controls. */
13
- export declare const CHIP_STACK_VARIANTS: readonly ["static", "fanout-right", "fanout-left", "fanout-center"];
14
- /** Default variant when `variant` is omitted. */
15
- export declare const DEFAULT_CHIP_STACK_VARIANT: ChipStackVariant;
16
- /** Resolved internally from `variant` — not exposed as a prop. */
17
- export type ChipStackFanOutDirection = 'right' | 'left' | 'center';
18
- /** Passed to `renderItem` so the callback knows how large to render each chip. */
19
- export type ChipStackItemRenderContext = {
20
- slotSize: number;
21
- };
22
- /**
23
- * Passed to `renderOverflow` when items exceed `maxItems`.
24
- *
25
- * @template T — matches the `items` array type on `ChipStackProps<T>`.
26
- * `ReactNode` for compositional (children) usage.
27
- */
28
- export type ChipStackOverflowRenderArgs<T = unknown> = {
29
- /** The full `items` array passed to `ChipStack`. */
30
- items: readonly T[];
31
- /** The hidden items that overflowed past `maxItems`. */
32
- overflowItems: readonly T[];
33
- /** Chip diameter in px — size your overflow chip to this value. */
34
- size: number;
35
- };
36
- export type ChipStackFaceItem = {
37
- /** Optional stable key — defaults to `first-last-index`. */
38
- id?: string;
39
- first: string;
40
- last: string;
41
- /** Omitted or broken → initials on gradient. */
42
- logo?: string;
43
- /** Custom tooltip content — defaults to `"First Last"`. Pass `null` to disable. */
44
- tooltip?: ReactNode | null;
45
- };
46
- /**
47
- * Fine-grained style/prop overrides for internal slots.
48
- */
49
- export type ChipStackSlotProps = {
50
- /** Outer flex shell wrapping the chip track (`Box`). */
51
- shell?: BoxProps;
52
- /** Positioned `<div>` holding all chip slots — use for `aria-label` and other HTML attributes. */
53
- track?: HTMLAttributes<HTMLDivElement>;
54
- /**
55
- * Layout dimensions for the animated track.
56
- * Pass here instead of as top-level props to keep the component surface clean.
57
- */
58
- layout?: {
59
- /** Z-index of the track while hovered. @default 1000 */
60
- zIndex?: number;
61
- /** Chip diameter in px. @default 24 */
62
- size?: number;
63
- /** Horizontal distance between stacked chips in px. */
64
- stackStep?: number;
65
- /** Space between chips when fully expanded in px. */
66
- gap?: number;
67
- /** Minimum width of the chip track container in px. */
68
- minTrackWidth?: number;
69
- };
70
- };
71
- /**
72
- * Props for `ChipStack`.
73
- *
74
- * Two input styles:
75
- * - **Data-driven** — `items` + `getItemKey` + `renderItem`
76
- * - **Compositional** — `children` (wrap in `OverlapChip` for static, or pass raw nodes)
77
- *
78
- * When both are provided, `children` takes precedence and `items` is ignored.
79
- */
80
- export type ChipStackProps<T = unknown> = {
81
- /**
82
- * Controls render mode and fan-out direction.
83
- *
84
- * - `"static"` — overlapping row, no animation **(default)**
85
- * - `"fanout-right"` — fans right on hover
86
- * - `"fanout-left"` — fans left on hover
87
- * - `"fanout-center"` — fans both ways on hover
88
- */
89
- variant?: ChipStackVariant;
90
- /** Data array. Requires `getItemKey` and `renderItem`. */
91
- items?: readonly T[];
92
- getItemKey?: (item: T, index: number) => string;
93
- renderItem?: (item: T, index: number, ctx: ChipStackItemRenderContext) => ReactNode;
94
- /** Rendered as-is. Wrap in `OverlapChip` for static variants. */
95
- children?: ReactNode;
96
- /** Cap visible chips; collapse the rest into a `+N` indicator. */
97
- maxItems?: number;
98
- /**
99
- * **Fanout variants only.** When `true`, only the anchor chip is visible while idle.
100
- * Hovering reveals all chips with the fan-out animation defined by `variant`.
101
- *
102
- * Pairs with any `fanout-*` variant:
103
- * ```tsx
104
- * <ChipStack variant="fanout-right" compact items={apps} ... />
105
- * ```
106
- *
107
- * @default false
108
- */
109
- compact?: boolean;
110
- /**
111
- * Fully replace the `+N` overflow slot.
112
- * Receives `{ items, overflowItems, size }` where `items` is the full data array
113
- * and `overflowItems` is the hidden slice.
114
- *
115
- * ```tsx
116
- * renderOverflow={({ items, overflowItems, size }) => (
117
- * <MyPopover trigger={`+${overflowItems.length}`} chipSize={size} data={items} />
118
- * )}
119
- * ```
120
- */
121
- renderOverflow?: (args: ChipStackOverflowRenderArgs<T>) => ReactNode;
122
- sx?: BoxProps['sx'];
123
- className?: string;
124
- /** Style/prop overrides for internal slots and layout dimensions. */
125
- slotProps?: ChipStackSlotProps;
126
- 'data-testid'?: string;
127
- };
@@ -1,74 +0,0 @@
1
- import type { MutableRefObject, ReactNode } from 'react';
2
- import type { ChipStackFaceItem, ChipStackFanOutDirection, ChipStackOverflowRenderArgs, ChipStackVariant } from './types';
3
- type ChipStackAnimatedLayout = {
4
- size: number;
5
- stackStep: number;
6
- gap: number;
7
- minTrackWidth: number;
8
- };
9
- type ChipStackAnimatedLayoutOverrides = Partial<ChipStackAnimatedLayout>;
10
- export type ChipStackSlotModel = {
11
- key: string;
12
- render: () => ReactNode;
13
- };
14
- /** Three exclusive render paths resolved from props. */
15
- export declare enum ChipStackRenderMode {
16
- StaticChildren = "static-children",
17
- StaticItems = "static-items",
18
- AnimatedChildren = "animated-children",
19
- AnimatedItems = "animated-items"
20
- }
21
- /** Returns true when the variant is any of the animated variants. */
22
- export declare function isAnimatedVariant(variant: ChipStackVariant): boolean;
23
- /**
24
- * Extracts the fan-out direction from the variant string.
25
- * Only meaningful for fanout variants.
26
- */
27
- export declare function getFanOutDirection(variant: ChipStackVariant): ChipStackFanOutDirection;
28
- /**
29
- * Resolves which render path `ChipStack` should take.
30
- * Returns `null` when there is nothing to render.
31
- */
32
- export declare function resolveChipStackMode(variant: ChipStackVariant, hasChildren: boolean, hasItems: boolean): ChipStackRenderMode | null;
33
- export declare function getChipStackAnimatedLayout({ size: sizeProp, stackStep: stackStepProp, gap: gapProp, minTrackWidth: minTrackWidthProp, }: ChipStackAnimatedLayoutOverrides): ChipStackAnimatedLayout;
34
- export declare function getFanOutAnchorIndex(slotCount: number, direction: ChipStackFanOutDirection): number;
35
- /** True when `maxItems` forces overflow handling. */
36
- export declare function isChipStackAnimatedCapped(sourceCount: number, maxItems: number | undefined): boolean;
37
- /**
38
- * Splits `items` into visible and hidden slices based on `maxItems`.
39
- *
40
- * Overflow triggers when `items.length >= maxItems` and `maxItems >= 1`.
41
- * The first `maxItems - 1` items are visible; the rest are hidden.
42
- * When `maxItems` is undefined or `< 1`, all items are visible and hidden is empty.
43
- */
44
- export declare function splitChipStackOverflow<T>(items: readonly T[], maxItems: number | undefined): {
45
- visibleItems: readonly T[];
46
- hiddenItems: readonly T[];
47
- };
48
- export declare function getReactChildKey(child: unknown, index: number): string;
49
- export declare function buildChipStackSlots<T>({ items, maxItems, getItemKey, renderItem, renderOverflow, slotSize, }: {
50
- items: readonly T[];
51
- maxItems: number | undefined;
52
- getItemKey: (item: T, sourceIndex: number) => string;
53
- renderItem: (item: T, sourceIndex: number, ctx: {
54
- slotSize: number;
55
- }) => ReactNode;
56
- renderOverflow: (args: ChipStackOverflowRenderArgs<T>) => ReactNode;
57
- slotSize: number;
58
- }): ChipStackSlotModel[];
59
- export declare function buildChipStackSlotsFromChildren({ children, maxItems, slotSize, renderOverflow, }: {
60
- children: ReactNode;
61
- maxItems: number | undefined;
62
- slotSize: number;
63
- renderOverflow: (args: ChipStackOverflowRenderArgs<ReactNode>) => ReactNode;
64
- }): ChipStackSlotModel[];
65
- export declare function areSlotWidthArraysEqual(a: number[], b: number[]): boolean;
66
- export declare function computeFannedOutLeftPositionsPx(slotCount: number, anchorIndex: number, slotWidthsPx: number[], gap: number, stackStep: number, fallbackSlotWidthPx: number): number[];
67
- export declare function computeCollapsedStackWidthPx(slotCount: number, stackStep: number, faceSize: number): number;
68
- export declare function computeFanOutTranslateXPx(slotCount: number, isHovering: boolean, fannedLeftPositionsPx: number[], stackStep: number): number[];
69
- export declare function computeFannedRowWidthPx(slotCount: number, fannedLeftPositionsPx: number[], slotWidthsPx: number[], collapsedWidthPx: number, fallbackSlotWidthPx: number): number;
70
- export declare function readMeasuredSlotWidthsPx(slotCount: number, slotRefs: MutableRefObject<Array<HTMLDivElement | null>>, fallbackSlotWidthPx: number): number[];
71
- export declare function getChipStackFaceItemKey(item: ChipStackFaceItem, index: number): string;
72
- export declare function getChipStackFaceInitials(item: ChipStackFaceItem): string;
73
- export declare function getChipStackFaceItemTooltipContent(item: ChipStackFaceItem): ReactNode | null;
74
- export {};
@@ -1,16 +0,0 @@
1
- /// <reference types="react" />
2
- import type { NestedMultiSelectOption } from './type';
3
- type SelectedChipsProps = {
4
- options: NestedMultiSelectOption[];
5
- /** Closed field, or the selected row under the menu search. Both use the field chip metrics. */
6
- variant: 'field' | 'menu';
7
- hiddenCount?: number;
8
- onRemove?: (option: NestedMultiSelectOption) => void;
9
- };
10
- /**
11
- * Selected chips for the closed field and the menu. Chips keep the field's natural width.
12
- * Each line takes as many as fit, and the leftover width is used by the next chip when it still
13
- * has room for most of that chip.
14
- */
15
- declare function SelectedChips({ options, variant, hiddenCount, onRemove }: Readonly<SelectedChipsProps>): import("react").JSX.Element;
16
- export default SelectedChips;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const RightArrowIcon: () => import("react").JSX.Element;