@base-framework/ui 1.0.204 → 1.0.206

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-DRTWoAn9.js";
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-Da-I1JSX.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-DRTWoAn9.js";
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-Da-I1JSX.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,4 +1,4 @@
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";
1
+ import { Span as g, Div as l, Legend as f, Fieldset as x, H4 as C, P as h, UseParent as u, Input as y } from "@base-framework/atoms";
2
2
  import { Atom as s, Html as p } from "@base-framework/base";
3
3
  import { a as d } from "./veil-D4dRxILB.js";
4
4
  import { f as k, e as w, g as $ } from "./inputs-CMjx5-IX.js";
@@ -79,18 +79,18 @@ const a = {
79
79
  ringColor: "ring-background"
80
80
  }
81
81
  }, v = (t) => a[t] || a.gray, P = (t) => {
82
- const { backgroundColor: r, textColor: e, ringColor: l } = v(t);
83
- return `inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors ${r} ${e} ${l}`;
82
+ const { backgroundColor: r, textColor: e, 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 ${r} ${e} ${o}`;
84
84
  }, G = s((t, r) => {
85
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
- const e = t.margin ?? "my-5 mx-5", l = t.padding ?? "p-4";
89
- return t.hover && (t.class += " hover:shadow-lg hover:bg-muted/50"), o({
88
+ const e = t.margin ?? "my-5 mx-5", o = t.padding ?? "p-4";
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] ${e} ${l} ${t.class || ""}`
91
+ class: `rounded-lg border bg-card text-card-foreground shadow-md min-w-[120px] min-h-[80px] ${e} ${o} ${t.class || ""}`
92
92
  }, r);
