digital-rabbit-cl 1.0.25 → 1.0.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.
|
@@ -17,5 +17,5 @@ export interface ButtonStyles {
|
|
|
17
17
|
color: string;
|
|
18
18
|
opacity: number;
|
|
19
19
|
}
|
|
20
|
-
export declare const useButtonStyles: ({ isActive, disabled, buttonColor, textColor, hoverColor, hoverTextColor, outline, }: UseButtonStylesParams) => ButtonStyles;
|
|
20
|
+
export declare const useButtonStyles: ({ isActive, disabled, buttonColor, textColor, hoverColor, hoverTextColor, outline, }: Partial<UseButtonStylesParams>) => ButtonStyles;
|
|
21
21
|
//# sourceMappingURL=useButtonStyles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useButtonStyles.d.ts","sourceRoot":"","sources":["../../../src/components/Button/useButtonStyles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,eAAe,GAAI,sFAQ7B,qBAAqB,KAAG,
|
|
1
|
+
{"version":3,"file":"useButtonStyles.d.ts","sourceRoot":"","sources":["../../../src/components/Button/useButtonStyles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,eAAe,GAAI,sFAQ7B,OAAO,CAAC,qBAAqB,CAAC,KAAG,YAwCnC,CAAC"}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.Button-module__button___2ZuB7{border-width:.15em;border-style:solid;cursor:pointer;font-weight:700;line-height:1.25;outline:none}.Button-module__button___2ZuB7:disabled{cursor:default}.Button-module__sizeSmall___DRT8P{padding:.1em .5em}.Button-module__sizeDefault___iwWOV{padding:.25em .5em}.Checkbox-module__container___aV9qz{display:flex;align-items:center;line-height:1.2}.Checkbox-module__svg___kkluC{flex-shrink:0}.Checkbox-module__label___cwRtI{font-weight:700;margin-left:.35em;-webkit-user-select:none;user-select:none}:root{--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-size: 16px;--line-height: 1.5;--font-weight-header: 700;--primary-color: #000;--background-color: #fff;--accent-color: #0066cc;--font-size-h1: 2.5rem;--font-size-h2: 1.75rem;--font-size-h3: 1.38316rem;--font-size-h4: 1rem;--font-size-h5: .85028rem;--font-size-h6: .78405rem;--breakpoint-xs: 350px;--breakpoint-sm: 475px;--breakpoint-md: 769px;--breakpoint-lg: 1025px;--layout-max-width: 1280px;--layout-wrapper-padding-sm: .5rem;--layout-wrapper-padding: 1rem}html{line-height:var(--line-height);-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:var(--font-size);font-family:var(--font-family);box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}body{margin:0;font-family:var(--font-family);font-size:var(--font-size);line-height:var(--line-height);color:var(--primary-color);background-color:var(--background-color);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:var(--font-weight-header)}h1{font-size:var(--font-size-h1)}h2{font-size:var(--font-size-h2)}h3{font-size:var(--font-size-h3)}h4{font-size:var(--font-size-h4)}h5{font-size:var(--font-size-h5)}h6{font-size:var(--font-size-h6)}hr{box-sizing:content-box;height:0;overflow:visible;border:0;border-top:1px solid rgba(0,0,0,.1);margin:1em 0}pre{font-family:monospace,monospace;font-size:1em;overflow:auto}a{background-color:transparent;text-decoration:none}a:link{color:var(--accent-color)}a:hover{text-decoration:underline}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none;max-width:100%;height:auto;vertical-align:middle}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--line-height);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;cursor:pointer}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto;resize:vertical}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item;cursor:pointer}template,[hidden]{display:none}table{border-collapse:collapse;width:100%}ul,ol{padding-left:1.5em}p{margin-top:0;margin-bottom:1em}.FormLabel-module__label___0M-fo{display:inline-block;font-weight:700;padding-bottom:.25em}.FormLabel-module__label___0M-fo.FormLabel-module__disabled___ktIFp{opacity:.5;cursor:not-allowed}.FormLabel-module__label___0M-fo:not(.FormLabel-module__disabled___ktIFp){cursor:default}.Input-module__input___WjT81{background-color:transparent;border-width:.15em;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Input-module__input___WjT81::placeholder{color:inherit;opacity:var(--placeholder-opacity, .3)}.Input-module__input___WjT81:disabled{opacity:.3}.Input-module__sizeSmall___NFvsi{padding:.1em .25em}.Input-module__sizeDefault___AxPA0{padding:.25em .5em}.Radio-module__container___AQxhk{display:flex;align-items:center;line-height:1.25}.Radio-module__svg___zl5kF{flex-shrink:0}.Radio-module__label___vAFIP{font-weight:700;margin-left:.35em;-webkit-user-select:none;user-select:none}.Select-module__select___cjdcr{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;background-position:right center;background-repeat:no-repeat;background-size:auto 85%;border-width:.15em;border-style:solid;border-radius:0;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Select-module__select___cjdcr:disabled{cursor:default;opacity:.3}.Select-module__select___cjdcr:not(:disabled){cursor:pointer}.Select-module__sizeSmall___i1quj{padding:.1em 1.75em .1em .25em}.Select-module__sizeDefault___EiWvW{padding:.25em 2em .25em .5em}.Textarea-module__textarea___Z-y6g{background-color:transparent;border-width:.15em;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Textarea-module__textarea___Z-y6g:disabled{opacity:.3}.Textarea-module__sizeSmall___HHFEM{padding:.1em .25em}.Textarea-module__sizeDefault___LL2Uc{padding:.25em .5em}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
2
|
import { jsx as _, jsxs as k } from "react/jsx-runtime";
|
|
3
|
-
import P, { createContext as j, useContext as E, useState as
|
|
3
|
+
import P, { createContext as j, useContext as E, useState as A, useEffect as M } from "react";
|
|
4
4
|
const V = "Button-module__button___2ZuB7", U = "Button-module__sizeSmall___DRT8P", q = "Button-module__sizeDefault___iwWOV", v = {
|
|
5
5
|
button: V,
|
|
6
6
|
sizeSmall: U,
|
|
7
7
|
sizeDefault: q
|
|
8
8
|
}, O = ({
|
|
9
|
-
isActive:
|
|
10
|
-
disabled:
|
|
11
|
-
buttonColor: o,
|
|
12
|
-
textColor: s,
|
|
9
|
+
isActive: e,
|
|
10
|
+
disabled: t,
|
|
11
|
+
buttonColor: o = "#FFF",
|
|
12
|
+
textColor: s = "#000",
|
|
13
13
|
hoverColor: r,
|
|
14
14
|
hoverTextColor: n,
|
|
15
|
-
outline:
|
|
15
|
+
outline: y
|
|
16
16
|
}) => {
|
|
17
17
|
let a, c, i;
|
|
18
|
-
|
|
18
|
+
y ? (a = "transparent", c = o, i = o, e && (a = r || o, c = r || o, i = n || s)) : (a = o, c = o, i = s, e && (a = r || o, c = r || o, i = n || s));
|
|
19
|
+
let f = 1;
|
|
20
|
+
return t ? f = 0.3 : e && (f = r || y ? 1 : 0.75), {
|
|
19
21
|
backgroundColor: a,
|
|
20
22
|
borderColor: c,
|
|
21
23
|
color: i,
|
|
22
|
-
opacity:
|
|
24
|
+
opacity: f
|
|
23
25
|
};
|
|
24
26
|
}, R = {
|
|
25
27
|
primary: "#FFF",
|
|
@@ -62,65 +64,65 @@ const V = "Button-module__button___2ZuB7", U = "Button-module__sizeSmall___DRT8P
|
|
|
62
64
|
wrapperPaddingSm: "0.5rem",
|
|
63
65
|
wrapperPadding: "1rem"
|
|
64
66
|
}
|
|
65
|
-
}, L = j(h),
|
|
67
|
+
}, L = j(h), xe = ({ theme: e = {}, children: t }) => {
|
|
66
68
|
var s;
|
|
67
69
|
const o = {
|
|
68
70
|
...h,
|
|
69
|
-
...
|
|
71
|
+
...e,
|
|
70
72
|
colors: {
|
|
71
73
|
...h.colors,
|
|
72
|
-
...
|
|
74
|
+
...e.colors
|
|
73
75
|
},
|
|
74
76
|
fonts: {
|
|
75
77
|
...h.fonts,
|
|
76
|
-
...
|
|
78
|
+
...e.fonts
|
|
77
79
|
},
|
|
78
80
|
buttons: {
|
|
79
81
|
...h.buttons,
|
|
80
|
-
...
|
|
82
|
+
...e.buttons,
|
|
81
83
|
primary: {
|
|
82
84
|
...h.buttons.primary,
|
|
83
|
-
...(s =
|
|
85
|
+
...(s = e.buttons) == null ? void 0 : s.primary
|
|
84
86
|
}
|
|
85
87
|
},
|
|
86
88
|
breakpoints: {
|
|
87
89
|
...h.breakpoints,
|
|
88
|
-
...
|
|
90
|
+
...e.breakpoints
|
|
89
91
|
},
|
|
90
92
|
layout: {
|
|
91
93
|
...h.layout,
|
|
92
|
-
...
|
|
94
|
+
...e.layout
|
|
93
95
|
}
|
|
94
96
|
};
|
|
95
|
-
return /* @__PURE__ */ _(L.Provider, { value: o, children:
|
|
96
|
-
}, z = () => E(L),
|
|
97
|
-
color:
|
|
98
|
-
hoverColor:
|
|
97
|
+
return /* @__PURE__ */ _(L.Provider, { value: o, children: t });
|
|
98
|
+
}, z = () => E(L), be = ({
|
|
99
|
+
color: e,
|
|
100
|
+
hoverColor: t,
|
|
99
101
|
hoverTextColor: o,
|
|
100
102
|
textColor: s,
|
|
101
103
|
outline: r = !1,
|
|
102
104
|
size: n,
|
|
103
|
-
type:
|
|
105
|
+
type: y = "button",
|
|
104
106
|
buttonProps: a = {},
|
|
105
107
|
children: c,
|
|
106
108
|
disabled: i = !1,
|
|
107
|
-
onClick:
|
|
108
|
-
fontSize:
|
|
109
|
+
onClick: f,
|
|
110
|
+
fontSize: d
|
|
109
111
|
}) => {
|
|
110
|
-
const
|
|
111
|
-
let
|
|
112
|
-
s ?
|
|
112
|
+
const u = z(), [l, p] = A(!1);
|
|
113
|
+
let m;
|
|
114
|
+
s ? m = s : m = e ? u.buttons.textColor : u.buttons.primary.textColor;
|
|
113
115
|
const S = {
|
|
114
116
|
...O({
|
|
115
117
|
isActive: l,
|
|
116
118
|
disabled: i,
|
|
117
|
-
buttonColor:
|
|
118
|
-
textColor:
|
|
119
|
-
hoverColor:
|
|
119
|
+
buttonColor: e || u.colors.primary,
|
|
120
|
+
textColor: m,
|
|
121
|
+
hoverColor: t,
|
|
120
122
|
hoverTextColor: o,
|
|
121
123
|
outline: r
|
|
122
124
|
}),
|
|
123
|
-
fontSize:
|
|
125
|
+
fontSize: d || u.fonts.size
|
|
124
126
|
}, g = [
|
|
125
127
|
v.button,
|
|
126
128
|
n === "small" ? v.sizeSmall : v.sizeDefault,
|
|
@@ -131,10 +133,10 @@ const V = "Button-module__button___2ZuB7", U = "Button-module__sizeSmall___DRT8P
|
|
|
131
133
|
{
|
|
132
134
|
className: g,
|
|
133
135
|
disabled: i,
|
|
134
|
-
onClick:
|
|
136
|
+
onClick: f,
|
|
135
137
|
onMouseEnter: () => p(!0),
|
|
136
138
|
onMouseLeave: () => p(!1),
|
|
137
|
-
type:
|
|
139
|
+
type: y,
|
|
138
140
|
...a,
|
|
139
141
|
style: {
|
|
140
142
|
...S,
|
|
@@ -153,77 +155,77 @@ function Q() {
|
|
|
153
155
|
var T = [];
|
|
154
156
|
for (var w = 0; w < 256; ++w)
|
|
155
157
|
T[w] = (w + 256).toString(16).substr(1);
|
|
156
|
-
function G(
|
|
158
|
+
function G(e, t) {
|
|
157
159
|
var o = 0, s = T;
|
|
158
|
-
return [s[
|
|
160
|
+
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("");
|
|
159
161
|
}
|
|
160
|
-
function W(
|
|
161
|
-
var s =
|
|
162
|
-
typeof
|
|
163
|
-
var r =
|
|
164
|
-
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128,
|
|
162
|
+
function W(e, t, o) {
|
|
163
|
+
var s = t && o || 0;
|
|
164
|
+
typeof e == "string" && (t = e === "binary" ? new Array(16) : null, e = null), e = e || {};
|
|
165
|
+
var r = e.random || (e.rng || Q)();
|
|
166
|
+
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t)
|
|
165
167
|
for (var n = 0; n < 16; ++n)
|
|
166
|
-
|
|
167
|
-
return
|
|
168
|
+
t[s + n] = r[n];
|
|
169
|
+
return t || G(r);
|
|
168
170
|
}
|
|
169
171
|
const J = "Checkbox-module__container___aV9qz", K = "Checkbox-module__svg___kkluC", X = "Checkbox-module__label___cwRtI", H = {
|
|
170
172
|
container: J,
|
|
171
173
|
svg: K,
|
|
172
174
|
label: X
|
|
173
175
|
}, Y = ({
|
|
174
|
-
color:
|
|
175
|
-
checkmarkColor:
|
|
176
|
+
color: e = "#000",
|
|
177
|
+
checkmarkColor: t,
|
|
176
178
|
disabled: o = !1,
|
|
177
179
|
inverted: s = !1
|
|
178
180
|
}) => {
|
|
179
|
-
let r =
|
|
180
|
-
return
|
|
181
|
-
boxColor:
|
|
181
|
+
let r = e;
|
|
182
|
+
return t ? r = t : s && (r = "white"), {
|
|
183
|
+
boxColor: e,
|
|
182
184
|
checkmarkColor: r,
|
|
183
185
|
cursor: o ? "default" : "pointer",
|
|
184
186
|
opacity: o ? 0.3 : 1
|
|
185
187
|
};
|
|
186
|
-
},
|
|
187
|
-
checked:
|
|
188
|
-
checkmarkColor:
|
|
188
|
+
}, ke = ({
|
|
189
|
+
checked: e = !1,
|
|
190
|
+
checkmarkColor: t,
|
|
189
191
|
color: o,
|
|
190
192
|
disabled: s = !1,
|
|
191
193
|
fontSize: r,
|
|
192
194
|
id: n,
|
|
193
|
-
inverted:
|
|
195
|
+
inverted: y = !1,
|
|
194
196
|
label: a,
|
|
195
197
|
labelStyle: c,
|
|
196
198
|
name: i,
|
|
197
|
-
onChange:
|
|
198
|
-
style:
|
|
199
|
-
...
|
|
199
|
+
onChange: f,
|
|
200
|
+
style: d,
|
|
201
|
+
...u
|
|
200
202
|
}) => {
|
|
201
|
-
const l = z(), p = n || W(),
|
|
203
|
+
const l = z(), p = n || W(), m = Y({
|
|
202
204
|
color: o || l.colors.primary,
|
|
203
|
-
checkmarkColor:
|
|
205
|
+
checkmarkColor: t,
|
|
204
206
|
disabled: s,
|
|
205
|
-
inverted:
|
|
207
|
+
inverted: y
|
|
206
208
|
}), x = (b) => {
|
|
207
|
-
s ||
|
|
209
|
+
s || f(b);
|
|
208
210
|
}, S = {
|
|
209
|
-
cursor:
|
|
211
|
+
cursor: m.cursor,
|
|
210
212
|
fontSize: r || l.fonts.size,
|
|
211
|
-
opacity:
|
|
212
|
-
...
|
|
213
|
+
opacity: m.opacity,
|
|
214
|
+
...d
|
|
213
215
|
}, g = {
|
|
214
216
|
width: r || "1rem"
|
|
215
217
|
}, C = {
|
|
216
|
-
color:
|
|
217
|
-
cursor:
|
|
218
|
+
color: m.boxColor,
|
|
219
|
+
cursor: m.cursor,
|
|
218
220
|
fontSize: r || "1rem",
|
|
219
221
|
...c
|
|
220
222
|
};
|
|
221
|
-
return /* @__PURE__ */ k("div", { className: H.container, style: S, ...
|
|
223
|
+
return /* @__PURE__ */ k("div", { className: H.container, style: S, ...u, children: [
|
|
222
224
|
/* @__PURE__ */ _(
|
|
223
225
|
"input",
|
|
224
226
|
{
|
|
225
227
|
id: p,
|
|
226
|
-
checked:
|
|
228
|
+
checked: e,
|
|
227
229
|
disabled: s,
|
|
228
230
|
onChange: (b) => x({ target: { checked: b.target.checked, name: i, type: "checkbox" } }),
|
|
229
231
|
name: i,
|
|
@@ -236,7 +238,7 @@ const J = "Checkbox-module__container___aV9qz", K = "Checkbox-module__svg___kklu
|
|
|
236
238
|
{
|
|
237
239
|
xmlns: "http://www.w3.org/2000/svg",
|
|
238
240
|
viewBox: "0 0 100 100",
|
|
239
|
-
onClick: () => x({ target: { checked: !
|
|
241
|
+
onClick: () => x({ target: { checked: !e, name: i, type: "checkbox" } }),
|
|
240
242
|
style: g,
|
|
241
243
|
className: H.svg,
|
|
242
244
|
children: [
|
|
@@ -248,17 +250,17 @@ const J = "Checkbox-module__container___aV9qz", K = "Checkbox-module__svg___kklu
|
|
|
248
250
|
height: "100",
|
|
249
251
|
width: "100",
|
|
250
252
|
style: {
|
|
251
|
-
fill:
|
|
253
|
+
fill: y && e ? m.boxColor : "transparent",
|
|
252
254
|
strokeWidth: "25",
|
|
253
|
-
stroke:
|
|
255
|
+
stroke: m.boxColor
|
|
254
256
|
}
|
|
255
257
|
}
|
|
256
258
|
),
|
|
257
|
-
|
|
259
|
+
e && /* @__PURE__ */ _(
|
|
258
260
|
"path",
|
|
259
261
|
{
|
|
260
262
|
d: "M 25 45 L 45 65 L 75 30",
|
|
261
|
-
stroke:
|
|
263
|
+
stroke: m.checkmarkColor,
|
|
262
264
|
strokeWidth: "15",
|
|
263
265
|
fill: "transparent"
|
|
264
266
|
}
|
|
@@ -268,35 +270,35 @@ const J = "Checkbox-module__container___aV9qz", K = "Checkbox-module__svg___kklu
|
|
|
268
270
|
),
|
|
269
271
|
a && /* @__PURE__ */ _("label", { htmlFor: p, className: H.label, style: C, children: a })
|
|
270
272
|
] });
|
|
271
|
-
},
|
|
272
|
-
const
|
|
273
|
-
return
|
|
274
|
-
const
|
|
275
|
-
|
|
276
|
-
}, [
|
|
277
|
-
},
|
|
278
|
-
label:
|
|
279
|
-
disabled:
|
|
280
|
-
},
|
|
281
|
-
color:
|
|
282
|
-
disabled:
|
|
273
|
+
}, ve = () => {
|
|
274
|
+
const e = z();
|
|
275
|
+
return M(() => {
|
|
276
|
+
const t = document.documentElement;
|
|
277
|
+
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));
|
|
278
|
+
}, [e]), null;
|
|
279
|
+
}, ee = "FormLabel-module__label___0M-fo", te = "FormLabel-module__disabled___ktIFp", D = {
|
|
280
|
+
label: ee,
|
|
281
|
+
disabled: te
|
|
282
|
+
}, oe = ({
|
|
283
|
+
color: e = "#000",
|
|
284
|
+
disabled: t = !1,
|
|
283
285
|
fontSize: o = ".85em"
|
|
284
286
|
}) => ({
|
|
285
|
-
color: t,
|
|
286
|
-
fontSize: o,
|
|
287
|
-
opacity: e ? 0.5 : 1,
|
|
288
|
-
cursor: e ? "not-allowed" : "default"
|
|
289
|
-
}), wt = ({
|
|
290
|
-
children: t,
|
|
291
287
|
color: e,
|
|
288
|
+
fontSize: o,
|
|
289
|
+
opacity: t ? 0.5 : 1,
|
|
290
|
+
cursor: t ? "not-allowed" : "default"
|
|
291
|
+
}), we = ({
|
|
292
|
+
children: e,
|
|
293
|
+
color: t,
|
|
292
294
|
disabled: o = !1,
|
|
293
295
|
fontSize: s,
|
|
294
296
|
htmlFor: r,
|
|
295
297
|
style: n,
|
|
296
|
-
...
|
|
298
|
+
...y
|
|
297
299
|
}) => {
|
|
298
|
-
const a = z(), c =
|
|
299
|
-
color:
|
|
300
|
+
const a = z(), c = oe({
|
|
301
|
+
color: t || a.colors.primary,
|
|
300
302
|
disabled: o,
|
|
301
303
|
fontSize: s || ".85em"
|
|
302
304
|
}), i = {
|
|
@@ -305,54 +307,54 @@ const J = "Checkbox-module__container___aV9qz", K = "Checkbox-module__svg___kklu
|
|
|
305
307
|
opacity: c.opacity,
|
|
306
308
|
cursor: c.cursor,
|
|
307
309
|
...n
|
|
308
|
-
},
|
|
310
|
+
}, f = [
|
|
309
311
|
D.label,
|
|
310
312
|
o ? D.disabled : ""
|
|
311
313
|
].filter(Boolean).join(" ");
|
|
312
314
|
return /* @__PURE__ */ _(
|
|
313
315
|
"label",
|
|
314
316
|
{
|
|
315
|
-
className:
|
|
317
|
+
className: f,
|
|
316
318
|
htmlFor: r,
|
|
317
319
|
style: i,
|
|
318
|
-
...
|
|
319
|
-
children:
|
|
320
|
+
...y,
|
|
321
|
+
children: e
|
|
320
322
|
}
|
|
321
323
|
);
|
|
322
|
-
},
|
|
323
|
-
input:
|
|
324
|
-
sizeSmall:
|
|
325
|
-
sizeDefault:
|
|
326
|
-
},
|
|
327
|
-
color:
|
|
328
|
-
disabled:
|
|
324
|
+
}, se = "Input-module__input___WjT81", re = "Input-module__sizeSmall___NFvsi", ne = "Input-module__sizeDefault___AxPA0", F = {
|
|
325
|
+
input: se,
|
|
326
|
+
sizeSmall: re,
|
|
327
|
+
sizeDefault: ne
|
|
328
|
+
}, le = ({
|
|
329
|
+
color: e = "#000",
|
|
330
|
+
disabled: t = !1,
|
|
329
331
|
fontSize: o = "1em",
|
|
330
332
|
placeholderOpacity: s = 0.3
|
|
331
333
|
}) => ({
|
|
332
|
-
borderColor:
|
|
333
|
-
color:
|
|
334
|
+
borderColor: e,
|
|
335
|
+
color: e,
|
|
334
336
|
fontSize: o,
|
|
335
|
-
opacity:
|
|
337
|
+
opacity: t ? 0.3 : 1,
|
|
336
338
|
placeholderOpacity: s
|
|
337
|
-
}),
|
|
338
|
-
color:
|
|
339
|
-
disabled:
|
|
339
|
+
}), Ce = ({
|
|
340
|
+
color: e,
|
|
341
|
+
disabled: t = !1,
|
|
340
342
|
fontSize: o,
|
|
341
343
|
name: s = "",
|
|
342
344
|
onChange: r,
|
|
343
345
|
placeholder: n,
|
|
344
|
-
placeholderOpacity:
|
|
346
|
+
placeholderOpacity: y = 0.3,
|
|
345
347
|
size: a,
|
|
346
348
|
style: c,
|
|
347
349
|
type: i = "text",
|
|
348
|
-
value:
|
|
349
|
-
...
|
|
350
|
+
value: f = "",
|
|
351
|
+
...d
|
|
350
352
|
}) => {
|
|
351
|
-
const
|
|
352
|
-
color:
|
|
353
|
-
disabled:
|
|
354
|
-
fontSize: o ||
|
|
355
|
-
placeholderOpacity:
|
|
353
|
+
const u = z(), l = le({
|
|
354
|
+
color: e || u.colors.primary,
|
|
355
|
+
disabled: t,
|
|
356
|
+
fontSize: o || u.fonts.size,
|
|
357
|
+
placeholderOpacity: y
|
|
356
358
|
}), p = {
|
|
357
359
|
"--placeholder-opacity": l.placeholderOpacity,
|
|
358
360
|
borderColor: l.borderColor,
|
|
@@ -360,60 +362,60 @@ const J = "Checkbox-module__container___aV9qz", K = "Checkbox-module__svg___kklu
|
|
|
360
362
|
fontSize: l.fontSize,
|
|
361
363
|
opacity: l.opacity,
|
|
362
364
|
...c
|
|
363
|
-
},
|
|
365
|
+
}, m = [
|
|
364
366
|
F.input,
|
|
365
367
|
a === "small" ? F.sizeSmall : F.sizeDefault
|
|
366
368
|
].filter(Boolean).join(" ");
|
|
367
369
|
return /* @__PURE__ */ _(
|
|
368
370
|
"input",
|
|
369
371
|
{
|
|
370
|
-
className:
|
|
371
|
-
disabled:
|
|
372
|
+
className: m,
|
|
373
|
+
disabled: t,
|
|
372
374
|
name: s,
|
|
373
375
|
onChange: r,
|
|
374
376
|
placeholder: n,
|
|
375
377
|
style: p,
|
|
376
378
|
type: i,
|
|
377
|
-
value:
|
|
378
|
-
...
|
|
379
|
+
value: f,
|
|
380
|
+
...d
|
|
379
381
|
}
|
|
380
382
|
);
|
|
381
|
-
},
|
|
382
|
-
container:
|
|
383
|
-
svg:
|
|
384
|
-
label:
|
|
385
|
-
},
|
|
386
|
-
color:
|
|
387
|
-
disabled:
|
|
383
|
+
}, ae = "Radio-module__container___AQxhk", ce = "Radio-module__svg___zl5kF", ie = "Radio-module__label___vAFIP", $ = {
|
|
384
|
+
container: ae,
|
|
385
|
+
svg: ce,
|
|
386
|
+
label: ie
|
|
387
|
+
}, ye = ({
|
|
388
|
+
color: e = "#000",
|
|
389
|
+
disabled: t = !1
|
|
388
390
|
}) => ({
|
|
389
|
-
radioColor:
|
|
390
|
-
cursor:
|
|
391
|
-
opacity:
|
|
392
|
-
}),
|
|
393
|
-
checked:
|
|
394
|
-
color:
|
|
391
|
+
radioColor: e,
|
|
392
|
+
cursor: t ? "default" : "pointer",
|
|
393
|
+
opacity: t ? 0.3 : 1
|
|
394
|
+
}), Pe = ({
|
|
395
|
+
checked: e = !1,
|
|
396
|
+
color: t,
|
|
395
397
|
disabled: o = !1,
|
|
396
398
|
fontSize: s,
|
|
397
399
|
id: r,
|
|
398
400
|
label: n,
|
|
399
|
-
labelStyle:
|
|
401
|
+
labelStyle: y,
|
|
400
402
|
name: a,
|
|
401
403
|
onChange: c,
|
|
402
404
|
style: i,
|
|
403
|
-
...
|
|
405
|
+
...f
|
|
404
406
|
}) => {
|
|
405
|
-
const
|
|
406
|
-
color:
|
|
407
|
+
const d = z(), u = r || W(), l = ye({
|
|
408
|
+
color: t || d.colors.primary,
|
|
407
409
|
disabled: o
|
|
408
410
|
}), p = (b) => {
|
|
409
411
|
o || c(b);
|
|
410
|
-
},
|
|
412
|
+
}, m = {
|
|
411
413
|
cursor: l.cursor,
|
|
412
|
-
fontSize: s ||
|
|
414
|
+
fontSize: s || d.fonts.size,
|
|
413
415
|
opacity: l.opacity,
|
|
414
416
|
...i
|
|
415
417
|
}, x = {
|
|
416
|
-
width: s ||
|
|
418
|
+
width: s || d.fonts.size
|
|
417
419
|
}, S = {
|
|
418
420
|
fill: "transparent",
|
|
419
421
|
strokeWidth: "12.5",
|
|
@@ -423,15 +425,15 @@ const J = "Checkbox-module__container___aV9qz", K = "Checkbox-module__svg___kklu
|
|
|
423
425
|
}, C = {
|
|
424
426
|
color: l.radioColor,
|
|
425
427
|
cursor: l.cursor,
|
|
426
|
-
fontSize: s ||
|
|
427
|
-
...
|
|
428
|
+
fontSize: s || d.fonts.size,
|
|
429
|
+
...y
|
|
428
430
|
};
|
|
429
|
-
return /* @__PURE__ */ k("div", { className: $.container, style:
|
|
431
|
+
return /* @__PURE__ */ k("div", { className: $.container, style: m, ...f, children: [
|
|
430
432
|
/* @__PURE__ */ _(
|
|
431
433
|
"input",
|
|
432
434
|
{
|
|
433
|
-
id:
|
|
434
|
-
checked:
|
|
435
|
+
id: u,
|
|
436
|
+
checked: e,
|
|
435
437
|
disabled: o,
|
|
436
438
|
name: a,
|
|
437
439
|
onChange: (b) => p({ target: { checked: b.target.checked, name: a, type: "radio" } }),
|
|
@@ -444,7 +446,7 @@ const J = "Checkbox-module__container___aV9qz", K = "Checkbox-module__svg___kklu
|
|
|
444
446
|
{
|
|
445
447
|
xmlns: "http://www.w3.org/2000/svg",
|
|
446
448
|
viewBox: "0 0 100 100",
|
|
447
|
-
onClick: () => p({ target: { checked: !
|
|
449
|
+
onClick: () => p({ target: { checked: !e, name: a, type: "radio" } }),
|
|
448
450
|
className: $.svg,
|
|
449
451
|
style: x,
|
|
450
452
|
children: [
|
|
@@ -458,7 +460,7 @@ const J = "Checkbox-module__container___aV9qz", K = "Checkbox-module__svg___kklu
|
|
|
458
460
|
style: S
|
|
459
461
|
}
|
|
460
462
|
),
|
|
461
|
-
|
|
463
|
+
e && /* @__PURE__ */ _(
|
|
462
464
|
"circle",
|
|
463
465
|
{
|
|
464
466
|
cx: "50",
|
|
@@ -473,27 +475,27 @@ const J = "Checkbox-module__container___aV9qz", K = "Checkbox-module__svg___kklu
|
|
|
473
475
|
n && /* @__PURE__ */ _(
|
|
474
476
|
"label",
|
|
475
477
|
{
|
|
476
|
-
htmlFor:
|
|
478
|
+
htmlFor: u,
|
|
477
479
|
className: $.label,
|
|
478
480
|
style: C,
|
|
479
481
|
children: n
|
|
480
482
|
}
|
|
481
483
|
)
|
|
482
484
|
] });
|
|
483
|
-
},
|
|
484
|
-
select:
|
|
485
|
-
sizeSmall:
|
|
486
|
-
sizeDefault:
|
|
487
|
-
},
|
|
488
|
-
color:
|
|
489
|
-
disabled:
|
|
485
|
+
}, ue = "Select-module__select___cjdcr", pe = "Select-module__sizeSmall___i1quj", fe = "Select-module__sizeDefault___EiWvW", I = {
|
|
486
|
+
select: ue,
|
|
487
|
+
sizeSmall: pe,
|
|
488
|
+
sizeDefault: fe
|
|
489
|
+
}, me = ({
|
|
490
|
+
color: e = "#000",
|
|
491
|
+
disabled: t = !1
|
|
490
492
|
}) => ({
|
|
491
|
-
color:
|
|
492
|
-
borderColor:
|
|
493
|
-
cursor:
|
|
494
|
-
opacity:
|
|
493
|
+
color: e,
|
|
494
|
+
borderColor: e,
|
|
495
|
+
cursor: t ? "default" : "pointer",
|
|
496
|
+
opacity: t ? 0.3 : 1,
|
|
495
497
|
backgroundImage: ((n) => {
|
|
496
|
-
const
|
|
498
|
+
const y = `
|
|
497
499
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
498
500
|
<path
|
|
499
501
|
d="M 30 42.5 L 50 22.5 L 70 42.5"
|
|
@@ -509,35 +511,35 @@ const J = "Checkbox-module__container___aV9qz", K = "Checkbox-module__svg___kklu
|
|
|
509
511
|
/>
|
|
510
512
|
</svg>
|
|
511
513
|
`.trim();
|
|
512
|
-
return `url("data:image/svg+xml,${encodeURIComponent(
|
|
513
|
-
})(
|
|
514
|
-
}),
|
|
515
|
-
children:
|
|
516
|
-
color:
|
|
514
|
+
return `url("data:image/svg+xml,${encodeURIComponent(y)}")`;
|
|
515
|
+
})(e)
|
|
516
|
+
}), He = ({
|
|
517
|
+
children: e,
|
|
518
|
+
color: t,
|
|
517
519
|
disabled: o = !1,
|
|
518
520
|
fontSize: s,
|
|
519
521
|
name: r = "",
|
|
520
522
|
onChange: n,
|
|
521
|
-
placeholder:
|
|
523
|
+
placeholder: y = "",
|
|
522
524
|
size: a,
|
|
523
525
|
style: c,
|
|
524
526
|
value: i = "",
|
|
525
|
-
...
|
|
527
|
+
...f
|
|
526
528
|
}) => {
|
|
527
|
-
const
|
|
528
|
-
color:
|
|
529
|
+
const d = z(), u = me({
|
|
530
|
+
color: t || d.colors.primary,
|
|
529
531
|
disabled: o
|
|
530
532
|
}), l = {
|
|
531
|
-
backgroundImage:
|
|
533
|
+
backgroundImage: u.backgroundImage,
|
|
532
534
|
backgroundPosition: "right center",
|
|
533
535
|
backgroundRepeat: "no-repeat",
|
|
534
536
|
backgroundSize: "auto 85%",
|
|
535
537
|
backgroundColor: "transparent",
|
|
536
|
-
borderColor:
|
|
537
|
-
color:
|
|
538
|
-
cursor:
|
|
539
|
-
fontSize: s ||
|
|
540
|
-
opacity:
|
|
538
|
+
borderColor: u.borderColor,
|
|
539
|
+
color: u.color,
|
|
540
|
+
cursor: u.cursor,
|
|
541
|
+
fontSize: s || d.fonts.size,
|
|
542
|
+
opacity: u.opacity,
|
|
541
543
|
...c
|
|
542
544
|
}, p = [
|
|
543
545
|
I.select,
|
|
@@ -552,44 +554,44 @@ const J = "Checkbox-module__container___aV9qz", K = "Checkbox-module__svg___kklu
|
|
|
552
554
|
onChange: n,
|
|
553
555
|
style: l,
|
|
554
556
|
value: i,
|
|
555
|
-
...
|
|
557
|
+
...f,
|
|
556
558
|
children: [
|
|
557
|
-
|
|
558
|
-
|
|
559
|
+
y !== "" && /* @__PURE__ */ _("option", { disabled: !0, value: "", children: y }),
|
|
560
|
+
e
|
|
559
561
|
]
|
|
560
562
|
}
|
|
561
563
|
);
|
|
562
|
-
},
|
|
563
|
-
textarea:
|
|
564
|
-
sizeSmall:
|
|
565
|
-
sizeDefault:
|
|
566
|
-
},
|
|
567
|
-
color:
|
|
568
|
-
disabled:
|
|
564
|
+
}, de = "Textarea-module__textarea___Z-y6g", _e = "Textarea-module__sizeSmall___HHFEM", Se = "Textarea-module__sizeDefault___LL2Uc", B = {
|
|
565
|
+
textarea: de,
|
|
566
|
+
sizeSmall: _e,
|
|
567
|
+
sizeDefault: Se
|
|
568
|
+
}, ge = ({
|
|
569
|
+
color: e = "#000",
|
|
570
|
+
disabled: t = !1,
|
|
569
571
|
placeholderOpacity: o = 0.3
|
|
570
572
|
}) => ({
|
|
571
|
-
color:
|
|
572
|
-
borderColor:
|
|
573
|
-
opacity:
|
|
573
|
+
color: e,
|
|
574
|
+
borderColor: e,
|
|
575
|
+
opacity: t ? 0.3 : 1,
|
|
574
576
|
placeholderOpacity: o
|
|
575
|
-
}),
|
|
576
|
-
color:
|
|
577
|
-
disabled:
|
|
577
|
+
}), Fe = ({
|
|
578
|
+
color: e,
|
|
579
|
+
disabled: t = !1,
|
|
578
580
|
fontSize: o,
|
|
579
581
|
name: s = "",
|
|
580
582
|
onChange: r,
|
|
581
583
|
placeholder: n,
|
|
582
|
-
placeholderOpacity:
|
|
584
|
+
placeholderOpacity: y = 0.3,
|
|
583
585
|
rows: a = 3,
|
|
584
586
|
size: c,
|
|
585
587
|
style: i,
|
|
586
|
-
value:
|
|
587
|
-
...
|
|
588
|
+
value: f = "",
|
|
589
|
+
...d
|
|
588
590
|
}) => {
|
|
589
|
-
const
|
|
590
|
-
color:
|
|
591
|
-
disabled:
|
|
592
|
-
placeholderOpacity:
|
|
591
|
+
const u = z(), l = ge({
|
|
592
|
+
color: e || u.colors.primary,
|
|
593
|
+
disabled: t,
|
|
594
|
+
placeholderOpacity: y
|
|
593
595
|
}), p = `textarea-placeholder-${P.useId ? P.useId() : Math.random().toString(36)}`;
|
|
594
596
|
P.useEffect(() => {
|
|
595
597
|
const S = document.createElement("style");
|
|
@@ -603,10 +605,10 @@ const J = "Checkbox-module__container___aV9qz", K = "Checkbox-module__svg___kklu
|
|
|
603
605
|
g && g.remove();
|
|
604
606
|
};
|
|
605
607
|
}, [p, l.placeholderOpacity]);
|
|
606
|
-
const
|
|
608
|
+
const m = {
|
|
607
609
|
borderColor: l.borderColor,
|
|
608
610
|
color: l.color,
|
|
609
|
-
fontSize: o ||
|
|
611
|
+
fontSize: o || u.fonts.size,
|
|
610
612
|
opacity: l.opacity,
|
|
611
613
|
...i
|
|
612
614
|
}, x = [
|
|
@@ -618,26 +620,26 @@ const J = "Checkbox-module__container___aV9qz", K = "Checkbox-module__svg___kklu
|
|
|
618
620
|
"textarea",
|
|
619
621
|
{
|
|
620
622
|
className: x,
|
|
621
|
-
disabled:
|
|
623
|
+
disabled: t,
|
|
622
624
|
name: s,
|
|
623
625
|
onChange: r,
|
|
624
626
|
placeholder: n,
|
|
625
627
|
rows: a,
|
|
626
|
-
style:
|
|
627
|
-
value:
|
|
628
|
-
...
|
|
628
|
+
style: m,
|
|
629
|
+
value: f,
|
|
630
|
+
...d
|
|
629
631
|
}
|
|
630
632
|
);
|
|
631
633
|
};
|
|
632
634
|
export {
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
635
|
+
be as Button,
|
|
636
|
+
ve as CSSReset,
|
|
637
|
+
ke as Checkbox,
|
|
638
|
+
we as FormLabel,
|
|
639
|
+
Ce as Input,
|
|
640
|
+
Pe as Radio,
|
|
641
|
+
He as Select,
|
|
642
|
+
Fe as Textarea,
|
|
643
|
+
xe as ThemeProvider,
|
|
642
644
|
z as useTheme
|
|
643
645
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.Button-module__button___2ZuB7{border-width:.15em;border-style:solid;cursor:pointer;font-weight:700;line-height:1.25;outline:none}.Button-module__button___2ZuB7:disabled{cursor:default}.Button-module__sizeSmall___DRT8P{padding:.1em .5em}.Button-module__sizeDefault___iwWOV{padding:.25em .5em}.Checkbox-module__container___aV9qz{display:flex;align-items:center;line-height:1.2}.Checkbox-module__svg___kkluC{flex-shrink:0}.Checkbox-module__label___cwRtI{font-weight:700;margin-left:.35em;-webkit-user-select:none;user-select:none}:root{--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-size: 16px;--line-height: 1.5;--font-weight-header: 700;--primary-color: #000;--background-color: #fff;--accent-color: #0066cc;--font-size-h1: 2.5rem;--font-size-h2: 1.75rem;--font-size-h3: 1.38316rem;--font-size-h4: 1rem;--font-size-h5: .85028rem;--font-size-h6: .78405rem;--breakpoint-xs: 350px;--breakpoint-sm: 475px;--breakpoint-md: 769px;--breakpoint-lg: 1025px;--layout-max-width: 1280px;--layout-wrapper-padding-sm: .5rem;--layout-wrapper-padding: 1rem}html{line-height:var(--line-height);-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:var(--font-size);font-family:var(--font-family);box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}body{margin:0;font-family:var(--font-family);font-size:var(--font-size);line-height:var(--line-height);color:var(--primary-color);background-color:var(--background-color);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:var(--font-weight-header)}h1{font-size:var(--font-size-h1)}h2{font-size:var(--font-size-h2)}h3{font-size:var(--font-size-h3)}h4{font-size:var(--font-size-h4)}h5{font-size:var(--font-size-h5)}h6{font-size:var(--font-size-h6)}hr{box-sizing:content-box;height:0;overflow:visible;border:0;border-top:1px solid rgba(0,0,0,.1);margin:1em 0}pre{font-family:monospace,monospace;font-size:1em;overflow:auto}a{background-color:transparent;text-decoration:none}a:link{color:var(--accent-color)}a:hover{text-decoration:underline}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none;max-width:100%;height:auto;vertical-align:middle}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--line-height);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;cursor:pointer}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto;resize:vertical}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item;cursor:pointer}template,[hidden]{display:none}table{border-collapse:collapse;width:100%}ul,ol{padding-left:1.5em}p{margin-top:0;margin-bottom:1em}.FormLabel-module__label___0M-fo{display:inline-block;font-weight:700;padding-bottom:.25em}.FormLabel-module__label___0M-fo.FormLabel-module__disabled___ktIFp{opacity:.5;cursor:not-allowed}.FormLabel-module__label___0M-fo:not(.FormLabel-module__disabled___ktIFp){cursor:default}.Input-module__input___WjT81{background-color:transparent;border-width:.15em;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Input-module__input___WjT81::placeholder{color:inherit;opacity:var(--placeholder-opacity, .3)}.Input-module__input___WjT81:disabled{opacity:.3}.Input-module__sizeSmall___NFvsi{padding:.1em .25em}.Input-module__sizeDefault___AxPA0{padding:.25em .5em}.Radio-module__container___AQxhk{display:flex;align-items:center;line-height:1.25}.Radio-module__svg___zl5kF{flex-shrink:0}.Radio-module__label___vAFIP{font-weight:700;margin-left:.35em;-webkit-user-select:none;user-select:none}.Select-module__select___cjdcr{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;background-position:right center;background-repeat:no-repeat;background-size:auto 85%;border-width:.15em;border-style:solid;border-radius:0;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Select-module__select___cjdcr:disabled{cursor:default;opacity:.3}.Select-module__select___cjdcr:not(:disabled){cursor:pointer}.Select-module__sizeSmall___i1quj{padding:.1em 1.75em .1em .25em}.Select-module__sizeDefault___EiWvW{padding:.25em 2em .25em .5em}.Textarea-module__textarea___Z-y6g{background-color:transparent;border-width:.15em;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Textarea-module__textarea___Z-y6g:disabled{opacity:.3}.Textarea-module__sizeSmall___HHFEM{padding:.1em .25em}.Textarea-module__sizeDefault___LL2Uc{padding:.25em .5em}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
(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:
|
|
2
|
+
(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="#FFF",textColor:s="#000",hoverColor:r,hoverTextColor:l,outline:u})=>{let c,i,y;u?(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));let m=1;return t?m=.3:e&&(m=r||u?1:.75),{backgroundColor:c,borderColor:i,color:y,opacity:m}},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:u="button",buttonProps:c={},children:i,disabled:y=!1,onClick:m,fontSize:_})=>{const f=g(),[n,p]=x.useState(!1);let S;s?S=s:S=e?f.buttons.textColor:f.buttons.primary.textColor;const h={...E({isActive:n,disabled:y,buttonColor:e||f.colors.primary,textColor:S,hoverColor:t,hoverTextColor:o,outline:r}),fontSize:_||f.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:m,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),type:u,...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:u=!1,label:c,labelStyle:i,name:y,onChange:m,style:_,...f})=>{const n=g(),p=l||L(),S=U({color:o||n.colors.primary,checkmarkColor:t,disabled:s,inverted:u}),k=v=>{s||m(v)},h={cursor:S.cursor,fontSize:r||n.fonts.size,opacity:S.opacity,..._},b={width:r||"1rem"},I={color:S.boxColor,cursor:S.cursor,fontSize:r||"1rem",...i};return a.jsxs("div",{className:P.container,style:h,...f,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:u&&e?S.boxColor:"transparent",strokeWidth:"25",stroke:S.boxColor}}),e&&a.jsx("path",{d:"M 25 45 L 45 65 L 75 30",stroke:S.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,...u})=>{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},m=[W.label,o?W.disabled:""].filter(Boolean).join(" ");return a.jsx("label",{className:m,htmlFor:r,style:y,...u,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:u=.3,size:c,style:i,type:y="text",value:m="",..._})=>{const f=g(),n=K({color:e||f.colors.primary,disabled:t,fontSize:o||f.fonts.size,placeholderOpacity:u}),p={"--placeholder-opacity":n.placeholderOpacity,borderColor:n.borderColor,color:n.color,fontSize:n.fontSize,opacity:n.opacity,...i},S=[$.input,c==="small"?$.sizeSmall:$.sizeDefault].filter(Boolean).join(" ");return a.jsx("input",{className:S,disabled:t,name:s,onChange:r,placeholder:l,style:p,type:y,value:m,..._})},F={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:u,name:c,onChange:i,style:y,...m})=>{const _=g(),f=r||L(),n=Y({color:t||_.colors.primary,disabled:o}),p=v=>{o||i(v)},S={cursor:n.cursor,fontSize:s||_.fonts.size,opacity:n.opacity,...y},k={width: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||_.fonts.size,...u};return a.jsxs("div",{className:F.container,style:S,...m,children:[a.jsx("input",{id:f,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:F.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:f,className:F.label,style:I,children:l})]})},H={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 u=`
|
|
3
3
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
4
4
|
<path
|
|
5
5
|
d="M 30 42.5 L 50 22.5 L 70 42.5"
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
fill="transparent"
|
|
15
15
|
/>
|
|
16
16
|
</svg>
|
|
17
|
-
`.trim();return`url("data:image/svg+xml,${encodeURIComponent(
|
|
17
|
+
`.trim();return`url("data:image/svg+xml,${encodeURIComponent(u)}")`})(e)}),te=({children:e,color:t,disabled:o=!1,fontSize:s,name:r="",onChange:l,placeholder:u="",size:c,style:i,value:y="",...m})=>{const _=g(),f=ee({color:t||_.colors.primary,disabled:o}),n={backgroundImage:f.backgroundImage,backgroundPosition:"right center",backgroundRepeat:"no-repeat",backgroundSize:"auto 85%",backgroundColor:"transparent",borderColor:f.borderColor,color:f.color,cursor:f.cursor,fontSize:s||_.fonts.size,opacity:f.opacity,...i},p=[H.select,c==="small"?H.sizeSmall:H.sizeDefault].filter(Boolean).join(" ");return a.jsxs("select",{className:p,disabled:o,name:r,onChange:l,style:n,value:y,...m,children:[u!==""&&a.jsx("option",{disabled:!0,value:"",children:u}),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:u=.3,rows:c=3,size:i,style:y,value:m="",..._})=>{const f=g(),n=oe({color:e||f.colors.primary,disabled:t,placeholderOpacity:u}),p=`textarea-placeholder-${x.useId?x.useId():Math.random().toString(36)}`;x.useEffect(()=>{const h=document.createElement("style");return h.id=p,h.textContent=`
|
|
18
18
|
.${p}::placeholder {
|
|
19
19
|
color: inherit;
|
|
20
20
|
opacity: ${n.placeholderOpacity};
|
|
21
21
|
}
|
|
22
|
-
`,document.head.appendChild(h),()=>{const b=document.getElementById(p);b&&b.remove()}},[p,n.placeholderOpacity]);const
|
|
22
|
+
`,document.head.appendChild(h),()=>{const b=document.getElementById(p);b&&b.remove()}},[p,n.placeholderOpacity]);const S={borderColor:n.borderColor,color:n.color,fontSize:o||f.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:S,value:m,..._})};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"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "digital-rabbit-cl",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"uuid": "^7.0.3"
|
|
6
6
|
},
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"@testing-library/jest-dom": "^6.9.1",
|
|
54
54
|
"@testing-library/react": "^16.3.0",
|
|
55
55
|
"@testing-library/user-event": "^14.6.1",
|
|
56
|
+
"@types/jest": "^30.0.0",
|
|
56
57
|
"@types/react": "^18.3.26",
|
|
57
58
|
"@types/react-dom": "^18.3.7",
|
|
58
59
|
"@types/uuid": "^10.0.0",
|