@botiverse/raft-ui 0.87.0 → 0.89.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/CHANGELOG.md +24 -0
- package/dist/components/fit-toolbar/fit-toolbar.d.mts +55 -4
- package/dist/components/fit-toolbar/fit-toolbar.mjs +82 -8
- package/dist/components/fit-toolbar/fit-toolbar.recipe.mjs +3 -1
- package/dist/components/fit-toolbar/index.d.mts +2 -2
- package/dist/components/segmented-control/segmented-control.mjs +22 -5
- package/dist/lib/use-attach-count.mjs +41 -0
- package/dist/wip.d.mts +2 -2
- package/dist/wip.mjs +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
## [0.89.0](https://github.com/botiverse/raft-design/compare/v0.88.0...v0.89.0) (2026-11-10)
|
|
2
|
+
|
|
3
|
+
### Changed
|
|
4
|
+
|
|
5
|
+
- **`FitToolbarSearch` keeps at most 160px by default; a longer placeholder ends in an ellipsis** ([FitToolbar › Behavior](https://raft-design.botiverse.build/components/fit-toolbar/#behavior)). Its measured least width is now its icon and its whole placeholder, or 160px, whichever is smaller; the cap is exported as `FIT_SEARCH_MAX_LEAST`. A placeholder that doesn't fit the field is cut with an ellipsis (`text-overflow: ellipsis` on the input and its `::placeholder`) and the field stays shown instead of collapsing to its button.
|
|
6
|
+
- Why: on a 375px phone the Members toolbar's "Search members" (16px on a touch screen, so iOS doesn't zoom) needed about 180px where about 165px was free, so the search collapsed to its icon; the placeholder is only a hint and goes once the person types (Jasper, 2026-11-10, #proj-raft-ui:f9756e85).
|
|
7
|
+
- Affects: a search whose placeholder takes more than 160px now keeps its field down to 160px, and the toolbar's earlier steps stop sooner. A placeholder that fits is measured as before. An explicit `minWidth` is unchanged and not capped.
|
|
8
|
+
- Docs: https://raft-design.botiverse.build/components/fit-toolbar/
|
|
9
|
+
|
|
10
|
+
## [0.88.0](https://github.com/botiverse/raft-design/compare/v0.87.0...v0.88.0) (2026-11-10)
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`FitToolbarSplitButton`: a split button as one FitToolbar item** ([FitToolbar › Anatomy](https://raft-design.botiverse.build/components/fit-toolbar/#anatomy)). The primary action and its ▾ (Create agent and the other ways to add an agent) are `Button`'s split parts, `ButtonSplit`, `ButtonSplitMain` and `ButtonSplitMenu`, each rendered as a toolbar button. The pair takes its steps as a whole: from `plusOrder` on the main part is + alone, from `labelOrder` on its icon alone (only with an `icon`), its label kept as its name and tooltip, and the ▾ stays. It never moves into More. `groupLabel` names the pair, `menuLabel` the ▾, and `menuTrigger` is the menu's trigger (`<DropdownMenuTrigger />`); `disabled` disables both parts, and other props go on the main part. In the toolbar the arrow keys reach the main part, then the ▾; the toolbar stays one Tab stop.
|
|
15
|
+
- Why: slock's Members toolbar built Create agent from two `FitToolbarButton`s with the split's classes copied onto them: no die-cut edge in dark mode, and the parts gave way one by one (sindresorhus, #proj-raft-ui:f9756e85).
|
|
16
|
+
- Affects: nothing existing. Move a hand-built split in a FitToolbar onto it.
|
|
17
|
+
- Docs: https://raft-design.botiverse.build/components/fit-toolbar/
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- **A FitToolbar or SegmentedControl rendered before it is in the document gets its Tab stop once attached** ([FitToolbar › Accessibility](https://raft-design.botiverse.build/components/fit-toolbar/#accessibility)). Base UI's composite lists number only the items connected when they register, and attaching a subtree later registers nothing again, so every toolbar item and segment kept `tabIndex` -1 and Tab passed over the toolbar. Each now watches the document while it is detached and, once attached, makes its items register again, without remounting them.
|
|
22
|
+
- Why: slock's channel Tasks section renders into a host attached after its first commit, and remounted its toolbar to get a Tab stop back (#14149).
|
|
23
|
+
- Affects: nothing for a toolbar or control mounted in the document. Another Base UI composite inside a detached toolbar (a ToggleGroup, Tabs) is not covered: render into a host that is already attached where you can.
|
|
24
|
+
|
|
1
25
|
## [0.87.0](https://github.com/botiverse/raft-design/compare/v0.86.0...v0.87.0) (2026-11-10)
|
|
2
26
|
|
|
3
27
|
### Added
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StyledProps } from "../../lib/styled-props.mjs";
|
|
2
2
|
import { ButtonProps } from "../button/button.mjs";
|
|
3
|
+
import { ButtonSplitMainProps } from "../button/button-split.mjs";
|
|
3
4
|
import { InputGroupInputProps } from "../input-group/input-group.mjs";
|
|
4
5
|
import { PickerTriggerButtonProps } from "../picker-trigger-button/picker-trigger-button.mjs";
|
|
5
6
|
import { CSSProperties, ReactElement, ReactNode, Ref } from "react";
|
|
@@ -36,7 +37,7 @@ export type FitToolbarProps = StyledProps<Toolbar.Root.Props> & {
|
|
|
36
37
|
* `data-fit-<step>` for its styles. A Base UI Toolbar: one Tab stop, the
|
|
37
38
|
* arrow keys inside.
|
|
38
39
|
*/
|
|
39
|
-
export declare function FitToolbar({ className, wrap, ref, ...props }: FitToolbarProps): import("react").JSX.Element;
|
|
40
|
+
export declare function FitToolbar({ className, wrap, ref, children, ...props }: FitToolbarProps): import("react").JSX.Element;
|
|
40
41
|
/**
|
|
41
42
|
* Inside a FitToolbar: a control that would measure its own fit (a
|
|
42
43
|
* SegmentedControl's `iconsOnlyBelow`) leaves it to the toolbar's steps.
|
|
@@ -160,6 +161,47 @@ export type FitToolbarButtonProps = Omit<ButtonProps, "children" | "size"> & {
|
|
|
160
161
|
* on, and hidden from `moreOrder` on.
|
|
161
162
|
*/
|
|
162
163
|
export declare function FitToolbarButton({ icon, collapsedIcon, children, labelOrder, plusOrder, moreOrder, moreItem, variant, className, ...props }: FitToolbarButtonProps): import("react").JSX.Element;
|
|
164
|
+
export type FitToolbarSplitButtonProps = Omit<ButtonSplitMainProps, "children" | "size"> & {
|
|
165
|
+
/** Its icon, which stays when its label gives way (the `label` step). */
|
|
166
|
+
icon?: ReactNode;
|
|
167
|
+
/** The main part's label: its accessible name and, once it has given way, its tooltip. */
|
|
168
|
+
children: ReactNode;
|
|
169
|
+
/**
|
|
170
|
+
* The name of the pair, a `role="group"`, in the page's language ("New
|
|
171
|
+
* agent"): not the main part's name ([Button › Split buttons](../button/button.md#split-buttons)).
|
|
172
|
+
*/
|
|
173
|
+
groupLabel: string;
|
|
174
|
+
/** The menu part's accessible name and tooltip ("More ways to create an agent"). */
|
|
175
|
+
menuLabel: string;
|
|
176
|
+
/**
|
|
177
|
+
* The menu's trigger, which opens the menu of the other ways:
|
|
178
|
+
* `<DropdownMenuTrigger />`. It renders it as the split's ▾, a toolbar button.
|
|
179
|
+
*/
|
|
180
|
+
menuTrigger: ReactElement<{
|
|
181
|
+
render?: unknown;
|
|
182
|
+
}>;
|
|
183
|
+
/** When the main part shows its icon alone (the `label` step); needs an `icon`. */
|
|
184
|
+
labelOrder?: number;
|
|
185
|
+
/**
|
|
186
|
+
* When the main part shows as + alone, its icon and label gone (the `plus`
|
|
187
|
+
* step): for the primary action, after the groups have wrapped. The ▾ stays.
|
|
188
|
+
*/
|
|
189
|
+
plusOrder?: number;
|
|
190
|
+
/** Disables both parts, as on `ButtonSplit`. */
|
|
191
|
+
disabled?: boolean;
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* A split button (Button › Split buttons) as one toolbar item: the main
|
|
195
|
+
* action and its ▾, which opens a menu of other ways to the same result
|
|
196
|
+
* (Create agent and its ▾). The pair takes its steps as a whole: from
|
|
197
|
+
* `labelOrder` on the main part shows its icon alone, from `plusOrder` on +
|
|
198
|
+
* alone, its label kept as its accessible name and tooltip, while the ▾
|
|
199
|
+
* stays beside it. It never moves into More: a menu item can't hold a menu of
|
|
200
|
+
* its own, and the primary action stays on the toolbar. Both parts are
|
|
201
|
+
* toolbar buttons: one Tab stop for the toolbar, the arrow keys reaching the
|
|
202
|
+
* main part, then the ▾. Props other than these go on the main part.
|
|
203
|
+
*/
|
|
204
|
+
export declare function FitToolbarSplitButton({ icon, children, groupLabel, menuLabel, menuTrigger, labelOrder, plusOrder, disabled, variant, className, ...props }: FitToolbarSplitButtonProps): import("react").JSX.Element;
|
|
163
205
|
export type FitToolbarPickerProps = Omit<PickerTriggerButtonProps, "children" | "render"> & {
|
|
164
206
|
/**
|
|
165
207
|
* The picker's trigger, which opens its popup: `<PopoverTrigger />`,
|
|
@@ -197,6 +239,14 @@ export type FitToolbarPickerProps = Omit<PickerTriggerButtonProps, "children" |
|
|
|
197
239
|
* as its tooltip.
|
|
198
240
|
*/
|
|
199
241
|
export declare function FitToolbarPicker({ trigger, icon, children, value, labelOrder, moreOrder, moreItem, className, ...props }: FitToolbarPickerProps): import("react").JSX.Element;
|
|
242
|
+
/**
|
|
243
|
+
* The most `FitToolbarSearch`'s measured least width may be, in px: its icon
|
|
244
|
+
* and its whole placeholder, or this, whichever is smaller. A longer
|
|
245
|
+
* placeholder is cut with an ellipsis instead of collapsing the field to its
|
|
246
|
+
* button, since it is only a hint and goes once the person types (Jasper,
|
|
247
|
+
* 2026-11-10, #proj-raft-ui:f9756e85). An explicit `minWidth` isn't capped.
|
|
248
|
+
*/
|
|
249
|
+
export declare const FIT_SEARCH_MAX_LEAST = 160;
|
|
200
250
|
export type FitToolbarSearchProps = Omit<InputGroupInputProps, "className" | "value" | "defaultValue" | "onValueChange" | "aria-label" | "render"> & {
|
|
201
251
|
/** Its accessible name ("Search tasks"): the field's and, once it is an icon, the button's, and the button's tooltip. */
|
|
202
252
|
"aria-label": string;
|
|
@@ -210,7 +260,8 @@ export type FitToolbarSearchProps = Omit<InputGroupInputProps, "className" | "va
|
|
|
210
260
|
* The least it may be, in px, before the toolbar gives way. By default it
|
|
211
261
|
* is measured: what its search icon and its whole placeholder (or, with
|
|
212
262
|
* none, its `aria-label`) take, in the field's own font, so the empty field
|
|
213
|
-
*
|
|
263
|
+
* shows what it is for, up to `FIT_SEARCH_MAX_LEAST` (160px): a longer
|
|
264
|
+
* placeholder ends in an ellipsis. A number given here isn't capped.
|
|
214
265
|
*/
|
|
215
266
|
minWidth?: number;
|
|
216
267
|
/**
|
|
@@ -229,8 +280,8 @@ export type FitToolbarSearchProps = Omit<InputGroupInputProps, "className" | "va
|
|
|
229
280
|
};
|
|
230
281
|
/**
|
|
231
282
|
* The search field of a list's toolbar: it fills the rest of its line and
|
|
232
|
-
* keeps at least the room its icon and its whole placeholder take
|
|
233
|
-
* or `minWidth`), so the toolbar's other steps come before
|
|
283
|
+
* keeps at least the room its icon and its whole placeholder take, up to
|
|
284
|
+
* 160px (measured, or `minWidth`), so the toolbar's other steps come before
|
|
234
285
|
* it is squeezed. From `collapseOrder` on it is a search icon button at the
|
|
235
286
|
* start of the line, which opens the field in the scope's place, More and the
|
|
236
287
|
* primary action kept at the line's end; the
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { laidOutChildren } from "../../lib/laid-out-children.mjs";
|
|
2
2
|
import { Button } from "../button/button.mjs";
|
|
3
|
+
import { ButtonSplit, ButtonSplitMain, ButtonSplitMenu } from "../button/button-split.mjs";
|
|
3
4
|
import { useMergedRef } from "../../lib/use-merged-ref.mjs";
|
|
4
5
|
import { ScrollArea } from "../scroll-area/scroll-area.mjs";
|
|
5
6
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip/tooltip.mjs";
|
|
6
7
|
import { InputGroup, InputGroupAddon, InputGroupInput } from "../input-group/input-group.mjs";
|
|
7
8
|
import { PickerTriggerButton } from "../picker-trigger-button/picker-trigger-button.mjs";
|
|
9
|
+
import { useAttachCount } from "../../lib/use-attach-count.mjs";
|
|
8
10
|
import { fitToolbar } from "./fit-toolbar.recipe.mjs";
|
|
9
11
|
import { ChevronDown, MoreHorizontal, Plus, Search, X } from "lucide-react";
|
|
10
12
|
import { Fragment, cloneElement, createContext, useCallback, useContext, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
@@ -297,7 +299,7 @@ const FitToolbarContext = createContext(null);
|
|
|
297
299
|
* `data-fit-<step>` for its styles. A Base UI Toolbar: one Tab stop, the
|
|
298
300
|
* arrow keys inside.
|
|
299
301
|
*/
|
|
300
|
-
function FitToolbar({ className, wrap = false, ref, ...props }) {
|
|
302
|
+
function FitToolbar({ className, wrap = false, ref, children, ...props }) {
|
|
301
303
|
const { root } = fitToolbar();
|
|
302
304
|
const rootRef = useRef(null);
|
|
303
305
|
const [element, setElement] = useState(null);
|
|
@@ -427,20 +429,25 @@ function FitToolbar({ className, wrap = false, ref, ...props }) {
|
|
|
427
429
|
lastFocused.current = null;
|
|
428
430
|
more?.focus();
|
|
429
431
|
}, [applied]);
|
|
432
|
+
const attached = useAttachCount(element);
|
|
430
433
|
const context = useMemo(() => ({
|
|
431
434
|
applied,
|
|
432
435
|
store
|
|
433
436
|
}), [applied, store]);
|
|
434
437
|
return /* @__PURE__ */ jsx(FitToolbarContext.Provider, {
|
|
435
438
|
value: context,
|
|
436
|
-
children: /* @__PURE__ */
|
|
439
|
+
children: /* @__PURE__ */ jsxs(Toolbar.Root, {
|
|
437
440
|
ref: setRef,
|
|
438
441
|
"data-slot": "fit-toolbar",
|
|
439
442
|
"data-fit-wrapping": applied.wrapping ? "" : void 0,
|
|
440
443
|
className: root({ className }),
|
|
441
444
|
...props,
|
|
442
445
|
onKeyDownCapture: handleKeyDown,
|
|
443
|
-
onFocus: handleFocus
|
|
446
|
+
onFocus: handleFocus,
|
|
447
|
+
children: [children, attached === 0 ? null : /* @__PURE__ */ jsx(Toolbar.Link, { render: /* @__PURE__ */ jsx("span", {
|
|
448
|
+
hidden: true,
|
|
449
|
+
"data-fit-renumber": ""
|
|
450
|
+
}) }, attached)]
|
|
444
451
|
})
|
|
445
452
|
});
|
|
446
453
|
}
|
|
@@ -719,6 +726,64 @@ function FitToolbarButton({ icon, collapsedIcon, children, labelOrder, plusOrder
|
|
|
719
726
|
}), /* @__PURE__ */ jsx(TooltipContent, { children })]
|
|
720
727
|
});
|
|
721
728
|
}
|
|
729
|
+
/**
|
|
730
|
+
* A split button (Button › Split buttons) as one toolbar item: the main
|
|
731
|
+
* action and its ▾, which opens a menu of other ways to the same result
|
|
732
|
+
* (Create agent and its ▾). The pair takes its steps as a whole: from
|
|
733
|
+
* `labelOrder` on the main part shows its icon alone, from `plusOrder` on +
|
|
734
|
+
* alone, its label kept as its accessible name and tooltip, while the ▾
|
|
735
|
+
* stays beside it. It never moves into More: a menu item can't hold a menu of
|
|
736
|
+
* its own, and the primary action stays on the toolbar. Both parts are
|
|
737
|
+
* toolbar buttons: one Tab stop for the toolbar, the arrow keys reaching the
|
|
738
|
+
* main part, then the ▾. Props other than these go on the main part.
|
|
739
|
+
*/
|
|
740
|
+
function FitToolbarSplitButton({ icon, children, groupLabel, menuLabel, menuTrigger, labelOrder, plusOrder, disabled = false, variant = "default", className, ...props }) {
|
|
741
|
+
const { split, splitMain, label, icon: iconSlot, plus } = fitToolbar();
|
|
742
|
+
const item = useFitItem({
|
|
743
|
+
label: icon === void 0 ? void 0 : labelOrder,
|
|
744
|
+
plus: plusOrder
|
|
745
|
+
});
|
|
746
|
+
const ownTrigger = cloneElement(menuTrigger, { render: /* @__PURE__ */ jsx(ButtonSplitMenu, {
|
|
747
|
+
variant,
|
|
748
|
+
size: "md",
|
|
749
|
+
"aria-label": menuLabel
|
|
750
|
+
}) });
|
|
751
|
+
return /* @__PURE__ */ jsxs(ButtonSplit, {
|
|
752
|
+
"aria-label": groupLabel,
|
|
753
|
+
disabled,
|
|
754
|
+
"data-fit-split": "",
|
|
755
|
+
className: split(),
|
|
756
|
+
...item.props,
|
|
757
|
+
children: [/* @__PURE__ */ jsxs(Tooltip, {
|
|
758
|
+
disabled: !item.taken("label") && !item.taken("plus"),
|
|
759
|
+
children: [/* @__PURE__ */ jsxs(TooltipTrigger, {
|
|
760
|
+
"data-slot": "button",
|
|
761
|
+
render: /* @__PURE__ */ jsx(Toolbar.Button, { render: /* @__PURE__ */ jsx(ButtonSplitMain, {
|
|
762
|
+
variant,
|
|
763
|
+
size: "md",
|
|
764
|
+
className: splitMain({ className }),
|
|
765
|
+
...props
|
|
766
|
+
}) }),
|
|
767
|
+
children: [plusOrder === void 0 ? icon : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
768
|
+
"data-slot": "fit-toolbar-button-icon",
|
|
769
|
+
className: iconSlot(),
|
|
770
|
+
children: icon
|
|
771
|
+
}), /* @__PURE__ */ jsx(Plus, {
|
|
772
|
+
"data-slot": "fit-toolbar-button-plus",
|
|
773
|
+
"aria-hidden": true,
|
|
774
|
+
className: plus()
|
|
775
|
+
})] }), /* @__PURE__ */ jsx("span", {
|
|
776
|
+
"data-slot": "fit-toolbar-button-label",
|
|
777
|
+
className: label(),
|
|
778
|
+
children
|
|
779
|
+
})]
|
|
780
|
+
}), /* @__PURE__ */ jsx(TooltipContent, { children })]
|
|
781
|
+
}), /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
782
|
+
"data-slot": "button",
|
|
783
|
+
render: /* @__PURE__ */ jsx(Toolbar.Button, { render: ownTrigger })
|
|
784
|
+
}), /* @__PURE__ */ jsx(TooltipContent, { children: menuLabel })] })]
|
|
785
|
+
});
|
|
786
|
+
}
|
|
722
787
|
/** A count: a number, or a string of digits. Space Mono is for machine-written text only. */
|
|
723
788
|
const isCount = (node) => typeof node === "number" || typeof node === "string" && /^\d+$/.test(node.trim());
|
|
724
789
|
const text = (node) => typeof node === "string" || typeof node === "number" ? String(node) : void 0;
|
|
@@ -809,9 +874,17 @@ function coverScope(root, search) {
|
|
|
809
874
|
};
|
|
810
875
|
}
|
|
811
876
|
/**
|
|
877
|
+
* The most `FitToolbarSearch`'s measured least width may be, in px: its icon
|
|
878
|
+
* and its whole placeholder, or this, whichever is smaller. A longer
|
|
879
|
+
* placeholder is cut with an ellipsis instead of collapsing the field to its
|
|
880
|
+
* button, since it is only a hint and goes once the person types (Jasper,
|
|
881
|
+
* 2026-11-10, #proj-raft-ui:f9756e85). An explicit `minWidth` isn't capped.
|
|
882
|
+
*/
|
|
883
|
+
const FIT_SEARCH_MAX_LEAST = 160;
|
|
884
|
+
/**
|
|
812
885
|
* The search field of a list's toolbar: it fills the rest of its line and
|
|
813
|
-
* keeps at least the room its icon and its whole placeholder take
|
|
814
|
-
* or `minWidth`), so the toolbar's other steps come before
|
|
886
|
+
* keeps at least the room its icon and its whole placeholder take, up to
|
|
887
|
+
* 160px (measured, or `minWidth`), so the toolbar's other steps come before
|
|
815
888
|
* it is squeezed. From `collapseOrder` on it is a search icon button at the
|
|
816
889
|
* start of the line, which opens the field in the scope's place, More and the
|
|
817
890
|
* primary action kept at the line's end; the
|
|
@@ -863,8 +936,9 @@ function FitToolbarSearch({ "aria-label": label, value, defaultValue = "", onVal
|
|
|
863
936
|
words.style.font = style.font;
|
|
864
937
|
words.style.letterSpacing = style.letterSpacing;
|
|
865
938
|
words.style.paddingInlineEnd = style.paddingInlineEnd;
|
|
866
|
-
const
|
|
867
|
-
if (
|
|
939
|
+
const whole = Math.ceil(copy.getBoundingClientRect().width);
|
|
940
|
+
if (whole <= 0) return;
|
|
941
|
+
const width = Math.min(whole, 160);
|
|
868
942
|
wrapper.current?.style.setProperty("--fit-search-min", `${width}px`);
|
|
869
943
|
setMeasured(width);
|
|
870
944
|
};
|
|
@@ -1050,4 +1124,4 @@ function FitToolbarSearch({ "aria-label": label, value, defaultValue = "", onVal
|
|
|
1050
1124
|
});
|
|
1051
1125
|
}
|
|
1052
1126
|
//#endregion
|
|
1053
|
-
export { FitToolbar, FitToolbarButton, FitToolbarGroup, FitToolbarMore, FitToolbarMoreItems, FitToolbarPicker, FitToolbarSearch, useFitItem, useFitMore, useInFitToolbar };
|
|
1127
|
+
export { FIT_SEARCH_MAX_LEAST, FitToolbar, FitToolbarButton, FitToolbarGroup, FitToolbarMore, FitToolbarMoreItems, FitToolbarPicker, FitToolbarSearch, FitToolbarSplitButton, useFitItem, useFitMore, useInFitToolbar };
|
|
@@ -20,6 +20,8 @@ const fitToolbar = tv({
|
|
|
20
20
|
"data-fit-plus:w-8 data-fit-plus:px-0 md:pointer-fine:data-fit-plus:w-(--control-height)",
|
|
21
21
|
"data-fit-more:hidden"
|
|
22
22
|
],
|
|
23
|
+
split: ["data-fit-more:hidden"],
|
|
24
|
+
splitMain: ["in-data-fit-label:w-8 in-data-fit-label:px-0 md:pointer-fine:in-data-fit-label:w-(--control-height)", "in-data-fit-plus:w-8 in-data-fit-plus:px-0 md:pointer-fine:in-data-fit-plus:w-(--control-height)"],
|
|
23
25
|
label: ["in-data-fit-label:sr-only in-data-fit-plus:sr-only"],
|
|
24
26
|
icon: ["contents in-data-fit-plus:hidden"],
|
|
25
27
|
fullIcon: ["contents in-data-fit-label:hidden"],
|
|
@@ -42,7 +44,7 @@ const fitToolbar = tv({
|
|
|
42
44
|
"in-data-fit-collapse:data-open:absolute in-data-fit-collapse:data-open:min-w-0",
|
|
43
45
|
"in-data-fit-collapse:focus-within:absolute in-data-fit-collapse:focus-within:min-w-0"
|
|
44
46
|
],
|
|
45
|
-
searchInput: ["[&::-webkit-search-cancel-button]:appearance-none"]
|
|
47
|
+
searchInput: ["[&::-webkit-search-cancel-button]:appearance-none", "text-ellipsis placeholder:text-ellipsis"]
|
|
46
48
|
},
|
|
47
49
|
variants: {
|
|
48
50
|
count: { true: { pickerValue: ["font-mono text-mono-meta"] } },
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FitItemOptions, FitStep, FitSteps, FitToolbar, FitToolbarButton, FitToolbarButtonProps, FitToolbarGroup, FitToolbarGroupProps, FitToolbarMore, FitToolbarMoreItems, FitToolbarMoreProps, FitToolbarPicker, FitToolbarPickerProps, FitToolbarProps, FitToolbarSearch, FitToolbarSearchProps, useFitItem, useFitMore, useInFitToolbar } from "./fit-toolbar.mjs";
|
|
2
|
-
export { type FitItemOptions, type FitStep, type FitSteps, FitToolbar, FitToolbarButton, type FitToolbarButtonProps, FitToolbarGroup, type FitToolbarGroupProps, FitToolbarMore, FitToolbarMoreItems, type FitToolbarMoreProps, FitToolbarPicker, type FitToolbarPickerProps, type FitToolbarProps, FitToolbarSearch, type FitToolbarSearchProps, useFitItem, useFitMore, useInFitToolbar };
|
|
1
|
+
import { FIT_SEARCH_MAX_LEAST, FitItemOptions, FitStep, FitSteps, FitToolbar, FitToolbarButton, FitToolbarButtonProps, FitToolbarGroup, FitToolbarGroupProps, FitToolbarMore, FitToolbarMoreItems, FitToolbarMoreProps, FitToolbarPicker, FitToolbarPickerProps, FitToolbarProps, FitToolbarSearch, FitToolbarSearchProps, FitToolbarSplitButton, FitToolbarSplitButtonProps, useFitItem, useFitMore, useInFitToolbar } from "./fit-toolbar.mjs";
|
|
2
|
+
export { FIT_SEARCH_MAX_LEAST, type FitItemOptions, type FitStep, type FitSteps, FitToolbar, FitToolbarButton, type FitToolbarButtonProps, FitToolbarGroup, type FitToolbarGroupProps, FitToolbarMore, FitToolbarMoreItems, type FitToolbarMoreProps, FitToolbarPicker, type FitToolbarPickerProps, type FitToolbarProps, FitToolbarSearch, type FitToolbarSearchProps, FitToolbarSplitButton, type FitToolbarSplitButtonProps, useFitItem, useFitMore, useInFitToolbar };
|
|
@@ -2,8 +2,9 @@ import { tv } from "../../lib/tv.mjs";
|
|
|
2
2
|
import { useMergedRef } from "../../lib/use-merged-ref.mjs";
|
|
3
3
|
import { useTapActivation } from "../../lib/tap-activation.mjs";
|
|
4
4
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip/tooltip.mjs";
|
|
5
|
+
import { useAttachCount } from "../../lib/use-attach-count.mjs";
|
|
5
6
|
import { useInFitToolbar } from "../fit-toolbar/fit-toolbar.mjs";
|
|
6
|
-
import { cloneElement, createContext, use, useCallback, useLayoutEffect, useRef, useState } from "react";
|
|
7
|
+
import { cloneElement, createContext, use, useCallback, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import { Toolbar } from "@base-ui/react/toolbar";
|
|
9
10
|
import { Radio } from "@base-ui/react/radio";
|
|
@@ -79,6 +80,12 @@ const SegmentedControlIconsOnlyContext = createContext(false);
|
|
|
79
80
|
*/
|
|
80
81
|
const SegmentedControlToolbarStopContext = createContext(void 0);
|
|
81
82
|
/**
|
|
83
|
+
* How many times the control was attached to the document after it mounted
|
|
84
|
+
* outside it (`useAttachCount`): each segment registers with the radio group
|
|
85
|
+
* again, so the group numbers them and one holds its Tab stop.
|
|
86
|
+
*/
|
|
87
|
+
const SegmentedControlAttachContext = createContext(0);
|
|
88
|
+
/**
|
|
82
89
|
* A length threshold in CSS pixels, or `undefined` for a value that isn't a
|
|
83
90
|
* `px`, `rem` or `em` length. `em` is the container's font size, as in a
|
|
84
91
|
* container query.
|
|
@@ -242,6 +249,7 @@ function SegmentedControl({ disabled = false, iconsOnlyBelow: iconsOnlyBelowProp
|
|
|
242
249
|
const [track, setTrack] = useState(null);
|
|
243
250
|
const [setRef] = useMergedRef(rootRef, setTrack, ref);
|
|
244
251
|
const overflowing = useTrackFit(track, iconsOnlyBelow);
|
|
252
|
+
const attached = useAttachCount(track);
|
|
245
253
|
useIconsOnlyWarning(rootRef, iconsOnlyBelow);
|
|
246
254
|
const value = props.value;
|
|
247
255
|
useLayoutEffect(() => {
|
|
@@ -265,9 +273,12 @@ function SegmentedControl({ disabled = false, iconsOnlyBelow: iconsOnlyBelowProp
|
|
|
265
273
|
className: root({ className }),
|
|
266
274
|
...props
|
|
267
275
|
});
|
|
268
|
-
return /* @__PURE__ */ jsx(
|
|
269
|
-
value:
|
|
270
|
-
children:
|
|
276
|
+
return /* @__PURE__ */ jsx(SegmentedControlAttachContext, {
|
|
277
|
+
value: attached,
|
|
278
|
+
children: /* @__PURE__ */ jsx(SegmentedControlIconsOnlyContext, {
|
|
279
|
+
value: inFitToolbar || iconsOnlyBelow !== void 0,
|
|
280
|
+
children: inFitToolbar ? /* @__PURE__ */ jsx(ToolbarItem, { group }) : group
|
|
281
|
+
})
|
|
271
282
|
});
|
|
272
283
|
}
|
|
273
284
|
/**
|
|
@@ -297,14 +308,20 @@ function ToolbarItemGroup({ group, itemProps, itemRef, stop }) {
|
|
|
297
308
|
})
|
|
298
309
|
});
|
|
299
310
|
}
|
|
311
|
+
/** A new ref for each attach count, each setting the same merged ref. */
|
|
312
|
+
function attachRef(setRef, _attached) {
|
|
313
|
+
return (element) => setRef(element);
|
|
314
|
+
}
|
|
300
315
|
function SegmentedControlItem({ className, ref, ...props }) {
|
|
301
316
|
const { item } = segmentedControl();
|
|
302
317
|
const iconsOnly = use(SegmentedControlIconsOnlyContext);
|
|
303
318
|
const toolbarStop = use(SegmentedControlToolbarStopContext);
|
|
304
319
|
const tapRef = useTapActivation();
|
|
305
320
|
const [setRef] = useMergedRef(tapRef, ref);
|
|
321
|
+
const attached = use(SegmentedControlAttachContext);
|
|
322
|
+
const radioRef = useMemo(() => attachRef(setRef, attached), [setRef, attached]);
|
|
306
323
|
const radio = /* @__PURE__ */ jsx(Radio.Root, {
|
|
307
|
-
ref:
|
|
324
|
+
ref: radioRef,
|
|
308
325
|
render: /* @__PURE__ */ jsx("button", { type: "button" }),
|
|
309
326
|
nativeButton: true,
|
|
310
327
|
"data-slot": "segmented-control-item",
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useLayoutEffect, useState } from "react";
|
|
2
|
+
//#region src/lib/use-attach-count.ts
|
|
3
|
+
/**
|
|
4
|
+
* How many times `element` has been attached to its document after it was
|
|
5
|
+
* committed outside it: 0 for an element that was in the document when it
|
|
6
|
+
* mounted, the usual case. A component built on a Base UI composite (a
|
|
7
|
+
* Toolbar, a RadioGroup) uses it to make its items register again.
|
|
8
|
+
*
|
|
9
|
+
* Why: Base UI's composite list numbers only the items that are connected
|
|
10
|
+
* when it takes its snapshot, on the commit an item registers in, and
|
|
11
|
+
* attaching a subtree later registers nothing again. A toolbar rendered into
|
|
12
|
+
* a host the page attaches after its first commit (a side area's section, a
|
|
13
|
+
* portal that mounts later) kept every item at `tabIndex` -1, so Tab passed
|
|
14
|
+
* over it and only a remount brought its Tab stop back (slock #14149).
|
|
15
|
+
*
|
|
16
|
+
* It watches the document only while the element is detached, and stops once
|
|
17
|
+
* it is attached.
|
|
18
|
+
*
|
|
19
|
+
* @param element The composite's root, as state (null before it mounts).
|
|
20
|
+
* @returns A count that changes when the element gets attached.
|
|
21
|
+
*/
|
|
22
|
+
function useAttachCount(element) {
|
|
23
|
+
const [count, setCount] = useState(0);
|
|
24
|
+
useLayoutEffect(() => {
|
|
25
|
+
if (!element || element.isConnected || typeof MutationObserver === "undefined") return;
|
|
26
|
+
const root = element.ownerDocument.documentElement;
|
|
27
|
+
const observer = new MutationObserver(() => {
|
|
28
|
+
if (!element.isConnected) return;
|
|
29
|
+
observer.disconnect();
|
|
30
|
+
setCount((previous) => previous + 1);
|
|
31
|
+
});
|
|
32
|
+
observer.observe(root, {
|
|
33
|
+
childList: true,
|
|
34
|
+
subtree: true
|
|
35
|
+
});
|
|
36
|
+
return () => observer.disconnect();
|
|
37
|
+
}, [element]);
|
|
38
|
+
return count;
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { useAttachCount };
|
package/dist/wip.d.mts
CHANGED
|
@@ -43,7 +43,7 @@ import { CommentMarginLayout, CommentMarginLayoutItem, CommentMarginLayoutOption
|
|
|
43
43
|
import { CommentMarker, CommentMarkerProps } from "./components/comment/comment-marker.mjs";
|
|
44
44
|
import { UseCommentMarginFitsOptions, useCommentMarginFits } from "./components/comment/use-comment-margin-fits.mjs";
|
|
45
45
|
import "./components/comment/index.mjs";
|
|
46
|
-
import { FitItemOptions, FitStep, FitSteps, FitToolbar, FitToolbarButton, FitToolbarButtonProps, FitToolbarGroup, FitToolbarGroupProps, FitToolbarMore, FitToolbarMoreItems, FitToolbarMoreProps, FitToolbarPicker, FitToolbarPickerProps, FitToolbarProps, FitToolbarSearch, FitToolbarSearchProps, useFitItem, useFitMore, useInFitToolbar } from "./components/fit-toolbar/fit-toolbar.mjs";
|
|
46
|
+
import { FIT_SEARCH_MAX_LEAST, FitItemOptions, FitStep, FitSteps, FitToolbar, FitToolbarButton, FitToolbarButtonProps, FitToolbarGroup, FitToolbarGroupProps, FitToolbarMore, FitToolbarMoreItems, FitToolbarMoreProps, FitToolbarPicker, FitToolbarPickerProps, FitToolbarProps, FitToolbarSearch, FitToolbarSearchProps, FitToolbarSplitButton, FitToolbarSplitButtonProps, useFitItem, useFitMore, useInFitToolbar } from "./components/fit-toolbar/fit-toolbar.mjs";
|
|
47
47
|
import "./components/fit-toolbar/index.mjs";
|
|
48
48
|
import { SelectionToolbar, SelectionToolbarAction, SelectionToolbarActionProps, SelectionToolbarActions, SelectionToolbarActionsProps, SelectionToolbarClose, SelectionToolbarCloseProps, SelectionToolbarCount, SelectionToolbarCountProps, SelectionToolbarCountValue, SelectionToolbarCountValueProps, SelectionToolbarDock, SelectionToolbarDockProps, SelectionToolbarHint, SelectionToolbarHintProps, SelectionToolbarItem, SelectionToolbarItemProps, SelectionToolbarMore, SelectionToolbarMoreItems, SelectionToolbarMoreProps, SelectionToolbarProps } from "./components/selection-toolbar/selection-toolbar.mjs";
|
|
49
49
|
import "./components/selection-toolbar/index.mjs";
|
|
@@ -81,4 +81,4 @@ import { KbdButton, KbdButtonCaret, KbdButtonCaretProps, KbdButtonPlaceholder, K
|
|
|
81
81
|
import "./components/kbd-button/index.mjs";
|
|
82
82
|
import { WebTopBarCenter, WebTopBarCenterProps, WebTopBarEnd, WebTopBarEndProps, WebTopBarRoot, WebTopBarRootProps, WebTopBarStart, WebTopBarStartProps } from "./components/web-top-bar/web-top-bar.mjs";
|
|
83
83
|
import "./components/web-top-bar/index.mjs";
|
|
84
|
-
export { Dialog as AnnouncementDialog, AnnouncementDialogAction, AnnouncementDialogBody, DialogClose as AnnouncementDialogClose, AnnouncementDialogContent, AnnouncementDialogFooter, AnnouncementDialogHeader, AnnouncementDialogLabel, AnnouncementDialogPicture, AnnouncementDialogSecondaryAction, AnnouncementDialogText, AnnouncementDialogTitle, DialogTrigger as AnnouncementDialogTrigger, AppLinkCard, AppLinkCardActions, type AppLinkCardActionsProps, AppLinkCardBody, type AppLinkCardBodyProps, AppLinkCardEyebrow, type AppLinkCardEyebrowProps, AppLinkCardHeader, type AppLinkCardHeaderProps, AppLinkCardHost, type AppLinkCardHostProps, AppLinkCardIcon, type AppLinkCardIconProps, AppLinkCardMeta, type AppLinkCardMetaProps, AppLinkCardName, type AppLinkCardNameProps, AppLinkCardPlaceholder, type AppLinkCardPlaceholderProps, AppLinkCardTitle, type AppLinkCardTitleProps, AvatarGroupButton, type AvatarGroupButtonProps, ButtonSplit, ButtonSplitMain, type ButtonSplitMainProps, ButtonSplitMenu, type ButtonSplitMenuProps, type ButtonSplitProps, type ButtonSplitSize, type ButtonSplitVariant, COMMENT_HIGHLIGHT, COMMENT_HIGHLIGHT_ACTIVE, ChoiceList, type ChoiceListGroup, type ChoiceListItem, type ChoiceListMultipleProps, type ChoiceListProps, type ChoiceListSingleProps, ComboboxSelect, type ComboboxSelectGroup, type ComboboxSelectMessages, type ComboboxSelectOption, type ComboboxSelectProps, type ComboboxSelectSelection, type ComboboxSelectValue, CommentCard, CommentCardMeta, type CommentCardMetaProps, type CommentCardProps, CommentCardQuote, type CommentCardQuoteProps, CommentCardTrigger, type CommentCardTriggerProps, CommentEntry, CommentEntryAuthor, type CommentEntryAuthorProps, CommentEntryBody, type CommentEntryBodyProps, CommentEntryHeader, type CommentEntryHeaderProps, type CommentEntryProps, CommentEntryTime, type CommentEntryTimeProps, CommentMargin, CommentMarginItem, type CommentMarginItemProps, type CommentMarginLayout, type CommentMarginLayoutItem, type CommentMarginLayoutOptions, type CommentMarginProps, CommentMarker, type CommentMarkerProps, DEFAULT_DRAG_MESSAGES, DRAG_AUTO_SCROLL_ZONE_PX, DRAG_KEYBOARD_CODES, DRAG_KEYBOARD_OFFSET_PX, DRAG_LIFT_Z_INDEX, DRAG_SETTLE, DRAG_SIBLING_TRANSITION, DROP_GLIDE, DialogFooterNote, type DialogFooterNoteProps, type DragAcrossLists, type DragAnnouncementSource, DragLift, type DragLiftProps, type DragListsItems, DragLiveRegion, type DragMessages, type DragNamed, type DragPlace, DragRefusalHint, type DragRefusalHintProps, DragRemeasure, type DragRemeasureProps, type DragSensorsOptions, DraggedSlot, type DraggedSlotProps, DropPlaceholder, type DropPlaceholderProps, DropdownMenuLinkItem, type DropdownMenuLinkItemProps, Ellipsis, type EllipsisProps, type EllipsisState, EllipsisToggle, type EllipsisToggleProps, FilterChip, FilterChipLabel, type FilterChipLabelProps, type FilterChipProps, FilterChipRemove, type FilterChipRemoveProps, type FitItemOptions, type FitStep, type FitSteps, FitToolbar, FitToolbarButton, type FitToolbarButtonProps, FitToolbarGroup, type FitToolbarGroupProps, FitToolbarMore, FitToolbarMoreItems, type FitToolbarMoreProps, FitToolbarPicker, type FitToolbarPickerProps, type FitToolbarProps, FitToolbarSearch, type FitToolbarSearchProps, type HoldThenMoveOptions, HoldThenMoveTouchSensor, InboxItemLeadingBadge, type InboxItemLeadingBadgeProps, InboxItemLine, type InboxItemLineProps, InboxItemListGroup, type InboxItemListGroupProps, InboxItemListHeading, type InboxItemListHeadingProps, InboxItemSkeleton, InboxItemSkeletonList, type InboxItemSkeletonListProps, type InboxItemSkeletonProps, InboxItemStatus, type InboxItemStatusProps, KbdButton, KbdButtonCaret, type KbdButtonCaretProps, KbdButtonPlaceholder, type KbdButtonPlaceholderProps, type KbdButtonProps, type KbdKeyName, KbdShortcut, type KbdShortcutProps, type KeyboardPlatform, LIFT_CLASS, LightboxBody, type LightboxBodyProps, ListRowSkeleton, type ListRowSkeletonProps, MOUSE_DRAG_DISTANCE_PX, MessageItemDelegatedAvatar, type MessageItemDelegatedAvatarProps, MessageItemDelegatedBy, MessageItemDelegatedByButton, type MessageItemDelegatedByButtonProps, MessageItemDelegatedByName, type MessageItemDelegatedByNameProps, type MessageItemDelegatedByProps, MessageItemTrailing, type MessageItemTrailingProps, MessageListJumpControls, type MessageListJumpControlsProps, MessageListJumpPill, MessageListJumpPillDismiss, type MessageListJumpPillDismissProps, MessageListJumpPillGroup, type MessageListJumpPillGroupProps, type MessageListJumpPillProps, MessageQuotedPreviewAuthorDelegatedBy, type MessageQuotedPreviewAuthorDelegatedByProps, MessageReferenceIcon, type MessageReferenceIconProps, MessageReferenceReadMark, type MessageReferenceReadMarkProps, Meter, MeterHeader, type MeterHeaderProps, MeterIndicator, type MeterIndicatorProps, MeterLabel, type MeterLabelProps, type MeterProps, MeterTrack, type MeterTrackProps, MeterValue, type MeterValueProps, MobileNavServerItem, type MobileNavServerItemProps, MobileNavServerPopover, MobileNavServerPopoverContent, type MobileNavServerPopoverContentProps, MobileNavServerPopoverDestination, type MobileNavServerPopoverDestinationProps, MobileNavServerPopoverDestinations, type MobileNavServerPopoverDestinationsProps, MobileNavServerPopoverGroup, type MobileNavServerPopoverGroupProps, MobileNavServerPopoverList, type MobileNavServerPopoverListProps, type MobileNavServerPopoverProps, MobileNavServerPopoverRow, MobileNavServerPopoverRowBody, type MobileNavServerPopoverRowBodyProps, MobileNavServerPopoverRowDescription, type MobileNavServerPopoverRowDescriptionProps, MobileNavServerPopoverRowLabel, type MobileNavServerPopoverRowLabelProps, type MobileNavServerPopoverRowProps, MouseOnlyPointerSensor, ORIGIN_OPACITY, type OverlayLayerKind, OverlayLayerProvider, type OverlayLayerProviderProps, PULL_TO_REFRESH_DAMPING, PULL_TO_REFRESH_HOLD_DISTANCE, PULL_TO_REFRESH_MAX_DISTANCE, PULL_TO_REFRESH_POINTER_QUERY, PULL_TO_REFRESH_SNAP_BACK_MS, PULL_TO_REFRESH_THRESHOLD, PanelSplitAction, PanelSplitActionMain, type PanelSplitActionMainProps, PanelSplitActionMenu, type PanelSplitActionMenuProps, type PanelSplitActionProps, PanelSplitActionToggle, type PanelSplitActionToggleProps, PopoverActions, type PopoverActionsProps, PopoverBody, type PopoverBodyProps, PreviewCardActions, type PreviewCardActionsProps, PreviewCardBody, type PreviewCardBodyProps, PreviewCardEyebrow, type PreviewCardEyebrowProps, PreviewCardFooter, type PreviewCardFooterProps, PreviewCardMeta, type PreviewCardMetaProps, type PullToRefresh, PullToRefreshIndicator, type PullToRefreshIndicatorProps, type PullToRefreshPlatform, type PullToRefreshState, SaveStatus, SaveStatusError, type SaveStatusErrorProps, type SaveStatusProps, SaveStatusSaved, type SaveStatusSavedProps, SelectionToolbar, SelectionToolbarAction, type SelectionToolbarActionProps, SelectionToolbarActions, type SelectionToolbarActionsProps, SelectionToolbarClose, type SelectionToolbarCloseProps, SelectionToolbarCount, type SelectionToolbarCountProps, SelectionToolbarCountValue, type SelectionToolbarCountValueProps, SelectionToolbarDock, type SelectionToolbarDockProps, SelectionToolbarHint, type SelectionToolbarHintProps, SelectionToolbarItem, type SelectionToolbarItemProps, SelectionToolbarMore, SelectionToolbarMoreItems, type SelectionToolbarMoreProps, type SelectionToolbarProps, TOUCH_DRAG_DISTANCE_PX, TOUCH_DRAG_HOLD_MS, TOUCH_DRAG_TOLERANCE_PX, type TableSort, TableSortButton, type TableSortButtonProps, TableSortableHead, type TableSortableHeadProps, TaskCompletionControl, type TaskCompletionControlProps, type UseCommentMarginFitsOptions, type UseDragListsOptions, type UsePullToRefreshOptions, WebTopBarCenter, type WebTopBarCenterProps, WebTopBarEnd, type WebTopBarEndProps, WebTopBarRoot, type WebTopBarRootProps, WebTopBarStart, type WebTopBarStartProps, cancelDrag, createDragAnnouncements, dragInstructions, dragListStrategy, dragMessages, keepGrabInside, listKeyboardCoordinates, resolveCommentMarginLayout, setCommentHighlights, useCommentMarginFits, useDragAcrossLists, useDragAnnouncer, useDragLists, useDragSensors, useDragSiblingTransition, useFitItem, useFitMore, useHoldThenMoveTouchSensor, useInFitToolbar, useKeyboardPlatform, useMouseOnlyPointerSensor, useParentOverlayKind, usePullToRefresh, useTruncated };
|
|
84
|
+
export { Dialog as AnnouncementDialog, AnnouncementDialogAction, AnnouncementDialogBody, DialogClose as AnnouncementDialogClose, AnnouncementDialogContent, AnnouncementDialogFooter, AnnouncementDialogHeader, AnnouncementDialogLabel, AnnouncementDialogPicture, AnnouncementDialogSecondaryAction, AnnouncementDialogText, AnnouncementDialogTitle, DialogTrigger as AnnouncementDialogTrigger, AppLinkCard, AppLinkCardActions, type AppLinkCardActionsProps, AppLinkCardBody, type AppLinkCardBodyProps, AppLinkCardEyebrow, type AppLinkCardEyebrowProps, AppLinkCardHeader, type AppLinkCardHeaderProps, AppLinkCardHost, type AppLinkCardHostProps, AppLinkCardIcon, type AppLinkCardIconProps, AppLinkCardMeta, type AppLinkCardMetaProps, AppLinkCardName, type AppLinkCardNameProps, AppLinkCardPlaceholder, type AppLinkCardPlaceholderProps, AppLinkCardTitle, type AppLinkCardTitleProps, AvatarGroupButton, type AvatarGroupButtonProps, ButtonSplit, ButtonSplitMain, type ButtonSplitMainProps, ButtonSplitMenu, type ButtonSplitMenuProps, type ButtonSplitProps, type ButtonSplitSize, type ButtonSplitVariant, COMMENT_HIGHLIGHT, COMMENT_HIGHLIGHT_ACTIVE, ChoiceList, type ChoiceListGroup, type ChoiceListItem, type ChoiceListMultipleProps, type ChoiceListProps, type ChoiceListSingleProps, ComboboxSelect, type ComboboxSelectGroup, type ComboboxSelectMessages, type ComboboxSelectOption, type ComboboxSelectProps, type ComboboxSelectSelection, type ComboboxSelectValue, CommentCard, CommentCardMeta, type CommentCardMetaProps, type CommentCardProps, CommentCardQuote, type CommentCardQuoteProps, CommentCardTrigger, type CommentCardTriggerProps, CommentEntry, CommentEntryAuthor, type CommentEntryAuthorProps, CommentEntryBody, type CommentEntryBodyProps, CommentEntryHeader, type CommentEntryHeaderProps, type CommentEntryProps, CommentEntryTime, type CommentEntryTimeProps, CommentMargin, CommentMarginItem, type CommentMarginItemProps, type CommentMarginLayout, type CommentMarginLayoutItem, type CommentMarginLayoutOptions, type CommentMarginProps, CommentMarker, type CommentMarkerProps, DEFAULT_DRAG_MESSAGES, DRAG_AUTO_SCROLL_ZONE_PX, DRAG_KEYBOARD_CODES, DRAG_KEYBOARD_OFFSET_PX, DRAG_LIFT_Z_INDEX, DRAG_SETTLE, DRAG_SIBLING_TRANSITION, DROP_GLIDE, DialogFooterNote, type DialogFooterNoteProps, type DragAcrossLists, type DragAnnouncementSource, DragLift, type DragLiftProps, type DragListsItems, DragLiveRegion, type DragMessages, type DragNamed, type DragPlace, DragRefusalHint, type DragRefusalHintProps, DragRemeasure, type DragRemeasureProps, type DragSensorsOptions, DraggedSlot, type DraggedSlotProps, DropPlaceholder, type DropPlaceholderProps, DropdownMenuLinkItem, type DropdownMenuLinkItemProps, Ellipsis, type EllipsisProps, type EllipsisState, EllipsisToggle, type EllipsisToggleProps, FIT_SEARCH_MAX_LEAST, FilterChip, FilterChipLabel, type FilterChipLabelProps, type FilterChipProps, FilterChipRemove, type FilterChipRemoveProps, type FitItemOptions, type FitStep, type FitSteps, FitToolbar, FitToolbarButton, type FitToolbarButtonProps, FitToolbarGroup, type FitToolbarGroupProps, FitToolbarMore, FitToolbarMoreItems, type FitToolbarMoreProps, FitToolbarPicker, type FitToolbarPickerProps, type FitToolbarProps, FitToolbarSearch, type FitToolbarSearchProps, FitToolbarSplitButton, type FitToolbarSplitButtonProps, type HoldThenMoveOptions, HoldThenMoveTouchSensor, InboxItemLeadingBadge, type InboxItemLeadingBadgeProps, InboxItemLine, type InboxItemLineProps, InboxItemListGroup, type InboxItemListGroupProps, InboxItemListHeading, type InboxItemListHeadingProps, InboxItemSkeleton, InboxItemSkeletonList, type InboxItemSkeletonListProps, type InboxItemSkeletonProps, InboxItemStatus, type InboxItemStatusProps, KbdButton, KbdButtonCaret, type KbdButtonCaretProps, KbdButtonPlaceholder, type KbdButtonPlaceholderProps, type KbdButtonProps, type KbdKeyName, KbdShortcut, type KbdShortcutProps, type KeyboardPlatform, LIFT_CLASS, LightboxBody, type LightboxBodyProps, ListRowSkeleton, type ListRowSkeletonProps, MOUSE_DRAG_DISTANCE_PX, MessageItemDelegatedAvatar, type MessageItemDelegatedAvatarProps, MessageItemDelegatedBy, MessageItemDelegatedByButton, type MessageItemDelegatedByButtonProps, MessageItemDelegatedByName, type MessageItemDelegatedByNameProps, type MessageItemDelegatedByProps, MessageItemTrailing, type MessageItemTrailingProps, MessageListJumpControls, type MessageListJumpControlsProps, MessageListJumpPill, MessageListJumpPillDismiss, type MessageListJumpPillDismissProps, MessageListJumpPillGroup, type MessageListJumpPillGroupProps, type MessageListJumpPillProps, MessageQuotedPreviewAuthorDelegatedBy, type MessageQuotedPreviewAuthorDelegatedByProps, MessageReferenceIcon, type MessageReferenceIconProps, MessageReferenceReadMark, type MessageReferenceReadMarkProps, Meter, MeterHeader, type MeterHeaderProps, MeterIndicator, type MeterIndicatorProps, MeterLabel, type MeterLabelProps, type MeterProps, MeterTrack, type MeterTrackProps, MeterValue, type MeterValueProps, MobileNavServerItem, type MobileNavServerItemProps, MobileNavServerPopover, MobileNavServerPopoverContent, type MobileNavServerPopoverContentProps, MobileNavServerPopoverDestination, type MobileNavServerPopoverDestinationProps, MobileNavServerPopoverDestinations, type MobileNavServerPopoverDestinationsProps, MobileNavServerPopoverGroup, type MobileNavServerPopoverGroupProps, MobileNavServerPopoverList, type MobileNavServerPopoverListProps, type MobileNavServerPopoverProps, MobileNavServerPopoverRow, MobileNavServerPopoverRowBody, type MobileNavServerPopoverRowBodyProps, MobileNavServerPopoverRowDescription, type MobileNavServerPopoverRowDescriptionProps, MobileNavServerPopoverRowLabel, type MobileNavServerPopoverRowLabelProps, type MobileNavServerPopoverRowProps, MouseOnlyPointerSensor, ORIGIN_OPACITY, type OverlayLayerKind, OverlayLayerProvider, type OverlayLayerProviderProps, PULL_TO_REFRESH_DAMPING, PULL_TO_REFRESH_HOLD_DISTANCE, PULL_TO_REFRESH_MAX_DISTANCE, PULL_TO_REFRESH_POINTER_QUERY, PULL_TO_REFRESH_SNAP_BACK_MS, PULL_TO_REFRESH_THRESHOLD, PanelSplitAction, PanelSplitActionMain, type PanelSplitActionMainProps, PanelSplitActionMenu, type PanelSplitActionMenuProps, type PanelSplitActionProps, PanelSplitActionToggle, type PanelSplitActionToggleProps, PopoverActions, type PopoverActionsProps, PopoverBody, type PopoverBodyProps, PreviewCardActions, type PreviewCardActionsProps, PreviewCardBody, type PreviewCardBodyProps, PreviewCardEyebrow, type PreviewCardEyebrowProps, PreviewCardFooter, type PreviewCardFooterProps, PreviewCardMeta, type PreviewCardMetaProps, type PullToRefresh, PullToRefreshIndicator, type PullToRefreshIndicatorProps, type PullToRefreshPlatform, type PullToRefreshState, SaveStatus, SaveStatusError, type SaveStatusErrorProps, type SaveStatusProps, SaveStatusSaved, type SaveStatusSavedProps, SelectionToolbar, SelectionToolbarAction, type SelectionToolbarActionProps, SelectionToolbarActions, type SelectionToolbarActionsProps, SelectionToolbarClose, type SelectionToolbarCloseProps, SelectionToolbarCount, type SelectionToolbarCountProps, SelectionToolbarCountValue, type SelectionToolbarCountValueProps, SelectionToolbarDock, type SelectionToolbarDockProps, SelectionToolbarHint, type SelectionToolbarHintProps, SelectionToolbarItem, type SelectionToolbarItemProps, SelectionToolbarMore, SelectionToolbarMoreItems, type SelectionToolbarMoreProps, type SelectionToolbarProps, TOUCH_DRAG_DISTANCE_PX, TOUCH_DRAG_HOLD_MS, TOUCH_DRAG_TOLERANCE_PX, type TableSort, TableSortButton, type TableSortButtonProps, TableSortableHead, type TableSortableHeadProps, TaskCompletionControl, type TaskCompletionControlProps, type UseCommentMarginFitsOptions, type UseDragListsOptions, type UsePullToRefreshOptions, WebTopBarCenter, type WebTopBarCenterProps, WebTopBarEnd, type WebTopBarEndProps, WebTopBarRoot, type WebTopBarRootProps, WebTopBarStart, type WebTopBarStartProps, cancelDrag, createDragAnnouncements, dragInstructions, dragListStrategy, dragMessages, keepGrabInside, listKeyboardCoordinates, resolveCommentMarginLayout, setCommentHighlights, useCommentMarginFits, useDragAcrossLists, useDragAnnouncer, useDragLists, useDragSensors, useDragSiblingTransition, useFitItem, useFitMore, useHoldThenMoveTouchSensor, useInFitToolbar, useKeyboardPlatform, useMouseOnlyPointerSensor, useParentOverlayKind, usePullToRefresh, useTruncated };
|
package/dist/wip.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { HoldThenMoveTouchSensor, MouseOnlyPointerSensor, TOUCH_DRAG_DISTANCE_PX
|
|
|
10
10
|
import { PopoverActions, PopoverBody } from "./components/popover/popover.mjs";
|
|
11
11
|
import { MobileNavServerItem, MobileNavServerPopover, MobileNavServerPopoverContent, MobileNavServerPopoverDestination, MobileNavServerPopoverDestinations, MobileNavServerPopoverGroup, MobileNavServerPopoverList, MobileNavServerPopoverRow, MobileNavServerPopoverRowBody, MobileNavServerPopoverRowDescription, MobileNavServerPopoverRowLabel } from "./components/mobile-nav/mobile-nav-server.mjs";
|
|
12
12
|
import { PreviewCardActions, PreviewCardBody, PreviewCardEyebrow, PreviewCardFooter, PreviewCardMeta } from "./components/preview-card/preview-card.mjs";
|
|
13
|
-
import { FitToolbar, FitToolbarButton, FitToolbarGroup, FitToolbarMore, FitToolbarMoreItems, FitToolbarPicker, FitToolbarSearch, useFitItem, useFitMore, useInFitToolbar } from "./components/fit-toolbar/fit-toolbar.mjs";
|
|
13
|
+
import { FIT_SEARCH_MAX_LEAST, FitToolbar, FitToolbarButton, FitToolbarGroup, FitToolbarMore, FitToolbarMoreItems, FitToolbarPicker, FitToolbarSearch, FitToolbarSplitButton, useFitItem, useFitMore, useInFitToolbar } from "./components/fit-toolbar/fit-toolbar.mjs";
|
|
14
14
|
import { AvatarGroupButton } from "./components/avatar/avatar.mjs";
|
|
15
15
|
import { MessageItemTrailing } from "./components/message-item/message-item-content.mjs";
|
|
16
16
|
import { MessageItemDelegatedAvatar, MessageItemDelegatedBy, MessageItemDelegatedByButton, MessageItemDelegatedByName } from "./components/message-item/message-item-delegated.mjs";
|
|
@@ -52,4 +52,4 @@ import { SaveStatus, SaveStatusError, SaveStatusSaved } from "./components/save-
|
|
|
52
52
|
import { TaskCompletionControl } from "./components/task-completion-control/task-completion-control.mjs";
|
|
53
53
|
import { KbdButton, KbdButtonCaret, KbdButtonPlaceholder } from "./components/kbd-button/kbd-button.mjs";
|
|
54
54
|
import { WebTopBarCenter, WebTopBarEnd, WebTopBarRoot, WebTopBarStart } from "./components/web-top-bar/web-top-bar.mjs";
|
|
55
|
-
export { Dialog as AnnouncementDialog, AnnouncementDialogAction, AnnouncementDialogBody, DialogClose as AnnouncementDialogClose, AnnouncementDialogContent, AnnouncementDialogFooter, AnnouncementDialogHeader, AnnouncementDialogLabel, AnnouncementDialogPicture, AnnouncementDialogSecondaryAction, AnnouncementDialogText, AnnouncementDialogTitle, DialogTrigger as AnnouncementDialogTrigger, AppLinkCard, AppLinkCardActions, AppLinkCardBody, AppLinkCardEyebrow, AppLinkCardHeader, AppLinkCardHost, AppLinkCardIcon, AppLinkCardMeta, AppLinkCardName, AppLinkCardPlaceholder, AppLinkCardTitle, AvatarGroupButton, ButtonSplit, ButtonSplitMain, ButtonSplitMenu, COMMENT_HIGHLIGHT, COMMENT_HIGHLIGHT_ACTIVE, ChoiceList, ComboboxSelect, CommentCard, CommentCardMeta, CommentCardQuote, CommentCardTrigger, CommentEntry, CommentEntryAuthor, CommentEntryBody, CommentEntryHeader, CommentEntryTime, CommentMargin, CommentMarginItem, CommentMarker, DEFAULT_DRAG_MESSAGES, DRAG_AUTO_SCROLL_ZONE_PX, DRAG_KEYBOARD_CODES, DRAG_KEYBOARD_OFFSET_PX, DRAG_LIFT_Z_INDEX, DRAG_SETTLE, DRAG_SIBLING_TRANSITION, DROP_GLIDE, DialogFooterNote, DragLift, DragLiveRegion, DragRefusalHint, DragRemeasure, DraggedSlot, DropPlaceholder, DropdownMenuLinkItem, Ellipsis, EllipsisToggle, FilterChip, FilterChipLabel, FilterChipRemove, FitToolbar, FitToolbarButton, FitToolbarGroup, FitToolbarMore, FitToolbarMoreItems, FitToolbarPicker, FitToolbarSearch, HoldThenMoveTouchSensor, InboxItemLeadingBadge, InboxItemLine, InboxItemListGroup, InboxItemListHeading, InboxItemSkeleton, InboxItemSkeletonList, InboxItemStatus, KbdButton, KbdButtonCaret, KbdButtonPlaceholder, KbdShortcut, LIFT_CLASS, LightboxBody, ListRowSkeleton, MOUSE_DRAG_DISTANCE_PX, MessageItemDelegatedAvatar, MessageItemDelegatedBy, MessageItemDelegatedByButton, MessageItemDelegatedByName, MessageItemTrailing, MessageListJumpControls, MessageListJumpPill, MessageListJumpPillDismiss, MessageListJumpPillGroup, MessageQuotedPreviewAuthorDelegatedBy, MessageReferenceIcon, MessageReferenceReadMark, Meter, MeterHeader, MeterIndicator, MeterLabel, MeterTrack, MeterValue, MobileNavServerItem, MobileNavServerPopover, MobileNavServerPopoverContent, MobileNavServerPopoverDestination, MobileNavServerPopoverDestinations, MobileNavServerPopoverGroup, MobileNavServerPopoverList, MobileNavServerPopoverRow, MobileNavServerPopoverRowBody, MobileNavServerPopoverRowDescription, MobileNavServerPopoverRowLabel, MouseOnlyPointerSensor, ORIGIN_OPACITY, OverlayLayerProvider, PULL_TO_REFRESH_DAMPING, PULL_TO_REFRESH_HOLD_DISTANCE, PULL_TO_REFRESH_MAX_DISTANCE, PULL_TO_REFRESH_POINTER_QUERY, PULL_TO_REFRESH_SNAP_BACK_MS, PULL_TO_REFRESH_THRESHOLD, PanelSplitAction, PanelSplitActionMain, PanelSplitActionMenu, PanelSplitActionToggle, PopoverActions, PopoverBody, PreviewCardActions, PreviewCardBody, PreviewCardEyebrow, PreviewCardFooter, PreviewCardMeta, PullToRefreshIndicator, SaveStatus, SaveStatusError, SaveStatusSaved, SelectionToolbar, SelectionToolbarAction, SelectionToolbarActions, SelectionToolbarClose, SelectionToolbarCount, SelectionToolbarCountValue, SelectionToolbarDock, SelectionToolbarHint, SelectionToolbarItem, SelectionToolbarMore, SelectionToolbarMoreItems, TOUCH_DRAG_DISTANCE_PX, TOUCH_DRAG_HOLD_MS, TOUCH_DRAG_TOLERANCE_PX, TableSortButton, TableSortableHead, TaskCompletionControl, WebTopBarCenter, WebTopBarEnd, WebTopBarRoot, WebTopBarStart, cancelDrag, createDragAnnouncements, dragInstructions, dragListStrategy, dragMessages, keepGrabInside, listKeyboardCoordinates, resolveCommentMarginLayout, setCommentHighlights, useCommentMarginFits, useDragAcrossLists, useDragAnnouncer, useDragLists, useDragSensors, useDragSiblingTransition, useFitItem, useFitMore, useHoldThenMoveTouchSensor, useInFitToolbar, useKeyboardPlatform, useMouseOnlyPointerSensor, useParentOverlayKind, usePullToRefresh, useTruncated };
|
|
55
|
+
export { Dialog as AnnouncementDialog, AnnouncementDialogAction, AnnouncementDialogBody, DialogClose as AnnouncementDialogClose, AnnouncementDialogContent, AnnouncementDialogFooter, AnnouncementDialogHeader, AnnouncementDialogLabel, AnnouncementDialogPicture, AnnouncementDialogSecondaryAction, AnnouncementDialogText, AnnouncementDialogTitle, DialogTrigger as AnnouncementDialogTrigger, AppLinkCard, AppLinkCardActions, AppLinkCardBody, AppLinkCardEyebrow, AppLinkCardHeader, AppLinkCardHost, AppLinkCardIcon, AppLinkCardMeta, AppLinkCardName, AppLinkCardPlaceholder, AppLinkCardTitle, AvatarGroupButton, ButtonSplit, ButtonSplitMain, ButtonSplitMenu, COMMENT_HIGHLIGHT, COMMENT_HIGHLIGHT_ACTIVE, ChoiceList, ComboboxSelect, CommentCard, CommentCardMeta, CommentCardQuote, CommentCardTrigger, CommentEntry, CommentEntryAuthor, CommentEntryBody, CommentEntryHeader, CommentEntryTime, CommentMargin, CommentMarginItem, CommentMarker, DEFAULT_DRAG_MESSAGES, DRAG_AUTO_SCROLL_ZONE_PX, DRAG_KEYBOARD_CODES, DRAG_KEYBOARD_OFFSET_PX, DRAG_LIFT_Z_INDEX, DRAG_SETTLE, DRAG_SIBLING_TRANSITION, DROP_GLIDE, DialogFooterNote, DragLift, DragLiveRegion, DragRefusalHint, DragRemeasure, DraggedSlot, DropPlaceholder, DropdownMenuLinkItem, Ellipsis, EllipsisToggle, FIT_SEARCH_MAX_LEAST, FilterChip, FilterChipLabel, FilterChipRemove, FitToolbar, FitToolbarButton, FitToolbarGroup, FitToolbarMore, FitToolbarMoreItems, FitToolbarPicker, FitToolbarSearch, FitToolbarSplitButton, HoldThenMoveTouchSensor, InboxItemLeadingBadge, InboxItemLine, InboxItemListGroup, InboxItemListHeading, InboxItemSkeleton, InboxItemSkeletonList, InboxItemStatus, KbdButton, KbdButtonCaret, KbdButtonPlaceholder, KbdShortcut, LIFT_CLASS, LightboxBody, ListRowSkeleton, MOUSE_DRAG_DISTANCE_PX, MessageItemDelegatedAvatar, MessageItemDelegatedBy, MessageItemDelegatedByButton, MessageItemDelegatedByName, MessageItemTrailing, MessageListJumpControls, MessageListJumpPill, MessageListJumpPillDismiss, MessageListJumpPillGroup, MessageQuotedPreviewAuthorDelegatedBy, MessageReferenceIcon, MessageReferenceReadMark, Meter, MeterHeader, MeterIndicator, MeterLabel, MeterTrack, MeterValue, MobileNavServerItem, MobileNavServerPopover, MobileNavServerPopoverContent, MobileNavServerPopoverDestination, MobileNavServerPopoverDestinations, MobileNavServerPopoverGroup, MobileNavServerPopoverList, MobileNavServerPopoverRow, MobileNavServerPopoverRowBody, MobileNavServerPopoverRowDescription, MobileNavServerPopoverRowLabel, MouseOnlyPointerSensor, ORIGIN_OPACITY, OverlayLayerProvider, PULL_TO_REFRESH_DAMPING, PULL_TO_REFRESH_HOLD_DISTANCE, PULL_TO_REFRESH_MAX_DISTANCE, PULL_TO_REFRESH_POINTER_QUERY, PULL_TO_REFRESH_SNAP_BACK_MS, PULL_TO_REFRESH_THRESHOLD, PanelSplitAction, PanelSplitActionMain, PanelSplitActionMenu, PanelSplitActionToggle, PopoverActions, PopoverBody, PreviewCardActions, PreviewCardBody, PreviewCardEyebrow, PreviewCardFooter, PreviewCardMeta, PullToRefreshIndicator, SaveStatus, SaveStatusError, SaveStatusSaved, SelectionToolbar, SelectionToolbarAction, SelectionToolbarActions, SelectionToolbarClose, SelectionToolbarCount, SelectionToolbarCountValue, SelectionToolbarDock, SelectionToolbarHint, SelectionToolbarItem, SelectionToolbarMore, SelectionToolbarMoreItems, TOUCH_DRAG_DISTANCE_PX, TOUCH_DRAG_HOLD_MS, TOUCH_DRAG_TOLERANCE_PX, TableSortButton, TableSortableHead, TaskCompletionControl, WebTopBarCenter, WebTopBarEnd, WebTopBarRoot, WebTopBarStart, cancelDrag, createDragAnnouncements, dragInstructions, dragListStrategy, dragMessages, keepGrabInside, listKeyboardCoordinates, resolveCommentMarginLayout, setCommentHighlights, useCommentMarginFits, useDragAcrossLists, useDragAnnouncer, useDragLists, useDragSensors, useDragSiblingTransition, useFitItem, useFitMore, useHoldThenMoveTouchSensor, useInFitToolbar, useKeyboardPlatform, useMouseOnlyPointerSensor, useParentOverlayKind, usePullToRefresh, useTruncated };
|