@spear-ai/spectral 1.3.4 → 1.3.5
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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +69 -61
- package/dist/spectral.cjs.js +12 -12
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { Slider, type SliderProps } from './components/Slider/Slider';
|
|
|
7
7
|
export { Switch } from './components/Switch/Switch';
|
|
8
8
|
export { Toggle, type ToggleProps } from './components/Toggle/Toggle';
|
|
9
9
|
export { ToggleGroup, type ToggleGroupProps } from './components/ToggleGroup/ToggleGroup';
|
|
10
|
+
export { Toolbar, type ToolbarProps } from './components/Toolbar/Toolbar';
|
|
10
11
|
export { Tooltip, TooltipContent, TooltipTrigger } from './components/Tooltip/Tooltip';
|
|
11
12
|
export { useOutsideClick } from './hooks/useOutsideClick';
|
|
12
13
|
export { useTheme } from './hooks/useTheme';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AACzF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAGtF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAG3C,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAGpC,OAAO,mBAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AACzF,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAGtF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAG3C,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAGpC,OAAO,mBAAmB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "./assets/spectral.css";
|
|
3
|
-
import { jsxs as
|
|
3
|
+
import { jsxs as oe, jsx as x, Fragment as Dn } from "react/jsx-runtime";
|
|
4
4
|
import * as f from "react";
|
|
5
|
-
import D, { forwardRef as
|
|
5
|
+
import D, { forwardRef as ie, createElement as Nn, useState as dt, useLayoutEffect as ao, useEffect as Ke, useMemo as io, isValidElement as ki, cloneElement as Ti, useRef as it, useCallback as q, createContext as Qt, useContext as ft, createRef as Oi, useId as Di, useImperativeHandle as Ni } from "react";
|
|
6
6
|
import * as so from "react-dom";
|
|
7
7
|
import Mi from "react-dom";
|
|
8
8
|
function lo(e) {
|
|
@@ -2741,7 +2741,7 @@ const te = (e) => {
|
|
|
2741
2741
|
orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
|
|
2742
2742
|
};
|
|
2743
2743
|
}, ps = /* @__PURE__ */ Yi(fs);
|
|
2744
|
-
function
|
|
2744
|
+
function ae(...e) {
|
|
2745
2745
|
return ps(co(e));
|
|
2746
2746
|
}
|
|
2747
2747
|
const Ar = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, kr = co, Yn = (e, t) => (n) => {
|
|
@@ -2814,7 +2814,7 @@ var vs = {
|
|
|
2814
2814
|
* This source code is licensed under the ISC license.
|
|
2815
2815
|
* See the LICENSE file in the root directory of this source tree.
|
|
2816
2816
|
*/
|
|
2817
|
-
const bs =
|
|
2817
|
+
const bs = ie(
|
|
2818
2818
|
({
|
|
2819
2819
|
color: e = "currentColor",
|
|
2820
2820
|
size: t = 24,
|
|
@@ -2850,7 +2850,7 @@ const bs = ae(
|
|
|
2850
2850
|
* See the LICENSE file in the root directory of this source tree.
|
|
2851
2851
|
*/
|
|
2852
2852
|
const ws = (e, t) => {
|
|
2853
|
-
const n =
|
|
2853
|
+
const n = ie(
|
|
2854
2854
|
({ className: r, ...o }, a) => Nn(bs, {
|
|
2855
2855
|
ref: a,
|
|
2856
2856
|
iconNode: t,
|
|
@@ -2900,7 +2900,7 @@ const ys = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Co =
|
|
|
2900
2900
|
size: "default"
|
|
2901
2901
|
}
|
|
2902
2902
|
}
|
|
2903
|
-
), Cs =
|
|
2903
|
+
), Cs = ie(
|
|
2904
2904
|
({
|
|
2905
2905
|
className: e,
|
|
2906
2906
|
variant: t,
|
|
@@ -2928,15 +2928,15 @@ const ys = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Co =
|
|
|
2928
2928
|
outline: "bg-button-outline-bg--disabled border-button-outline-border--disabled text-button-outline-text--disabled pointer-events-none",
|
|
2929
2929
|
ghost: "bg-transparent text-button-ghost-text--disabled pointer-events-none"
|
|
2930
2930
|
}
|
|
2931
|
-
}, v =
|
|
2931
|
+
}, v = ae(
|
|
2932
2932
|
xs({ variant: t, state: o, size: u }),
|
|
2933
2933
|
o === "error" && m.error[t || "primary"],
|
|
2934
2934
|
o === "loading" && m.loading[t || "primary"],
|
|
2935
2935
|
u,
|
|
2936
2936
|
e
|
|
2937
2937
|
);
|
|
2938
|
-
return /* @__PURE__ */
|
|
2939
|
-
/* @__PURE__ */
|
|
2938
|
+
return /* @__PURE__ */ oe("div", { className: ae("flex flex-col justify-items-center", u), children: [
|
|
2939
|
+
/* @__PURE__ */ oe(
|
|
2940
2940
|
"button",
|
|
2941
2941
|
{
|
|
2942
2942
|
className: v,
|
|
@@ -2960,14 +2960,14 @@ const ys = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Co =
|
|
|
2960
2960
|
}
|
|
2961
2961
|
);
|
|
2962
2962
|
Cs.displayName = "Button";
|
|
2963
|
-
const Es =
|
|
2963
|
+
const Es = ie(
|
|
2964
2964
|
({ className: e, title: t, icon: n, width: r = "full", isLoading: o = !1, children: a, ...i }, s) => {
|
|
2965
|
-
const l = t || n, c =
|
|
2965
|
+
const l = t || n, c = ae(
|
|
2966
2966
|
"!font-sans shadow-neumorphic-large relative bg-card-bg rounded-2xl p-4.5 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2967
2967
|
r === "full" ? "w-full" : "w-fit",
|
|
2968
2968
|
e
|
|
2969
2969
|
);
|
|
2970
|
-
return /* @__PURE__ */
|
|
2970
|
+
return /* @__PURE__ */ oe("div", { ref: s, className: c, "aria-busy": o, ...i, children: [
|
|
2971
2971
|
o && /* @__PURE__ */ x(
|
|
2972
2972
|
"div",
|
|
2973
2973
|
{
|
|
@@ -2978,11 +2978,11 @@ const Es = ae(
|
|
|
2978
2978
|
children: /* @__PURE__ */ x(Co, { className: "text-muted-foreground animate-spin", size: 24 })
|
|
2979
2979
|
}
|
|
2980
2980
|
),
|
|
2981
|
-
l && /* @__PURE__ */
|
|
2981
|
+
l && /* @__PURE__ */ oe("div", { className: ae("mb-6 flex items-center", t ? "justify-between" : "justify-end"), children: [
|
|
2982
2982
|
t && /* @__PURE__ */ x("h3", { className: "text-card-text m-0 min-w-0 flex-1 truncate font-semibold", children: t }),
|
|
2983
2983
|
n && /* @__PURE__ */ x("div", { className: "size-5 flex-shrink-0 overflow-hidden [&>svg]:size-5", "aria-hidden": "true", children: n })
|
|
2984
2984
|
] }),
|
|
2985
|
-
/* @__PURE__ */ x("div", { className:
|
|
2985
|
+
/* @__PURE__ */ x("div", { className: ae("min-h-40 p-4", l && "pt-0"), children: a })
|
|
2986
2986
|
] });
|
|
2987
2987
|
}
|
|
2988
2988
|
);
|
|
@@ -4214,7 +4214,7 @@ var Gl = f.forwardRef(
|
|
|
4214
4214
|
), Go = f.forwardRef(
|
|
4215
4215
|
(e, t) => {
|
|
4216
4216
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...i } = e, s = be(qe, n), l = f.useRef(null), c = fe(t, l);
|
|
4217
|
-
return ko(), /* @__PURE__ */
|
|
4217
|
+
return ko(), /* @__PURE__ */ oe(Dn, { children: [
|
|
4218
4218
|
/* @__PURE__ */ x(
|
|
4219
4219
|
qn,
|
|
4220
4220
|
{
|
|
@@ -4238,7 +4238,7 @@ var Gl = f.forwardRef(
|
|
|
4238
4238
|
)
|
|
4239
4239
|
}
|
|
4240
4240
|
),
|
|
4241
|
-
/* @__PURE__ */
|
|
4241
|
+
/* @__PURE__ */ oe(Dn, { children: [
|
|
4242
4242
|
/* @__PURE__ */ x(Xl, { titleId: s.titleId }),
|
|
4243
4243
|
/* @__PURE__ */ x(ql, { contentRef: l, descriptionId: s.descriptionId })
|
|
4244
4244
|
] })
|
|
@@ -5345,11 +5345,11 @@ const $e = {
|
|
|
5345
5345
|
style: { height: a }
|
|
5346
5346
|
}
|
|
5347
5347
|
}, { className: l, style: c } = s[o];
|
|
5348
|
-
return /* @__PURE__ */
|
|
5348
|
+
return /* @__PURE__ */ oe($e.Root, { direction: o, children: [
|
|
5349
5349
|
/* @__PURE__ */ x($e.Trigger, { asChild: !0, children: e }),
|
|
5350
|
-
/* @__PURE__ */
|
|
5350
|
+
/* @__PURE__ */ oe($e.Portal, { children: [
|
|
5351
5351
|
/* @__PURE__ */ x($e.Overlay, { className: "fixed inset-0 bg-transparent" }),
|
|
5352
|
-
/* @__PURE__ */
|
|
5352
|
+
/* @__PURE__ */ oe($e.Content, { className: `bg-drawer-bg z-10 flex flex-col p-4 outline-none ${l}`, style: c, children: [
|
|
5353
5353
|
/* @__PURE__ */ x($e.Close, {}),
|
|
5354
5354
|
/* @__PURE__ */ x($e.Title, { className: "text-text-primary mb-2 text-lg font-semibold", children: t }),
|
|
5355
5355
|
/* @__PURE__ */ x($e.Description, { className: "!text-text-secondary mb-2 !text-xs uppercase", children: n }),
|
|
@@ -7124,7 +7124,7 @@ function of({ className: e, align: t = "center", sideOffset: n = 4, width: r = 3
|
|
|
7124
7124
|
"data-slot": "popover-content",
|
|
7125
7125
|
align: t,
|
|
7126
7126
|
sideOffset: n,
|
|
7127
|
-
className:
|
|
7127
|
+
className: ae(
|
|
7128
7128
|
"bg-popover-bg text-popover-text data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
7129
7129
|
"data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2",
|
|
7130
7130
|
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 h-fit",
|
|
@@ -7137,7 +7137,7 @@ function of({ className: e, align: t = "center", sideOffset: n = 4, width: r = 3
|
|
|
7137
7137
|
) });
|
|
7138
7138
|
}
|
|
7139
7139
|
function af({ className: e, ...t }) {
|
|
7140
|
-
return /* @__PURE__ */ x("div", { "data-slot": "skeleton", className:
|
|
7140
|
+
return /* @__PURE__ */ x("div", { "data-slot": "skeleton", className: ae("bg-accent animate-pulse rounded-md", e), ...t });
|
|
7141
7141
|
}
|
|
7142
7142
|
function fd(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
7143
7143
|
return function(o) {
|
|
@@ -7150,7 +7150,7 @@ function pd(...e) {
|
|
|
7150
7150
|
n && (typeof n == "function" ? n(t) : typeof n == "object" && "current" in n && (n.current = t));
|
|
7151
7151
|
};
|
|
7152
7152
|
}
|
|
7153
|
-
const vt =
|
|
7153
|
+
const vt = ie(function({ children: t, ...n }, r) {
|
|
7154
7154
|
if (!ki(t))
|
|
7155
7155
|
return t == null ? null : /* @__PURE__ */ x("span", { ...n, ref: r });
|
|
7156
7156
|
const o = t, a = o.props ?? {}, i = { ...a, ...n };
|
|
@@ -7203,7 +7203,7 @@ function gd(e) {
|
|
|
7203
7203
|
);
|
|
7204
7204
|
return [s, l];
|
|
7205
7205
|
}
|
|
7206
|
-
const fn = Qt(null), ja =
|
|
7206
|
+
const fn = Qt(null), ja = ie(
|
|
7207
7207
|
({
|
|
7208
7208
|
asChild: e,
|
|
7209
7209
|
className: t,
|
|
@@ -7260,7 +7260,7 @@ const fn = Qt(null), ja = ae(
|
|
|
7260
7260
|
setActiveIndex: S,
|
|
7261
7261
|
updateAtIndex: I
|
|
7262
7262
|
}, z = e ? vt : "div", T = w;
|
|
7263
|
-
return /* @__PURE__ */ x(fn.Provider, { value: O, children: /* @__PURE__ */
|
|
7263
|
+
return /* @__PURE__ */ x(fn.Provider, { value: O, children: /* @__PURE__ */ oe(
|
|
7264
7264
|
z,
|
|
7265
7265
|
{
|
|
7266
7266
|
ref: T,
|
|
@@ -7301,7 +7301,7 @@ function oo(e, t) {
|
|
|
7301
7301
|
i[l] - i[l - 1] < s && (i[l] = at(i[l - 1] + s, n, r));
|
|
7302
7302
|
return i;
|
|
7303
7303
|
}
|
|
7304
|
-
const Ga =
|
|
7304
|
+
const Ga = ie(
|
|
7305
7305
|
({ asChild: e, className: t, onPointerDown: n, ...r }, o) => {
|
|
7306
7306
|
const a = ft(fn);
|
|
7307
7307
|
if (!a) throw new Error("SliderTrack must be used within Slider");
|
|
@@ -7336,7 +7336,7 @@ const Ga = ae(
|
|
|
7336
7336
|
}
|
|
7337
7337
|
);
|
|
7338
7338
|
Ga.displayName = "SliderTrack";
|
|
7339
|
-
const Ya =
|
|
7339
|
+
const Ya = ie(
|
|
7340
7340
|
({ asChild: e, className: t, style: n, ...r }, o) => {
|
|
7341
7341
|
const a = ft(fn);
|
|
7342
7342
|
if (!a) throw new Error("SliderRange must be used within Slider");
|
|
@@ -7354,7 +7354,7 @@ const Ya = ae(
|
|
|
7354
7354
|
}
|
|
7355
7355
|
);
|
|
7356
7356
|
Ya.displayName = "SliderRange";
|
|
7357
|
-
const Xa =
|
|
7357
|
+
const Xa = ie(
|
|
7358
7358
|
({ asChild: e, className: t, index: n, onKeyDown: r, onPointerDown: o, ...a }, i) => {
|
|
7359
7359
|
const s = ft(fn);
|
|
7360
7360
|
if (!s) throw new Error("SliderThumb must be used within Slider");
|
|
@@ -7490,7 +7490,7 @@ const sf = ({
|
|
|
7490
7490
|
...p
|
|
7491
7491
|
}) => {
|
|
7492
7492
|
const m = n || t || [r];
|
|
7493
|
-
return /* @__PURE__ */
|
|
7493
|
+
return /* @__PURE__ */ oe(
|
|
7494
7494
|
ja,
|
|
7495
7495
|
{
|
|
7496
7496
|
"data-slot": "slider",
|
|
@@ -7505,7 +7505,7 @@ const sf = ({
|
|
|
7505
7505
|
onValueCommit: c,
|
|
7506
7506
|
disabled: u,
|
|
7507
7507
|
name: d,
|
|
7508
|
-
className:
|
|
7508
|
+
className: ae(
|
|
7509
7509
|
"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
7510
7510
|
e
|
|
7511
7511
|
),
|
|
@@ -7515,14 +7515,14 @@ const sf = ({
|
|
|
7515
7515
|
Ga,
|
|
7516
7516
|
{
|
|
7517
7517
|
"data-slot": "slider-track",
|
|
7518
|
-
className:
|
|
7518
|
+
className: ae(
|
|
7519
7519
|
"bg-slider-track relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
7520
7520
|
),
|
|
7521
7521
|
children: /* @__PURE__ */ x(
|
|
7522
7522
|
Ya,
|
|
7523
7523
|
{
|
|
7524
7524
|
"data-slot": "slider-range",
|
|
7525
|
-
className:
|
|
7525
|
+
className: ae(
|
|
7526
7526
|
"bg-slider-range absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
7527
7527
|
)
|
|
7528
7528
|
}
|
|
@@ -7557,7 +7557,7 @@ function pr(e) {
|
|
|
7557
7557
|
function bd(e, t, n) {
|
|
7558
7558
|
return Math.min(n, Math.max(t, e));
|
|
7559
7559
|
}
|
|
7560
|
-
const Ja = Qt(null), ei =
|
|
7560
|
+
const Ja = Qt(null), ei = ie(
|
|
7561
7561
|
({
|
|
7562
7562
|
asChild: e,
|
|
7563
7563
|
className: t,
|
|
@@ -7607,7 +7607,7 @@ const Ja = Qt(null), ei = ae(
|
|
|
7607
7607
|
},
|
|
7608
7608
|
[p, P]
|
|
7609
7609
|
), k = e ? vt : "button", I = h;
|
|
7610
|
-
return /* @__PURE__ */ x(Ja.Provider, { value: { checked: E, disabled: c }, children: /* @__PURE__ */
|
|
7610
|
+
return /* @__PURE__ */ x(Ja.Provider, { value: { checked: E, disabled: c }, children: /* @__PURE__ */ oe(
|
|
7611
7611
|
k,
|
|
7612
7612
|
{
|
|
7613
7613
|
id: w,
|
|
@@ -7660,7 +7660,7 @@ const Ja = Qt(null), ei = ae(
|
|
|
7660
7660
|
}
|
|
7661
7661
|
);
|
|
7662
7662
|
ei.displayName = "Switch";
|
|
7663
|
-
const ti =
|
|
7663
|
+
const ti = ie(({ asChild: e, className: t, ...n }, r) => {
|
|
7664
7664
|
const o = ft(Ja);
|
|
7665
7665
|
if (!o) throw new Error("SwitchThumb must be used within Switch");
|
|
7666
7666
|
return /* @__PURE__ */ x(
|
|
@@ -7679,12 +7679,12 @@ const ti = ae(({ asChild: e, className: t, ...n }, r) => {
|
|
|
7679
7679
|
);
|
|
7680
7680
|
});
|
|
7681
7681
|
ti.displayName = "SwitchThumb";
|
|
7682
|
-
const wd = Yn("text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"), Gt =
|
|
7682
|
+
const wd = Yn("text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"), Gt = ie(({ className: e, htmlFor: t, ...n }, r) => (
|
|
7683
7683
|
// eslint-disable-next-line jsx-a11y/label-has-associated-control
|
|
7684
|
-
/* @__PURE__ */ x("label", { htmlFor: t, ref: r, className:
|
|
7684
|
+
/* @__PURE__ */ x("label", { htmlFor: t, ref: r, className: ae(wd(), e), ...n })
|
|
7685
7685
|
));
|
|
7686
7686
|
Gt.displayName = "Label";
|
|
7687
|
-
const yd =
|
|
7687
|
+
const yd = ie(
|
|
7688
7688
|
({
|
|
7689
7689
|
className: e,
|
|
7690
7690
|
disabled: t,
|
|
@@ -7700,13 +7700,13 @@ const yd = ae(
|
|
|
7700
7700
|
...d
|
|
7701
7701
|
}, p) => {
|
|
7702
7702
|
const m = u === "squared";
|
|
7703
|
-
return /* @__PURE__ */
|
|
7703
|
+
return /* @__PURE__ */ oe("div", { className: "flex items-center", "data-testid": "switch-container", children: [
|
|
7704
7704
|
r === "left" && !c && /* @__PURE__ */ x(Gt, { htmlFor: n, className: "mr-2", "data-testid": "switch-label-left", children: o }),
|
|
7705
7705
|
/* @__PURE__ */ x(
|
|
7706
7706
|
ei,
|
|
7707
7707
|
{
|
|
7708
7708
|
"data-testid": "switch-root",
|
|
7709
|
-
className:
|
|
7709
|
+
className: ae(
|
|
7710
7710
|
m ? "peer data-[state=checked]:bg-switch-bg--checked data-[state=unchecked]:bg-switch-bg inline-flex h-6 w-10 shrink-0 items-center rounded-sm border-2 border-transparent transition-all outline-none focus-visible:ring-[3px] focus-visible:ring-black disabled:cursor-not-allowed disabled:opacity-50 [&_span]:rounded-[4px]" : "focus-visible:ring-ring focus-visible:ring-offset-background peer data-[state=checked]:bg-switch-bg--checked data-[state=unchecked]:bg-switch-bg inline-flex h-6 w-10 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-2xs transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
7711
7711
|
e
|
|
7712
7712
|
),
|
|
@@ -7721,7 +7721,7 @@ const yd = ae(
|
|
|
7721
7721
|
children: /* @__PURE__ */ x(
|
|
7722
7722
|
ti,
|
|
7723
7723
|
{
|
|
7724
|
-
className:
|
|
7724
|
+
className: ae(
|
|
7725
7725
|
m ? "bg-switch-thumb pointer-events-none block size-5 rounded-full shadow-xs ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0 data-[state=checked]:rtl:-translate-x-4" : "bg-switch-thumb pointer-events-none block h-5 w-5 rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
7726
7726
|
)
|
|
7727
7727
|
}
|
|
@@ -7734,7 +7734,7 @@ const yd = ae(
|
|
|
7734
7734
|
}
|
|
7735
7735
|
);
|
|
7736
7736
|
yd.displayName = "Switch";
|
|
7737
|
-
const xd =
|
|
7737
|
+
const xd = ie(function({
|
|
7738
7738
|
pressed: t,
|
|
7739
7739
|
defaultPressed: n = !1,
|
|
7740
7740
|
onPressedChange: r,
|
|
@@ -7807,13 +7807,13 @@ const xd = ae(function({
|
|
|
7807
7807
|
layout: "default"
|
|
7808
7808
|
}
|
|
7809
7809
|
}
|
|
7810
|
-
), lf =
|
|
7810
|
+
), lf = ie(
|
|
7811
7811
|
({ className: e, variant: t, size: n, layout: r, ...o }, a) => /* @__PURE__ */ x(
|
|
7812
7812
|
xd,
|
|
7813
7813
|
{
|
|
7814
7814
|
ref: a,
|
|
7815
7815
|
"data-slot": "toggle",
|
|
7816
|
-
className:
|
|
7816
|
+
className: ae(ni({ variant: t, size: n, layout: r }), e),
|
|
7817
7817
|
...o
|
|
7818
7818
|
}
|
|
7819
7819
|
)
|
|
@@ -7869,7 +7869,7 @@ const xd = ae(function({
|
|
|
7869
7869
|
}),
|
|
7870
7870
|
[o, R, y, r, a, n, P, t, g]
|
|
7871
7871
|
), k = a;
|
|
7872
|
-
return /* @__PURE__ */
|
|
7872
|
+
return /* @__PURE__ */ oe(
|
|
7873
7873
|
"div",
|
|
7874
7874
|
{
|
|
7875
7875
|
...v,
|
|
@@ -7888,7 +7888,7 @@ const xd = ae(function({
|
|
|
7888
7888
|
]
|
|
7889
7889
|
}
|
|
7890
7890
|
);
|
|
7891
|
-
}, Ed =
|
|
7891
|
+
}, Ed = ie(function({ value: t, disabled: n, className: r, children: o, onKeyDown: a, onClick: i, ...s }, l) {
|
|
7892
7892
|
const c = ft(ri);
|
|
7893
7893
|
if (!c) throw new Error("ToggleGroupItem must be used within ToggleGroup");
|
|
7894
7894
|
const { type: u, orientation: d, groupDisabled: p, setValue: m, isItemPressed: v, itemsSnapshot: h, register: g } = c, b = it(null);
|
|
@@ -7944,7 +7944,7 @@ const xd = ae(function({
|
|
|
7944
7944
|
"data-variant": t,
|
|
7945
7945
|
"data-size": n,
|
|
7946
7946
|
"data-layout": r,
|
|
7947
|
-
className:
|
|
7947
|
+
className: ae(
|
|
7948
7948
|
"group/toggle-group [&[data-variant='outline']]:bg-toggle-group-bg flex h-fit w-fit items-center rounded-md [&_button:first-of-type]:rounded-l-md [&_button:last-of-type]:rounded-r-md [&[data-variant='outline']]:gap-0.25",
|
|
7949
7949
|
e
|
|
7950
7950
|
),
|
|
@@ -7952,7 +7952,7 @@ const xd = ae(function({
|
|
|
7952
7952
|
children: /* @__PURE__ */ x(oi.Provider, { value: { variant: t, size: n, layout: r }, children: o })
|
|
7953
7953
|
}
|
|
7954
7954
|
);
|
|
7955
|
-
|
|
7955
|
+
ie(({ className: e, children: t, variant: n, size: r, value: o, layout: a, ...i }, s) => {
|
|
7956
7956
|
const l = ft(oi);
|
|
7957
7957
|
return /* @__PURE__ */ x(
|
|
7958
7958
|
Ed,
|
|
@@ -7963,7 +7963,7 @@ ae(({ className: e, children: t, variant: n, size: r, value: o, layout: a, ...i
|
|
|
7963
7963
|
"data-size": l.size || r,
|
|
7964
7964
|
"data-layout": l.layout || a,
|
|
7965
7965
|
value: o,
|
|
7966
|
-
className:
|
|
7966
|
+
className: ae(
|
|
7967
7967
|
ni({
|
|
7968
7968
|
variant: l.variant || n,
|
|
7969
7969
|
size: l.size || r,
|
|
@@ -7977,6 +7977,13 @@ ae(({ className: e, children: t, variant: n, size: r, value: o, layout: a, ...i
|
|
|
7977
7977
|
}
|
|
7978
7978
|
);
|
|
7979
7979
|
});
|
|
7980
|
+
const uf = ({ title: e, description: t, children: n }) => /* @__PURE__ */ oe("div", { className: "bg-background text-text-primary border-border-primary flex h-[72px] w-full justify-between border-b", children: [
|
|
7981
|
+
/* @__PURE__ */ oe("div", { className: "flex w-auto flex-col justify-center", children: [
|
|
7982
|
+
e && /* @__PURE__ */ x("h3", { className: "w-fit font-semibold", children: e }),
|
|
7983
|
+
t && /* @__PURE__ */ x("p", { className: "text-text-secondary m-0 w-fit text-sm", children: t })
|
|
7984
|
+
] }),
|
|
7985
|
+
/* @__PURE__ */ x("div", { className: "flex items-center", children: n })
|
|
7986
|
+
] });
|
|
7980
7987
|
var Sd = Object.freeze({
|
|
7981
7988
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
7982
7989
|
position: "absolute",
|
|
@@ -8000,7 +8007,7 @@ var Sd = Object.freeze({
|
|
|
8000
8007
|
)
|
|
8001
8008
|
);
|
|
8002
8009
|
ai.displayName = Rd;
|
|
8003
|
-
var Pd = ai, [pn,
|
|
8010
|
+
var Pd = ai, [pn, df] = Jt("Tooltip", [
|
|
8004
8011
|
cn
|
|
8005
8012
|
]), mn = cn(), ii = "TooltipProvider", Ad = 700, Un = "tooltip.open", [kd, mr] = pn(ii), si = (e) => {
|
|
8006
8013
|
const {
|
|
@@ -8181,7 +8188,7 @@ var ut = "TooltipContent", di = f.forwardRef(
|
|
|
8181
8188
|
onPointerDownOutside: i,
|
|
8182
8189
|
onFocusOutside: (d) => d.preventDefault(),
|
|
8183
8190
|
onDismiss: u,
|
|
8184
|
-
children: /* @__PURE__ */
|
|
8191
|
+
children: /* @__PURE__ */ oe(
|
|
8185
8192
|
Ma,
|
|
8186
8193
|
{
|
|
8187
8194
|
"data-state": l.stateAttribute,
|
|
@@ -8310,18 +8317,18 @@ function Wd(e) {
|
|
|
8310
8317
|
return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
|
|
8311
8318
|
}
|
|
8312
8319
|
var Hd = si, Vd = li, Ud = ci, jd = ui, Gd = di, Yd = mi;
|
|
8313
|
-
const Xd = ({ delayDuration: e = 0, ...t }) => /* @__PURE__ */ x(Hd, { "data-slot": "tooltip-provider", delayDuration: e, ...t }),
|
|
8320
|
+
const Xd = ({ delayDuration: e = 0, ...t }) => /* @__PURE__ */ x(Hd, { "data-slot": "tooltip-provider", delayDuration: e, ...t }), ff = ({ ...e }) => /* @__PURE__ */ x(Xd, { children: /* @__PURE__ */ x(Vd, { "data-slot": "tooltip", ...e }) }), pf = ({ ...e }) => /* @__PURE__ */ x(Ud, { asChild: !0, "data-slot": "tooltip-trigger", ...e }), mf = ({
|
|
8314
8321
|
className: e,
|
|
8315
8322
|
children: t,
|
|
8316
8323
|
sideOffset: n = 0,
|
|
8317
8324
|
showArrow: r = !1,
|
|
8318
8325
|
...o
|
|
8319
|
-
}) => /* @__PURE__ */ x(jd, { children: /* @__PURE__ */
|
|
8326
|
+
}) => /* @__PURE__ */ x(jd, { children: /* @__PURE__ */ oe(
|
|
8320
8327
|
Gd,
|
|
8321
8328
|
{
|
|
8322
8329
|
"data-slot": "tooltip-content",
|
|
8323
8330
|
sideOffset: n,
|
|
8324
|
-
className:
|
|
8331
|
+
className: ae(
|
|
8325
8332
|
"bg-tooltip-bg text-text-primary pointer-events-auto z-50 w-fit rounded-md px-3 py-1.5 text-xs shadow-lg will-change-transform outline-none select-none",
|
|
8326
8333
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
8327
8334
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
@@ -8336,7 +8343,7 @@ const Xd = ({ delayDuration: e = 0, ...t }) => /* @__PURE__ */ x(Hd, { "data-slo
|
|
|
8336
8343
|
]
|
|
8337
8344
|
}
|
|
8338
8345
|
) });
|
|
8339
|
-
function
|
|
8346
|
+
function hf(e) {
|
|
8340
8347
|
const t = it(null);
|
|
8341
8348
|
return Ke(() => {
|
|
8342
8349
|
const n = (r) => {
|
|
@@ -8347,7 +8354,7 @@ function mf(e) {
|
|
|
8347
8354
|
};
|
|
8348
8355
|
}, [e]), t;
|
|
8349
8356
|
}
|
|
8350
|
-
const
|
|
8357
|
+
const gf = (e = "dark") => {
|
|
8351
8358
|
const [t, n] = dt(() => {
|
|
8352
8359
|
if (typeof window > "u") return e;
|
|
8353
8360
|
const a = localStorage.getItem("theme");
|
|
@@ -8373,10 +8380,11 @@ export {
|
|
|
8373
8380
|
yd as Switch,
|
|
8374
8381
|
lf as Toggle,
|
|
8375
8382
|
cf as ToggleGroup,
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
hf as
|
|
8383
|
+
uf as Toolbar,
|
|
8384
|
+
ff as Tooltip,
|
|
8385
|
+
mf as TooltipContent,
|
|
8386
|
+
pf as TooltipTrigger,
|
|
8387
|
+
ae as cn,
|
|
8388
|
+
hf as useOutsideClick,
|
|
8389
|
+
gf as useTheme
|
|
8382
8390
|
};
|