@stamcat/craftsman 0.0.23-alpha.22 → 0.0.23-alpha.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stamcat/craftsman",
3
- "version": "0.0.23-alpha.22",
3
+ "version": "0.0.23-alpha.23",
4
4
  "type": "module",
5
5
  "description": "A powerful, lightweight framework for design systems",
6
6
  "repository": {
@@ -1,30 +1,23 @@
1
1
  import { isEmpty as e } from "../utilities/validations.esm.js";
2
- import { ThemeContext as t, css as n } from "@emotion/react";
3
- import r from "@emotion/styled";
4
- import { Fragment as i, jsx as a } from "react/jsx-runtime";
2
+ import { css as t } from "@emotion/react";
3
+ import n from "@emotion/styled";
4
+ import { Fragment as r, jsx as i } from "react/jsx-runtime";
5
5
  //#region src/components/Button.tsx
6
- var o = r.button`
6
+ var a = n.button`
7
7
  ${(e) => e.styles}
8
- ${((e) => e.size && n`
8
+ ${((e) => e.size && t`
9
9
  border-radius: calc(var(--btn-border-radius) * ${e.size});
10
10
  padding: calc(var(--btn-pad-y) * ${e.size}) calc(var(--btn-pad-x) * ${e.size});
11
11
  font-size: max(10px, calc(var(--w-text) * ${e.size}));
12
12
  `)}
13
- `, s = (n) => {
14
- let { type: r = "button", variant: s = "default", className: c, size: l, ...u } = n, d = typeof l == "number" ? Math.min(10, Math.max(.1, l)) : void 0;
15
- return e(n.children) ? /* @__PURE__ */ a(i, {}) : /* @__PURE__ */ a(t.Consumer, { children: (e) => {
16
- let t = e, n = typeof t?.components?.button == "string" ? t.components.button : void 0, i = [
17
- s === "default" ? void 0 : s,
18
- n,
19
- c
20
- ].filter(Boolean).join(" ") || void 0;
21
- return /* @__PURE__ */ a(o, {
22
- type: r,
23
- size: d,
24
- className: i,
25
- ...u
26
- });
27
- } });
13
+ `, o = (t) => {
14
+ let { type: n = "button", variant: o = "default", className: s, size: c, ...l } = t, u = typeof c == "number" ? Math.min(10, Math.max(.1, c)) : void 0, d = [o === "default" ? void 0 : o, s].filter(Boolean).join(" ") || void 0;
15
+ return e(t.children) ? /* @__PURE__ */ i(r, {}) : /* @__PURE__ */ i(a, {
16
+ type: n,
17
+ size: u,
18
+ className: d,
19
+ ...l
20
+ });
28
21
  };
29
22
  //#endregion
30
- export { s as Button };
23
+ export { o as Button };
@@ -1,9 +1,7 @@
1
1
  //#region src/utilities/validations.ts
2
- /* #__PURE__ */
3
2
  function e(e) {
4
3
  return e == null || typeof e == "object" && Object.keys(e).length === 0 || typeof e == "string" && e.trim().length === 0 || typeof e == "string" && e === " ";
5
4
  }
6
- /* #__PURE__ */
7
5
  function t(e) {
8
6
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
9
7
  }