villela-ui 0.1.0

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/index.js ADDED
@@ -0,0 +1,409 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ Button: () => Button,
24
+ Card: () => Card,
25
+ Input: () => Input,
26
+ Tag: () => Tag,
27
+ colors: () => colors,
28
+ radii: () => radii,
29
+ shadows: () => shadows,
30
+ spacing: () => spacing,
31
+ typography: () => typography
32
+ });
33
+ module.exports = __toCommonJS(index_exports);
34
+
35
+ // src/tokens/colors/colors.css.ts
36
+ var colors = { palette: { primary: "var(--palette-primary__e8shvx0)", secundary: "var(--palette-secundary__e8shvx1)", tertiary: "var(--palette-tertiary__e8shvx2)", quaternary: "var(--palette-quaternary__e8shvx3)", quinary: "var(--palette-quinary__e8shvx4)" }, toning: { primary: { t30: "var(--toning-primary-t30__e8shvx5)", t50: "var(--toning-primary-t50__e8shvx6)", t60: "var(--toning-primary-t60__e8shvx7)", t70: "var(--toning-primary-t70__e8shvx8)", t80: "var(--toning-primary-t80__e8shvx9)", t90: "var(--toning-primary-t90__e8shvxa)" }, error: { t30: "var(--toning-error-t30__e8shvxb)", t50: "var(--toning-error-t50__e8shvxc)", t60: "var(--toning-error-t60__e8shvxd)", t70: "var(--toning-error-t70__e8shvxe)", t80: "var(--toning-error-t80__e8shvxf)", t90: "var(--toning-error-t90__e8shvxg)" }, success: { t30: "var(--toning-success-t30__e8shvxh)", t50: "var(--toning-success-t50__e8shvxi)", t60: "var(--toning-success-t60__e8shvxj)", t70: "var(--toning-success-t70__e8shvxk)", t80: "var(--toning-success-t80__e8shvxl)", t90: "var(--toning-success-t90__e8shvxm)" }, warning: { t30: "var(--toning-warning-t30__e8shvxn)", t50: "var(--toning-warning-t50__e8shvxo)", t60: "var(--toning-warning-t60__e8shvxp)", t70: "var(--toning-warning-t70__e8shvxq)", t80: "var(--toning-warning-t80__e8shvxr)", t90: "var(--toning-warning-t90__e8shvxs)" }, base: { t30: "var(--toning-base-t30__e8shvxt)", t50: "var(--toning-base-t50__e8shvxu)", t60: "var(--toning-base-t60__e8shvxv)", t70: "var(--toning-base-t70__e8shvxw)", t80: "var(--toning-base-t80__e8shvxx)", t90: "var(--toning-base-t90__e8shvxy)" } }, text: { primary: { T60: "var(--text-primary-T60__e8shvxz)", T30: "var(--text-primary-T30__e8shvx10)", T10: "var(--text-primary-T10__e8shvx11)", T05: "var(--text-primary-T05__e8shvx12)", TO1: "var(--text-primary-TO1__e8shvx13)" }, secundary: { T60: "var(--text-secundary-T60__e8shvx14)", T30: "var(--text-secundary-T30__e8shvx15)", T10: "var(--text-secundary-T10__e8shvx16)", T05: "var(--text-secundary-T05__e8shvx17)", TO1: "var(--text-secundary-TO1__e8shvx18)" }, error: { T60L: "var(--text-error-T60L__e8shvx19)", T30: "var(--text-error-T30__e8shvx1a)", T10: "var(--text-error-T10__e8shvx1b)", T05: "var(--text-error-T05__e8shvx1c)", TO1: "var(--text-error-TO1__e8shvx1d)" }, success: { T60: "var(--text-success-T60__e8shvx1e)", T30: "var(--text-success-T30__e8shvx1f)", T10: "var(--text-success-T10__e8shvx1g)", T05: "var(--text-success-T05__e8shvx1h)", T01: "var(--text-success-T01__e8shvx1i)" }, warning: { T60: "var(--text-warning-T60__e8shvx1j)", T30: "var(--text-warning-T30__e8shvx1k)", T10: "var(--text-warning-T10__e8shvx1l)", TO5: "var(--text-warning-TO5__e8shvx1m)", T01: "var(--text-warning-T01__e8shvx1n)" } } };
37
+
38
+ // src/tokens/spacing/spacing.css.ts
39
+ var spacing = { space: { "0": "var(--space-0__17tztz60)", "1": "var(--space-1__17tztz61)", "2": "var(--space-2__17tztz62)", "3": "var(--space-3__17tztz63)", "4": "var(--space-4__17tztz64)", "5": "var(--space-5__17tztz65)", "6": "var(--space-6__17tztz66)", "7": "var(--space-7__17tztz67)", "8": "var(--space-8__17tztz68)", "9": "var(--space-9__17tztz69)", "10": "var(--space-10__17tztz6a)", "12": "var(--space-12__17tztz6b)", "14": "var(--space-14__17tztz6c)", "16": "var(--space-16__17tztz6d)", "20": "var(--space-20__17tztz6e)", "24": "var(--space-24__17tztz6f)", "28": "var(--space-28__17tztz6g)", "32": "var(--space-32__17tztz6h)", "36": "var(--space-36__17tztz6i)", "40": "var(--space-40__17tztz6j)", "48": "var(--space-48__17tztz6k)", "56": "var(--space-56__17tztz6l)", "64": "var(--space-64__17tztz6m)" } };
40
+
41
+ // src/tokens/typograpgy/typography.css.ts
42
+ var typography = { fontFamily: "var(--fontFamily__6elmlr0)" };
43
+
44
+ // src/tokens/radius/radii.css.ts
45
+ var radii = { width: { small: "var(--width-small__xtrgmf0)", medium: "var(--width-medium__xtrgmf1)", large: "var(--width-large__xtrgmf2)" }, radius: { small: "var(--radius-small__xtrgmf3)", medium: "var(--radius-medium__xtrgmf4)", large: "var(--radius-large__xtrgmf5)", rounded: "var(--radius-rounded__xtrgmf6)" } };
46
+
47
+ // src/tokens/shadows/shadows.css.ts
48
+ var shadows = { shadow: { none: "var(--shadow-none__3ldqw10)", xs: "var(--shadow-xs__3ldqw11)", sm: "var(--shadow-sm__3ldqw12)", md: "var(--shadow-md__3ldqw13)", lg: "var(--shadow-lg__3ldqw14)", xl: "var(--shadow-xl__3ldqw15)" } };
49
+
50
+ // src/components/button/button.component.tsx
51
+ var import_react = require("react");
52
+
53
+ // src/components/button/button.css.ts
54
+ var import_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
55
+ var button = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "button_button__rnxq7e0", variantClassNames: { variant: { primary: "button_button_variant_primary__rnxq7e1", secondary: "button_button_variant_secondary__rnxq7e2", tertiary: "button_button_variant_tertiary__rnxq7e3" }, color: { brand: "button_button_color_brand__rnxq7e4", error: "button_button_color_error__rnxq7e5", warning: "button_button_color_warning__rnxq7e6", success: "button_button_color_success__rnxq7e7" }, size: { xl: "button_button_size_xl__rnxq7e8", lg: "button_button_size_lg__rnxq7e9", md: "button_button_size_md__rnxq7ea", sm: "button_button_size_sm__rnxq7eb", icon: "button_button_size_icon__rnxq7ec" }, pill: { true: "button_button_pill_true__rnxq7ed", false: "button_button_pill_false__rnxq7ee" }, disabled: { true: "button_button_disabled_true__rnxq7ef", false: "button_button_disabled_false__rnxq7eg" } }, defaultVariants: { variant: "primary", color: "brand", size: "md", pill: false, disabled: false }, compoundVariants: [[{ variant: "primary", color: "brand" }, "button_button_compound_0__rnxq7eh"], [{ variant: "secondary", color: "brand" }, "button_button_compound_1__rnxq7ei"], [{ variant: "tertiary", color: "brand" }, "button_button_compound_2__rnxq7ej"], [{ variant: "primary", color: "error" }, "button_button_compound_3__rnxq7ek"], [{ variant: "secondary", color: "error" }, "button_button_compound_4__rnxq7el"], [{ variant: "tertiary", color: "error" }, "button_button_compound_5__rnxq7em"], [{ variant: "primary", color: "warning" }, "button_button_compound_6__rnxq7en"], [{ variant: "secondary", color: "warning" }, "button_button_compound_7__rnxq7eo"], [{ variant: "tertiary", color: "warning" }, "button_button_compound_8__rnxq7ep"], [{ variant: "primary", color: "success" }, "button_button_compound_9__rnxq7eq"], [{ variant: "secondary", color: "success" }, "button_button_compound_10__rnxq7er"], [{ variant: "tertiary", color: "success" }, "button_button_compound_11__rnxq7es"]] });
56
+ var iconWrapper = { withText: "button_iconWrapper_withText__rnxq7et", noText: "button_iconWrapper_noText__rnxq7eu" };
57
+ var loaderWrapper = { withText: "button_loaderWrapper_withText__rnxq7ev", noText: "button_loaderWrapper_noText__rnxq7ew" };
58
+ var text = "button_text__rnxq7ex";
59
+
60
+ // src/components/button/button.component.tsx
61
+ var import_jsx_runtime = require("react/jsx-runtime");
62
+ var Button = ({
63
+ text: text2,
64
+ variant = "primary",
65
+ color = "brand",
66
+ size = "md",
67
+ pill = false,
68
+ iconBefore,
69
+ iconAfter,
70
+ isLoading = false,
71
+ disabled = false,
72
+ onClick,
73
+ htmlType,
74
+ style,
75
+ className
76
+ }) => {
77
+ const [preventDoubleClick, setPreventDoubleClick] = (0, import_react.useState)(false);
78
+ const isDisabled = disabled || isLoading || preventDoubleClick;
79
+ const handleClick = (event) => {
80
+ if (isDisabled) return;
81
+ setPreventDoubleClick(true);
82
+ onClick?.(event);
83
+ };
84
+ (0, import_react.useEffect)(() => {
85
+ if (preventDoubleClick) {
86
+ const timer = setTimeout(() => setPreventDoubleClick(false), 400);
87
+ return () => clearTimeout(timer);
88
+ }
89
+ }, [preventDoubleClick]);
90
+ const classNames = [
91
+ button({ variant, color, size, pill, disabled: isDisabled }),
92
+ className
93
+ ].filter(Boolean).join(" ");
94
+ const textExists = Boolean(text2);
95
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
96
+ "button",
97
+ {
98
+ type: htmlType,
99
+ className: classNames,
100
+ onClick: handleClick,
101
+ disabled: isDisabled,
102
+ "aria-busy": isLoading,
103
+ style,
104
+ children: [
105
+ iconBefore && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
106
+ "span",
107
+ {
108
+ className: textExists ? iconWrapper.withText : iconWrapper.noText,
109
+ children: iconBefore
110
+ }
111
+ ),
112
+ text2 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: text, children: text2 }),
113
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
114
+ "span",
115
+ {
116
+ className: textExists ? loaderWrapper.withText : loaderWrapper.noText,
117
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, {})
118
+ }
119
+ ),
120
+ iconAfter && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
121
+ "span",
122
+ {
123
+ className: textExists ? loaderWrapper.withText : loaderWrapper.noText,
124
+ children: iconAfter
125
+ }
126
+ )
127
+ ]
128
+ }
129
+ );
130
+ };
131
+ function Spinner() {
132
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
133
+ "svg",
134
+ {
135
+ width: "16",
136
+ height: "16",
137
+ viewBox: "0 0 16 16",
138
+ fill: "none",
139
+ "aria-hidden": "true",
140
+ style: { animation: "spin 0.65s linear infinite" },
141
+ children: [
142
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { children: `@keyframes spin { to { transform: rotate(360deg); } }` }),
143
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
144
+ "circle",
145
+ {
146
+ cx: "8",
147
+ cy: "8",
148
+ r: "6",
149
+ stroke: "currentColor",
150
+ strokeWidth: "2",
151
+ strokeOpacity: "0.25"
152
+ }
153
+ ),
154
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
155
+ "path",
156
+ {
157
+ d: "M14 8a6 6 0 0 0-6-6",
158
+ stroke: "currentColor",
159
+ strokeWidth: "2",
160
+ strokeLinecap: "round"
161
+ }
162
+ )
163
+ ]
164
+ }
165
+ );
166
+ }
167
+
168
+ // src/components/input/input.component.tsx
169
+ var import_react2 = require("react");
170
+
171
+ // src/components/input/input.css.ts
172
+ var import_createRuntimeFn2 = require("@vanilla-extract/recipes/createRuntimeFn");
173
+ var container = (0, import_createRuntimeFn2.createRuntimeFn)({ defaultClassName: "input_container__9wx5ob4", variantClassNames: { state: { "default": "input_container_state_default__9wx5ob5", error: "input_container_state_error__9wx5ob6" }, multiline: { true: "input_container_multiline_true__9wx5ob7", false: "input_container_multiline_false__9wx5ob8" } }, defaultVariants: { state: "default", multiline: false }, compoundVariants: [] });
174
+ var counter = "input_counter__9wx5obf";
175
+ var eyeButton = "input_eyeButton__9wx5obh";
176
+ var footer = "input_footer__9wx5obc";
177
+ var forgotLink = "input_forgotLink__9wx5obg";
178
+ var helperText = { "default": "input_helperText_default__9wx5obd", error: "input_helperText_error__9wx5obe" };
179
+ var iconWrapper2 = "input_iconWrapper__9wx5obb";
180
+ var input = "input_input__9wx5ob9";
181
+ var label = { "default": "input_label_default__9wx5ob1", active: "input_label_active__9wx5ob2", error: "input_label_error__9wx5ob3" };
182
+ var textarea = "input_textarea__9wx5oba";
183
+ var wrapper = "input_wrapper__9wx5ob0";
184
+
185
+ // src/components/input/input.component.tsx
186
+ var import_jsx_runtime2 = require("react/jsx-runtime");
187
+ function EyeIcon({ open }) {
188
+ return open ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
189
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
190
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "3" })
191
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
192
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" }),
193
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
194
+ ] });
195
+ }
196
+ var Input = ({
197
+ label: label3,
198
+ placeholder = "Texto",
199
+ icon,
200
+ type = "text",
201
+ error,
202
+ helperText: helperText2,
203
+ maxLength,
204
+ multiline = false,
205
+ rows = 4,
206
+ forgotPasswordLabel,
207
+ onForgotPassword,
208
+ value,
209
+ onChange,
210
+ disabled = false,
211
+ id: externalId,
212
+ className
213
+ }) => {
214
+ const [showPassword, setShowPassword] = (0, import_react2.useState)(false);
215
+ const [focused, setFocused] = (0, import_react2.useState)(false);
216
+ const [internalValue, setInternalValue] = (0, import_react2.useState)("");
217
+ const generatedId = (0, import_react2.useId)();
218
+ const id = externalId ?? generatedId;
219
+ const isControlled = value !== void 0;
220
+ const currentValue = isControlled ? value : internalValue;
221
+ const hasError = Boolean(error);
222
+ const state = hasError ? "error" : "default";
223
+ const labelState = hasError ? "error" : focused ? "active" : "default";
224
+ const handleChange = (e) => {
225
+ const val = e.target.value;
226
+ if (!isControlled) setInternalValue(val);
227
+ onChange?.(val);
228
+ };
229
+ const containerClass = [
230
+ container({ state, multiline }),
231
+ className
232
+ ].filter(Boolean).join(" ");
233
+ const showFooter = forgotPasswordLabel || maxLength !== void 0 || helperText2 || error;
234
+ const resolvedType = type === "password" ? showPassword ? "text" : "password" : type;
235
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: wrapper, children: [
236
+ label3 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { htmlFor: id, className: label[labelState], children: label3 }),
237
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: containerClass, children: [
238
+ multiline ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
239
+ "textarea",
240
+ {
241
+ id,
242
+ className: textarea,
243
+ placeholder,
244
+ rows,
245
+ maxLength,
246
+ value: currentValue,
247
+ onChange: handleChange,
248
+ onFocus: () => setFocused(true),
249
+ onBlur: () => setFocused(false),
250
+ disabled,
251
+ "aria-invalid": hasError,
252
+ "aria-describedby": hasError ? `${id}-error` : void 0
253
+ }
254
+ ) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
255
+ "input",
256
+ {
257
+ id,
258
+ className: input,
259
+ type: resolvedType,
260
+ placeholder,
261
+ maxLength,
262
+ value: currentValue,
263
+ onChange: handleChange,
264
+ onFocus: () => setFocused(true),
265
+ onBlur: () => setFocused(false),
266
+ disabled,
267
+ "aria-invalid": hasError,
268
+ "aria-describedby": hasError ? `${id}-error` : void 0
269
+ }
270
+ ),
271
+ icon && !multiline && type !== "password" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: iconWrapper2, "aria-hidden": "true", children: icon }),
272
+ type === "password" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
273
+ "button",
274
+ {
275
+ type: "button",
276
+ className: eyeButton,
277
+ onClick: () => setShowPassword((v) => !v),
278
+ "aria-label": showPassword ? "Ocultar senha" : "Mostrar senha",
279
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(EyeIcon, { open: showPassword })
280
+ }
281
+ )
282
+ ] }),
283
+ showFooter && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: footer, children: [
284
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
285
+ error && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { id: `${id}-error`, className: helperText.error, children: error }),
286
+ !error && helperText2 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: helperText.default, children: helperText2 }),
287
+ !error && !helperText2 && forgotPasswordLabel && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
288
+ "button",
289
+ {
290
+ type: "button",
291
+ className: forgotLink,
292
+ onClick: onForgotPassword,
293
+ children: forgotPasswordLabel
294
+ }
295
+ )
296
+ ] }),
297
+ maxLength !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: counter, children: [
298
+ currentValue.length,
299
+ "/",
300
+ maxLength
301
+ ] })
302
+ ] }),
303
+ error && forgotPasswordLabel && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
304
+ "button",
305
+ {
306
+ type: "button",
307
+ className: forgotLink,
308
+ onClick: onForgotPassword,
309
+ children: forgotPasswordLabel
310
+ }
311
+ )
312
+ ] });
313
+ };
314
+
315
+ // src/components/card/card.css.ts
316
+ var body = "card_body__odd29h1";
317
+ var card = "card_card__odd29h0";
318
+ var cardInline = "card_cardInline__odd29hc";
319
+ var description = "card_description__odd29hb";
320
+ var iconWrapper3 = { plain: "card_iconWrapper_plain__odd29h2", background: "card_iconWrapper_background__odd29h3" };
321
+ var inlineLabelGroup = "card_inlineLabelGroup__odd29he";
322
+ var inlineLeft = "card_inlineLeft__odd29hd";
323
+ var label2 = "card_label__odd29h4";
324
+ var sublabel = "card_sublabel__odd29hf";
325
+ var valueColor = { "default": "card_valueColor_default__odd29h6", brand: "card_valueColor_brand__odd29h7", success: "card_valueColor_success__odd29h8", error: "card_valueColor_error__odd29h9", warning: "card_valueColor_warning__odd29ha" };
326
+ var valueInline = "card_valueInline__odd29hg";
327
+ var valueStacked = "card_valueStacked__odd29h5";
328
+
329
+ // src/components/card/card.component.tsx
330
+ var import_jsx_runtime3 = require("react/jsx-runtime");
331
+ var Card = ({
332
+ label: label3,
333
+ value,
334
+ icon,
335
+ iconBackground = false,
336
+ sublabel: sublabel2,
337
+ description: description2,
338
+ valueColor: valueColor2 = "default",
339
+ className
340
+ }) => {
341
+ if (sublabel2) {
342
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: [cardInline, className].filter(Boolean).join(" "), children: [
343
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: inlineLeft, children: [
344
+ icon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: iconWrapper3[iconBackground ? "background" : "plain"], children: icon }),
345
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: inlineLabelGroup, children: [
346
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: label2, children: label3 }),
347
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: sublabel, children: sublabel2 })
348
+ ] })
349
+ ] }),
350
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: `${valueInline} ${valueColor[valueColor2]}`, children: value })
351
+ ] });
352
+ }
353
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: [card, className].filter(Boolean).join(" "), children: [
354
+ icon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: iconWrapper3[iconBackground ? "background" : "plain"], children: icon }),
355
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: body, children: [
356
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: label2, children: label3 }),
357
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: `${valueStacked} ${valueColor[valueColor2]}`, children: value }),
358
+ description2 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: description, children: description2 })
359
+ ] })
360
+ ] });
361
+ };
362
+
363
+ // src/components/tag/tag.css.ts
364
+ var import_createRuntimeFn3 = require("@vanilla-extract/recipes/createRuntimeFn");
365
+ var removeButton = "tag_removeButton__ffqj0pl";
366
+ var tag = (0, import_createRuntimeFn3.createRuntimeFn)({ defaultClassName: "tag_tag__ffqj0p0", variantClassNames: { size: { lg: "tag_tag_size_lg__ffqj0p1", md: "tag_tag_size_md__ffqj0p2", sm: "tag_tag_size_sm__ffqj0p3" }, variant: { filled: "tag_tag_variant_filled__ffqj0p4", outlined: "tag_tag_variant_outlined__ffqj0p5" }, color: { brand: "tag_tag_color_brand__ffqj0p6", warning: "tag_tag_color_warning__ffqj0p7", error: "tag_tag_color_error__ffqj0p8", success: "tag_tag_color_success__ffqj0p9", neutral: "tag_tag_color_neutral__ffqj0pa" } }, defaultVariants: { variant: "filled", color: "brand", size: "md" }, compoundVariants: [[{ variant: "filled", color: "brand" }, "tag_tag_compound_0__ffqj0pb"], [{ variant: "outlined", color: "brand" }, "tag_tag_compound_1__ffqj0pc"], [{ variant: "filled", color: "warning" }, "tag_tag_compound_2__ffqj0pd"], [{ variant: "outlined", color: "warning" }, "tag_tag_compound_3__ffqj0pe"], [{ variant: "filled", color: "error" }, "tag_tag_compound_4__ffqj0pf"], [{ variant: "outlined", color: "error" }, "tag_tag_compound_5__ffqj0pg"], [{ variant: "filled", color: "success" }, "tag_tag_compound_6__ffqj0ph"], [{ variant: "outlined", color: "success" }, "tag_tag_compound_7__ffqj0pi"], [{ variant: "filled", color: "neutral" }, "tag_tag_compound_8__ffqj0pj"], [{ variant: "outlined", color: "neutral" }, "tag_tag_compound_9__ffqj0pk"]] });
367
+
368
+ // src/components/tag/tag.component.tsx
369
+ var import_jsx_runtime4 = require("react/jsx-runtime");
370
+ var XIcon = ({ size }) => {
371
+ const px = size === "lg" ? 14 : size === "md" ? 12 : 10;
372
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { width: px, height: px, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
373
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
374
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
375
+ ] });
376
+ };
377
+ var Tag = ({
378
+ label: label3,
379
+ color = "brand",
380
+ variant = "filled",
381
+ size = "md",
382
+ onRemove
383
+ }) => {
384
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: tag({ color, variant, size }), children: [
385
+ label3,
386
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
387
+ "button",
388
+ {
389
+ type: "button",
390
+ className: removeButton,
391
+ onClick: onRemove,
392
+ "aria-label": `Remover ${label3}`,
393
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(XIcon, { size })
394
+ }
395
+ )
396
+ ] });
397
+ };
398
+ // Annotate the CommonJS export names for ESM import in node:
399
+ 0 && (module.exports = {
400
+ Button,
401
+ Card,
402
+ Input,
403
+ Tag,
404
+ colors,
405
+ radii,
406
+ shadows,
407
+ spacing,
408
+ typography
409
+ });