@base-framework/ui 1.0.203 → 1.0.205

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-Dn8TxE9o.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-9MdaFacr.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-Dn8TxE9o.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-9MdaFacr.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 C } from "@base-framework/atoms";
2
- import { Atom as s, Html as h } from "@base-framework/base";
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 y, e as p, g as k } from "./inputs-CMjx5-IX.js";
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,52 +78,47 @@ const a = {
78
78
  textColor: "text-primary",
79
79
  ringColor: "ring-background"
80
80
  }
81
- }, w = (t) => a[t] || a.gray, $ = (t) => {
82
- const { backgroundColor: r, textColor: e, ringColor: l } = w(t);
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
- }, T = s((t, r) => {
85
- const e = $(t == null ? void 0 : t.type);
84
+ }, G = s((t, r) => {
85
+ const e = P(t == null ? void 0 : t.type);
86
86
  return g({ ...t, class: e }, r);
87
- }), L = s((t, r) => {
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
- }), v = s((t, r) => b({
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)), G = s((t, 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 && v(t.legend),
102
+ t.legend && S(t.legend),
103
103
  o({ class: "flex flex-auto flex-col space-y-6" }, r)
104
104
  ]);
105
- }), I = s((t, r) => {
105
+ }), O = s((t, r) => {
106
106
  var e;
107
107
  return o({
108
108
  ...t,
109
- class: `flex flex-col
110
- sm:flex-row sm:items-center
111
- ${t.class || ""}`
109
+ class: `flex flex-col sm:flex-row ${t.class || ""}`
112
110
  }, [
113
- // Label container: 1/4 width on sm+, full-width on mobile
114
111
  t.label && o({
115
112
  ...t.labelProps,
116
- class: `w-full
117
- sm:w-1/4
118
- text-sm font-medium
119
- ${((e = t.labelProps) == null ? void 0 : e.class) || ""}`
120
- }, [t.label]),
113
+ class: `w-full sm:w-1/3 space-y-2 ${((e = t.labelProps) == null ? void 0 : e.class) || ""}`
114
+ }, [
115
+ C({ class: "text-base" }, t.label),
116
+ t.description && h({ class: "text-sm text-muted-foreground" }, t.description)
117
+ ]),
121
118
  // Controls container: grows to fill remaining space, spacing between items
122
- o({
123
- class: "w-full sm:flex-1 flex flex-col space-y-4"
124
- }, r)
119
+ o({ class: "w-full sm:flex-1 flex flex-col space-y-4" }, r)
125
120
  ]);
