@jonmilner/ui 0.0.0-stage → 0.1.1
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/THIRD_PARTY_NOTICES.md +51 -0
- package/dist/AlertDialog/index.d.mts +21 -0
- package/dist/AlertDialog/index.mjs +29 -0
- package/dist/Badge/Badge.css +2 -0
- package/dist/Badge/Badge.css.mjs +24 -0
- package/dist/Badge/index.d.mts +11 -0
- package/dist/Badge/index.mjs +54 -0
- package/dist/Box/Box.css +2 -0
- package/dist/Box/Box.css.mjs +8 -0
- package/dist/Box/index.d.mts +8 -0
- package/dist/Box/index.mjs +15 -0
- package/dist/Button/Button.css +2 -0
- package/dist/Button/Button.css.mjs +25 -0
- package/dist/Button/index.d.mts +18 -0
- package/dist/Button/index.mjs +97 -0
- package/dist/Checkbox/Checkbox.css +2 -0
- package/dist/Checkbox/Checkbox.css.mjs +8 -0
- package/dist/Checkbox/index.d.mts +6 -0
- package/dist/Checkbox/index.mjs +45 -0
- package/dist/Chip/Chip.css +2 -0
- package/dist/Chip/Chip.css.mjs +17 -0
- package/dist/Chip/index.d.mts +13 -0
- package/dist/Chip/index.mjs +73 -0
- package/dist/Clickable/Clickable.css +2 -0
- package/dist/Clickable/Clickable.css.mjs +8 -0
- package/dist/Clickable/index.d.mts +11 -0
- package/dist/Clickable/index.mjs +28 -0
- package/dist/Dialog/Dialog.css +2 -0
- package/dist/Dialog/Dialog.css.d.mts +3 -0
- package/dist/Dialog/Dialog.css.mjs +12 -0
- package/dist/Dialog/client.d.mts +12 -0
- package/dist/Dialog/client.mjs +31 -0
- package/dist/Dialog/index.d.mts +30 -0
- package/dist/Dialog/index.mjs +85 -0
- package/dist/Field/Field.css +2 -0
- package/dist/Field/Field.css.mjs +8 -0
- package/dist/Field/client.mjs +26 -0
- package/dist/Field/index.d.mts +20 -0
- package/dist/Field/index.mjs +88 -0
- package/dist/Heading/Heading.css +2 -0
- package/dist/Heading/Heading.css.mjs +8 -0
- package/dist/Heading/index.d.mts +9 -0
- package/dist/Heading/index.mjs +27 -0
- package/dist/Icon/Icon.css +2 -0
- package/dist/Icon/Icon.css.mjs +17 -0
- package/dist/Icon/index.d.mts +12 -0
- package/dist/Icon/index.mjs +24 -0
- package/dist/IconButton/IconButton.css +2 -0
- package/dist/IconButton/IconButton.css.mjs +24 -0
- package/dist/IconButton/index.d.mts +15 -0
- package/dist/IconButton/index.mjs +25 -0
- package/dist/Inline/Inline.css +2 -0
- package/dist/Inline/Inline.css.mjs +8 -0
- package/dist/Inline/index.d.mts +14 -0
- package/dist/Inline/index.mjs +17 -0
- package/dist/Menu/Menu.css +2 -0
- package/dist/Menu/Menu.css.mjs +8 -0
- package/dist/Menu/client.d.mts +9 -0
- package/dist/Menu/client.mjs +27 -0
- package/dist/Menu/index.d.mts +34 -0
- package/dist/Menu/index.mjs +107 -0
- package/dist/MultiSelect/MultiSelect.css +2 -0
- package/dist/MultiSelect/MultiSelect.css.mjs +8 -0
- package/dist/MultiSelect/client.d.mts +8 -0
- package/dist/MultiSelect/client.mjs +93 -0
- package/dist/MultiSelect/index.d.mts +23 -0
- package/dist/MultiSelect/index.mjs +75 -0
- package/dist/SearchField/SearchField.css +2 -0
- package/dist/SearchField/SearchField.css.mjs +27 -0
- package/dist/SearchField/client.d.mts +5 -0
- package/dist/SearchField/client.mjs +74 -0
- package/dist/SearchField/index.d.mts +25 -0
- package/dist/SearchField/index.mjs +36 -0
- package/dist/Stack/Stack.css +2 -0
- package/dist/Stack/Stack.css.mjs +8 -0
- package/dist/Stack/index.d.mts +14 -0
- package/dist/Stack/index.mjs +15 -0
- package/dist/Tabs/Tabs.css +2 -0
- package/dist/Tabs/Tabs.css.mjs +8 -0
- package/dist/Tabs/index.d.mts +20 -0
- package/dist/Tabs/index.mjs +88 -0
- package/dist/Tag/Tag.css +2 -0
- package/dist/Tag/Tag.css.mjs +17 -0
- package/dist/Tag/index.d.mts +13 -0
- package/dist/Tag/index.mjs +82 -0
- package/dist/Text/Text.css +2 -0
- package/dist/Text/Text.css.mjs +32 -0
- package/dist/Text/index.d.mts +16 -0
- package/dist/Text/index.mjs +25 -0
- package/dist/Toast/Toast.css +2 -0
- package/dist/Toast/Toast.css.mjs +18 -0
- package/dist/Toast/client.d.mts +46 -0
- package/dist/Toast/client.mjs +219 -0
- package/dist/Toast/index.d.mts +7 -0
- package/dist/Toast/index.mjs +5 -0
- package/dist/base.css +6 -0
- package/dist/brands/brand.d.mts +9 -0
- package/dist/brands/brand.mjs +4 -0
- package/dist/brands/check-fonts.mjs +15 -0
- package/dist/brands/default.d.mts +4 -0
- package/dist/brands/default.mjs +74 -0
- package/dist/brands/font.d.mts +17 -0
- package/dist/brands/font.mjs +35 -0
- package/dist/brands/forced-colors.mjs +18 -0
- package/dist/brands/index.d.mts +8 -0
- package/dist/brands/index.mjs +5 -0
- package/dist/brands/metrics.mjs +40 -0
- package/dist/contrast/color.d.mts +3 -0
- package/dist/contrast/color.mjs +222 -0
- package/dist/contrast/contrast.d.mts +18 -0
- package/dist/contrast/contrast.mjs +52 -0
- package/dist/contrast/mixes.mjs +33 -0
- package/dist/docs/AlertDialog.md +113 -0
- package/dist/docs/Badge.md +76 -0
- package/dist/docs/Box.md +87 -0
- package/dist/docs/Button.md +98 -0
- package/dist/docs/Checkbox.md +107 -0
- package/dist/docs/Chip.md +92 -0
- package/dist/docs/Clickable.md +82 -0
- package/dist/docs/Dialog.md +166 -0
- package/dist/docs/Field.md +143 -0
- package/dist/docs/Heading.md +69 -0
- package/dist/docs/Icon.md +116 -0
- package/dist/docs/IconButton.md +83 -0
- package/dist/docs/Inline.md +79 -0
- package/dist/docs/Menu.md +181 -0
- package/dist/docs/MultiSelect.md +120 -0
- package/dist/docs/SearchField.md +127 -0
- package/dist/docs/Stack.md +79 -0
- package/dist/docs/Tabs.md +130 -0
- package/dist/docs/Tag.md +97 -0
- package/dist/docs/Text.md +90 -0
- package/dist/docs/Toast.md +115 -0
- package/dist/docs/llms.txt +33 -0
- package/dist/docs/manifest.json +2649 -0
- package/dist/docs/manifest.schema.json +96 -0
- package/dist/docs/migrations/README.md +27 -0
- package/dist/docs/theming.md +59 -0
- package/dist/icons/ArrowLeftIcon.d.mts +4 -0
- package/dist/icons/ArrowLeftIcon.mjs +11 -0
- package/dist/icons/ArrowRightIcon.d.mts +4 -0
- package/dist/icons/ArrowRightIcon.mjs +11 -0
- package/dist/icons/CheckIcon.d.mts +4 -0
- package/dist/icons/CheckIcon.mjs +11 -0
- package/dist/icons/ChevronDownIcon.d.mts +4 -0
- package/dist/icons/ChevronDownIcon.mjs +11 -0
- package/dist/icons/ChevronRightIcon.d.mts +4 -0
- package/dist/icons/ChevronRightIcon.mjs +11 -0
- package/dist/icons/CircleAlertIcon.d.mts +4 -0
- package/dist/icons/CircleAlertIcon.mjs +15 -0
- package/dist/icons/CircleCheckIcon.d.mts +4 -0
- package/dist/icons/CircleCheckIcon.mjs +15 -0
- package/dist/icons/CircleDotIcon.d.mts +4 -0
- package/dist/icons/CircleDotIcon.mjs +19 -0
- package/dist/icons/CircleSlashIcon.d.mts +4 -0
- package/dist/icons/CircleSlashIcon.mjs +15 -0
- package/dist/icons/GitMergeIcon.d.mts +4 -0
- package/dist/icons/GitMergeIcon.mjs +23 -0
- package/dist/icons/GitPullRequestClosedIcon.d.mts +4 -0
- package/dist/icons/GitPullRequestClosedIcon.mjs +23 -0
- package/dist/icons/GitPullRequestDraftIcon.d.mts +4 -0
- package/dist/icons/GitPullRequestDraftIcon.mjs +23 -0
- package/dist/icons/GitPullRequestIcon.d.mts +4 -0
- package/dist/icons/GitPullRequestIcon.mjs +23 -0
- package/dist/icons/InboxIcon.d.mts +4 -0
- package/dist/icons/InboxIcon.mjs +11 -0
- package/dist/icons/InfoIcon.d.mts +4 -0
- package/dist/icons/InfoIcon.mjs +15 -0
- package/dist/icons/LoaderCircleIcon.d.mts +4 -0
- package/dist/icons/LoaderCircleIcon.mjs +11 -0
- package/dist/icons/RefreshCwIcon.d.mts +4 -0
- package/dist/icons/RefreshCwIcon.mjs +15 -0
- package/dist/icons/SearchIcon.d.mts +4 -0
- package/dist/icons/SearchIcon.mjs +15 -0
- package/dist/icons/SettingsIcon.d.mts +4 -0
- package/dist/icons/SettingsIcon.mjs +15 -0
- package/dist/icons/XIcon.d.mts +4 -0
- package/dist/icons/XIcon.mjs +11 -0
- package/dist/icons/index.d.mts +25 -0
- package/dist/icons/index.mjs +45 -0
- package/dist/index.d.mts +28 -0
- package/dist/index.mjs +25 -0
- package/dist/popup/client.d.mts +9 -0
- package/dist/popup/client.mjs +31 -0
- package/dist/styles/atoms.css +2 -0
- package/dist/styles/atoms.css.d.mts +219 -0
- package/dist/styles/atoms.css.mjs +2669 -0
- package/dist/styles/button-fills.mjs +17 -0
- package/dist/styles/highlight.mjs +8 -0
- package/dist/styles/hover-tint.mjs +4 -0
- package/dist/styles/join.mjs +4 -0
- package/dist/styles/layers.css +2 -0
- package/dist/styles/part-props.d.mts +8 -0
- package/dist/styles/split-style-props.mjs +9 -0
- package/dist/testing/index.d.mts +4 -0
- package/dist/testing/index.mjs +3 -0
- package/dist/testing/motion.d.mts +22 -0
- package/dist/testing/motion.mjs +49 -0
- package/dist/theme/FontCheck.mjs +11 -0
- package/dist/theme/ThemeProvider.d.mts +15 -0
- package/dist/theme/ThemeProvider.mjs +23 -0
- package/dist/theme/define-theme.d.mts +9 -0
- package/dist/theme/define-theme.mjs +84 -0
- package/dist/theme/use-theme-container.mjs +15 -0
- package/dist/tokens/contract.d.mts +110 -0
- package/dist/tokens/contract.mjs +17 -0
- package/dist/tokens/index.d.mts +2 -0
- package/dist/tokens/index.mjs +1 -0
- package/dist/tokens/roles.d.mts +6 -0
- package/dist/tokens/roles.mjs +24 -0
- package/dist/tokens/scales.d.mts +100 -0
- package/dist/tokens/scales.mjs +103 -0
- package/dist/types.d.mts +7 -0
- package/package.json +159 -3
- package/README.md +0 -3
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "../styles/layers.css";
|
|
2
|
+
import "./Dialog.css";
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
//#region src/Dialog/Dialog.css.ts
|
|
6
|
+
var e = "iyoziv0", t = "iyoziv1", n = {
|
|
7
|
+
sm: "iyoziv2",
|
|
8
|
+
med: "iyoziv3",
|
|
9
|
+
lg: "iyoziv4"
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { e as backdrop, t as popup, n as size };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TriggerElementProps, TriggerLookProps } from "../popup/client.mjs";
|
|
2
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
//#region src/Dialog/client.d.ts
|
|
5
|
+
type TriggerOwnProps = Omit<Dialog.Trigger.Props, "render" | "className" | "style" | "nativeButton">;
|
|
6
|
+
type CloseOwnProps = Omit<Dialog.Close.Props, "render" | "className" | "style" | "nativeButton">;
|
|
7
|
+
export type DialogTriggerProps = TriggerOwnProps & TriggerLookProps & Omit<TriggerElementProps, keyof TriggerLookProps | keyof TriggerOwnProps>;
|
|
8
|
+
export type DialogCloseProps = CloseOwnProps & TriggerLookProps & Omit<TriggerElementProps, keyof TriggerLookProps | keyof CloseOwnProps>;
|
|
9
|
+
export declare function DialogTrigger({ disabled, handle, payload, id, ...props }: DialogTriggerProps): import("react").JSX.Element;
|
|
10
|
+
export declare function DialogClose({ disabled, ...props }: DialogCloseProps): import("react").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { triggerElement as e, usePopupScope as t } from "../popup/client.mjs";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { Dialog as r } from "@base-ui/react/dialog";
|
|
5
|
+
//#region src/Dialog/client.tsx
|
|
6
|
+
function i({ disabled: i = !1, handle: a, payload: o, id: s, ...c }) {
|
|
7
|
+
let { ref: l } = t();
|
|
8
|
+
return /* @__PURE__ */ n(r.Trigger, {
|
|
9
|
+
disabled: i,
|
|
10
|
+
handle: a,
|
|
11
|
+
payload: o,
|
|
12
|
+
id: s,
|
|
13
|
+
ref: l,
|
|
14
|
+
render: e(c)
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function a({ disabled: t = !1, ...i }) {
|
|
18
|
+
return /* @__PURE__ */ n(r.Close, {
|
|
19
|
+
disabled: t,
|
|
20
|
+
render: e(i)
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function o({ children: e }) {
|
|
24
|
+
let { container: i } = t();
|
|
25
|
+
return /* @__PURE__ */ n(r.Portal, {
|
|
26
|
+
container: i,
|
|
27
|
+
children: e
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { a as DialogClose, o as DialogPortal, i as DialogTrigger };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BoxProps } from "../Box/index.mjs";
|
|
2
|
+
import { DialogClose, DialogCloseProps, DialogTrigger, DialogTriggerProps } from "./client.mjs";
|
|
3
|
+
import { PartProps } from "../styles/part-props.mjs";
|
|
4
|
+
import { size as size$1 } from "./Dialog.css.mjs";
|
|
5
|
+
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
6
|
+
import { ReactNode } from "react";
|
|
7
|
+
//#region src/Dialog/index.d.ts
|
|
8
|
+
export type DialogProps = Pick<Dialog$1.Root.Props, "open" | "defaultOpen" | "onOpenChange" | "onOpenChangeComplete"> & {
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
export type DialogPopupProps = PartProps<Omit<Dialog$1.Popup.Props, "title">> & {
|
|
12
|
+
description?: ReactNode;
|
|
13
|
+
size?: keyof typeof size$1;
|
|
14
|
+
title: Exclude<ReactNode, null | undefined | boolean>;
|
|
15
|
+
};
|
|
16
|
+
export type DialogBodyProps = Omit<BoxProps<"div">, "as">;
|
|
17
|
+
export type DialogActionsProps = Omit<BoxProps<"div">, "as">;
|
|
18
|
+
declare function DialogRoot({ children, ...props }: DialogProps): import("react").JSX.Element;
|
|
19
|
+
declare function DialogPopup({ title, description, size, position, margin, blockSize, display, flexDirection, gap, padding, backgroundColor, borderRadius, boxShadow, overflow, className, style, children, ...props }: DialogPopupProps): import("react").JSX.Element;
|
|
20
|
+
declare function DialogBody({ display, flexDirection, gap, ...props }: DialogBodyProps): import("react").JSX.Element;
|
|
21
|
+
declare function DialogActions({ display, flexWrap, justifyContent, gap, ...props }: DialogActionsProps): import("react").JSX.Element;
|
|
22
|
+
export declare const Dialog: typeof DialogRoot & {
|
|
23
|
+
Trigger: typeof DialogTrigger;
|
|
24
|
+
Popup: typeof DialogPopup;
|
|
25
|
+
Body: typeof DialogBody;
|
|
26
|
+
Actions: typeof DialogActions;
|
|
27
|
+
Close: typeof DialogClose;
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export type { DialogCloseProps, DialogTriggerProps };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { join as e } from "../styles/join.mjs";
|
|
2
|
+
import { splitStyleProps as t } from "../styles/split-style-props.mjs";
|
|
3
|
+
import { Box as n } from "../Box/index.mjs";
|
|
4
|
+
import { Text as r } from "../Text/index.mjs";
|
|
5
|
+
import { Heading as i } from "../Heading/index.mjs";
|
|
6
|
+
import { PopupScope as a } from "../popup/client.mjs";
|
|
7
|
+
import { DialogClose as o, DialogPortal as s, DialogTrigger as c } from "./client.mjs";
|
|
8
|
+
import { backdrop as l, popup as u, size as d } from "./Dialog.css.mjs";
|
|
9
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
10
|
+
import { Dialog as m } from "@base-ui/react/dialog";
|
|
11
|
+
//#region src/Dialog/index.tsx
|
|
12
|
+
function h({ children: e, ...t }) {
|
|
13
|
+
return /* @__PURE__ */ f(a, { children: /* @__PURE__ */ f(m.Root, {
|
|
14
|
+
...t,
|
|
15
|
+
children: e
|
|
16
|
+
}) });
|
|
17
|
+
}
|
|
18
|
+
function g({ title: a, description: o, size: c = "med", position: h = "fixed", margin: g = "auto", blockSize: _ = "fit", display: v = "flex", flexDirection: y = "column", gap: b = "16", padding: x = "24", backgroundColor: S = "bgRaised", borderRadius: C = "lg", boxShadow: w = "lg", overflow: T = "auto", className: E, style: D, children: O, ...k }) {
|
|
19
|
+
let [A, j] = t(k);
|
|
20
|
+
return /* @__PURE__ */ p(s, { children: [/* @__PURE__ */ f(m.Backdrop, { render: /* @__PURE__ */ f(n, {
|
|
21
|
+
className: l,
|
|
22
|
+
position: "fixed",
|
|
23
|
+
zIndex: "modal"
|
|
24
|
+
}) }), /* @__PURE__ */ p(m.Popup, {
|
|
25
|
+
...j,
|
|
26
|
+
render: /* @__PURE__ */ f(n, {
|
|
27
|
+
zIndex: "modal",
|
|
28
|
+
position: h,
|
|
29
|
+
margin: g,
|
|
30
|
+
blockSize: _,
|
|
31
|
+
display: v,
|
|
32
|
+
flexDirection: y,
|
|
33
|
+
gap: b,
|
|
34
|
+
padding: x,
|
|
35
|
+
backgroundColor: S,
|
|
36
|
+
borderRadius: C,
|
|
37
|
+
boxShadow: w,
|
|
38
|
+
overflow: T,
|
|
39
|
+
...A,
|
|
40
|
+
className: e(u, d[c], E),
|
|
41
|
+
style: D
|
|
42
|
+
}),
|
|
43
|
+
children: [/* @__PURE__ */ p(n, {
|
|
44
|
+
display: "flex",
|
|
45
|
+
flexDirection: "column",
|
|
46
|
+
gap: "8",
|
|
47
|
+
children: [/* @__PURE__ */ f(m.Title, {
|
|
48
|
+
render: /* @__PURE__ */ f(i, {
|
|
49
|
+
as: "h2",
|
|
50
|
+
size: "lg"
|
|
51
|
+
}),
|
|
52
|
+
children: a
|
|
53
|
+
}), o == null ? null : /* @__PURE__ */ f(m.Description, {
|
|
54
|
+
render: /* @__PURE__ */ f(r, { color: "fgMuted" }),
|
|
55
|
+
children: o
|
|
56
|
+
})]
|
|
57
|
+
}), O]
|
|
58
|
+
})] });
|
|
59
|
+
}
|
|
60
|
+
function _({ display: e = "flex", flexDirection: t = "column", gap: r = "12", ...i }) {
|
|
61
|
+
return /* @__PURE__ */ f(n, {
|
|
62
|
+
display: e,
|
|
63
|
+
flexDirection: t,
|
|
64
|
+
gap: r,
|
|
65
|
+
...i
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function v({ display: e = "flex", flexWrap: t = "wrap", justifyContent: r = "end", gap: i = "8", ...a }) {
|
|
69
|
+
return /* @__PURE__ */ f(n, {
|
|
70
|
+
display: e,
|
|
71
|
+
flexWrap: t,
|
|
72
|
+
justifyContent: r,
|
|
73
|
+
gap: i,
|
|
74
|
+
...a
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
var y = Object.assign(h, {
|
|
78
|
+
Trigger: c,
|
|
79
|
+
Popup: g,
|
|
80
|
+
Body: _,
|
|
81
|
+
Actions: v,
|
|
82
|
+
Close: o
|
|
83
|
+
});
|
|
84
|
+
//#endregion
|
|
85
|
+
export { y as Dialog };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer tokens, reset, atoms, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.stack, components.text, components.badge, components.button, components.chip, components.field, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.search-field, components.tabs, components.tag, components.toast;
|
|
2
|
+
@layer components.field{._13w7r940[data-disabled]{color:var(--color-fg-muted)}._13w7r941{overflow-wrap:anywhere}._13w7r942{vertical-align:middle;margin-inline-end:var(--space-4);display:inline-block}}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { splitStyleProps as e } from "../styles/split-style-props.mjs";
|
|
3
|
+
import { Box as t } from "../Box/index.mjs";
|
|
4
|
+
import { CircleAlertIcon as n } from "../icons/CircleAlertIcon.mjs";
|
|
5
|
+
import { icon as r } from "./Field.css.mjs";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
import { Field as o } from "@base-ui/react/field";
|
|
8
|
+
//#region src/Field/client.tsx
|
|
9
|
+
function s({ size: s, ...c }) {
|
|
10
|
+
return /* @__PURE__ */ i(o.Error, {
|
|
11
|
+
...c,
|
|
12
|
+
render: (o) => {
|
|
13
|
+
let [, c] = e(o);
|
|
14
|
+
return /* @__PURE__ */ a(t, {
|
|
15
|
+
as: "span",
|
|
16
|
+
...c,
|
|
17
|
+
children: [/* @__PURE__ */ i(n, {
|
|
18
|
+
className: r,
|
|
19
|
+
size: s
|
|
20
|
+
}), o.children]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { s as FieldErrorMessage };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PartProps } from "../styles/part-props.mjs";
|
|
2
|
+
import { TextOwnProps } from "../Text/index.mjs";
|
|
3
|
+
import { Field as Field$1 } from "@base-ui/react/field";
|
|
4
|
+
//#region src/Field/index.d.ts
|
|
5
|
+
type TextPartProps<P> = PartProps<Omit<P, keyof TextOwnProps>> & TextOwnProps;
|
|
6
|
+
export type FieldProps = PartProps<Field$1.Root.Props>;
|
|
7
|
+
export type FieldLabelProps = TextPartProps<Field$1.Label.Props>;
|
|
8
|
+
export type FieldDescriptionProps = TextPartProps<Field$1.Description.Props>;
|
|
9
|
+
export type FieldErrorProps = TextPartProps<Field$1.Error.Props>;
|
|
10
|
+
declare function FieldRoot({ display, flexDirection, gap, className, style, ...props }: FieldProps): import("react").JSX.Element;
|
|
11
|
+
declare function FieldLabel({ nativeLabel, size, font, weight, leading, truncate, className, style, ...props }: FieldLabelProps): import("react").JSX.Element;
|
|
12
|
+
declare function FieldDescription({ size, font, weight, leading, truncate, color, className, style, ...props }: FieldDescriptionProps): import("react").JSX.Element;
|
|
13
|
+
declare function FieldError({ children, match, size, font, weight, leading, truncate, color, className, style, ...props }: FieldErrorProps): import("react").JSX.Element;
|
|
14
|
+
export declare const Field: typeof FieldRoot & {
|
|
15
|
+
Label: typeof FieldLabel;
|
|
16
|
+
Description: typeof FieldDescription;
|
|
17
|
+
Error: typeof FieldError;
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { join as e } from "../styles/join.mjs";
|
|
2
|
+
import { splitStyleProps as t } from "../styles/split-style-props.mjs";
|
|
3
|
+
import { Box as n } from "../Box/index.mjs";
|
|
4
|
+
import { Text as r } from "../Text/index.mjs";
|
|
5
|
+
import { error as i, label as a } from "./Field.css.mjs";
|
|
6
|
+
import { FieldErrorMessage as o } from "./client.mjs";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
import { Children as l } from "react";
|
|
9
|
+
import { Field as u } from "@base-ui/react/field";
|
|
10
|
+
//#region src/Field/index.tsx
|
|
11
|
+
function d({ display: e = "flex", flexDirection: r = "column", gap: i = "8", className: a, style: o, ...c }) {
|
|
12
|
+
let [l, d] = t(c);
|
|
13
|
+
return /* @__PURE__ */ s(u.Root, {
|
|
14
|
+
...d,
|
|
15
|
+
render: /* @__PURE__ */ s(n, {
|
|
16
|
+
display: e,
|
|
17
|
+
flexDirection: r,
|
|
18
|
+
gap: i,
|
|
19
|
+
...l,
|
|
20
|
+
className: a,
|
|
21
|
+
style: o
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function f({ nativeLabel: n = !0, size: i = "sm", font: o = "label", weight: c = "medium", leading: l, truncate: d, className: f, style: p, ...m }) {
|
|
26
|
+
let [h, g] = t(m);
|
|
27
|
+
return /* @__PURE__ */ s(u.Label, {
|
|
28
|
+
...g,
|
|
29
|
+
nativeLabel: n,
|
|
30
|
+
render: /* @__PURE__ */ s(r, {
|
|
31
|
+
as: n ? "label" : "span",
|
|
32
|
+
size: i,
|
|
33
|
+
font: o,
|
|
34
|
+
weight: c,
|
|
35
|
+
leading: l,
|
|
36
|
+
truncate: d,
|
|
37
|
+
...h,
|
|
38
|
+
className: e(a, f),
|
|
39
|
+
style: p
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function p({ size: e = "sm", font: n, weight: i, leading: a, truncate: o, color: c = "fgMuted", className: l, style: d, ...f }) {
|
|
44
|
+
let [p, m] = t(f);
|
|
45
|
+
return /* @__PURE__ */ s(u.Description, {
|
|
46
|
+
...m,
|
|
47
|
+
render: /* @__PURE__ */ s(r, {
|
|
48
|
+
size: e,
|
|
49
|
+
font: n,
|
|
50
|
+
weight: i,
|
|
51
|
+
leading: a,
|
|
52
|
+
truncate: o,
|
|
53
|
+
color: c,
|
|
54
|
+
...p,
|
|
55
|
+
className: l,
|
|
56
|
+
style: d
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function m({ children: n, match: a, size: u = "sm", font: d, weight: f, leading: p, truncate: m, color: h = "danger", className: g, style: _, ...v }) {
|
|
61
|
+
let [y, b] = t(v), x = l.toArray(n).some((e) => e !== "");
|
|
62
|
+
return /* @__PURE__ */ c(r, {
|
|
63
|
+
as: "div",
|
|
64
|
+
role: "alert",
|
|
65
|
+
size: u,
|
|
66
|
+
font: d,
|
|
67
|
+
weight: f,
|
|
68
|
+
leading: p,
|
|
69
|
+
truncate: m,
|
|
70
|
+
color: h,
|
|
71
|
+
...y,
|
|
72
|
+
className: e(i, g),
|
|
73
|
+
style: _,
|
|
74
|
+
children: [/* @__PURE__ */ s(o, {
|
|
75
|
+
...b,
|
|
76
|
+
...x && { children: n },
|
|
77
|
+
match: a ?? (x || void 0),
|
|
78
|
+
size: u
|
|
79
|
+
}), ""]
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
var h = Object.assign(d, {
|
|
83
|
+
Label: f,
|
|
84
|
+
Description: p,
|
|
85
|
+
Error: m
|
|
86
|
+
});
|
|
87
|
+
//#endregion
|
|
88
|
+
export { h as Field };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer tokens, reset, atoms, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.stack, components.text, components.badge, components.button, components.chip, components.field, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.search-field, components.tabs, components.tag, components.toast;
|
|
2
|
+
@layer components.heading{.yaxwxv0{text-wrap:balance}}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TextProps } from "../Text/index.mjs";
|
|
2
|
+
//#region src/Heading/index.d.ts
|
|
3
|
+
export type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
4
|
+
export type HeadingSize = "sm" | "med" | "lg" | "xl" | "2xl";
|
|
5
|
+
export type HeadingProps<T extends HeadingLevel = "h2"> = Omit<TextProps<T>, "size"> & {
|
|
6
|
+
size?: HeadingSize;
|
|
7
|
+
};
|
|
8
|
+
export declare function Heading<T extends HeadingLevel = "h2">({ as, size, font, weight, leading, className, ...props }: HeadingProps<T>): import("react").JSX.Element;
|
|
9
|
+
//#endregion
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { join as e } from "../styles/join.mjs";
|
|
2
|
+
import { Text as t } from "../Text/index.mjs";
|
|
3
|
+
import { root as n } from "./Heading.css.mjs";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/Heading/index.tsx
|
|
6
|
+
var i = {
|
|
7
|
+
h1: "2xl",
|
|
8
|
+
h2: "xl",
|
|
9
|
+
h3: "lg",
|
|
10
|
+
h4: "med",
|
|
11
|
+
h5: "sm",
|
|
12
|
+
h6: "sm"
|
|
13
|
+
};
|
|
14
|
+
function a({ as: a, size: o, font: s = "heading", weight: c = "semibold", leading: l = "sm", className: u, ...d }) {
|
|
15
|
+
let f = a ?? "h2";
|
|
16
|
+
return /* @__PURE__ */ r(t, {
|
|
17
|
+
...d,
|
|
18
|
+
as: f,
|
|
19
|
+
className: e(n, u),
|
|
20
|
+
font: s,
|
|
21
|
+
leading: l,
|
|
22
|
+
size: o ?? i[f],
|
|
23
|
+
weight: c
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { a as Heading };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer tokens, reset, atoms, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.stack, components.text, components.badge, components.button, components.chip, components.field, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.search-field, components.tabs, components.tag, components.toast;
|
|
2
|
+
@layer components.icon{.wz3ei00{flex-shrink:0}.wz3ei01{inline-size:var(--font-size-xs);block-size:var(--font-size-xs)}.wz3ei02{inline-size:var(--font-size-sm);block-size:var(--font-size-sm)}.wz3ei03{inline-size:var(--font-size-med);block-size:var(--font-size-med)}.wz3ei04{inline-size:var(--font-size-lg);block-size:var(--font-size-lg)}.wz3ei05{inline-size:var(--font-size-xl);block-size:var(--font-size-xl)}.wz3ei06{inline-size:var(--font-size-2xl);block-size:var(--font-size-2xl)}.wz3ei07{inline-size:var(--font-size-3xl);block-size:var(--font-size-3xl)}.wz3ei08{inline-size:var(--font-size-4xl);block-size:var(--font-size-4xl)}}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "../styles/layers.css";
|
|
2
|
+
import "./Icon.css";
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
//#region src/Icon/Icon.css.ts
|
|
6
|
+
var e = "wz3ei00", t = {
|
|
7
|
+
xs: "wz3ei01",
|
|
8
|
+
sm: "wz3ei02",
|
|
9
|
+
med: "wz3ei03",
|
|
10
|
+
lg: "wz3ei04",
|
|
11
|
+
xl: "wz3ei05",
|
|
12
|
+
"2xl": "wz3ei06",
|
|
13
|
+
"3xl": "wz3ei07",
|
|
14
|
+
"4xl": "wz3ei08"
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { e as root, t as size };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Sprinkles } from "../styles/atoms.css.mjs";
|
|
2
|
+
import { tokens } from "../tokens/scales.mjs";
|
|
3
|
+
import { ComponentPropsWithRef } from "react";
|
|
4
|
+
//#region src/Icon/index.d.ts
|
|
5
|
+
export type IconProps = Omit<ComponentPropsWithRef<"svg">, "color" | "strokeWidth" | "width" | "height"> & {
|
|
6
|
+
color?: Sprinkles["color"];
|
|
7
|
+
label?: string;
|
|
8
|
+
size?: keyof typeof tokens.fontSize;
|
|
9
|
+
strokeWidth?: number;
|
|
10
|
+
};
|
|
11
|
+
export declare function Icon({ size, color, label, strokeWidth, viewBox, className, "aria-label": ariaLabel, "aria-labelledby": labelledBy, ...props }: IconProps): import("react").JSX.Element;
|
|
12
|
+
//#endregion
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { sprinkles as e } from "../styles/atoms.css.mjs";
|
|
2
|
+
import { join as t } from "../styles/join.mjs";
|
|
3
|
+
import { root as n, size as r } from "./Icon.css.mjs";
|
|
4
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
+
//#region src/Icon/index.tsx
|
|
6
|
+
function a({ size: a = "med", color: o, label: s, strokeWidth: c = 2, viewBox: l = "0 0 24 24", className: u, "aria-label": d, "aria-labelledby": f, ...p }) {
|
|
7
|
+
let m = s || d || void 0, h = !!(m || f);
|
|
8
|
+
return /* @__PURE__ */ i("svg", {
|
|
9
|
+
fill: "none",
|
|
10
|
+
stroke: "currentColor",
|
|
11
|
+
strokeLinecap: "round",
|
|
12
|
+
strokeLinejoin: "round",
|
|
13
|
+
strokeWidth: c,
|
|
14
|
+
viewBox: l,
|
|
15
|
+
...p,
|
|
16
|
+
"aria-hidden": !h || void 0,
|
|
17
|
+
"aria-label": m,
|
|
18
|
+
"aria-labelledby": s ? void 0 : f,
|
|
19
|
+
className: t(n, r[a], o && e({ color: o }), u),
|
|
20
|
+
role: h ? "img" : void 0
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { a as Icon };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer tokens, reset, atoms, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.stack, components.text, components.badge, components.button, components.chip, components.field, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.search-field, components.tabs, components.tag, components.toast;
|
|
2
|
+
@layer components.icon-button{.n2fy8x0{border-width:var(--space-1);border-style:solid}.n2fy8x0[aria-disabled=true]{background-color:var(--color-bg-muted);border-color:var(--color-border-strong);color:var(--color-fg-muted);border-style:dashed}.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true])[aria-expanded=true]{background-image:linear-gradient(color-mix(in srgb, var(--color-fg) 15%, transparent), color-mix(in srgb, var(--color-fg) 15%, transparent));box-shadow:inset 0 0 0 var(--space-1) currentColor}.n2fy8x2{border-color:#0000}.n2fy8x3{border-color:var(--color-border-strong)}@media (hover:hover){.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true]):hover{background-image:linear-gradient(color-mix(in srgb, var(--color-fg) 15%, transparent), color-mix(in srgb, var(--color-fg) 15%, transparent))}}@media (forced-colors:active){.n2fy8x0{forced-color-adjust:none}.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true]):hover{background-image:none}.n2fy8x0[aria-disabled=true]{color:graytext;border-color:graytext}.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true])[aria-expanded=true]{background-image:none}}}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "../styles/layers.css";
|
|
2
|
+
import "./IconButton.css";
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { createRuntimeFn as e } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
6
|
+
//#region src/IconButton/IconButton.css.ts
|
|
7
|
+
var t = "n2fy8x0", n = e({
|
|
8
|
+
defaultClassName: "n2fy8x1",
|
|
9
|
+
variantClassNames: {
|
|
10
|
+
variant: {
|
|
11
|
+
primary: "n2fy8x2",
|
|
12
|
+
secondary: "n2fy8x3"
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
sm: "n2fy8x4",
|
|
16
|
+
med: "n2fy8x5",
|
|
17
|
+
lg: "n2fy8x6"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {},
|
|
21
|
+
compoundVariants: []
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
export { n as iconButton, t as root };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PolymorphicProps } from "../types.mjs";
|
|
2
|
+
import { StyleProps } from "../Box/index.mjs";
|
|
3
|
+
import { ClickableOwnProps } from "../Clickable/index.mjs";
|
|
4
|
+
import { IconProps } from "../Icon/index.mjs";
|
|
5
|
+
import { ComponentType, ElementType } from "react";
|
|
6
|
+
//#region src/IconButton/index.d.ts
|
|
7
|
+
export type IconButtonOwnProps = {
|
|
8
|
+
icon: ComponentType<IconProps>;
|
|
9
|
+
label: string;
|
|
10
|
+
size?: "sm" | "med" | "lg";
|
|
11
|
+
variant?: "primary" | "secondary";
|
|
12
|
+
};
|
|
13
|
+
export type IconButtonProps<T extends ElementType = "button"> = PolymorphicProps<T, StyleProps & IconButtonOwnProps & Omit<ClickableOwnProps, "busy">, "busy" | "aria-disabled" | "aria-busy" | "aria-label" | "aria-labelledby" | "children">;
|
|
14
|
+
export declare function IconButton<T extends ElementType = "button">({ label, icon: IconComponent, variant, size, minInlineSize, minBlockSize, borderRadius, backgroundColor, color, className, ...props }: IconButtonProps<T>): import("react").JSX.Element;
|
|
15
|
+
//#endregion
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { join as e } from "../styles/join.mjs";
|
|
2
|
+
import { Clickable as t } from "../Clickable/index.mjs";
|
|
3
|
+
import { fills as n } from "../styles/button-fills.mjs";
|
|
4
|
+
import { iconButton as r, root as i } from "./IconButton.css.mjs";
|
|
5
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
6
|
+
//#region src/IconButton/index.tsx
|
|
7
|
+
function o({ label: o, icon: s, variant: c = "secondary", size: l = "med", minInlineSize: u = l, minBlockSize: d = l, borderRadius: f = "med", backgroundColor: p = n[c].backgroundColor, color: m = n[c].color, className: h, ...g }) {
|
|
8
|
+
return /* @__PURE__ */ a(t, {
|
|
9
|
+
...g,
|
|
10
|
+
"aria-label": o,
|
|
11
|
+
"aria-labelledby": void 0,
|
|
12
|
+
backgroundColor: p,
|
|
13
|
+
borderRadius: f,
|
|
14
|
+
className: e(i, r({
|
|
15
|
+
variant: c,
|
|
16
|
+
size: l
|
|
17
|
+
}), h),
|
|
18
|
+
color: m,
|
|
19
|
+
minBlockSize: d,
|
|
20
|
+
minInlineSize: u,
|
|
21
|
+
children: /* @__PURE__ */ a(s, { size: l })
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { o as IconButton };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer tokens, reset, atoms, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.stack, components.text, components.badge, components.button, components.chip, components.field, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.search-field, components.tabs, components.tag, components.toast;
|
|
2
|
+
@layer components.inline;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PolymorphicProps } from "../types.mjs";
|
|
2
|
+
import { StyleProps } from "../Box/index.mjs";
|
|
3
|
+
import { ElementType } from "react";
|
|
4
|
+
//#region src/Inline/index.d.ts
|
|
5
|
+
type Gap = StyleProps["gap"];
|
|
6
|
+
type Token = Extract<Gap, string>;
|
|
7
|
+
export type InlineProps<T extends ElementType = "div"> = PolymorphicProps<T, {
|
|
8
|
+
gap: Token | (Extract<Gap, object> & {
|
|
9
|
+
base: Token;
|
|
10
|
+
});
|
|
11
|
+
} & Omit<StyleProps, "gap">>;
|
|
12
|
+
export declare function Inline<T extends ElementType = "div">({ display, flexDirection, flexWrap, alignItems, className, ...props }: InlineProps<T>): import("react").JSX.Element;
|
|
13
|
+
//#endregion
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { join as e } from "../styles/join.mjs";
|
|
2
|
+
import { Box as t } from "../Box/index.mjs";
|
|
3
|
+
import { root as n } from "./Inline.css.mjs";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/Inline/index.tsx
|
|
6
|
+
function i({ display: i = "flex", flexDirection: a = "row", flexWrap: o = "wrap", alignItems: s = "center", className: c, ...l }) {
|
|
7
|
+
return /* @__PURE__ */ r(t, {
|
|
8
|
+
alignItems: s,
|
|
9
|
+
display: i,
|
|
10
|
+
flexDirection: a,
|
|
11
|
+
flexWrap: o,
|
|
12
|
+
...l,
|
|
13
|
+
className: e(n, c)
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { i as Inline };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer tokens, reset, atoms, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.stack, components.text, components.badge, components.button, components.chip, components.field, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.search-field, components.tabs, components.tag, components.toast;
|
|
2
|
+
@layer components.menu{._393eil0{border:var(--space-1) solid var(--color-border);transform-origin:var(--transform-origin);transition:opacity var(--duration-fast) var(--easing-standard), scale var(--duration-fast) var(--easing-enter)}._393eil0:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}._393eil0[data-starting-style],._393eil0[data-ending-style]{opacity:0;scale:calc(1 - var(--scale-med))}._393eil1{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}._393eil1:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}._393eil1[data-highlighted]{background-color:light-dark(var(--color-bg-muted),color-mix(in srgb, var(--color-fg) 10%, var(--color-bg-raised)))}._393eil1[aria-disabled=true]{color:var(--color-fg-muted);cursor:not-allowed}._393eil2{border-block-start:var(--space-1) solid var(--color-border)}@media (forced-colors:active){._393eil1[data-highlighted]{forced-color-adjust:none;color:highlighttext;background-color:highlight}._393eil1[aria-disabled=true]{color:graytext}}}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TriggerElementProps, TriggerLookProps } from "../popup/client.mjs";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import { Menu } from "@base-ui/react/menu";
|
|
4
|
+
//#region src/Menu/client.d.ts
|
|
5
|
+
type TriggerOwnProps = Omit<Menu.Trigger.Props, "render" | "className" | "style" | "nativeButton">;
|
|
6
|
+
export type MenuTriggerProps = TriggerOwnProps & TriggerLookProps & Omit<TriggerElementProps, keyof TriggerLookProps | keyof TriggerOwnProps>;
|
|
7
|
+
export declare function MenuTrigger({ disabled, openOnHover, delay, closeDelay, handle, payload, ...props }: MenuTriggerProps): import("react").JSX.Element;
|
|
8
|
+
//#endregion
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { triggerElement as e, usePopupScope as t } from "../popup/client.mjs";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { Menu as r } from "@base-ui/react/menu";
|
|
5
|
+
//#region src/Menu/client.tsx
|
|
6
|
+
function i({ disabled: i = !1, openOnHover: a, delay: o, closeDelay: s, handle: c, payload: l, ...u }) {
|
|
7
|
+
let { ref: d } = t();
|
|
8
|
+
return /* @__PURE__ */ n(r.Trigger, {
|
|
9
|
+
disabled: i,
|
|
10
|
+
openOnHover: a,
|
|
11
|
+
delay: o,
|
|
12
|
+
closeDelay: s,
|
|
13
|
+
handle: c,
|
|
14
|
+
payload: l,
|
|
15
|
+
ref: d,
|
|
16
|
+
render: e(u)
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function a({ children: e }) {
|
|
20
|
+
let { container: i } = t();
|
|
21
|
+
return /* @__PURE__ */ n(r.Portal, {
|
|
22
|
+
container: i,
|
|
23
|
+
children: e
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { a as MenuPortal, i as MenuTrigger };
|