@stll/ui 0.52.1 → 0.54.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/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.js +2 -2
- package/dist/components/bidi-text.d.ts +1 -1
- package/dist/components/button.d.ts +33 -3
- package/dist/components/button.js +43 -3
- package/dist/components/combobox.d.ts +1 -2
- package/dist/components/combobox.js +1 -2
- package/dist/components/details-grid.js +1 -1
- package/dist/components/dialog.d.ts +15 -4
- package/dist/components/dialog.js +26 -6
- package/dist/components/inline-rename.js +1 -0
- package/dist/components/input-group.d.ts +1 -1
- package/dist/components/landing.js +27 -21
- package/dist/components/menu.d.ts +2 -2
- package/dist/components/menu.js +1 -1
- package/dist/components/outline-rail.d.ts +1 -1
- package/dist/components/outline-rail.js +126 -85
- package/dist/components/outline-rail.logic.d.ts +25 -0
- package/dist/components/outline-rail.logic.js +40 -0
- package/dist/components/popover.js +1 -1
- package/dist/components/prose.d.ts +1 -1
- package/dist/components/scroll-area.js +2 -2
- package/dist/components/sheet.d.ts +1 -1
- package/dist/components/sheet.js +2 -2
- package/dist/components/sidebar.d.ts +16 -3
- package/dist/components/sidebar.js +32 -12
- package/dist/components/split-button.d.ts +3 -1
- package/dist/components/split-button.js +3 -1
- package/dist/components/steps.d.ts +2 -2
- package/dist/components/tabs.js +1 -1
- package/dist/components/tooltip-trigger-helper.d.ts +5 -0
- package/dist/components/tooltip-trigger-helper.js +5 -0
- package/dist/icons.d.ts +2 -2
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +5 -5
- package/dist/kanban/card-shell.d.ts +14 -1
- package/dist/kanban/card-shell.js +33 -4
- package/dist/kanban/column-header.js +1 -0
- package/dist/kanban/drag-interactions.d.ts +14 -1
- package/dist/kanban/drag-interactions.js +19 -7
- package/dist/kanban/index.d.ts +3 -3
- package/dist/lib/control-size.d.ts +1 -1
- package/dist/lib/matter-colors.d.ts +1 -1
- package/package.json +5 -3
|
@@ -4,7 +4,7 @@ import * as React$1 from "react";
|
|
|
4
4
|
//#region src/components/alert-dialog.d.ts
|
|
5
5
|
declare const AlertDialogCreateHandle: typeof AlertDialog$1.createHandle;
|
|
6
6
|
declare const AlertDialog: typeof AlertDialog$1.Root;
|
|
7
|
-
declare const AlertDialogPortal: React$1.ForwardRefExoticComponent<Omit<import("@base-ui/react").
|
|
7
|
+
declare const AlertDialogPortal: React$1.ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogPortalProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
8
8
|
declare function AlertDialogTrigger({ tooltip, ...props }: AlertDialog$1.Trigger.Props & {
|
|
9
9
|
tooltip?: React$1.ReactNode;
|
|
10
10
|
}): React$1.JSX.Element;
|
|
@@ -11,7 +11,7 @@ const AlertDialog = AlertDialog$1.Root;
|
|
|
11
11
|
const AlertDialogPortal = AlertDialog$1.Portal;
|
|
12
12
|
function AlertDialogTrigger({ tooltip, ...props }) {
|
|
13
13
|
return renderTooltipTrigger({
|
|
14
|
-
tooltip
|
|
14
|
+
tooltip,
|
|
15
15
|
trigger: /* @__PURE__ */ jsx(AlertDialog$1.Trigger, {
|
|
16
16
|
"data-slot": "alert-dialog-trigger",
|
|
17
17
|
nativeButton: false,
|
|
@@ -65,7 +65,7 @@ const AlertDialogDescription = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
65
65
|
});
|
|
66
66
|
function AlertDialogClose({ tooltip, ...props }) {
|
|
67
67
|
return renderTooltipTrigger({
|
|
68
|
-
tooltip
|
|
68
|
+
tooltip,
|
|
69
69
|
trigger: /* @__PURE__ */ jsx(AlertDialog$1.Close, {
|
|
70
70
|
"data-slot": "alert-dialog-close",
|
|
71
71
|
...props
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
2
|
//#region src/components/bidi-text.d.ts
|
|
3
3
|
export declare const BidiText: (props: BidiTextProps) => React$1.JSX.Element;
|
|
4
|
-
export declare const UserText:
|
|
4
|
+
export declare const UserText: typeof BidiText;
|
|
5
5
|
type BidiDirection = "auto" | "ltr" | "rtl";
|
|
6
6
|
type BdiElementProps = Omit<React$1.ComponentPropsWithoutRef<"bdi">, "dir"> & {
|
|
7
7
|
as?: "bdi";
|
|
@@ -13,9 +13,39 @@ import { VariantProps } from "class-variance-authority";
|
|
|
13
13
|
*/
|
|
14
14
|
declare const buttonAccessibleDisabledClass = "cursor-not-allowed opacity-64";
|
|
15
15
|
declare const buttonVariants: (props?: ({
|
|
16
|
-
size?: "
|
|
17
|
-
variant?: "
|
|
16
|
+
size?: "chip" | "default" | "icon" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "lg" | "row" | "sm" | "xl" | "xs" | null | undefined;
|
|
17
|
+
variant?: "default" | "destructive" | "destructive-ghost" | "destructive-outline" | "ghost" | "link" | "muted" | "outline" | "secondary" | null | undefined;
|
|
18
18
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
19
|
+
/** What a button's box holds: a glyph alone, or a visible label. */
|
|
20
|
+
declare const BUTTON_CONTENT: {
|
|
21
|
+
readonly icon: "icon";
|
|
22
|
+
readonly text: "text";
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* An icon size is a square that fits a glyph and no label, so the button shows
|
|
26
|
+
* no text, and its accessible name doubles as its tooltip. A text size shows
|
|
27
|
+
* its own label and gets a tooltip only from an explicit `tooltip`: an implicit
|
|
28
|
+
* one would repeat or contradict the label, and because a tooltip opens on
|
|
29
|
+
* focus, it would take the first Escape from a popover or dialog that focuses
|
|
30
|
+
* the button.
|
|
31
|
+
*
|
|
32
|
+
* Icon sizes are exactly the `icon`-prefixed ones; the type below enforces it,
|
|
33
|
+
* because the `icon-button-requires-tooltip` lint rule reads the same prefix.
|
|
34
|
+
*/
|
|
35
|
+
declare const BUTTON_SIZE_CONTENT: {
|
|
36
|
+
readonly chip: "text";
|
|
37
|
+
readonly default: "text";
|
|
38
|
+
readonly icon: "icon";
|
|
39
|
+
readonly "icon-lg": "icon";
|
|
40
|
+
readonly "icon-sm": "icon";
|
|
41
|
+
readonly "icon-xl": "icon";
|
|
42
|
+
readonly "icon-xs": "icon";
|
|
43
|
+
readonly lg: "text";
|
|
44
|
+
readonly row: "text";
|
|
45
|
+
readonly sm: "text";
|
|
46
|
+
readonly xl: "text";
|
|
47
|
+
readonly xs: "text";
|
|
48
|
+
};
|
|
19
49
|
type ButtonProps = {
|
|
20
50
|
variant?: VariantProps<typeof buttonVariants>["variant"];
|
|
21
51
|
size?: VariantProps<typeof buttonVariants>["size"];
|
|
@@ -25,4 +55,4 @@ type ButtonProps = {
|
|
|
25
55
|
} & useRender.ComponentProps<"button">;
|
|
26
56
|
declare function Button({ className, variant, size, render, loading, icon, children, disabled, tooltip, ...props }: ButtonProps): import("react").JSX.Element;
|
|
27
57
|
//#endregion
|
|
28
|
-
export { Button, buttonAccessibleDisabledClass, buttonVariants };
|
|
58
|
+
export { BUTTON_CONTENT, BUTTON_SIZE_CONTENT, Button, buttonAccessibleDisabledClass, buttonVariants };
|
|
@@ -7,6 +7,7 @@ import { Loader } from "./loader.js";
|
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
9
9
|
import { useRender } from "@base-ui/react/use-render";
|
|
10
|
+
import { panic } from "better-result";
|
|
10
11
|
import { cva } from "class-variance-authority";
|
|
11
12
|
//#region src/components/button.tsx
|
|
12
13
|
/**
|
|
@@ -29,9 +30,10 @@ const buttonAccessibleDisabledClass = "cursor-not-allowed opacity-64";
|
|
|
29
30
|
* buttons keep the treatment of their surface instead.
|
|
30
31
|
*/
|
|
31
32
|
const buttonPressClass = "motion-safe:transition-transform motion-safe:duration-150 ease-out motion-safe:active:scale-[0.98]";
|
|
33
|
+
const BUTTON_DEFAULT_SIZE = "default";
|
|
32
34
|
const buttonVariants = cva("focus-visible:ring-ring focus-visible:ring-offset-background relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-lg border text-base font-medium whitespace-nowrap outline-none select-none before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] focus-visible:ring-2 focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-64 sm:text-sm pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4", {
|
|
33
35
|
defaultVariants: {
|
|
34
|
-
size:
|
|
36
|
+
size: BUTTON_DEFAULT_SIZE,
|
|
35
37
|
variant: "default"
|
|
36
38
|
},
|
|
37
39
|
variants: {
|
|
@@ -62,9 +64,47 @@ const buttonVariants = cva("focus-visible:ring-ring focus-visible:ring-offset-ba
|
|
|
62
64
|
}
|
|
63
65
|
}
|
|
64
66
|
});
|
|
67
|
+
/** What a button's box holds: a glyph alone, or a visible label. */
|
|
68
|
+
const BUTTON_CONTENT = {
|
|
69
|
+
icon: "icon",
|
|
70
|
+
text: "text"
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* An icon size is a square that fits a glyph and no label, so the button shows
|
|
74
|
+
* no text, and its accessible name doubles as its tooltip. A text size shows
|
|
75
|
+
* its own label and gets a tooltip only from an explicit `tooltip`: an implicit
|
|
76
|
+
* one would repeat or contradict the label, and because a tooltip opens on
|
|
77
|
+
* focus, it would take the first Escape from a popover or dialog that focuses
|
|
78
|
+
* the button.
|
|
79
|
+
*
|
|
80
|
+
* Icon sizes are exactly the `icon`-prefixed ones; the type below enforces it,
|
|
81
|
+
* because the `icon-button-requires-tooltip` lint rule reads the same prefix.
|
|
82
|
+
*/
|
|
83
|
+
const BUTTON_SIZE_CONTENT = {
|
|
84
|
+
chip: BUTTON_CONTENT.text,
|
|
85
|
+
default: BUTTON_CONTENT.text,
|
|
86
|
+
icon: BUTTON_CONTENT.icon,
|
|
87
|
+
"icon-lg": BUTTON_CONTENT.icon,
|
|
88
|
+
"icon-sm": BUTTON_CONTENT.icon,
|
|
89
|
+
"icon-xl": BUTTON_CONTENT.icon,
|
|
90
|
+
"icon-xs": BUTTON_CONTENT.icon,
|
|
91
|
+
lg: BUTTON_CONTENT.text,
|
|
92
|
+
row: BUTTON_CONTENT.text,
|
|
93
|
+
sm: BUTTON_CONTENT.text,
|
|
94
|
+
xl: BUTTON_CONTENT.text,
|
|
95
|
+
xs: BUTTON_CONTENT.text
|
|
96
|
+
};
|
|
97
|
+
const implicitTooltip = (size, accessibleName) => {
|
|
98
|
+
const content = BUTTON_SIZE_CONTENT[size ?? BUTTON_DEFAULT_SIZE];
|
|
99
|
+
switch (content) {
|
|
100
|
+
case BUTTON_CONTENT.icon: return accessibleName;
|
|
101
|
+
case BUTTON_CONTENT.text: return;
|
|
102
|
+
default: return panic(`Unhandled button content: ${String(content)}`);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
65
105
|
function Button({ className, variant, size, render, loading, icon, children, disabled, tooltip, ...props }) {
|
|
66
106
|
const typeValue = render ? void 0 : "button";
|
|
67
|
-
const tooltipContent = tooltip ?? props["aria-label"] ?? props.title;
|
|
107
|
+
const tooltipContent = tooltip ?? implicitTooltip(size, props["aria-label"] ?? props.title);
|
|
68
108
|
const disposition = resolveButtonDisposition({
|
|
69
109
|
disabled,
|
|
70
110
|
loading,
|
|
@@ -110,4 +150,4 @@ function Button({ className, variant, size, render, loading, icon, children, dis
|
|
|
110
150
|
});
|
|
111
151
|
}
|
|
112
152
|
//#endregion
|
|
113
|
-
export { Button, buttonAccessibleDisabledClass, buttonVariants };
|
|
153
|
+
export { BUTTON_CONTENT, BUTTON_SIZE_CONTENT, Button, buttonAccessibleDisabledClass, buttonVariants };
|
|
@@ -36,6 +36,5 @@ declare const ComboboxChips: ({ className, children, startAddon, ...props }: Com
|
|
|
36
36
|
startAddon?: React$1.ReactNode;
|
|
37
37
|
}) => React$1.JSX.Element;
|
|
38
38
|
declare const ComboboxChip: ({ children, ...props }: Combobox$1.Chip.Props) => React$1.JSX.Element;
|
|
39
|
-
declare const useComboboxFilter: typeof Combobox$1.useFilter;
|
|
40
39
|
//#endregion
|
|
41
|
-
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, ComboboxPopup, ComboboxRow, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue
|
|
40
|
+
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, ComboboxPopup, ComboboxRow, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue };
|
|
@@ -231,6 +231,5 @@ const ComboboxChipRemove = (props) => /* @__PURE__ */ jsx(Combobox$1.ChipRemove,
|
|
|
231
231
|
...props,
|
|
232
232
|
children: /* @__PURE__ */ jsx(XIcon, {})
|
|
233
233
|
});
|
|
234
|
-
const useComboboxFilter = Combobox$1.useFilter;
|
|
235
234
|
//#endregion
|
|
236
|
-
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, ComboboxPopup, ComboboxRow, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue
|
|
235
|
+
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, ComboboxPopup, ComboboxRow, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue };
|
|
@@ -2,7 +2,7 @@ import { cn } from "../lib/utils.js";
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/details-grid.tsx
|
|
4
4
|
const DetailsGrid = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
5
|
-
className: "@container min-w-0",
|
|
5
|
+
className: "@container min-w-0 [contain-intrinsic-inline-size:20rem]",
|
|
6
6
|
"data-slot": "details-grid-container",
|
|
7
7
|
children: /* @__PURE__ */ jsx("dl", {
|
|
8
8
|
className: cn("grid grid-cols-[repeat(auto-fit,minmax(min(100%,20rem),1fr))] gap-x-6 gap-y-2 font-sans @min-[64rem]:grid-cols-3", className),
|
|
@@ -14,7 +14,7 @@ declare const DialogProvider: ({ labels, children }: React$1.PropsWithChildren<{
|
|
|
14
14
|
declare const Dialog: <Payload>({ dirty, onOpenChange, onOpenChangeComplete, ...props }: Dialog$1.Root.Props<Payload> & {
|
|
15
15
|
dirty?: boolean;
|
|
16
16
|
}) => React$1.JSX.Element;
|
|
17
|
-
declare const DialogPortal: React$1.ForwardRefExoticComponent<Omit<import("@base-ui/react").
|
|
17
|
+
declare const DialogPortal: React$1.ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogPortalProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
18
18
|
declare function DialogTrigger({ tooltip, ...props }: Dialog$1.Trigger.Props & {
|
|
19
19
|
tooltip?: React$1.ReactNode;
|
|
20
20
|
}): React$1.JSX.Element;
|
|
@@ -27,10 +27,21 @@ declare const DialogBackdrop: ({ className, layer, ...props }: Dialog$1.Backdrop
|
|
|
27
27
|
declare const DialogViewport: ({ className, layer, ...props }: Dialog$1.Viewport.Props & {
|
|
28
28
|
layer?: OverlayLayer;
|
|
29
29
|
}) => React$1.JSX.Element;
|
|
30
|
-
|
|
30
|
+
/** How the popup sits below `sm`; from `sm` up it is always centred. */
|
|
31
|
+
declare const DIALOG_MOBILE_LAYOUT: {
|
|
32
|
+
/** Pinned to the bottom edge, leaving the page visible above it. */
|
|
33
|
+
readonly bottomSheet: "bottom-sheet";
|
|
34
|
+
/** Centred like the wide layout. */
|
|
35
|
+
readonly centered: "centered";
|
|
36
|
+
/** The whole viewport, inset by the safe areas; for search-like surfaces
|
|
37
|
+
* that need the height and have no backdrop left to tap. */
|
|
38
|
+
readonly fullscreen: "fullscreen";
|
|
39
|
+
};
|
|
40
|
+
type DialogMobileLayout = (typeof DIALOG_MOBILE_LAYOUT)[keyof typeof DIALOG_MOBILE_LAYOUT];
|
|
41
|
+
declare const DialogPopup: ({ backdropClassName, className, children, showCloseButton, mobileLayout, layer, viewportClassName, ...props }: Dialog$1.Popup.Props & {
|
|
31
42
|
backdropClassName?: string;
|
|
32
43
|
showCloseButton?: boolean;
|
|
33
|
-
|
|
44
|
+
mobileLayout?: DialogMobileLayout;
|
|
34
45
|
layer?: OverlayLayer;
|
|
35
46
|
viewportClassName?: string;
|
|
36
47
|
}) => React$1.JSX.Element;
|
|
@@ -44,4 +55,4 @@ declare const DialogPanel: ({ className, scrollFade, ...props }: React$1.Compone
|
|
|
44
55
|
scrollFade?: boolean;
|
|
45
56
|
}) => React$1.JSX.Element;
|
|
46
57
|
//#endregion
|
|
47
|
-
export { Dialog, DialogBackdrop, DialogBackdrop as DialogOverlay, DialogClose, DialogPopup as DialogContent, DialogPopup, DialogCreateHandle, DialogDescription, DialogFooter, DialogFormState, DialogHeader, DialogPanel, DialogPortal, DialogProvider, DialogTitle, DialogTrigger, DialogViewport };
|
|
58
|
+
export { DIALOG_MOBILE_LAYOUT, Dialog, DialogBackdrop, DialogBackdrop as DialogOverlay, DialogClose, DialogPopup as DialogContent, DialogPopup, DialogCreateHandle, DialogDescription, DialogFooter, DialogFormState, DialogHeader, type DialogMobileLayout, DialogPanel, DialogPortal, DialogProvider, DialogTitle, DialogTrigger, DialogViewport };
|
|
@@ -65,7 +65,7 @@ const Dialog = ({ dirty = false, onOpenChange, onOpenChangeComplete, ...props })
|
|
|
65
65
|
const DialogPortal = Dialog$1.Portal;
|
|
66
66
|
function DialogTrigger({ tooltip, ...props }) {
|
|
67
67
|
return renderTooltipTrigger({
|
|
68
|
-
tooltip
|
|
68
|
+
tooltip,
|
|
69
69
|
trigger: /* @__PURE__ */ jsx(Dialog$1.Trigger, {
|
|
70
70
|
"data-slot": "dialog-trigger",
|
|
71
71
|
...props
|
|
@@ -74,7 +74,7 @@ function DialogTrigger({ tooltip, ...props }) {
|
|
|
74
74
|
}
|
|
75
75
|
function DialogClose({ tooltip, ...props }) {
|
|
76
76
|
return renderTooltipTrigger({
|
|
77
|
-
tooltip
|
|
77
|
+
tooltip,
|
|
78
78
|
trigger: /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
79
79
|
"data-slot": "dialog-close",
|
|
80
80
|
...props
|
|
@@ -91,17 +91,37 @@ const DialogViewport = ({ className, layer = "default", ...props }) => /* @__PUR
|
|
|
91
91
|
"data-slot": "dialog-viewport",
|
|
92
92
|
...props
|
|
93
93
|
});
|
|
94
|
-
|
|
94
|
+
/** How the popup sits below `sm`; from `sm` up it is always centred. */
|
|
95
|
+
const DIALOG_MOBILE_LAYOUT = {
|
|
96
|
+
/** Pinned to the bottom edge, leaving the page visible above it. */
|
|
97
|
+
bottomSheet: "bottom-sheet",
|
|
98
|
+
/** Centred like the wide layout. */
|
|
99
|
+
centered: "centered",
|
|
100
|
+
/** The whole viewport, inset by the safe areas; for search-like surfaces
|
|
101
|
+
* that need the height and have no backdrop left to tap. */
|
|
102
|
+
fullscreen: "fullscreen"
|
|
103
|
+
};
|
|
104
|
+
const DIALOG_MOBILE_VIEWPORT_CLASS_NAMES = {
|
|
105
|
+
"bottom-sheet": "max-sm:grid-rows-[1fr_auto] max-sm:p-0 max-sm:pt-12",
|
|
106
|
+
centered: void 0,
|
|
107
|
+
fullscreen: "max-sm:grid-rows-[0_1fr_0] max-sm:p-0"
|
|
108
|
+
};
|
|
109
|
+
const DIALOG_MOBILE_POPUP_CLASS_NAMES = {
|
|
110
|
+
"bottom-sheet": "max-sm:max-w-none max-sm:rounded-none max-sm:border-x-0 max-sm:border-t max-sm:border-b-0 max-sm:pb-(--safe-area-bottom) max-sm:opacity-[calc(1-min(var(--nested-dialogs),1))] max-sm:before:hidden max-sm:before:rounded-none max-sm:data-ending-style:translate-y-4 max-sm:data-starting-style:translate-y-4",
|
|
111
|
+
centered: void 0,
|
|
112
|
+
fullscreen: "max-sm:h-full max-sm:max-w-none max-sm:rounded-none max-sm:border-0 max-sm:ps-(--safe-area-inline-start) max-sm:pe-(--safe-area-inline-end) max-sm:pt-(--safe-area-top) max-sm:pb-(--safe-area-bottom) max-sm:opacity-[calc(1-min(var(--nested-dialogs),1))] max-sm:before:hidden"
|
|
113
|
+
};
|
|
114
|
+
const DialogPopup = ({ backdropClassName, className, children, showCloseButton = true, mobileLayout = DIALOG_MOBILE_LAYOUT.bottomSheet, layer = "default", viewportClassName, ...props }) => {
|
|
95
115
|
const dismissal = useContext(DialogDismissalContext);
|
|
96
116
|
const labels = useContext(DialogLabelsContext);
|
|
97
117
|
return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogBackdrop, {
|
|
98
118
|
className: backdropClassName,
|
|
99
119
|
layer
|
|
100
120
|
}), /* @__PURE__ */ jsx(DialogViewport, {
|
|
101
|
-
className: cn(
|
|
121
|
+
className: cn(DIALOG_MOBILE_VIEWPORT_CLASS_NAMES[mobileLayout], viewportClassName),
|
|
102
122
|
layer,
|
|
103
123
|
children: /* @__PURE__ */ jsxs(Dialog$1.Popup, {
|
|
104
|
-
className: cn("bg-popover text-popover-foreground relative row-start-2 flex max-h-full min-h-0 w-full max-w-lg min-w-0 -translate-y-[calc(1.25rem*var(--nested-dialogs))] scale-[calc(1-0.1*var(--nested-dialogs))] flex-col rounded-2xl border opacity-[calc(1-0.1*var(--nested-dialogs))] shadow-lg/5 transition-[scale,opacity,translate] duration-200 ease-out will-change-transform not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-2xl)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:scale-98 data-ending-style:opacity-0 data-ending-style:duration-150 data-nested:data-ending-style:translate-y-8 data-nested-dialog-open:origin-top data-starting-style:scale-98 data-starting-style:opacity-0 data-nested:data-starting-style:translate-y-8 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",
|
|
124
|
+
className: cn("bg-popover text-popover-foreground relative row-start-2 flex max-h-full min-h-0 w-full max-w-lg min-w-0 -translate-y-[calc(1.25rem*var(--nested-dialogs))] scale-[calc(1-0.1*var(--nested-dialogs))] flex-col rounded-2xl border opacity-[calc(1-0.1*var(--nested-dialogs))] shadow-lg/5 transition-[scale,opacity,translate] duration-200 ease-out will-change-transform not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-2xl)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:scale-98 data-ending-style:opacity-0 data-ending-style:duration-150 data-nested:data-ending-style:translate-y-8 data-nested-dialog-open:origin-top data-starting-style:scale-98 data-starting-style:opacity-0 data-nested:data-starting-style:translate-y-8 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]", DIALOG_MOBILE_POPUP_CLASS_NAMES[mobileLayout], className),
|
|
105
125
|
"data-slot": "dialog-popup",
|
|
106
126
|
...props,
|
|
107
127
|
children: [
|
|
@@ -156,4 +176,4 @@ const DialogPanel = ({ className, scrollFade = true, ...props }) => /* @__PURE__
|
|
|
156
176
|
})
|
|
157
177
|
});
|
|
158
178
|
//#endregion
|
|
159
|
-
export { Dialog, DialogBackdrop, DialogBackdrop as DialogOverlay, DialogClose, DialogPopup as DialogContent, DialogPopup, DialogCreateHandle, DialogDescription, DialogFooter, DialogFormState, DialogHeader, DialogPanel, DialogPortal, DialogProvider, DialogTitle, DialogTrigger, DialogViewport };
|
|
179
|
+
export { DIALOG_MOBILE_LAYOUT, Dialog, DialogBackdrop, DialogBackdrop as DialogOverlay, DialogClose, DialogPopup as DialogContent, DialogPopup, DialogCreateHandle, DialogDescription, DialogFooter, DialogFormState, DialogHeader, DialogPanel, DialogPortal, DialogProvider, DialogTitle, DialogTrigger, DialogViewport };
|
|
@@ -33,6 +33,7 @@ const InlineRenameInput = ({ value, onValueChange, onCommit, onCancel, onBlur, c
|
|
|
33
33
|
"data-slot": "inline-rename-mirror",
|
|
34
34
|
children: mirrorText
|
|
35
35
|
}), /* @__PURE__ */ jsx("input", {
|
|
36
|
+
enterKeyHint: "done",
|
|
36
37
|
...props,
|
|
37
38
|
"data-slot": "inline-rename-input",
|
|
38
39
|
dir: dir ?? (isStructuredInputType(props.type) ? "ltr" : contentDir(value)),
|
|
@@ -5,7 +5,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
5
5
|
//#region src/components/input-group.d.ts
|
|
6
6
|
declare const InputGroup: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
|
|
7
7
|
declare const inputGroupAddonVariants: (props?: ({
|
|
8
|
-
align?: "
|
|
8
|
+
align?: "block-end" | "block-start" | "inline-end" | "inline-start" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
10
|
declare const InputGroupAddon: ({ className, align, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>) => React$1.JSX.Element;
|
|
11
11
|
declare const InputGroupText: ({ className, ...props }: React$1.ComponentProps<"span">) => React$1.JSX.Element;
|
|
@@ -6,27 +6,33 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
//#region src/components/landing.tsx
|
|
7
7
|
const LandingLayout = ({ actions, hero, children, footer }) => /* @__PURE__ */ jsxs("div", {
|
|
8
8
|
className: "mx-auto flex h-full w-full max-w-5xl flex-1 flex-col overflow-hidden",
|
|
9
|
-
children: [actions, /* @__PURE__ */
|
|
10
|
-
className: "@container flex min-h-0 flex-1 flex-col
|
|
11
|
-
children:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
children:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
9
|
+
children: [actions, /* @__PURE__ */ jsx("div", {
|
|
10
|
+
className: "@container flex min-h-0 flex-1 flex-col overflow-hidden",
|
|
11
|
+
children: /* @__PURE__ */ jsx(ScrollArea, {
|
|
12
|
+
className: "min-h-0 flex-1",
|
|
13
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
14
|
+
className: "flex min-h-full w-full flex-col items-center px-4 @2xl:h-full",
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsx(ScrollArea, {
|
|
17
|
+
className: "min-h-72 w-full max-w-2xl shrink-0 basis-[22rem] @2xl:shrink",
|
|
18
|
+
scrollFade: true,
|
|
19
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
20
|
+
className: "flex min-h-full w-full flex-col items-center justify-center gap-8 px-1",
|
|
21
|
+
children: hero
|
|
22
|
+
})
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ jsx("div", {
|
|
25
|
+
className: "grid w-full shrink-0 gap-8 pb-6 @2xl:min-h-0 @2xl:flex-1 @2xl:auto-rows-fr @2xl:grid-cols-3",
|
|
26
|
+
children
|
|
27
|
+
}),
|
|
28
|
+
footer !== void 0 && /* @__PURE__ */ jsx(ScrollArea, {
|
|
29
|
+
className: "h-auto max-h-[40dvh] w-full shrink-0",
|
|
30
|
+
scrollFade: true,
|
|
31
|
+
children: footer
|
|
32
|
+
})
|
|
33
|
+
]
|
|
28
34
|
})
|
|
29
|
-
|
|
35
|
+
})
|
|
30
36
|
})]
|
|
31
37
|
});
|
|
32
38
|
const LandingGreeting = ({ icon, children }) => /* @__PURE__ */ jsxs("div", {
|
|
@@ -54,7 +60,7 @@ const LandingSection = ({ children, heading }) => /* @__PURE__ */ jsxs("section"
|
|
|
54
60
|
className: "mb-3 shrink-0 px-1",
|
|
55
61
|
children: heading
|
|
56
62
|
}), /* @__PURE__ */ jsx(ScrollArea, {
|
|
57
|
-
className: "min-h-0 flex-1",
|
|
63
|
+
className: "@2xl:min-h-0 @2xl:flex-1",
|
|
58
64
|
scrollFade: true,
|
|
59
65
|
children: /* @__PURE__ */ jsx("div", {
|
|
60
66
|
className: "flex flex-col gap-1 px-1 pt-1 pb-4",
|
|
@@ -2,8 +2,8 @@ import * as React$1 from "react";
|
|
|
2
2
|
import { Menu as Menu$1 } from "@base-ui/react/menu";
|
|
3
3
|
//#region src/components/menu.d.ts
|
|
4
4
|
declare const MenuCreateHandle: typeof Menu$1.createHandle;
|
|
5
|
-
declare const Menu:
|
|
6
|
-
declare const MenuPortal: React$1.ForwardRefExoticComponent<Omit<import("@base-ui/react").
|
|
5
|
+
declare const Menu: typeof Menu$1.Root;
|
|
6
|
+
declare const MenuPortal: React$1.ForwardRefExoticComponent<Omit<import("@base-ui/react").MenuPortalProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
7
7
|
declare function MenuTrigger({ tooltip, ...props }: Menu$1.Trigger.Props & {
|
|
8
8
|
tooltip?: React$1.ReactNode;
|
|
9
9
|
}): React$1.JSX.Element;
|
package/dist/components/menu.js
CHANGED
|
@@ -12,7 +12,7 @@ const Menu = Menu$1.Root;
|
|
|
12
12
|
const MenuPortal = Menu$1.Portal;
|
|
13
13
|
function MenuTrigger({ tooltip, ...props }) {
|
|
14
14
|
return renderTooltipTrigger({
|
|
15
|
-
tooltip
|
|
15
|
+
tooltip,
|
|
16
16
|
trigger: /* @__PURE__ */ jsx(Menu$1.Trigger, {
|
|
17
17
|
"data-slot": "menu-trigger",
|
|
18
18
|
nativeButton: true,
|
|
@@ -59,5 +59,5 @@ export type OutlineRailProps = {
|
|
|
59
59
|
export declare const OUTLINE_CONTROL_MIN_SIZE = 32;
|
|
60
60
|
/** The entry as one line of text: label, then its title when it has one. */
|
|
61
61
|
export declare const outlineEntryText: (item: OutlineItem) => string;
|
|
62
|
-
export declare const OutlineRail: ({ items, scrollContainerRef, resolvePct, onJump, activeId, header, formatMetaLabel, collapsedFromLevel, presentation, bottomInset, topOffset, panelWidth, ariaLabel }: OutlineRailProps) => import("react").JSX.Element | null;
|
|
62
|
+
export declare const OutlineRail: ({ items: itemsProp, scrollContainerRef, resolvePct, onJump, activeId, header, formatMetaLabel, collapsedFromLevel, presentation, bottomInset, topOffset, panelWidth, ariaLabel }: OutlineRailProps) => import("react").JSX.Element | null;
|
|
63
63
|
//#endregion
|