@stll/ui 0.71.0 → 0.73.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 +4 -2
- package/dist/components/button.js +8 -1
- package/dist/components/button.native-classes.js +15 -0
- package/dist/components/button.shared.d.ts +5 -1
- package/dist/components/button.shared.js +6 -0
- package/dist/components/checkbox.d.ts +15 -1
- package/dist/components/checkbox.js +74 -30
- package/dist/components/collapsible.d.ts +2 -2
- package/dist/components/collapsible.js +3 -3
- 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/composer.js +1 -1
- 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/frame.d.ts +7 -7
- package/dist/components/hex-color-picker.d.ts +16 -2
- package/dist/components/highlighted-textarea.d.ts +13 -0
- package/dist/components/highlighted-textarea.js +47 -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 +22 -21
- package/dist/components/menu.js +4 -1
- package/dist/components/outcome-screen-view.d.ts +88 -0
- package/dist/components/outcome-screen-view.js +170 -0
- package/dist/components/outcome-screen.d.ts +16 -0
- package/dist/components/outcome-screen.js +47 -0
- package/dist/components/outline-rail.d.ts +12 -0
- package/dist/components/pagination.d.ts +9 -9
- package/dist/components/popover.d.ts +10 -9
- package/dist/components/popover.js +4 -1
- 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/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-layout.d.ts +14 -0
- package/dist/components/table-layout.js +15 -0
- package/dist/components/table.d.ts +18 -17
- package/dist/components/table.js +2 -1
- package/dist/components/textarea.d.ts +5 -3
- package/dist/components/textarea.js +27 -15
- 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/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 -1
- package/dist/icons.js +55 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +3 -1
- 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/tooltip-content.d.ts +2 -2
- package/dist/lib/utils.d.ts +2 -2
- package/dist/styles/collapsible.css +26 -0
- package/dist/styles/theme.css +35 -0
- package/package.json +17 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React
|
|
2
|
-
export declare const CalendarGrid: ({ className, ...props }: React
|
|
3
|
-
export declare const CalendarHeaderRow: ({ className, ...props }: React
|
|
4
|
-
export declare const CalendarHeaderCell: ({ className, ...props }: React
|
|
5
|
-
export declare const CalendarCell: ({ className, ...props }: React
|
|
6
|
-
export declare const CalendarEntryButton: ({ className, ...props }: React
|
|
7
|
-
export declare const CalendarEntrySurface: ({ className, ...props }: React
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare const CalendarGrid: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
3
|
+
export declare const CalendarHeaderRow: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
4
|
+
export declare const CalendarHeaderCell: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
5
|
+
export declare const CalendarCell: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
6
|
+
export declare const CalendarEntryButton: ({ className, ...props }: React.ComponentProps<"button">) => React.JSX.Element;
|
|
7
|
+
export declare const CalendarEntrySurface: ({ className, ...props }: React.ComponentProps<"article">) => React.JSX.Element;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
3
3
|
import { OverlayLayer } from "../lib/overlay-layer.js";
|
|
4
4
|
declare const AlertDialogCreateHandle: typeof AlertDialog$1.createHandle;
|
|
5
5
|
declare const AlertDialog: typeof AlertDialog$1.Root;
|
|
6
|
-
declare const AlertDialogPortal: React
|
|
6
|
+
declare const AlertDialogPortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
7
|
declare function AlertDialogTrigger({ tooltip, ...props }: AlertDialog$1.Trigger.Props & {
|
|
8
|
-
tooltip?: React
|
|
9
|
-
}): React
|
|
8
|
+
tooltip?: React.ReactNode;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
10
|
declare const AlertDialogBackdrop: ({ className, layer, ...props }: AlertDialog$1.Backdrop.Props & {
|
|
11
11
|
layer?: OverlayLayer;
|
|
12
|
-
}) => React
|
|
12
|
+
}) => React.JSX.Element;
|
|
13
13
|
declare const AlertDialogViewport: ({ className, layer, ...props }: AlertDialog$1.Viewport.Props & {
|
|
14
14
|
layer?: OverlayLayer;
|
|
15
|
-
}) => React
|
|
15
|
+
}) => React.JSX.Element;
|
|
16
16
|
declare const AlertDialogPopup: ({ className, bottomStickOnMobile, layer, ...props }: AlertDialog$1.Popup.Props & {
|
|
17
17
|
bottomStickOnMobile?: boolean;
|
|
18
18
|
layer?: OverlayLayer;
|
|
19
|
-
}) => React
|
|
20
|
-
declare const AlertDialogHeader: ({ className, ...props }: React
|
|
21
|
-
declare const AlertDialogFooter: ({ className, variant, ...props }: React
|
|
19
|
+
}) => React.JSX.Element;
|
|
20
|
+
declare const AlertDialogHeader: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
21
|
+
declare const AlertDialogFooter: ({ className, variant, ...props }: React.ComponentProps<"div"> & {
|
|
22
22
|
variant?: "default" | "bare";
|
|
23
|
-
}) => React
|
|
24
|
-
declare const AlertDialogPanel: ({ className, ...props }: React
|
|
25
|
-
declare const AlertDialogTitle: ({ className, ...props }: AlertDialog$1.Title.Props) => React
|
|
26
|
-
declare const AlertDialogDescription: ({ className, ...props }: AlertDialog$1.Description.Props) => React
|
|
23
|
+
}) => React.JSX.Element;
|
|
24
|
+
declare const AlertDialogPanel: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
25
|
+
declare const AlertDialogTitle: ({ className, ...props }: AlertDialog$1.Title.Props) => React.JSX.Element;
|
|
26
|
+
declare const AlertDialogDescription: ({ className, ...props }: AlertDialog$1.Description.Props) => React.JSX.Element;
|
|
27
27
|
declare function AlertDialogClose({ tooltip, ...props }: AlertDialog$1.Close.Props & {
|
|
28
|
-
tooltip?: React
|
|
29
|
-
}): React
|
|
28
|
+
tooltip?: React.ReactNode;
|
|
29
|
+
}): React.JSX.Element;
|
|
30
30
|
export { AlertDialog, AlertDialogBackdrop, AlertDialogBackdrop as AlertDialogOverlay, AlertDialogClose, AlertDialogPopup as AlertDialogContent, AlertDialogPopup, AlertDialogCreateHandle, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPanel, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertDialogViewport };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
/**
|
|
3
3
|
* The one animation system for previews that explain a feature by playing it:
|
|
4
4
|
* a frame of ordered stages that cross-fade into each other, an optional
|
|
@@ -24,7 +24,7 @@ export type AnimatedPreviewPlayback = "once" | "loop";
|
|
|
24
24
|
export type AnimatedPreviewPace = "glance" | "read" | "beat";
|
|
25
25
|
export type AnimatedPreviewStage = {
|
|
26
26
|
id: string;
|
|
27
|
-
content: React
|
|
27
|
+
content: React.ReactNode;
|
|
28
28
|
};
|
|
29
29
|
type AnimatedPreviewProps = {
|
|
30
30
|
stages: readonly [AnimatedPreviewStage, ...AnimatedPreviewStage[]];
|
|
@@ -39,8 +39,8 @@ type AnimatedPreviewProps = {
|
|
|
39
39
|
inline?: boolean;
|
|
40
40
|
className?: string;
|
|
41
41
|
};
|
|
42
|
-
export declare const AnimatedPreview: ({ stages, playback, pace, stagger, inline, className }: AnimatedPreviewProps) => React
|
|
43
|
-
type AnimatedPreviewMotionProps = React
|
|
42
|
+
export declare const AnimatedPreview: ({ stages, playback, pace, stagger, inline, className }: AnimatedPreviewProps) => React.JSX.Element;
|
|
43
|
+
type AnimatedPreviewMotionProps = React.ComponentProps<"div"> & {
|
|
44
44
|
pace?: AnimatedPreviewPace;
|
|
45
45
|
};
|
|
46
46
|
/**
|
|
@@ -49,21 +49,21 @@ type AnimatedPreviewMotionProps = React$1.ComponentProps<"div"> & {
|
|
|
49
49
|
* The caller places the drop with `--animated-preview-carry-x` and
|
|
50
50
|
* `--animated-preview-carry-y`; with reduced motion the content rests there.
|
|
51
51
|
*/
|
|
52
|
-
export declare const AnimatedPreviewMotion: ({ className, pace, ...props }: AnimatedPreviewMotionProps) => React
|
|
52
|
+
export declare const AnimatedPreviewMotion: ({ className, pace, ...props }: AnimatedPreviewMotionProps) => React.JSX.Element;
|
|
53
53
|
/** How long a pointer or keyboard focus rests on the trigger before the card opens. */
|
|
54
54
|
export declare const ANIMATED_PREVIEW_CARD_DELAY_MS = 400;
|
|
55
|
-
type AnimatedPreviewCardProps = React
|
|
55
|
+
type AnimatedPreviewCardProps = React.PropsWithChildren<{
|
|
56
56
|
/**
|
|
57
57
|
* The control the card explains. It must take the props it is handed, as a
|
|
58
58
|
* `Button` does: the card opens from its hover and focus events.
|
|
59
59
|
*/
|
|
60
|
-
trigger: React
|
|
60
|
+
trigger: React.ReactElement;
|
|
61
61
|
/**
|
|
62
62
|
* One line on what the control does. Shown under the preview and read as
|
|
63
63
|
* the control's description, so the moving preview itself stays out of the
|
|
64
64
|
* accessibility tree.
|
|
65
65
|
*/
|
|
66
|
-
description: React
|
|
66
|
+
description: React.ReactNode;
|
|
67
67
|
className?: string;
|
|
68
68
|
}>;
|
|
69
69
|
/**
|
|
@@ -71,5 +71,5 @@ type AnimatedPreviewCardProps = React$1.PropsWithChildren<{
|
|
|
71
71
|
* and traps none: the card describes the control, and the control stays the
|
|
72
72
|
* thing that is used.
|
|
73
73
|
*/
|
|
74
|
-
export declare const AnimatedPreviewCard: ({ trigger, description, className, children }: AnimatedPreviewCardProps) => React
|
|
74
|
+
export declare const AnimatedPreviewCard: ({ trigger, description, className, children }: AnimatedPreviewCardProps) => React.JSX.Element;
|
|
75
75
|
export {};
|
|
@@ -3,13 +3,13 @@ import { usePrefersReducedMotion } from "../hooks/use-prefers-reduced-motion.js"
|
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
4
|
import { HoverCard as PreviewCard, HoverCardContent as PreviewCardPopup, HoverCardTrigger as PreviewCardTrigger } from "./preview-card.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import * as React
|
|
6
|
+
import * as React from "react";
|
|
7
7
|
// src/components/animated-preview.tsx
|
|
8
8
|
/** Must match the keyframes name in `animated-preview.css`. */
|
|
9
9
|
const STAGE_OUT_KEYFRAMES = "animated-preview-fade-out";
|
|
10
10
|
const AnimatedPreview = ({ stages, playback = "once", pace = "glance", stagger = 0, inline = false, className }) => {
|
|
11
11
|
const reducedMotion = usePrefersReducedMotion();
|
|
12
|
-
const [cycle, setCycle] = React
|
|
12
|
+
const [cycle, setCycle] = React.useState(0);
|
|
13
13
|
const Frame = inline ? "span" : "div";
|
|
14
14
|
const lastIndex = stages.length - 1;
|
|
15
15
|
const finalStage = stages[lastIndex] ?? stages[0];
|
|
@@ -75,7 +75,7 @@ const ANIMATED_PREVIEW_CARD_DELAY_MS = 400;
|
|
|
75
75
|
* thing that is used.
|
|
76
76
|
*/
|
|
77
77
|
const AnimatedPreviewCard = ({ trigger, description, className, children }) => {
|
|
78
|
-
const descriptionId = React
|
|
78
|
+
const descriptionId = React.useId();
|
|
79
79
|
return /* @__PURE__ */ jsxs(PreviewCard, { children: [
|
|
80
80
|
/* @__PURE__ */ jsx(PreviewCardTrigger, {
|
|
81
81
|
"aria-describedby": descriptionId,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
export declare const APPLICATION_RAIL_WIDTH: "w-12";
|
|
3
3
|
export declare const APPLICATION_RAIL_BUTTON_SIZE: "size-11";
|
|
4
4
|
export declare const APPLICATION_RAIL_ICON_SIZE: "size-4";
|
|
@@ -8,10 +8,10 @@ export declare const APPLICATION_RAIL_ICON_SIZE: "size-4";
|
|
|
8
8
|
* sidebar without bringing sidebar expansion or mobile-sheet state into hosts
|
|
9
9
|
* that only need a fixed rail.
|
|
10
10
|
*/
|
|
11
|
-
export declare const ApplicationRail: ({ className, ...props }: React
|
|
12
|
-
export declare const ApplicationRailHeader: ({ className, ...props }: React
|
|
13
|
-
export declare const ApplicationRailContent: ({ className, ...props }: React
|
|
14
|
-
export declare const ApplicationRailMenu: ({ className, ...props }: React
|
|
15
|
-
export declare const ApplicationRailButton: ({ className, ...props }: React
|
|
16
|
-
export declare const ApplicationRailSeparator: ({ className, ...props }: React
|
|
17
|
-
export declare const ApplicationRailFooter: ({ className, ...props }: React
|
|
11
|
+
export declare const ApplicationRail: ({ className, ...props }: React.ComponentProps<"nav">) => React.JSX.Element;
|
|
12
|
+
export declare const ApplicationRailHeader: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
13
|
+
export declare const ApplicationRailContent: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
14
|
+
export declare const ApplicationRailMenu: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
15
|
+
export declare const ApplicationRailButton: ({ className, ...props }: React.ComponentProps<"button">) => React.JSX.Element;
|
|
16
|
+
export declare const ApplicationRailSeparator: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
17
|
+
export declare const ApplicationRailFooter: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
/**
|
|
3
3
|
* Isolation shields the text around a value, not the value itself: a
|
|
4
4
|
* directional control inside it still reorders its letters, so stored text
|
|
5
5
|
* loses those controls before it renders.
|
|
6
6
|
*/
|
|
7
7
|
export declare const stripDirectionalControls: (text: string) => string;
|
|
8
|
-
export declare const withoutDirectionalControls: (children: React
|
|
9
|
-
export declare const BidiText: (props: BidiTextProps) => React
|
|
8
|
+
export declare const withoutDirectionalControls: (children: React.ReactNode) => React.ReactNode;
|
|
9
|
+
export declare const BidiText: (props: BidiTextProps) => React.JSX.Element;
|
|
10
10
|
export declare const UserText: typeof BidiText;
|
|
11
11
|
type BidiDirection = "auto" | "ltr" | "rtl";
|
|
12
|
-
type BdiElementProps = Omit<React
|
|
12
|
+
type BdiElementProps = Omit<React.ComponentPropsWithoutRef<"bdi">, "dir"> & {
|
|
13
13
|
as?: "bdi";
|
|
14
14
|
direction?: BidiDirection;
|
|
15
15
|
};
|
|
16
|
-
type SpanTextProps = Omit<React
|
|
16
|
+
type SpanTextProps = Omit<React.ComponentPropsWithoutRef<"span">, "dir"> & {
|
|
17
17
|
as: "span";
|
|
18
18
|
direction?: BidiDirection;
|
|
19
19
|
};
|
|
20
|
-
type DivTextProps = Omit<React
|
|
20
|
+
type DivTextProps = Omit<React.ComponentPropsWithoutRef<"div">, "dir"> & {
|
|
21
21
|
as: "div";
|
|
22
22
|
direction?: BidiDirection;
|
|
23
23
|
};
|
|
24
|
-
type ParagraphTextProps = Omit<React
|
|
24
|
+
type ParagraphTextProps = Omit<React.ComponentPropsWithoutRef<"p">, "dir"> & {
|
|
25
25
|
as: "p";
|
|
26
26
|
direction?: BidiDirection;
|
|
27
27
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React
|
|
2
|
-
type BrandIconProps = React
|
|
3
|
-
export declare const DiscordLogoIcon: (props: BrandIconProps) => React
|
|
4
|
-
export declare const GitHubLogoIcon: (props: BrandIconProps) => React
|
|
5
|
-
export declare const XLogoIcon: (props: BrandIconProps) => React
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type BrandIconProps = React.ComponentProps<"svg">;
|
|
3
|
+
export declare const DiscordLogoIcon: (props: BrandIconProps) => React.JSX.Element;
|
|
4
|
+
export declare const GitHubLogoIcon: (props: BrandIconProps) => React.JSX.Element;
|
|
5
|
+
export declare const XLogoIcon: (props: BrandIconProps) => React.JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
-
declare const Breadcrumb: ({ ...props }: React
|
|
4
|
-
declare const BreadcrumbList: ({ className, ...props }: React
|
|
5
|
-
declare const BreadcrumbItem: ({ className, ...props }: React
|
|
6
|
-
declare function BreadcrumbLink({ className, render, ...props }: useRender.ComponentProps<"a">): React
|
|
7
|
-
declare const BreadcrumbPage: ({ className, ...props }: React
|
|
8
|
-
declare const BreadcrumbSeparator: ({ children, className, ...props }: React
|
|
9
|
-
declare const BreadcrumbEllipsis: ({ className, ...props }: React
|
|
3
|
+
declare const Breadcrumb: ({ ...props }: React.ComponentProps<"nav">) => React.JSX.Element;
|
|
4
|
+
declare const BreadcrumbList: ({ className, ...props }: React.ComponentProps<"ol">) => React.JSX.Element;
|
|
5
|
+
declare const BreadcrumbItem: ({ className, ...props }: React.ComponentProps<"li">) => React.JSX.Element;
|
|
6
|
+
declare function BreadcrumbLink({ className, render, ...props }: useRender.ComponentProps<"a">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
7
|
+
declare const BreadcrumbPage: ({ className, ...props }: React.ComponentProps<"span">) => React.JSX.Element;
|
|
8
|
+
declare const BreadcrumbSeparator: ({ children, className, ...props }: React.ComponentProps<"li">) => React.JSX.Element;
|
|
9
|
+
declare const BreadcrumbEllipsis: ({ className, ...props }: React.ComponentProps<"span">) => React.JSX.Element;
|
|
10
10
|
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
@@ -15,9 +15,9 @@ declare const BUTTON_LAYOUT_CLASS_NAMES: {
|
|
|
15
15
|
readonly wrap: "h-auto min-h-11 items-start justify-start py-2 text-start whitespace-normal sm:h-auto";
|
|
16
16
|
};
|
|
17
17
|
declare const buttonVariants: (props?: ({
|
|
18
|
-
size?: "chip" | "default" | "icon" | "icon-2xs" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "inline" | "lg" | "row" | "sm" | "touch" | "xl" | "xs" | null | undefined;
|
|
18
|
+
size?: "chip" | "default" | "icon" | "icon-2xs" | "icon-lg" | "icon-round" | "icon-sm" | "icon-xl" | "icon-xs" | "inline" | "inspector-row" | "lg" | "row" | "sm" | "touch" | "xl" | "xs" | null | undefined;
|
|
19
19
|
layout?: "wrap" | null | undefined;
|
|
20
|
-
variant?: "default" | "destructive" | "destructive-ghost" | "destructive-outline" | "ghost" | "link" | "muted" | "muted-destructive" | "outline" | "secondary" | null | undefined;
|
|
20
|
+
variant?: "composer" | "default" | "destructive" | "destructive-ghost" | "destructive-outline" | "ghost" | "link" | "muted" | "muted-destructive" | "outline" | "secondary" | null | undefined;
|
|
21
21
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
22
22
|
/**
|
|
23
23
|
* The outline a plain button's focus ring follows, matching its content:
|
|
@@ -57,11 +57,13 @@ declare const BUTTON_SIZE_CONTENT: {
|
|
|
57
57
|
readonly default: "text";
|
|
58
58
|
readonly icon: "icon";
|
|
59
59
|
readonly "icon-lg": "icon";
|
|
60
|
+
readonly "icon-round": "icon";
|
|
60
61
|
readonly "icon-sm": "icon";
|
|
61
62
|
readonly "icon-xl": "icon";
|
|
62
63
|
readonly "icon-2xs": "icon";
|
|
63
64
|
readonly "icon-xs": "icon";
|
|
64
65
|
readonly inline: "text";
|
|
66
|
+
readonly "inspector-row": "text";
|
|
65
67
|
readonly lg: "text";
|
|
66
68
|
readonly row: "text";
|
|
67
69
|
readonly sm: "text";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { TOOLBAR_ROW_HEIGHT } from "../inspector/layout-tokens.js";
|
|
2
3
|
import { BUTTON_DISPOSITION, blockDisabledActivation, blockDisabledKeyActivation, resolveButtonDisposition } from "../lib/button-disposition.js";
|
|
3
4
|
import { MENU_ROW_CLASS_NAME } from "../lib/menu-row.js";
|
|
4
5
|
import { rendersNothing } from "../lib/renders-nothing.js";
|
|
@@ -45,11 +46,13 @@ const BUTTON_SIZE_CLASS_NAMES = {
|
|
|
45
46
|
default: "h-9 px-[calc(--spacing(3)-1px)] sm:h-8",
|
|
46
47
|
icon: "size-9 sm:size-8",
|
|
47
48
|
"icon-lg": "size-10 sm:size-9",
|
|
49
|
+
"icon-round": "size-7 rounded-full sm:size-7",
|
|
48
50
|
"icon-sm": "size-8 sm:size-7",
|
|
49
51
|
"icon-xl": "size-11 sm:size-10 [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5",
|
|
50
52
|
"icon-2xs": "size-5 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-4 [&_svg:not([class*='size-'])]:size-3.5 sm:[&_svg:not([class*='size-'])]:size-3",
|
|
51
53
|
"icon-xs": "size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-6 not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-4 sm:not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-3.5",
|
|
52
54
|
inline: "inline h-auto rounded-sm border-0 p-0 text-start text-[length:inherit] leading-[inherit] font-normal whitespace-normal select-text before:rounded-[calc(var(--radius-sm)-1px)] sm:text-[length:inherit] [&_svg]:mx-0 [&_svg]:inline [&_svg]:align-[-0.125em] [&_svg:not(:last-child)]:me-1",
|
|
55
|
+
"inspector-row": `${TOOLBAR_ROW_HEIGHT} justify-start rounded-none px-3`,
|
|
53
56
|
lg: "h-10 px-[calc(--spacing(3.5)-1px)] sm:h-9",
|
|
54
57
|
row: `${MENU_ROW_CLASS_NAME} [&_svg]:mx-0`,
|
|
55
58
|
sm: "h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] text-sm sm:h-7 sm:text-xs",
|
|
@@ -57,8 +60,10 @@ const BUTTON_SIZE_CLASS_NAMES = {
|
|
|
57
60
|
xl: "h-11 px-[calc(--spacing(4)-1px)] text-lg sm:h-10 sm:text-base [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5",
|
|
58
61
|
xs: "h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5"
|
|
59
62
|
};
|
|
63
|
+
const BUTTON_PRIMARY_STATE_CLASS = "shadow-primary/24 data-pressed:bg-primary/80 [:hover:not([data-pressed])]:bg-primary/90 shadow-xs not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none";
|
|
60
64
|
const BUTTON_VARIANT_CLASS_NAMES = {
|
|
61
|
-
|
|
65
|
+
composer: `${tokens("composer")} ${BUTTON_PRIMARY_STATE_CLASS} hover:bg-foreground/90`,
|
|
66
|
+
default: `${tokens("default")} ${BUTTON_PRIMARY_STATE_CLASS}`,
|
|
62
67
|
destructive: `${tokens("destructive")} shadow-destructive/8 data-pressed:border-destructive/56 data-pressed:bg-destructive/20 [:hover:not([data-pressed])]:border-destructive/40 [:hover:not([data-pressed])]:bg-destructive/14 active:bg-destructive/18 shadow-xs not-dark:bg-clip-padding not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] [:disabled,:active,[data-pressed]]:shadow-none`,
|
|
63
68
|
"destructive-outline": `${tokens("destructive-outline")} dark:bg-input/32 data-pressed:border-destructive/56 data-pressed:bg-destructive/8 [:hover:not([data-pressed])]:border-destructive/32 [:hover:not([data-pressed])]:bg-destructive/4 shadow-xs/5 not-dark:bg-clip-padding not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/2%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [:disabled,:active,[data-pressed]]:shadow-none`,
|
|
64
69
|
"destructive-ghost": `${tokens("destructive-ghost")} data-pressed:bg-destructive/14 data-pressed:inset-ring-destructive/32 [:hover:not([data-pressed])]:bg-destructive/10 data-pressed:inset-ring`,
|
|
@@ -141,11 +146,13 @@ const BUTTON_SIZE_CONTENT = {
|
|
|
141
146
|
default: BUTTON_CONTENT.text,
|
|
142
147
|
icon: BUTTON_CONTENT.icon,
|
|
143
148
|
"icon-lg": BUTTON_CONTENT.icon,
|
|
149
|
+
"icon-round": BUTTON_CONTENT.icon,
|
|
144
150
|
"icon-sm": BUTTON_CONTENT.icon,
|
|
145
151
|
"icon-xl": BUTTON_CONTENT.icon,
|
|
146
152
|
"icon-2xs": BUTTON_CONTENT.icon,
|
|
147
153
|
"icon-xs": BUTTON_CONTENT.icon,
|
|
148
154
|
inline: BUTTON_CONTENT.text,
|
|
155
|
+
"inspector-row": BUTTON_CONTENT.text,
|
|
149
156
|
lg: BUTTON_CONTENT.text,
|
|
150
157
|
row: BUTTON_CONTENT.text,
|
|
151
158
|
sm: BUTTON_CONTENT.text,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TOOLBAR_ROW_HEIGHT } from "../inspector/layout-tokens.js";
|
|
1
2
|
import { BUTTON_PLAIN_VARIANT, BUTTON_VARIANT_TOKENS } from "./button.shared.js";
|
|
2
3
|
// src/components/button.native-classes.ts
|
|
3
4
|
/** A control's box: centred content inside the variant's border. */
|
|
@@ -28,6 +29,11 @@ const SIZES = {
|
|
|
28
29
|
label: "",
|
|
29
30
|
slop: 0
|
|
30
31
|
},
|
|
32
|
+
"icon-round": {
|
|
33
|
+
box: `${CONTROL} size-7 rounded-full`,
|
|
34
|
+
label: "",
|
|
35
|
+
slop: 8
|
|
36
|
+
},
|
|
31
37
|
"icon-sm": {
|
|
32
38
|
box: `${CONTROL} size-8 rounded-lg`,
|
|
33
39
|
label: "",
|
|
@@ -53,6 +59,11 @@ const SIZES = {
|
|
|
53
59
|
label: "",
|
|
54
60
|
slop: 8
|
|
55
61
|
},
|
|
62
|
+
"inspector-row": {
|
|
63
|
+
box: `${CONTROL} ${TOOLBAR_ROW_HEIGHT} justify-start gap-2 rounded-none px-3`,
|
|
64
|
+
label: "",
|
|
65
|
+
slop: 0
|
|
66
|
+
},
|
|
56
67
|
lg: {
|
|
57
68
|
box: `${CONTROL} min-h-12 gap-2 rounded-lg px-5`,
|
|
58
69
|
label: "",
|
|
@@ -90,6 +101,10 @@ const SIZES = {
|
|
|
90
101
|
* held (a row open beside the list, a chosen option).
|
|
91
102
|
*/
|
|
92
103
|
const PRESS = {
|
|
104
|
+
composer: {
|
|
105
|
+
pressed: "active:opacity-80",
|
|
106
|
+
selected: ""
|
|
107
|
+
},
|
|
93
108
|
default: {
|
|
94
109
|
pressed: "active:opacity-80",
|
|
95
110
|
selected: ""
|
|
@@ -5,6 +5,10 @@ import { ReactNode } from "react";
|
|
|
5
5
|
* focus treatment on top.
|
|
6
6
|
*/
|
|
7
7
|
export declare const BUTTON_VARIANT_TOKENS: {
|
|
8
|
+
readonly composer: {
|
|
9
|
+
readonly surface: "border-primary bg-foreground";
|
|
10
|
+
readonly label: "text-background";
|
|
11
|
+
};
|
|
8
12
|
readonly default: {
|
|
9
13
|
readonly surface: "border-primary bg-primary";
|
|
10
14
|
readonly label: "text-primary-foreground";
|
|
@@ -58,7 +62,7 @@ export type ButtonTokenVariant = keyof typeof BUTTON_VARIANT_TOKENS;
|
|
|
58
62
|
export declare const BUTTON_PLAIN_VARIANT = "plain";
|
|
59
63
|
export type ButtonVariant = ButtonTokenVariant | typeof BUTTON_PLAIN_VARIANT;
|
|
60
64
|
/** Every size a button comes in, on every platform. */
|
|
61
|
-
export declare const BUTTON_SIZES: readonly ["chip", "default", "icon", "icon-lg", "icon-sm", "icon-xl", "icon-2xs", "icon-xs", "inline", "lg", "row", "sm", "touch", "xl", "xs"];
|
|
65
|
+
export declare const BUTTON_SIZES: readonly ["chip", "default", "icon", "icon-lg", "icon-round", "icon-sm", "icon-xl", "icon-2xs", "icon-xs", "inline", "inspector-row", "lg", "row", "sm", "touch", "xl", "xs"];
|
|
62
66
|
export type ButtonSize = (typeof BUTTON_SIZES)[number];
|
|
63
67
|
/**
|
|
64
68
|
* The props every button renderer accepts, with one meaning. A renderer adds
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
* focus treatment on top.
|
|
6
6
|
*/
|
|
7
7
|
const BUTTON_VARIANT_TOKENS = {
|
|
8
|
+
composer: {
|
|
9
|
+
surface: "border-primary bg-foreground",
|
|
10
|
+
label: "text-background"
|
|
11
|
+
},
|
|
8
12
|
default: {
|
|
9
13
|
surface: "border-primary bg-primary",
|
|
10
14
|
label: "text-primary-foreground"
|
|
@@ -60,11 +64,13 @@ const BUTTON_SIZES = [
|
|
|
60
64
|
"default",
|
|
61
65
|
"icon",
|
|
62
66
|
"icon-lg",
|
|
67
|
+
"icon-round",
|
|
63
68
|
"icon-sm",
|
|
64
69
|
"icon-xl",
|
|
65
70
|
"icon-2xs",
|
|
66
71
|
"icon-xs",
|
|
67
72
|
"inline",
|
|
73
|
+
"inspector-row",
|
|
68
74
|
"lg",
|
|
69
75
|
"row",
|
|
70
76
|
"sm",
|
|
@@ -1,3 +1,17 @@
|
|
|
1
1
|
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
2
|
-
|
|
2
|
+
import { TableFirstLine } from "./table-layout.js";
|
|
3
|
+
declare const Checkbox: (props: CheckboxProps) => import("react").JSX.Element;
|
|
4
|
+
type DefaultCheckboxProps = Checkbox$1.Root.Props & {
|
|
5
|
+
appearance?: "default";
|
|
6
|
+
};
|
|
7
|
+
type CellCheckboxProps = Omit<Checkbox$1.Root.Props, "children" | "render" | "nativeButton" | "readOnly" | "defaultChecked" | "checked" | "className" | "style"> & {
|
|
8
|
+
appearance: "cell";
|
|
9
|
+
checked: boolean;
|
|
10
|
+
/** The row's visible number or label, before its checkbox is revealed. */
|
|
11
|
+
rowLabel: string;
|
|
12
|
+
/** Aligns the label and glyph with a text line or a field's first line. */
|
|
13
|
+
firstLine: TableFirstLine;
|
|
14
|
+
onCheckedChange: NonNullable<Checkbox$1.Root.Props["onCheckedChange"]>;
|
|
15
|
+
};
|
|
16
|
+
type CheckboxProps = DefaultCheckboxProps | CellCheckboxProps;
|
|
3
17
|
export { Checkbox };
|
|
@@ -1,45 +1,89 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
|
+
import { TABLE_FIRST_LINE } from "./table-layout.js";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
5
6
|
// src/components/checkbox.tsx
|
|
6
|
-
const Checkbox = (
|
|
7
|
-
|
|
7
|
+
const Checkbox = (props) => {
|
|
8
|
+
if (props.appearance === "cell") return renderCellCheckbox(props);
|
|
9
|
+
return renderDefaultCheckbox(props);
|
|
10
|
+
};
|
|
11
|
+
const renderDefaultCheckbox = ({ appearance: _appearance, className, ...props }) => /* @__PURE__ */ jsx(Checkbox$1.Root, {
|
|
12
|
+
className: cn(CHECKBOX_CLASS_NAME, className),
|
|
8
13
|
"data-slot": "checkbox",
|
|
9
14
|
...props,
|
|
10
15
|
children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
|
|
11
|
-
className:
|
|
16
|
+
className: CHECKBOX_INDICATOR_CLASS_NAME,
|
|
12
17
|
"data-slot": "checkbox-indicator",
|
|
13
18
|
render: (indicatorProps, state) => /* @__PURE__ */ jsx("span", {
|
|
14
19
|
...indicatorProps,
|
|
15
|
-
children:
|
|
16
|
-
"aria-hidden": "true",
|
|
17
|
-
className: "size-3.5 sm:size-3",
|
|
18
|
-
fill: "none",
|
|
19
|
-
height: "24",
|
|
20
|
-
stroke: "currentColor",
|
|
21
|
-
strokeLinecap: "round",
|
|
22
|
-
strokeLinejoin: "round",
|
|
23
|
-
strokeWidth: "3",
|
|
24
|
-
viewBox: "0 0 24 24",
|
|
25
|
-
width: "24",
|
|
26
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
27
|
-
children: [/* @__PURE__ */ jsx("title", { children: "Indeterminate" }), /* @__PURE__ */ jsx("path", { d: "M5.252 12h13.496" })]
|
|
28
|
-
}) : /* @__PURE__ */ jsxs("svg", {
|
|
29
|
-
"aria-hidden": "true",
|
|
30
|
-
className: "size-3.5 sm:size-3",
|
|
31
|
-
fill: "none",
|
|
32
|
-
height: "24",
|
|
33
|
-
stroke: "currentColor",
|
|
34
|
-
strokeLinecap: "round",
|
|
35
|
-
strokeLinejoin: "round",
|
|
36
|
-
strokeWidth: "3",
|
|
37
|
-
viewBox: "0 0 24 24",
|
|
38
|
-
width: "24",
|
|
39
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
40
|
-
children: [/* @__PURE__ */ jsx("title", { children: "Checked" }), /* @__PURE__ */ jsx("path", { d: "M5.252 12.7 10.2 18.63 18.748 5.37" })]
|
|
41
|
-
})
|
|
20
|
+
children: /* @__PURE__ */ jsx(CheckboxGlyph, { indeterminate: state.indeterminate })
|
|
42
21
|
})
|
|
43
22
|
})
|
|
44
23
|
});
|
|
24
|
+
const renderCellCheckbox = ({ appearance, rowLabel, firstLine, checked, ...props }) => /* @__PURE__ */ jsxs(Checkbox$1.Root, {
|
|
25
|
+
...props,
|
|
26
|
+
checked,
|
|
27
|
+
"aria-label": props["aria-label"] ?? rowLabel,
|
|
28
|
+
className: "group/selection ring-ring hover:bg-muted/50 data-disabled:text-foreground-disabled absolute inset-0 min-w-12 shrink-0 cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-inset data-disabled:cursor-not-allowed data-disabled:hover:bg-transparent",
|
|
29
|
+
"data-appearance": appearance,
|
|
30
|
+
nativeButton: true,
|
|
31
|
+
render: /* @__PURE__ */ jsx("button", { type: "button" }),
|
|
32
|
+
readOnly: false,
|
|
33
|
+
defaultChecked: void 0,
|
|
34
|
+
style: void 0,
|
|
35
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
36
|
+
"aria-hidden": "true",
|
|
37
|
+
className: cn("absolute inset-x-0 top-2 flex min-w-12 items-center justify-center", TABLE_FIRST_LINE[firstLine].slot, "text-xs tabular-nums transition-opacity group-hover/row:opacity-0 group-focus-visible/selection:opacity-0 group-data-[state=selected]/row:opacity-0", checked && "opacity-0"),
|
|
38
|
+
"data-slot": "checkbox-cell-label",
|
|
39
|
+
children: rowLabel
|
|
40
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
41
|
+
"aria-hidden": "true",
|
|
42
|
+
className: cn("absolute inset-x-0 top-2 flex min-w-12 items-center justify-center", TABLE_FIRST_LINE[firstLine].slot, "pointer-events-none opacity-0 transition-opacity group-hover/row:opacity-100 group-focus-visible/selection:opacity-100 group-data-[state=selected]/row:opacity-100", checked && "opacity-100"),
|
|
43
|
+
children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
|
|
44
|
+
keepMounted: true,
|
|
45
|
+
className: CHECKBOX_CLASS_NAME,
|
|
46
|
+
"data-slot": "checkbox",
|
|
47
|
+
render: (indicatorProps, state) => /* @__PURE__ */ jsx("span", {
|
|
48
|
+
...indicatorProps,
|
|
49
|
+
children: (state.checked || state.indeterminate) && /* @__PURE__ */ jsx("span", {
|
|
50
|
+
className: CHECKBOX_INDICATOR_CLASS_NAME,
|
|
51
|
+
"data-checked": state.checked && !state.indeterminate ? "" : void 0,
|
|
52
|
+
"data-indeterminate": state.indeterminate ? "" : void 0,
|
|
53
|
+
"data-slot": "checkbox-indicator",
|
|
54
|
+
children: /* @__PURE__ */ jsx(CheckboxGlyph, { indeterminate: state.indeterminate })
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
})]
|
|
59
|
+
});
|
|
60
|
+
const CHECKBOX_CLASS_NAME = "border-input bg-background ring-ring focus-visible:ring-offset-background aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/48 dark:not-data-checked:bg-input/32 dark:aria-invalid:ring-destructive/24 relative inline-flex size-4.5 shrink-0 items-center justify-center rounded-sm border shadow-xs/5 outline-none not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-sm)-1px)] not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:ring-2 focus-visible:ring-offset-1 data-disabled:opacity-64 sm:size-4 dark:not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [[data-disabled],[data-checked],[aria-invalid]]:shadow-none";
|
|
61
|
+
const CHECKBOX_INDICATOR_CLASS_NAME = "text-primary-foreground data-checked:bg-primary data-indeterminate:text-foreground absolute -inset-px flex items-center justify-center rounded-sm data-unchecked:hidden";
|
|
62
|
+
const CheckboxGlyph = ({ indeterminate }) => indeterminate ? /* @__PURE__ */ jsxs("svg", {
|
|
63
|
+
"aria-hidden": "true",
|
|
64
|
+
className: "size-3.5 sm:size-3",
|
|
65
|
+
fill: "none",
|
|
66
|
+
height: "24",
|
|
67
|
+
stroke: "currentColor",
|
|
68
|
+
strokeLinecap: "round",
|
|
69
|
+
strokeLinejoin: "round",
|
|
70
|
+
strokeWidth: "3",
|
|
71
|
+
viewBox: "0 0 24 24",
|
|
72
|
+
width: "24",
|
|
73
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
74
|
+
children: [/* @__PURE__ */ jsx("title", { children: "Indeterminate" }), /* @__PURE__ */ jsx("path", { d: "M5.252 12h13.496" })]
|
|
75
|
+
}) : /* @__PURE__ */ jsxs("svg", {
|
|
76
|
+
"aria-hidden": "true",
|
|
77
|
+
className: "size-3.5 sm:size-3",
|
|
78
|
+
fill: "none",
|
|
79
|
+
height: "24",
|
|
80
|
+
stroke: "currentColor",
|
|
81
|
+
strokeLinecap: "round",
|
|
82
|
+
strokeLinejoin: "round",
|
|
83
|
+
strokeWidth: "3",
|
|
84
|
+
viewBox: "0 0 24 24",
|
|
85
|
+
width: "24",
|
|
86
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
87
|
+
children: [/* @__PURE__ */ jsx("title", { children: "Checked" }), /* @__PURE__ */ jsx("path", { d: "M5.252 12.7 10.2 18.63 18.748 5.37" })]
|
|
88
|
+
});
|
|
45
89
|
export { Checkbox };
|
|
@@ -17,8 +17,8 @@ declare const CollapsibleTrigger: ({ className, ...props }: Collapsible$1.Trigge
|
|
|
17
17
|
/**
|
|
18
18
|
* The disclosed content. It adds no padding or type, so opening it reveals
|
|
19
19
|
* content at the rhythm of the surface around it, as a native `<details>`
|
|
20
|
-
* does.
|
|
21
|
-
*
|
|
20
|
+
* does. Layout changes directly: opening content fades in for 200ms,
|
|
21
|
+
* closing hides it immediately, and reduced motion skips the fade.
|
|
22
22
|
*
|
|
23
23
|
* Closed, the content stays in the document. Once mounted it is
|
|
24
24
|
* `hidden="until-found"` (as a native `<details>` keeps it), so find-in-page
|
|
@@ -28,8 +28,8 @@ const CollapsibleTrigger = ({ className, ...props }) => /* @__PURE__ */ jsx(Coll
|
|
|
28
28
|
/**
|
|
29
29
|
* The disclosed content. It adds no padding or type, so opening it reveals
|
|
30
30
|
* content at the rhythm of the surface around it, as a native `<details>`
|
|
31
|
-
* does.
|
|
32
|
-
*
|
|
31
|
+
* does. Layout changes directly: opening content fades in for 200ms,
|
|
32
|
+
* closing hides it immediately, and reduced motion skips the fade.
|
|
33
33
|
*
|
|
34
34
|
* Closed, the content stays in the document. Once mounted it is
|
|
35
35
|
* `hidden="until-found"` (as a native `<details>` keeps it), so find-in-page
|
|
@@ -38,7 +38,7 @@ const CollapsibleTrigger = ({ className, ...props }) => /* @__PURE__ */ jsx(Coll
|
|
|
38
38
|
* `hiddenUntilFound={false}` to unmount it instead.
|
|
39
39
|
*/
|
|
40
40
|
const CollapsiblePanel = ({ className, hiddenUntilFound = true, ...props }) => /* @__PURE__ */ jsx(Collapsible$1.Panel, {
|
|
41
|
-
className: cn("
|
|
41
|
+
className: cn("min-w-0 [&[hidden]:not([hidden=until-found])]:hidden", className),
|
|
42
42
|
"data-slot": "collapsible-panel",
|
|
43
43
|
hiddenUntilFound,
|
|
44
44
|
...props
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
type ColorPreset = {
|
|
3
3
|
label: string;
|
|
4
4
|
/** Value emitted on select (e.g. "red" or "FF0000") */
|
|
@@ -27,7 +27,7 @@ type ColorPickerProps = {
|
|
|
27
27
|
* that becomes the trigger itself, so the picker never wraps it in a
|
|
28
28
|
* second, unnamed button.
|
|
29
29
|
*/
|
|
30
|
-
trigger: React
|
|
30
|
+
trigger: React.ReactElement;
|
|
31
31
|
/**
|
|
32
32
|
* Whether `trigger` renders a native `<button>` (default). Pass `false`
|
|
33
33
|
* only for a non-button element; Base UI then gives it button semantics.
|
|
@@ -59,6 +59,6 @@ type ColorPickerContentProps = ColorPickerContentBaseProps & ({
|
|
|
59
59
|
presentation: "inline";
|
|
60
60
|
});
|
|
61
61
|
declare const DEFAULT_PRESETS: ColorPreset[];
|
|
62
|
-
declare const ColorPickerContent: ({ value, onSelect, onClear, presets, columns, defaultExpanded, moreLabel, presentation }: ColorPickerContentProps) => React
|
|
63
|
-
declare const ColorPicker: ({ value, onSelect, onClear, presets, columns, defaultExpanded, moreLabel, nativeButton, trigger, side, align, className }: ColorPickerProps) => React
|
|
62
|
+
declare const ColorPickerContent: ({ value, onSelect, onClear, presets, columns, defaultExpanded, moreLabel, presentation }: ColorPickerContentProps) => React.JSX.Element;
|
|
63
|
+
declare const ColorPicker: ({ value, onSelect, onClear, presets, columns, defaultExpanded, moreLabel, nativeButton, trigger, side, align, className }: ColorPickerProps) => React.JSX.Element;
|
|
64
64
|
export { ColorPicker, ColorPickerContent, type ColorPickerContentProps, type ColorPickerProps, type ColorPreset, DEFAULT_PRESETS };
|