126
- }), R = d(
121
+ }), V = d(
127
122
  {
128
123
  /**
129
124
  * This will create the initial state of the RangeSlider.
@@ -173,7 +168,7 @@ const a = {
173
168
  style: ["left: [[filledPercentage]]%", t]
174
169
  }),
175
170
  // Hidden Range Input
176
- C({
171
+ y({
177
172
  type: "range",
178
173
  min: ["[[min]]", t],
179
174
  max: ["[[max]]", t],
@@ -181,8 +176,8 @@ const a = {
181
176
  // Incorporate your new classes here
182
177
  class: `
183
178
  absolute w-full h-full opacity-0 cursor-pointer
184
- ${y}
185
- ${p}
179
+ ${k}
180
+ ${w}
186
181
  ${this.class || ""}
187
182
  `.trim(),
188
183
  bind: this.bind,
@@ -195,14 +190,14 @@ const a = {
195
190
  ]);
196
191
  }
197
192
  }
198
- ), O = s((t) => ({
193
+ ), D = s((t) => ({
199
194
  tag: "select",
200
195
  onCreated(r) {
201
- t.options && h.setupSelectOptions(r, t.options);
196
+ t.options && p.setupSelectOptions(r, t.options);
202
197
  },
203
198
  ...t,
204
- class: `${k} ${t.class || ""}`.trim()
205
- })), P = (t) => !t || isNaN(t) ? null : t, i = (t, r) => {
199
+ class: `${$} ${t.class || ""}`.trim()
200
+ })), E = (t) => !t || isNaN(t) ? null : t, i = (t, r) => {
206
201
  const e = t, l = 16, n = 2 * Math.PI * l, m = e / 100 * n, f = `
207
202
  <svg class="w-40 h-40 mx-auto" viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg">
208
203
  <!-- Background Circle -->
@@ -245,19 +240,19 @@ const a = {
245
240
  class: "circle-graph text-inherit",
246
241
  html: f
247
242
  });
248
- }, V = s((t) => {
243
+ }, H = s((t) => {
249
244
  const r = t.progress || 0, e = t.class || "", l = i(r, e);
250
245
  return o({
251
246
  class: "circle-graph-wrap",
252
247
  onSet: [
253
248
  t.prop,
254
- (n) => (n = P(n), n ? i(n, e) : l)
249
+ (n) => (n = E(n), n ? i(n, e) : l)
255
250
  ]
256
251
  }, [l]);
257
- }), S = () => u(({ state: t }) => o({
252
+ }), B = () => u(({ state: t }) => o({
258
253
  class: "absolute h-full rounded-full bg-primary transition-all duration-300",
259
254
  style: ["width: [[progress]]%;", t]
260
- })), D = d(
255
+ })), M = d(
261
256
  {
262
257
  /**
263
258
  * This will render the progress bar component.
@@ -266,7 +261,7 @@ const a = {
266
261
  */
267
262
  render() {
268
263
  return o({ class: "relative w-full h-4 rounded-full bg-muted" }, [
269
- S()
264
+ B()
270
265
  ]);
271
266
  },
272
267
  /**
@@ -309,7 +304,7 @@ const a = {
309
304
  t < 0 && (t = 0), t > 100 && (t = 100), this.state.progress = t;
310
305
  }
311
306
  }
312
- ), M = ({ class: t, shape: r = "rectangle", width: e = "w-full", height: l = "h-4" }) => o({
307
+ ), _ = ({ class: t, shape: r = "rectangle", width: e = "w-full", height: l = "h-4" }) => o({
313
308
  class: `bg-muted animate-pulse ${e} ${l} ${r === "circle" ? "rounded-full" : "rounded-md"} ${t || ""}`
314
309
  }), c = {
315
310
  top: "bottom-full left-1/2 transform -translate-x-1/2 mb-2",
@@ -320,8 +315,8 @@ const a = {
320
315
  "bottom-left": "top-full right-full transform translate-x-1 mt-2",
321
316
  left: "top-1/2 right-full transform -translate-y-1/2 mr-2",
322
317
  right: "top-1/2 left-full transform -translate-y-1/2 ml-2"
323
- }, E = (t) => c[t] || c.top, _ = s(({ position: t = "top", content: r }, e) => {
324
- const l = E(t);
318
+ }, F = (t) => c[t] || c.top, z = s(({ position: t = "top", content: r }, e) => {
319
+ const l = F(t);
325
320
  return Array.isArray(e) === !1 && (e = [e]), o({ class: "relative group inline-block" }, [
326
321
  ...e,
327
322
  // Tooltip box
@@ -334,15 +329,15 @@ const a = {
334
329
  ]);
335
330
  });
336
331
  export {
337
- T as B,
338
- L as C,
339
- G as F,
340
- v as L,
341
- D as P,
342
- R,
343
- O as S,
344
- _ as T,
345
- I as a,
346
- V as b,
347
- M as c
332
+ G as B,
333
+ I as C,
334
+ R as F,
335
+ S as L,
336
+ M as P,
337
+ V as R,
338
+ D as S,
339
+ z as T,
340
+ O as a,
341
+ H as b,
342
+ _ as c
348
343
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.203",
3
+ "version": "1.0.205",
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": {