@giv-igniteui/react 2.0.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/.eslintrc.json +3 -0
- package/.turbo/turbo-build.log +18 -0
- package/CHANGELOG.md +7 -0
- package/dist/index.d.mts +1682 -0
- package/dist/index.d.ts +1682 -0
- package/dist/index.js +546 -0
- package/dist/index.mjs +504 -0
- package/package.json +32 -0
- package/src/components/Avatar/index.tsx +18 -0
- package/src/components/Avatar/styles.ts +29 -0
- package/src/components/Box.tsx +12 -0
- package/src/components/Button.tsx +84 -0
- package/src/components/Checkbox/index.tsx +20 -0
- package/src/components/Checkbox/styles.ts +55 -0
- package/src/components/Heading.tsx +27 -0
- package/src/components/MultiStep/index.tsx +23 -0
- package/src/components/MultiStep/styles.ts +33 -0
- package/src/components/Text.tsx +32 -0
- package/src/components/TextArea.tsx +34 -0
- package/src/components/TextInput/index.tsx +17 -0
- package/src/components/TextInput/styles.ts +43 -0
- package/src/index.tsx +9 -0
- package/src/styles/index.ts +36 -0
- package/tsconfig.json +6 -0
package/dist/index.js
ADDED
@@ -0,0 +1,546 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __create = Object.create;
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __defProps = Object.defineProperties;
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
13
|
+
var __spreadValues = (a, b) => {
|
14
|
+
for (var prop in b || (b = {}))
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
17
|
+
if (__getOwnPropSymbols)
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
19
|
+
if (__propIsEnum.call(b, prop))
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
21
|
+
}
|
22
|
+
return a;
|
23
|
+
};
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
25
|
+
var __objRest = (source, exclude) => {
|
26
|
+
var target = {};
|
27
|
+
for (var prop in source)
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
29
|
+
target[prop] = source[prop];
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
33
|
+
target[prop] = source[prop];
|
34
|
+
}
|
35
|
+
return target;
|
36
|
+
};
|
37
|
+
var __export = (target, all) => {
|
38
|
+
for (var name in all)
|
39
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
40
|
+
};
|
41
|
+
var __copyProps = (to, from, except, desc) => {
|
42
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
43
|
+
for (let key of __getOwnPropNames(from))
|
44
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
45
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
46
|
+
}
|
47
|
+
return to;
|
48
|
+
};
|
49
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
50
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
51
|
+
// file that has been converted to a CommonJS file using a Babel-
|
52
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
53
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
54
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
55
|
+
mod
|
56
|
+
));
|
57
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
58
|
+
|
59
|
+
// src/index.tsx
|
60
|
+
var index_exports = {};
|
61
|
+
__export(index_exports, {
|
62
|
+
Avatar: () => Avatar2,
|
63
|
+
Box: () => Box,
|
64
|
+
Button: () => Button,
|
65
|
+
Checkbox: () => Checkbox2,
|
66
|
+
Heading: () => Heading,
|
67
|
+
MultiStep: () => MultiStep,
|
68
|
+
Text: () => Text,
|
69
|
+
TextArea: () => TextArea,
|
70
|
+
TextInput: () => TextInput
|
71
|
+
});
|
72
|
+
module.exports = __toCommonJS(index_exports);
|
73
|
+
|
74
|
+
// ../tokens/dist/index.mjs
|
75
|
+
var colors = {
|
76
|
+
white: "#FFF",
|
77
|
+
black: "#000",
|
78
|
+
gray100: "#E1E1E6",
|
79
|
+
gray200: "#A9A9B2",
|
80
|
+
gray400: "#7C7C8A",
|
81
|
+
gray500: "#505059",
|
82
|
+
gray600: "#323238",
|
83
|
+
gray700: "#29292E",
|
84
|
+
gray800: "#202024",
|
85
|
+
gray900: "#121214",
|
86
|
+
ignite300: "#00B37E",
|
87
|
+
ignite500: "#00875F",
|
88
|
+
ignite700: "#015F43",
|
89
|
+
ignite900: "#00291D"
|
90
|
+
};
|
91
|
+
var space = {
|
92
|
+
1: "0.25rem",
|
93
|
+
2: "0.5rem",
|
94
|
+
3: "0.75rem",
|
95
|
+
4: "1rem",
|
96
|
+
5: "1.25rem",
|
97
|
+
6: "1.5rem",
|
98
|
+
7: "1.75rem",
|
99
|
+
8: "2rem",
|
100
|
+
10: "2.5rem",
|
101
|
+
12: "3rem",
|
102
|
+
16: "4rem",
|
103
|
+
20: "5rem",
|
104
|
+
40: "10rem",
|
105
|
+
64: "16rem",
|
106
|
+
80: "20rem"
|
107
|
+
};
|
108
|
+
var radii = {
|
109
|
+
px: "1px",
|
110
|
+
xs: "4px",
|
111
|
+
sm: "6px",
|
112
|
+
md: "8px",
|
113
|
+
lg: "16px",
|
114
|
+
full: "99999px"
|
115
|
+
};
|
116
|
+
var fonts = {
|
117
|
+
default: "Roboto, sans-serif",
|
118
|
+
code: "monospace"
|
119
|
+
};
|
120
|
+
var fontSizes = {
|
121
|
+
xxs: "0.625rem",
|
122
|
+
xs: "0.75rem",
|
123
|
+
sm: "0.875rem",
|
124
|
+
md: "1rem",
|
125
|
+
lg: "1.125rem",
|
126
|
+
xl: "1.25rem",
|
127
|
+
"2xl": "1.5rem",
|
128
|
+
"4xl": "2rem",
|
129
|
+
"5xl": "2.25rem",
|
130
|
+
"6xl": "3rem",
|
131
|
+
"7xl": "4rem",
|
132
|
+
"8xl": "4.5rem",
|
133
|
+
"9xl": "6rem"
|
134
|
+
};
|
135
|
+
var fontWeights = {
|
136
|
+
regular: "400",
|
137
|
+
medium: "500",
|
138
|
+
bold: "700"
|
139
|
+
};
|
140
|
+
var lineHeights = {
|
141
|
+
shorter: "125%",
|
142
|
+
short: "140%",
|
143
|
+
base: "160%",
|
144
|
+
tall: "180%"
|
145
|
+
};
|
146
|
+
|
147
|
+
// src/styles/index.ts
|
148
|
+
var import_react = require("@stitches/react");
|
149
|
+
var {
|
150
|
+
styled,
|
151
|
+
css,
|
152
|
+
globalCss,
|
153
|
+
keyframes,
|
154
|
+
getCssText,
|
155
|
+
theme,
|
156
|
+
createTheme,
|
157
|
+
config
|
158
|
+
} = (0, import_react.createStitches)({
|
159
|
+
themeMap: __spreadProps(__spreadValues({}, import_react.defaultThemeMap), {
|
160
|
+
height: "space",
|
161
|
+
width: "space"
|
162
|
+
}),
|
163
|
+
theme: {
|
164
|
+
colors,
|
165
|
+
fontSizes,
|
166
|
+
fontWeights,
|
167
|
+
fonts,
|
168
|
+
lineHeights,
|
169
|
+
radii,
|
170
|
+
// borderRadius
|
171
|
+
space
|
172
|
+
}
|
173
|
+
});
|
174
|
+
|
175
|
+
// src/components/Box.tsx
|
176
|
+
var Box = styled("div", {
|
177
|
+
padding: "$4",
|
178
|
+
borderRadius: "$md",
|
179
|
+
backgroundColor: "$gray800",
|
180
|
+
border: "1px solid $gray600"
|
181
|
+
});
|
182
|
+
Box.displayName = "Box";
|
183
|
+
|
184
|
+
// src/components/Text.tsx
|
185
|
+
var Text = styled("p", {
|
186
|
+
fontFamily: "$default",
|
187
|
+
lineHeight: "$base",
|
188
|
+
margin: 0,
|
189
|
+
color: "$gray100",
|
190
|
+
variants: {
|
191
|
+
size: {
|
192
|
+
xxs: { fontSize: "$xxs" },
|
193
|
+
xs: { fontSize: "$xs" },
|
194
|
+
sm: { fontSize: "$sm" },
|
195
|
+
md: { fontSize: "$md" },
|
196
|
+
lg: { fontSize: "$lg" },
|
197
|
+
xl: { fontSize: "$xl" },
|
198
|
+
"2xl": { fontSize: "$2xl" },
|
199
|
+
"4xl": { fontSize: "$4xl" },
|
200
|
+
"5xl": { fontSize: "$5xl" },
|
201
|
+
"6xl": { fontSize: "$6xl" },
|
202
|
+
"7xl": { fontSize: "$7xl" },
|
203
|
+
"8xl": { fontSize: "$8xl" },
|
204
|
+
"9xl": { fontSize: "$9xl" }
|
205
|
+
}
|
206
|
+
},
|
207
|
+
defaultVariants: {
|
208
|
+
size: "md"
|
209
|
+
}
|
210
|
+
});
|
211
|
+
Text.displayName = "Text";
|
212
|
+
|
213
|
+
// src/components/Heading.tsx
|
214
|
+
var Heading = styled("h2", {
|
215
|
+
fontFamily: "$default",
|
216
|
+
lineHeight: "$shorter",
|
217
|
+
margin: 0,
|
218
|
+
color: "$gray100",
|
219
|
+
variants: {
|
220
|
+
size: {
|
221
|
+
sm: { fontSize: "$xl" },
|
222
|
+
md: { fontSize: "$2xl" },
|
223
|
+
lg: { fontSize: "$4xl" },
|
224
|
+
"2xl": { fontSize: "$5xl" },
|
225
|
+
"3xl": { fontSize: "$6xl" },
|
226
|
+
"4xl": { fontSize: "$7xl" },
|
227
|
+
"5xl": { fontSize: "$8xl" },
|
228
|
+
"6xl": { fontSize: "$9xl" }
|
229
|
+
}
|
230
|
+
},
|
231
|
+
defaultVariants: {
|
232
|
+
size: "md"
|
233
|
+
}
|
234
|
+
});
|
235
|
+
Heading.displayName = "Heading";
|
236
|
+
|
237
|
+
// src/components/Avatar/styles.ts
|
238
|
+
var Avatar = __toESM(require("@radix-ui/react-avatar"));
|
239
|
+
var AvatarContainer = styled(Avatar.Root, {
|
240
|
+
borderRadius: "$full",
|
241
|
+
display: "inline-block",
|
242
|
+
width: "$12",
|
243
|
+
height: "$12",
|
244
|
+
overflow: "hidden"
|
245
|
+
});
|
246
|
+
var AvatarImage = styled(Avatar.Image, {
|
247
|
+
width: "100%",
|
248
|
+
height: "100%",
|
249
|
+
objectFit: "cover",
|
250
|
+
borderRadius: "$full"
|
251
|
+
});
|
252
|
+
var AvatarFallback = styled(Avatar.Fallback, {
|
253
|
+
width: "100%",
|
254
|
+
height: "100%",
|
255
|
+
display: "flex",
|
256
|
+
alignItems: "center",
|
257
|
+
justifyContent: "center",
|
258
|
+
backgroundColor: "$gray600",
|
259
|
+
color: "$gray800",
|
260
|
+
svg: {
|
261
|
+
width: "$6",
|
262
|
+
height: "$6"
|
263
|
+
}
|
264
|
+
});
|
265
|
+
|
266
|
+
// src/components/Avatar/index.tsx
|
267
|
+
var import_phosphor_react = require("phosphor-react");
|
268
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
269
|
+
function Avatar2(props) {
|
270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AvatarContainer, { children: [
|
271
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AvatarImage, __spreadValues({}, props)),
|
272
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AvatarFallback, { delayMs: 600, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_phosphor_react.User, {}) })
|
273
|
+
] });
|
274
|
+
}
|
275
|
+
Avatar2.displayName = "Avatar";
|
276
|
+
|
277
|
+
// src/components/Button.tsx
|
278
|
+
var Button = styled("button", {
|
279
|
+
all: "unset",
|
280
|
+
borderRadius: "$sm",
|
281
|
+
fontSize: "$sm",
|
282
|
+
fontWeight: "$medium",
|
283
|
+
fontFamily: "$default",
|
284
|
+
textAlign: "center",
|
285
|
+
minWidth: 120,
|
286
|
+
boxSizing: "border-box",
|
287
|
+
display: "flex",
|
288
|
+
alignItems: "center",
|
289
|
+
justifyContent: "center",
|
290
|
+
gap: "$2",
|
291
|
+
cursor: "pointer",
|
292
|
+
padding: "0 $4",
|
293
|
+
svg: {
|
294
|
+
width: "$4",
|
295
|
+
height: "$4"
|
296
|
+
},
|
297
|
+
"&:disabled": {
|
298
|
+
cursor: "not-allowed"
|
299
|
+
},
|
300
|
+
variants: {
|
301
|
+
variant: {
|
302
|
+
primary: {
|
303
|
+
color: "$white",
|
304
|
+
background: "$ignite500",
|
305
|
+
"&:not(:disabled):hover": {
|
306
|
+
background: "$ignite300"
|
307
|
+
},
|
308
|
+
"&:disabled": {
|
309
|
+
backgroundColor: "$gray200"
|
310
|
+
}
|
311
|
+
},
|
312
|
+
secondary: {
|
313
|
+
color: "$ignite300",
|
314
|
+
border: "2px solid $ignite300",
|
315
|
+
"&:not(:disabled):hover": {
|
316
|
+
background: "$ignite500",
|
317
|
+
color: "$white"
|
318
|
+
},
|
319
|
+
"&:disabled": {
|
320
|
+
color: "$gray200",
|
321
|
+
borderColor: "$gray200"
|
322
|
+
}
|
323
|
+
},
|
324
|
+
tertiary: {
|
325
|
+
color: "$gray100",
|
326
|
+
"&:not(:disabled):hover": {
|
327
|
+
background: "$white"
|
328
|
+
},
|
329
|
+
"&:disabled": {
|
330
|
+
color: "$gray600"
|
331
|
+
}
|
332
|
+
}
|
333
|
+
},
|
334
|
+
size: {
|
335
|
+
sm: {
|
336
|
+
height: 38
|
337
|
+
},
|
338
|
+
md: {
|
339
|
+
height: 46
|
340
|
+
}
|
341
|
+
}
|
342
|
+
},
|
343
|
+
defaultVariants: {
|
344
|
+
variant: "primary",
|
345
|
+
size: "md"
|
346
|
+
}
|
347
|
+
});
|
348
|
+
Button.displayName = "Button";
|
349
|
+
|
350
|
+
// src/components/TextInput/styles.ts
|
351
|
+
var TextInputContainer = styled("div", {
|
352
|
+
backgroundColor: "$gray900",
|
353
|
+
padding: "$4",
|
354
|
+
borderRadius: "$sm",
|
355
|
+
boxSizing: "border-box",
|
356
|
+
border: "2px solid $gray900",
|
357
|
+
display: "flex",
|
358
|
+
alignItems: "baseline",
|
359
|
+
"&:has(input:focus)": {
|
360
|
+
borderColor: "$ignite300"
|
361
|
+
},
|
362
|
+
"&:has(input:disabled)": {
|
363
|
+
opacity: 0.5,
|
364
|
+
cursor: "not-allowed"
|
365
|
+
}
|
366
|
+
});
|
367
|
+
var Prefix = styled("span", {
|
368
|
+
fontFamily: "$default",
|
369
|
+
fontSize: "$sm",
|
370
|
+
color: "$gray400",
|
371
|
+
fontWeight: "regular"
|
372
|
+
});
|
373
|
+
var Input = styled("input", {
|
374
|
+
fontFamily: "$default",
|
375
|
+
fontSize: "$sm",
|
376
|
+
color: "$white",
|
377
|
+
fontWeight: "regular",
|
378
|
+
background: "transparent",
|
379
|
+
border: 0,
|
380
|
+
width: "100%",
|
381
|
+
"&:focus": {
|
382
|
+
outline: 0
|
383
|
+
},
|
384
|
+
"&:disabled": {
|
385
|
+
cursor: "not-allowed"
|
386
|
+
},
|
387
|
+
"&:placeholder": {
|
388
|
+
color: "$gray400"
|
389
|
+
}
|
390
|
+
});
|
391
|
+
|
392
|
+
// src/components/TextInput/index.tsx
|
393
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
394
|
+
function TextInput(_a) {
|
395
|
+
var _b = _a, { prefix } = _b, props = __objRest(_b, ["prefix"]);
|
396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(TextInputContainer, { children: [
|
397
|
+
!!prefix && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Prefix, { children: prefix }),
|
398
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Input, __spreadValues({}, props))
|
399
|
+
] });
|
400
|
+
}
|
401
|
+
TextInput.displayName = "TextInput";
|
402
|
+
|
403
|
+
// src/components/TextArea.tsx
|
404
|
+
var TextArea = styled("textarea", {
|
405
|
+
backgroundColor: "$gray900",
|
406
|
+
padding: "$4",
|
407
|
+
borderRadius: "$sm",
|
408
|
+
boxSizing: "border-box",
|
409
|
+
border: "2px solid $gray900",
|
410
|
+
fontFamily: "$default",
|
411
|
+
fontSize: "$sm",
|
412
|
+
color: "$white",
|
413
|
+
fontWeight: "$regular",
|
414
|
+
resize: "vertical",
|
415
|
+
minHeight: 80,
|
416
|
+
"&:focus": {
|
417
|
+
outline: "none",
|
418
|
+
borderColor: "$ignite300"
|
419
|
+
},
|
420
|
+
"&:disabled": {
|
421
|
+
opacity: 0.5,
|
422
|
+
cursor: "not-allowed"
|
423
|
+
},
|
424
|
+
"&:placeholder": {
|
425
|
+
color: "$gray400"
|
426
|
+
}
|
427
|
+
});
|
428
|
+
TextArea.displayName = "TextArea";
|
429
|
+
|
430
|
+
// src/components/Checkbox/index.tsx
|
431
|
+
var import_phosphor_react2 = require("phosphor-react");
|
432
|
+
|
433
|
+
// src/components/Checkbox/styles.ts
|
434
|
+
var Checkbox = __toESM(require("@radix-ui/react-checkbox"));
|
435
|
+
var CheckboxContainer = styled(Checkbox.Root, {
|
436
|
+
all: "unset",
|
437
|
+
// Como é um botão, all unset tirará borda, background, etc
|
438
|
+
width: "$6",
|
439
|
+
height: "$6",
|
440
|
+
backgroundColor: "$gray900",
|
441
|
+
borderRadius: "$xs",
|
442
|
+
cursor: "pointer",
|
443
|
+
overflow: "hidden",
|
444
|
+
boxSizing: "border-box",
|
445
|
+
display: "flex",
|
446
|
+
justifyContent: "center",
|
447
|
+
alignItems: "center",
|
448
|
+
border: "2px solid $gray900",
|
449
|
+
'&[data-state="checked"]': {
|
450
|
+
backgroundColor: "$ignite300"
|
451
|
+
},
|
452
|
+
"&:focus": {
|
453
|
+
border: "2px solid $ignite300"
|
454
|
+
}
|
455
|
+
});
|
456
|
+
var slideIn = keyframes({
|
457
|
+
from: {
|
458
|
+
transform: "translateY(-100%)"
|
459
|
+
},
|
460
|
+
to: {
|
461
|
+
transform: "translateY(0)"
|
462
|
+
}
|
463
|
+
});
|
464
|
+
var slideOut = keyframes({
|
465
|
+
from: {
|
466
|
+
transform: "translateY(0)"
|
467
|
+
},
|
468
|
+
to: {
|
469
|
+
transform: "translateY(-100%)"
|
470
|
+
}
|
471
|
+
});
|
472
|
+
var CheckboxIndicator = styled(Checkbox.Indicator, {
|
473
|
+
color: "white",
|
474
|
+
width: "$4",
|
475
|
+
height: "$4",
|
476
|
+
'&[data-state="checked"]': {
|
477
|
+
animation: `${slideIn} 200ms ease-out`
|
478
|
+
},
|
479
|
+
'&[data-state="unchecked"]': {
|
480
|
+
animation: `${slideOut} 200ms ease-out`
|
481
|
+
}
|
482
|
+
});
|
483
|
+
|
484
|
+
// src/components/Checkbox/index.tsx
|
485
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
486
|
+
function Checkbox2(props) {
|
487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CheckboxContainer, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CheckboxIndicator, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_phosphor_react2.Check, { weight: "bold" }) }) }));
|
488
|
+
}
|
489
|
+
Checkbox2.displayName = "Checkbox";
|
490
|
+
|
491
|
+
// src/components/MultiStep/styles.ts
|
492
|
+
var MultistepContainer = styled("div", {});
|
493
|
+
var Label = styled(Text, {
|
494
|
+
color: "$gray200",
|
495
|
+
defaultVariants: {
|
496
|
+
size: "xs"
|
497
|
+
}
|
498
|
+
});
|
499
|
+
var Steps = styled("div", {
|
500
|
+
display: "grid",
|
501
|
+
gap: "$2",
|
502
|
+
marginTop: "$1",
|
503
|
+
gridTemplateColumns: "repeat(var(--steps-size), 1fr)"
|
504
|
+
});
|
505
|
+
var Step = styled("div", {
|
506
|
+
height: "$1",
|
507
|
+
borderRadius: "$px",
|
508
|
+
backgroundColor: "$gray600",
|
509
|
+
variants: {
|
510
|
+
active: {
|
511
|
+
true: {
|
512
|
+
backgroundColor: "$gray100"
|
513
|
+
}
|
514
|
+
}
|
515
|
+
}
|
516
|
+
});
|
517
|
+
var Full = styled("div", {});
|
518
|
+
|
519
|
+
// src/components/MultiStep/index.tsx
|
520
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
521
|
+
function MultiStep({ size, currentStep = 1 }) {
|
522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(MultistepContainer, { children: [
|
523
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Label, { children: [
|
524
|
+
"Passo ",
|
525
|
+
currentStep,
|
526
|
+
" de ",
|
527
|
+
size
|
528
|
+
] }),
|
529
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Steps, { css: { "--steps-size": size }, children: Array.from({ length: size }, (_, i) => i + 1).map((step) => {
|
530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Step, { active: currentStep >= step }, step);
|
531
|
+
}) })
|
532
|
+
] });
|
533
|
+
}
|
534
|
+
MultiStep.displayName = "MultiStep";
|
535
|
+
// Annotate the CommonJS export names for ESM import in node:
|
536
|
+
0 && (module.exports = {
|
537
|
+
Avatar,
|
538
|
+
Box,
|
539
|
+
Button,
|
540
|
+
Checkbox,
|
541
|
+
Heading,
|
542
|
+
MultiStep,
|
543
|
+
Text,
|
544
|
+
TextArea,
|
545
|
+
TextInput
|
546
|
+
});
|