beth-clarity 1.1.19 → 1.1.21
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.
|
@@ -42,7 +42,120 @@ const Dt = ({
|
|
|
42
42
|
children: d
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
|
-
},
|
|
45
|
+
}, ve = {
|
|
46
|
+
fontFamily: {
|
|
47
|
+
sans: ["Inter", "system-ui", "sans-serif"],
|
|
48
|
+
mono: ["Fira Code", "monospace"]
|
|
49
|
+
},
|
|
50
|
+
fontSize: {
|
|
51
|
+
xs: "12px",
|
|
52
|
+
sm: "14px",
|
|
53
|
+
base: "16px",
|
|
54
|
+
lg: "18px",
|
|
55
|
+
xl: "20px",
|
|
56
|
+
"2xl": "24px",
|
|
57
|
+
"3xl": "30px"
|
|
58
|
+
},
|
|
59
|
+
fontWeight: {
|
|
60
|
+
normal: 400,
|
|
61
|
+
medium: 500,
|
|
62
|
+
semibold: 600,
|
|
63
|
+
bold: 700
|
|
64
|
+
},
|
|
65
|
+
letterSpacing: {
|
|
66
|
+
tighter: "-0.05em",
|
|
67
|
+
tight: "-0.025em",
|
|
68
|
+
normal: "0em",
|
|
69
|
+
wide: "0.025em",
|
|
70
|
+
wider: "0.05em"
|
|
71
|
+
}
|
|
72
|
+
}, ue = (e) => {
|
|
73
|
+
if (e) {
|
|
74
|
+
if (e.startsWith("#") || e.startsWith("rgb") || e.startsWith("hsl") || e === "transparent")
|
|
75
|
+
return e;
|
|
76
|
+
if (e.includes(".")) {
|
|
77
|
+
const [t, s] = e.split(".");
|
|
78
|
+
return `var(--clarity-${t}-${s})`;
|
|
79
|
+
}
|
|
80
|
+
return `var(--clarity-${e})`;
|
|
81
|
+
}
|
|
82
|
+
}, U = (e) => e !== void 0 ? `var(--clarity-spacing-${e})` : void 0, de = E.forwardRef(({
|
|
83
|
+
as: e,
|
|
84
|
+
children: t,
|
|
85
|
+
className: s,
|
|
86
|
+
display: n,
|
|
87
|
+
flexDirection: l,
|
|
88
|
+
alignItems: i,
|
|
89
|
+
justifyContent: d,
|
|
90
|
+
gap: o,
|
|
91
|
+
m: r,
|
|
92
|
+
mt: c,
|
|
93
|
+
mr: p,
|
|
94
|
+
mb: v,
|
|
95
|
+
ml: m,
|
|
96
|
+
mx: f,
|
|
97
|
+
my: u,
|
|
98
|
+
p: h,
|
|
99
|
+
pt: y,
|
|
100
|
+
pr: b,
|
|
101
|
+
pb: N,
|
|
102
|
+
pl: B,
|
|
103
|
+
px: x,
|
|
104
|
+
py: _,
|
|
105
|
+
bg: $,
|
|
106
|
+
color: L,
|
|
107
|
+
fontSize: k,
|
|
108
|
+
fontWeight: j,
|
|
109
|
+
textAlign: I,
|
|
110
|
+
lineHeight: A,
|
|
111
|
+
letterSpacing: O,
|
|
112
|
+
borderRadius: g,
|
|
113
|
+
boxShadow: V,
|
|
114
|
+
borderWidth: H,
|
|
115
|
+
borderTopWidth: W,
|
|
116
|
+
borderRightWidth: q,
|
|
117
|
+
borderBottomWidth: X,
|
|
118
|
+
borderLeftWidth: F,
|
|
119
|
+
borderXWidth: P,
|
|
120
|
+
borderYWidth: Y,
|
|
121
|
+
borderColor: le,
|
|
122
|
+
...re
|
|
123
|
+
}, ie) => {
|
|
124
|
+
const C = e || "div", S = (R, J) => {
|
|
125
|
+
if (R === void 0 || R === 0) return;
|
|
126
|
+
const rt = `var(--clarity-border-width-${R})`, it = J ? ue(J) : "currentColor";
|
|
127
|
+
return `${rt} solid ${it}`;
|
|
128
|
+
}, G = {
|
|
129
|
+
display: n,
|
|
130
|
+
flexDirection: l,
|
|
131
|
+
alignItems: i,
|
|
132
|
+
justifyContent: d,
|
|
133
|
+
gap: U(o),
|
|
134
|
+
marginTop: U(c ?? u ?? r),
|
|
135
|
+
marginRight: U(p ?? f ?? r),
|
|
136
|
+
marginBottom: U(v ?? u ?? r),
|
|
137
|
+
marginLeft: U(m ?? f ?? r),
|
|
138
|
+
paddingTop: U(y ?? _ ?? h),
|
|
139
|
+
paddingRight: U(b ?? x ?? h),
|
|
140
|
+
paddingBottom: U(N ?? _ ?? h),
|
|
141
|
+
paddingLeft: U(B ?? x ?? h),
|
|
142
|
+
backgroundColor: $ ? ue($) : void 0,
|
|
143
|
+
color: L ? ue(L) : void 0,
|
|
144
|
+
fontSize: k ? `var(--clarity-font-size-${k})` : void 0,
|
|
145
|
+
fontWeight: j ? ve.fontWeight[j] : void 0,
|
|
146
|
+
textAlign: I,
|
|
147
|
+
lineHeight: A,
|
|
148
|
+
letterSpacing: O ? ve.letterSpacing[O] : void 0,
|
|
149
|
+
borderRadius: g ? `var(--clarity-radius-${g})` : void 0,
|
|
150
|
+
boxShadow: V ? `var(--clarity-shadow-${V})` : void 0,
|
|
151
|
+
border: S(H, le),
|
|
152
|
+
borderTop: S(W ?? Y),
|
|
153
|
+
borderRight: S(q ?? P),
|
|
154
|
+
borderBottom: S(X ?? Y),
|
|
155
|
+
borderLeft: S(F ?? P)
|
|
156
|
+
};
|
|
157
|
+
return /* @__PURE__ */ a(C, { ref: ie, className: `clarity-box ${s || ""}`.trim(), style: G, ...re, children: t });
|
|
158
|
+
}), At = ({
|
|
46
159
|
variant: e = "primary",
|
|
47
160
|
size: t = "medium",
|
|
48
161
|
disabled: s = !1,
|
|
@@ -1880,131 +1993,20 @@ const Et = (e) => `${e / 12 * 100}%`, Lt = (e) => `${e / 12 * 100}%`, St = ({
|
|
|
1880
1993
|
return E.createElement(c, { className: h, style: m, ...v }, r);
|
|
1881
1994
|
};
|
|
1882
1995
|
St.displayName = "Col";
|
|
1883
|
-
const
|
|
1884
|
-
fontFamily: {
|
|
1885
|
-
sans: ["Inter", "system-ui", "sans-serif"],
|
|
1886
|
-
mono: ["Fira Code", "monospace"]
|
|
1887
|
-
},
|
|
1888
|
-
fontSize: {
|
|
1889
|
-
xs: "12px",
|
|
1890
|
-
sm: "14px",
|
|
1891
|
-
base: "16px",
|
|
1892
|
-
lg: "18px",
|
|
1893
|
-
xl: "20px",
|
|
1894
|
-
"2xl": "24px",
|
|
1895
|
-
"3xl": "30px"
|
|
1896
|
-
},
|
|
1897
|
-
fontWeight: {
|
|
1898
|
-
normal: 400,
|
|
1899
|
-
medium: 500,
|
|
1900
|
-
semibold: 600,
|
|
1901
|
-
bold: 700
|
|
1902
|
-
},
|
|
1903
|
-
letterSpacing: {
|
|
1904
|
-
tighter: "-0.05em",
|
|
1905
|
-
tight: "-0.025em",
|
|
1906
|
-
normal: "0em",
|
|
1907
|
-
wide: "0.025em",
|
|
1908
|
-
wider: "0.05em"
|
|
1909
|
-
}
|
|
1910
|
-
}, ue = (e) => {
|
|
1911
|
-
if (e) {
|
|
1912
|
-
if (e.includes(".")) {
|
|
1913
|
-
const [t, s] = e.split(".");
|
|
1914
|
-
return `var(--clarity-${t}-${s})`;
|
|
1915
|
-
}
|
|
1916
|
-
return `var(--clarity-${e})`;
|
|
1917
|
-
}
|
|
1918
|
-
}, U = (e) => e !== void 0 ? `var(--clarity-spacing-${e})` : void 0, de = E.forwardRef(({
|
|
1919
|
-
as: e,
|
|
1920
|
-
children: t,
|
|
1921
|
-
className: s,
|
|
1922
|
-
display: n,
|
|
1923
|
-
flexDirection: l,
|
|
1924
|
-
alignItems: i,
|
|
1925
|
-
justifyContent: d,
|
|
1926
|
-
gap: o,
|
|
1927
|
-
m: r,
|
|
1928
|
-
mt: c,
|
|
1929
|
-
mr: p,
|
|
1930
|
-
mb: v,
|
|
1931
|
-
ml: m,
|
|
1932
|
-
mx: f,
|
|
1933
|
-
my: u,
|
|
1934
|
-
p: h,
|
|
1935
|
-
pt: y,
|
|
1936
|
-
pr: b,
|
|
1937
|
-
pb: N,
|
|
1938
|
-
pl: B,
|
|
1939
|
-
px: x,
|
|
1940
|
-
py: _,
|
|
1941
|
-
bg: $,
|
|
1942
|
-
color: L,
|
|
1943
|
-
fontSize: k,
|
|
1944
|
-
fontWeight: j,
|
|
1945
|
-
textAlign: I,
|
|
1946
|
-
lineHeight: A,
|
|
1947
|
-
letterSpacing: O,
|
|
1948
|
-
borderRadius: g,
|
|
1949
|
-
boxShadow: V,
|
|
1950
|
-
borderWidth: H,
|
|
1951
|
-
borderTopWidth: W,
|
|
1952
|
-
borderRightWidth: q,
|
|
1953
|
-
borderBottomWidth: X,
|
|
1954
|
-
borderLeftWidth: F,
|
|
1955
|
-
borderXWidth: P,
|
|
1956
|
-
borderYWidth: Y,
|
|
1957
|
-
borderColor: le,
|
|
1958
|
-
...re
|
|
1959
|
-
}, ie) => {
|
|
1960
|
-
const C = e || "div", S = (R, J) => {
|
|
1961
|
-
if (R === void 0 || R === 0) return;
|
|
1962
|
-
const rt = `var(--clarity-border-width-${R})`, it = J ? ue(J) : "currentColor";
|
|
1963
|
-
return `${rt} solid ${it}`;
|
|
1964
|
-
}, G = {
|
|
1965
|
-
display: n,
|
|
1966
|
-
flexDirection: l,
|
|
1967
|
-
alignItems: i,
|
|
1968
|
-
justifyContent: d,
|
|
1969
|
-
gap: U(o),
|
|
1970
|
-
marginTop: U(c ?? u ?? r),
|
|
1971
|
-
marginRight: U(p ?? f ?? r),
|
|
1972
|
-
marginBottom: U(v ?? u ?? r),
|
|
1973
|
-
marginLeft: U(m ?? f ?? r),
|
|
1974
|
-
paddingTop: U(y ?? _ ?? h),
|
|
1975
|
-
paddingRight: U(b ?? x ?? h),
|
|
1976
|
-
paddingBottom: U(N ?? _ ?? h),
|
|
1977
|
-
paddingLeft: U(B ?? x ?? h),
|
|
1978
|
-
backgroundColor: $ ? ue($) : void 0,
|
|
1979
|
-
color: L ? ue(L) : void 0,
|
|
1980
|
-
fontSize: k ? `var(--clarity-font-size-${k})` : void 0,
|
|
1981
|
-
fontWeight: j ? ve.fontWeight[j] : void 0,
|
|
1982
|
-
textAlign: I,
|
|
1983
|
-
lineHeight: A,
|
|
1984
|
-
letterSpacing: O ? ve.letterSpacing[O] : void 0,
|
|
1985
|
-
borderRadius: g ? `var(--clarity-radius-${g})` : void 0,
|
|
1986
|
-
boxShadow: V ? `var(--clarity-shadow-${V})` : void 0,
|
|
1987
|
-
border: S(H, le),
|
|
1988
|
-
borderTop: S(W ?? Y),
|
|
1989
|
-
borderRight: S(q ?? P),
|
|
1990
|
-
borderBottom: S(X ?? Y),
|
|
1991
|
-
borderLeft: S(F ?? P)
|
|
1992
|
-
};
|
|
1993
|
-
return /* @__PURE__ */ a(C, { ref: ie, className: `clarity-box ${s || ""}`.trim(), style: G, ...re, children: t });
|
|
1994
|
-
}), at = ({ children: e, className: t }) => /* @__PURE__ */ a(de, { as: "header", p: 4, borderBottomWidth: 1, borderColor: "gray.200", className: t, children: e });
|
|
1996
|
+
const at = ({ children: e, className: t, ...s }) => /* @__PURE__ */ a(de, { as: "header", p: 4, borderBottomWidth: 1, borderColor: "gray.200", className: t, ...s, children: e });
|
|
1995
1997
|
at.displayName = "Card.Header";
|
|
1996
|
-
const nt = ({ children: e, className: t }) => /* @__PURE__ */ a(de, { p: 4, className: t, children: e });
|
|
1998
|
+
const nt = ({ children: e, className: t, ...s }) => /* @__PURE__ */ a(de, { p: 4, className: t, ...s, children: e });
|
|
1997
1999
|
nt.displayName = "Card.Content";
|
|
1998
|
-
const lt = ({ children: e, className: t }) => /* @__PURE__ */ a(de, { as: "footer", p: 4, borderTopWidth: 1, borderColor: "gray.200", display: "flex", justifyContent: "flex-end", gap: 3, className: t, children: e });
|
|
2000
|
+
const lt = ({ children: e, className: t, ...s }) => /* @__PURE__ */ a(de, { as: "footer", p: 4, borderTopWidth: 1, borderColor: "gray.200", display: "flex", justifyContent: "flex-end", gap: 3, className: t, ...s, children: e });
|
|
1999
2001
|
lt.displayName = "Card.Footer";
|
|
2000
|
-
const me = ({ children: e,
|
|
2002
|
+
const me = ({ children: e, bg: t = "white", ...s }) => /* @__PURE__ */ a(
|
|
2001
2003
|
de,
|
|
2002
2004
|
{
|
|
2003
|
-
bg:
|
|
2005
|
+
bg: t,
|
|
2004
2006
|
borderRadius: 3,
|
|
2005
2007
|
boxShadow: 1,
|
|
2006
2008
|
overflow: "hidden",
|
|
2007
|
-
...
|
|
2009
|
+
...s,
|
|
2008
2010
|
children: e
|
|
2009
2011
|
}
|
|
2010
2012
|
);
|
|
@@ -2073,6 +2075,7 @@ const Jt = {
|
|
|
2073
2075
|
export {
|
|
2074
2076
|
Ft as Accordion,
|
|
2075
2077
|
Dt as Badge,
|
|
2078
|
+
de as Box,
|
|
2076
2079
|
At as Button,
|
|
2077
2080
|
Pt as ButtonGroup,
|
|
2078
2081
|
Mt as ButtonIcon,
|