@estiva-app/ui 0.9.0 → 0.10.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.
- package/dist/Avatar.d.ts +13 -1
- package/dist/Avatar.d.ts.map +1 -1
- package/dist/AvatarGroup.d.ts.map +1 -1
- package/dist/Banner.d.ts +16 -1
- package/dist/Banner.d.ts.map +1 -1
- package/dist/Breadcrumb.d.ts +9 -0
- package/dist/Breadcrumb.d.ts.map +1 -1
- package/dist/Button.d.ts +12 -2
- package/dist/Button.d.ts.map +1 -1
- package/dist/Checkbox.d.ts +2 -0
- package/dist/Checkbox.d.ts.map +1 -1
- package/dist/Chip.d.ts +3 -2
- package/dist/Chip.d.ts.map +1 -1
- package/dist/ChipInput.d.ts +3 -1
- package/dist/ChipInput.d.ts.map +1 -1
- package/dist/ConfirmDialog.d.ts +5 -0
- package/dist/ConfirmDialog.d.ts.map +1 -1
- package/dist/DialogShell.d.ts +27 -3
- package/dist/DialogShell.d.ts.map +1 -1
- package/dist/EditableText.d.ts +6 -0
- package/dist/EditableText.d.ts.map +1 -1
- package/dist/Field.d.ts +42 -25
- package/dist/Field.d.ts.map +1 -1
- package/dist/IconButton.d.ts +3 -2
- package/dist/IconButton.d.ts.map +1 -1
- package/dist/IdentityMenu.d.ts +25 -13
- package/dist/IdentityMenu.d.ts.map +1 -1
- package/dist/Menu.d.ts +65 -82
- package/dist/Menu.d.ts.map +1 -1
- package/dist/PersonTrigger.d.ts.map +1 -1
- package/dist/Popover.d.ts +86 -0
- package/dist/Popover.d.ts.map +1 -0
- package/dist/PreviewCard.d.ts +39 -0
- package/dist/PreviewCard.d.ts.map +1 -0
- package/dist/Reaction.d.ts.map +1 -1
- package/dist/ReactionPicker.d.ts +55 -0
- package/dist/ReactionPicker.d.ts.map +1 -0
- package/dist/SearchInput.d.ts +5 -0
- package/dist/SearchInput.d.ts.map +1 -1
- package/dist/Select.d.ts +26 -16
- package/dist/Select.d.ts.map +1 -1
- package/dist/Tabs.d.ts +11 -1
- package/dist/Tabs.d.ts.map +1 -1
- package/dist/TextInput.d.ts +7 -1
- package/dist/TextInput.d.ts.map +1 -1
- package/dist/Textarea.d.ts +8 -1
- package/dist/Textarea.d.ts.map +1 -1
- package/dist/Toolbar.d.ts +95 -0
- package/dist/Toolbar.d.ts.map +1 -0
- package/dist/Tooltip.d.ts +36 -10
- package/dist/Tooltip.d.ts.map +1 -1
- package/dist/cn.d.ts.map +1 -1
- package/dist/fit.d.ts +7 -72
- package/dist/fit.d.ts.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +882 -763
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/src/Avatar.mdx +17 -0
- package/src/Avatar.name.test.tsx +99 -0
- package/src/Avatar.tsx +25 -3
- package/src/AvatarGroup.tsx +4 -1
- package/src/Banner.mdx +10 -2
- package/src/Banner.stories.tsx +29 -0
- package/src/Banner.test.tsx +60 -0
- package/src/Banner.tsx +35 -3
- package/src/Breadcrumb.mdx +5 -2
- package/src/Breadcrumb.test.tsx +44 -0
- package/src/Breadcrumb.tsx +10 -2
- package/src/Button.compose.test.tsx +119 -0
- package/src/Button.mdx +7 -5
- package/src/Button.test.tsx +2 -1
- package/src/Button.tsx +21 -5
- package/src/Checkbox.tsx +3 -0
- package/src/Chip.tsx +3 -2
- package/src/ChipInput.tsx +4 -0
- package/src/ConfirmDialog.mdx +20 -1
- package/src/ConfirmDialog.test.tsx +109 -0
- package/src/ConfirmDialog.tsx +6 -0
- package/src/DialogShell.mdx +18 -4
- package/src/DialogShell.stories.tsx +56 -6
- package/src/DialogShell.test.tsx +184 -0
- package/src/DialogShell.tsx +108 -39
- package/src/EditableText.mdx +6 -1
- package/src/EditableText.test.tsx +156 -0
- package/src/EditableText.tsx +23 -5
- package/src/Field.mdx +23 -3
- package/src/Field.stories.tsx +35 -0
- package/src/Field.test.tsx +117 -27
- package/src/Field.tsx +86 -58
- package/src/IconButton.mdx +6 -2
- package/src/IconButton.test.tsx +5 -2
- package/src/IconButton.tsx +12 -6
- package/src/IdentityMenu.mdx +29 -6
- package/src/IdentityMenu.stories.tsx +41 -6
- package/src/IdentityMenu.tsx +74 -47
- package/src/Kbd.stories.tsx +3 -3
- package/src/Menu.mdx +88 -75
- package/src/Menu.stories.tsx +120 -52
- package/src/Menu.test.tsx +315 -0
- package/src/Menu.tsx +341 -251
- package/src/MenuItem.stories.tsx +135 -98
- package/src/NavItem.mdx +1 -1
- package/src/PersonTrigger.mdx +20 -14
- package/src/PersonTrigger.tsx +23 -1
- package/src/Popover.mdx +130 -0
- package/src/Popover.stories.tsx +222 -0
- package/src/Popover.test.tsx +188 -0
- package/src/Popover.tsx +153 -0
- package/src/PreviewCard.mdx +98 -0
- package/src/PreviewCard.stories.tsx +168 -0
- package/src/PreviewCard.test.tsx +83 -0
- package/src/PreviewCard.tsx +91 -0
- package/src/Rail.mdx +63 -0
- package/src/Rail.stories.tsx +81 -0
- package/src/Reaction.mdx +4 -2
- package/src/Reaction.tsx +4 -2
- package/src/ReactionPicker.mdx +85 -0
- package/src/ReactionPicker.stories.tsx +120 -0
- package/src/ReactionPicker.test.tsx +118 -0
- package/src/ReactionPicker.tsx +88 -0
- package/src/SearchInput.mdx +6 -2
- package/src/SearchInput.tsx +7 -1
- package/src/Select.mdx +16 -5
- package/src/Select.test.tsx +157 -0
- package/src/Select.tsx +89 -214
- package/src/Sidebar.mdx +6 -2
- package/src/Tabs.mdx +5 -0
- package/src/Tabs.test.tsx +15 -0
- package/src/Tabs.tsx +17 -2
- package/src/TextInput.mdx +8 -2
- package/src/TextInput.tsx +10 -7
- package/src/Textarea.mdx +6 -2
- package/src/Textarea.tsx +14 -9
- package/src/Toolbar.mdx +104 -0
- package/src/Toolbar.stories.tsx +142 -0
- package/src/Toolbar.test.tsx +198 -0
- package/src/Toolbar.tsx +158 -0
- package/src/Tooltip.mdx +43 -5
- package/src/Tooltip.stories.tsx +26 -0
- package/src/Tooltip.test.tsx +195 -0
- package/src/Tooltip.tsx +150 -48
- package/src/cn.ts +1 -1
- package/src/fit.test.ts +101 -0
- package/src/fit.ts +19 -63
- package/src/index.ts +6 -3
- package/stories/Choosing.mdx +8 -3
- package/tailwind-preset.js +7 -0
- package/src/Menu.fit.test.ts +0 -90
- package/src/Select.fit.test.ts +0 -101
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { ReactNode, Ref } from 'react';
|
|
2
|
+
import { type IconButtonProps } from './IconButton';
|
|
3
|
+
import { type TextInputProps } from './TextInput';
|
|
4
|
+
/**
|
|
5
|
+
* A strip of controls that behaves as **one** control.
|
|
6
|
+
*
|
|
7
|
+
* New at Katerina's request, 2026-09-08, pulled forward from stage 6.
|
|
8
|
+
*
|
|
9
|
+
* **It exists because every strip in the suite is as many Tab stops as it has
|
|
10
|
+
* buttons.** Ship's reaction row, Peek's composer strip and the editor's
|
|
11
|
+
* formatting strip are each a hand-rolled `<div class="flex">` of
|
|
12
|
+
* `IconButton`s: eight buttons, eight stops, and no way to get past them but
|
|
13
|
+
* through them. A toolbar is one stop — Tab in, arrow keys along, Tab out —
|
|
14
|
+
* which is what the `toolbar` role means and what Base UI's part implements.
|
|
15
|
+
*
|
|
16
|
+
* What it is not: a `Menu` (that is a list of *verbs* you open and choose
|
|
17
|
+
* from, and it closes when you do) or a row of unrelated buttons (a form's
|
|
18
|
+
* Cancel and Save are two separate answers, and each deserves its own stop).
|
|
19
|
+
* A toolbar is a set of things you do *to* something that is still there.
|
|
20
|
+
*
|
|
21
|
+
* **It draws the box.** A toolbar floats over what it acts on — a card, a
|
|
22
|
+
* paragraph, an image — so it carries the elevated surface that separates it
|
|
23
|
+
* from that: the same `MenuPanel` a `Menu` draws, because a floating strip and
|
|
24
|
+
* a floating list are the same box. Peek had built this twice and the two had
|
|
25
|
+
* already drifted — `ConversationQuickMenu` is `rounded-sm` with `shadow-sm`
|
|
26
|
+
* and a subtle border, `ReactionPicker` `rounded-lg` with `shadow-lg` and a
|
|
27
|
+
* default one. There is one box now. `surface={false}` for a strip inside
|
|
28
|
+
* something that already draws it.
|
|
29
|
+
*
|
|
30
|
+
* **The gap, stated: Home and End do nothing.** Base UI's composite has them
|
|
31
|
+
* and its `Toolbar` does not switch them on (`enableHomeAndEndKeys`, read in
|
|
32
|
+
* `useCompositeRoot`, not passed by `ToolbarRoot`) — so this page does not
|
|
33
|
+
* claim them. The arrow keys wrap, which reaches both ends in one press of a
|
|
34
|
+
* strip this size.
|
|
35
|
+
*/
|
|
36
|
+
export interface ToolbarProps {
|
|
37
|
+
/**
|
|
38
|
+
* Names the strip for assistive tech — "Formatting", "Reactions". A toolbar
|
|
39
|
+
* is a landmark-ish grouping and is announced as a bare "toolbar" without
|
|
40
|
+
* one, which says nothing when a page has two.
|
|
41
|
+
*/
|
|
42
|
+
'aria-label': string;
|
|
43
|
+
/** `horizontal` walks with ← →, `vertical` with ↑ ↓. Default horizontal. */
|
|
44
|
+
orientation?: 'horizontal' | 'vertical';
|
|
45
|
+
/** Whether the arrow keys wrap at the ends. Default true, as Base UI's. */
|
|
46
|
+
loopFocus?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* The elevated box around the strip. **On by default** — a toolbar floats,
|
|
49
|
+
* and this is what floating looks like here.
|
|
50
|
+
*
|
|
51
|
+
* Off for a strip inside a surface that already draws one: a `Popover`, a
|
|
52
|
+
* dialog, a card's own panel. Two boxes inside each other is the tell.
|
|
53
|
+
*/
|
|
54
|
+
surface?: boolean;
|
|
55
|
+
children: ReactNode;
|
|
56
|
+
/** The row's own layout — its gap, its padding, its wrapping. */
|
|
57
|
+
className?: string;
|
|
58
|
+
}
|
|
59
|
+
export declare function Toolbar({ 'aria-label': ariaLabel, orientation, loopFocus, surface, children, className }: ToolbarProps): import("react").JSX.Element;
|
|
60
|
+
/**
|
|
61
|
+
* One control in the strip. It is this package's `IconButton` — the same
|
|
62
|
+
* square, the same variants, the same `tooltip` and `disabledReason` — joined
|
|
63
|
+
* to the toolbar's roving focus.
|
|
64
|
+
*
|
|
65
|
+
* A disabled button **keeps its place in the walk**: a strip whose controls
|
|
66
|
+
* come and go from the arrow keys as their state changes is a strip you cannot
|
|
67
|
+
* learn. It is also what lets a `disabledReason` be read.
|
|
68
|
+
*
|
|
69
|
+
* **It must be inside a `Toolbar`.** Base UI throws otherwise —
|
|
70
|
+
* "ToolbarRootContext is missing" — because a part with no strip has no walk
|
|
71
|
+
* to join. A control beside a strip is an `IconButton`.
|
|
72
|
+
*/
|
|
73
|
+
export interface ToolbarButtonProps extends IconButtonProps {
|
|
74
|
+
ref?: Ref<HTMLButtonElement>;
|
|
75
|
+
}
|
|
76
|
+
export declare function ToolbarButton({ ref, disabled, disabledReason, ...props }: ToolbarButtonProps): import("react").JSX.Element;
|
|
77
|
+
/**
|
|
78
|
+
* A text field inside the strip — the link editor in a selection toolbar.
|
|
79
|
+
*
|
|
80
|
+
* The arrow keys belong to the field while it has focus, which is the whole
|
|
81
|
+
* point: ← and → move the caret. The toolbar's walk resumes at Tab. That is
|
|
82
|
+
* Base UI's `Toolbar.Input`, and it is why a field in a toolbar cannot just be
|
|
83
|
+
* a `TextInput` dropped in the row.
|
|
84
|
+
*/
|
|
85
|
+
export type ToolbarInputProps = TextInputProps;
|
|
86
|
+
export declare function ToolbarInput(props: ToolbarInputProps): import("react").JSX.Element;
|
|
87
|
+
/**
|
|
88
|
+
* The hairline between two groups of controls. It is `Divider`'s rule and
|
|
89
|
+
* `Toolbar.Separator`'s role, so a screen reader hears the grouping a sighted
|
|
90
|
+
* reader sees.
|
|
91
|
+
*/
|
|
92
|
+
export declare function ToolbarSeparator({ className }: {
|
|
93
|
+
className?: string;
|
|
94
|
+
}): import("react").JSX.Element;
|
|
95
|
+
//# sourceMappingURL=Toolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../src/Toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAA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WithRef, ReactElement, ReactNode } from 'react';
|
|
2
|
+
export interface TooltipProviderProps {
|
|
3
|
+
/** Before the first tooltip in the group opens. Default 300ms (D23). */
|
|
4
|
+
delay?: number;
|
|
5
|
+
/** Before one closes. Default: immediately, as it always has. */
|
|
6
|
+
closeDelay?: number;
|
|
7
|
+
/** How long after one closes its neighbours still open instantly. */
|
|
8
|
+
timeout?: number;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}
|
|
2
11
|
/**
|
|
3
|
-
*
|
|
12
|
+
* Mount once at the top of an app: it makes every tooltip below it share one
|
|
13
|
+
* delay, so the second and third open instantly while the group is warm.
|
|
4
14
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* to the viewport and kept 8px inside it. The wrapper is `inline-flex` and
|
|
8
|
-
* shrinks nothing — wrap a control, never a block (a form inside it
|
|
9
|
-
* collapses to its content width; Ship learnt that).
|
|
15
|
+
* Without it each tooltip still waits its own 300ms — nothing breaks, the row
|
|
16
|
+
* simply pauses on every button instead of once.
|
|
10
17
|
*/
|
|
11
|
-
export
|
|
18
|
+
export declare function TooltipProvider({ delay, closeDelay, timeout, children }: TooltipProviderProps): import("react").JSX.Element;
|
|
19
|
+
/** `ComponentPropsWithRef` because the pill is what `Tooltip.Popup` renders —
|
|
20
|
+
* Base UI merges its own props and ref into this element, so both must land. */
|
|
21
|
+
export interface TooltipProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {
|
|
12
22
|
label: string;
|
|
13
23
|
/** The key that does the same thing, drawn as the `Kbd` chip after the label.
|
|
14
24
|
* Pass it already formatted for the platform — this renders, it does not
|
|
15
25
|
* decide whether the modifier is a glyph or a word. */
|
|
16
26
|
shortcut?: string;
|
|
17
|
-
className?: string;
|
|
18
27
|
}
|
|
19
|
-
export declare function Tooltip({ label, shortcut, className }: TooltipProps): import("react").JSX.Element;
|
|
28
|
+
export declare function Tooltip({ label, shortcut, className, ...props }: TooltipProps): import("react").JSX.Element;
|
|
20
29
|
export interface WithTooltipProps {
|
|
21
30
|
label: string;
|
|
22
31
|
/** Passed straight to the surface — see `TooltipProps.shortcut`. */
|
|
@@ -27,4 +36,21 @@ export interface WithTooltipProps {
|
|
|
27
36
|
children: ReactNode;
|
|
28
37
|
}
|
|
29
38
|
export declare function WithTooltip({ label, shortcut, placement, wrapperClassName, children }: WithTooltipProps): import("react").JSX.Element;
|
|
39
|
+
/**
|
|
40
|
+
* The tooltip a control wears itself, rather than through a wrapper.
|
|
41
|
+
*
|
|
42
|
+
* `Button` and `IconButton` call this: the Base UI button element becomes the
|
|
43
|
+
* `Tooltip.Trigger`, so the component's root stays the `<button>`. That is
|
|
44
|
+
* what stage 3 ran into and could not fix — an `IconButton` with a tooltip
|
|
45
|
+
* returned the wrapper `<div>`, so a `Dialog.Close` composed onto the wrapper
|
|
46
|
+
* and the ✕ could never be the part.
|
|
47
|
+
*
|
|
48
|
+
* Internal: the two buttons' `tooltip` / `disabledReason` props are the API.
|
|
49
|
+
*/
|
|
50
|
+
export declare function TooltipTrigger({ label, shortcut, placement, children }: {
|
|
51
|
+
label: string;
|
|
52
|
+
shortcut?: string;
|
|
53
|
+
placement?: 'top' | 'bottom';
|
|
54
|
+
children: ReactElement;
|
|
55
|
+
}): import("react").JSX.Element;
|
|
30
56
|
//# sourceMappingURL=Tooltip.d.ts.map
|
package/dist/Tooltip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../src/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../src/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AA+B3E,MAAM,WAAW,oBAAoB;IACnC,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iEAAiE;IACjE,UA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|
-
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../src/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,gBAAgB,UAIrB,CAAA;AAED;;;;;;GAMG;AACH,QAAA,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../src/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,gBAAgB,UAIrB,CAAA;AAED;;;;;;GAMG;AACH,QAAA,MAAM,iBAAiB,UAAqG,CAAA;AAC5H,QAAA,MAAM,kBAAkB,UAAkC,CAAA;AAY1D,0EAA0E;AAC1E,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,OAAO,EAAE,gBAAgB,IAAI,eAAe,EAAE,iBAAiB,IAAI,gBAAgB,EAAE,kBAAkB,IAAI,iBAAiB,EAAE,CAAA"}
|
package/dist/fit.d.ts
CHANGED
|
@@ -1,26 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* testable without a browser.
|
|
2
|
+
* Where a list of this size goes, given its anchor and the viewport.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Where a menu of this size goes, given its anchor and the viewport.
|
|
14
|
-
*
|
|
15
|
-
* Left is clamped inside the viewport with an 8px margin. Height is capped
|
|
16
|
-
* at `cap` — Select's option list keeps the old `max-h-72` (288), a menu
|
|
17
|
-
* panel passes none and uses all the room it opens into, so it scrolls only
|
|
18
|
-
* when the screen truly has no space (the identity panel got Select's cap
|
|
19
|
-
* by accident and grew a scrollbar at full height, 2026-09-03) — but never
|
|
20
|
-
* taller than that room; when the room below the anchor is smaller than
|
|
21
|
-
* both the content and the room above, the menu opens UPWARD (anchored to
|
|
22
|
-
* the trigger's top via `bottom`). The 120px floor keeps a menu usable even
|
|
23
|
-
* in a cramped corner — scrollable beats invisible.
|
|
4
|
+
* Left is clamped inside the viewport with an 8px margin. Height is capped at
|
|
5
|
+
* `cap` — `ChipInput` passes 240, its old `max-h-[240px]` — but never taller
|
|
6
|
+
* than the room there is; when the room below the anchor is smaller than both
|
|
7
|
+
* the content and the room above, the list opens UPWARD (anchored to the
|
|
8
|
+
* trigger's top via `bottom`). The 120px floor keeps it usable even in a
|
|
9
|
+
* cramped corner — scrollable beats invisible.
|
|
24
10
|
*/
|
|
25
11
|
export declare function fitMenu({ anchor, menu, viewport, cap, }: {
|
|
26
12
|
anchor: {
|
|
@@ -44,55 +30,4 @@ export declare function fitMenu({ anchor, menu, viewport, cap, }: {
|
|
|
44
30
|
bottom?: number;
|
|
45
31
|
maxHeight: number;
|
|
46
32
|
};
|
|
47
|
-
/**
|
|
48
|
-
* Keep a box a caller has already placed fully on screen.
|
|
49
|
-
*
|
|
50
|
-
* For the menus whose caller measured a rect and chose the corner itself
|
|
51
|
-
* (`position`): the caller's math stays authoritative, but its result can no
|
|
52
|
-
* longer land off screen — it is slid inside the viewport, never flipped,
|
|
53
|
-
* and capped to the viewport's height with the same 120px floor as fitMenu.
|
|
54
|
-
*/
|
|
55
|
-
export declare function clampBox({ box, viewport, }: {
|
|
56
|
-
box: {
|
|
57
|
-
left: number;
|
|
58
|
-
top: number;
|
|
59
|
-
width: number;
|
|
60
|
-
height: number;
|
|
61
|
-
};
|
|
62
|
-
viewport: {
|
|
63
|
-
width: number;
|
|
64
|
-
height: number;
|
|
65
|
-
};
|
|
66
|
-
}): {
|
|
67
|
-
left: number;
|
|
68
|
-
top: number;
|
|
69
|
-
maxHeight: number;
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* Where a submenu goes, given its trigger row and the viewport.
|
|
73
|
-
*
|
|
74
|
-
* To the RIGHT of the row when it fits, flipped to the LEFT when it does not
|
|
75
|
-
* — the measured flip two menus hand-rolled and one of them broke (the copy
|
|
76
|
-
* dropped the ref its measurement read, so it measured nothing and always
|
|
77
|
-
* opened rightward, off the screen). Top-aligned with the row, slid up when
|
|
78
|
-
* the tail would run past the bottom edge.
|
|
79
|
-
*/
|
|
80
|
-
export declare function fitSubmenu({ row, panel, viewport, }: {
|
|
81
|
-
row: {
|
|
82
|
-
left: number;
|
|
83
|
-
right: number;
|
|
84
|
-
top: number;
|
|
85
|
-
};
|
|
86
|
-
panel: {
|
|
87
|
-
width: number;
|
|
88
|
-
height: number;
|
|
89
|
-
};
|
|
90
|
-
viewport: {
|
|
91
|
-
width: number;
|
|
92
|
-
height: number;
|
|
93
|
-
};
|
|
94
|
-
}): {
|
|
95
|
-
left: number;
|
|
96
|
-
top: number;
|
|
97
|
-
};
|
|
98
33
|
//# sourceMappingURL=fit.d.ts.map
|
package/dist/fit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fit.d.ts","sourceRoot":"","sources":["../src/fit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fit.d.ts","sourceRoot":"","sources":["../src/fit.ts"],"names":[],"mappings":"AAmBA;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,EACtB,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,GAA8B,GAC/B,EAAE;IACD,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IACrD,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAA;IAC9C,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3C,8FAA8F;IAC9F,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CASrE"}
|
package/dist/index.d.ts
CHANGED
|
@@ -20,8 +20,8 @@ export { ChipInput, InputChip, type ChipInputOption, type ChipInputProps, type I
|
|
|
20
20
|
export { IconButton, type IconButtonProps, type IconButtonVariant } from './IconButton';
|
|
21
21
|
export { Kbd, type KbdProps } from './Kbd';
|
|
22
22
|
export { IdentityMenu, IdentityPanel, type Identity, type IdentityMenuProps, type IdentityPanelProps } from './IdentityMenu';
|
|
23
|
-
export { Tooltip, WithTooltip, type TooltipProps, type WithTooltipProps } from './Tooltip';
|
|
24
|
-
export { Field,
|
|
23
|
+
export { Tooltip, TooltipProvider, WithTooltip, type TooltipProps, type TooltipProviderProps, type WithTooltipProps } from './Tooltip';
|
|
24
|
+
export { Field, type FieldProps } from './Field';
|
|
25
25
|
export { Select, type SelectOption, type SelectProps } from './Select';
|
|
26
26
|
export { TextInput, type TextInputProps } from './TextInput';
|
|
27
27
|
export { Textarea, type TextareaProps } from './Textarea';
|
|
@@ -33,8 +33,11 @@ export { EmptyState, type EmptyStateProps } from './EmptyState';
|
|
|
33
33
|
export { SkeletonBar, SkeletonList, SkeletonRow } from './Skeleton';
|
|
34
34
|
export { Breadcrumb, type BreadcrumbProps, type Crumb } from './Breadcrumb';
|
|
35
35
|
export { EnterHint, Menu, MenuItem, MenuPanel, MenuRow, MenuSection, MenuSub, type MenuItemProps, type MenuPanelProps, type MenuProps, type MenuSubProps } from './Menu';
|
|
36
|
-
export { clampBox, fitMenu, fitSubmenu } from './fit';
|
|
37
36
|
export { NavItem, type NavItemProps } from './NavItem';
|
|
37
|
+
export { Popover, type PopoverProps } from './Popover';
|
|
38
|
+
export { ReactionPicker, type ReactionOption, type ReactionPickerProps } from './ReactionPicker';
|
|
39
|
+
export { Toolbar, ToolbarButton, ToolbarInput, ToolbarSeparator, type ToolbarProps, type ToolbarButtonProps, type ToolbarInputProps } from './Toolbar';
|
|
40
|
+
export { PreviewCard, type PreviewCardProps } from './PreviewCard';
|
|
38
41
|
export { Person, type PersonProps } from './Person';
|
|
39
42
|
export { Rail, type RailProps } from './Rail';
|
|
40
43
|
export { RailItem, type RailItemProps } from './RailItem';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AACxE,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAC1F,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAA;AACpE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAC5D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AAClH,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAA;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