@usememos/ui 26.10.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/README.md +117 -0
- package/dist/button.cjs +74 -0
- package/dist/button.d.cts +15 -0
- package/dist/button.d.ts +15 -0
- package/dist/button.js +7 -0
- package/dist/checkbox.cjs +98 -0
- package/dist/checkbox.d.cts +16 -0
- package/dist/checkbox.d.ts +16 -0
- package/dist/checkbox.js +7 -0
- package/dist/chunk-3DNMGJFC.js +216 -0
- package/dist/chunk-3VYNJ6UM.js +27 -0
- package/dist/chunk-3YY2G3JK.js +125 -0
- package/dist/chunk-5GQEJQKE.js +60 -0
- package/dist/chunk-6TNEFWVX.js +9 -0
- package/dist/chunk-BH4MPO4N.js +25 -0
- package/dist/chunk-F6GH4X7N.js +34 -0
- package/dist/chunk-HYN2P4OY.js +84 -0
- package/dist/chunk-OIUVLPTE.js +54 -0
- package/dist/chunk-S6LVYCE6.js +157 -0
- package/dist/chunk-SNSDJKJP.js +44 -0
- package/dist/chunk-WPO54YPG.js +328 -0
- package/dist/chunk-Z3ME5VRQ.js +98 -0
- package/dist/control-size-Bz2gyuyO.d.cts +3 -0
- package/dist/control-size-Bz2gyuyO.d.ts +3 -0
- package/dist/dialog.cjs +203 -0
- package/dist/dialog.d.cts +34 -0
- package/dist/dialog.d.ts +34 -0
- package/dist/dialog.js +8 -0
- package/dist/dropdown-menu.cjs +378 -0
- package/dist/dropdown-menu.d.cts +60 -0
- package/dist/dropdown-menu.d.ts +60 -0
- package/dist/dropdown-menu.js +8 -0
- package/dist/index.cjs +1223 -0
- package/dist/index.d.cts +21 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +48 -0
- package/dist/input.cjs +67 -0
- package/dist/input.d.cts +11 -0
- package/dist/input.d.ts +11 -0
- package/dist/input.js +7 -0
- package/dist/popover.cjs +175 -0
- package/dist/popover.d.cts +53 -0
- package/dist/popover.d.ts +53 -0
- package/dist/popover.js +8 -0
- package/dist/radio-group.cjs +122 -0
- package/dist/radio-group.d.cts +25 -0
- package/dist/radio-group.d.ts +25 -0
- package/dist/radio-group.js +7 -0
- package/dist/select.cjs +266 -0
- package/dist/select.d.cts +45 -0
- package/dist/select.d.ts +45 -0
- package/dist/select.js +8 -0
- package/dist/separator.cjs +82 -0
- package/dist/separator.d.cts +12 -0
- package/dist/separator.d.ts +12 -0
- package/dist/separator.js +7 -0
- package/dist/switch.cjs +92 -0
- package/dist/switch.d.cts +16 -0
- package/dist/switch.d.ts +16 -0
- package/dist/switch.js +7 -0
- package/dist/theme.css +1097 -0
- package/dist/tooltip.cjs +148 -0
- package/dist/tooltip.d.cts +24 -0
- package/dist/tooltip.d.ts +24 -0
- package/dist/tooltip.js +8 -0
- package/package.json +172 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useOverlayLayerProps
|
|
3
|
+
} from "./chunk-BH4MPO4N.js";
|
|
4
|
+
import {
|
|
5
|
+
cx
|
|
6
|
+
} from "./chunk-6TNEFWVX.js";
|
|
7
|
+
|
|
8
|
+
// src/overlay/popover.tsx
|
|
9
|
+
import * as React2 from "react";
|
|
10
|
+
|
|
11
|
+
// ../primitives/src/overlay/popover.tsx
|
|
12
|
+
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
13
|
+
import * as React from "react";
|
|
14
|
+
import { jsx } from "react/jsx-runtime";
|
|
15
|
+
var Root = (props) => {
|
|
16
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Root, { "data-scope": "popover", "data-part": "root", ...props });
|
|
17
|
+
};
|
|
18
|
+
var Trigger = React.forwardRef((props, ref) => {
|
|
19
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { ref, "data-scope": "popover", "data-part": "trigger", ...props });
|
|
20
|
+
});
|
|
21
|
+
var Portal = (props) => {
|
|
22
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { "data-scope": "popover", "data-part": "portal", ...props });
|
|
23
|
+
};
|
|
24
|
+
var Content = React.forwardRef(
|
|
25
|
+
({
|
|
26
|
+
className,
|
|
27
|
+
children,
|
|
28
|
+
finalFocus,
|
|
29
|
+
initialFocus,
|
|
30
|
+
align = "start",
|
|
31
|
+
collisionPadding = 8,
|
|
32
|
+
sideOffset = 4,
|
|
33
|
+
...props
|
|
34
|
+
}, ref) => {
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
PopoverPrimitive.Positioner,
|
|
37
|
+
{
|
|
38
|
+
"data-scope": "popover",
|
|
39
|
+
"data-part": "positioner",
|
|
40
|
+
align,
|
|
41
|
+
collisionPadding,
|
|
42
|
+
sideOffset,
|
|
43
|
+
...props,
|
|
44
|
+
children: /* @__PURE__ */ jsx(
|
|
45
|
+
PopoverPrimitive.Popup,
|
|
46
|
+
{
|
|
47
|
+
ref,
|
|
48
|
+
"data-scope": "popover",
|
|
49
|
+
"data-part": "content",
|
|
50
|
+
className,
|
|
51
|
+
finalFocus,
|
|
52
|
+
initialFocus,
|
|
53
|
+
children
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
Root.displayName = "Popover.Root";
|
|
61
|
+
Trigger.displayName = "Popover.Trigger";
|
|
62
|
+
Portal.displayName = "Popover.Portal";
|
|
63
|
+
Content.displayName = "Popover.Content";
|
|
64
|
+
var Popover = {
|
|
65
|
+
Root,
|
|
66
|
+
Trigger,
|
|
67
|
+
Portal,
|
|
68
|
+
Content
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// src/overlay/popover.tsx
|
|
72
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
73
|
+
function Root2(props) {
|
|
74
|
+
return /* @__PURE__ */ jsx2(
|
|
75
|
+
Popover.Root,
|
|
76
|
+
{
|
|
77
|
+
...props
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
var Trigger2 = React2.forwardRef(
|
|
82
|
+
(props, ref) => {
|
|
83
|
+
return /* @__PURE__ */ jsx2(
|
|
84
|
+
Popover.Trigger,
|
|
85
|
+
{
|
|
86
|
+
ref,
|
|
87
|
+
...props
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
function Portal2(props) {
|
|
93
|
+
return /* @__PURE__ */ jsx2(
|
|
94
|
+
Popover.Portal,
|
|
95
|
+
{
|
|
96
|
+
...props
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
function Content2({
|
|
101
|
+
className,
|
|
102
|
+
sideOffset = 4,
|
|
103
|
+
...props
|
|
104
|
+
}) {
|
|
105
|
+
const layerProps = useOverlayLayerProps(props);
|
|
106
|
+
return /* @__PURE__ */ jsx2(Popover.Portal, { children: /* @__PURE__ */ jsx2(
|
|
107
|
+
Popover.Content,
|
|
108
|
+
{
|
|
109
|
+
className: cx("mui-popover__content", className),
|
|
110
|
+
sideOffset,
|
|
111
|
+
...layerProps
|
|
112
|
+
}
|
|
113
|
+
) });
|
|
114
|
+
}
|
|
115
|
+
Trigger2.displayName = "Popover.Trigger";
|
|
116
|
+
var Popover2 = {
|
|
117
|
+
Root: Root2,
|
|
118
|
+
Trigger: Trigger2,
|
|
119
|
+
Portal: Portal2,
|
|
120
|
+
Content: Content2
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export {
|
|
124
|
+
Popover2 as Popover
|
|
125
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cx
|
|
3
|
+
} from "./chunk-6TNEFWVX.js";
|
|
4
|
+
|
|
5
|
+
// src/foundation/checkbox.tsx
|
|
6
|
+
import { CheckIcon } from "lucide-react";
|
|
7
|
+
|
|
8
|
+
// ../primitives/src/foundation/checkbox.tsx
|
|
9
|
+
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
var Root = React.forwardRef((props, ref) => {
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
CheckboxPrimitive.Root,
|
|
15
|
+
{
|
|
16
|
+
ref,
|
|
17
|
+
"data-scope": "checkbox",
|
|
18
|
+
"data-part": "root",
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
});
|
|
23
|
+
var Indicator = React.forwardRef((props, ref) => {
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
CheckboxPrimitive.Indicator,
|
|
26
|
+
{
|
|
27
|
+
ref,
|
|
28
|
+
"data-scope": "checkbox",
|
|
29
|
+
"data-part": "indicator",
|
|
30
|
+
...props
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
});
|
|
34
|
+
Root.displayName = "Checkbox.Root";
|
|
35
|
+
Indicator.displayName = "Checkbox.Indicator";
|
|
36
|
+
var Checkbox = {
|
|
37
|
+
Root,
|
|
38
|
+
Indicator
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// src/foundation/checkbox.tsx
|
|
42
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
43
|
+
function Checkbox2({ className, children, size = "md", ...props }) {
|
|
44
|
+
return /* @__PURE__ */ jsxs(
|
|
45
|
+
Checkbox.Root,
|
|
46
|
+
{
|
|
47
|
+
className: cx("mui-checkbox", className),
|
|
48
|
+
"data-size": size,
|
|
49
|
+
...props,
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ jsx2(Checkbox.Indicator, { className: "mui-checkbox__indicator", children: /* @__PURE__ */ jsx2(CheckIcon, { size: 10, strokeWidth: 3 }) }),
|
|
52
|
+
children
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export {
|
|
59
|
+
Checkbox2 as Checkbox
|
|
60
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/overlay/layer-context.tsx
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
var OverlayLayerContext = React.createContext("root");
|
|
5
|
+
function OverlayLayerProvider({
|
|
6
|
+
children,
|
|
7
|
+
value
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ jsx(OverlayLayerContext.Provider, { value, children });
|
|
10
|
+
}
|
|
11
|
+
function useOverlayLayerProps(props) {
|
|
12
|
+
const layer = React.useContext(OverlayLayerContext);
|
|
13
|
+
if (layer === "root") {
|
|
14
|
+
return props;
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
...props,
|
|
18
|
+
"data-mui-layer": layer
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
OverlayLayerProvider,
|
|
24
|
+
useOverlayLayerProps
|
|
25
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cx
|
|
3
|
+
} from "./chunk-6TNEFWVX.js";
|
|
4
|
+
|
|
5
|
+
// src/foundation/button.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
var Button = React.forwardRef(
|
|
9
|
+
({
|
|
10
|
+
className,
|
|
11
|
+
variant = "default",
|
|
12
|
+
size = "md",
|
|
13
|
+
disabled,
|
|
14
|
+
...props
|
|
15
|
+
}, ref) => {
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
"button",
|
|
18
|
+
{
|
|
19
|
+
ref,
|
|
20
|
+
className: cx("mui-button", className),
|
|
21
|
+
"data-size": size,
|
|
22
|
+
"data-variant": variant,
|
|
23
|
+
"data-disabled": disabled ? "" : void 0,
|
|
24
|
+
disabled,
|
|
25
|
+
...props
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
Button.displayName = "Button";
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
Button
|
|
34
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cx
|
|
3
|
+
} from "./chunk-6TNEFWVX.js";
|
|
4
|
+
|
|
5
|
+
// ../primitives/src/foundation/radio-group.tsx
|
|
6
|
+
import { Radio } from "@base-ui/react/radio";
|
|
7
|
+
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var Root = React.forwardRef((props, ref) => {
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
RadioGroupPrimitive,
|
|
13
|
+
{
|
|
14
|
+
ref,
|
|
15
|
+
"data-scope": "radio-group",
|
|
16
|
+
"data-part": "root",
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
});
|
|
21
|
+
var Item = React.forwardRef((props, ref) => {
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
Radio.Root,
|
|
24
|
+
{
|
|
25
|
+
ref,
|
|
26
|
+
"data-scope": "radio-group",
|
|
27
|
+
"data-part": "item",
|
|
28
|
+
...props
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
var Indicator = React.forwardRef((props, ref) => {
|
|
33
|
+
return /* @__PURE__ */ jsx(
|
|
34
|
+
Radio.Indicator,
|
|
35
|
+
{
|
|
36
|
+
ref,
|
|
37
|
+
"data-scope": "radio-group",
|
|
38
|
+
"data-part": "indicator",
|
|
39
|
+
...props
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
Root.displayName = "RadioGroup.Root";
|
|
44
|
+
Item.displayName = "RadioGroup.Item";
|
|
45
|
+
Indicator.displayName = "RadioGroup.Indicator";
|
|
46
|
+
var RadioGroupPrimitiveParts = {
|
|
47
|
+
Root,
|
|
48
|
+
Item,
|
|
49
|
+
Indicator
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// src/foundation/radio-group.tsx
|
|
53
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
54
|
+
function Root2({ className, ...props }) {
|
|
55
|
+
return /* @__PURE__ */ jsx2(
|
|
56
|
+
RadioGroupPrimitiveParts.Root,
|
|
57
|
+
{
|
|
58
|
+
className: cx("mui-radio-group", className),
|
|
59
|
+
...props
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
function Item2({ className, children, size = "md", ...props }) {
|
|
64
|
+
return /* @__PURE__ */ jsxs(
|
|
65
|
+
RadioGroupPrimitiveParts.Item,
|
|
66
|
+
{
|
|
67
|
+
className: cx("mui-radio-group__item", className),
|
|
68
|
+
"data-size": size,
|
|
69
|
+
...props,
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsx2(RadioGroupPrimitiveParts.Indicator, { className: "mui-radio-group__indicator" }),
|
|
72
|
+
children
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
var RadioGroup = {
|
|
78
|
+
Root: Root2,
|
|
79
|
+
Item: Item2
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export {
|
|
83
|
+
RadioGroup
|
|
84
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cx
|
|
3
|
+
} from "./chunk-6TNEFWVX.js";
|
|
4
|
+
|
|
5
|
+
// ../primitives/src/foundation/switch.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var Root = React.forwardRef((props, ref) => {
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
SwitchPrimitive.Root,
|
|
12
|
+
{
|
|
13
|
+
ref,
|
|
14
|
+
"data-scope": "switch",
|
|
15
|
+
"data-part": "root",
|
|
16
|
+
...props
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
});
|
|
20
|
+
var Thumb = React.forwardRef((props, ref) => {
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
SwitchPrimitive.Thumb,
|
|
23
|
+
{
|
|
24
|
+
ref,
|
|
25
|
+
"data-scope": "switch",
|
|
26
|
+
"data-part": "thumb",
|
|
27
|
+
...props
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
});
|
|
31
|
+
Root.displayName = "Switch.Root";
|
|
32
|
+
Thumb.displayName = "Switch.Thumb";
|
|
33
|
+
var Switch = {
|
|
34
|
+
Root,
|
|
35
|
+
Thumb
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// src/foundation/switch.tsx
|
|
39
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
40
|
+
function Switch2({ className, size = "md", ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsx2(
|
|
42
|
+
Switch.Root,
|
|
43
|
+
{
|
|
44
|
+
className: cx("mui-switch", className),
|
|
45
|
+
"data-size": size,
|
|
46
|
+
...props,
|
|
47
|
+
children: /* @__PURE__ */ jsx2(Switch.Thumb, { className: "mui-switch__thumb" })
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
Switch2 as Switch
|
|
54
|
+
};
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OverlayLayerProvider
|
|
3
|
+
} from "./chunk-BH4MPO4N.js";
|
|
4
|
+
import {
|
|
5
|
+
cx
|
|
6
|
+
} from "./chunk-6TNEFWVX.js";
|
|
7
|
+
|
|
8
|
+
// src/overlay/dialog.tsx
|
|
9
|
+
import { XIcon } from "lucide-react";
|
|
10
|
+
import * as React2 from "react";
|
|
11
|
+
|
|
12
|
+
// ../primitives/src/overlay/dialog.tsx
|
|
13
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
14
|
+
import * as React from "react";
|
|
15
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
|
+
var Root = (props) => {
|
|
17
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-scope": "dialog", "data-part": "root", ...props });
|
|
18
|
+
};
|
|
19
|
+
var Trigger = React.forwardRef((props, ref) => {
|
|
20
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ref, "data-scope": "dialog", "data-part": "trigger", ...props });
|
|
21
|
+
});
|
|
22
|
+
var Portal = (props) => {
|
|
23
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-scope": "dialog", "data-part": "portal", ...props });
|
|
24
|
+
};
|
|
25
|
+
var Overlay = React.forwardRef((props, ref) => {
|
|
26
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Backdrop, { ref, "data-scope": "dialog", "data-part": "overlay", ...props });
|
|
27
|
+
});
|
|
28
|
+
var Content = React.forwardRef((props, ref) => {
|
|
29
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Popup, { ref, "data-scope": "dialog", "data-part": "content", ...props });
|
|
30
|
+
});
|
|
31
|
+
var Close = React.forwardRef((props, ref) => {
|
|
32
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ref, "data-scope": "dialog", "data-part": "close", ...props });
|
|
33
|
+
});
|
|
34
|
+
var Title = React.forwardRef((props, ref) => {
|
|
35
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ref, "data-scope": "dialog", "data-part": "title", ...props });
|
|
36
|
+
});
|
|
37
|
+
var Description = React.forwardRef((props, ref) => {
|
|
38
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ref, "data-scope": "dialog", "data-part": "description", ...props });
|
|
39
|
+
});
|
|
40
|
+
Root.displayName = "Dialog.Root";
|
|
41
|
+
Trigger.displayName = "Dialog.Trigger";
|
|
42
|
+
Portal.displayName = "Dialog.Portal";
|
|
43
|
+
Overlay.displayName = "Dialog.Overlay";
|
|
44
|
+
Content.displayName = "Dialog.Content";
|
|
45
|
+
Close.displayName = "Dialog.Close";
|
|
46
|
+
Title.displayName = "Dialog.Title";
|
|
47
|
+
Description.displayName = "Dialog.Description";
|
|
48
|
+
var Dialog = {
|
|
49
|
+
Root,
|
|
50
|
+
Trigger,
|
|
51
|
+
Portal,
|
|
52
|
+
Overlay,
|
|
53
|
+
Content,
|
|
54
|
+
Close,
|
|
55
|
+
Title,
|
|
56
|
+
Description
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// src/overlay/dialog.tsx
|
|
60
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
61
|
+
var Root2 = Dialog.Root;
|
|
62
|
+
var Trigger2 = Dialog.Trigger;
|
|
63
|
+
var Portal2 = Dialog.Portal;
|
|
64
|
+
var Overlay2 = React2.forwardRef(({ className, ...props }, ref) => {
|
|
65
|
+
return /* @__PURE__ */ jsx2(
|
|
66
|
+
Dialog.Overlay,
|
|
67
|
+
{
|
|
68
|
+
ref,
|
|
69
|
+
className: cx("mui-dialog__overlay", className),
|
|
70
|
+
...props
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
});
|
|
74
|
+
var Close2 = React2.forwardRef(({ className, children, ...props }, ref) => {
|
|
75
|
+
return /* @__PURE__ */ jsxs(
|
|
76
|
+
Dialog.Close,
|
|
77
|
+
{
|
|
78
|
+
ref,
|
|
79
|
+
className: cx("mui-dialog__close", className),
|
|
80
|
+
...props,
|
|
81
|
+
children: [
|
|
82
|
+
children ?? /* @__PURE__ */ jsx2(XIcon, { size: 14, "aria-hidden": "true" }),
|
|
83
|
+
/* @__PURE__ */ jsx2("span", { className: "sr-only", children: "Close" })
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
});
|
|
88
|
+
var Content2 = React2.forwardRef(({ className, children, showCloseButton = true, slotProps, ...props }, ref) => {
|
|
89
|
+
const closeProps = {
|
|
90
|
+
"aria-label": "Close dialog",
|
|
91
|
+
...slotProps?.close
|
|
92
|
+
};
|
|
93
|
+
return /* @__PURE__ */ jsxs(Portal2, { children: [
|
|
94
|
+
/* @__PURE__ */ jsx2(Overlay2, {}),
|
|
95
|
+
/* @__PURE__ */ jsx2(
|
|
96
|
+
Dialog.Content,
|
|
97
|
+
{
|
|
98
|
+
ref,
|
|
99
|
+
className: cx("mui-dialog__content", className),
|
|
100
|
+
...props,
|
|
101
|
+
children: /* @__PURE__ */ jsxs(OverlayLayerProvider, { value: "modal", children: [
|
|
102
|
+
children,
|
|
103
|
+
showCloseButton ? /* @__PURE__ */ jsx2(Close2, { ...closeProps }) : null
|
|
104
|
+
] })
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
] });
|
|
108
|
+
});
|
|
109
|
+
var Header = React2.forwardRef(
|
|
110
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx2("div", { ref, className: cx("mui-dialog__header", className), ...props })
|
|
111
|
+
);
|
|
112
|
+
var Footer = React2.forwardRef(
|
|
113
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx2("div", { ref, className: cx("mui-dialog__footer", className), ...props })
|
|
114
|
+
);
|
|
115
|
+
var Title2 = React2.forwardRef(({ className, ...props }, ref) => {
|
|
116
|
+
return /* @__PURE__ */ jsx2(
|
|
117
|
+
Dialog.Title,
|
|
118
|
+
{
|
|
119
|
+
ref,
|
|
120
|
+
className: cx("mui-dialog__title", className),
|
|
121
|
+
...props
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
});
|
|
125
|
+
var Description2 = React2.forwardRef(({ className, ...props }, ref) => {
|
|
126
|
+
return /* @__PURE__ */ jsx2(
|
|
127
|
+
Dialog.Description,
|
|
128
|
+
{
|
|
129
|
+
ref,
|
|
130
|
+
className: cx("mui-dialog__description", className),
|
|
131
|
+
...props
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
});
|
|
135
|
+
Header.displayName = "Dialog.Header";
|
|
136
|
+
Footer.displayName = "Dialog.Footer";
|
|
137
|
+
Title2.displayName = "Dialog.Title";
|
|
138
|
+
Description2.displayName = "Dialog.Description";
|
|
139
|
+
Close2.displayName = "Dialog.Close";
|
|
140
|
+
Content2.displayName = "Dialog.Content";
|
|
141
|
+
Overlay2.displayName = "Dialog.Overlay";
|
|
142
|
+
var Dialog2 = {
|
|
143
|
+
Root: Root2,
|
|
144
|
+
Trigger: Trigger2,
|
|
145
|
+
Portal: Portal2,
|
|
146
|
+
Overlay: Overlay2,
|
|
147
|
+
Content: Content2,
|
|
148
|
+
Close: Close2,
|
|
149
|
+
Header,
|
|
150
|
+
Footer,
|
|
151
|
+
Title: Title2,
|
|
152
|
+
Description: Description2
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export {
|
|
156
|
+
Dialog2 as Dialog
|
|
157
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cx
|
|
3
|
+
} from "./chunk-6TNEFWVX.js";
|
|
4
|
+
|
|
5
|
+
// ../primitives/src/foundation/separator.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var Root = React.forwardRef((props, ref) => {
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
SeparatorPrimitive,
|
|
12
|
+
{
|
|
13
|
+
ref,
|
|
14
|
+
"data-scope": "separator",
|
|
15
|
+
"data-part": "root",
|
|
16
|
+
...props
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
});
|
|
20
|
+
Root.displayName = "Separator.Root";
|
|
21
|
+
var Separator = {
|
|
22
|
+
Root
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// src/foundation/separator.tsx
|
|
26
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
27
|
+
function Separator2({
|
|
28
|
+
className,
|
|
29
|
+
orientation = "horizontal",
|
|
30
|
+
...props
|
|
31
|
+
}) {
|
|
32
|
+
return /* @__PURE__ */ jsx2(
|
|
33
|
+
Separator.Root,
|
|
34
|
+
{
|
|
35
|
+
className: cx("mui-separator", className),
|
|
36
|
+
orientation,
|
|
37
|
+
...props
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
Separator2 as Separator
|
|
44
|
+
};
|