@base-framework/ui 1.0.206 → 1.0.208
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/atoms.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as e, C as t, b as o, F as n, a as r, L as p, P as u, R as I, S as i, c as l, T as d } from "./tooltip-
|
|
1
|
+
import { B as e, C as t, b as o, F as n, a as r, L as p, P as u, R as I, S as i, c as l, T as d } from "./tooltip-Ssw4NmQM.js";
|
|
2
2
|
import { B as T, I as c, L as x } from "./buttons-Cm9etaEG.js";
|
|
3
3
|
import { C, d as g, D as F, c as b, E as f, F as L, H as P, I as R, M as S, N as h, P as k, R as D, T as V, a as E, b as G, U as H, W as M } from "./inputs-CMjx5-IX.js";
|
|
4
4
|
import { V as U, a as W } from "./veil-D4dRxILB.js";
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as e, C as o, b as t, F as r, a as n, L as l, P as i, R as p, S as u, c as m, T as d } from "./tooltip-
|
|
1
|
+
import { B as e, C as o, b as t, F as r, a as n, L as l, P as i, R as p, S as u, c as m, T as d } from "./tooltip-Ssw4NmQM.js";
|
|
2
2
|
import { B as g, I as C, L as T } from "./buttons-Cm9etaEG.js";
|
|
3
3
|
import { C as D, d as I, D as S, c as B, E as P, F, H as M, I as k, M as N, N as f, P as v, R as x, T as y, a as h, b as W, U as H, W as L } from "./inputs-CMjx5-IX.js";
|
|
4
4
|
import { V as w, a as U } from "./veil-D4dRxILB.js";
|
|
@@ -79,45 +79,45 @@ const a = {
|
|
|
79
79
|
ringColor: "ring-background"
|
|
80
80
|
}
|
|
81
81
|
}, v = (t) => a[t] || a.gray, P = (t) => {
|
|
82
|
-
const { backgroundColor:
|
|
83
|
-
return `inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors ${
|
|
84
|
-
}, G = s((t,
|
|
85
|
-
const
|
|
86
|
-
return g({ ...t, class:
|
|
87
|
-
}), I = s((t,
|
|
88
|
-
const
|
|
82
|
+
const { backgroundColor: e, textColor: r, ringColor: o } = v(t);
|
|
83
|
+
return `inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors ${e} ${r} ${o}`;
|
|
84
|
+
}, G = s((t, e) => {
|
|
85
|
+
const r = P(t == null ? void 0 : t.type);
|
|
86
|
+
return g({ ...t, class: r }, e);
|
|
87
|
+
}), I = s((t, e) => {
|
|
88
|
+
const r = t.margin ?? "my-5 mx-5", o = t.padding ?? "p-4";
|
|
89
89
|
return t.hover && (t.class += " hover:shadow-lg hover:bg-muted/50"), l({
|
|
90
90
|
...t,
|
|
91
|
-
class: `rounded-lg border bg-card text-card-foreground shadow-md min-w-[120px] min-h-[80px] ${
|
|
92
|
-
},
|
|
93
|
-
}), S = s((t,
|
|
91
|
+
class: `rounded-lg border bg-card text-card-foreground shadow-md min-w-[120px] min-h-[80px] ${r} ${o} ${t.class || ""}`
|
|
92
|
+
}, e);
|
|
93
|
+
}), S = s((t, e) => f({
|
|
94
94
|
...t,
|
|
95
95
|
class: ` font-medium bg-background -mt-4 -mx-1 px-2 py-2 ${t.class || ""}`
|
|
96
|
-
},
|
|
97
|
-
const
|
|
96
|
+
}, e)), R = s((t, e) => {
|
|
97
|
+
const r = t.border === "full" ? "border rounded-md" : "border-t";
|
|
98
98
|
return x({
|
|
99
99
|
...t,
|
|
100
|
-
class: `p-6 ${
|
|
100
|
+
class: `p-6 ${r} ${t.class || ""}`
|
|
101
101
|
}, [
|
|
102
102
|
t.legend && S(t.legend),
|
|
103
|
-
l({ class: "flex flex-auto flex-col space-y-6" },
|
|
103
|
+
l({ class: "flex flex-auto flex-col space-y-6" }, e)
|
|
104
104
|
]);
|
|
105
|
-
}), O = s((t,
|
|
105
|
+
}), O = s((t, e) => {
|
|
106
106
|
var o;
|
|
107
|
-
const
|
|
107
|
+
const r = t.border === !0 ? "border-t" : "";
|
|
108
108
|
return l({
|
|
109
109
|
...t,
|
|
110
|
-
class: `
|
|
110
|
+
class: `grid grid-cols-1 gap-y-4 sm:grid-cols-[1fr,2fr] sm:gap-x-6 pt-8 ${r} ${t.class || ""}`
|
|
111
111
|
}, [
|
|
112
112
|
t.label && l({
|
|
113
113
|
...t.labelProps,
|
|
114
|
-
class: `
|
|
114
|
+
class: `space-y-1 ${((o = t.labelProps) == null ? void 0 : o.class) || ""}`
|
|
115
115
|
}, [
|
|
116
116
|
C({ class: "text-base" }, t.label),
|
|
117
117
|
t.description && h({ class: "text-sm text-muted-foreground" }, t.description)
|
|
118
118
|
]),
|
|
119
119
|
// Controls container: grows to fill remaining space, spacing between items
|
|
120
|
-
l({ class: "
|
|
120
|
+
l({ class: "flex flex-col space-y-4" }, e)
|
|
121
121
|
]);
|
|
122
122
|
}), V = d(
|
|
123
123
|
{
|
|
@@ -182,9 +182,9 @@ const a = {
|
|
|
182
182
|
${this.class || ""}
|
|
183
183
|
`.trim(),
|
|
184
184
|
bind: this.bind,
|
|
185
|
-
input: (
|
|
186
|
-
const
|
|
187
|
-
this.state.value =
|
|
185
|
+
input: (e) => {
|
|
186
|
+
const r = Number(e.target.value);
|
|
187
|
+
this.state.value = r, this.state.filledPercentage = this.getFillPercentage(r), typeof this.change == "function" && this.change(r);
|
|
188
188
|
}
|
|
189
189
|
})
|
|
190
190
|
])
|
|
@@ -193,13 +193,13 @@ const a = {
|
|
|
193
193
|
}
|
|
194
194
|
), D = s((t) => ({
|
|
195
195
|
tag: "select",
|
|
196
|
-
onCreated(
|
|
197
|
-
t.options && p.setupSelectOptions(
|
|
196
|
+
onCreated(e) {
|
|
197
|
+
t.options && p.setupSelectOptions(e, t.options);
|
|
198
198
|
},
|
|
199
199
|
...t,
|
|
200
200
|
class: `${$} ${t.class || ""}`.trim()
|
|
201
|
-
})), E = (t) => !t || isNaN(t) ? null : t, i = (t,
|
|
202
|
-
const
|
|
201
|
+
})), E = (t) => !t || isNaN(t) ? null : t, i = (t, e) => {
|
|
202
|
+
const r = t, o = 16, n = 2 * Math.PI * o, m = r / 100 * n, b = `
|
|
203
203
|
<svg class="w-40 h-40 mx-auto" viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg">
|
|
204
204
|
<!-- Background Circle -->
|
|
205
205
|
<circle
|
|
@@ -224,7 +224,7 @@ const a = {
|
|
|
224
224
|
stroke-dasharray="${n}"
|
|
225
225
|
stroke-dashoffset="${n - m}"
|
|
226
226
|
stroke-linecap="round"
|
|
227
|
-
class="${
|
|
227
|
+
class="${e}"
|
|
228
228
|
/>
|
|
229
229
|
<!-- Percentage Text -->
|
|
230
230
|
<text
|
|
@@ -233,7 +233,7 @@ const a = {
|
|
|
233
233
|
class="text-[0.25em] font-medium fill-primary"
|
|
234
234
|
text-anchor="middle"
|
|
235
235
|
dominant-baseline="middle">
|
|
236
|
-
${
|
|
236
|
+
${r}%
|
|
237
237
|
</text>
|
|
238
238
|
</svg>
|
|
239
239
|
`;
|
|
@@ -242,12 +242,12 @@ const a = {
|
|
|
242
242
|
html: b
|
|
243
243
|
});
|
|
244
244
|
}, H = s((t) => {
|
|
245
|
-
const
|
|
245
|
+
const e = t.progress || 0, r = t.class || "", o = i(e, r);
|
|
246
246
|
return l({
|
|
247
247
|
class: "circle-graph-wrap",
|
|
248
248
|
onSet: [
|
|
249
249
|
t.prop,
|
|
250
|
-
(n) => (n = E(n), n ? i(n,
|
|
250
|
+
(n) => (n = E(n), n ? i(n, r) : o)
|
|
251
251
|
]
|
|
252
252
|
}, [o]);
|
|
253
253
|
}), B = () => u(({ state: t }) => l({
|
|
@@ -291,8 +291,8 @@ const a = {
|
|
|
291
291
|
*/
|
|
292
292
|
uploadProgress(t) {
|
|
293
293
|
if (t.lengthComputable) {
|
|
294
|
-
const
|
|
295
|
-
this.set(
|
|
294
|
+
const r = Math.round(t.loaded * 100 / t.total);
|
|
295
|
+
this.set(r);
|
|
296
296
|
}
|
|
297
297
|
},
|
|
298
298
|
/**
|
|
@@ -305,8 +305,8 @@ const a = {
|
|
|
305
305
|
t < 0 && (t = 0), t > 100 && (t = 100), this.state.progress = t;
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
|
-
), _ = ({ class: t, shape:
|
|
309
|
-
class: `bg-muted animate-pulse ${
|
|
308
|
+
), _ = ({ class: t, shape: e = "rectangle", width: r = "w-full", height: o = "h-4" }) => l({
|
|
309
|
+
class: `bg-muted animate-pulse ${r} ${o} ${e === "circle" ? "rounded-full" : "rounded-md"} ${t || ""}`
|
|
310
310
|
}), c = {
|
|
311
311
|
top: "bottom-full left-1/2 transform -translate-x-1/2 mb-2",
|
|
312
312
|
"top-right": "bottom-full left-full transform -translate-x-1 mb-2",
|
|
@@ -316,17 +316,17 @@ const a = {
|
|
|
316
316
|
"bottom-left": "top-full right-full transform translate-x-1 mt-2",
|
|
317
317
|
left: "top-1/2 right-full transform -translate-y-1/2 mr-2",
|
|
318
318
|
right: "top-1/2 left-full transform -translate-y-1/2 ml-2"
|
|
319
|
-
}, F = (t) => c[t] || c.top, z = s(({ position: t = "top", content:
|
|
319
|
+
}, F = (t) => c[t] || c.top, z = s(({ position: t = "top", content: e }, r) => {
|
|
320
320
|
const o = F(t);
|
|
321
|
-
return Array.isArray(
|
|
322
|
-
...
|
|
321
|
+
return Array.isArray(r) === !1 && (r = [r]), l({ class: "relative group inline-block" }, [
|
|
322
|
+
...r,
|
|
323
323
|
// Tooltip box
|
|
324
324
|
g({
|
|
325
325
|
class: `
|
|
326
326
|
absolute z-20 px-2 py-1 border text-sm bg-background rounded shadow-md opacity-0 whitespace-nowrap
|
|
327
327
|
group-hover:opacity-100 transition-opacity duration-200 ${o} pointer-events-none
|
|
328
328
|
`
|
|
329
|
-
},
|
|
329
|
+
}, e)
|
|
330
330
|
]);
|
|
331
331
|
});
|
|
332
332
|
export {
|
package/package.json
CHANGED