93
- }), S = s((t, r) => b({
93
+ }), S = s((t, r) => f({
94
94
  ...t,
95
95
  class: ` font-medium bg-background -mt-4 -mx-1 px-2 py-2 ${t.class || ""}`
96
96
  }, r)), R = s((t, r) => {
@@ -100,31 +100,24 @@ const a = {
100
100
  class: `p-6 ${e} ${t.class || ""}`
101
101
  }, [
102
102
  t.legend && S(t.legend),
103
- o({ class: "flex flex-auto flex-col space-y-6" }, r)
103
+ l({ class: "flex flex-auto flex-col space-y-6" }, r)
104
104
  ]);
105
105
  }), O = s((t, r) => {
106
- var e;
107
- return o({
106
+ var o;
107
+ const e = t.border === !0 ? "border-t" : "";
108
+ return l({
108
109
  ...t,
109
- class: `flex flex-col
110
- sm:flex-row sm:items-center
111
- ${t.class || ""}`
110
+ class: `flex flex-col sm:flex-row pt-2 ${e} ${t.class || ""}`
112
111
  }, [
113
- // Label container: 1/4 width on sm+, full-width on mobile
114
- t.label && o({
112
+ t.label && l({
115
113
  ...t.labelProps,
116
- class: `w-full
117
- sm:w-1/3
118
- text-base font-medium
119
- ${((e = t.labelProps) == null ? void 0 : e.class) || ""}`
114
+ class: `w-full sm:w-1/3 space-y-2 ${((o = t.labelProps) == null ? void 0 : o.class) || ""}`
120
115
  }, [
121
- C({ class: "text-base font-medium" }, t.label),
122
- t.description && h({ class: "text-muted-foreground" }, t.description)
116
+ C({ class: "text-base" }, t.label),
117
+ t.description && h({ class: "text-sm text-muted-foreground" }, t.description)
123
118
  ]),
124
119
  // Controls container: grows to fill remaining space, spacing between items
125
- o({
126
- class: "w-full sm:flex-1 flex flex-col space-y-4"
127
- }, r)
120
+ l({ class: "w-full sm:flex-1 flex flex-col space-y-4" }, r)
128
121
  ]);
129
122
  }), V = d(
130
123
  {
@@ -156,17 +149,17 @@ const a = {
156
149
  * @returns {object}
157
150
  */
158
151
  render() {
159
- return o({ class: "relative w-full h-4 flex items-center" }, [
152
+ return l({ class: "relative w-full h-4 flex items-center" }, [
160
153
  // Track
161
- o({ class: "absolute h-2 w-full rounded-full bg-muted" }),
154
+ l({ class: "absolute h-2 w-full rounded-full bg-muted" }),
162
155
  u(({ state: t }) => [
163
156
  // Filled Track
164
- o({
157
+ l({
165
158
  class: "absolute h-2 bg-primary rounded-full",
166
159
  style: ["width: [[filledPercentage]]%", t]
167
160
  }),
168
161
  // Thumb
169
- o({
162
+ l({
170
163
  class: `
171
164
  absolute block h-5 w-5 rounded-full border-2 border-primary bg-background
172
165
  ring-offset-background transition-colors focus-visible:outline-none
@@ -206,13 +199,13 @@ const a = {
206
199
  ...t,
207
200
  class: `${$} ${t.class || ""}`.trim()
208
201
  })), E = (t) => !t || isNaN(t) ? null : t, i = (t, r) => {
209
- const e = t, l = 16, n = 2 * Math.PI * l, m = e / 100 * n, f = `
202
+ const e = t, o = 16, n = 2 * Math.PI * o, m = e / 100 * n, b = `
210
203
  <svg class="w-40 h-40 mx-auto" viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg">
211
204
  <!-- Background Circle -->
212
205
  <circle
213
206
  cx="18"
214
207
  cy="18"
215
- r="${l}"
208
+ r="${o}"
216
209
  fill="none"
217
210
  stroke="currentColor"
218
211
  stroke-width="4"
@@ -223,7 +216,7 @@ const a = {
223
216
  <circle
224
217
  cx="18"
225
218
  cy="18"
226
- r="${l}"
219
+ r="${o}"
227
220
  fill="none"
228
221
  stroke="currentColor"
229
222
  stroke-width="4"
@@ -244,20 +237,20 @@ const a = {
244
237
  </text>
245
238
  </svg>
246
239
  `;
247
- return o({
240
+ return l({
248
241
  class: "circle-graph text-inherit",
249
- html: f
242
+ html: b
250
243
  });
251
244
  }, H = s((t) => {
252
- const r = t.progress || 0, e = t.class || "", l = i(r, e);
253
- return o({
245
+ const r = t.progress || 0, e = t.class || "", o = i(r, e);
246
+ return l({
254
247
  class: "circle-graph-wrap",
255
248
  onSet: [
256
249
  t.prop,
257
- (n) => (n = E(n), n ? i(n, e) : l)
250
+ (n) => (n = E(n), n ? i(n, e) : o)
258
251
  ]
259
- }, [l]);
260
- }), B = () => u(({ state: t }) => o({
252
+ }, [o]);
253
+ }), B = () => u(({ state: t }) => l({
261
254
  class: "absolute h-full rounded-full bg-primary transition-all duration-300",
262
255
  style: ["width: [[progress]]%;", t]
263
256
  })), M = d(
@@ -268,7 +261,7 @@ const a = {
268
261
  * @returns {object}
269
262
  */
270
263
  render() {
271
- return o({ class: "relative w-full h-4 rounded-full bg-muted" }, [
264
+ return l({ class: "relative w-full h-4 rounded-full bg-muted" }, [
272
265
  B()
273
266
  ]);
274
267
  },
@@ -312,8 +305,8 @@ const a = {
312
305
  t < 0 && (t = 0), t > 100 && (t = 100), this.state.progress = t;
313
306
  }
314
307
  }
315
- ), _ = ({ class: t, shape: r = "rectangle", width: e = "w-full", height: l = "h-4" }) => o({
316
- class: `bg-muted animate-pulse ${e} ${l} ${r === "circle" ? "rounded-full" : "rounded-md"} ${t || ""}`
308
+ ), _ = ({ class: t, shape: r = "rectangle", width: e = "w-full", height: o = "h-4" }) => l({
309
+ class: `bg-muted animate-pulse ${e} ${o} ${r === "circle" ? "rounded-full" : "rounded-md"} ${t || ""}`
317
310
  }), c = {
318
311
  top: "bottom-full left-1/2 transform -translate-x-1/2 mb-2",
319
312
  "top-right": "bottom-full left-full transform -translate-x-1 mb-2",
@@ -324,14 +317,14 @@ const a = {
324
317
  left: "top-1/2 right-full transform -translate-y-1/2 mr-2",
325
318
  right: "top-1/2 left-full transform -translate-y-1/2 ml-2"
326
319
  }, F = (t) => c[t] || c.top, z = s(({ position: t = "top", content: r }, e) => {
327
- const l = F(t);
328
- return Array.isArray(e) === !1 && (e = [e]), o({ class: "relative group inline-block" }, [
320
+ const o = F(t);
321
+ return Array.isArray(e) === !1 && (e = [e]), l({ class: "relative group inline-block" }, [
329
322
  ...e,
330
323
  // Tooltip box
331
324
  g({
332
325
  class: `
333
326
  absolute z-20 px-2 py-1 border text-sm bg-background rounded shadow-md opacity-0 whitespace-nowrap
334
- group-hover:opacity-100 transition-opacity duration-200 ${l} pointer-events-none
327
+ group-hover:opacity-100 transition-opacity duration-200 ${o} pointer-events-none
335
328
  `
336
329
  }, r)
337
330
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.204",
3
+ "version": "1.0.206",
4
4
  "description": "This is a UI package that adds components and atoms that use Tailwind CSS and a theme based on Shadcn.",
5
5
  "main": "./dist/index.es.js",
6
6
  "scripts": {