@base-framework/ui 1.0.203 → 1.0.204
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-DRTWoAn9.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-DRTWoAn9.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";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Span as g, Div as o, Legend as b, Fieldset as x, UseParent as u, Input as
|
|
2
|
-
import { Atom as s, Html as
|
|
1
|
+
import { Span as g, Div as o, Legend as b, Fieldset as x, H4 as C, P as h, UseParent as u, Input as y } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as s, Html as p } from "@base-framework/base";
|
|
3
3
|
import { a as d } from "./veil-D4dRxILB.js";
|
|
4
|
-
import { f as
|
|
4
|
+
import { f as k, e as w, g as $ } from "./inputs-CMjx5-IX.js";
|
|
5
5
|
const a = {
|
|
6
6
|
gray: {
|
|
7
7
|
backgroundColor: "bg-gray-50",
|
|
@@ -78,31 +78,31 @@ const a = {
|
|
|
78
78
|
textColor: "text-primary",
|
|
79
79
|
ringColor: "ring-background"
|
|
80
80
|
}
|
|
81
|
-
},
|
|
82
|
-
const { backgroundColor: r, textColor: e, ringColor: l } =
|
|
81
|
+
}, v = (t) => a[t] || a.gray, P = (t) => {
|
|
82
|
+
const { backgroundColor: r, textColor: e, ringColor: l } = v(t);
|
|
83
83
|
return `inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors ${r} ${e} ${l}`;
|
|
84
|
-
},
|
|
85
|
-
const e =
|
|
84
|
+
}, G = s((t, r) => {
|
|
85
|
+
const e = P(t == null ? void 0 : t.type);
|
|
86
86
|
return g({ ...t, class: e }, r);
|
|
87
|
-
}),
|
|
87
|
+
}), I = s((t, r) => {
|
|
88
88
|
const e = t.margin ?? "my-5 mx-5", l = t.padding ?? "p-4";
|
|
89
89
|
return t.hover && (t.class += " hover:shadow-lg hover:bg-muted/50"), o({
|
|
90
90
|
...t,
|
|
91
91
|
class: `rounded-lg border bg-card text-card-foreground shadow-md min-w-[120px] min-h-[80px] ${e} ${l} ${t.class || ""}`
|
|
92
92
|
}, r);
|
|
93
|
-
}),
|
|
93
|
+
}), S = s((t, r) => b({
|
|
94
94
|
...t,
|
|
95
95
|
class: ` font-medium bg-background -mt-4 -mx-1 px-2 py-2 ${t.class || ""}`
|
|
96
|
-
}, r)),
|
|
96
|
+
}, r)), R = s((t, r) => {
|
|
97
97
|
const e = t.border === "full" ? "border rounded-md" : "border-t";
|
|
98
98
|
return x({
|
|
99
99
|
...t,
|
|
100
100
|
class: `p-6 ${e} ${t.class || ""}`
|
|
101
101
|
}, [
|
|
102
|
-
t.legend &&
|
|
102
|
+
t.legend && S(t.legend),
|
|
103
103
|
o({ class: "flex flex-auto flex-col space-y-6" }, r)
|
|
104
104
|
]);
|
|
105
|
-
}),
|
|
105
|
+
}), O = s((t, r) => {
|
|
106
106
|
var e;
|
|
107
107
|
return o({
|
|
108
108
|
...t,
|
|
@@ -114,16 +114,19 @@ const a = {
|
|
|
114
114
|
t.label && o({
|
|
115
115
|
...t.labelProps,
|
|
116
116
|
class: `w-full
|
|
117
|
-
sm:w-1/
|
|
118
|
-
text-
|
|
117
|
+
sm:w-1/3
|
|
118
|
+
text-base font-medium
|
|
119
119
|
${((e = t.labelProps) == null ? void 0 : e.class) || ""}`
|
|
120
|
-
}, [
|
|
120
|
+
}, [
|
|
121
|
+
C({ class: "text-base font-medium" }, t.label),
|
|
122
|
+
t.description && h({ class: "text-muted-foreground" }, t.description)
|
|
123
|
+
]),
|
|
121
124
|
// Controls container: grows to fill remaining space, spacing between items
|
|
122
125
|
o({
|
|
123
126
|
class: "w-full sm:flex-1 flex flex-col space-y-4"
|
|
124
127
|
}, r)
|
|
125
128
|
]);
|
|
126
|
-
}),
|
|
129
|
+
}), V = d(
|
|
127
130
|
{
|
|
128
131
|
/**
|
|
129
132
|
* This will create the initial state of the RangeSlider.
|
|
@@ -173,7 +176,7 @@ const a = {
|
|
|
173
176
|
style: ["left: [[filledPercentage]]%", t]
|
|
174
177
|
}),
|
|
175
178
|
// Hidden Range Input
|
|
176
|
-
|
|
179
|
+
y({
|
|
177
180
|
type: "range",
|
|
178
181
|
min: ["[[min]]", t],
|
|
179
182
|
max: ["[[max]]", t],
|
|
@@ -181,8 +184,8 @@ const a = {
|
|
|
181
184
|
// Incorporate your new classes here
|
|
182
185
|
class: `
|
|
183
186
|
absolute w-full h-full opacity-0 cursor-pointer
|
|
184
|
-
${
|
|
185
|
-
${
|
|
187
|
+
${k}
|
|
188
|
+
${w}
|
|
186
189
|
${this.class || ""}
|
|
187
190
|
`.trim(),
|
|
188
191
|
bind: this.bind,
|
|
@@ -195,14 +198,14 @@ const a = {
|
|
|
195
198
|
]);
|
|
196
199
|
}
|
|
197
200
|
}
|
|
198
|
-
),
|
|
201
|
+
), D = s((t) => ({
|
|
199
202
|
tag: "select",
|
|
200
203
|
onCreated(r) {
|
|
201
|
-
t.options &&
|
|
204
|
+
t.options && p.setupSelectOptions(r, t.options);
|
|
202
205
|
},
|
|
203
206
|
...t,
|
|
204
|
-
class: `${
|
|
205
|
-
})),
|
|
207
|
+
class: `${$} ${t.class || ""}`.trim()
|
|
208
|
+
})), E = (t) => !t || isNaN(t) ? null : t, i = (t, r) => {
|
|
206
209
|
const e = t, l = 16, n = 2 * Math.PI * l, m = e / 100 * n, f = `
|
|
207
210
|
<svg class="w-40 h-40 mx-auto" viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg">
|
|
208
211
|
<!-- Background Circle -->
|
|
@@ -245,19 +248,19 @@ const a = {
|
|
|
245
248
|
class: "circle-graph text-inherit",
|
|
246
249
|
html: f
|
|
247
250
|
});
|
|
248
|
-
},
|
|
251
|
+
}, H = s((t) => {
|
|
249
252
|
const r = t.progress || 0, e = t.class || "", l = i(r, e);
|
|
250
253
|
return o({
|
|
251
254
|
class: "circle-graph-wrap",
|
|
252
255
|
onSet: [
|
|
253
256
|
t.prop,
|
|
254
|
-
(n) => (n =
|
|
257
|
+
(n) => (n = E(n), n ? i(n, e) : l)
|
|
255
258
|
]
|
|
256
259
|
}, [l]);
|
|
257
|
-
}),
|
|
260
|
+
}), B = () => u(({ state: t }) => o({
|
|
258
261
|
class: "absolute h-full rounded-full bg-primary transition-all duration-300",
|
|
259
262
|
style: ["width: [[progress]]%;", t]
|
|
260
|
-
})),
|
|
263
|
+
})), M = d(
|
|
261
264
|
{
|
|
262
265
|
/**
|
|
263
266
|
* This will render the progress bar component.
|
|
@@ -266,7 +269,7 @@ const a = {
|
|
|
266
269
|
*/
|
|
267
270
|
render() {
|
|
268
271
|
return o({ class: "relative w-full h-4 rounded-full bg-muted" }, [
|
|
269
|
-
|
|
272
|
+
B()
|
|
270
273
|
]);
|
|
271
274
|
},
|
|
272
275
|
/**
|
|
@@ -309,7 +312,7 @@ const a = {
|
|
|
309
312
|
t < 0 && (t = 0), t > 100 && (t = 100), this.state.progress = t;
|
|
310
313
|
}
|
|
311
314
|
}
|
|
312
|
-
),
|
|
315
|
+
), _ = ({ class: t, shape: r = "rectangle", width: e = "w-full", height: l = "h-4" }) => o({
|
|
313
316
|
class: `bg-muted animate-pulse ${e} ${l} ${r === "circle" ? "rounded-full" : "rounded-md"} ${t || ""}`
|
|
314
317
|
}), c = {
|
|
315
318
|
top: "bottom-full left-1/2 transform -translate-x-1/2 mb-2",
|
|
@@ -320,8 +323,8 @@ const a = {
|
|
|
320
323
|
"bottom-left": "top-full right-full transform translate-x-1 mt-2",
|
|
321
324
|
left: "top-1/2 right-full transform -translate-y-1/2 mr-2",
|
|
322
325
|
right: "top-1/2 left-full transform -translate-y-1/2 ml-2"
|
|
323
|
-
},
|
|
324
|
-
const l =
|
|
326
|
+
}, F = (t) => c[t] || c.top, z = s(({ position: t = "top", content: r }, e) => {
|
|
327
|
+
const l = F(t);
|
|
325
328
|
return Array.isArray(e) === !1 && (e = [e]), o({ class: "relative group inline-block" }, [
|
|
326
329
|
...e,
|
|
327
330
|
// Tooltip box
|
|
@@ -334,15 +337,15 @@ const a = {
|
|
|
334
337
|
]);
|
|
335
338
|
});
|
|
336
339
|
export {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
R,
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
340
|
+
G as B,
|
|
341
|
+
I as C,
|
|
342
|
+
R as F,
|
|
343
|
+
S as L,
|
|
344
|
+
M as P,
|
|
345
|
+
V as R,
|
|
346
|
+
D as S,
|
|
347
|
+
z as T,
|
|
348
|
+
O as a,
|
|
349
|
+
H as b,
|
|
350
|
+
_ as c
|
|
348
351
|
};
|
package/package.json
CHANGED