digital-rabbit-cl 1.0.15 → 1.0.17
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/dist/components/Button/Button.d.ts +18 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/Button.native.d.ts +18 -0
- package/dist/components/Button/Button.native.d.ts.map +1 -0
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/useButtonStyles.d.ts +21 -0
- package/dist/components/Button/useButtonStyles.d.ts.map +1 -0
- package/dist/components/CSSReset/CSSReset.d.ts +29 -0
- package/dist/components/CSSReset/CSSReset.d.ts.map +1 -0
- package/dist/components/CSSReset/index.d.ts +2 -0
- package/dist/components/CSSReset/index.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +24 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox/index.d.ts +3 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -0
- package/dist/components/Checkbox/useCheckboxStyles.d.ts +18 -0
- package/dist/components/Checkbox/useCheckboxStyles.d.ts.map +1 -0
- package/dist/components/Form/Form.d.ts +8 -0
- package/dist/components/Form/Form.d.ts.map +1 -0
- package/dist/components/FormLabel/FormLabel.d.ts +12 -0
- package/dist/components/FormLabel/FormLabel.d.ts.map +1 -0
- package/dist/components/FormLabel/FormLabel.native.d.ts +12 -0
- package/dist/components/FormLabel/FormLabel.native.d.ts.map +1 -0
- package/dist/components/FormLabel/index.d.ts +3 -0
- package/dist/components/FormLabel/index.d.ts.map +1 -0
- package/dist/components/FormLabel/useFormLabelStyles.d.ts +17 -0
- package/dist/components/FormLabel/useFormLabelStyles.d.ts.map +1 -0
- package/dist/components/Hamburger/Hamburger.d.ts +14 -0
- package/dist/components/Hamburger/Hamburger.d.ts.map +1 -0
- package/dist/components/Hamburger/index.d.ts +4 -0
- package/dist/components/Hamburger/index.d.ts.map +1 -0
- package/dist/components/Hamburger/useHamburgerStyles.d.ts +14 -0
- package/dist/components/Hamburger/useHamburgerStyles.d.ts.map +1 -0
- package/dist/components/Header/Header.d.ts +15 -0
- package/dist/components/Header/Header.d.ts.map +1 -0
- package/dist/components/Header/Header.native.d.ts +17 -0
- package/dist/components/Header/Header.native.d.ts.map +1 -0
- package/dist/components/Header/index.d.ts +5 -0
- package/dist/components/Header/index.d.ts.map +1 -0
- package/dist/components/Header/useHeaderStyles.d.ts +17 -0
- package/dist/components/Header/useHeaderStyles.d.ts.map +1 -0
- package/dist/components/Input/Input.d.ts +17 -0
- package/dist/components/Input/Input.d.ts.map +1 -0
- package/dist/components/Input/Input.native.d.ts +23 -0
- package/dist/components/Input/Input.native.d.ts.map +1 -0
- package/dist/components/Input/index.d.ts +3 -0
- package/dist/components/Input/index.d.ts.map +1 -0
- package/dist/components/Input/useInputStyles.d.ts +19 -0
- package/dist/components/Input/useInputStyles.d.ts.map +1 -0
- package/dist/components/Radio/Radio.d.ts +22 -0
- package/dist/components/Radio/Radio.d.ts.map +1 -0
- package/dist/components/Radio/index.d.ts +3 -0
- package/dist/components/Radio/index.d.ts.map +1 -0
- package/dist/components/Radio/useRadioStyles.d.ts +15 -0
- package/dist/components/Radio/useRadioStyles.d.ts.map +1 -0
- package/dist/components/ResponsiveNav/ResponsiveNav.d.ts +18 -0
- package/dist/components/ResponsiveNav/ResponsiveNav.d.ts.map +1 -0
- package/dist/components/ResponsiveNav/index.d.ts +4 -0
- package/dist/components/ResponsiveNav/index.d.ts.map +1 -0
- package/dist/components/ResponsiveNav/useResponsiveNavStyles.d.ts +18 -0
- package/dist/components/ResponsiveNav/useResponsiveNavStyles.d.ts.map +1 -0
- package/dist/components/Select/Select.d.ts +16 -0
- package/dist/components/Select/Select.d.ts.map +1 -0
- package/dist/components/Select/index.d.ts +3 -0
- package/dist/components/Select/index.d.ts.map +1 -0
- package/dist/components/Select/useSelectStyles.d.ts +17 -0
- package/dist/components/Select/useSelectStyles.d.ts.map +1 -0
- package/dist/components/Textarea/Textarea.d.ts +17 -0
- package/dist/components/Textarea/Textarea.d.ts.map +1 -0
- package/dist/components/Textarea/index.d.ts +3 -0
- package/dist/components/Textarea/index.d.ts.map +1 -0
- package/dist/components/Textarea/useTextareaStyles.d.ts +17 -0
- package/dist/components/Textarea/useTextareaStyles.d.ts.map +1 -0
- package/dist/digital-rabbit-cl.css +1 -0
- package/dist/digital-rabbit-cl.es.js +642 -0
- package/dist/digital-rabbit-cl.umd.js +21 -0
- package/dist/hooks/useMediaQuery.d.ts +2 -0
- package/dist/hooks/useMediaQuery.d.ts.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/logo-dark.svg +1 -0
- package/dist/logo-light.svg +1 -0
- package/dist/test-utils.d.ts +17 -0
- package/dist/test-utils.d.ts.map +1 -0
- package/dist/theme/ThemeContext.d.ts +95 -0
- package/dist/theme/ThemeContext.d.ts.map +1 -0
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/package.json +27 -22
- package/dist/digital-rabbit-cl.js +0 -1
- package/src/components/Button/Button.d.ts +0 -20
- package/src/components/Button/Button.module.css +0 -33
- package/src/components/Button/Button.native.d.ts +0 -20
- package/src/components/Button/index.d.ts +0 -2
- package/src/components/CSSReset/CSSReset.d.ts +0 -45
- package/src/components/CSSReset/index.d.ts +0 -1
- package/src/components/Checkbox/Checkbox.d.ts +0 -20
- package/src/components/Checkbox/index.d.ts +0 -2
- package/src/components/FormLabel/FormLabel.d.ts +0 -14
- package/src/components/FormLabel/FormLabel.module.css +0 -14
- package/src/components/FormLabel/FormLabel.native.d.ts +0 -14
- package/src/components/FormLabel/index.d.ts +0 -2
- package/src/components/Input/Input.d.ts +0 -19
- package/src/components/Input/Input.module.css +0 -28
- package/src/components/Input/Input.native.d.ts +0 -20
- package/src/components/Input/index.d.ts +0 -2
- package/src/components/Radio/Radio.d.ts +0 -19
- package/src/components/Radio/index.d.ts +0 -2
- package/src/components/Select/Select.d.ts +0 -21
- package/src/components/Select/Select.module.css +0 -35
- package/src/components/Select/index.d.ts +0 -2
- package/src/components/Textarea/Textarea.d.ts +0 -22
- package/src/components/Textarea/Textarea.module.css +0 -23
- package/src/components/Textarea/index.d.ts +0 -2
- package/src/index.d.ts +0 -9
- package/src/theme/ThemeContext.d.ts +0 -65
- package/src/theme/index.d.ts +0 -2
|
@@ -0,0 +1,642 @@
|
|
|
1
|
+
import { jsx as _, jsxs as k } from "react/jsx-runtime";
|
|
2
|
+
import P, { createContext as j, useContext as E, useState as M, useEffect as A } from "react";
|
|
3
|
+
const V = "Button-module__button___2ZuB7", U = "Button-module__sizeSmall___DRT8P", q = "Button-module__sizeDefault___iwWOV", v = {
|
|
4
|
+
button: V,
|
|
5
|
+
sizeSmall: U,
|
|
6
|
+
sizeDefault: q
|
|
7
|
+
}, O = ({
|
|
8
|
+
isActive: t,
|
|
9
|
+
disabled: e,
|
|
10
|
+
buttonColor: o,
|
|
11
|
+
textColor: s,
|
|
12
|
+
hoverColor: r,
|
|
13
|
+
hoverTextColor: n,
|
|
14
|
+
outline: u
|
|
15
|
+
}) => {
|
|
16
|
+
let a, c, i;
|
|
17
|
+
return u ? (a = "transparent", c = o, i = o, t && (a = r || o, c = r || o, i = n || s)) : (a = o, c = o, i = s, t && (a = r || o, c = r || o, i = n || s)), {
|
|
18
|
+
backgroundColor: a,
|
|
19
|
+
borderColor: c,
|
|
20
|
+
color: i,
|
|
21
|
+
opacity: e ? 0.3 : t && r ? 1 : t ? 0.75 : 1
|
|
22
|
+
};
|
|
23
|
+
}, R = {
|
|
24
|
+
primary: "#FFF",
|
|
25
|
+
secondary: "#000",
|
|
26
|
+
accent: "#4381C1",
|
|
27
|
+
error: "#F00",
|
|
28
|
+
success: "#008000",
|
|
29
|
+
warning: "#FFEB3B"
|
|
30
|
+
}, h = {
|
|
31
|
+
colors: R,
|
|
32
|
+
fonts: {
|
|
33
|
+
color: "#000",
|
|
34
|
+
lineHeight: 1.5,
|
|
35
|
+
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
36
|
+
fontWeightHeader: 700,
|
|
37
|
+
size: "22px",
|
|
38
|
+
rhythm: "1.45rem",
|
|
39
|
+
fontSizeH1: "2.5rem",
|
|
40
|
+
fontSizeH2: "1.75rem",
|
|
41
|
+
fontSizeH3: "1.38316rem",
|
|
42
|
+
fontSizeH4: "1rem",
|
|
43
|
+
fontSizeH5: "0.85028rem",
|
|
44
|
+
fontSizeH6: "0.78405rem"
|
|
45
|
+
},
|
|
46
|
+
buttons: {
|
|
47
|
+
textColor: "#FFF",
|
|
48
|
+
primary: {
|
|
49
|
+
textColor: R.secondary
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
borderRadius: "0px",
|
|
53
|
+
breakpoints: {
|
|
54
|
+
xs: "350px",
|
|
55
|
+
sm: "475px",
|
|
56
|
+
md: "769px",
|
|
57
|
+
lg: "1025px"
|
|
58
|
+
},
|
|
59
|
+
layout: {
|
|
60
|
+
maxWidth: "1280px",
|
|
61
|
+
wrapperPaddingSm: "0.5rem",
|
|
62
|
+
wrapperPadding: "1rem"
|
|
63
|
+
}
|
|
64
|
+
}, L = j(h), xt = ({ theme: t = {}, children: e }) => {
|
|
65
|
+
var s;
|
|
66
|
+
const o = {
|
|
67
|
+
...h,
|
|
68
|
+
...t,
|
|
69
|
+
colors: {
|
|
70
|
+
...h.colors,
|
|
71
|
+
...t.colors
|
|
72
|
+
},
|
|
73
|
+
fonts: {
|
|
74
|
+
...h.fonts,
|
|
75
|
+
...t.fonts
|
|
76
|
+
},
|
|
77
|
+
buttons: {
|
|
78
|
+
...h.buttons,
|
|
79
|
+
...t.buttons,
|
|
80
|
+
primary: {
|
|
81
|
+
...h.buttons.primary,
|
|
82
|
+
...(s = t.buttons) == null ? void 0 : s.primary
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
breakpoints: {
|
|
86
|
+
...h.breakpoints,
|
|
87
|
+
...t.breakpoints
|
|
88
|
+
},
|
|
89
|
+
layout: {
|
|
90
|
+
...h.layout,
|
|
91
|
+
...t.layout
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
return /* @__PURE__ */ _(L.Provider, { value: o, children: e });
|
|
95
|
+
}, z = () => E(L), bt = ({
|
|
96
|
+
color: t,
|
|
97
|
+
hoverColor: e,
|
|
98
|
+
hoverTextColor: o,
|
|
99
|
+
textColor: s,
|
|
100
|
+
outline: r = !1,
|
|
101
|
+
size: n,
|
|
102
|
+
type: u = "button",
|
|
103
|
+
buttonProps: a = {},
|
|
104
|
+
children: c,
|
|
105
|
+
disabled: i = !1,
|
|
106
|
+
onClick: d,
|
|
107
|
+
fontSize: m
|
|
108
|
+
}) => {
|
|
109
|
+
const y = z(), [l, p] = M(!1);
|
|
110
|
+
let f;
|
|
111
|
+
s ? f = s : f = t ? y.buttons.textColor : y.buttons.primary.textColor;
|
|
112
|
+
const S = {
|
|
113
|
+
...O({
|
|
114
|
+
isActive: l,
|
|
115
|
+
disabled: i,
|
|
116
|
+
buttonColor: t || y.colors.primary,
|
|
117
|
+
textColor: f,
|
|
118
|
+
hoverColor: e,
|
|
119
|
+
hoverTextColor: o,
|
|
120
|
+
outline: r
|
|
121
|
+
}),
|
|
122
|
+
fontSize: m || y.fonts.size
|
|
123
|
+
}, g = [
|
|
124
|
+
v.button,
|
|
125
|
+
n === "small" ? v.sizeSmall : v.sizeDefault,
|
|
126
|
+
r ? v.outline : ""
|
|
127
|
+
].filter(Boolean).join(" ");
|
|
128
|
+
return /* @__PURE__ */ _(
|
|
129
|
+
"button",
|
|
130
|
+
{
|
|
131
|
+
className: g,
|
|
132
|
+
disabled: i,
|
|
133
|
+
onClick: d,
|
|
134
|
+
onMouseEnter: () => p(!0),
|
|
135
|
+
onMouseLeave: () => p(!1),
|
|
136
|
+
type: u,
|
|
137
|
+
...a,
|
|
138
|
+
style: {
|
|
139
|
+
...S,
|
|
140
|
+
...a.style
|
|
141
|
+
},
|
|
142
|
+
children: c
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
};
|
|
146
|
+
var N = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), Z = new Uint8Array(16);
|
|
147
|
+
function Q() {
|
|
148
|
+
if (!N)
|
|
149
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
150
|
+
return N(Z);
|
|
151
|
+
}
|
|
152
|
+
var T = [];
|
|
153
|
+
for (var w = 0; w < 256; ++w)
|
|
154
|
+
T[w] = (w + 256).toString(16).substr(1);
|
|
155
|
+
function G(t, e) {
|
|
156
|
+
var o = 0, s = T;
|
|
157
|
+
return [s[t[o++]], s[t[o++]], s[t[o++]], s[t[o++]], "-", s[t[o++]], s[t[o++]], "-", s[t[o++]], s[t[o++]], "-", s[t[o++]], s[t[o++]], "-", s[t[o++]], s[t[o++]], s[t[o++]], s[t[o++]], s[t[o++]], s[t[o++]]].join("");
|
|
158
|
+
}
|
|
159
|
+
function W(t, e, o) {
|
|
160
|
+
var s = e && o || 0;
|
|
161
|
+
typeof t == "string" && (e = t === "binary" ? new Array(16) : null, t = null), t = t || {};
|
|
162
|
+
var r = t.random || (t.rng || Q)();
|
|
163
|
+
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, e)
|
|
164
|
+
for (var n = 0; n < 16; ++n)
|
|
165
|
+
e[s + n] = r[n];
|
|
166
|
+
return e || G(r);
|
|
167
|
+
}
|
|
168
|
+
const J = "Checkbox-module__container___aV9qz", K = "Checkbox-module__svg___kkluC", X = "Checkbox-module__label___cwRtI", H = {
|
|
169
|
+
container: J,
|
|
170
|
+
svg: K,
|
|
171
|
+
label: X
|
|
172
|
+
}, Y = ({
|
|
173
|
+
color: t = "#000",
|
|
174
|
+
checkmarkColor: e,
|
|
175
|
+
disabled: o = !1,
|
|
176
|
+
inverted: s = !1
|
|
177
|
+
}) => {
|
|
178
|
+
let r = t;
|
|
179
|
+
return e ? r = e : s && (r = "white"), {
|
|
180
|
+
boxColor: t,
|
|
181
|
+
checkmarkColor: r,
|
|
182
|
+
cursor: o ? "default" : "pointer",
|
|
183
|
+
opacity: o ? 0.3 : 1
|
|
184
|
+
};
|
|
185
|
+
}, kt = ({
|
|
186
|
+
checked: t = !1,
|
|
187
|
+
checkmarkColor: e,
|
|
188
|
+
color: o,
|
|
189
|
+
disabled: s = !1,
|
|
190
|
+
fontSize: r,
|
|
191
|
+
id: n,
|
|
192
|
+
inverted: u = !1,
|
|
193
|
+
label: a,
|
|
194
|
+
labelStyle: c,
|
|
195
|
+
name: i,
|
|
196
|
+
onChange: d,
|
|
197
|
+
style: m,
|
|
198
|
+
...y
|
|
199
|
+
}) => {
|
|
200
|
+
const l = z(), p = n || W(), f = Y({
|
|
201
|
+
color: o || l.colors.primary,
|
|
202
|
+
checkmarkColor: e,
|
|
203
|
+
disabled: s,
|
|
204
|
+
inverted: u
|
|
205
|
+
}), x = (b) => {
|
|
206
|
+
s || d(b);
|
|
207
|
+
}, S = {
|
|
208
|
+
cursor: f.cursor,
|
|
209
|
+
fontSize: r || l.fonts.size,
|
|
210
|
+
opacity: f.opacity,
|
|
211
|
+
...m
|
|
212
|
+
}, g = {
|
|
213
|
+
width: r || "1rem"
|
|
214
|
+
}, C = {
|
|
215
|
+
color: f.boxColor,
|
|
216
|
+
cursor: f.cursor,
|
|
217
|
+
fontSize: r || "1rem",
|
|
218
|
+
...c
|
|
219
|
+
};
|
|
220
|
+
return /* @__PURE__ */ k("div", { className: H.container, style: S, ...y, children: [
|
|
221
|
+
/* @__PURE__ */ _(
|
|
222
|
+
"input",
|
|
223
|
+
{
|
|
224
|
+
id: p,
|
|
225
|
+
checked: t,
|
|
226
|
+
disabled: s,
|
|
227
|
+
onChange: (b) => x({ target: { checked: b.target.checked, name: i, type: "checkbox" } }),
|
|
228
|
+
name: i,
|
|
229
|
+
style: { display: "none" },
|
|
230
|
+
type: "checkbox"
|
|
231
|
+
}
|
|
232
|
+
),
|
|
233
|
+
/* @__PURE__ */ k(
|
|
234
|
+
"svg",
|
|
235
|
+
{
|
|
236
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
237
|
+
viewBox: "0 0 100 100",
|
|
238
|
+
onClick: () => x({ target: { checked: !t, name: i, type: "checkbox" } }),
|
|
239
|
+
style: g,
|
|
240
|
+
className: H.svg,
|
|
241
|
+
children: [
|
|
242
|
+
/* @__PURE__ */ _(
|
|
243
|
+
"rect",
|
|
244
|
+
{
|
|
245
|
+
x: "0",
|
|
246
|
+
y: "0",
|
|
247
|
+
height: "100",
|
|
248
|
+
width: "100",
|
|
249
|
+
style: {
|
|
250
|
+
fill: u && t ? f.boxColor : "transparent",
|
|
251
|
+
strokeWidth: "25",
|
|
252
|
+
stroke: f.boxColor
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
),
|
|
256
|
+
t && /* @__PURE__ */ _(
|
|
257
|
+
"path",
|
|
258
|
+
{
|
|
259
|
+
d: "M 25 45 L 45 65 L 75 30",
|
|
260
|
+
stroke: f.checkmarkColor,
|
|
261
|
+
strokeWidth: "15",
|
|
262
|
+
fill: "transparent"
|
|
263
|
+
}
|
|
264
|
+
)
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
),
|
|
268
|
+
a && /* @__PURE__ */ _("label", { htmlFor: p, className: H.label, style: C, children: a })
|
|
269
|
+
] });
|
|
270
|
+
}, vt = () => {
|
|
271
|
+
const t = z();
|
|
272
|
+
return A(() => {
|
|
273
|
+
const e = document.documentElement;
|
|
274
|
+
t.fonts && (t.fonts.fontFamily && e.style.setProperty("--font-family", t.fonts.fontFamily), t.fonts.size && e.style.setProperty("--font-size", t.fonts.size), t.fonts.lineHeight !== void 0 && e.style.setProperty("--line-height", t.fonts.lineHeight.toString()), t.fonts.fontWeightHeader !== void 0 && e.style.setProperty("--font-weight-header", t.fonts.fontWeightHeader.toString()), t.fonts.fontSizeH1 && e.style.setProperty("--font-size-h1", t.fonts.fontSizeH1), t.fonts.fontSizeH2 && e.style.setProperty("--font-size-h2", t.fonts.fontSizeH2), t.fonts.fontSizeH3 && e.style.setProperty("--font-size-h3", t.fonts.fontSizeH3), t.fonts.fontSizeH4 && e.style.setProperty("--font-size-h4", t.fonts.fontSizeH4), t.fonts.fontSizeH5 && e.style.setProperty("--font-size-h5", t.fonts.fontSizeH5), t.fonts.fontSizeH6 && e.style.setProperty("--font-size-h6", t.fonts.fontSizeH6)), t.colors && (t.colors.primary && e.style.setProperty("--primary-color", t.colors.primary), t.colors.secondary && e.style.setProperty("--background-color", t.colors.secondary), t.colors.accent && e.style.setProperty("--accent-color", t.colors.accent)), t.breakpoints && (t.breakpoints.xs && e.style.setProperty("--breakpoint-xs", t.breakpoints.xs), t.breakpoints.sm && e.style.setProperty("--breakpoint-sm", t.breakpoints.sm), t.breakpoints.md && e.style.setProperty("--breakpoint-md", t.breakpoints.md), t.breakpoints.lg && e.style.setProperty("--breakpoint-lg", t.breakpoints.lg)), t.layout && (t.layout.maxWidth && e.style.setProperty("--layout-max-width", t.layout.maxWidth), t.layout.wrapperPaddingSm && e.style.setProperty("--layout-wrapper-padding-sm", t.layout.wrapperPaddingSm), t.layout.wrapperPadding && e.style.setProperty("--layout-wrapper-padding", t.layout.wrapperPadding));
|
|
275
|
+
}, [t]), null;
|
|
276
|
+
}, tt = "FormLabel-module__label___0M-fo", et = "FormLabel-module__disabled___ktIFp", D = {
|
|
277
|
+
label: tt,
|
|
278
|
+
disabled: et
|
|
279
|
+
}, ot = ({
|
|
280
|
+
color: t = "#000",
|
|
281
|
+
disabled: e = !1,
|
|
282
|
+
fontSize: o = ".85em"
|
|
283
|
+
}) => ({
|
|
284
|
+
color: t,
|
|
285
|
+
fontSize: o,
|
|
286
|
+
opacity: e ? 0.5 : 1,
|
|
287
|
+
cursor: e ? "not-allowed" : "default"
|
|
288
|
+
}), wt = ({
|
|
289
|
+
children: t,
|
|
290
|
+
color: e,
|
|
291
|
+
disabled: o = !1,
|
|
292
|
+
fontSize: s,
|
|
293
|
+
htmlFor: r,
|
|
294
|
+
style: n,
|
|
295
|
+
...u
|
|
296
|
+
}) => {
|
|
297
|
+
const a = z(), c = ot({
|
|
298
|
+
color: e || a.colors.primary,
|
|
299
|
+
disabled: o,
|
|
300
|
+
fontSize: s || ".85em"
|
|
301
|
+
}), i = {
|
|
302
|
+
color: c.color,
|
|
303
|
+
fontSize: c.fontSize,
|
|
304
|
+
opacity: c.opacity,
|
|
305
|
+
cursor: c.cursor,
|
|
306
|
+
...n
|
|
307
|
+
}, d = [
|
|
308
|
+
D.label,
|
|
309
|
+
o ? D.disabled : ""
|
|
310
|
+
].filter(Boolean).join(" ");
|
|
311
|
+
return /* @__PURE__ */ _(
|
|
312
|
+
"label",
|
|
313
|
+
{
|
|
314
|
+
className: d,
|
|
315
|
+
htmlFor: r,
|
|
316
|
+
style: i,
|
|
317
|
+
...u,
|
|
318
|
+
children: t
|
|
319
|
+
}
|
|
320
|
+
);
|
|
321
|
+
}, st = "Input-module__input___WjT81", rt = "Input-module__sizeSmall___NFvsi", nt = "Input-module__sizeDefault___AxPA0", F = {
|
|
322
|
+
input: st,
|
|
323
|
+
sizeSmall: rt,
|
|
324
|
+
sizeDefault: nt
|
|
325
|
+
}, lt = ({
|
|
326
|
+
color: t = "#000",
|
|
327
|
+
disabled: e = !1,
|
|
328
|
+
fontSize: o = "1em",
|
|
329
|
+
placeholderOpacity: s = 0.3
|
|
330
|
+
}) => ({
|
|
331
|
+
borderColor: t,
|
|
332
|
+
color: t,
|
|
333
|
+
fontSize: o,
|
|
334
|
+
opacity: e ? 0.3 : 1,
|
|
335
|
+
placeholderOpacity: s
|
|
336
|
+
}), Ct = ({
|
|
337
|
+
color: t,
|
|
338
|
+
disabled: e = !1,
|
|
339
|
+
fontSize: o,
|
|
340
|
+
name: s = "",
|
|
341
|
+
onChange: r,
|
|
342
|
+
placeholder: n,
|
|
343
|
+
placeholderOpacity: u = 0.3,
|
|
344
|
+
size: a,
|
|
345
|
+
style: c,
|
|
346
|
+
type: i = "text",
|
|
347
|
+
value: d = "",
|
|
348
|
+
...m
|
|
349
|
+
}) => {
|
|
350
|
+
const y = z(), l = lt({
|
|
351
|
+
color: t || y.colors.primary,
|
|
352
|
+
disabled: e,
|
|
353
|
+
fontSize: o || y.fonts.size,
|
|
354
|
+
placeholderOpacity: u
|
|
355
|
+
}), p = {
|
|
356
|
+
"--placeholder-opacity": l.placeholderOpacity,
|
|
357
|
+
borderColor: l.borderColor,
|
|
358
|
+
color: l.color,
|
|
359
|
+
fontSize: l.fontSize,
|
|
360
|
+
opacity: l.opacity,
|
|
361
|
+
...c
|
|
362
|
+
}, f = [
|
|
363
|
+
F.input,
|
|
364
|
+
a === "small" ? F.sizeSmall : F.sizeDefault
|
|
365
|
+
].filter(Boolean).join(" ");
|
|
366
|
+
return /* @__PURE__ */ _(
|
|
367
|
+
"input",
|
|
368
|
+
{
|
|
369
|
+
className: f,
|
|
370
|
+
disabled: e,
|
|
371
|
+
name: s,
|
|
372
|
+
onChange: r,
|
|
373
|
+
placeholder: n,
|
|
374
|
+
style: p,
|
|
375
|
+
type: i,
|
|
376
|
+
value: d,
|
|
377
|
+
...m
|
|
378
|
+
}
|
|
379
|
+
);
|
|
380
|
+
}, at = "Radio-module__container___AQxhk", ct = "Radio-module__svg___zl5kF", it = "Radio-module__label___vAFIP", $ = {
|
|
381
|
+
container: at,
|
|
382
|
+
svg: ct,
|
|
383
|
+
label: it
|
|
384
|
+
}, yt = ({
|
|
385
|
+
color: t = "#000",
|
|
386
|
+
disabled: e = !1
|
|
387
|
+
}) => ({
|
|
388
|
+
radioColor: t,
|
|
389
|
+
cursor: e ? "default" : "pointer",
|
|
390
|
+
opacity: e ? 0.3 : 1
|
|
391
|
+
}), Pt = ({
|
|
392
|
+
checked: t = !1,
|
|
393
|
+
color: e,
|
|
394
|
+
disabled: o = !1,
|
|
395
|
+
fontSize: s,
|
|
396
|
+
id: r,
|
|
397
|
+
label: n,
|
|
398
|
+
labelStyle: u,
|
|
399
|
+
name: a,
|
|
400
|
+
onChange: c,
|
|
401
|
+
style: i,
|
|
402
|
+
...d
|
|
403
|
+
}) => {
|
|
404
|
+
const m = z(), y = r || W(), l = yt({
|
|
405
|
+
color: e || m.colors.primary,
|
|
406
|
+
disabled: o
|
|
407
|
+
}), p = (b) => {
|
|
408
|
+
o || c(b);
|
|
409
|
+
}, f = {
|
|
410
|
+
cursor: l.cursor,
|
|
411
|
+
fontSize: s || m.fonts.size,
|
|
412
|
+
opacity: l.opacity,
|
|
413
|
+
...i
|
|
414
|
+
}, x = {
|
|
415
|
+
width: s || m.fonts.size
|
|
416
|
+
}, S = {
|
|
417
|
+
fill: "transparent",
|
|
418
|
+
strokeWidth: "12.5",
|
|
419
|
+
stroke: l.radioColor
|
|
420
|
+
}, g = {
|
|
421
|
+
fill: l.radioColor
|
|
422
|
+
}, C = {
|
|
423
|
+
color: l.radioColor,
|
|
424
|
+
cursor: l.cursor,
|
|
425
|
+
fontSize: s || m.fonts.size,
|
|
426
|
+
...u
|
|
427
|
+
};
|
|
428
|
+
return /* @__PURE__ */ k("div", { className: $.container, style: f, ...d, children: [
|
|
429
|
+
/* @__PURE__ */ _(
|
|
430
|
+
"input",
|
|
431
|
+
{
|
|
432
|
+
id: y,
|
|
433
|
+
checked: t,
|
|
434
|
+
disabled: o,
|
|
435
|
+
name: a,
|
|
436
|
+
onChange: (b) => p({ target: { checked: b.target.checked, name: a, type: "radio" } }),
|
|
437
|
+
style: { display: "none" },
|
|
438
|
+
type: "radio"
|
|
439
|
+
}
|
|
440
|
+
),
|
|
441
|
+
/* @__PURE__ */ k(
|
|
442
|
+
"svg",
|
|
443
|
+
{
|
|
444
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
445
|
+
viewBox: "0 0 100 100",
|
|
446
|
+
onClick: () => p({ target: { checked: !t, name: a, type: "radio" } }),
|
|
447
|
+
className: $.svg,
|
|
448
|
+
style: x,
|
|
449
|
+
children: [
|
|
450
|
+
/* @__PURE__ */ _(
|
|
451
|
+
"circle",
|
|
452
|
+
{
|
|
453
|
+
cx: "50",
|
|
454
|
+
cy: "50",
|
|
455
|
+
r: "42.5",
|
|
456
|
+
width: "100%",
|
|
457
|
+
style: S
|
|
458
|
+
}
|
|
459
|
+
),
|
|
460
|
+
t && /* @__PURE__ */ _(
|
|
461
|
+
"circle",
|
|
462
|
+
{
|
|
463
|
+
cx: "50",
|
|
464
|
+
cy: "50",
|
|
465
|
+
r: "25",
|
|
466
|
+
style: g
|
|
467
|
+
}
|
|
468
|
+
)
|
|
469
|
+
]
|
|
470
|
+
}
|
|
471
|
+
),
|
|
472
|
+
n && /* @__PURE__ */ _(
|
|
473
|
+
"label",
|
|
474
|
+
{
|
|
475
|
+
htmlFor: y,
|
|
476
|
+
className: $.label,
|
|
477
|
+
style: C,
|
|
478
|
+
children: n
|
|
479
|
+
}
|
|
480
|
+
)
|
|
481
|
+
] });
|
|
482
|
+
}, ut = "Select-module__select___cjdcr", pt = "Select-module__sizeSmall___i1quj", ft = "Select-module__sizeDefault___EiWvW", I = {
|
|
483
|
+
select: ut,
|
|
484
|
+
sizeSmall: pt,
|
|
485
|
+
sizeDefault: ft
|
|
486
|
+
}, mt = ({
|
|
487
|
+
color: t = "#000",
|
|
488
|
+
disabled: e = !1
|
|
489
|
+
}) => ({
|
|
490
|
+
color: t,
|
|
491
|
+
borderColor: t,
|
|
492
|
+
cursor: e ? "default" : "pointer",
|
|
493
|
+
opacity: e ? 0.3 : 1,
|
|
494
|
+
backgroundImage: ((n) => {
|
|
495
|
+
const u = `
|
|
496
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
497
|
+
<path
|
|
498
|
+
d="M 30 42.5 L 50 22.5 L 70 42.5"
|
|
499
|
+
stroke="${n}"
|
|
500
|
+
stroke-width="11"
|
|
501
|
+
fill="transparent"
|
|
502
|
+
/>
|
|
503
|
+
<path
|
|
504
|
+
d="M 30 58.5 L 50 78.5 L 70 58.5"
|
|
505
|
+
stroke="${n}"
|
|
506
|
+
stroke-width="11"
|
|
507
|
+
fill="transparent"
|
|
508
|
+
/>
|
|
509
|
+
</svg>
|
|
510
|
+
`.trim();
|
|
511
|
+
return `url("data:image/svg+xml,${encodeURIComponent(u)}")`;
|
|
512
|
+
})(t)
|
|
513
|
+
}), Ht = ({
|
|
514
|
+
children: t,
|
|
515
|
+
color: e,
|
|
516
|
+
disabled: o = !1,
|
|
517
|
+
fontSize: s,
|
|
518
|
+
name: r = "",
|
|
519
|
+
onChange: n,
|
|
520
|
+
placeholder: u = "",
|
|
521
|
+
size: a,
|
|
522
|
+
style: c,
|
|
523
|
+
value: i = "",
|
|
524
|
+
...d
|
|
525
|
+
}) => {
|
|
526
|
+
const m = z(), y = mt({
|
|
527
|
+
color: e || m.colors.primary,
|
|
528
|
+
disabled: o
|
|
529
|
+
}), l = {
|
|
530
|
+
backgroundImage: y.backgroundImage,
|
|
531
|
+
backgroundPosition: "right center",
|
|
532
|
+
backgroundRepeat: "no-repeat",
|
|
533
|
+
backgroundSize: "auto 85%",
|
|
534
|
+
backgroundColor: "transparent",
|
|
535
|
+
borderColor: y.borderColor,
|
|
536
|
+
color: y.color,
|
|
537
|
+
cursor: y.cursor,
|
|
538
|
+
fontSize: s || m.fonts.size,
|
|
539
|
+
opacity: y.opacity,
|
|
540
|
+
...c
|
|
541
|
+
}, p = [
|
|
542
|
+
I.select,
|
|
543
|
+
a === "small" ? I.sizeSmall : I.sizeDefault
|
|
544
|
+
].filter(Boolean).join(" ");
|
|
545
|
+
return /* @__PURE__ */ k(
|
|
546
|
+
"select",
|
|
547
|
+
{
|
|
548
|
+
className: p,
|
|
549
|
+
disabled: o,
|
|
550
|
+
name: r,
|
|
551
|
+
onChange: n,
|
|
552
|
+
style: l,
|
|
553
|
+
value: i,
|
|
554
|
+
...d,
|
|
555
|
+
children: [
|
|
556
|
+
u !== "" && /* @__PURE__ */ _("option", { disabled: !0, value: "", children: u }),
|
|
557
|
+
t
|
|
558
|
+
]
|
|
559
|
+
}
|
|
560
|
+
);
|
|
561
|
+
}, dt = "Textarea-module__textarea___Z-y6g", _t = "Textarea-module__sizeSmall___HHFEM", St = "Textarea-module__sizeDefault___LL2Uc", B = {
|
|
562
|
+
textarea: dt,
|
|
563
|
+
sizeSmall: _t,
|
|
564
|
+
sizeDefault: St
|
|
565
|
+
}, gt = ({
|
|
566
|
+
color: t = "#000",
|
|
567
|
+
disabled: e = !1,
|
|
568
|
+
placeholderOpacity: o = 0.3
|
|
569
|
+
}) => ({
|
|
570
|
+
color: t,
|
|
571
|
+
borderColor: t,
|
|
572
|
+
opacity: e ? 0.3 : 1,
|
|
573
|
+
placeholderOpacity: o
|
|
574
|
+
}), Ft = ({
|
|
575
|
+
color: t,
|
|
576
|
+
disabled: e = !1,
|
|
577
|
+
fontSize: o,
|
|
578
|
+
name: s = "",
|
|
579
|
+
onChange: r,
|
|
580
|
+
placeholder: n,
|
|
581
|
+
placeholderOpacity: u = 0.3,
|
|
582
|
+
rows: a = 3,
|
|
583
|
+
size: c,
|
|
584
|
+
style: i,
|
|
585
|
+
value: d = "",
|
|
586
|
+
...m
|
|
587
|
+
}) => {
|
|
588
|
+
const y = z(), l = gt({
|
|
589
|
+
color: t || y.colors.primary,
|
|
590
|
+
disabled: e,
|
|
591
|
+
placeholderOpacity: u
|
|
592
|
+
}), p = `textarea-placeholder-${P.useId ? P.useId() : Math.random().toString(36)}`;
|
|
593
|
+
P.useEffect(() => {
|
|
594
|
+
const S = document.createElement("style");
|
|
595
|
+
return S.id = p, S.textContent = `
|
|
596
|
+
.${p}::placeholder {
|
|
597
|
+
color: inherit;
|
|
598
|
+
opacity: ${l.placeholderOpacity};
|
|
599
|
+
}
|
|
600
|
+
`, document.head.appendChild(S), () => {
|
|
601
|
+
const g = document.getElementById(p);
|
|
602
|
+
g && g.remove();
|
|
603
|
+
};
|
|
604
|
+
}, [p, l.placeholderOpacity]);
|
|
605
|
+
const f = {
|
|
606
|
+
borderColor: l.borderColor,
|
|
607
|
+
color: l.color,
|
|
608
|
+
fontSize: o || y.fonts.size,
|
|
609
|
+
opacity: l.opacity,
|
|
610
|
+
...i
|
|
611
|
+
}, x = [
|
|
612
|
+
B.textarea,
|
|
613
|
+
c === "small" ? B.sizeSmall : B.sizeDefault,
|
|
614
|
+
p
|
|
615
|
+
].filter(Boolean).join(" ");
|
|
616
|
+
return /* @__PURE__ */ _(
|
|
617
|
+
"textarea",
|
|
618
|
+
{
|
|
619
|
+
className: x,
|
|
620
|
+
disabled: e,
|
|
621
|
+
name: s,
|
|
622
|
+
onChange: r,
|
|
623
|
+
placeholder: n,
|
|
624
|
+
rows: a,
|
|
625
|
+
style: f,
|
|
626
|
+
value: d,
|
|
627
|
+
...m
|
|
628
|
+
}
|
|
629
|
+
);
|
|
630
|
+
};
|
|
631
|
+
export {
|
|
632
|
+
bt as Button,
|
|
633
|
+
vt as CSSReset,
|
|
634
|
+
kt as Checkbox,
|
|
635
|
+
wt as FormLabel,
|
|
636
|
+
Ct as Input,
|
|
637
|
+
Pt as Radio,
|
|
638
|
+
Ht as Select,
|
|
639
|
+
Ft as Textarea,
|
|
640
|
+
xt as ThemeProvider,
|
|
641
|
+
z as useTheme
|
|
642
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
(function(d,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],a):(d=typeof globalThis<"u"?globalThis:d||self,a(d.DigitalRabbitCL={},d.jsxRuntime,d.React))})(this,(function(d,a,x){"use strict";const C={button:"Button-module__button___2ZuB7",sizeSmall:"Button-module__sizeSmall___DRT8P",sizeDefault:"Button-module__sizeDefault___iwWOV"},E=({isActive:e,disabled:t,buttonColor:o,textColor:s,hoverColor:r,hoverTextColor:l,outline:f})=>{let c,i,y;return f?(c="transparent",i=o,y=o,e&&(c=r||o,i=r||o,y=l||s)):(c=o,i=o,y=s,e&&(c=r||o,i=r||o,y=l||s)),{backgroundColor:c,borderColor:i,color:y,opacity:t?.3:e&&r?1:e?.75:1}},B={primary:"#FFF",secondary:"#000",accent:"#4381C1",error:"#F00",success:"#008000",warning:"#FFEB3B"},z={colors:B,fonts:{color:"#000",lineHeight:1.5,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',fontWeightHeader:700,size:"22px",rhythm:"1.45rem",fontSizeH1:"2.5rem",fontSizeH2:"1.75rem",fontSizeH3:"1.38316rem",fontSizeH4:"1rem",fontSizeH5:"0.85028rem",fontSizeH6:"0.78405rem"},buttons:{textColor:"#FFF",primary:{textColor:B.secondary}},borderRadius:"0px",breakpoints:{xs:"350px",sm:"475px",md:"769px",lg:"1025px"},layout:{maxWidth:"1280px",wrapperPaddingSm:"0.5rem",wrapperPadding:"1rem"}},T=x.createContext(z),M=({theme:e={},children:t})=>{var s;const o={...z,...e,colors:{...z.colors,...e.colors},fonts:{...z.fonts,...e.fonts},buttons:{...z.buttons,...e.buttons,primary:{...z.buttons.primary,...(s=e.buttons)==null?void 0:s.primary}},breakpoints:{...z.breakpoints,...e.breakpoints},layout:{...z.layout,...e.layout}};return a.jsx(T.Provider,{value:o,children:t})},g=()=>x.useContext(T),A=({color:e,hoverColor:t,hoverTextColor:o,textColor:s,outline:r=!1,size:l,type:f="button",buttonProps:c={},children:i,disabled:y=!1,onClick:_,fontSize:S})=>{const u=g(),[n,p]=x.useState(!1);let m;s?m=s:m=e?u.buttons.textColor:u.buttons.primary.textColor;const h={...E({isActive:n,disabled:y,buttonColor:e||u.colors.primary,textColor:m,hoverColor:t,hoverTextColor:o,outline:r}),fontSize:S||u.fonts.size},b=[C.button,l==="small"?C.sizeSmall:C.sizeDefault,r?C.outline:""].filter(Boolean).join(" ");return a.jsx("button",{className:b,disabled:y,onClick:_,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),type:f,...c,style:{...h,...c.style},children:i})};var N=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),V=new Uint8Array(16);function q(){if(!N)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return N(V)}for(var j=[],w=0;w<256;++w)j[w]=(w+256).toString(16).substr(1);function O(e,t){var o=0,s=j;return[s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]]].join("")}function L(e,t,o){var s=t&&o||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var r=e.random||(e.rng||q)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t)for(var l=0;l<16;++l)t[s+l]=r[l];return t||O(r)}const P={container:"Checkbox-module__container___aV9qz",svg:"Checkbox-module__svg___kkluC",label:"Checkbox-module__label___cwRtI"},U=({color:e="#000",checkmarkColor:t,disabled:o=!1,inverted:s=!1})=>{let r=e;return t?r=t:s&&(r="white"),{boxColor:e,checkmarkColor:r,cursor:o?"default":"pointer",opacity:o?.3:1}},Z=({checked:e=!1,checkmarkColor:t,color:o,disabled:s=!1,fontSize:r,id:l,inverted:f=!1,label:c,labelStyle:i,name:y,onChange:_,style:S,...u})=>{const n=g(),p=l||L(),m=U({color:o||n.colors.primary,checkmarkColor:t,disabled:s,inverted:f}),k=v=>{s||_(v)},h={cursor:m.cursor,fontSize:r||n.fonts.size,opacity:m.opacity,...S},b={width:r||"1rem"},I={color:m.boxColor,cursor:m.cursor,fontSize:r||"1rem",...i};return a.jsxs("div",{className:P.container,style:h,...u,children:[a.jsx("input",{id:p,checked:e,disabled:s,onChange:v=>k({target:{checked:v.target.checked,name:y,type:"checkbox"}}),name:y,style:{display:"none"},type:"checkbox"}),a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>k({target:{checked:!e,name:y,type:"checkbox"}}),style:b,className:P.svg,children:[a.jsx("rect",{x:"0",y:"0",height:"100",width:"100",style:{fill:f&&e?m.boxColor:"transparent",strokeWidth:"25",stroke:m.boxColor}}),e&&a.jsx("path",{d:"M 25 45 L 45 65 L 75 30",stroke:m.checkmarkColor,strokeWidth:"15",fill:"transparent"})]}),c&&a.jsx("label",{htmlFor:p,className:P.label,style:I,children:c})]})},Q=()=>{const e=g();return x.useEffect(()=>{const t=document.documentElement;e.fonts&&(e.fonts.fontFamily&&t.style.setProperty("--font-family",e.fonts.fontFamily),e.fonts.size&&t.style.setProperty("--font-size",e.fonts.size),e.fonts.lineHeight!==void 0&&t.style.setProperty("--line-height",e.fonts.lineHeight.toString()),e.fonts.fontWeightHeader!==void 0&&t.style.setProperty("--font-weight-header",e.fonts.fontWeightHeader.toString()),e.fonts.fontSizeH1&&t.style.setProperty("--font-size-h1",e.fonts.fontSizeH1),e.fonts.fontSizeH2&&t.style.setProperty("--font-size-h2",e.fonts.fontSizeH2),e.fonts.fontSizeH3&&t.style.setProperty("--font-size-h3",e.fonts.fontSizeH3),e.fonts.fontSizeH4&&t.style.setProperty("--font-size-h4",e.fonts.fontSizeH4),e.fonts.fontSizeH5&&t.style.setProperty("--font-size-h5",e.fonts.fontSizeH5),e.fonts.fontSizeH6&&t.style.setProperty("--font-size-h6",e.fonts.fontSizeH6)),e.colors&&(e.colors.primary&&t.style.setProperty("--primary-color",e.colors.primary),e.colors.secondary&&t.style.setProperty("--background-color",e.colors.secondary),e.colors.accent&&t.style.setProperty("--accent-color",e.colors.accent)),e.breakpoints&&(e.breakpoints.xs&&t.style.setProperty("--breakpoint-xs",e.breakpoints.xs),e.breakpoints.sm&&t.style.setProperty("--breakpoint-sm",e.breakpoints.sm),e.breakpoints.md&&t.style.setProperty("--breakpoint-md",e.breakpoints.md),e.breakpoints.lg&&t.style.setProperty("--breakpoint-lg",e.breakpoints.lg)),e.layout&&(e.layout.maxWidth&&t.style.setProperty("--layout-max-width",e.layout.maxWidth),e.layout.wrapperPaddingSm&&t.style.setProperty("--layout-wrapper-padding-sm",e.layout.wrapperPaddingSm),e.layout.wrapperPadding&&t.style.setProperty("--layout-wrapper-padding",e.layout.wrapperPadding))},[e]),null},W={label:"FormLabel-module__label___0M-fo",disabled:"FormLabel-module__disabled___ktIFp"},G=({color:e="#000",disabled:t=!1,fontSize:o=".85em"})=>({color:e,fontSize:o,opacity:t?.5:1,cursor:t?"not-allowed":"default"}),J=({children:e,color:t,disabled:o=!1,fontSize:s,htmlFor:r,style:l,...f})=>{const c=g(),i=G({color:t||c.colors.primary,disabled:o,fontSize:s||".85em"}),y={color:i.color,fontSize:i.fontSize,opacity:i.opacity,cursor:i.cursor,...l},_=[W.label,o?W.disabled:""].filter(Boolean).join(" ");return a.jsx("label",{className:_,htmlFor:r,style:y,...f,children:e})},$={input:"Input-module__input___WjT81",sizeSmall:"Input-module__sizeSmall___NFvsi",sizeDefault:"Input-module__sizeDefault___AxPA0"},K=({color:e="#000",disabled:t=!1,fontSize:o="1em",placeholderOpacity:s=.3})=>({borderColor:e,color:e,fontSize:o,opacity:t?.3:1,placeholderOpacity:s}),X=({color:e,disabled:t=!1,fontSize:o,name:s="",onChange:r,placeholder:l,placeholderOpacity:f=.3,size:c,style:i,type:y="text",value:_="",...S})=>{const u=g(),n=K({color:e||u.colors.primary,disabled:t,fontSize:o||u.fonts.size,placeholderOpacity:f}),p={"--placeholder-opacity":n.placeholderOpacity,borderColor:n.borderColor,color:n.color,fontSize:n.fontSize,opacity:n.opacity,...i},m=[$.input,c==="small"?$.sizeSmall:$.sizeDefault].filter(Boolean).join(" ");return a.jsx("input",{className:m,disabled:t,name:s,onChange:r,placeholder:l,style:p,type:y,value:_,...S})},H={container:"Radio-module__container___AQxhk",svg:"Radio-module__svg___zl5kF",label:"Radio-module__label___vAFIP"},Y=({color:e="#000",disabled:t=!1})=>({radioColor:e,cursor:t?"default":"pointer",opacity:t?.3:1}),R=({checked:e=!1,color:t,disabled:o=!1,fontSize:s,id:r,label:l,labelStyle:f,name:c,onChange:i,style:y,..._})=>{const S=g(),u=r||L(),n=Y({color:t||S.colors.primary,disabled:o}),p=v=>{o||i(v)},m={cursor:n.cursor,fontSize:s||S.fonts.size,opacity:n.opacity,...y},k={width:s||S.fonts.size},h={fill:"transparent",strokeWidth:"12.5",stroke:n.radioColor},b={fill:n.radioColor},I={color:n.radioColor,cursor:n.cursor,fontSize:s||S.fonts.size,...f};return a.jsxs("div",{className:H.container,style:m,..._,children:[a.jsx("input",{id:u,checked:e,disabled:o,name:c,onChange:v=>p({target:{checked:v.target.checked,name:c,type:"radio"}}),style:{display:"none"},type:"radio"}),a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>p({target:{checked:!e,name:c,type:"radio"}}),className:H.svg,style:k,children:[a.jsx("circle",{cx:"50",cy:"50",r:"42.5",width:"100%",style:h}),e&&a.jsx("circle",{cx:"50",cy:"50",r:"25",style:b})]}),l&&a.jsx("label",{htmlFor:u,className:H.label,style:I,children:l})]})},F={select:"Select-module__select___cjdcr",sizeSmall:"Select-module__sizeSmall___i1quj",sizeDefault:"Select-module__sizeDefault___EiWvW"},ee=({color:e="#000",disabled:t=!1})=>({color:e,borderColor:e,cursor:t?"default":"pointer",opacity:t?.3:1,backgroundImage:(l=>{const f=`
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
3
|
+
<path
|
|
4
|
+
d="M 30 42.5 L 50 22.5 L 70 42.5"
|
|
5
|
+
stroke="${l}"
|
|
6
|
+
stroke-width="11"
|
|
7
|
+
fill="transparent"
|
|
8
|
+
/>
|
|
9
|
+
<path
|
|
10
|
+
d="M 30 58.5 L 50 78.5 L 70 58.5"
|
|
11
|
+
stroke="${l}"
|
|
12
|
+
stroke-width="11"
|
|
13
|
+
fill="transparent"
|
|
14
|
+
/>
|
|
15
|
+
</svg>
|
|
16
|
+
`.trim();return`url("data:image/svg+xml,${encodeURIComponent(f)}")`})(e)}),te=({children:e,color:t,disabled:o=!1,fontSize:s,name:r="",onChange:l,placeholder:f="",size:c,style:i,value:y="",..._})=>{const S=g(),u=ee({color:t||S.colors.primary,disabled:o}),n={backgroundImage:u.backgroundImage,backgroundPosition:"right center",backgroundRepeat:"no-repeat",backgroundSize:"auto 85%",backgroundColor:"transparent",borderColor:u.borderColor,color:u.color,cursor:u.cursor,fontSize:s||S.fonts.size,opacity:u.opacity,...i},p=[F.select,c==="small"?F.sizeSmall:F.sizeDefault].filter(Boolean).join(" ");return a.jsxs("select",{className:p,disabled:o,name:r,onChange:l,style:n,value:y,..._,children:[f!==""&&a.jsx("option",{disabled:!0,value:"",children:f}),e]})},D={textarea:"Textarea-module__textarea___Z-y6g",sizeSmall:"Textarea-module__sizeSmall___HHFEM",sizeDefault:"Textarea-module__sizeDefault___LL2Uc"},oe=({color:e="#000",disabled:t=!1,placeholderOpacity:o=.3})=>({color:e,borderColor:e,opacity:t?.3:1,placeholderOpacity:o}),se=({color:e,disabled:t=!1,fontSize:o,name:s="",onChange:r,placeholder:l,placeholderOpacity:f=.3,rows:c=3,size:i,style:y,value:_="",...S})=>{const u=g(),n=oe({color:e||u.colors.primary,disabled:t,placeholderOpacity:f}),p=`textarea-placeholder-${x.useId?x.useId():Math.random().toString(36)}`;x.useEffect(()=>{const h=document.createElement("style");return h.id=p,h.textContent=`
|
|
17
|
+
.${p}::placeholder {
|
|
18
|
+
color: inherit;
|
|
19
|
+
opacity: ${n.placeholderOpacity};
|
|
20
|
+
}
|
|
21
|
+
`,document.head.appendChild(h),()=>{const b=document.getElementById(p);b&&b.remove()}},[p,n.placeholderOpacity]);const m={borderColor:n.borderColor,color:n.color,fontSize:o||u.fonts.size,opacity:n.opacity,...y},k=[D.textarea,i==="small"?D.sizeSmall:D.sizeDefault,p].filter(Boolean).join(" ");return a.jsx("textarea",{className:k,disabled:t,name:s,onChange:r,placeholder:l,rows:c,style:m,value:_,...S})};d.Button=A,d.CSSReset=Q,d.Checkbox=Z,d.FormLabel=J,d.Input=X,d.Radio=R,d.Select=te,d.Textarea=se,d.ThemeProvider=M,d.useTheme=g,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMediaQuery.d.ts","sourceRoot":"","sources":["../../src/hooks/useMediaQuery.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,KAAG,OAmB7C,CAAC"}
|