strata-ui-react 0.1.11 → 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.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 +14 -7
- package/dist/index.es.js +0 -13731
- package/dist/index.es.js.map +0 -1
- package/dist/index.umd.js +0 -30
- package/dist/index.umd.js.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use no memo";
|
|
2
|
+
import { cn } from "./cn.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
const SliderTick = ({ percentage, className, children, ref, ...props }) => {
|
|
5
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
6
|
+
className: cn("absolute top-2xs -translate-x-1/2", className),
|
|
7
|
+
ref,
|
|
8
|
+
...props,
|
|
9
|
+
style: { left: `${percentage}%` },
|
|
10
|
+
children: [/* @__PURE__ */ jsx("span", { className: "absolute bg-on-surface-variant rounded-full left-0 h-2xs w-[2px] -translate-x-1/2 translate-y-[0.7rem]" }), children]
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
export { SliderTick };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use no memo";
|
|
2
|
+
const require_cn = require("./cn.cjs");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
const SliderTrack = ({ className, children, sliderRef, ...props }) => {
|
|
5
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6
|
+
className: require_cn.cn("relative h-2xs inset-shadow-1-shadow rounded-full bg-surface-dim grow", className),
|
|
7
|
+
ref: sliderRef,
|
|
8
|
+
...props,
|
|
9
|
+
children
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
exports.SliderTrack = SliderTrack;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use no memo";
|
|
2
|
+
import { cn } from "./cn.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
const SliderTrack = ({ className, children, sliderRef, ...props }) => {
|
|
5
|
+
return /* @__PURE__ */ jsx("div", {
|
|
6
|
+
className: cn("relative h-2xs inset-shadow-1-shadow rounded-full bg-surface-dim grow", className),
|
|
7
|
+
ref: sliderRef,
|
|
8
|
+
...props,
|
|
9
|
+
children
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
export { SliderTrack };
|
package/dist/slider.cjs
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use no memo";
|
|
2
|
+
const require_cn = require("./cn.cjs");
|
|
3
|
+
const require_slider_handle = require("./slider-handle.cjs");
|
|
4
|
+
const require_slider_segment = require("./slider-segment.cjs");
|
|
5
|
+
const require_slider_tick_label = require("./slider-tick-label.cjs");
|
|
6
|
+
const require_slider_tick = require("./slider-tick.cjs");
|
|
7
|
+
const require_slider_track = require("./slider-track.cjs");
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
let react = require("react");
|
|
10
|
+
let __tanstack_react_ranger = require("@tanstack/react-ranger");
|
|
11
|
+
const Slider = ({ leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, min, max, stepSize, defaultValues, showTickLabels, label, className, ref, ...props }) => {
|
|
12
|
+
const sliderRef = (0, react.useRef)(null);
|
|
13
|
+
const [values, setValues] = (0, react.useState)(defaultValues || [50]);
|
|
14
|
+
const sliderInstance = (0, __tanstack_react_ranger.useRanger)({
|
|
15
|
+
getRangerElement: () => sliderRef.current,
|
|
16
|
+
values,
|
|
17
|
+
min: min ?? 0,
|
|
18
|
+
max: max ?? 100,
|
|
19
|
+
stepSize: stepSize ?? 1,
|
|
20
|
+
onChange: (instance) => {
|
|
21
|
+
setValues(instance.sortedValues);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
25
|
+
ref,
|
|
26
|
+
className: require_cn.cn("space-y-2xs", className),
|
|
27
|
+
...props,
|
|
28
|
+
children: [label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
29
|
+
className: "style-text-default--1 text-on-surface-variant",
|
|
30
|
+
children: label
|
|
31
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
32
|
+
className: "flex items-center w-full gap-sm",
|
|
33
|
+
children: [
|
|
34
|
+
LeadingIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LeadingIcon, {
|
|
35
|
+
className: "size-sm",
|
|
36
|
+
weight: "bold"
|
|
37
|
+
}),
|
|
38
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_slider_track.SliderTrack, {
|
|
39
|
+
sliderRef,
|
|
40
|
+
children: [
|
|
41
|
+
showTickLabels && sliderInstance.getTicks().map(({ value, key, percentage }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_slider_tick.SliderTick, {
|
|
42
|
+
percentage,
|
|
43
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_slider_tick_label.SliderTickLabel, { children: value })
|
|
44
|
+
}, key)),
|
|
45
|
+
sliderInstance.getSteps().map(({ left, width }, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_slider_segment.SliderSegment, {
|
|
46
|
+
index,
|
|
47
|
+
steps: sliderInstance.getSteps().length,
|
|
48
|
+
left,
|
|
49
|
+
width
|
|
50
|
+
}, index)),
|
|
51
|
+
sliderInstance.handles().map(({ isActive, onKeyDownHandler, onMouseDownHandler, onTouchStart, value: value_0 }, index_0) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_slider_handle.SliderHandle, {
|
|
52
|
+
sliderInstance,
|
|
53
|
+
isActive,
|
|
54
|
+
onKeyDownHandler,
|
|
55
|
+
onMouseDownHandler,
|
|
56
|
+
onTouchStart,
|
|
57
|
+
value: value_0
|
|
58
|
+
}, index_0))
|
|
59
|
+
]
|
|
60
|
+
}),
|
|
61
|
+
TrailingIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TrailingIcon, {
|
|
62
|
+
className: "size-sm",
|
|
63
|
+
weight: "bold"
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
})]
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
exports.Slider = Slider;
|
package/dist/slider.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use no memo";
|
|
2
|
+
import { cn } from "./cn.js";
|
|
3
|
+
import { SliderHandle } from "./slider-handle.js";
|
|
4
|
+
import { SliderSegment } from "./slider-segment.js";
|
|
5
|
+
import { SliderTickLabel } from "./slider-tick-label.js";
|
|
6
|
+
import { SliderTick } from "./slider-tick.js";
|
|
7
|
+
import { SliderTrack } from "./slider-track.js";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { useRef, useState } from "react";
|
|
10
|
+
import { useRanger } from "@tanstack/react-ranger";
|
|
11
|
+
const Slider = ({ leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, min, max, stepSize, defaultValues, showTickLabels, label, className, ref, ...props }) => {
|
|
12
|
+
const sliderRef = useRef(null);
|
|
13
|
+
const [values, setValues] = useState(defaultValues || [50]);
|
|
14
|
+
const sliderInstance = useRanger({
|
|
15
|
+
getRangerElement: () => sliderRef.current,
|
|
16
|
+
values,
|
|
17
|
+
min: min ?? 0,
|
|
18
|
+
max: max ?? 100,
|
|
19
|
+
stepSize: stepSize ?? 1,
|
|
20
|
+
onChange: (instance) => {
|
|
21
|
+
setValues(instance.sortedValues);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
25
|
+
ref,
|
|
26
|
+
className: cn("space-y-2xs", className),
|
|
27
|
+
...props,
|
|
28
|
+
children: [label && /* @__PURE__ */ jsx("p", {
|
|
29
|
+
className: "style-text-default--1 text-on-surface-variant",
|
|
30
|
+
children: label
|
|
31
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
32
|
+
className: "flex items-center w-full gap-sm",
|
|
33
|
+
children: [
|
|
34
|
+
LeadingIcon && /* @__PURE__ */ jsx(LeadingIcon, {
|
|
35
|
+
className: "size-sm",
|
|
36
|
+
weight: "bold"
|
|
37
|
+
}),
|
|
38
|
+
/* @__PURE__ */ jsxs(SliderTrack, {
|
|
39
|
+
sliderRef,
|
|
40
|
+
children: [
|
|
41
|
+
showTickLabels && sliderInstance.getTicks().map(({ value, key, percentage }) => /* @__PURE__ */ jsx(SliderTick, {
|
|
42
|
+
percentage,
|
|
43
|
+
children: /* @__PURE__ */ jsx(SliderTickLabel, { children: value })
|
|
44
|
+
}, key)),
|
|
45
|
+
sliderInstance.getSteps().map(({ left, width }, index) => /* @__PURE__ */ jsx(SliderSegment, {
|
|
46
|
+
index,
|
|
47
|
+
steps: sliderInstance.getSteps().length,
|
|
48
|
+
left,
|
|
49
|
+
width
|
|
50
|
+
}, index)),
|
|
51
|
+
sliderInstance.handles().map(({ isActive, onKeyDownHandler, onMouseDownHandler, onTouchStart, value: value_0 }, index_0) => /* @__PURE__ */ jsx(SliderHandle, {
|
|
52
|
+
sliderInstance,
|
|
53
|
+
isActive,
|
|
54
|
+
onKeyDownHandler,
|
|
55
|
+
onMouseDownHandler,
|
|
56
|
+
onTouchStart,
|
|
57
|
+
value: value_0
|
|
58
|
+
}, index_0))
|
|
59
|
+
]
|
|
60
|
+
}),
|
|
61
|
+
TrailingIcon && /* @__PURE__ */ jsx(TrailingIcon, {
|
|
62
|
+
className: "size-sm",
|
|
63
|
+
weight: "bold"
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
})]
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
export { Slider };
|
package/dist/switch.cjs
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
const require_cn = require("./cn.cjs");
|
|
2
|
+
const require_label = require("./label.cjs");
|
|
3
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let __base_ui_react_switch = require("@base-ui/react/switch");
|
|
6
|
+
const Switch = (t0) => {
|
|
7
|
+
const $ = (0, react_compiler_runtime.c)(18);
|
|
8
|
+
let className;
|
|
9
|
+
let label;
|
|
10
|
+
let props;
|
|
11
|
+
let ref;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({label, className, ref, ...props} = t0);
|
|
14
|
+
$[0] = t0;
|
|
15
|
+
$[1] = className;
|
|
16
|
+
$[2] = label;
|
|
17
|
+
$[3] = props;
|
|
18
|
+
$[4] = ref;
|
|
19
|
+
} else {
|
|
20
|
+
className = $[1];
|
|
21
|
+
label = $[2];
|
|
22
|
+
props = $[3];
|
|
23
|
+
ref = $[4];
|
|
24
|
+
}
|
|
25
|
+
let t1;
|
|
26
|
+
if ($[5] !== className) {
|
|
27
|
+
t1 = require_cn.cn("relative group transition-colors flex items-center h-[26px] w-[50px] rounded-full bg-surface-dim bg-size-[6.5rem_100%] inset-shadow-1-shadow p-0.5 ease-[cubic-bezier(0.26,0.75,0.38,0.45)] before:absolute before:rounded-full data-checked:bg-accent data-checked:active:bg-gray-500 outline-2 outline-transparent not-disabled:hover:outline-accent hover:cursor-pointer disabled:opacity-50 disabled:pointer-events-none", 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)(__base_ui_react_switch.Switch.Thumb, { className: "size-[14px] data-checked:size-[18px] rounded-full bg-accent transition-transform duration-500 ease-[cubic-bezier(0.68,-0.55,0.27,1.55)] translate-x-[6px] shadow-xs data-checked:translate-x-[26px] data-checked:scale-[1.1] data-unchecked:bg-accent data-checked:bg-on-accent" });
|
|
34
|
+
$[7] = t2;
|
|
35
|
+
} else t2 = $[7];
|
|
36
|
+
let t3;
|
|
37
|
+
if ($[8] !== props || $[9] !== ref || $[10] !== t1) {
|
|
38
|
+
t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__base_ui_react_switch.Switch.Root, {
|
|
39
|
+
className: t1,
|
|
40
|
+
ref,
|
|
41
|
+
...props,
|
|
42
|
+
children: t2
|
|
43
|
+
});
|
|
44
|
+
$[8] = props;
|
|
45
|
+
$[9] = ref;
|
|
46
|
+
$[10] = t1;
|
|
47
|
+
$[11] = t3;
|
|
48
|
+
} else t3 = $[11];
|
|
49
|
+
let t4;
|
|
50
|
+
if ($[12] !== label || $[13] !== props) {
|
|
51
|
+
t4 = label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_label.Label, {
|
|
52
|
+
htmlFor: props.id,
|
|
53
|
+
children: label
|
|
54
|
+
});
|
|
55
|
+
$[12] = label;
|
|
56
|
+
$[13] = props;
|
|
57
|
+
$[14] = t4;
|
|
58
|
+
} else t4 = $[14];
|
|
59
|
+
let t5;
|
|
60
|
+
if ($[15] !== t3 || $[16] !== t4) {
|
|
61
|
+
t5 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
62
|
+
className: "flex items-center gap-xs",
|
|
63
|
+
children: [t3, t4]
|
|
64
|
+
});
|
|
65
|
+
$[15] = t3;
|
|
66
|
+
$[16] = t4;
|
|
67
|
+
$[17] = t5;
|
|
68
|
+
} else t5 = $[17];
|
|
69
|
+
return t5;
|
|
70
|
+
};
|
|
71
|
+
exports.Switch = Switch;
|
package/dist/switch.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { cn } from "./cn.js";
|
|
2
|
+
import { Label } from "./label.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Switch } from "@base-ui/react/switch";
|
|
6
|
+
const Switch$1 = (t0) => {
|
|
7
|
+
const $ = c(18);
|
|
8
|
+
let className;
|
|
9
|
+
let label;
|
|
10
|
+
let props;
|
|
11
|
+
let ref;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({label, className, ref, ...props} = t0);
|
|
14
|
+
$[0] = t0;
|
|
15
|
+
$[1] = className;
|
|
16
|
+
$[2] = label;
|
|
17
|
+
$[3] = props;
|
|
18
|
+
$[4] = ref;
|
|
19
|
+
} else {
|
|
20
|
+
className = $[1];
|
|
21
|
+
label = $[2];
|
|
22
|
+
props = $[3];
|
|
23
|
+
ref = $[4];
|
|
24
|
+
}
|
|
25
|
+
let t1;
|
|
26
|
+
if ($[5] !== className) {
|
|
27
|
+
t1 = cn("relative group transition-colors flex items-center h-[26px] w-[50px] rounded-full bg-surface-dim bg-size-[6.5rem_100%] inset-shadow-1-shadow p-0.5 ease-[cubic-bezier(0.26,0.75,0.38,0.45)] before:absolute before:rounded-full data-checked:bg-accent data-checked:active:bg-gray-500 outline-2 outline-transparent not-disabled:hover:outline-accent hover:cursor-pointer disabled:opacity-50 disabled:pointer-events-none", 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(Switch.Thumb, { className: "size-[14px] data-checked:size-[18px] rounded-full bg-accent transition-transform duration-500 ease-[cubic-bezier(0.68,-0.55,0.27,1.55)] translate-x-[6px] shadow-xs data-checked:translate-x-[26px] data-checked:scale-[1.1] data-unchecked:bg-accent data-checked:bg-on-accent" });
|
|
34
|
+
$[7] = t2;
|
|
35
|
+
} else t2 = $[7];
|
|
36
|
+
let t3;
|
|
37
|
+
if ($[8] !== props || $[9] !== ref || $[10] !== t1) {
|
|
38
|
+
t3 = /* @__PURE__ */ jsx(Switch.Root, {
|
|
39
|
+
className: t1,
|
|
40
|
+
ref,
|
|
41
|
+
...props,
|
|
42
|
+
children: t2
|
|
43
|
+
});
|
|
44
|
+
$[8] = props;
|
|
45
|
+
$[9] = ref;
|
|
46
|
+
$[10] = t1;
|
|
47
|
+
$[11] = t3;
|
|
48
|
+
} else t3 = $[11];
|
|
49
|
+
let t4;
|
|
50
|
+
if ($[12] !== label || $[13] !== props) {
|
|
51
|
+
t4 = label && /* @__PURE__ */ jsx(Label, {
|
|
52
|
+
htmlFor: props.id,
|
|
53
|
+
children: label
|
|
54
|
+
});
|
|
55
|
+
$[12] = label;
|
|
56
|
+
$[13] = props;
|
|
57
|
+
$[14] = t4;
|
|
58
|
+
} else t4 = $[14];
|
|
59
|
+
let t5;
|
|
60
|
+
if ($[15] !== t3 || $[16] !== t4) {
|
|
61
|
+
t5 = /* @__PURE__ */ jsxs("div", {
|
|
62
|
+
className: "flex items-center gap-xs",
|
|
63
|
+
children: [t3, t4]
|
|
64
|
+
});
|
|
65
|
+
$[15] = t3;
|
|
66
|
+
$[16] = t4;
|
|
67
|
+
$[17] = t5;
|
|
68
|
+
} else t5 = $[17];
|
|
69
|
+
return t5;
|
|
70
|
+
};
|
|
71
|
+
export { Switch$1 as Switch };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const require_cn = require("./cn.cjs");
|
|
2
|
+
const require_tabs_types = require("./tabs.types.cjs");
|
|
3
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let react = require("react");
|
|
6
|
+
let __base_ui_react_tabs = require("@base-ui/react/tabs");
|
|
7
|
+
const TabsIndicator = (t0) => {
|
|
8
|
+
const $ = (0, react_compiler_runtime.c)(13);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = className;
|
|
15
|
+
$[2] = props;
|
|
16
|
+
} else {
|
|
17
|
+
className = $[1];
|
|
18
|
+
props = $[2];
|
|
19
|
+
}
|
|
20
|
+
if ((0, react.useContext)(require_tabs_types.TabsOrientationContext) === "horizontal") {
|
|
21
|
+
let t1$1;
|
|
22
|
+
if ($[3] !== className) {
|
|
23
|
+
t1$1 = require_cn.cn("absolute left-1/2 h-11 md:h-12 top-0 z-[-1] w-(--active-tab-width) translate-y-(--active-tab-top) -translate-x-1/2 rounded-2xl md:rounded-full bg-surface-brand-primary-default transition-all duration-300 ease-[cubic-bezier(0.68,-0.55,0.27,1.55)]", className);
|
|
24
|
+
$[3] = className;
|
|
25
|
+
$[4] = t1$1;
|
|
26
|
+
} else t1$1 = $[4];
|
|
27
|
+
let t2$1;
|
|
28
|
+
if ($[5] !== props || $[6] !== t1$1) {
|
|
29
|
+
t2$1 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__base_ui_react_tabs.Tabs.Indicator, {
|
|
30
|
+
className: t1$1,
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
$[5] = props;
|
|
34
|
+
$[6] = t1$1;
|
|
35
|
+
$[7] = t2$1;
|
|
36
|
+
} else t2$1 = $[7];
|
|
37
|
+
return t2$1;
|
|
38
|
+
}
|
|
39
|
+
let t1;
|
|
40
|
+
if ($[8] !== className) {
|
|
41
|
+
t1 = require_cn.cn("absolute top-1/2 h-11 md:h-12 left-0 z-[-1] w-(--active-tab-width) translate-x-(--active-tab-left) -translate-y-1/2 rounded-full bg-surface-brand-primary-default transition-all duration-300 ease-[cubic-bezier(0.68,-0.55,0.27,1.55)]", className);
|
|
42
|
+
$[8] = className;
|
|
43
|
+
$[9] = t1;
|
|
44
|
+
} else t1 = $[9];
|
|
45
|
+
let t2;
|
|
46
|
+
if ($[10] !== props || $[11] !== t1) {
|
|
47
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__base_ui_react_tabs.Tabs.Indicator, {
|
|
48
|
+
className: t1,
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
51
|
+
$[10] = props;
|
|
52
|
+
$[11] = t1;
|
|
53
|
+
$[12] = t2;
|
|
54
|
+
} else t2 = $[12];
|
|
55
|
+
return t2;
|
|
56
|
+
};
|
|
57
|
+
exports.TabsIndicator = TabsIndicator;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { cn } from "./cn.js";
|
|
2
|
+
import { TabsOrientationContext } from "./tabs.types.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { useContext } from "react";
|
|
6
|
+
import { Tabs } from "@base-ui/react/tabs";
|
|
7
|
+
const TabsIndicator = (t0) => {
|
|
8
|
+
const $ = c(13);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = className;
|
|
15
|
+
$[2] = props;
|
|
16
|
+
} else {
|
|
17
|
+
className = $[1];
|
|
18
|
+
props = $[2];
|
|
19
|
+
}
|
|
20
|
+
if (useContext(TabsOrientationContext) === "horizontal") {
|
|
21
|
+
let t1$1;
|
|
22
|
+
if ($[3] !== className) {
|
|
23
|
+
t1$1 = cn("absolute left-1/2 h-11 md:h-12 top-0 z-[-1] w-(--active-tab-width) translate-y-(--active-tab-top) -translate-x-1/2 rounded-2xl md:rounded-full bg-surface-brand-primary-default transition-all duration-300 ease-[cubic-bezier(0.68,-0.55,0.27,1.55)]", className);
|
|
24
|
+
$[3] = className;
|
|
25
|
+
$[4] = t1$1;
|
|
26
|
+
} else t1$1 = $[4];
|
|
27
|
+
let t2$1;
|
|
28
|
+
if ($[5] !== props || $[6] !== t1$1) {
|
|
29
|
+
t2$1 = /* @__PURE__ */ jsx(Tabs.Indicator, {
|
|
30
|
+
className: t1$1,
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
$[5] = props;
|
|
34
|
+
$[6] = t1$1;
|
|
35
|
+
$[7] = t2$1;
|
|
36
|
+
} else t2$1 = $[7];
|
|
37
|
+
return t2$1;
|
|
38
|
+
}
|
|
39
|
+
let t1;
|
|
40
|
+
if ($[8] !== className) {
|
|
41
|
+
t1 = cn("absolute top-1/2 h-11 md:h-12 left-0 z-[-1] w-(--active-tab-width) translate-x-(--active-tab-left) -translate-y-1/2 rounded-full bg-surface-brand-primary-default transition-all duration-300 ease-[cubic-bezier(0.68,-0.55,0.27,1.55)]", className);
|
|
42
|
+
$[8] = className;
|
|
43
|
+
$[9] = t1;
|
|
44
|
+
} else t1 = $[9];
|
|
45
|
+
let t2;
|
|
46
|
+
if ($[10] !== props || $[11] !== t1) {
|
|
47
|
+
t2 = /* @__PURE__ */ jsx(Tabs.Indicator, {
|
|
48
|
+
className: t1,
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
51
|
+
$[10] = props;
|
|
52
|
+
$[11] = t1;
|
|
53
|
+
$[12] = t2;
|
|
54
|
+
} else t2 = $[12];
|
|
55
|
+
return t2;
|
|
56
|
+
};
|
|
57
|
+
export { TabsIndicator };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const require_cn = require("./cn.cjs");
|
|
2
|
+
const require_tabs_types = require("./tabs.types.cjs");
|
|
3
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let react = require("react");
|
|
6
|
+
let __base_ui_react_tabs = require("@base-ui/react/tabs");
|
|
7
|
+
const TabsList = (t0) => {
|
|
8
|
+
const $ = (0, react_compiler_runtime.c)(13);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = className;
|
|
15
|
+
$[2] = props;
|
|
16
|
+
} else {
|
|
17
|
+
className = $[1];
|
|
18
|
+
props = $[2];
|
|
19
|
+
}
|
|
20
|
+
if ((0, react.useContext)(require_tabs_types.TabsOrientationContext) === "horizontal") {
|
|
21
|
+
let t1$1;
|
|
22
|
+
if ($[3] !== className) {
|
|
23
|
+
t1$1 = require_cn.cn("relative z-0 flex flex-col h-fit grow gap-2 p-2 bg-surface-neutral-primary-default rounded-3xl", className);
|
|
24
|
+
$[3] = className;
|
|
25
|
+
$[4] = t1$1;
|
|
26
|
+
} else t1$1 = $[4];
|
|
27
|
+
let t2$1;
|
|
28
|
+
if ($[5] !== props || $[6] !== t1$1) {
|
|
29
|
+
t2$1 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__base_ui_react_tabs.Tabs.List, {
|
|
30
|
+
className: t1$1,
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
$[5] = props;
|
|
34
|
+
$[6] = t1$1;
|
|
35
|
+
$[7] = t2$1;
|
|
36
|
+
} else t2$1 = $[7];
|
|
37
|
+
return t2$1;
|
|
38
|
+
}
|
|
39
|
+
let t1;
|
|
40
|
+
if ($[8] !== className) {
|
|
41
|
+
t1 = require_cn.cn("relative z-0 flex gap-1 p-2 bg-surface-neutral-primary-default rounded-full", className);
|
|
42
|
+
$[8] = className;
|
|
43
|
+
$[9] = t1;
|
|
44
|
+
} else t1 = $[9];
|
|
45
|
+
let t2;
|
|
46
|
+
if ($[10] !== props || $[11] !== t1) {
|
|
47
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__base_ui_react_tabs.Tabs.List, {
|
|
48
|
+
className: t1,
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
51
|
+
$[10] = props;
|
|
52
|
+
$[11] = t1;
|
|
53
|
+
$[12] = t2;
|
|
54
|
+
} else t2 = $[12];
|
|
55
|
+
return t2;
|
|
56
|
+
};
|
|
57
|
+
exports.TabsList = TabsList;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { cn } from "./cn.js";
|
|
2
|
+
import { TabsOrientationContext } from "./tabs.types.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { useContext } from "react";
|
|
6
|
+
import { Tabs } from "@base-ui/react/tabs";
|
|
7
|
+
const TabsList = (t0) => {
|
|
8
|
+
const $ = c(13);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = className;
|
|
15
|
+
$[2] = props;
|
|
16
|
+
} else {
|
|
17
|
+
className = $[1];
|
|
18
|
+
props = $[2];
|
|
19
|
+
}
|
|
20
|
+
if (useContext(TabsOrientationContext) === "horizontal") {
|
|
21
|
+
let t1$1;
|
|
22
|
+
if ($[3] !== className) {
|
|
23
|
+
t1$1 = cn("relative z-0 flex flex-col h-fit grow gap-2 p-2 bg-surface-neutral-primary-default rounded-3xl", className);
|
|
24
|
+
$[3] = className;
|
|
25
|
+
$[4] = t1$1;
|
|
26
|
+
} else t1$1 = $[4];
|
|
27
|
+
let t2$1;
|
|
28
|
+
if ($[5] !== props || $[6] !== t1$1) {
|
|
29
|
+
t2$1 = /* @__PURE__ */ jsx(Tabs.List, {
|
|
30
|
+
className: t1$1,
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
$[5] = props;
|
|
34
|
+
$[6] = t1$1;
|
|
35
|
+
$[7] = t2$1;
|
|
36
|
+
} else t2$1 = $[7];
|
|
37
|
+
return t2$1;
|
|
38
|
+
}
|
|
39
|
+
let t1;
|
|
40
|
+
if ($[8] !== className) {
|
|
41
|
+
t1 = cn("relative z-0 flex gap-1 p-2 bg-surface-neutral-primary-default rounded-full", className);
|
|
42
|
+
$[8] = className;
|
|
43
|
+
$[9] = t1;
|
|
44
|
+
} else t1 = $[9];
|
|
45
|
+
let t2;
|
|
46
|
+
if ($[10] !== props || $[11] !== t1) {
|
|
47
|
+
t2 = /* @__PURE__ */ jsx(Tabs.List, {
|
|
48
|
+
className: t1,
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
51
|
+
$[10] = props;
|
|
52
|
+
$[11] = t1;
|
|
53
|
+
$[12] = t2;
|
|
54
|
+
} else t2 = $[12];
|
|
55
|
+
return t2;
|
|
56
|
+
};
|
|
57
|
+
export { TabsList };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const require_cn = require("./cn.cjs");
|
|
2
|
+
const require_tabs_types = require("./tabs.types.cjs");
|
|
3
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let react = require("react");
|
|
6
|
+
let __base_ui_react_tabs = require("@base-ui/react/tabs");
|
|
7
|
+
const TabsPanel = (t0) => {
|
|
8
|
+
const $ = (0, react_compiler_runtime.c)(9);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = className;
|
|
15
|
+
$[2] = props;
|
|
16
|
+
} else {
|
|
17
|
+
className = $[1];
|
|
18
|
+
props = $[2];
|
|
19
|
+
}
|
|
20
|
+
const t1 = (0, react.useContext)(require_tabs_types.TabsOrientationContext) === "horizontal" ? "flex-1 min-h-0 h-full" : "grow";
|
|
21
|
+
let t2;
|
|
22
|
+
if ($[3] !== className || $[4] !== t1) {
|
|
23
|
+
t2 = require_cn.cn("relative rounded-xl bg-surface-neutral-primary-default", t1, "flex items-center justify-center p-4 overflow-auto", className);
|
|
24
|
+
$[3] = className;
|
|
25
|
+
$[4] = t1;
|
|
26
|
+
$[5] = t2;
|
|
27
|
+
} else t2 = $[5];
|
|
28
|
+
let t3;
|
|
29
|
+
if ($[6] !== props || $[7] !== t2) {
|
|
30
|
+
t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__base_ui_react_tabs.Tabs.Panel, {
|
|
31
|
+
className: t2,
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
$[6] = props;
|
|
35
|
+
$[7] = t2;
|
|
36
|
+
$[8] = t3;
|
|
37
|
+
} else t3 = $[8];
|
|
38
|
+
return t3;
|
|
39
|
+
};
|
|
40
|
+
exports.TabsPanel = TabsPanel;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { cn } from "./cn.js";
|
|
2
|
+
import { TabsOrientationContext } from "./tabs.types.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { useContext } from "react";
|
|
6
|
+
import { Tabs } from "@base-ui/react/tabs";
|
|
7
|
+
const TabsPanel = (t0) => {
|
|
8
|
+
const $ = c(9);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = className;
|
|
15
|
+
$[2] = props;
|
|
16
|
+
} else {
|
|
17
|
+
className = $[1];
|
|
18
|
+
props = $[2];
|
|
19
|
+
}
|
|
20
|
+
const t1 = useContext(TabsOrientationContext) === "horizontal" ? "flex-1 min-h-0 h-full" : "grow";
|
|
21
|
+
let t2;
|
|
22
|
+
if ($[3] !== className || $[4] !== t1) {
|
|
23
|
+
t2 = cn("relative rounded-xl bg-surface-neutral-primary-default", t1, "flex items-center justify-center p-4 overflow-auto", className);
|
|
24
|
+
$[3] = className;
|
|
25
|
+
$[4] = t1;
|
|
26
|
+
$[5] = t2;
|
|
27
|
+
} else t2 = $[5];
|
|
28
|
+
let t3;
|
|
29
|
+
if ($[6] !== props || $[7] !== t2) {
|
|
30
|
+
t3 = /* @__PURE__ */ jsx(Tabs.Panel, {
|
|
31
|
+
className: t2,
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
$[6] = props;
|
|
35
|
+
$[7] = t2;
|
|
36
|
+
$[8] = t3;
|
|
37
|
+
} else t3 = $[8];
|
|
38
|
+
return t3;
|
|
39
|
+
};
|
|
40
|
+
export { TabsPanel };
|
|
@@ -0,0 +1,36 @@
|
|
|
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_tabs = require("@base-ui/react/tabs");
|
|
5
|
+
const TabsTab = (t0) => {
|
|
6
|
+
const $ = (0, react_compiler_runtime.c)(8);
|
|
7
|
+
let className;
|
|
8
|
+
let props;
|
|
9
|
+
if ($[0] !== t0) {
|
|
10
|
+
({className, ...props} = t0);
|
|
11
|
+
$[0] = t0;
|
|
12
|
+
$[1] = className;
|
|
13
|
+
$[2] = props;
|
|
14
|
+
} else {
|
|
15
|
+
className = $[1];
|
|
16
|
+
props = $[2];
|
|
17
|
+
}
|
|
18
|
+
let t1;
|
|
19
|
+
if ($[3] !== className) {
|
|
20
|
+
t1 = require_cn.cn("inline-flex rounded-2xl md:rounded-full h-11 md:h-12 px-6 body-base-semibold w-full text-text-brand-primary-default text-center items-center justify-center border-0 break-keep whitespace-nowrap outline-none select-none focus-visible:relative focus-visible:before:absolute focus-visible:before:outline data-selected:text-text-inverse-primary-default transition-colors duration-300 hover:cursor-pointer aria-[selected=false]:hover:bg-surface-neutral-primary-hover", className);
|
|
21
|
+
$[3] = className;
|
|
22
|
+
$[4] = t1;
|
|
23
|
+
} else t1 = $[4];
|
|
24
|
+
let t2;
|
|
25
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
26
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__base_ui_react_tabs.Tabs.Tab, {
|
|
27
|
+
className: t1,
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
$[5] = props;
|
|
31
|
+
$[6] = t1;
|
|
32
|
+
$[7] = t2;
|
|
33
|
+
} else t2 = $[7];
|
|
34
|
+
return t2;
|
|
35
|
+
};
|
|
36
|
+
exports.TabsTab = TabsTab;
|