strata-ui-react 0.1.10 → 0.1.12
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/avatar-fallback.cjs +42 -0
- package/dist/avatar-fallback.js +42 -0
- package/dist/avatar-image.cjs +42 -0
- package/dist/avatar-image.js +42 -0
- package/dist/avatar.cjs +47 -0
- package/dist/avatar.js +47 -0
- package/dist/badge.cjs +63 -0
- package/dist/badge.js +63 -0
- package/dist/badge.types.cjs +100 -0
- package/dist/badge.types.js +100 -0
- package/dist/button.cjs +58 -0
- package/dist/button.js +58 -0
- package/dist/button.types.cjs +519 -0
- package/dist/button.types.js +519 -0
- package/dist/checkbox-indicator.cjs +36 -0
- package/dist/checkbox-indicator.js +36 -0
- package/dist/checkbox.cjs +84 -0
- package/dist/checkbox.js +84 -0
- package/dist/cn.cjs +6 -0
- package/dist/cn.js +6 -0
- package/dist/dialog-close.cjs +57 -0
- package/dist/dialog-close.js +57 -0
- package/dist/dialog-description.cjs +46 -0
- package/dist/dialog-description.js +46 -0
- package/dist/dialog-popup.cjs +72 -0
- package/dist/dialog-popup.js +72 -0
- package/dist/dialog-title.cjs +46 -0
- package/dist/dialog-title.js +46 -0
- package/dist/dialog-trigger.cjs +46 -0
- package/dist/dialog-trigger.js +46 -0
- package/dist/dialog.cjs +20 -0
- package/dist/dialog.js +20 -0
- package/dist/field-errors.cjs +63 -0
- package/dist/field-errors.js +63 -0
- package/dist/field-input.cjs +80 -0
- package/dist/field-input.js +80 -0
- package/dist/form-errors.cjs +73 -0
- package/dist/form-errors.js +73 -0
- package/dist/form-submit.cjs +65 -0
- package/dist/form-submit.js +65 -0
- package/dist/form.cjs +19 -0
- package/dist/form.js +19 -0
- package/dist/form.types.cjs +6 -0
- package/dist/form.types.js +3 -0
- package/dist/index.cjs +82 -0
- package/dist/index.d.cts +312 -0
- package/dist/index.d.ts +312 -1
- package/dist/index.js +42 -0
- package/dist/input.cjs +83 -0
- package/dist/input.js +83 -0
- package/dist/label.cjs +46 -0
- package/dist/label.js +46 -0
- package/dist/profile.cjs +127 -0
- package/dist/profile.js +127 -0
- package/dist/scroll-area.cjs +97 -0
- package/dist/scroll-area.js +97 -0
- package/dist/separator.cjs +45 -0
- package/dist/separator.js +45 -0
- package/dist/slider-handle.cjs +34 -0
- package/dist/slider-handle.js +34 -0
- package/dist/slider-segment.cjs +17 -0
- package/dist/slider-segment.js +17 -0
- package/dist/slider-tick-label.cjs +12 -0
- package/dist/slider-tick-label.js +12 -0
- package/dist/slider-tick.cjs +13 -0
- package/dist/slider-tick.js +13 -0
- package/dist/slider-track.cjs +12 -0
- package/dist/slider-track.js +12 -0
- package/dist/slider.cjs +69 -0
- package/dist/slider.js +69 -0
- package/dist/switch.cjs +71 -0
- package/dist/switch.js +71 -0
- package/dist/tabs-indicator.cjs +57 -0
- package/dist/tabs-indicator.js +57 -0
- package/dist/tabs-list.cjs +57 -0
- package/dist/tabs-list.js +57 -0
- package/dist/tabs-panel.cjs +40 -0
- package/dist/tabs-panel.js +40 -0
- package/dist/tabs-tab.cjs +36 -0
- package/dist/tabs-tab.js +36 -0
- package/dist/tabs.cjs +73 -0
- package/dist/tabs.js +73 -0
- package/dist/tabs.types.cjs +4 -0
- package/dist/tabs.types.js +4 -0
- package/dist/toast-provider.cjs +86 -0
- package/dist/toast-provider.js +86 -0
- package/dist/toast.cjs +40 -0
- package/dist/toast.js +40 -0
- package/dist/tooltip-context.cjs +56 -0
- package/dist/tooltip-context.js +56 -0
- package/dist/tooltip-trigger.cjs +29 -0
- package/dist/tooltip-trigger.js +29 -0
- package/dist/tooltip.cjs +29 -0
- package/dist/tooltip.js +29 -0
- package/package.json +18 -10
- package/dist/strata-ui-react.js +0 -13543
- package/dist/strata-ui-react.umd.cjs +0 -24
package/dist/checkbox.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { cn } from "./cn.js";
|
|
2
|
+
import { CheckboxIndicator } from "./checkbox-indicator.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Checkbox } from "@base-ui/react/checkbox";
|
|
6
|
+
import { CheckIcon } from "@phosphor-icons/react";
|
|
7
|
+
const Checkbox$1 = (t0) => {
|
|
8
|
+
const $ = c(23);
|
|
9
|
+
let className;
|
|
10
|
+
let disabled;
|
|
11
|
+
let id;
|
|
12
|
+
let label;
|
|
13
|
+
let props;
|
|
14
|
+
let ref;
|
|
15
|
+
if ($[0] !== t0) {
|
|
16
|
+
({className, ref, label, id, disabled, ...props} = t0);
|
|
17
|
+
$[0] = t0;
|
|
18
|
+
$[1] = className;
|
|
19
|
+
$[2] = disabled;
|
|
20
|
+
$[3] = id;
|
|
21
|
+
$[4] = label;
|
|
22
|
+
$[5] = props;
|
|
23
|
+
$[6] = ref;
|
|
24
|
+
} else {
|
|
25
|
+
className = $[1];
|
|
26
|
+
disabled = $[2];
|
|
27
|
+
id = $[3];
|
|
28
|
+
label = $[4];
|
|
29
|
+
props = $[5];
|
|
30
|
+
ref = $[6];
|
|
31
|
+
}
|
|
32
|
+
let t1;
|
|
33
|
+
if ($[7] !== className) {
|
|
34
|
+
t1 = cn("flex size-md items-center text-on-accent justify-center rounded-sm bg-surface-dim inset-shadow-1-shadow data-checked:bg-accent data-checked:raised-1 hover:cursor-pointer transition-colors hover:disabled:cursor-not-allowed", className);
|
|
35
|
+
$[7] = className;
|
|
36
|
+
$[8] = t1;
|
|
37
|
+
} else t1 = $[8];
|
|
38
|
+
let t2;
|
|
39
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
40
|
+
t2 = /* @__PURE__ */ jsx(CheckboxIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { weight: "bold" }) });
|
|
41
|
+
$[9] = t2;
|
|
42
|
+
} else t2 = $[9];
|
|
43
|
+
let t3;
|
|
44
|
+
if ($[10] !== disabled || $[11] !== id || $[12] !== props || $[13] !== ref || $[14] !== t1) {
|
|
45
|
+
t3 = /* @__PURE__ */ jsx(Checkbox.Root, {
|
|
46
|
+
id,
|
|
47
|
+
disabled,
|
|
48
|
+
className: t1,
|
|
49
|
+
ref,
|
|
50
|
+
...props,
|
|
51
|
+
children: t2
|
|
52
|
+
});
|
|
53
|
+
$[10] = disabled;
|
|
54
|
+
$[11] = id;
|
|
55
|
+
$[12] = props;
|
|
56
|
+
$[13] = ref;
|
|
57
|
+
$[14] = t1;
|
|
58
|
+
$[15] = t3;
|
|
59
|
+
} else t3 = $[15];
|
|
60
|
+
let t4;
|
|
61
|
+
if ($[16] !== disabled || $[17] !== id || $[18] !== label) {
|
|
62
|
+
t4 = label && /* @__PURE__ */ jsx("label", {
|
|
63
|
+
htmlFor: id,
|
|
64
|
+
className: cn("body-base cursor-pointer", disabled && "text-text-neutral-primary-disabled cursor-not-allowed"),
|
|
65
|
+
children: label
|
|
66
|
+
});
|
|
67
|
+
$[16] = disabled;
|
|
68
|
+
$[17] = id;
|
|
69
|
+
$[18] = label;
|
|
70
|
+
$[19] = t4;
|
|
71
|
+
} else t4 = $[19];
|
|
72
|
+
let t5;
|
|
73
|
+
if ($[20] !== t3 || $[21] !== t4) {
|
|
74
|
+
t5 = /* @__PURE__ */ jsxs("div", {
|
|
75
|
+
className: "flex items-center gap-2",
|
|
76
|
+
children: [t3, t4]
|
|
77
|
+
});
|
|
78
|
+
$[20] = t3;
|
|
79
|
+
$[21] = t4;
|
|
80
|
+
$[22] = t5;
|
|
81
|
+
} else t5 = $[22];
|
|
82
|
+
return t5;
|
|
83
|
+
};
|
|
84
|
+
export { Checkbox$1 as Checkbox };
|
package/dist/cn.cjs
ADDED
package/dist/cn.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const require_cn = require("./cn.cjs");
|
|
2
|
+
const require_button = require("./button.cjs");
|
|
3
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let __base_ui_react_dialog = require("@base-ui/react/dialog");
|
|
6
|
+
const DialogClose = (t0) => {
|
|
7
|
+
const $ = (0, react_compiler_runtime.c)(13);
|
|
8
|
+
let children;
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
let ref;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({className, children, ref, ...props} = t0);
|
|
14
|
+
$[0] = t0;
|
|
15
|
+
$[1] = children;
|
|
16
|
+
$[2] = className;
|
|
17
|
+
$[3] = props;
|
|
18
|
+
$[4] = ref;
|
|
19
|
+
} else {
|
|
20
|
+
children = $[1];
|
|
21
|
+
className = $[2];
|
|
22
|
+
props = $[3];
|
|
23
|
+
ref = $[4];
|
|
24
|
+
}
|
|
25
|
+
let t1;
|
|
26
|
+
if ($[5] !== className) {
|
|
27
|
+
t1 = require_cn.cn("", className);
|
|
28
|
+
$[5] = className;
|
|
29
|
+
$[6] = t1;
|
|
30
|
+
} else t1 = $[6];
|
|
31
|
+
let t2;
|
|
32
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
33
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_button.Button, {
|
|
34
|
+
style: "ghost",
|
|
35
|
+
tone: "neutral",
|
|
36
|
+
children: "Close"
|
|
37
|
+
});
|
|
38
|
+
$[7] = t2;
|
|
39
|
+
} else t2 = $[7];
|
|
40
|
+
let t3;
|
|
41
|
+
if ($[8] !== children || $[9] !== props || $[10] !== ref || $[11] !== t1) {
|
|
42
|
+
t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__base_ui_react_dialog.Dialog.Close, {
|
|
43
|
+
className: t1,
|
|
44
|
+
ref,
|
|
45
|
+
...props,
|
|
46
|
+
render: t2,
|
|
47
|
+
children
|
|
48
|
+
});
|
|
49
|
+
$[8] = children;
|
|
50
|
+
$[9] = props;
|
|
51
|
+
$[10] = ref;
|
|
52
|
+
$[11] = t1;
|
|
53
|
+
$[12] = t3;
|
|
54
|
+
} else t3 = $[12];
|
|
55
|
+
return t3;
|
|
56
|
+
};
|
|
57
|
+
exports.DialogClose = DialogClose;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { cn } from "./cn.js";
|
|
2
|
+
import { Button } from "./button.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
6
|
+
const DialogClose = (t0) => {
|
|
7
|
+
const $ = c(13);
|
|
8
|
+
let children;
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
let ref;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({className, children, ref, ...props} = t0);
|
|
14
|
+
$[0] = t0;
|
|
15
|
+
$[1] = children;
|
|
16
|
+
$[2] = className;
|
|
17
|
+
$[3] = props;
|
|
18
|
+
$[4] = ref;
|
|
19
|
+
} else {
|
|
20
|
+
children = $[1];
|
|
21
|
+
className = $[2];
|
|
22
|
+
props = $[3];
|
|
23
|
+
ref = $[4];
|
|
24
|
+
}
|
|
25
|
+
let t1;
|
|
26
|
+
if ($[5] !== className) {
|
|
27
|
+
t1 = cn("", className);
|
|
28
|
+
$[5] = className;
|
|
29
|
+
$[6] = t1;
|
|
30
|
+
} else t1 = $[6];
|
|
31
|
+
let t2;
|
|
32
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
33
|
+
t2 = /* @__PURE__ */ jsx(Button, {
|
|
34
|
+
style: "ghost",
|
|
35
|
+
tone: "neutral",
|
|
36
|
+
children: "Close"
|
|
37
|
+
});
|
|
38
|
+
$[7] = t2;
|
|
39
|
+
} else t2 = $[7];
|
|
40
|
+
let t3;
|
|
41
|
+
if ($[8] !== children || $[9] !== props || $[10] !== ref || $[11] !== t1) {
|
|
42
|
+
t3 = /* @__PURE__ */ jsx(Dialog.Close, {
|
|
43
|
+
className: t1,
|
|
44
|
+
ref,
|
|
45
|
+
...props,
|
|
46
|
+
render: t2,
|
|
47
|
+
children
|
|
48
|
+
});
|
|
49
|
+
$[8] = children;
|
|
50
|
+
$[9] = props;
|
|
51
|
+
$[10] = ref;
|
|
52
|
+
$[11] = t1;
|
|
53
|
+
$[12] = t3;
|
|
54
|
+
} else t3 = $[12];
|
|
55
|
+
return t3;
|
|
56
|
+
};
|
|
57
|
+
export { DialogClose };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const require_cn = require("./cn.cjs");
|
|
2
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
let __base_ui_react_dialog = require("@base-ui/react/dialog");
|
|
5
|
+
const DialogDescription = (t0) => {
|
|
6
|
+
const $ = (0, react_compiler_runtime.c)(12);
|
|
7
|
+
let children;
|
|
8
|
+
let className;
|
|
9
|
+
let props;
|
|
10
|
+
let ref;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, children, ref, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = children;
|
|
15
|
+
$[2] = className;
|
|
16
|
+
$[3] = props;
|
|
17
|
+
$[4] = ref;
|
|
18
|
+
} else {
|
|
19
|
+
children = $[1];
|
|
20
|
+
className = $[2];
|
|
21
|
+
props = $[3];
|
|
22
|
+
ref = $[4];
|
|
23
|
+
}
|
|
24
|
+
let t1;
|
|
25
|
+
if ($[5] !== className) {
|
|
26
|
+
t1 = require_cn.cn("text-prose-0 mb-0", className);
|
|
27
|
+
$[5] = className;
|
|
28
|
+
$[6] = t1;
|
|
29
|
+
} else t1 = $[6];
|
|
30
|
+
let t2;
|
|
31
|
+
if ($[7] !== children || $[8] !== props || $[9] !== ref || $[10] !== t1) {
|
|
32
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__base_ui_react_dialog.Dialog.Description, {
|
|
33
|
+
className: t1,
|
|
34
|
+
ref,
|
|
35
|
+
...props,
|
|
36
|
+
children
|
|
37
|
+
});
|
|
38
|
+
$[7] = children;
|
|
39
|
+
$[8] = props;
|
|
40
|
+
$[9] = ref;
|
|
41
|
+
$[10] = t1;
|
|
42
|
+
$[11] = t2;
|
|
43
|
+
} else t2 = $[11];
|
|
44
|
+
return t2;
|
|
45
|
+
};
|
|
46
|
+
exports.DialogDescription = DialogDescription;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { cn } from "./cn.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
5
|
+
const DialogDescription = (t0) => {
|
|
6
|
+
const $ = c(12);
|
|
7
|
+
let children;
|
|
8
|
+
let className;
|
|
9
|
+
let props;
|
|
10
|
+
let ref;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, children, ref, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = children;
|
|
15
|
+
$[2] = className;
|
|
16
|
+
$[3] = props;
|
|
17
|
+
$[4] = ref;
|
|
18
|
+
} else {
|
|
19
|
+
children = $[1];
|
|
20
|
+
className = $[2];
|
|
21
|
+
props = $[3];
|
|
22
|
+
ref = $[4];
|
|
23
|
+
}
|
|
24
|
+
let t1;
|
|
25
|
+
if ($[5] !== className) {
|
|
26
|
+
t1 = cn("text-prose-0 mb-0", className);
|
|
27
|
+
$[5] = className;
|
|
28
|
+
$[6] = t1;
|
|
29
|
+
} else t1 = $[6];
|
|
30
|
+
let t2;
|
|
31
|
+
if ($[7] !== children || $[8] !== props || $[9] !== ref || $[10] !== t1) {
|
|
32
|
+
t2 = /* @__PURE__ */ jsx(Dialog.Description, {
|
|
33
|
+
className: t1,
|
|
34
|
+
ref,
|
|
35
|
+
...props,
|
|
36
|
+
children
|
|
37
|
+
});
|
|
38
|
+
$[7] = children;
|
|
39
|
+
$[8] = props;
|
|
40
|
+
$[9] = ref;
|
|
41
|
+
$[10] = t1;
|
|
42
|
+
$[11] = t2;
|
|
43
|
+
} else t2 = $[11];
|
|
44
|
+
return t2;
|
|
45
|
+
};
|
|
46
|
+
export { DialogDescription };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
const require_cn = require("./cn.cjs");
|
|
2
|
+
const require_dialog_close = require("./dialog-close.cjs");
|
|
3
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let __base_ui_react_dialog = require("@base-ui/react/dialog");
|
|
6
|
+
const DialogPopup = (t0) => {
|
|
7
|
+
const $ = (0, react_compiler_runtime.c)(19);
|
|
8
|
+
let children;
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
let ref;
|
|
12
|
+
let t1;
|
|
13
|
+
if ($[0] !== t0) {
|
|
14
|
+
({className, children, showCloseButton: t1, ref, ...props} = t0);
|
|
15
|
+
$[0] = t0;
|
|
16
|
+
$[1] = children;
|
|
17
|
+
$[2] = className;
|
|
18
|
+
$[3] = props;
|
|
19
|
+
$[4] = ref;
|
|
20
|
+
$[5] = t1;
|
|
21
|
+
} else {
|
|
22
|
+
children = $[1];
|
|
23
|
+
className = $[2];
|
|
24
|
+
props = $[3];
|
|
25
|
+
ref = $[4];
|
|
26
|
+
t1 = $[5];
|
|
27
|
+
}
|
|
28
|
+
const showCloseButton = t1 === void 0 ? true : t1;
|
|
29
|
+
let t2;
|
|
30
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
31
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__base_ui_react_dialog.Dialog.Backdrop, { className: "fixed inset-[0px] min-h-dvh bg-scrim opacity-50 transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-[-webkit-touch-callout:none]:absolute" });
|
|
32
|
+
$[6] = t2;
|
|
33
|
+
} else t2 = $[6];
|
|
34
|
+
let t3;
|
|
35
|
+
if ($[7] !== className) {
|
|
36
|
+
t3 = require_cn.cn("fixed top-1/2 left-1/2 min-w-1/3 max-w-[calc(100vw-3rem)] px-md py-sm space-y-2xs -translate-x-1/2 -translate-y-1/2 rounded-lg bg-surface-container outline-1 outline-outline transition-all duration-150 data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0", className);
|
|
37
|
+
$[7] = className;
|
|
38
|
+
$[8] = t3;
|
|
39
|
+
} else t3 = $[8];
|
|
40
|
+
let t4;
|
|
41
|
+
if ($[9] !== showCloseButton) {
|
|
42
|
+
t4 = showCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_dialog_close.DialogClose, {});
|
|
43
|
+
$[9] = showCloseButton;
|
|
44
|
+
$[10] = t4;
|
|
45
|
+
} else t4 = $[10];
|
|
46
|
+
let t5;
|
|
47
|
+
if ($[11] !== t4) {
|
|
48
|
+
t5 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
49
|
+
className: "flex justify-end",
|
|
50
|
+
children: t4
|
|
51
|
+
});
|
|
52
|
+
$[11] = t4;
|
|
53
|
+
$[12] = t5;
|
|
54
|
+
} else t5 = $[12];
|
|
55
|
+
let t6;
|
|
56
|
+
if ($[13] !== children || $[14] !== props || $[15] !== ref || $[16] !== t3 || $[17] !== t5) {
|
|
57
|
+
t6 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__base_ui_react_dialog.Dialog.Portal, { children: [t2, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__base_ui_react_dialog.Dialog.Popup, {
|
|
58
|
+
className: t3,
|
|
59
|
+
ref,
|
|
60
|
+
...props,
|
|
61
|
+
children: [children, t5]
|
|
62
|
+
})] });
|
|
63
|
+
$[13] = children;
|
|
64
|
+
$[14] = props;
|
|
65
|
+
$[15] = ref;
|
|
66
|
+
$[16] = t3;
|
|
67
|
+
$[17] = t5;
|
|
68
|
+
$[18] = t6;
|
|
69
|
+
} else t6 = $[18];
|
|
70
|
+
return t6;
|
|
71
|
+
};
|
|
72
|
+
exports.DialogPopup = DialogPopup;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { cn } from "./cn.js";
|
|
2
|
+
import { DialogClose } from "./dialog-close.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
6
|
+
const DialogPopup = (t0) => {
|
|
7
|
+
const $ = c(19);
|
|
8
|
+
let children;
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
let ref;
|
|
12
|
+
let t1;
|
|
13
|
+
if ($[0] !== t0) {
|
|
14
|
+
({className, children, showCloseButton: t1, ref, ...props} = t0);
|
|
15
|
+
$[0] = t0;
|
|
16
|
+
$[1] = children;
|
|
17
|
+
$[2] = className;
|
|
18
|
+
$[3] = props;
|
|
19
|
+
$[4] = ref;
|
|
20
|
+
$[5] = t1;
|
|
21
|
+
} else {
|
|
22
|
+
children = $[1];
|
|
23
|
+
className = $[2];
|
|
24
|
+
props = $[3];
|
|
25
|
+
ref = $[4];
|
|
26
|
+
t1 = $[5];
|
|
27
|
+
}
|
|
28
|
+
const showCloseButton = t1 === void 0 ? true : t1;
|
|
29
|
+
let t2;
|
|
30
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
31
|
+
t2 = /* @__PURE__ */ jsx(Dialog.Backdrop, { className: "fixed inset-[0px] min-h-dvh bg-scrim opacity-50 transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-[-webkit-touch-callout:none]:absolute" });
|
|
32
|
+
$[6] = t2;
|
|
33
|
+
} else t2 = $[6];
|
|
34
|
+
let t3;
|
|
35
|
+
if ($[7] !== className) {
|
|
36
|
+
t3 = cn("fixed top-1/2 left-1/2 min-w-1/3 max-w-[calc(100vw-3rem)] px-md py-sm space-y-2xs -translate-x-1/2 -translate-y-1/2 rounded-lg bg-surface-container outline-1 outline-outline transition-all duration-150 data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0", className);
|
|
37
|
+
$[7] = className;
|
|
38
|
+
$[8] = t3;
|
|
39
|
+
} else t3 = $[8];
|
|
40
|
+
let t4;
|
|
41
|
+
if ($[9] !== showCloseButton) {
|
|
42
|
+
t4 = showCloseButton && /* @__PURE__ */ jsx(DialogClose, {});
|
|
43
|
+
$[9] = showCloseButton;
|
|
44
|
+
$[10] = t4;
|
|
45
|
+
} else t4 = $[10];
|
|
46
|
+
let t5;
|
|
47
|
+
if ($[11] !== t4) {
|
|
48
|
+
t5 = /* @__PURE__ */ jsx("div", {
|
|
49
|
+
className: "flex justify-end",
|
|
50
|
+
children: t4
|
|
51
|
+
});
|
|
52
|
+
$[11] = t4;
|
|
53
|
+
$[12] = t5;
|
|
54
|
+
} else t5 = $[12];
|
|
55
|
+
let t6;
|
|
56
|
+
if ($[13] !== children || $[14] !== props || $[15] !== ref || $[16] !== t3 || $[17] !== t5) {
|
|
57
|
+
t6 = /* @__PURE__ */ jsxs(Dialog.Portal, { children: [t2, /* @__PURE__ */ jsxs(Dialog.Popup, {
|
|
58
|
+
className: t3,
|
|
59
|
+
ref,
|
|
60
|
+
...props,
|
|
61
|
+
children: [children, t5]
|
|
62
|
+
})] });
|
|
63
|
+
$[13] = children;
|
|
64
|
+
$[14] = props;
|
|
65
|
+
$[15] = ref;
|
|
66
|
+
$[16] = t3;
|
|
67
|
+
$[17] = t5;
|
|
68
|
+
$[18] = t6;
|
|
69
|
+
} else t6 = $[18];
|
|
70
|
+
return t6;
|
|
71
|
+
};
|
|
72
|
+
export { DialogPopup };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const require_cn = require("./cn.cjs");
|
|
2
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
let __base_ui_react_dialog = require("@base-ui/react/dialog");
|
|
5
|
+
const DialogTitle = (t0) => {
|
|
6
|
+
const $ = (0, react_compiler_runtime.c)(12);
|
|
7
|
+
let children;
|
|
8
|
+
let className;
|
|
9
|
+
let props;
|
|
10
|
+
let ref;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, children, ref, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = children;
|
|
15
|
+
$[2] = className;
|
|
16
|
+
$[3] = props;
|
|
17
|
+
$[4] = ref;
|
|
18
|
+
} else {
|
|
19
|
+
children = $[1];
|
|
20
|
+
className = $[2];
|
|
21
|
+
props = $[3];
|
|
22
|
+
ref = $[4];
|
|
23
|
+
}
|
|
24
|
+
let t1;
|
|
25
|
+
if ($[5] !== className) {
|
|
26
|
+
t1 = require_cn.cn("text-strong-2", className);
|
|
27
|
+
$[5] = className;
|
|
28
|
+
$[6] = t1;
|
|
29
|
+
} else t1 = $[6];
|
|
30
|
+
let t2;
|
|
31
|
+
if ($[7] !== children || $[8] !== props || $[9] !== ref || $[10] !== t1) {
|
|
32
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__base_ui_react_dialog.Dialog.Title, {
|
|
33
|
+
className: t1,
|
|
34
|
+
ref,
|
|
35
|
+
...props,
|
|
36
|
+
children
|
|
37
|
+
});
|
|
38
|
+
$[7] = children;
|
|
39
|
+
$[8] = props;
|
|
40
|
+
$[9] = ref;
|
|
41
|
+
$[10] = t1;
|
|
42
|
+
$[11] = t2;
|
|
43
|
+
} else t2 = $[11];
|
|
44
|
+
return t2;
|
|
45
|
+
};
|
|
46
|
+
exports.DialogTitle = DialogTitle;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { cn } from "./cn.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
5
|
+
const DialogTitle = (t0) => {
|
|
6
|
+
const $ = c(12);
|
|
7
|
+
let children;
|
|
8
|
+
let className;
|
|
9
|
+
let props;
|
|
10
|
+
let ref;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, children, ref, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = children;
|
|
15
|
+
$[2] = className;
|
|
16
|
+
$[3] = props;
|
|
17
|
+
$[4] = ref;
|
|
18
|
+
} else {
|
|
19
|
+
children = $[1];
|
|
20
|
+
className = $[2];
|
|
21
|
+
props = $[3];
|
|
22
|
+
ref = $[4];
|
|
23
|
+
}
|
|
24
|
+
let t1;
|
|
25
|
+
if ($[5] !== className) {
|
|
26
|
+
t1 = cn("text-strong-2", className);
|
|
27
|
+
$[5] = className;
|
|
28
|
+
$[6] = t1;
|
|
29
|
+
} else t1 = $[6];
|
|
30
|
+
let t2;
|
|
31
|
+
if ($[7] !== children || $[8] !== props || $[9] !== ref || $[10] !== t1) {
|
|
32
|
+
t2 = /* @__PURE__ */ jsx(Dialog.Title, {
|
|
33
|
+
className: t1,
|
|
34
|
+
ref,
|
|
35
|
+
...props,
|
|
36
|
+
children
|
|
37
|
+
});
|
|
38
|
+
$[7] = children;
|
|
39
|
+
$[8] = props;
|
|
40
|
+
$[9] = ref;
|
|
41
|
+
$[10] = t1;
|
|
42
|
+
$[11] = t2;
|
|
43
|
+
} else t2 = $[11];
|
|
44
|
+
return t2;
|
|
45
|
+
};
|
|
46
|
+
export { DialogTitle };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const require_cn = require("./cn.cjs");
|
|
2
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
let __base_ui_react_dialog = require("@base-ui/react/dialog");
|
|
5
|
+
const DialogTrigger = (t0) => {
|
|
6
|
+
const $ = (0, react_compiler_runtime.c)(12);
|
|
7
|
+
let children;
|
|
8
|
+
let className;
|
|
9
|
+
let props;
|
|
10
|
+
let ref;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, children, ref, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = children;
|
|
15
|
+
$[2] = className;
|
|
16
|
+
$[3] = props;
|
|
17
|
+
$[4] = ref;
|
|
18
|
+
} else {
|
|
19
|
+
children = $[1];
|
|
20
|
+
className = $[2];
|
|
21
|
+
props = $[3];
|
|
22
|
+
ref = $[4];
|
|
23
|
+
}
|
|
24
|
+
let t1;
|
|
25
|
+
if ($[5] !== className) {
|
|
26
|
+
t1 = require_cn.cn("", className);
|
|
27
|
+
$[5] = className;
|
|
28
|
+
$[6] = t1;
|
|
29
|
+
} else t1 = $[6];
|
|
30
|
+
let t2;
|
|
31
|
+
if ($[7] !== children || $[8] !== props || $[9] !== ref || $[10] !== t1) {
|
|
32
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__base_ui_react_dialog.Dialog.Trigger, {
|
|
33
|
+
className: t1,
|
|
34
|
+
ref,
|
|
35
|
+
...props,
|
|
36
|
+
children
|
|
37
|
+
});
|
|
38
|
+
$[7] = children;
|
|
39
|
+
$[8] = props;
|
|
40
|
+
$[9] = ref;
|
|
41
|
+
$[10] = t1;
|
|
42
|
+
$[11] = t2;
|
|
43
|
+
} else t2 = $[11];
|
|
44
|
+
return t2;
|
|
45
|
+
};
|
|
46
|
+
exports.DialogTrigger = DialogTrigger;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { cn } from "./cn.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
5
|
+
const DialogTrigger = (t0) => {
|
|
6
|
+
const $ = c(12);
|
|
7
|
+
let children;
|
|
8
|
+
let className;
|
|
9
|
+
let props;
|
|
10
|
+
let ref;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, children, ref, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = children;
|
|
15
|
+
$[2] = className;
|
|
16
|
+
$[3] = props;
|
|
17
|
+
$[4] = ref;
|
|
18
|
+
} else {
|
|
19
|
+
children = $[1];
|
|
20
|
+
className = $[2];
|
|
21
|
+
props = $[3];
|
|
22
|
+
ref = $[4];
|
|
23
|
+
}
|
|
24
|
+
let t1;
|
|
25
|
+
if ($[5] !== className) {
|
|
26
|
+
t1 = cn("", className);
|
|
27
|
+
$[5] = className;
|
|
28
|
+
$[6] = t1;
|
|
29
|
+
} else t1 = $[6];
|
|
30
|
+
let t2;
|
|
31
|
+
if ($[7] !== children || $[8] !== props || $[9] !== ref || $[10] !== t1) {
|
|
32
|
+
t2 = /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
33
|
+
className: t1,
|
|
34
|
+
ref,
|
|
35
|
+
...props,
|
|
36
|
+
children
|
|
37
|
+
});
|
|
38
|
+
$[7] = children;
|
|
39
|
+
$[8] = props;
|
|
40
|
+
$[9] = ref;
|
|
41
|
+
$[10] = t1;
|
|
42
|
+
$[11] = t2;
|
|
43
|
+
} else t2 = $[11];
|
|
44
|
+
return t2;
|
|
45
|
+
};
|
|
46
|
+
export { DialogTrigger };
|
package/dist/dialog.cjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
2
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
+
let __base_ui_react_dialog = require("@base-ui/react/dialog");
|
|
4
|
+
const Dialog = (t0) => {
|
|
5
|
+
const $ = (0, react_compiler_runtime.c)(4);
|
|
6
|
+
let props;
|
|
7
|
+
if ($[0] !== t0) {
|
|
8
|
+
({...props} = t0);
|
|
9
|
+
$[0] = t0;
|
|
10
|
+
$[1] = props;
|
|
11
|
+
} else props = $[1];
|
|
12
|
+
let t1;
|
|
13
|
+
if ($[2] !== props) {
|
|
14
|
+
t1 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__base_ui_react_dialog.Dialog.Root, { ...props });
|
|
15
|
+
$[2] = props;
|
|
16
|
+
$[3] = t1;
|
|
17
|
+
} else t1 = $[3];
|
|
18
|
+
return t1;
|
|
19
|
+
};
|
|
20
|
+
exports.Dialog = Dialog;
|
package/dist/dialog.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
4
|
+
const Dialog$1 = (t0) => {
|
|
5
|
+
const $ = c(4);
|
|
6
|
+
let props;
|
|
7
|
+
if ($[0] !== t0) {
|
|
8
|
+
({...props} = t0);
|
|
9
|
+
$[0] = t0;
|
|
10
|
+
$[1] = props;
|
|
11
|
+
} else props = $[1];
|
|
12
|
+
let t1;
|
|
13
|
+
if ($[2] !== props) {
|
|
14
|
+
t1 = /* @__PURE__ */ jsx(Dialog.Root, { ...props });
|
|
15
|
+
$[2] = props;
|
|
16
|
+
$[3] = t1;
|
|
17
|
+
} else t1 = $[3];
|
|
18
|
+
return t1;
|
|
19
|
+
};
|
|
20
|
+
export { Dialog$1 as Dialog };
|