@stll/ui 0.69.0 → 0.72.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/calendar/primitives.d.ts +7 -7
- package/dist/components/alert-dialog.d.ts +15 -15
- package/dist/components/animated-preview.d.ts +9 -9
- package/dist/components/animated-preview.js +3 -3
- package/dist/components/application-rail.d.ts +8 -8
- package/dist/components/bidi-text.d.ts +7 -7
- package/dist/components/brand-icons.d.ts +5 -5
- package/dist/components/breadcrumb.d.ts +8 -8
- package/dist/components/button.d.ts +13 -1
- package/dist/components/button.js +14 -5
- package/dist/components/color-picker.d.ts +4 -4
- package/dist/components/combobox.d.ts +23 -23
- package/dist/components/combobox.js +6 -6
- package/dist/components/command.d.ts +19 -19
- package/dist/components/date-picker-popover.js +8 -2
- package/dist/components/destructive-action-confirmation.d.ts +5 -5
- package/dist/components/destructive-action-confirmation.js +2 -2
- package/dist/components/destructive-confirm-dialog.d.ts +7 -7
- package/dist/components/details-grid.d.ts +6 -6
- package/dist/components/dialog.d.ts +19 -19
- package/dist/components/document-identity-badge.js +6 -0
- package/dist/components/frame.d.ts +7 -7
- package/dist/components/hex-color-picker.d.ts +16 -2
- package/dist/components/horizontal-scroller.d.ts +6 -0
- package/dist/components/horizontal-scroller.js +59 -33
- package/dist/components/identity-text.js +1 -0
- package/dist/components/input-group.d.ts +6 -6
- package/dist/components/input-otp.d.ts +7 -7
- package/dist/components/input-otp.js +2 -2
- package/dist/components/input.d.ts +5 -5
- package/dist/components/kbd.d.ts +3 -3
- package/dist/components/list.d.ts +20 -20
- package/dist/components/menu.d.ts +20 -20
- package/dist/components/outline-rail.d.ts +12 -0
- package/dist/components/pagination.d.ts +9 -9
- package/dist/components/popover.d.ts +8 -8
- package/dist/components/preview-pane.d.ts +6 -6
- package/dist/components/prose.d.ts +2 -2
- package/dist/components/scroll-to-top.d.ts +5 -0
- package/dist/components/search-field.d.ts +3 -3
- package/dist/components/select.d.ts +9 -9
- package/dist/components/select.js +11 -11
- package/dist/components/sheet.d.ts +16 -16
- package/dist/components/split-button.d.ts +6 -1
- package/dist/components/split-button.js +8 -3
- package/dist/components/steps.d.ts +6 -6
- package/dist/components/switch.d.ts +5 -5
- package/dist/components/switch.native.d.ts +3 -3
- package/dist/components/table.d.ts +16 -16
- package/dist/components/textarea.d.ts +3 -3
- package/dist/components/time-field.d.ts +3 -3
- package/dist/components/toast.d.ts +20 -20
- package/dist/components/toast.js +3 -3
- package/dist/components/toggle-group.d.ts +4 -4
- package/dist/components/toggle.d.ts +3 -3
- package/dist/components/tooltip-trigger-helper.d.ts +4 -4
- package/dist/components/truncated-text.d.ts +4 -4
- package/dist/components/truncated-text.js +3 -3
- package/dist/components/view-toolbar.d.ts +11 -3
- package/dist/components/view-toolbar.js +16 -5
- package/dist/data-table/index.d.ts +7 -0
- package/dist/hooks/use-contained-handler.d.ts +2 -2
- package/dist/hooks/use-mobile.js +2 -2
- package/dist/hooks/use-viewport-width.js +2 -2
- package/dist/icons.d.ts +29 -2
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/inspector/chrome.d.ts +22 -22
- package/dist/inspector/index.d.ts +9 -0
- package/dist/kanban/grouping.d.ts +10 -0
- package/dist/kanban/index.d.ts +9 -0
- package/dist/kanban/sortable-interactions.d.ts +8 -8
- package/dist/kanban/sortable-interactions.js +11 -11
- package/dist/lib/button-disposition.d.ts +2 -2
- package/dist/lib/file-size.d.ts +16 -0
- package/dist/lib/file-size.js +30 -0
- package/dist/lib/tooltip-content.d.ts +2 -2
- package/dist/lib/utils.d.ts +2 -2
- package/dist/review/review-out-of-date-notice.d.ts +7 -1
- package/dist/review/review-out-of-date-notice.js +4 -1
- package/dist/styles/inline-rename.css +9 -0
- package/package.json +13 -9
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { Button } from "./button.js";
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
-
declare const Pagination: ({ className, ...props }: React
|
|
5
|
-
declare const PaginationContent: ({ className, ...props }: React
|
|
6
|
-
declare const PaginationItem: ({ ...props }: React
|
|
4
|
+
declare const Pagination: ({ className, ...props }: React.ComponentProps<"nav">) => React.JSX.Element;
|
|
5
|
+
declare const PaginationContent: ({ className, ...props }: React.ComponentProps<"ul">) => React.JSX.Element;
|
|
6
|
+
declare const PaginationItem: ({ ...props }: React.ComponentProps<"li">) => React.JSX.Element;
|
|
7
7
|
type PaginationLinkProps = {
|
|
8
8
|
isActive?: boolean;
|
|
9
|
-
size?: React
|
|
9
|
+
size?: React.ComponentProps<typeof Button>["size"];
|
|
10
10
|
} & useRender.ComponentProps<"a">;
|
|
11
|
-
declare function PaginationLink({ className, isActive, size, render, ...props }: PaginationLinkProps): React
|
|
12
|
-
declare const PaginationPrevious: ({ className, ...props }: React
|
|
13
|
-
declare const PaginationNext: ({ className, ...props }: React
|
|
14
|
-
declare const PaginationEllipsis: ({ className, ...props }: React
|
|
11
|
+
declare function PaginationLink({ className, isActive, size, render, ...props }: PaginationLinkProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
12
|
+
declare const PaginationPrevious: ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => React.JSX.Element;
|
|
13
|
+
declare const PaginationNext: ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => React.JSX.Element;
|
|
14
|
+
declare const PaginationEllipsis: ({ className, ...props }: React.ComponentProps<"span">) => React.JSX.Element;
|
|
15
15
|
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
3
|
import { OverlayLayer } from "../lib/overlay-layer.js";
|
|
4
4
|
import { Popover as Popover$1 } from "@base-ui/react/popover";
|
|
5
5
|
declare const PopoverCreateHandle: typeof Popover$1.createHandle;
|
|
6
6
|
declare const Popover: typeof Popover$1.Root;
|
|
7
7
|
declare function PopoverTrigger({ tooltip, ...props }: Popover$1.Trigger.Props & {
|
|
8
|
-
tooltip?: React
|
|
9
|
-
}): React
|
|
8
|
+
tooltip?: React.ReactNode;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
10
|
/**
|
|
11
11
|
* Viewport padding. The inline value also feeds the page-width calculation of
|
|
12
12
|
* the viewport, so both axes change together.
|
|
@@ -28,7 +28,7 @@ declare const PopoverPopup: ({ children, className, side, align, sideOffset, ali
|
|
|
28
28
|
anchor?: Popover$1.Positioner.Props["anchor"];
|
|
29
29
|
layer?: OverlayLayer;
|
|
30
30
|
tooltipStyle?: boolean;
|
|
31
|
-
}) => React
|
|
31
|
+
}) => React.JSX.Element;
|
|
32
32
|
/**
|
|
33
33
|
* Popover surface with the content layout baked in: children stack in a vertical
|
|
34
34
|
* flex container. coss renders popup children inside a separate inner Viewport,
|
|
@@ -38,8 +38,8 @@ declare const PopoverPopup: ({ children, className, side, align, sideOffset, ali
|
|
|
38
38
|
*/
|
|
39
39
|
declare const PopoverPanel: ({ children, contentClassName, ...props }: ComponentProps<typeof PopoverPopup> & {
|
|
40
40
|
contentClassName?: string;
|
|
41
|
-
}) => React
|
|
42
|
-
declare const PopoverClose: ({ ...props }: Popover$1.Close.Props) => React
|
|
43
|
-
declare const PopoverTitle: ({ className, ...props }: Popover$1.Title.Props) => React
|
|
44
|
-
declare const PopoverDescription: ({ className, ...props }: Popover$1.Description.Props) => React
|
|
41
|
+
}) => React.JSX.Element;
|
|
42
|
+
declare const PopoverClose: ({ ...props }: Popover$1.Close.Props) => React.JSX.Element;
|
|
43
|
+
declare const PopoverTitle: ({ className, ...props }: Popover$1.Title.Props) => React.JSX.Element;
|
|
44
|
+
declare const PopoverDescription: ({ className, ...props }: Popover$1.Description.Props) => React.JSX.Element;
|
|
45
45
|
export { Popover, PopoverClose, PopoverPopup as PopoverContent, PopoverPopup, PopoverCreateHandle, PopoverDescription, PopoverPanel, PopoverTitle, PopoverTrigger };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
/**
|
|
3
3
|
* Side-pane preview pattern: a list of options (menu items, rows) with a
|
|
4
4
|
* fixed-width pane beside it that previews the highlighted option. The pane
|
|
@@ -6,8 +6,8 @@ import * as React$1 from "react";
|
|
|
6
6
|
* from `onMouseEnter`/`onFocus` on the options and render `PreviewPane`
|
|
7
7
|
* empty (no children) while nothing is highlighted.
|
|
8
8
|
*/
|
|
9
|
-
type MenuPreviewLayoutProps = React
|
|
10
|
-
preview: React
|
|
9
|
+
type MenuPreviewLayoutProps = React.PropsWithChildren<{
|
|
10
|
+
preview: React.ReactNode;
|
|
11
11
|
className?: string;
|
|
12
12
|
/**
|
|
13
13
|
* `fixed` sizes the menu around a fixed-width pane. `remaining` is for a
|
|
@@ -17,7 +17,7 @@ type MenuPreviewLayoutProps = React$1.PropsWithChildren<{
|
|
|
17
17
|
*/
|
|
18
18
|
previewWidth?: "fixed" | "remaining";
|
|
19
19
|
}>;
|
|
20
|
-
declare const MenuPreviewLayout: ({ children, preview, className, previewWidth }: MenuPreviewLayoutProps) => React
|
|
20
|
+
declare const MenuPreviewLayout: ({ children, preview, className, previewWidth }: MenuPreviewLayoutProps) => React.JSX.Element;
|
|
21
21
|
/**
|
|
22
22
|
* What the pane does with content taller than its box. `clip` is for a
|
|
23
23
|
* depiction (a sketch, a scaled glimpse of a page) that only has to show its
|
|
@@ -29,7 +29,7 @@ declare const MenuPreviewLayout: ({ children, preview, className, previewWidth }
|
|
|
29
29
|
* assistive technology.
|
|
30
30
|
*/
|
|
31
31
|
type PreviewPaneOverflow = "clip" | "scroll";
|
|
32
|
-
type PreviewPaneProps = React
|
|
32
|
+
type PreviewPaneProps = React.ComponentProps<"div"> & {
|
|
33
33
|
overflow?: PreviewPaneOverflow;
|
|
34
34
|
/**
|
|
35
35
|
* `default` is the side pane described above. `thumbnail` is the same pane
|
|
@@ -37,5 +37,5 @@ type PreviewPaneProps = React$1.ComponentProps<"div"> & {
|
|
|
37
37
|
*/
|
|
38
38
|
size?: "default" | "thumbnail";
|
|
39
39
|
};
|
|
40
|
-
declare const PreviewPane: ({ children, className, overflow, size, ...props }: PreviewPaneProps) => React
|
|
40
|
+
declare const PreviewPane: ({ children, className, overflow, size, ...props }: PreviewPaneProps) => React.JSX.Element;
|
|
41
41
|
export { MenuPreviewLayout, PreviewPane };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
/** Preserve source word breaks while allowing oversized tokens to fit narrow panes. */
|
|
4
4
|
export declare const LEGAL_TEXT_CLASS_NAME = "hyphens-manual wrap-anywhere";
|
|
@@ -7,5 +7,5 @@ declare const proseVariants: (props?: ({
|
|
|
7
7
|
tone?: "default" | "muted" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
/** A readable measure for narrative copy; task-shaped text should not use it. */
|
|
10
|
-
export declare const Prose: ({ className, size, tone, ...props }: React
|
|
10
|
+
export declare const Prose: ({ className, size, tone, ...props }: React.ComponentProps<"p"> & VariantProps<typeof proseVariants>) => React.JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scroll-to-top affordance — a subtle floating button that fades in once a
|
|
3
|
+
* scroll container is scrolled past a threshold and jumps back to the top
|
|
4
|
+
* (instant, not animated, so it stays snappy on very long documents).
|
|
5
|
+
*/
|
|
1
6
|
import { RefObject } from "react";
|
|
2
7
|
export type ScrollToTopProps = {
|
|
3
8
|
scrollContainerRef: RefObject<HTMLElement | null>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { InputGroupInput } from "./input-group.js";
|
|
3
|
-
type SearchFieldProps = Omit<React
|
|
3
|
+
type SearchFieldProps = Omit<React.ComponentProps<typeof InputGroupInput>, "onChange" | "type" | "value"> & {
|
|
4
4
|
value: string;
|
|
5
5
|
onValueChange: (value: string) => void;
|
|
6
6
|
/** Accessible name of the clear button; the package ships no copy. */
|
|
@@ -14,5 +14,5 @@ type SearchFieldProps = Omit<React$1.ComponentProps<typeof InputGroupInput>, "on
|
|
|
14
14
|
* and the matching; keep matching local and instant for lists under a few
|
|
15
15
|
* hundred rows.
|
|
16
16
|
*/
|
|
17
|
-
declare const SearchField: ({ value, onValueChange, clearLabel, groupClassName, className, onKeyDown, ...props }: SearchFieldProps) => React
|
|
17
|
+
declare const SearchField: ({ value, onValueChange, clearLabel, groupClassName, className, onKeyDown, ...props }: SearchFieldProps) => React.JSX.Element;
|
|
18
18
|
export { SearchField, type SearchFieldProps };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { ControlSize } from "../lib/control-size.js";
|
|
3
3
|
import { Select as Select$1 } from "@base-ui/react/select";
|
|
4
4
|
type SelectItemProps = Select$1.Item.Props & {
|
|
5
5
|
label?: string;
|
|
6
6
|
};
|
|
7
|
-
declare const Select: <Value, Multiple extends boolean | undefined = false>({ children, isItemEqualToValue, itemToStringLabel, itemToStringValue, ...props }: Select$1.Root.Props<Value, Multiple>) => React
|
|
7
|
+
declare const Select: <Value, Multiple extends boolean | undefined = false>({ children, isItemEqualToValue, itemToStringLabel, itemToStringValue, ...props }: Select$1.Root.Props<Value, Multiple>) => React.JSX.Element;
|
|
8
8
|
declare const SelectTrigger: ({ className, align, size, children, ...props }: Select$1.Trigger.Props & {
|
|
9
9
|
size?: ControlSize;
|
|
10
10
|
align?: "start" | "center";
|
|
11
|
-
}) => React
|
|
12
|
-
declare const SelectValue: ({ className, children, placeholder, ...props }: Select$1.Value.Props) => React
|
|
11
|
+
}) => React.JSX.Element;
|
|
12
|
+
declare const SelectValue: ({ className, children, placeholder, ...props }: Select$1.Value.Props) => React.JSX.Element;
|
|
13
13
|
declare const SelectPopup: ({ className, children, side, sideOffset, align, alignOffset, alignItemWithTrigger, ...props }: Select$1.Popup.Props & {
|
|
14
14
|
side?: Select$1.Positioner.Props["side"];
|
|
15
15
|
sideOffset?: Select$1.Positioner.Props["sideOffset"];
|
|
16
16
|
align?: Select$1.Positioner.Props["align"];
|
|
17
17
|
alignOffset?: Select$1.Positioner.Props["alignOffset"];
|
|
18
18
|
alignItemWithTrigger?: Select$1.Positioner.Props["alignItemWithTrigger"];
|
|
19
|
-
}) => React
|
|
20
|
-
declare const SelectItem: ({ className, children, label: _label, ...props }: SelectItemProps) => React
|
|
21
|
-
declare const SelectSeparator: ({ className, ...props }: Select$1.Separator.Props) => React
|
|
22
|
-
declare const SelectGroup: (props: Select$1.Group.Props) => React
|
|
23
|
-
declare const SelectGroupLabel: (props: Select$1.GroupLabel.Props) => React
|
|
19
|
+
}) => React.JSX.Element;
|
|
20
|
+
declare const SelectItem: ({ className, children, label: _label, ...props }: SelectItemProps) => React.JSX.Element;
|
|
21
|
+
declare const SelectSeparator: ({ className, ...props }: Select$1.Separator.Props) => React.JSX.Element;
|
|
22
|
+
declare const SelectGroup: (props: Select$1.Group.Props) => React.JSX.Element;
|
|
23
|
+
declare const SelectGroupLabel: (props: Select$1.GroupLabel.Props) => React.JSX.Element;
|
|
24
24
|
export { Select, SelectPopup as SelectContent, SelectPopup, SelectGroup, SelectGroupLabel, SelectItem, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -6,10 +6,10 @@ import { FIELD_TRIGGER_CLASS_NAME } from "../lib/field-trigger.js";
|
|
|
6
6
|
import { OVERLAY_LAYER_CLASS_NAMES } from "../lib/overlay-layer.js";
|
|
7
7
|
import { cn } from "../lib/utils.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import * as React
|
|
9
|
+
import * as React from "react";
|
|
10
10
|
import { Select as Select$1 } from "@base-ui/react/select";
|
|
11
11
|
// src/components/select.tsx
|
|
12
|
-
const SelectItemDisplaysContext = React
|
|
12
|
+
const SelectItemDisplaysContext = React.createContext(/* @__PURE__ */ new Map());
|
|
13
13
|
const renderSelectedDisplay = (displays, placeholder) => (value) => {
|
|
14
14
|
if (!displays.has(value)) return placeholder ?? null;
|
|
15
15
|
return displays.get(value) ?? null;
|
|
@@ -18,7 +18,7 @@ const Select = ({ children, isItemEqualToValue, itemToStringLabel, itemToStringV
|
|
|
18
18
|
const itemLabels = collectSelectItemLabels(children);
|
|
19
19
|
const itemDisplays = collectSelectItemDisplays(children);
|
|
20
20
|
const itemLabelsRef = useLatest(itemLabels);
|
|
21
|
-
const resolveItemLabel = React
|
|
21
|
+
const resolveItemLabel = React.useCallback((value) => itemLabelsRef.current.get(value) ?? String(value), [itemLabelsRef]);
|
|
22
22
|
const root = /* @__PURE__ */ jsx(Select$1.Root, {
|
|
23
23
|
...props,
|
|
24
24
|
isItemEqualToValue,
|
|
@@ -46,7 +46,7 @@ const SELECT_TRIGGER_SIZE_CLASS_NAMES = {
|
|
|
46
46
|
[CONTROL_SIZE.lg]: "min-h-10 sm:min-h-9"
|
|
47
47
|
};
|
|
48
48
|
const SelectValue = ({ className, children, placeholder, ...props }) => {
|
|
49
|
-
const displays = React
|
|
49
|
+
const displays = React.use(SelectItemDisplaysContext);
|
|
50
50
|
if (children !== void 0 || displays.size === 0) return /* @__PURE__ */ jsx(Select$1.Value, {
|
|
51
51
|
className: cn("data-placeholder:text-muted-foreground flex-1 truncate", className),
|
|
52
52
|
"data-slot": "select-value",
|
|
@@ -121,14 +121,14 @@ const SelectItem = ({ className, children, label: _label, ...props }) => /* @__P
|
|
|
121
121
|
});
|
|
122
122
|
function collectSelectItemLabels(children) {
|
|
123
123
|
const labels = /* @__PURE__ */ new Map();
|
|
124
|
-
React
|
|
124
|
+
React.Children.forEach(children, (child) => {
|
|
125
125
|
collectSelectItemLabel(child, labels);
|
|
126
126
|
});
|
|
127
127
|
return labels;
|
|
128
128
|
}
|
|
129
129
|
function collectSelectItemDisplays(children) {
|
|
130
130
|
const displays = /* @__PURE__ */ new Map();
|
|
131
|
-
React
|
|
131
|
+
React.Children.forEach(children, (child) => {
|
|
132
132
|
collectSelectItemDisplay(child, displays);
|
|
133
133
|
});
|
|
134
134
|
return displays;
|
|
@@ -140,7 +140,7 @@ function collectSelectItemDisplay(child, displays) {
|
|
|
140
140
|
displays.set(value, child.props.children);
|
|
141
141
|
return;
|
|
142
142
|
}
|
|
143
|
-
React
|
|
143
|
+
React.Children.forEach(child.props.children, (nestedChild) => {
|
|
144
144
|
collectSelectItemDisplay(nestedChild, displays);
|
|
145
145
|
});
|
|
146
146
|
}
|
|
@@ -151,15 +151,15 @@ function collectSelectItemLabel(child, labels) {
|
|
|
151
151
|
const label = child.props.label ?? getTextLabel(child.props.children);
|
|
152
152
|
if (label) labels.set(value, label);
|
|
153
153
|
}
|
|
154
|
-
React
|
|
154
|
+
React.Children.forEach(child.props.children, (nestedChild) => {
|
|
155
155
|
collectSelectItemLabel(nestedChild, labels);
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
function isElementWithChildren(node) {
|
|
159
|
-
return React
|
|
159
|
+
return React.isValidElement(node);
|
|
160
160
|
}
|
|
161
161
|
function isSelectItemElement(node) {
|
|
162
|
-
return React
|
|
162
|
+
return React.isValidElement(node) && node.type === SelectItem;
|
|
163
163
|
}
|
|
164
164
|
function isReactNodeArray(node) {
|
|
165
165
|
return Array.isArray(node);
|
|
@@ -168,7 +168,7 @@ function getTextLabel(node) {
|
|
|
168
168
|
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
169
169
|
if (isReactNodeArray(node)) {
|
|
170
170
|
const parts = [];
|
|
171
|
-
React
|
|
171
|
+
React.Children.forEach(node, (child) => {
|
|
172
172
|
const text = getTextLabel(child);
|
|
173
173
|
if (text) parts.push(text);
|
|
174
174
|
});
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { Dialog } from "@base-ui/react/dialog";
|
|
3
|
-
declare const Sheet: <Payload>(props: Dialog.Root.Props<Payload>) => React
|
|
4
|
-
declare const SheetPortal: React
|
|
3
|
+
declare const Sheet: <Payload>(props: Dialog.Root.Props<Payload>) => React.JSX.Element;
|
|
4
|
+
declare const SheetPortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
type SheetSide = "inline-start" | "inline-end" | "block-start" | "block-end";
|
|
6
6
|
declare function SheetTrigger({ tooltip, ...props }: Dialog.Trigger.Props & {
|
|
7
|
-
tooltip?: React
|
|
8
|
-
}): React
|
|
7
|
+
tooltip?: React.ReactNode;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
9
|
declare function SheetClose({ tooltip, ...props }: Dialog.Close.Props & {
|
|
10
|
-
tooltip?: React
|
|
11
|
-
}): React
|
|
12
|
-
declare const SheetBackdrop: ({ className, ...props }: Dialog.Backdrop.Props) => React
|
|
10
|
+
tooltip?: React.ReactNode;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
declare const SheetBackdrop: ({ className, ...props }: Dialog.Backdrop.Props) => React.JSX.Element;
|
|
13
13
|
declare const SheetPopup: ({ className, children, showCloseButton, side, variant, ...props }: Dialog.Popup.Props & {
|
|
14
14
|
showCloseButton?: boolean;
|
|
15
15
|
side?: SheetSide;
|
|
16
16
|
variant?: "default" | "inset";
|
|
17
|
-
}) => React
|
|
18
|
-
declare const SheetHeader: ({ className, ...props }: React
|
|
19
|
-
declare const SheetFooter: ({ className, variant, ...props }: React
|
|
17
|
+
}) => React.JSX.Element;
|
|
18
|
+
declare const SheetHeader: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
19
|
+
declare const SheetFooter: ({ className, variant, ...props }: React.ComponentProps<"div"> & {
|
|
20
20
|
variant?: "default" | "bare";
|
|
21
|
-
}) => React
|
|
22
|
-
declare const SheetTitle: ({ className, ...props }: Dialog.Title.Props) => React
|
|
23
|
-
declare const SheetDescription: ({ className, ...props }: Dialog.Description.Props) => React
|
|
24
|
-
declare const SheetPanel: ({ className, scrollFade, ...props }: React
|
|
21
|
+
}) => React.JSX.Element;
|
|
22
|
+
declare const SheetTitle: ({ className, ...props }: Dialog.Title.Props) => React.JSX.Element;
|
|
23
|
+
declare const SheetDescription: ({ className, ...props }: Dialog.Description.Props) => React.JSX.Element;
|
|
24
|
+
declare const SheetPanel: ({ className, scrollFade, ...props }: React.ComponentProps<"div"> & {
|
|
25
25
|
scrollFade?: boolean;
|
|
26
|
-
}) => React
|
|
26
|
+
}) => React.JSX.Element;
|
|
27
27
|
export { Sheet, SheetBackdrop, SheetBackdrop as SheetOverlay, SheetClose, SheetPopup as SheetContent, SheetPopup, SheetDescription, SheetFooter, SheetHeader, SheetPanel, SheetPortal, type SheetSide, SheetTitle, SheetTrigger };
|
|
@@ -31,6 +31,11 @@ type SplitButtonProps = SplitButtonSharedProps & SplitButtonPrimary & ({
|
|
|
31
31
|
open?: ComponentProps<typeof Popover>["open"];
|
|
32
32
|
onOpenChange?: ComponentProps<typeof Popover>["onOpenChange"];
|
|
33
33
|
});
|
|
34
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Two independent actions share quiet chrome; only the chevron opens the
|
|
36
|
+
* secondary surface. The chrome is quiet, not the glyphs: both halves keep the
|
|
37
|
+
* foreground colour of every other ghost button, so an enabled split button
|
|
38
|
+
* never reads as disabled beside its neighbours.
|
|
39
|
+
*/
|
|
35
40
|
export declare const SplitButton: (props: SplitButtonProps) => import("react").JSX.Element;
|
|
36
41
|
export {};
|
|
@@ -6,11 +6,16 @@ import { DropdownMenu as Menu, DropdownMenuTrigger as MenuTrigger } from "./menu
|
|
|
6
6
|
import { Popover, PopoverTrigger } from "./popover.js";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
// src/components/split-button.tsx
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Two independent actions share quiet chrome; only the chevron opens the
|
|
11
|
+
* secondary surface. The chrome is quiet, not the glyphs: both halves keep the
|
|
12
|
+
* foreground colour of every other ghost button, so an enabled split button
|
|
13
|
+
* never reads as disabled beside its neighbours.
|
|
14
|
+
*/
|
|
10
15
|
const SplitButton = (props) => {
|
|
11
16
|
const { primaryLabel, menuLabel, primaryDescriptionId, menuDescriptionId, onPrimaryClick, children, menu, primaryDisabled, menuDisabled, size = "md", className } = props;
|
|
12
17
|
const triggerButton = /* @__PURE__ */ jsx(Button, {
|
|
13
|
-
className: cn("
|
|
18
|
+
className: cn("group-hover/split:bg-muted group-focus-within/split:bg-muted hover:bg-accent active:bg-accent/80 data-popup-open:bg-accent rounded-md [&_svg]:mx-0", size === "sm" ? "h-7 w-3.5 px-0 sm:h-7" : "h-8 w-4 px-0 sm:h-8", "pointer-coarse:min-h-11 pointer-coarse:min-w-11"),
|
|
14
19
|
size: "sm",
|
|
15
20
|
tooltip: menuLabel,
|
|
16
21
|
variant: "ghost"
|
|
@@ -22,7 +27,7 @@ const SplitButton = (props) => {
|
|
|
22
27
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
23
28
|
"aria-describedby": primaryDescriptionId,
|
|
24
29
|
"aria-label": primaryLabel,
|
|
25
|
-
className: cn("
|
|
30
|
+
className: cn("active:bg-accent/80 rounded-md [&_svg]:mx-0 [&_svg]:size-3.5 [&_svg:not([class*='size-'])]:size-3.5 sm:[&_svg:not([class*='size-'])]:size-3.5", size === "sm" ? "h-7 ps-1.5 pe-0.5 sm:h-7" : "h-8 ps-2 pe-0.5 sm:h-8", "pointer-coarse:min-h-11 pointer-coarse:min-w-11"),
|
|
26
31
|
disabled: primaryDisabled,
|
|
27
32
|
onClick: onPrimaryClick,
|
|
28
33
|
size: "sm",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const stepsVariants: (props?: ({
|
|
4
4
|
variant?: "compact" | "default" | "progress" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
-
type StepsProps = React
|
|
7
|
-
markerStyle: NonNullable<React
|
|
6
|
+
type StepsProps = React.ComponentProps<"ol"> & VariantProps<typeof stepsVariants> & {
|
|
7
|
+
markerStyle: NonNullable<React.CSSProperties["listStyleType"]>;
|
|
8
8
|
};
|
|
9
9
|
/** A meaningful procedure, timeline, or ranking. The list owns its numbers. */
|
|
10
|
-
declare const Steps: ({ className, variant, markerStyle, style, ...props }: StepsProps) => React
|
|
10
|
+
declare const Steps: ({ className, variant, markerStyle, style, ...props }: StepsProps) => React.JSX.Element;
|
|
11
11
|
declare const stepVariants: (props?: ({
|
|
12
12
|
status?: "completed" | "current" | "upcoming" | null | undefined;
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
|
-
type StepProps = React
|
|
15
|
-
declare const Step: ({ className, status, ...props }: StepProps) => React
|
|
14
|
+
type StepProps = React.ComponentProps<"li"> & VariantProps<typeof stepVariants>;
|
|
15
|
+
declare const Step: ({ className, status, ...props }: StepProps) => React.JSX.Element;
|
|
16
16
|
export { Step, Steps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
3
3
|
/**
|
|
4
4
|
* `default` is a setting's own control; `sm` sits in a dense row or a menu
|
|
@@ -8,7 +8,7 @@ type SwitchSize = "sm" | "default";
|
|
|
8
8
|
type SwitchProps = Switch$1.Root.Props & {
|
|
9
9
|
size?: SwitchSize | undefined;
|
|
10
10
|
};
|
|
11
|
-
declare const Switch: ({ className, size, ...props }: SwitchProps) => React
|
|
11
|
+
declare const Switch: ({ className, size, ...props }: SwitchProps) => React.JSX.Element;
|
|
12
12
|
/**
|
|
13
13
|
* A setting row: its label and an optional description at the start, the
|
|
14
14
|
* switch at the end. The whole row is the label, so a click anywhere on it
|
|
@@ -16,7 +16,7 @@ declare const Switch: ({ className, size, ...props }: SwitchProps) => React$1.JS
|
|
|
16
16
|
* description is linked to the switch, so it is read after the name.
|
|
17
17
|
*/
|
|
18
18
|
declare const SwitchField: ({ className, description, label, size, ...props }: SwitchProps & {
|
|
19
|
-
label: React
|
|
20
|
-
description?: React
|
|
21
|
-
}) => React
|
|
19
|
+
label: React.ReactNode;
|
|
20
|
+
description?: React.ReactNode;
|
|
21
|
+
}) => React.JSX.Element;
|
|
22
22
|
export { Switch, SwitchField, type SwitchProps, type SwitchSize };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SwitchContract } from "./switch.shared.js";
|
|
2
|
-
import { SwitchProps } from "react-native";
|
|
3
|
-
type SwitchProps
|
|
2
|
+
import { SwitchProps as SwitchProps$1 } from "react-native";
|
|
3
|
+
type SwitchProps = Omit<SwitchProps$1, "value" | "onValueChange" | "disabled" | keyof SwitchContract> & SwitchContract;
|
|
4
4
|
/**
|
|
5
5
|
* The web's `Switch` (./switch.tsx) on a phone: the platform's own switch, in
|
|
6
6
|
* the web's colours (the primary fill when on, the input fill when off).
|
|
7
7
|
* Controlled through `checked`, or holding its own state from
|
|
8
8
|
* `defaultChecked`.
|
|
9
9
|
*/
|
|
10
|
-
export declare const Switch: ({ checked, defaultChecked, disabled, onCheckedChange, ...props }: SwitchProps
|
|
10
|
+
export declare const Switch: ({ checked, defaultChecked, disabled, onCheckedChange, ...props }: SwitchProps) => import("react").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
/**
|
|
3
3
|
* How far cells pad their content from the column edges.
|
|
4
4
|
*
|
|
@@ -26,13 +26,13 @@ type TableScroll = "self" | "parent";
|
|
|
26
26
|
* first cell rather than as a column heading.
|
|
27
27
|
*/
|
|
28
28
|
type TableDensity = "default" | "compact";
|
|
29
|
-
type TableProps = React
|
|
29
|
+
type TableProps = React.ComponentProps<"table"> & {
|
|
30
30
|
density?: TableDensity;
|
|
31
31
|
inset?: TableInset;
|
|
32
32
|
scroll?: TableScroll;
|
|
33
33
|
};
|
|
34
|
-
declare const Table: ({ className, density, inset, scroll, ...props }: TableProps) => React
|
|
35
|
-
type TableHeaderProps = React
|
|
34
|
+
declare const Table: ({ className, density, inset, scroll, ...props }: TableProps) => React.JSX.Element;
|
|
35
|
+
type TableHeaderProps = React.ComponentProps<"thead"> & {
|
|
36
36
|
/**
|
|
37
37
|
* `muted` lays the header row on a muted band, separating it from the rows
|
|
38
38
|
* of a long list.
|
|
@@ -44,24 +44,24 @@ type TableHeaderProps = React$1.ComponentProps<"thead"> & {
|
|
|
44
44
|
*/
|
|
45
45
|
sticky?: boolean;
|
|
46
46
|
};
|
|
47
|
-
declare const TableHeader: ({ className, surface, sticky, ...props }: TableHeaderProps) => React
|
|
48
|
-
declare const TableBody: ({ className, ...props }: React
|
|
49
|
-
declare const TableFooter: ({ className, ...props }: React
|
|
47
|
+
declare const TableHeader: ({ className, surface, sticky, ...props }: TableHeaderProps) => React.JSX.Element;
|
|
48
|
+
declare const TableBody: ({ className, ...props }: React.ComponentProps<"tbody">) => React.JSX.Element;
|
|
49
|
+
declare const TableFooter: ({ className, ...props }: React.ComponentProps<"tfoot">) => React.JSX.Element;
|
|
50
50
|
/**
|
|
51
51
|
* `muted` greys out a row or a cell whose value no longer counts (a voided
|
|
52
52
|
* payment) or that only supports its neighbours (a secondary column).
|
|
53
53
|
*/
|
|
54
54
|
type TableTone = "default" | "muted";
|
|
55
|
-
declare const TableRow: ({ className, tone, ...props }: React
|
|
55
|
+
declare const TableRow: ({ className, tone, ...props }: React.ComponentProps<"tr"> & {
|
|
56
56
|
tone?: TableTone | undefined;
|
|
57
|
-
}) => React
|
|
57
|
+
}) => React.JSX.Element;
|
|
58
58
|
/**
|
|
59
59
|
* Where a column sets its content. `end` lines up figures and amounts;
|
|
60
60
|
* `start` is the default reading edge. A `numeric` head or cell sets to the
|
|
61
61
|
* end unless it names an alignment, so a figures column needs one prop.
|
|
62
62
|
*/
|
|
63
63
|
type TableAlign = "start" | "center" | "end";
|
|
64
|
-
type TableHeadProps = Omit<React
|
|
64
|
+
type TableHeadProps = Omit<React.ComponentProps<"th">, "align"> & {
|
|
65
65
|
align?: TableAlign | undefined;
|
|
66
66
|
/**
|
|
67
67
|
* Heads a column of figures: tabular numerals, like its cells, set to the
|
|
@@ -69,8 +69,8 @@ type TableHeadProps = Omit<React$1.ComponentProps<"th">, "align"> & {
|
|
|
69
69
|
*/
|
|
70
70
|
numeric?: boolean | undefined;
|
|
71
71
|
};
|
|
72
|
-
declare const TableHead: ({ className, align, numeric, ...props }: TableHeadProps) => React
|
|
73
|
-
type TableCellProps = Omit<React
|
|
72
|
+
declare const TableHead: ({ className, align, numeric, ...props }: TableHeadProps) => React.JSX.Element;
|
|
73
|
+
type TableCellProps = Omit<React.ComponentProps<"td">, "align"> & {
|
|
74
74
|
align?: TableAlign | undefined;
|
|
75
75
|
tone?: TableTone | undefined;
|
|
76
76
|
/**
|
|
@@ -90,13 +90,13 @@ type TableCellProps = Omit<React$1.ComponentProps<"td">, "align"> & {
|
|
|
90
90
|
*/
|
|
91
91
|
flush?: boolean;
|
|
92
92
|
};
|
|
93
|
-
declare const TableCell: ({ className, align, tone, numeric, truncate, flush, children, ...props }: TableCellProps) => React
|
|
93
|
+
declare const TableCell: ({ className, align, tone, numeric, truncate, flush, children, ...props }: TableCellProps) => React.JSX.Element;
|
|
94
94
|
type SortDirection = "asc" | "desc" | null;
|
|
95
95
|
type SortableHeadProps = Omit<TableHeadProps, "onClick"> & {
|
|
96
96
|
sortDirection?: SortDirection;
|
|
97
97
|
onSort: () => void;
|
|
98
98
|
/** Rendered next to the sort button inside the same cell (e.g. filter icon). */
|
|
99
|
-
trailing?: React
|
|
99
|
+
trailing?: React.ReactNode;
|
|
100
100
|
};
|
|
101
101
|
/**
|
|
102
102
|
* A column head the reader sorts by. The label is a quiet `Button`, so it
|
|
@@ -105,6 +105,6 @@ type SortableHeadProps = Omit<TableHeadProps, "onClick"> & {
|
|
|
105
105
|
* In an end-aligned (numeric) column the arrow sits before the label, keeping
|
|
106
106
|
* the label flush with the figures.
|
|
107
107
|
*/
|
|
108
|
-
declare const SortableHead: ({ children, sortDirection, onSort, trailing, className, align, numeric, ...props }: SortableHeadProps) => React
|
|
109
|
-
declare const TableCaption: ({ className, ...props }: React
|
|
108
|
+
declare const SortableHead: ({ children, sortDirection, onSort, trailing, className, align, numeric, ...props }: SortableHeadProps) => React.JSX.Element;
|
|
109
|
+
declare const TableCaption: ({ className, ...props }: React.ComponentProps<"caption">) => React.JSX.Element;
|
|
110
110
|
export { type SortDirection, SortableHead, Table, type TableAlign, TableBody, TableCaption, TableCell, type TableCellProps, type TableDensity, TableFooter, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableInset, type TableProps, TableRow, type TableScroll, type TableTone };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { ControlSize } from "../lib/control-size.js";
|
|
3
|
-
type TextareaProps = React
|
|
3
|
+
type TextareaProps = React.ComponentProps<"textarea"> & {
|
|
4
4
|
size?: ControlSize | number;
|
|
5
5
|
unstyled?: boolean;
|
|
6
6
|
/**
|
|
@@ -27,5 +27,5 @@ type TextareaProps = React$1.ComponentProps<"textarea"> & {
|
|
|
27
27
|
*/
|
|
28
28
|
showCount?: boolean | undefined;
|
|
29
29
|
};
|
|
30
|
-
declare const Textarea: ({ className, size, unstyled, inline, fieldSizing, maxRows, showCount, dir, onChange, style, ...props }: TextareaProps) => React
|
|
30
|
+
declare const Textarea: ({ className, size, unstyled, inline, fieldSizing, maxRows, showCount, dir, onChange, style, ...props }: TextareaProps) => React.JSX.Element;
|
|
31
31
|
export { Textarea, type TextareaProps };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { PickerClock } from "./date-picker-popover.logic.js";
|
|
3
3
|
/**
|
|
4
4
|
* Stacks time fields on one grid, so their labels, hours and minutes line up
|
|
5
5
|
* whatever each label's length. A lone TimeField makes its own group.
|
|
6
6
|
*/
|
|
7
|
-
declare const TimeFieldGroup: ({ children, className, ...props }: React
|
|
7
|
+
declare const TimeFieldGroup: ({ children, className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
8
8
|
type TimeFieldProps = {
|
|
9
9
|
className?: string | undefined;
|
|
10
10
|
disabled: boolean;
|
|
@@ -21,5 +21,5 @@ type TimeFieldProps = {
|
|
|
21
21
|
* A wall-clock time to the minute: hour and minute selects in the locale's
|
|
22
22
|
* own clock and numerals, so `2 PM` and `14` read as each locale writes them.
|
|
23
23
|
*/
|
|
24
|
-
declare const TimeField: ({ className, ...props }: TimeFieldProps) => React
|
|
24
|
+
declare const TimeField: ({ className, ...props }: TimeFieldProps) => React.JSX.Element;
|
|
25
25
|
export { TimeField, TimeFieldGroup, type TimeFieldProps };
|