@base-framework/ui 1.0.262 → 1.0.264

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.
@@ -0,0 +1,48 @@
1
+ import { Div as r, H4 as c, P as i } from "@base-framework/atoms";
2
+ import { Atom as o, Jot as m, Component as g } from "@base-framework/base";
3
+ const f = o((t, s) => {
4
+ const a = t.margin ?? "my-5 mx-5", e = t.padding ?? "p-4";
5
+ return t.hover && (t.class += " hover:shadow-lg hover:bg-muted/50"), r({
6
+ ...t,
7
+ class: `rounded-lg border bg-card text-card-foreground shadow-md min-w-[120px] min-h-[80px] ${a} ${e} ${t.class || ""}`
8
+ }, s);
9
+ }), h = o((t, s) => {
10
+ var e;
11
+ const a = t.border === !0 ? "border-t" : "";
12
+ return r({
13
+ ...t,
14
+ class: `grid grid-cols-1 gap-y-4 sm:grid-cols-[1fr,2fr] sm:gap-x-6 pt-8 ${a} ${t.class || ""}`
15
+ }, [
16
+ t.label && r({
17
+ ...t.labelProps,
18
+ class: `space-y-1 ${((e = t.labelProps) == null ? void 0 : e.class) || ""}`
19
+ }, [
20
+ c({ class: "text-base" }, t.label),
21
+ t.description && i({ class: "text-sm text-muted-foreground" }, t.description)
22
+ ]),
23
+ // Controls container: grows to fill remaining space, spacing between items
24
+ r({ class: "flex flex-col space-y-4" }, s)
25
+ ]);
26
+ });
27
+ class u extends g {
28
+ /**
29
+ * This will set the component context.
30
+ *
31
+ * @param {object|null} context
32
+ * @returns {object|null}
33
+ */
34
+ setContext(s) {
35
+ var e, n, l, d;
36
+ if (this.data)
37
+ return null;
38
+ const a = ((e = this == null ? void 0 : this.parent) == null ? void 0 : e.data) ?? ((l = (n = this == null ? void 0 : this.parent) == null ? void 0 : n.context) == null ? void 0 : l.data) ?? ((d = this == null ? void 0 : this.parent) == null ? void 0 : d.state) ?? null;
39
+ return a ? { data: a } : null;
40
+ }
41
+ }
42
+ const $ = (t) => m(t, u);
43
+ export {
44
+ f as C,
45
+ h as F,
46
+ u as V,
47
+ $ as a
48
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.262",
3
+ "version": "1.0.264",
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": {
@@ -1,21 +0,0 @@
1
- import { Jot as r, Component as i } from "@base-framework/base";
2
- class l extends i {
3
- /**
4
- * This will set the component context.
5
- *
6
- * @param {object|null} context
7
- * @returns {object|null}
8
- */
9
- setContext(p) {
10
- var n, a, s, o;
11
- if (this.data)
12
- return null;
13
- const e = ((n = this == null ? void 0 : this.parent) == null ? void 0 : n.data) ?? ((s = (a = this == null ? void 0 : this.parent) == null ? void 0 : a.context) == null ? void 0 : s.data) ?? ((o = this == null ? void 0 : this.parent) == null ? void 0 : o.state) ?? null;
14
- return e ? { data: e } : null;
15
- }
16
- }
17
- const c = (t) => r(t, l);
18
- export {
19
- l as V,
20
- c as a
21
- };