@floegence/floe-webapp-core 0.10.0 → 0.11.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/dist/components/ui/Button.d.ts +1 -1
- package/dist/context/FloeConfigContext.d.ts +8 -0
- package/dist/index17.js +21 -21
- package/dist/index18.js +101 -98
- package/dist/index20.js +4 -2
- package/dist/index97.js +254 -199
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type JSX, type Component } from 'solid-js';
|
|
2
2
|
export type ButtonVariant = 'default' | 'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive';
|
|
3
|
-
export type ButtonSize = 'sm' | 'md' | 'lg' | 'icon';
|
|
3
|
+
export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'icon';
|
|
4
4
|
export interface ButtonProps extends JSX.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
5
|
variant?: ButtonVariant;
|
|
6
6
|
size?: ButtonSize;
|
|
@@ -75,6 +75,14 @@ export interface FloeThemeConfig {
|
|
|
75
75
|
}
|
|
76
76
|
export interface FloeDeckConfig {
|
|
77
77
|
storageKey: string;
|
|
78
|
+
/**
|
|
79
|
+
* Preset persistence/edit policy.
|
|
80
|
+
*
|
|
81
|
+
* - `mutable` (default): preset layouts can be edited and persisted as full layouts (legacy behavior).
|
|
82
|
+
* - `immutable`: preset layouts are treated as read-only templates; layout structure always comes from
|
|
83
|
+
* `FloeDeckConfig.presets`, and only widget `state` is persisted per preset layout.
|
|
84
|
+
*/
|
|
85
|
+
presetsMode?: 'mutable' | 'immutable';
|
|
78
86
|
/**
|
|
79
87
|
* Optional deck presets to seed the initial layouts list.
|
|
80
88
|
* When provided, these layouts are treated as (potentially) read-only presets
|
package/dist/index17.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { delegateEvents as j, insert as o, createComponent as a, memo as q, effect as w, className as C, template as s } from "solid-js/web";
|
|
2
|
-
import { createSignal as R, Show as
|
|
2
|
+
import { createSignal as R, Show as g, For as G } from "solid-js";
|
|
3
3
|
import { cn as b } from "./index106.js";
|
|
4
4
|
import { useDeck as H } from "./index97.js";
|
|
5
|
-
import { deferNonBlocking as
|
|
5
|
+
import { deferNonBlocking as v } from "./index107.js";
|
|
6
6
|
import { ChevronDown as J, Check as K, Copy as M, Pencil as Q, Trash as U } from "./index38.js";
|
|
7
|
-
var W = /* @__PURE__ */ s('<div class="absolute top-full left-0 mt-1 w-
|
|
7
|
+
var W = /* @__PURE__ */ s('<div class="absolute top-full left-0 mt-1 w-48 bg-popover border border-border/60 rounded shadow-lg z-50 overflow-hidden"><div class="max-h-48 overflow-y-auto py-0.5"></div><div class="border-t border-border/40 px-1.5 py-1"><button class="w-full text-left text-[10px] text-primary/80 hover:text-primary cursor-pointer">+ New Layout'), X = /* @__PURE__ */ s('<div class="fixed inset-0 z-40">'), Y = /* @__PURE__ */ s('<div><button><span class="truncate max-w-[80px] text-muted-foreground/80 font-medium">'), Z = /* @__PURE__ */ s('<span class="flex-1 text-[10px] truncate text-foreground/80">'), ee = /* @__PURE__ */ s('<button class="p-0.5 rounded hover:bg-background transition-colors cursor-pointer"title=Rename>'), te = /* @__PURE__ */ s('<button class="p-0.5 rounded hover:bg-destructive/10 transition-colors cursor-pointer"title=Delete>'), re = /* @__PURE__ */ s('<div class="flex items-center gap-0 opacity-0 group-hover:opacity-100 transition-opacity"><button class="p-0.5 rounded hover:bg-background transition-colors cursor-pointer"title=Duplicate>'), ne = /* @__PURE__ */ s('<div><div class="w-3 h-3 flex-shrink-0">'), oe = /* @__PURE__ */ s('<input type=text class="flex-1 text-[10px] bg-background border border-border rounded px-1 py-0.5"autofocus>'), le = /* @__PURE__ */ s('<span class="ml-1 text-[9px] text-muted-foreground/60">(preset)');
|
|
8
8
|
function pe(N) {
|
|
9
9
|
const u = H(), [$, d] = R(!1), [I, _] = R(null), [P, h] = R(""), L = () => u.activeLayout(), D = () => u.layouts(), T = (e) => {
|
|
10
|
-
d(!1),
|
|
10
|
+
d(!1), v(() => u.setActiveLayout(e));
|
|
11
11
|
}, z = (e, r) => {
|
|
12
12
|
r.stopPropagation();
|
|
13
13
|
const p = D().find((n) => n.id === e);
|
|
14
14
|
if (p) {
|
|
15
|
-
d(!1),
|
|
15
|
+
d(!1), v(() => u.duplicateLayout(e, `${p.name} (Copy)`));
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
d(!1);
|
|
19
19
|
}, A = (e, r) => {
|
|
20
|
-
r.stopPropagation(), d(!1),
|
|
20
|
+
r.stopPropagation(), d(!1), v(() => u.deleteLayout(e));
|
|
21
21
|
}, O = (e, r, p) => {
|
|
22
22
|
p.stopPropagation(), _(e), h(r);
|
|
23
23
|
}, S = (e) => {
|
|
24
24
|
const r = P().trim();
|
|
25
|
-
_(null), h(""), r &&
|
|
25
|
+
_(null), h(""), r && v(() => u.renameLayout(e, r));
|
|
26
26
|
}, V = () => {
|
|
27
27
|
_(null), h("");
|
|
28
28
|
};
|
|
29
29
|
return (() => {
|
|
30
30
|
var e = Y(), r = e.firstChild, p = r.firstChild;
|
|
31
|
-
return r.$$click = () => d(!$()), o(p, () => L()?.name ?? "
|
|
31
|
+
return r.$$click = () => d(!$()), o(p, () => L()?.name ?? "Layout"), o(r, a(J, {
|
|
32
32
|
get class() {
|
|
33
|
-
return b("w-
|
|
33
|
+
return b("w-2.5 h-2.5 text-muted-foreground/50 transition-transform", $() && "rotate-180");
|
|
34
34
|
}
|
|
35
|
-
}), null), o(e, a(
|
|
35
|
+
}), null), o(e, a(g, {
|
|
36
36
|
get when() {
|
|
37
37
|
return $();
|
|
38
38
|
},
|
|
@@ -47,16 +47,16 @@ function pe(N) {
|
|
|
47
47
|
const E = () => l.id === u.activeLayoutId(), k = () => I() === l.id;
|
|
48
48
|
return (() => {
|
|
49
49
|
var m = ne(), F = m.firstChild;
|
|
50
|
-
return m.$$click = () => !k() && T(l.id), o(F, a(
|
|
50
|
+
return m.$$click = () => !k() && T(l.id), o(F, a(g, {
|
|
51
51
|
get when() {
|
|
52
52
|
return E();
|
|
53
53
|
},
|
|
54
54
|
get children() {
|
|
55
55
|
return a(K, {
|
|
56
|
-
class: "w-
|
|
56
|
+
class: "w-3 h-3 text-primary"
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
})), o(m, a(
|
|
59
|
+
})), o(m, a(g, {
|
|
60
60
|
get when() {
|
|
61
61
|
return !k();
|
|
62
62
|
},
|
|
@@ -75,15 +75,15 @@ function pe(N) {
|
|
|
75
75
|
return () => i() && le();
|
|
76
76
|
})(), null), t;
|
|
77
77
|
}
|
|
78
|
-
}), null), o(m, a(
|
|
78
|
+
}), null), o(m, a(g, {
|
|
79
79
|
get when() {
|
|
80
80
|
return !k();
|
|
81
81
|
},
|
|
82
82
|
get children() {
|
|
83
83
|
var t = re(), i = t.firstChild;
|
|
84
84
|
return i.$$click = (c) => z(l.id, c), o(i, a(M, {
|
|
85
|
-
class: "w-
|
|
86
|
-
})), o(t, a(
|
|
85
|
+
class: "w-2.5 h-2.5 text-muted-foreground/70"
|
|
86
|
+
})), o(t, a(g, {
|
|
87
87
|
get when() {
|
|
88
88
|
return !l.isPreset;
|
|
89
89
|
},
|
|
@@ -91,22 +91,22 @@ function pe(N) {
|
|
|
91
91
|
return [(() => {
|
|
92
92
|
var c = ee();
|
|
93
93
|
return c.$$click = (y) => O(l.id, l.name, y), o(c, a(Q, {
|
|
94
|
-
class: "w-
|
|
94
|
+
class: "w-2.5 h-2.5 text-muted-foreground/70"
|
|
95
95
|
})), c;
|
|
96
96
|
})(), (() => {
|
|
97
97
|
var c = te();
|
|
98
98
|
return c.$$click = (y) => A(l.id, y), o(c, a(U, {
|
|
99
|
-
class: "w-
|
|
99
|
+
class: "w-2.5 h-2.5 text-destructive/70"
|
|
100
100
|
})), c;
|
|
101
101
|
})()];
|
|
102
102
|
}
|
|
103
103
|
}), null), t;
|
|
104
104
|
}
|
|
105
|
-
}), null), w(() => C(m, b("flex items-center gap-
|
|
105
|
+
}), null), w(() => C(m, b("flex items-center gap-1.5 px-1.5 py-1 hover:bg-muted/60 transition-colors cursor-pointer group", E() && "bg-muted/60"))), m;
|
|
106
106
|
})();
|
|
107
107
|
}
|
|
108
108
|
})), B.$$click = () => {
|
|
109
|
-
d(!1),
|
|
109
|
+
d(!1), v(() => u.createLayout("New Layout"));
|
|
110
110
|
}, n;
|
|
111
111
|
})(), (() => {
|
|
112
112
|
var n = X();
|
|
@@ -114,7 +114,7 @@ function pe(N) {
|
|
|
114
114
|
})()];
|
|
115
115
|
}
|
|
116
116
|
}), null), w((n) => {
|
|
117
|
-
var f = b("relative", N.class), x = b("flex items-center gap-
|
|
117
|
+
var f = b("relative", N.class), x = b("flex items-center gap-1 px-1.5 h-5 rounded", "hover:bg-muted/50 transition-colors text-[10px] cursor-pointer", $() && "bg-muted/50");
|
|
118
118
|
return f !== n.e && C(e, n.e = f), x !== n.t && C(r, n.t = x), n;
|
|
119
119
|
}, {
|
|
120
120
|
e: void 0,
|
package/dist/index18.js
CHANGED
|
@@ -1,152 +1,155 @@
|
|
|
1
|
-
import { delegateEvents as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { useDeck as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
const
|
|
1
|
+
import { delegateEvents as N, insert as n, createComponent as o, effect as g, className as h, Portal as F, setStyleProperty as _, memo as k, template as l, use as I } from "solid-js/web";
|
|
2
|
+
import { createSignal as C, createEffect as M, onCleanup as T, Show as d, For as K } from "solid-js";
|
|
3
|
+
import { cn as p } from "./index106.js";
|
|
4
|
+
import { useDeck as j } from "./index97.js";
|
|
5
|
+
import { useResolvedFloeConfig as q } from "./index90.js";
|
|
6
|
+
import { useLayout as G } from "./index92.js";
|
|
7
|
+
import { useWidgetRegistry as H } from "./index96.js";
|
|
8
|
+
import { deferNonBlocking as P } from "./index107.js";
|
|
9
|
+
import { LayoutSelector as J } from "./index17.js";
|
|
10
|
+
import { Plus as O, ChevronDown as Q, Copy as U, Check as V, Pencil as X } from "./index38.js";
|
|
11
|
+
var Y = /* @__PURE__ */ l("<button><span>Add"), Z = /* @__PURE__ */ l('<div class="fixed inset-0 z-[9998]">'), ee = /* @__PURE__ */ l('<div class="px-3 py-4 text-xs text-muted-foreground text-center">No widgets available'), te = /* @__PURE__ */ l("<div><div class=p-1>"), re = /* @__PURE__ */ l('<button title="Duplicate & edit"><span>Duplicate & Edit'), oe = /* @__PURE__ */ l("<span>Done"), ne = /* @__PURE__ */ l("<button>"), ie = /* @__PURE__ */ l('<div><div class="w-px h-3.5 bg-border/40"></div><div class=flex-1>'), le = /* @__PURE__ */ l('<button class="w-full flex items-center gap-2 px-3 py-2 rounded hover:bg-muted transition-colors text-left cursor-pointer"><span class=text-xs>'), se = /* @__PURE__ */ l('<div class="w-4 h-4">'), ae = /* @__PURE__ */ l("<span>Edit");
|
|
12
|
+
function be($) {
|
|
13
|
+
const D = q(), s = j(), E = G(), w = H(), [v, m] = C(!1), [y, L] = C({
|
|
14
14
|
top: 0,
|
|
15
15
|
left: 0
|
|
16
16
|
});
|
|
17
|
-
let
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
if (
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
top:
|
|
25
|
-
left:
|
|
17
|
+
let x;
|
|
18
|
+
const S = () => E.isMobile(), b = () => (D.config.deck.presetsMode ?? "mutable") === "immutable" && !!s.activeLayout()?.isPreset, R = (r, i) => {
|
|
19
|
+
r.stopPropagation(), r.preventDefault(), m(!1), P(() => s.addWidget(i));
|
|
20
|
+
}, W = (r) => {
|
|
21
|
+
if (r.stopPropagation(), r.preventDefault(), !v() && x) {
|
|
22
|
+
const i = x.getBoundingClientRect();
|
|
23
|
+
L({
|
|
24
|
+
top: i.bottom + 4,
|
|
25
|
+
left: i.left
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
|
|
28
|
+
m((i) => !i);
|
|
29
|
+
}, B = () => {
|
|
30
|
+
m(!1);
|
|
31
31
|
};
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
return M(() => {
|
|
33
|
+
s.editMode() || m(!1);
|
|
34
|
+
}), M(() => {
|
|
35
|
+
if (!v() || typeof document > "u") return;
|
|
36
|
+
const r = (i) => {
|
|
37
|
+
i.key === "Escape" && m(!1);
|
|
36
38
|
};
|
|
37
|
-
document.addEventListener("keydown",
|
|
39
|
+
document.addEventListener("keydown", r), T(() => document.removeEventListener("keydown", r));
|
|
38
40
|
}), (() => {
|
|
39
|
-
var
|
|
40
|
-
return
|
|
41
|
+
var r = ie(), i = r.firstChild, z = i.nextSibling;
|
|
42
|
+
return n(r, o(J, {}), i), n(r, o(d, {
|
|
41
43
|
get when() {
|
|
42
|
-
return
|
|
44
|
+
return k(() => !!s.editMode())() && !b();
|
|
43
45
|
},
|
|
44
46
|
get children() {
|
|
45
|
-
return [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
get class() {
|
|
58
|
-
return h("w-3.5 h-3.5 ml-1 transition-transform", m() && "rotate-180");
|
|
59
|
-
}
|
|
60
|
-
})];
|
|
61
|
-
}
|
|
62
|
-
}), t(a, {
|
|
47
|
+
return [(() => {
|
|
48
|
+
var e = Y(), c = e.firstChild;
|
|
49
|
+
e.$$click = W;
|
|
50
|
+
var t = x;
|
|
51
|
+
return typeof t == "function" ? I(t, e) : x = e, n(e, o(O, {
|
|
52
|
+
class: "w-2.5 h-2.5"
|
|
53
|
+
}), c), n(e, o(Q, {
|
|
54
|
+
get class() {
|
|
55
|
+
return p("w-2.5 h-2.5 opacity-50 transition-transform", v() && "rotate-180");
|
|
56
|
+
}
|
|
57
|
+
}), null), g(() => h(e, p("flex items-center gap-1 px-1.5 h-5 rounded text-[10px]", "text-muted-foreground/70 hover:text-foreground hover:bg-muted/50", "transition-colors cursor-pointer"))), e;
|
|
58
|
+
})(), o(d, {
|
|
63
59
|
get when() {
|
|
64
|
-
return
|
|
60
|
+
return v();
|
|
65
61
|
},
|
|
66
62
|
get children() {
|
|
67
|
-
return
|
|
63
|
+
return o(F, {
|
|
68
64
|
get children() {
|
|
69
65
|
return [(() => {
|
|
70
|
-
var
|
|
71
|
-
return
|
|
66
|
+
var e = Z();
|
|
67
|
+
return e.$$click = B, e;
|
|
72
68
|
})(), (() => {
|
|
73
|
-
var
|
|
74
|
-
return
|
|
69
|
+
var e = te(), c = e.firstChild;
|
|
70
|
+
return n(c, o(K, {
|
|
75
71
|
get each() {
|
|
76
72
|
return Array.from(w.widgets().values());
|
|
77
73
|
},
|
|
78
|
-
children: (
|
|
79
|
-
var
|
|
80
|
-
return
|
|
74
|
+
children: (t) => (() => {
|
|
75
|
+
var a = le(), f = a.firstChild;
|
|
76
|
+
return a.$$click = (u) => R(u, t.type), n(a, o(d, {
|
|
81
77
|
get when() {
|
|
82
|
-
return
|
|
78
|
+
return t.icon;
|
|
83
79
|
},
|
|
84
80
|
get fallback() {
|
|
85
|
-
return
|
|
81
|
+
return se();
|
|
86
82
|
},
|
|
87
|
-
children: (
|
|
88
|
-
const
|
|
89
|
-
return
|
|
83
|
+
children: (u) => {
|
|
84
|
+
const A = u();
|
|
85
|
+
return o(A, {
|
|
90
86
|
class: "w-4 h-4 text-muted-foreground"
|
|
91
87
|
});
|
|
92
88
|
}
|
|
93
|
-
}), f),
|
|
89
|
+
}), f), n(f, () => t.name), a;
|
|
94
90
|
})()
|
|
95
|
-
}), null),
|
|
91
|
+
}), null), n(c, o(d, {
|
|
96
92
|
get when() {
|
|
97
93
|
return w.widgets().size === 0;
|
|
98
94
|
},
|
|
99
95
|
get children() {
|
|
100
|
-
return
|
|
96
|
+
return ee();
|
|
101
97
|
}
|
|
102
|
-
}), null),
|
|
103
|
-
var
|
|
104
|
-
return
|
|
98
|
+
}), null), g((t) => {
|
|
99
|
+
var a = p("fixed z-[9999]", "min-w-[180px] max-h-[300px] overflow-y-auto", "bg-popover border border-border rounded-md shadow-xl", "animate-in fade-in slide-in-from-top-1 duration-150"), f = `${y().top}px`, u = `${Math.max(8, y().left)}px`;
|
|
100
|
+
return a !== t.e && h(e, t.e = a), f !== t.t && _(e, "top", t.t = f), u !== t.a && _(e, "left", t.a = u), t;
|
|
105
101
|
}, {
|
|
106
102
|
e: void 0,
|
|
107
103
|
t: void 0,
|
|
108
104
|
a: void 0
|
|
109
|
-
}),
|
|
105
|
+
}), e;
|
|
110
106
|
})()];
|
|
111
107
|
}
|
|
112
108
|
});
|
|
113
109
|
}
|
|
114
110
|
})];
|
|
115
111
|
}
|
|
116
|
-
}),
|
|
112
|
+
}), z), n(r, o(d, {
|
|
117
113
|
get when() {
|
|
118
|
-
return
|
|
114
|
+
return b();
|
|
119
115
|
},
|
|
120
116
|
get children() {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
117
|
+
var e = re(), c = e.firstChild;
|
|
118
|
+
return e.$$click = () => {
|
|
119
|
+
const t = s.activeLayout();
|
|
120
|
+
t && P(() => {
|
|
121
|
+
s.duplicateLayout(t.id, `${t.name} (Copy)`), s.setEditMode(!0);
|
|
122
|
+
});
|
|
123
|
+
}, n(e, o(U, {
|
|
124
|
+
class: "w-2.5 h-2.5"
|
|
125
|
+
}), c), g(() => h(e, p("flex items-center gap-1 px-1.5 h-5 rounded text-[10px]", "text-muted-foreground/70 hover:text-foreground hover:bg-muted/50", "transition-colors cursor-pointer"))), e;
|
|
126
|
+
}
|
|
127
|
+
}), null), n(r, o(d, {
|
|
128
|
+
get when() {
|
|
129
|
+
return k(() => !S())() && !b();
|
|
130
|
+
},
|
|
131
|
+
get children() {
|
|
132
|
+
var e = ne();
|
|
133
|
+
return e.$$click = () => s.toggleEditMode(), n(e, o(d, {
|
|
134
|
+
get when() {
|
|
135
|
+
return s.editMode();
|
|
136
|
+
},
|
|
137
|
+
get fallback() {
|
|
138
|
+
return [o(X, {
|
|
139
|
+
class: "w-2.5 h-2.5"
|
|
140
|
+
}), ae()];
|
|
124
141
|
},
|
|
125
|
-
size: "sm",
|
|
126
|
-
onClick: () => c.toggleEditMode(),
|
|
127
142
|
get children() {
|
|
128
|
-
return
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
get fallback() {
|
|
133
|
-
return [t(H, {
|
|
134
|
-
class: "w-3.5 h-3.5 mr-1.5"
|
|
135
|
-
}), "Edit"];
|
|
136
|
-
},
|
|
137
|
-
get children() {
|
|
138
|
-
return [t(G, {
|
|
139
|
-
class: "w-3.5 h-3.5 mr-1.5"
|
|
140
|
-
}), "Done"];
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
+
return [o(V, {
|
|
144
|
+
class: "w-2.5 h-2.5"
|
|
145
|
+
}), oe()];
|
|
143
146
|
}
|
|
144
|
-
});
|
|
147
|
+
})), g(() => h(e, p("flex items-center gap-1 px-1.5 h-5 rounded text-[10px] transition-colors cursor-pointer", s.editMode() ? "bg-primary text-primary-foreground hover:bg-primary/90" : "text-muted-foreground/70 hover:text-foreground hover:bg-muted/50"))), e;
|
|
145
148
|
}
|
|
146
|
-
}), null),
|
|
149
|
+
}), null), n(r, () => $.actions, null), g(() => h(r, p("deck-topbar flex items-center gap-1.5 h-7 px-2", "bg-gradient-to-b from-background to-background/95", "border-b border-border/30", $.class))), r;
|
|
147
150
|
})();
|
|
148
151
|
}
|
|
149
|
-
|
|
152
|
+
N(["click"]);
|
|
150
153
|
export {
|
|
151
|
-
|
|
154
|
+
be as DeckTopBar
|
|
152
155
|
};
|
package/dist/index20.js
CHANGED
|
@@ -11,18 +11,20 @@ const f = {
|
|
|
11
11
|
ghost: "hover:bg-accent hover:text-accent-foreground active:scale-[0.98]",
|
|
12
12
|
destructive: "bg-error text-error-foreground shadow-sm hover:bg-error/90 active:scale-[0.98]"
|
|
13
13
|
}, v = {
|
|
14
|
+
xs: "h-6 px-2 text-[11px] rounded",
|
|
14
15
|
sm: "h-7 px-2.5 text-xs rounded",
|
|
15
16
|
md: "h-8 px-3 text-xs rounded-md",
|
|
16
17
|
lg: "h-9 px-4 text-sm rounded-md",
|
|
17
18
|
icon: "h-8 w-8 rounded-md"
|
|
18
|
-
},
|
|
19
|
+
}, x = {
|
|
20
|
+
xs: "w-3 h-3",
|
|
19
21
|
sm: "w-3.5 h-3.5",
|
|
20
22
|
md: "w-3.5 h-3.5",
|
|
21
23
|
lg: "w-4 h-4",
|
|
22
24
|
icon: "w-4 h-4"
|
|
23
25
|
};
|
|
24
26
|
function k(i) {
|
|
25
|
-
const [e, a] = g(i, ["variant", "size", "loading", "icon", "class", "children", "disabled"]), o = () =>
|
|
27
|
+
const [e, a] = g(i, ["variant", "size", "loading", "icon", "class", "children", "disabled"]), o = () => x[e.size ?? "md"];
|
|
26
28
|
return (() => {
|
|
27
29
|
var r = b();
|
|
28
30
|
return c(r, d({
|