@stamcat/craftsman 0.0.23-alpha.25 → 0.0.23-alpha.26

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/Styles.esm.js CHANGED
@@ -1,8 +1,8 @@
1
- import { BaseWidthSchema as e, BreakpointSchema as t, LayoutWidthsSchema as n, MaxScreenWidthSchema as r, ScreenWidthSchema as i } from "./src/styles/utilities/types.esm.js";
2
- import { defaultColors as a, defaultWidths as o } from "./src/styles/utilities/constants.esm.js";
3
- import { breakpoint as s, media as c, width as l, widths as u } from "./src/styles/utilities/layout.esm.js";
4
- import { color as d, colors as f, hexToRgba as p } from "./src/styles/utilities/color.esm.js";
5
- import { CraftsmanThemeProvider as m, themeBuilder as h } from "./src/styles/theme/theme.esm.js";
6
- import { globalStyles as g } from "./src/styles/global/globalStyles.esm.js";
7
- import { ClientProvider as _ } from "./src/styles/components/ClientProvider.esm.js";
8
- export { e as BaseWidthSchema, t as BreakpointSchema, _ as ClientProvider, m as CraftsmanThemeProvider, n as LayoutWidthsSchema, r as MaxScreenWidthSchema, i as ScreenWidthSchema, s as breakpoint, d as color, f as colors, a as defaultColors, o as defaultWidths, g as globalStyles, p as hexToRgba, c as media, h as themeBuilder, l as width, u as widths };
1
+ import { defaultColors as e, defaultWidths as t } from "./src/styles/utilities/constants.esm.js";
2
+ import { color as n, colors as r, hexToRgba as i } from "./src/styles/utilities/color.esm.js";
3
+ import { BaseWidthSchema as a, BreakpointSchema as o, LayoutWidthsSchema as s, MaxScreenWidthSchema as c, ScreenWidthSchema as l, zTextInputExclusions as u } from "./src/styles/utilities/types.esm.js";
4
+ import { breakpoint as d, media as f, width as p, widths as m } from "./src/styles/utilities/layout.esm.js";
5
+ import { CraftsmanThemeProvider as h, themeBuilder as g } from "./src/styles/theme/theme.esm.js";
6
+ import { globalStyles as _ } from "./src/styles/global/globalStyles.esm.js";
7
+ import { ClientProvider as v } from "./src/styles/components/ClientProvider.esm.js";
8
+ export { a as BaseWidthSchema, o as BreakpointSchema, v as ClientProvider, h as CraftsmanThemeProvider, s as LayoutWidthsSchema, c as MaxScreenWidthSchema, l as ScreenWidthSchema, d as breakpoint, n as color, r as colors, e as defaultColors, t as defaultWidths, _ as globalStyles, i as hexToRgba, f as media, g as themeBuilder, p as width, m as widths, u as zTextInputExclusions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stamcat/craftsman",
3
- "version": "0.0.23-alpha.25",
3
+ "version": "0.0.23-alpha.26",
4
4
  "type": "module",
5
5
  "description": "A powerful, lightweight framework for design systems",
6
6
  "repository": {
@@ -1,18 +1,20 @@
1
1
  import { isEmpty as e } from "../utilities/validations.esm.js";
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";
2
+ import { width as t } from "../styles/utilities/layout.esm.js";
3
+ import "../../Styles.esm.js";
4
+ import { css as n } from "@emotion/react";
5
+ import r from "@emotion/styled";
6
+ import { Fragment as i, jsx as a } from "react/jsx-runtime";
5
7
  //#region src/components/Button.tsx
6
- var a = n.button`
8
+ var o = r.button`
7
9
  ${(e) => e.styles}
8
- ${((e) => e.size && t`
10
+ ${((e) => e.size && n`
9
11
  border-radius: calc(var(--btn-border-radius) * ${e.size});
10
12
  padding: calc(var(--btn-pad-y) * ${e.size}) calc(var(--btn-pad-x) * ${e.size});
11
- font-size: max(10px, calc(var(--w-text) * ${e.size}));
13
+ font-size: max(10px, calc(${t("text")} * ${e.size}));
12
14
  `)}
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, {
15
+ `, s = (t) => {
16
+ let { type: n = "button", variant: r = "default", className: s, size: c, ...l } = t, u = typeof c == "number" ? Math.min(10, Math.max(.1, c)) : void 0, d = [r === "default" ? void 0 : r, s].filter(Boolean).join(" ") || void 0;
17
+ return e(t.children) ? /* @__PURE__ */ a(i, {}) : /* @__PURE__ */ a(o, {
16
18
  type: n,
17
19
  size: u,
18
20
  className: d,
@@ -20,4 +22,4 @@ var a = n.button`
20
22
  });
21
23
  };
22
24
  //#endregion
23
- export { o as Button };
25
+ export { s as Button };
@@ -1,2 +1,12 @@
1
- export type InputProps = React.ComponentProps<"input">;
1
+ import { SerializedStyles } from '@emotion/react';
2
+ import { TextInputExclusions } from '../styles';
3
+ export type LabelPosition = "top" | "left" | "bottom" | "right" | "inside" | "hidden";
4
+ export type InputProps = React.ComponentProps<"input"> & {
5
+ label?: string | React.ReactNode;
6
+ labelPosition?: LabelPosition;
7
+ error?: string | boolean | React.ReactNode;
8
+ required?: boolean;
9
+ styles?: SerializedStyles;
10
+ type?: Exclude<React.HTMLInputTypeAttribute, TextInputExclusions>;
11
+ };
2
12
  export declare const Input: React.FC<InputProps>;
@@ -1,5 +1,136 @@
1
- import { jsx as e } from "react/jsx-runtime";
1
+ import { isEmpty as e } from "../utilities/validations.esm.js";
2
+ import { color as t } from "../styles/utilities/color.esm.js";
3
+ import { width as n } from "../styles/utilities/layout.esm.js";
4
+ import "../../Styles.esm.js";
5
+ import { css as r } from "@emotion/react";
6
+ import i from "@emotion/styled";
7
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
2
8
  //#region src/components/Input.tsx
3
- var t = (t) => /* @__PURE__ */ e("input", { ...t });
9
+ var s = r`
10
+ .input-label {
11
+ top: -0.5rem;
12
+ left: ${n("gutter", .25)};
13
+ font-size: ${n("text", .75)};
14
+ }
15
+ `, c = (e) => r`
16
+ --react-international-phone-height: 50px;
17
+ --react-international-phone-border-radius: 8px;
18
+ --react-international-phone-border-color: #c0c0c0ff;
19
+ position: relative;
20
+
21
+ .input-label {
22
+ position: absolute;
23
+ background-color: white;
24
+ z-index: 1;
25
+ width: fit-content;
26
+ padding: 0 5px;
27
+ top: ${n("gutter", .25)};
28
+ left: ${n("gutter", .25)};
29
+ pointer-events: none;
30
+ transition: top 150ms ease, left 150ms ease, font-size 150ms ease, color 150ms ease;
31
+ }
32
+
33
+ > label > input,
34
+ > input {
35
+ transition: border-color 200ms ease;
36
+ }
37
+ &:focus-within {
38
+ ${s}
39
+ .input-label {
40
+ color: ${t("blue500")};
41
+ }
42
+ input {
43
+ border-color: ${t("blue500")};
44
+ }
45
+ }
46
+
47
+ &:has(input:not(:placeholder-shown)) {
48
+ ${s}
49
+ }
50
+
51
+ &:has(input:-webkit-autofill) {
52
+ ${s}
53
+ }
54
+
55
+ ${e ? s : ""}
56
+ input[type="tel"] {
57
+ width: 100%;
58
+ }
59
+
60
+ input::placeholder {
61
+ opacity: 0;
62
+ transition: opacity 200ms ease;
63
+ }
64
+
65
+ &:focus-within input::placeholder {
66
+ opacity: 1;
67
+ }
68
+ `, l = i.div`
69
+ label {
70
+ .input-label {
71
+ margin-bottom: ${n("gutter", .25)};
72
+ ${(e) => e.required && r`
73
+ ::after {
74
+ content: "*";
75
+ color: ${t("red700")};
76
+ }
77
+ `}
78
+
79
+ }
80
+ }
81
+ &.left label {
82
+ .input-label {
83
+ width: fit-content;
84
+ margin-right: ${n("gutter", .75)};
85
+ }
86
+ display: inline-flex;
87
+ align-items: center;
88
+ }
89
+ &.bottom label {
90
+ display: inline-flex;
91
+ flex-direction: column-reverse;
92
+ align-items: flex-start;
93
+ .input-label {
94
+ display: block;
95
+ margin-bottom: 0;
96
+ margin-top: ${n("gutter", .25)};
97
+ }
98
+ }
99
+ &.right label {
100
+ display: inline-flex;
101
+ flex-direction: row-reverse;
102
+ align-items: center;
103
+ .input-label {
104
+ display: block;
105
+ margin-left: ${n("gutter", .75)};
106
+ }
107
+ }
108
+ &.inside {
109
+ ${(e) => c(e.hasInput)}
110
+ }
111
+ ${(e) => e.styles}
112
+ `, u = i.div`
113
+ margin-top: ${n("gutter", .25)};
114
+ font-size: ${n("text", .75)};
115
+ color: ${t("red700")};
116
+ `, d = ({ label: t, id: n, labelPosition: r = "top", required: i = !1, error: s, styles: c, ...d }) => {
117
+ let f = n || crypto.randomUUID(), p = !e(d.value) || !e(d.defaultValue), m = !e(s);
118
+ return /* @__PURE__ */ o(l, {
119
+ className: r,
120
+ required: i,
121
+ hasInput: p,
122
+ styles: c,
123
+ children: [e(t) ? /* @__PURE__ */ a("input", {
124
+ id: f,
125
+ ...d
126
+ }) : /* @__PURE__ */ o("label", { children: [r !== "hidden" && /* @__PURE__ */ a("div", {
127
+ className: "input-label",
128
+ children: t
129
+ }), /* @__PURE__ */ a("input", {
130
+ id: f,
131
+ ...d
132
+ })] }), m && /* @__PURE__ */ a(u, { children: s })]
133
+ });
134
+ };
4
135
  //#endregion
5
- export { t as Input };
136
+ export { d as Input };
@@ -1,41 +1,41 @@
1
- import { Button as e } from "./Button.esm.js";
2
- import { breakpoint as t } from "../styles/utilities/layout.esm.js";
3
- import { color as n } from "../styles/utilities/color.esm.js";
4
- import { css as r, keyframes as i } from "@emotion/react";
5
- import a from "@emotion/styled";
6
- import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
7
- import l from "react";
8
- import { LuX as u } from "react-icons/lu";
1
+ import { color as e } from "../styles/utilities/color.esm.js";
2
+ import { breakpoint as t, width as n } from "../styles/utilities/layout.esm.js";
3
+ import { Button as r } from "./Button.esm.js";
4
+ import { css as i, keyframes as a } from "@emotion/react";
5
+ import o from "@emotion/styled";
6
+ import s from "react";
7
+ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
8
+ import { LuX as d } from "react-icons/lu";
9
9
  //#region src/components/Modal.tsx
10
- var d = i`
10
+ var f = a`
11
11
  from {
12
12
  opacity: 0;
13
13
  }
14
14
  to {
15
15
  opacity: 1;
16
16
  }
17
- `, f = i`
17
+ `, p = a`
18
18
  from {
19
19
  opacity: 1;
20
20
  }
21
21
  to {
22
22
  opacity: 0;
23
23
  }
24
- `, p = i`
24
+ `, m = a`
25
25
  from {
26
26
  transform: translateY(100%);
27
27
  }
28
28
  to {
29
29
  transform: translateY(0);
30
30
  }
31
- `, m = i`
31
+ `, h = a`
32
32
  from {
33
33
  transform: translateY(0);
34
34
  }
35
35
  to {
36
36
  transform: translateY(100%);
37
37
  }
38
- `, h = a.div`
38
+ `, g = o.div`
39
39
  position: fixed;
40
40
  width: 100%;
41
41
  height: 100%;
@@ -48,9 +48,9 @@ var d = i`
48
48
  justify-content: center;
49
49
  align-items: center;
50
50
  ${(e) => e.styles}
51
- `, g = a.div`
51
+ `, _ = o.div`
52
52
  background-color: rgba(0, 0, 0, 0.5);
53
- animation: ${(e) => e.isClosing ? f : d} 0.3s ease-in-out;
53
+ animation: ${(e) => e.isClosing ? p : f} 0.3s ease-in-out;
54
54
  animation-fill-mode: forwards;
55
55
  position: fixed;
56
56
  width: 100%;
@@ -60,60 +60,63 @@ var d = i`
60
60
  right: 0;
61
61
  bottom: 0;
62
62
  z-index: 1001;
63
- `, _ = r`
63
+ `, v = i`
64
64
  width: 100%;
65
65
  height: 100%;
66
- `, v = r`
67
- width: calc(var(--w-column) * 4);
68
- `, y = r`
69
- width: calc(var(--w-column) * 4);
70
- ${t("tablet", r`
71
- width: calc(var(--w-column) * 6);
66
+ `, y = i`
67
+ width: ${n("column", 4)};
68
+ `, b = i`
69
+ width: ${n("column", 4)};
70
+ ${t("tablet", i`
71
+ width: ${n("column", 6)};
72
72
  `)}
73
- ${t("desktop", r`
74
- width: calc(var(--w-column) * 8);
73
+ ${t("desktop", i`
74
+ width: ${n("column", 8)};
75
75
  `)}
76
- `, b = r`
76
+ `, x = i`
77
77
  position: fixed;
78
78
  top: 0;
79
79
  right: 0;
80
80
  height: 100%;
81
- ${t("mobileOnly", _)}
82
- ${t("tablet", v)}
83
- `, x = r`
84
- border-radius: 8px;
85
- ${t("mobileOnly", _)}
81
+ ${t("mobileOnly", v)}
86
82
  ${t("tablet", y)}
87
- `, S = a.div`
88
- padding: calc(var(--w-gutter));
83
+ `, S = i`
84
+ border-radius: 8px;
85
+ ${t("mobileOnly", v)}
86
+ ${t("tablet", b)}
87
+ `, C = o.div`
88
+ padding: ${n("gutter")};
89
89
  z-index: 1002;
90
- background-color: var(--white);
90
+ background-color: ${e("white")};
91
91
  max-height: 80vh;
92
92
  overflow-y: auto;
93
93
  -webkit-overflow-scrolling: touch;
94
94
  touch-action: pan-y;
95
- animation: ${(e) => e.isClosing ? m : p} 0.3s ease-in-out;
95
+ animation: ${(e) => e.isClosing ? h : m} 0.3s ease-in-out;
96
96
  animation-fill-mode: forwards;
97
- ${(e) => e.type === "panel" && b}
98
- ${(e) => e.type === "dialog" && x}
97
+ ${(e) => e.type === "panel" && x}
98
+ ${(e) => e.type === "dialog" && S}
99
99
  header {
100
100
  display: inline-flex;
101
101
  width: 100%;
102
102
  justify-content: space-between;
103
- margin-bottom: calc(var(--w-gutter) * 0.5);
103
+ margin-bottom: ${n("gutter", .5)};
104
104
  }
105
- `, C = r`
105
+ `, w = i`
106
106
  text-decoration: none;
107
- height: 36px;
108
- width: 36px;
107
+ height: 30px;
108
+ width: 30px;
109
109
  border-radius: 50%;
110
- `, w = a.footer`
111
- margin-top: calc(var(--w-gutter) * 2);
112
- background-color:var(--white);
110
+ padding: 0;
111
+ display: inline-flex;
112
+ justify-content: center;
113
+ `, T = o.footer`
114
+ margin-top: ${n("gutter", 2)};
115
+ background-color: ${e("white")};
113
116
  height: fit-content;
114
117
  display: flex;
115
- gap: var(--w-gutter);
116
- `, T = class extends l.PureComponent {
118
+ gap: ${n("gutter")};
119
+ `, E = class extends s.PureComponent {
117
120
  state = { isClosing: !1 };
118
121
  onDismiss = () => {
119
122
  this.props.onDismiss && (this.setState({ isClosing: !0 }), setTimeout(() => {
@@ -124,31 +127,30 @@ var d = i`
124
127
  (this.props.backgroundDismiss || !0) === !0 && this.onDismiss();
125
128
  };
126
129
  render() {
127
- return this.props.visible ? /* @__PURE__ */ c(h, {
130
+ return this.props.visible ? /* @__PURE__ */ u(g, {
128
131
  styles: this.props.styles,
129
- children: [/* @__PURE__ */ c(S, {
132
+ children: [/* @__PURE__ */ u(C, {
130
133
  type: this.props.type || "dialog",
131
134
  isClosing: this.state.isClosing,
132
135
  children: [
133
- /* @__PURE__ */ c("header", { children: [this.props.header && /* @__PURE__ */ s(o, { children: this.props.header }), !this.props.hideDismissIcon && /* @__PURE__ */ s(e, {
136
+ /* @__PURE__ */ u("header", { children: [this.props.header && /* @__PURE__ */ l(c, { children: this.props.header }), !this.props.hideDismissIcon && /* @__PURE__ */ l(r, {
134
137
  variant: "primary",
135
- styles: C,
138
+ styles: w,
136
139
  onClick: this.onDismiss,
137
- children: /* @__PURE__ */ s(u, {
138
- fill: n("white"),
139
- viewBox: "6 8 14 14",
140
- size: 24
140
+ children: /* @__PURE__ */ l(d, {
141
+ fill: e("white"),
142
+ size: 18
141
143
  })
142
144
  })] }),
143
- /* @__PURE__ */ s("section", { children: this.props.children }),
144
- this.props.footer && /* @__PURE__ */ s(w, { children: this.props.footer })
145
+ /* @__PURE__ */ l("section", { children: this.props.children }),
146
+ this.props.footer && /* @__PURE__ */ l(T, { children: this.props.footer })
145
147
  ]
146
- }), /* @__PURE__ */ s(g, {
148
+ }), /* @__PURE__ */ l(_, {
147
149
  isClosing: this.state.isClosing,
148
150
  onClick: this.onClickBackground
149
151
  })]
150
- }) : /* @__PURE__ */ s(o, {});
152
+ }) : /* @__PURE__ */ l(c, {});
151
153
  }
152
154
  };
153
155
  //#endregion
154
- export { T as Modal };
156
+ export { E as Modal };
@@ -2,13 +2,13 @@
2
2
  import { CraftsmanThemeProvider as e, themeBuilder as t } from "../theme/theme.esm.js";
3
3
  import { globalStyles as n } from "../global/globalStyles.esm.js";
4
4
  import { CacheProvider as r, Global as i } from "@emotion/react";
5
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
- import { useState as s } from "react";
5
+ import { useState as a } from "react";
6
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
7
  import c from "@emotion/cache";
8
8
  import { useServerInsertedHTML as l } from "next/navigation";
9
9
  //#region src/styles/components/NextJSProvider.tsx
10
10
  function u({ children: u, key: d = "app", theme: f }) {
11
- let [{ cache: p, flush: m }] = s(() => {
11
+ let [{ cache: p, flush: m }] = a(() => {
12
12
  let e = c({ key: d });
13
13
  e.compat = !0;
14
14
  let t = e.insert, n = [];
@@ -28,15 +28,15 @@ function u({ children: u, key: d = "app", theme: f }) {
28
28
  if (e.length === 0) return null;
29
29
  let t = "";
30
30
  for (let n of e) t += p.inserted[n];
31
- return /* @__PURE__ */ a("style", {
31
+ return /* @__PURE__ */ o("style", {
32
32
  "data-emotion": `${p.key} ${e.join(" ")}`,
33
33
  dangerouslySetInnerHTML: { __html: t }
34
34
  });
35
- }), /* @__PURE__ */ a(r, {
35
+ }), /* @__PURE__ */ o(r, {
36
36
  value: p,
37
- children: /* @__PURE__ */ o(e, {
37
+ children: /* @__PURE__ */ s(e, {
38
38
  theme: f || {},
39
- children: [/* @__PURE__ */ a(i, { styles: (e) => [n, t(e)] }), u]
39
+ children: [/* @__PURE__ */ o(i, { styles: (e) => [n, t(e)] }), u]
40
40
  })
41
41
  });
42
42
  }
@@ -5,4 +5,5 @@ export declare const ButtonType: z.ZodEnum<{
5
5
  default: "default";
6
6
  }>;
7
7
  export type ButtonType = z.infer<typeof ButtonType>;
8
+ export declare const textLinkStyles: import('@emotion/utils').SerializedStyles;
8
9
  export declare const button: import('@emotion/utils').SerializedStyles;
@@ -1,16 +1,29 @@
1
- import { typography as e } from "./typography.esm.js";
2
- import { css as t } from "@emotion/react";
3
- import n from "zod";
4
- n.enum([
1
+ import { color as e } from "../../utilities/color.esm.js";
2
+ import { width as t } from "../../utilities/layout.esm.js";
3
+ import { typography as n } from "./typography.esm.js";
4
+ import { css as r } from "@emotion/react";
5
+ import i from "zod";
6
+ i.enum([
5
7
  "primary",
6
8
  "default",
7
9
  "text"
8
10
  ]);
9
- var r = t`
10
- --btn-pad-y: calc(var(--w-gutter) * 0.5);
11
- --btn-pad-x: calc(var(--w-gutter) * 0.75);
12
- --btn-border-radius: calc(var(--w-gutter) * 0.75);
13
- ${e.body}
11
+ var a = r`
12
+ padding: 0;
13
+ border: none;
14
+ background: none;
15
+ color: ${e("blue500")};
16
+ &:not(:disabled):not(.disabled):hover {
17
+ color: ${e("teal700")};
18
+ background-color: transparent;
19
+ text-decoration: underline;
20
+ cursor: pointer;
21
+ }
22
+ `, o = r`
23
+ --btn-pad-y: ${t("gutter", .5)};
24
+ --btn-pad-x: ${t("gutter", .75)};
25
+ --btn-border-radius: ${t("gutter", .75)};
26
+ ${n.body}
14
27
  border: none;
15
28
  cursor: pointer;
16
29
  display: inline-flex;
@@ -20,39 +33,32 @@ var r = t`
20
33
  transition: 0.125s;
21
34
  padding: var(--btn-pad-y) var(--btn-pad-x);
22
35
  border-radius: var(--btn-border-radius);
23
- border: 1px solid var(--blue600);
24
- background-color: var(--white);
36
+ border: 1px solid ${e("blue500")};
37
+ background-color: ${e("white")};
25
38
  &:not(:disabled):not(.disabled):hover {
26
- background-color: var(--blue200);
39
+ background-color: ${e("teal200")};
27
40
  }
28
41
  &.text {
29
- padding: 0;
30
- border: none;
31
- background: none;
32
- &:not(:disabled):not(.disabled):hover {
33
- color: var(--blue800);
34
- background-color: transparent;
35
- text-decoration: underline;
36
- }
42
+ ${a}
37
43
  }
38
44
  &:disabled,
39
45
  &.disabled {
40
46
  cursor: not-allowed;
41
- border-color: var(--gray200);
42
- color: var(--gray400);
47
+ border-color: ${e("gray200")};
48
+ color: ${e("gray400")};
43
49
  &.primary {
44
- border-color: var(--gray200);
45
- background-color: var(--gray400);
46
- color: var(--gray200);
50
+ border-color: ${e("gray200")};
51
+ background-color: ${e("gray400")};
52
+ color: ${e("gray200")};
47
53
  }
48
54
  }
49
55
  &.primary {
50
- color: var(--white);
51
- background-color: var(--blue500);
56
+ color: ${e("white")};
57
+ background-color: ${e("blue500")};
52
58
  &:not(:disabled):not(.disabled):hover {
53
- background-color: var(--blue700);
59
+ background-color: ${e("blue700")};
54
60
  }
55
61
  }
56
62
  `;
57
63
  //#endregion
58
- export { r as button };
64
+ export { o as button, a as textLinkStyles };
@@ -1,17 +1,19 @@
1
- import { css as e } from "@emotion/react";
1
+ import { color as e } from "../../utilities/color.esm.js";
2
+ import { width as t } from "../../utilities/layout.esm.js";
3
+ import { css as n } from "@emotion/react";
2
4
  //#region src/styles/global/components/code.ts
3
- var t = e`
4
- background-color: var(--gray200);
5
- color: var(--gray800);
6
- padding: calc(var(--w-gutter) * 0.125) calc(var(--w-gutter) * 0.25);
7
- margin: calc(var(--w-gutter) * 0.125);
5
+ var r = n`
6
+ background-color: ${e("gray200")};
7
+ color: ${e("gray800")};
8
+ padding: ${t("gutter", .125)} ${t("gutter", .25)};
9
+ margin: ${t("gutter", .125)};
8
10
  display: inline-block;
9
- font-size: var(--w-text);
11
+ font-size: ${t("text")};
10
12
  &:has(pre) {
11
- padding: var(--w-gutter);
12
- border-radius: calc(var(--w-gutter) * 0.5);
13
- background-color: var(--gray800);
14
- color: var(--gray200);
13
+ padding: ${t("gutter")};
14
+ border-radius: ${t("gutter", .5)};
15
+ background-color: ${e("gray800")};
16
+ color: ${e("gray200")};
15
17
  }
16
18
 
17
19
  &:has(pre) pre {
@@ -19,4 +21,4 @@ var t = e`
19
21
  }
20
22
  `;
21
23
  //#endregion
22
- export { t as code };
24
+ export { r as code };
@@ -0,0 +1 @@
1
+ export declare const input: import('@emotion/utils').SerializedStyles;
@@ -0,0 +1,32 @@
1
+ import { color as e } from "../../utilities/color.esm.js";
2
+ import { width as t } from "../../utilities/layout.esm.js";
3
+ import { css as n } from "@emotion/react";
4
+ //#region src/styles/global/components/input.ts
5
+ var r = n`
6
+ color: ${e("text")};
7
+ border-radius: 3px;
8
+ border: 1px solid ${e("gray400")};
9
+ padding: ${t("gutter", .5)};
10
+ background-color: ${e("white")};
11
+
12
+ &[type="number"]::-webkit-outer-spin-button,
13
+ &[type="number"]::-webkit-inner-spin-button {
14
+ -webkit-appearance: none;
15
+ margin: 0;
16
+ }
17
+ &[type="number"] {
18
+ -moz-appearance: textfield;
19
+ appearance: textfield;
20
+ }
21
+ &:disabled, &.disabled {
22
+ border-color: ${e("gray200")};
23
+ background-color: ${e("gray100")};
24
+ }
25
+ &:focus {
26
+ outline: 0;
27
+ box-shadow: none;
28
+ }
29
+
30
+ `;
31
+ //#endregion
32
+ export { r as input };
@@ -1,11 +1,11 @@
1
1
  import { SerializedStyles } from '@emotion/react';
2
2
  import { default as z } from 'zod';
3
3
  export declare const LoaderStyleSchema: z.ZodEnum<{
4
+ spinner: "spinner";
4
5
  dots: "dots";
5
6
  "dots-trace": "dots-trace";
6
7
  "dots-orbit": "dots-orbit";
7
8
  dashes: "dashes";
8
- spinner: "spinner";
9
9
  swirl: "swirl";
10
10
  ball: "ball";
11
11
  boxy: "boxy";
@@ -1,54 +1,58 @@
1
- import { breakpoint as e } from "../../utilities/layout.esm.js";
2
- import { css as t } from "@emotion/react";
1
+ import { color as e } from "../../utilities/color.esm.js";
2
+ import { breakpoint as t, width as n } from "../../utilities/layout.esm.js";
3
+ import { css as r } from "@emotion/react";
3
4
  //#region src/styles/global/components/typography.ts
4
- var n = {
5
- body: t`
5
+ var i = {
6
+ body: r`
6
7
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
7
- color: var(--text);
8
+ color: ${e("text")};
8
9
  line-height: 1.5;
9
10
  font-weight: 400;
10
- font-size: var(--w-text);
11
+ font-size: ${n("text")};
12
+ ::selection {
13
+ background-color: ${e("blue200")};
14
+ }
11
15
  `,
12
- h1: t`
13
- font-size: calc(var(--w-text) * 3.125);
16
+ h1: r`
17
+ font-size: ${n("text", 3.125)};
14
18
  line-height: 1.2;
15
19
  `,
16
- h2: t`
17
- font-size: calc(var(--w-text) * 2.625);
20
+ h2: r`
21
+ font-size: ${n("text", 2.625)};
18
22
  font-weight: 625;
19
23
  line-height: 1.1;
20
24
  `,
21
- h3: t`
22
- font-size: calc(var(--w-text) * 1.625);
25
+ h3: r`
26
+ font-size: ${n("text", 1.625)};
23
27
  line-height: 1.1;
24
28
  `,
25
- h4: t`
26
- font-size: calc(var(--w-text) * 1.25);
29
+ h4: r`
30
+ font-size: ${n("text", 1.25)};
27
31
  line-height: 1.1;
28
- margin: calc(var(--w-gutter) * 0.5) 0px;
29
- ${e("mobileOnly", t`
30
- font-size: var(--w-text);
32
+ margin: ${n("gutter", .5)} 0px;
33
+ ${t("mobileOnly", r`
34
+ font-size: ${n("text")};
31
35
  `)}
32
36
  `,
33
- h5: t`
34
- font-size: var(--w-text);
37
+ h5: r`
38
+ font-size: ${n("text")};
35
39
  line-height: 1.2;
36
40
  `,
37
- h6: t`
38
- font-size: calc(var(--w-text) * 0.875);
41
+ h6: r`
42
+ font-size: ${n("text", .875)};
39
43
  line-height: 1.2;
40
44
  font-weight: 600;
41
45
  `,
42
- p: t`
46
+ p: r`
43
47
  font-style: normal;
44
- font-size: var(--w-text);
48
+ font-size: ${n("text")};
45
49
  line-height: 1.5;
46
50
  margin: 0;
47
- ${e("mobileOnly", t`
51
+ ${t("mobileOnly", r`
48
52
  line-height: 1.5;
49
- font-size: calc(var(--w-text) * 0.875);
53
+ font-size: ${n("text", .875)};
50
54
  `)}
51
55
  `
52
- }, r = Object.entries(n).map(([e, n]) => t({ [e]: n }));
56
+ }, a = Object.entries(i).map(([e, t]) => r({ [e]: t }));
53
57
  //#endregion
54
- export { n as typography, r as typographyStyles };
58
+ export { i as typography, a as typographyStyles };
@@ -1,10 +1,11 @@
1
1
  import { colors as e, widths as t } from "./variables.esm.js";
2
2
  import { typographyStyles as n } from "./components/typography.esm.js";
3
- import { button as r } from "./components/button.esm.js";
4
- import { code as i } from "./components/code.esm.js";
5
- import { css as a } from "@emotion/react";
3
+ import { button as r, textLinkStyles as i } from "./components/button.esm.js";
4
+ import { code as a } from "./components/code.esm.js";
5
+ import { input as o } from "./components/input.esm.js";
6
+ import { css as s } from "@emotion/react";
6
7
  //#region src/styles/global/globalStyles.ts
7
- var o = a`
8
+ var c = s`
8
9
  :root {
9
10
  ${t}
10
11
  ${e}
@@ -49,11 +50,17 @@ var o = a`
49
50
  border: 0px;
50
51
  }
51
52
  code {
52
- ${i}
53
+ ${a}
53
54
  }
54
55
  button {
55
56
  ${r}
56
57
  }
58
+ input {
59
+ ${o}
60
+ }
61
+ a {
62
+ ${i}
63
+ }
57
64
  ul {
58
65
  margin: 0;
59
66
  padding: 0;
@@ -61,4 +68,4 @@ var o = a`
61
68
  ${n}
62
69
  `;
63
70
  //#endregion
64
- export { o as globalStyles };
71
+ export { c as globalStyles };
@@ -1,12 +1,12 @@
1
- import { components_exports as e } from "../../../Components.esm.js";
2
- import { htmlTagNames as t } from "./constants.esm.js";
1
+ import { htmlTagNames as e } from "./constants.esm.js";
2
+ import { components_exports as t } from "../../../Components.esm.js";
3
3
  //#region src/styles/theme/components.ts
4
4
  function n(e) {
5
5
  return e.charAt(0).toLowerCase() + e.slice(1);
6
6
  }
7
- function r(e) {
8
- return t.has(e) ? e : `.${e}`;
7
+ function r(t) {
8
+ return e.has(t) ? t : `.${t}`;
9
9
  }
10
- var i = Object.keys(e).map(n), a = Object.fromEntries(i.map((e) => [e, r(e)]));
10
+ var i = Object.keys(t).map(n), a = Object.fromEntries(i.map((e) => [e, r(e)]));
11
11
  //#endregion
12
12
  export { a as componentSelectors };
@@ -66,50 +66,50 @@ export declare const colors: {
66
66
  green80: string;
67
67
  green50: string;
68
68
  green10: string;
69
- teal990: string;
70
- teal975: string;
71
- teal950: string;
69
+ blueGreen990: string;
70
+ blueGreen975: string;
71
+ blueGreen950: string;
72
+ blueGreen900: string;
73
+ blueGreen850: string;
74
+ blueGreen800: string;
75
+ blueGreen750: string;
76
+ blueGreen700: string;
77
+ blueGreen650: string;
78
+ blueGreen600: string;
79
+ blueGreen550: string;
80
+ blueGreen500: string;
81
+ blueGreen450: string;
82
+ blueGreen400: string;
83
+ blueGreen300: string;
84
+ blueGreen250: string;
85
+ blueGreen150: string;
86
+ blueGreen50: string;
87
+ blueGreen10: string;
72
88
  teal900: string;
73
- teal850: string;
74
89
  teal800: string;
75
- teal750: string;
76
90
  teal700: string;
77
- teal650: string;
78
91
  teal600: string;
79
- teal550: string;
80
92
  teal500: string;
81
93
  teal450: string;
82
94
  teal400: string;
95
+ teal350: string;
83
96
  teal300: string;
84
97
  teal250: string;
98
+ teal200: string;
85
99
  teal150: string;
100
+ teal100: string;
86
101
  teal50: string;
87
- teal10: string;
102
+ blue950: string;
88
103
  blue900: string;
89
104
  blue800: string;
90
105
  blue700: string;
91
106
  blue600: string;
92
107
  blue500: string;
93
- blue450: string;
94
108
  blue400: string;
95
- blue350: string;
96
109
  blue300: string;
97
- blue250: string;
98
110
  blue200: string;
99
- blue150: string;
100
111
  blue100: string;
101
112
  blue50: string;
102
- navy950: string;
103
- navy900: string;
104
- navy800: string;
105
- navy700: string;
106
- navy600: string;
107
- navy500: string;
108
- navy400: string;
109
- navy300: string;
110
- navy200: string;
111
- navy100: string;
112
- navy50: string;
113
113
  violet950: string;
114
114
  violet900: string;
115
115
  violet800: string;
@@ -10,6 +10,6 @@ function n(e, t = 1) {
10
10
  else throw Error("Invalid hex color format");
11
11
  return t = Math.max(0, Math.min(1, t)), `rgba(${n}, ${r}, ${i}, ${t})`;
12
12
  }
13
- var r = (e, r = "hex", i = 1) => r === "rgba" ? n(t[e], i) : t[e];
13
+ var r = (e, t = "hex", n = 1) => t === "rgba" ? `rgb(from var(--${e}) r g b / ${n})` : `var(--${e})`;
14
14
  //#endregion
15
15
  export { r as color, t as colors, n as hexToRgba };
@@ -66,50 +66,50 @@ export declare const defaultColors: {
66
66
  green80: string;
67
67
  green50: string;
68
68
  green10: string;
69
- teal990: string;
70
- teal975: string;
71
- teal950: string;
69
+ blueGreen990: string;
70
+ blueGreen975: string;
71
+ blueGreen950: string;
72
+ blueGreen900: string;
73
+ blueGreen850: string;
74
+ blueGreen800: string;
75
+ blueGreen750: string;
76
+ blueGreen700: string;
77
+ blueGreen650: string;
78
+ blueGreen600: string;
79
+ blueGreen550: string;
80
+ blueGreen500: string;
81
+ blueGreen450: string;
82
+ blueGreen400: string;
83
+ blueGreen300: string;
84
+ blueGreen250: string;
85
+ blueGreen150: string;
86
+ blueGreen50: string;
87
+ blueGreen10: string;
72
88
  teal900: string;
73
- teal850: string;
74
89
  teal800: string;
75
- teal750: string;
76
90
  teal700: string;
77
- teal650: string;
78
91
  teal600: string;
79
- teal550: string;
80
92
  teal500: string;
81
93
  teal450: string;
82
94
  teal400: string;
95
+ teal350: string;
83
96
  teal300: string;
84
97
  teal250: string;
98
+ teal200: string;
85
99
  teal150: string;
100
+ teal100: string;
86
101
  teal50: string;
87
- teal10: string;
102
+ blue950: string;
88
103
  blue900: string;
89
104
  blue800: string;
90
105
  blue700: string;
91
106
  blue600: string;
92
107
  blue500: string;
93
- blue450: string;
94
108
  blue400: string;
95
- blue350: string;
96
109
  blue300: string;
97
- blue250: string;
98
110
  blue200: string;
99
- blue150: string;
100
111
  blue100: string;
101
112
  blue50: string;
102
- navy950: string;
103
- navy900: string;
104
- navy800: string;
105
- navy700: string;
106
- navy600: string;
107
- navy500: string;
108
- navy400: string;
109
- navy300: string;
110
- navy200: string;
111
- navy100: string;
112
- navy50: string;
113
113
  violet950: string;
114
114
  violet900: string;
115
115
  violet800: string;
@@ -66,50 +66,50 @@ var e = {
66
66
  green80: "#D1EB94",
67
67
  green50: "#DAF1DE",
68
68
  green10: "#F6FBEA",
69
- teal990: "#001C19",
70
- teal975: "#022427",
71
- teal950: "#13332E",
72
- teal900: "#0A3B43",
73
- teal850: "#0F4A45",
74
- teal800: "#0D4E59",
75
- teal750: "#045258",
76
- teal700: "#08ADBA",
77
- teal650: "#1D766E",
78
- teal600: "#137686",
79
- teal550: "#039084",
80
- teal500: "#2FBCB0",
81
- teal450: "#5CD6CC",
82
- teal400: "#85E0D9",
83
- teal300: "#ADEBE5",
84
- teal250: "#A6E7F2",
85
- teal150: "#D6F5F2",
86
- teal50: "#EBFAF9",
87
- teal10: "#EBFDFE",
88
- blue900: "#06272D",
89
- blue800: "#068089",
90
- blue700: "#1A9DB2",
91
- blue600: "#20C4DF",
92
- blue500: "#0ADBEA",
93
- blue450: "#6DE3EE",
94
- blue400: "#32E8F6",
95
- blue350: "#63EEF8",
96
- blue300: "#94F3FA",
97
- blue250: "#A7F5FB",
98
- blue200: "#BCEDF5",
99
- blue150: "#D2FAFD",
100
- blue100: "#D2F3F9",
101
- blue50: "#E9F9FC",
102
- navy950: "#060B14",
103
- navy900: "#0C1728",
104
- navy800: "#172D4F",
105
- navy700: "#234476",
106
- navy600: "#2F5B9D",
107
- navy500: "#3A70C2",
108
- navy400: "#628ED0",
109
- navy300: "#89AADC",
110
- navy200: "#B0C6E8",
111
- navy100: "#D7E2F3",
112
- navy50: "#EFF4FA",
69
+ blueGreen990: "#001C19",
70
+ blueGreen975: "#022427",
71
+ blueGreen950: "#13332E",
72
+ blueGreen900: "#0A3B43",
73
+ blueGreen850: "#0F4A45",
74
+ blueGreen800: "#0D4E59",
75
+ blueGreen750: "#045258",
76
+ blueGreen700: "#08ADBA",
77
+ blueGreen650: "#1D766E",
78
+ blueGreen600: "#137686",
79
+ blueGreen550: "#039084",
80
+ blueGreen500: "#2FBCB0",
81
+ blueGreen450: "#5CD6CC",
82
+ blueGreen400: "#85E0D9",
83
+ blueGreen300: "#ADEBE5",
84
+ blueGreen250: "#A6E7F2",
85
+ blueGreen150: "#D6F5F2",
86
+ blueGreen50: "#EBFAF9",
87
+ blueGreen10: "#EBFDFE",
88
+ teal900: "#06272D",
89
+ teal800: "#068089",
90
+ teal700: "#1A9DB2",
91
+ teal600: "#20C4DF",
92
+ teal500: "#0ADBEA",
93
+ teal450: "#6DE3EE",
94
+ teal400: "#32E8F6",
95
+ teal350: "#63EEF8",
96
+ teal300: "#94F3FA",
97
+ teal250: "#A7F5FB",
98
+ teal200: "#BCEDF5",
99
+ teal150: "#D2FAFD",
100
+ teal100: "#D2F3F9",
101
+ teal50: "#E9F9FC",
102
+ blue950: "#060B14",
103
+ blue900: "#0C1728",
104
+ blue800: "#172D4F",
105
+ blue700: "#234476",
106
+ blue600: "#2F5B9D",
107
+ blue500: "#3A70C2",
108
+ blue400: "#628ED0",
109
+ blue300: "#89AADC",
110
+ blue200: "#B0C6E8",
111
+ blue100: "#D7E2F3",
112
+ blue50: "#EFF4FA",
113
113
  violet950: "#0D042F",
114
114
  violet900: "#19095D",
115
115
  violet800: "#260D8C",
@@ -1,8 +1,8 @@
1
- import { LayoutWidthsSchema as e } from "./types.esm.js";
2
- import { defaultWidths as t } from "./constants.esm.js";
1
+ import { defaultWidths as e } from "./constants.esm.js";
2
+ import { LayoutWidthsSchema as t } from "./types.esm.js";
3
3
  import { css as n } from "@emotion/react";
4
4
  //#region src/styles/utilities/layout.ts
5
- var r = Object.fromEntries(e.options.map((e) => [e, `var(--w-${e}, ${t[e]}px)`])), i = {
5
+ var r = Object.fromEntries(t.options.map((t) => [t, `var(--w-${t}, ${e[t]}px)`])), i = {
6
6
  get mobile() {
7
7
  return "(min-width: 0px)";
8
8
  },
@@ -44,3 +44,8 @@ export type LayoutWidthsType = z.infer<typeof LayoutWidthsSchema>;
44
44
  export type Width = Record<LayoutWidthsType, number>;
45
45
  export type Colors = Record<string, string>;
46
46
  export type ColorType = "rgba" | "hex";
47
+ export declare const zTextInputExclusions: z.ZodEnum<{
48
+ checkbox: "checkbox";
49
+ radio: "radio";
50
+ }>;
51
+ export type TextInputExclusions = z.infer<typeof zTextInputExclusions>;
@@ -20,6 +20,6 @@ var t = e.enum(["gutter", "column"]), n = e.enum([
20
20
  ...n.options,
21
21
  ...r.options,
22
22
  "text"
23
- ]);
23
+ ]), o = e.enum(["checkbox", "radio"]);
24
24
  //#endregion
25
- export { t as BaseWidthSchema, i as BreakpointSchema, a as LayoutWidthsSchema, r as MaxScreenWidthSchema, n as ScreenWidthSchema };
25
+ export { t as BaseWidthSchema, i as BreakpointSchema, a as LayoutWidthsSchema, r as MaxScreenWidthSchema, n as ScreenWidthSchema, o as zTextInputExclusions };