quirk-ui 0.0.33 → 0.0.35

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.
@@ -1,59 +1,62 @@
1
- import { jsx as u } from "react/jsx-runtime";
1
+ import { jsx as N } from "react/jsx-runtime";
2
2
  import '../../assets/index17.css';const y = "_grid_1pzcn_1", $ = {
3
3
  grid: y
4
4
  };
5
5
  function j({
6
- columns: e = 1,
7
- gap: p = "1rem",
8
- areas: o,
9
- autoFitMinMax: a,
10
- className: s,
11
- children: m,
12
- style: n,
13
- ...d
6
+ columns: r = 1,
7
+ gap: m = "1rem",
8
+ areas: a,
9
+ autoFitMinMax: o,
10
+ className: p,
11
+ children: n,
12
+ style: d,
13
+ ...l
14
14
  }) {
15
- const r = {
16
- ...n,
15
+ const i = {
16
+ ...d,
17
17
  display: "grid",
18
- gap: p
18
+ gap: m
19
19
  };
20
- if (o && (r.gridTemplateAreas = o.map((t) => `"${t.join(" ")}"`).join(" ")), a)
21
- r.gridTemplateColumns = `repeat(auto-fit, minmax(${a}, 1fr))`;
22
- else if (typeof e == "object") {
23
- const { xs: t, sm: l, md: f, lg: g, xl: b } = e;
20
+ if (a && (i.gridTemplateAreas = a.map((e) => `"${e.join(" ")}"`).join(" ")), o)
21
+ i.gridTemplateColumns = `repeat(auto-fit, minmax(${o}, 1fr))`;
22
+ else if (typeof r == "object") {
23
+ const { xs: e, sm: f, md: u, lg: b, xl: g } = r;
24
24
  [
25
25
  {
26
26
  breakpoint: "xs",
27
- value: t
27
+ value: e
28
28
  },
29
29
  {
30
30
  breakpoint: "sm",
31
- value: l
31
+ value: f
32
32
  },
33
33
  {
34
34
  breakpoint: "md",
35
- value: f
35
+ value: u
36
36
  },
37
37
  {
38
38
  breakpoint: "lg",
39
- value: g
39
+ value: b
40
40
  },
41
41
  {
42
42
  breakpoint: "xl",
43
- value: b
43
+ value: g
44
44
  }
45
- ].forEach(({ breakpoint: c, value: i }) => {
46
- i && (r[`--${c}-columns`] = typeof i == "number" ? `repeat(${i}, 1fr)` : i);
45
+ ].forEach(({ breakpoint: c, value: s }) => {
46
+ const t = isNaN(Number(s)) ? s : Number(s);
47
+ t && (i[`--${c}-columns`] = typeof t == "number" ? `repeat(${t}, 1fr)` : t);
47
48
  });
48
- } else
49
- r.gridTemplateColumns = typeof e == "number" ? `repeat(${e}, 1fr)` : e;
50
- return /* @__PURE__ */ u(
49
+ } else {
50
+ const e = isNaN(Number(r)) ? r : Number(r);
51
+ i.gridTemplateColumns = typeof e == "number" ? `repeat(${e}, 1fr)` : e;
52
+ }
53
+ return /* @__PURE__ */ N(
51
54
  "div",
52
55
  {
53
- className: `${s ?? ""} ${$.grid}`,
54
- style: r,
55
- ...d,
56
- children: m
56
+ className: `${p ?? ""} ${$.grid}`,
57
+ style: i,
58
+ ...l,
59
+ children: n
57
60
  }
58
61
  );
59
62
  }
@@ -1,11 +1,11 @@
1
1
  import { jsxs as r, Fragment as u, jsx as t } from "react/jsx-runtime";
2
2
  import { useState as f } from "react";
3
3
  import { X as h } from "../../x-CnsEH4Ox.js";
4
- import '../../assets/index25.css';const p = "_overlay_44y6t_1", g = "_modal_44y6t_16", k = "_closeButton_44y6t_26", B = "_content_44y6t_37", o = {
4
+ import '../../assets/index25.css';const p = "_overlay_44y6t_1", N = "_modal_44y6t_16", g = "_closeButton_44y6t_26", k = "_content_44y6t_37", o = {
5
5
  overlay: p,
6
- modal: g,
7
- closeButton: k,
8
- content: B
6
+ modal: N,
7
+ closeButton: g,
8
+ content: k
9
9
  };
10
10
  function j({
11
11
  content: d,
@@ -15,15 +15,15 @@ function j({
15
15
  onClose: s,
16
16
  className: _
17
17
  }) {
18
- const [n, v] = f(!1), i = c !== void 0, a = i ? c : n, l = () => {
19
- i ? n ? s == null || s() : e == null || e() : v(!a);
18
+ const [n, v] = f(!1), a = c !== void 0, i = a ? c : n, l = () => {
19
+ a ? n ? s == null || s() : e == null || e() : v(!i);
20
20
  };
21
21
  return /* @__PURE__ */ r(u, { children: [
22
- /* @__PURE__ */ t("div", { onClick: l, children: m }),
23
- a && /* @__PURE__ */ t("div", { className: o.overlay, onClick: l, children: /* @__PURE__ */ r(
22
+ /* @__PURE__ */ t("div", { className: _ ?? void 0, onClick: l, children: m }),
23
+ i && /* @__PURE__ */ t("div", { className: o.overlay, onClick: l, children: /* @__PURE__ */ r(
24
24
  "div",
25
25
  {
26
- className: `${_ ?? ""} ${o.modal}`,
26
+ className: `${o.modal}`,
27
27
  onClick: (y) => y.stopPropagation(),
28
28
  children: [
29
29
  /* @__PURE__ */ t(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.0.33",
4
+ "version": "0.0.35",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {