@ttoss/ui 5.1.3 → 5.1.5
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/esm/index.js +83 -68
- package/dist/index.d.ts +6 -4
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -126,12 +126,29 @@ var Badge = ({
|
|
|
126
126
|
import { Box } from "theme-ui";
|
|
127
127
|
|
|
128
128
|
// src/components/Card.tsx
|
|
129
|
-
import { Card } from "theme-ui";
|
|
129
|
+
import { Card as CardUi } from "theme-ui";
|
|
130
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
131
|
+
var Card = props => {
|
|
132
|
+
return /* @__PURE__ */jsx4(CardUi, {
|
|
133
|
+
...props,
|
|
134
|
+
sx: {
|
|
135
|
+
backgroundColor: "display.background.secondary.default",
|
|
136
|
+
borderRadius: "lg",
|
|
137
|
+
border: "md",
|
|
138
|
+
padding: [4, 5],
|
|
139
|
+
display: "flex",
|
|
140
|
+
flexDirection: "column",
|
|
141
|
+
alignItems: "center",
|
|
142
|
+
width: "fit-content",
|
|
143
|
+
...props.sx
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
};
|
|
130
147
|
|
|
131
148
|
// src/components/Checkbox.tsx
|
|
132
149
|
import * as React2 from "react";
|
|
133
150
|
import { Checkbox as CheckBoxUi } from "theme-ui";
|
|
134
|
-
import { jsx as
|
|
151
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
135
152
|
var Checkbox = React2.forwardRef(({
|
|
136
153
|
indeterminate = false,
|
|
137
154
|
...rest
|
|
@@ -146,13 +163,13 @@ var Checkbox = React2.forwardRef(({
|
|
|
146
163
|
}
|
|
147
164
|
}, [indeterminate]);
|
|
148
165
|
if (indeterminate) {
|
|
149
|
-
return /* @__PURE__ */
|
|
166
|
+
return /* @__PURE__ */jsx5("input", {
|
|
150
167
|
type: "checkbox",
|
|
151
168
|
ref: innerRef,
|
|
152
169
|
...rest
|
|
153
170
|
});
|
|
154
171
|
}
|
|
155
|
-
return /* @__PURE__ */
|
|
172
|
+
return /* @__PURE__ */jsx5(CheckBoxUi, {
|
|
156
173
|
ref: innerRef,
|
|
157
174
|
...rest
|
|
158
175
|
});
|
|
@@ -162,7 +179,7 @@ Checkbox.displayName = "Checkbox";
|
|
|
162
179
|
// src/components/CloseButton.tsx
|
|
163
180
|
import { Icon as Icon3 } from "@ttoss/react-icons";
|
|
164
181
|
import * as React3 from "react";
|
|
165
|
-
import { jsx as
|
|
182
|
+
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
166
183
|
var CloseButton = React3.forwardRef(({
|
|
167
184
|
label,
|
|
168
185
|
sx,
|
|
@@ -194,7 +211,7 @@ var CloseButton = React3.forwardRef(({
|
|
|
194
211
|
},
|
|
195
212
|
...props,
|
|
196
213
|
ref,
|
|
197
|
-
children: [label, !onlyText && /* @__PURE__ */
|
|
214
|
+
children: [label, !onlyText && /* @__PURE__ */jsx6(Icon3, {
|
|
198
215
|
icon: "close"
|
|
199
216
|
})]
|
|
200
217
|
});
|
|
@@ -204,9 +221,9 @@ CloseButton.displayName = "CloseButton";
|
|
|
204
221
|
// src/components/Container.tsx
|
|
205
222
|
import * as React4 from "react";
|
|
206
223
|
import { Container as ContainerUi } from "theme-ui";
|
|
207
|
-
import { jsx as
|
|
224
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
208
225
|
var Container = React4.forwardRef((props, ref) => {
|
|
209
|
-
return /* @__PURE__ */
|
|
226
|
+
return /* @__PURE__ */jsx7(ContainerUi, {
|
|
210
227
|
ref,
|
|
211
228
|
...props
|
|
212
229
|
});
|
|
@@ -226,7 +243,7 @@ import { Grid } from "theme-ui";
|
|
|
226
243
|
import { Heading } from "theme-ui";
|
|
227
244
|
|
|
228
245
|
// src/components/HelpText.tsx
|
|
229
|
-
import { jsx as
|
|
246
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
230
247
|
var HelpText = ({
|
|
231
248
|
sx,
|
|
232
249
|
disabled,
|
|
@@ -234,7 +251,7 @@ var HelpText = ({
|
|
|
234
251
|
...props
|
|
235
252
|
}) => {
|
|
236
253
|
const variant = ["text.help", negative ? "negative" : void 0].filter(Boolean).join(".");
|
|
237
|
-
return /* @__PURE__ */
|
|
254
|
+
return /* @__PURE__ */jsx8(Text, {
|
|
238
255
|
variant,
|
|
239
256
|
sx: {
|
|
240
257
|
fontSize: "sm",
|
|
@@ -250,9 +267,9 @@ var HelpText = ({
|
|
|
250
267
|
// src/components/IconButton.tsx
|
|
251
268
|
import * as React5 from "react";
|
|
252
269
|
import { IconButton as IconButtonUi } from "theme-ui";
|
|
253
|
-
import { jsx as
|
|
270
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
254
271
|
var IconButton = React5.forwardRef((props, ref) => {
|
|
255
|
-
return /* @__PURE__ */
|
|
272
|
+
return /* @__PURE__ */jsx9(IconButtonUi, {
|
|
256
273
|
type: "button",
|
|
257
274
|
...props,
|
|
258
275
|
ref
|
|
@@ -270,7 +287,7 @@ import * as React6 from "react";
|
|
|
270
287
|
import { Progress } from "theme-ui";
|
|
271
288
|
|
|
272
289
|
// src/components/InfiniteLinearProgress.tsx
|
|
273
|
-
import { jsx as
|
|
290
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
274
291
|
var MAX_PROGRESS = 100;
|
|
275
292
|
var InfiniteLinearProgress = () => {
|
|
276
293
|
const [progress, setProgress] = React6.useState(0);
|
|
@@ -295,7 +312,7 @@ var InfiniteLinearProgress = () => {
|
|
|
295
312
|
clearInterval(timer);
|
|
296
313
|
};
|
|
297
314
|
}, []);
|
|
298
|
-
return /* @__PURE__ */
|
|
315
|
+
return /* @__PURE__ */jsx10(Progress, {
|
|
299
316
|
max: MAX_PROGRESS,
|
|
300
317
|
value: progress,
|
|
301
318
|
role: "progressbar"
|
|
@@ -306,7 +323,7 @@ var InfiniteLinearProgress = () => {
|
|
|
306
323
|
import { Icon as Icon4 } from "@ttoss/react-icons";
|
|
307
324
|
import * as React7 from "react";
|
|
308
325
|
import { Input as InputUI } from "theme-ui";
|
|
309
|
-
import { jsx as
|
|
326
|
+
import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
310
327
|
var Input = React7.forwardRef(({
|
|
311
328
|
leadingIcon,
|
|
312
329
|
trailingIcon: trailingIconProp,
|
|
@@ -325,7 +342,7 @@ var Input = React7.forwardRef(({
|
|
|
325
342
|
padding: 0,
|
|
326
343
|
border: "none"
|
|
327
344
|
},
|
|
328
|
-
children: [leadingIcon && /* @__PURE__ */
|
|
345
|
+
children: [leadingIcon && /* @__PURE__ */jsx11(Text, {
|
|
329
346
|
sx: {
|
|
330
347
|
position: "absolute",
|
|
331
348
|
alignSelf: "center",
|
|
@@ -334,11 +351,11 @@ var Input = React7.forwardRef(({
|
|
|
334
351
|
},
|
|
335
352
|
onClick: onLeadingIconClick,
|
|
336
353
|
variant: "leading-icon",
|
|
337
|
-
children: /* @__PURE__ */
|
|
354
|
+
children: /* @__PURE__ */jsx11(Icon4, {
|
|
338
355
|
inline: true,
|
|
339
356
|
icon: leadingIcon
|
|
340
357
|
})
|
|
341
|
-
}), /* @__PURE__ */
|
|
358
|
+
}), /* @__PURE__ */jsx11(InputUI, {
|
|
342
359
|
ref,
|
|
343
360
|
sx: {
|
|
344
361
|
fontFamily: "body",
|
|
@@ -351,7 +368,7 @@ var Input = React7.forwardRef(({
|
|
|
351
368
|
},
|
|
352
369
|
className,
|
|
353
370
|
...inputProps
|
|
354
|
-
}), trailingIcon && /* @__PURE__ */
|
|
371
|
+
}), trailingIcon && /* @__PURE__ */jsx11(Text, {
|
|
355
372
|
sx: {
|
|
356
373
|
position: "absolute",
|
|
357
374
|
right: "1rem",
|
|
@@ -360,7 +377,7 @@ var Input = React7.forwardRef(({
|
|
|
360
377
|
},
|
|
361
378
|
variant: "trailing-icon",
|
|
362
379
|
onClick: onTrailingIconClick,
|
|
363
|
-
children: /* @__PURE__ */
|
|
380
|
+
children: /* @__PURE__ */jsx11(Icon4, {
|
|
364
381
|
inline: true,
|
|
365
382
|
icon: trailingIcon
|
|
366
383
|
})
|
|
@@ -373,7 +390,7 @@ Input.displayName = "Input";
|
|
|
373
390
|
import { Icon as Icon5 } from "@ttoss/react-icons";
|
|
374
391
|
import * as React8 from "react";
|
|
375
392
|
import { Input as Input2 } from "theme-ui";
|
|
376
|
-
import { jsx as
|
|
393
|
+
import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
377
394
|
var InputNumber = React8.forwardRef(({
|
|
378
395
|
sx,
|
|
379
396
|
value,
|
|
@@ -444,7 +461,7 @@ var InputNumber = React8.forwardRef(({
|
|
|
444
461
|
},
|
|
445
462
|
ref,
|
|
446
463
|
"aria-invalid": inputProps["aria-invalid"],
|
|
447
|
-
children: [/* @__PURE__ */
|
|
464
|
+
children: [/* @__PURE__ */jsx12(Input2, {
|
|
448
465
|
ref,
|
|
449
466
|
variant: "forms.inputNumber",
|
|
450
467
|
sx: sxProps,
|
|
@@ -454,7 +471,7 @@ var InputNumber = React8.forwardRef(({
|
|
|
454
471
|
},
|
|
455
472
|
value,
|
|
456
473
|
...inputProps
|
|
457
|
-
}), /* @__PURE__ */
|
|
474
|
+
}), /* @__PURE__ */jsx12(Text, {
|
|
458
475
|
sx: {
|
|
459
476
|
position: "absolute",
|
|
460
477
|
alignSelf: "center",
|
|
@@ -463,10 +480,10 @@ var InputNumber = React8.forwardRef(({
|
|
|
463
480
|
cursor: "pointer"
|
|
464
481
|
},
|
|
465
482
|
onClick: handleChangeUp,
|
|
466
|
-
children: /* @__PURE__ */
|
|
483
|
+
children: /* @__PURE__ */jsx12(Icon5, {
|
|
467
484
|
icon: "picker-down"
|
|
468
485
|
})
|
|
469
|
-
}), infoIcon && /* @__PURE__ */
|
|
486
|
+
}), infoIcon && /* @__PURE__ */jsx12(Text, {
|
|
470
487
|
sx: {
|
|
471
488
|
position: "absolute",
|
|
472
489
|
alignSelf: "center",
|
|
@@ -475,10 +492,10 @@ var InputNumber = React8.forwardRef(({
|
|
|
475
492
|
cursor: onClickInfoIcon ? "pointer" : "default"
|
|
476
493
|
},
|
|
477
494
|
onClick: onClickInfoIcon,
|
|
478
|
-
children: /* @__PURE__ */
|
|
495
|
+
children: /* @__PURE__ */jsx12(Icon5, {
|
|
479
496
|
icon: "info"
|
|
480
497
|
})
|
|
481
|
-
}), /* @__PURE__ */
|
|
498
|
+
}), /* @__PURE__ */jsx12(Text, {
|
|
482
499
|
sx: {
|
|
483
500
|
position: "absolute",
|
|
484
501
|
alignSelf: "center",
|
|
@@ -487,7 +504,7 @@ var InputNumber = React8.forwardRef(({
|
|
|
487
504
|
cursor: "pointer"
|
|
488
505
|
},
|
|
489
506
|
onClick: handleChangeDown,
|
|
490
|
-
children: /* @__PURE__ */
|
|
507
|
+
children: /* @__PURE__ */jsx12(Icon5, {
|
|
491
508
|
icon: "picker-up"
|
|
492
509
|
})
|
|
493
510
|
})]
|
|
@@ -524,7 +541,7 @@ var useHidePassInput = (defaultValue = true) => {
|
|
|
524
541
|
};
|
|
525
542
|
|
|
526
543
|
// src/components/InputPassword/InputPassword.tsx
|
|
527
|
-
import { jsx as
|
|
544
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
528
545
|
var InputPassword = React10.forwardRef(({
|
|
529
546
|
showPasswordByDefault,
|
|
530
547
|
...inputPasswordProps
|
|
@@ -534,7 +551,7 @@ var InputPassword = React10.forwardRef(({
|
|
|
534
551
|
icon,
|
|
535
552
|
inputType
|
|
536
553
|
} = useHidePassInput(!showPasswordByDefault);
|
|
537
|
-
return /* @__PURE__ */
|
|
554
|
+
return /* @__PURE__ */jsx13(Input, {
|
|
538
555
|
ref,
|
|
539
556
|
...inputPasswordProps,
|
|
540
557
|
trailingIcon: icon,
|
|
@@ -547,7 +564,7 @@ InputPassword.displayName = "InputPassword";
|
|
|
547
564
|
// src/components/Label.tsx
|
|
548
565
|
import { Icon as Icon6 } from "@ttoss/react-icons";
|
|
549
566
|
import { Label as LabelUi } from "theme-ui";
|
|
550
|
-
import { jsx as
|
|
567
|
+
import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
551
568
|
var TOOLTIP_LABEL = "tooltip";
|
|
552
569
|
var Label = ({
|
|
553
570
|
children,
|
|
@@ -564,14 +581,14 @@ var Label = ({
|
|
|
564
581
|
...sx
|
|
565
582
|
},
|
|
566
583
|
...props,
|
|
567
|
-
children: [children, tooltip && /* @__PURE__ */
|
|
584
|
+
children: [children, tooltip && /* @__PURE__ */jsx14(Text, {
|
|
568
585
|
sx: {
|
|
569
586
|
color: "currentcolor",
|
|
570
587
|
cursor: onTooltipClick ? "pointer" : void 0
|
|
571
588
|
},
|
|
572
589
|
onClick: onTooltipClick,
|
|
573
590
|
"aria-label": TOOLTIP_LABEL,
|
|
574
|
-
children: /* @__PURE__ */
|
|
591
|
+
children: /* @__PURE__ */jsx14(Icon6, {
|
|
575
592
|
inline: true,
|
|
576
593
|
icon: "info"
|
|
577
594
|
})
|
|
@@ -582,13 +599,13 @@ var Label = ({
|
|
|
582
599
|
// src/components/Link.tsx
|
|
583
600
|
import * as React11 from "react";
|
|
584
601
|
import { Link as LinkUi } from "theme-ui";
|
|
585
|
-
import { jsx as
|
|
602
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
586
603
|
var Link = React11.forwardRef(({
|
|
587
604
|
quiet,
|
|
588
605
|
className,
|
|
589
606
|
...props
|
|
590
607
|
}, ref) => {
|
|
591
|
-
return /* @__PURE__ */
|
|
608
|
+
return /* @__PURE__ */jsx15(LinkUi, {
|
|
592
609
|
className: `${quiet ? "quiet" : ""} ${className ?? ""}`,
|
|
593
610
|
...props,
|
|
594
611
|
ref
|
|
@@ -606,7 +623,7 @@ import { Radio } from "theme-ui";
|
|
|
606
623
|
import { Icon as Icon7 } from "@ttoss/react-icons";
|
|
607
624
|
import * as React12 from "react";
|
|
608
625
|
import ReactSelect, { components } from "react-select";
|
|
609
|
-
import { jsx as
|
|
626
|
+
import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
610
627
|
var Control = props => {
|
|
611
628
|
const isDisabled = props.selectProps.isDisabled;
|
|
612
629
|
const hasError = props.selectProps["aria-invalid"] === "true";
|
|
@@ -625,7 +642,7 @@ var Control = props => {
|
|
|
625
642
|
}
|
|
626
643
|
return "display.background.secondary.default";
|
|
627
644
|
})();
|
|
628
|
-
return /* @__PURE__ */
|
|
645
|
+
return /* @__PURE__ */jsx16(Box, {
|
|
629
646
|
sx: {
|
|
630
647
|
".react-select__control": {
|
|
631
648
|
borderColor,
|
|
@@ -634,7 +651,7 @@ var Control = props => {
|
|
|
634
651
|
paddingY: "2"
|
|
635
652
|
}
|
|
636
653
|
},
|
|
637
|
-
children: /* @__PURE__ */
|
|
654
|
+
children: /* @__PURE__ */jsx16(components.Control, {
|
|
638
655
|
...props
|
|
639
656
|
})
|
|
640
657
|
});
|
|
@@ -647,7 +664,7 @@ var DropdownIndicator = props => {
|
|
|
647
664
|
}
|
|
648
665
|
return "text";
|
|
649
666
|
})();
|
|
650
|
-
return /* @__PURE__ */
|
|
667
|
+
return /* @__PURE__ */jsx16(Text, {
|
|
651
668
|
sx: {
|
|
652
669
|
fontSize: "md",
|
|
653
670
|
color,
|
|
@@ -655,7 +672,7 @@ var DropdownIndicator = props => {
|
|
|
655
672
|
display: "flex",
|
|
656
673
|
alignItems: "center"
|
|
657
674
|
},
|
|
658
|
-
children: /* @__PURE__ */
|
|
675
|
+
children: /* @__PURE__ */jsx16(Icon7, {
|
|
659
676
|
icon: "picker-down"
|
|
660
677
|
})
|
|
661
678
|
});
|
|
@@ -663,7 +680,7 @@ var DropdownIndicator = props => {
|
|
|
663
680
|
var IndicatorsContainer = ({
|
|
664
681
|
children
|
|
665
682
|
}) => {
|
|
666
|
-
return /* @__PURE__ */
|
|
683
|
+
return /* @__PURE__ */jsx16(Box, {
|
|
667
684
|
sx: {
|
|
668
685
|
marginLeft: "4",
|
|
669
686
|
border: "none"
|
|
@@ -674,7 +691,7 @@ var IndicatorsContainer = ({
|
|
|
674
691
|
var Placeholder = ({
|
|
675
692
|
children
|
|
676
693
|
}) => {
|
|
677
|
-
return /* @__PURE__ */
|
|
694
|
+
return /* @__PURE__ */jsx16(Text, {
|
|
678
695
|
sx: {
|
|
679
696
|
color: "onMuted",
|
|
680
697
|
alignSelf: "center"
|
|
@@ -693,10 +710,10 @@ var SelectContainer = ({
|
|
|
693
710
|
return (
|
|
694
711
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
695
712
|
/* @__PURE__ */
|
|
696
|
-
|
|
713
|
+
jsx16(Box, {
|
|
697
714
|
sx,
|
|
698
715
|
css: css2,
|
|
699
|
-
children: /* @__PURE__ */
|
|
716
|
+
children: /* @__PURE__ */jsx16(components.SelectContainer, {
|
|
700
717
|
...props,
|
|
701
718
|
children
|
|
702
719
|
})
|
|
@@ -731,23 +748,23 @@ var ValueContainer = ({
|
|
|
731
748
|
gap: "4",
|
|
732
749
|
flex: 1
|
|
733
750
|
},
|
|
734
|
-
children: [finalLeadingIcon && /* @__PURE__ */
|
|
751
|
+
children: [finalLeadingIcon && /* @__PURE__ */jsx16(Text, {
|
|
735
752
|
sx: {
|
|
736
753
|
alignSelf: "center",
|
|
737
754
|
pointerEvents: "none",
|
|
738
755
|
lineHeight: 0,
|
|
739
756
|
fontSize: "md"
|
|
740
757
|
},
|
|
741
|
-
children: /* @__PURE__ */
|
|
758
|
+
children: /* @__PURE__ */jsx16(Icon7, {
|
|
742
759
|
icon: finalLeadingIcon
|
|
743
760
|
})
|
|
744
|
-
}), /* @__PURE__ */
|
|
761
|
+
}), /* @__PURE__ */jsx16(Flex, {
|
|
745
762
|
sx: {
|
|
746
763
|
flex: 1,
|
|
747
764
|
alignItems: "center"
|
|
748
765
|
},
|
|
749
766
|
children
|
|
750
|
-
}), (trailingIcon || hasError) && /* @__PURE__ */
|
|
767
|
+
}), (trailingIcon || hasError) && /* @__PURE__ */jsx16(Text, {
|
|
751
768
|
className: hasError ? "error-icon" : "",
|
|
752
769
|
sx: {
|
|
753
770
|
alignSelf: "center",
|
|
@@ -756,7 +773,7 @@ var ValueContainer = ({
|
|
|
756
773
|
fontSize: "md",
|
|
757
774
|
color: trailingIconColor
|
|
758
775
|
},
|
|
759
|
-
children: /* @__PURE__ */
|
|
776
|
+
children: /* @__PURE__ */jsx16(Icon7, {
|
|
760
777
|
icon: hasError ? "warning-alt" : trailingIcon
|
|
761
778
|
})
|
|
762
779
|
})]
|
|
@@ -771,7 +788,7 @@ var Select = React12.forwardRef(({
|
|
|
771
788
|
}
|
|
772
789
|
return false;
|
|
773
790
|
});
|
|
774
|
-
return /* @__PURE__ */
|
|
791
|
+
return /* @__PURE__ */jsx16(ReactSelect, {
|
|
775
792
|
ref,
|
|
776
793
|
components: {
|
|
777
794
|
Control,
|
|
@@ -807,25 +824,23 @@ import { Slider } from "theme-ui";
|
|
|
807
824
|
import { Spinner } from "theme-ui";
|
|
808
825
|
|
|
809
826
|
// src/components/Stack.tsx
|
|
810
|
-
import
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
return /* @__PURE__ */jsx16(Flex, {
|
|
814
|
-
ref,
|
|
827
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
828
|
+
var Stack = props => {
|
|
829
|
+
return /* @__PURE__ */jsx17(Flex, {
|
|
815
830
|
...props,
|
|
816
831
|
sx: {
|
|
817
832
|
flexDirection: "column",
|
|
833
|
+
alignItems: "flex-start",
|
|
818
834
|
...props.sx
|
|
819
835
|
}
|
|
820
836
|
});
|
|
821
|
-
}
|
|
822
|
-
Stack.displayName = "Stack";
|
|
837
|
+
};
|
|
823
838
|
|
|
824
839
|
// src/components/Switch.tsx
|
|
825
840
|
import { Switch as SwitchUi } from "theme-ui";
|
|
826
|
-
import { jsx as
|
|
841
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
827
842
|
var Switch = props => {
|
|
828
|
-
return /* @__PURE__ */
|
|
843
|
+
return /* @__PURE__ */jsx18(SwitchUi, {
|
|
829
844
|
...props,
|
|
830
845
|
role: "switch",
|
|
831
846
|
"aria-checked": props.checked || false,
|
|
@@ -851,10 +866,10 @@ var Switch = props => {
|
|
|
851
866
|
|
|
852
867
|
// src/components/Textarea.tsx
|
|
853
868
|
import { Icon as Icon8 } from "@ttoss/react-icons";
|
|
854
|
-
import * as
|
|
869
|
+
import * as React13 from "react";
|
|
855
870
|
import { Textarea as TextareaUI } from "theme-ui";
|
|
856
|
-
import { jsx as
|
|
857
|
-
var Textarea =
|
|
871
|
+
import { jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
872
|
+
var Textarea = React13.forwardRef(({
|
|
858
873
|
trailingIcon,
|
|
859
874
|
className,
|
|
860
875
|
sx,
|
|
@@ -868,7 +883,7 @@ var Textarea = React14.forwardRef(({
|
|
|
868
883
|
padding: 0,
|
|
869
884
|
border: "none"
|
|
870
885
|
},
|
|
871
|
-
children: [/* @__PURE__ */
|
|
886
|
+
children: [/* @__PURE__ */jsx19(TextareaUI, {
|
|
872
887
|
ref,
|
|
873
888
|
sx: {
|
|
874
889
|
fontFamily: "body",
|
|
@@ -880,13 +895,13 @@ var Textarea = React14.forwardRef(({
|
|
|
880
895
|
},
|
|
881
896
|
className,
|
|
882
897
|
...textareaProps
|
|
883
|
-
}), trailingIcon && /* @__PURE__ */
|
|
898
|
+
}), trailingIcon && /* @__PURE__ */jsx19(Text, {
|
|
884
899
|
sx: {
|
|
885
900
|
position: "absolute",
|
|
886
901
|
right: "1.25rem",
|
|
887
902
|
top: "0.75rem"
|
|
888
903
|
},
|
|
889
|
-
children: /* @__PURE__ */
|
|
904
|
+
children: /* @__PURE__ */jsx19(Icon8, {
|
|
890
905
|
inline: true,
|
|
891
906
|
icon: trailingIcon
|
|
892
907
|
})
|
|
@@ -899,16 +914,16 @@ Textarea.displayName = "Textarea";
|
|
|
899
914
|
import { BruttalFonts, BruttalTheme } from "@ttoss/theme/Bruttal";
|
|
900
915
|
import { Global, css } from "@emotion/react";
|
|
901
916
|
import { ThemeUIProvider } from "theme-ui";
|
|
902
|
-
import { Fragment, jsx as
|
|
917
|
+
import { Fragment, jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
903
918
|
var ThemeProvider = ({
|
|
904
919
|
children,
|
|
905
920
|
theme = BruttalTheme,
|
|
906
921
|
fonts = BruttalFonts
|
|
907
922
|
}) => {
|
|
908
|
-
return /* @__PURE__ */
|
|
923
|
+
return /* @__PURE__ */jsx20(Fragment, {
|
|
909
924
|
children: /* @__PURE__ */jsxs9(ThemeUIProvider, {
|
|
910
925
|
theme,
|
|
911
|
-
children: [/* @__PURE__ */
|
|
926
|
+
children: [/* @__PURE__ */jsx20(Global, {
|
|
912
927
|
styles: css`
|
|
913
928
|
${fonts.map(url => {
|
|
914
929
|
return `@import url('${url}');`;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { IconType } from '@ttoss/react-icons';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as theme_ui from 'theme-ui';
|
|
5
|
-
import { ButtonProps as ButtonProps$1, BadgeProps as BadgeProps$1, CheckboxProps as CheckboxProps$1, TextProps, IconButtonProps, InputProps as InputProps$1, LabelProps as LabelProps$1, LinkProps as LinkProps$1, SxProp, FlexProps, SwitchProps, TextareaProps as TextareaProps$1, Theme } from 'theme-ui';
|
|
6
|
-
export { BaseStyles, Box, BoxProps,
|
|
5
|
+
import { ButtonProps as ButtonProps$1, BadgeProps as BadgeProps$1, CardProps, CheckboxProps as CheckboxProps$1, TextProps, IconButtonProps, InputProps as InputProps$1, LabelProps as LabelProps$1, LinkProps as LinkProps$1, SxProp, FlexProps, SwitchProps, TextareaProps as TextareaProps$1, Theme } from 'theme-ui';
|
|
6
|
+
export { BaseStyles, Box, BoxProps, CardProps, ContainerProps, Divider, DividerProps, Flex, FlexProps, Global, Grid, GridProps, Heading, HeadingProps, IconButtonProps, Image, ImageProps, Progress as LinearProgress, ProgressProps as LinearProgressProps, Paragraph, ParagraphProps, Radio, RadioProps, Slider, SliderProps, Spinner, SpinnerProps, SwitchProps, SxProp, Text, TextProps, Theme, ThemeUIStyleObject } from 'theme-ui';
|
|
7
7
|
import { Props } from 'react-select';
|
|
8
8
|
export { Keyframes, keyframes } from '@emotion/react';
|
|
9
9
|
export { useBreakpointIndex, useResponsiveValue } from '@theme-ui/match-media';
|
|
@@ -28,6 +28,8 @@ type BadgeProps = BadgeProps$1 & {
|
|
|
28
28
|
};
|
|
29
29
|
declare const Badge: ({ icon, children, sx, chip, onDelete, ...props }: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
30
30
|
|
|
31
|
+
declare const Card: (props: CardProps) => react_jsx_runtime.JSX.Element;
|
|
32
|
+
|
|
31
33
|
interface CheckboxProps extends CheckboxProps$1 {
|
|
32
34
|
indeterminate?: boolean;
|
|
33
35
|
}
|
|
@@ -121,7 +123,7 @@ type StackProps = FlexProps;
|
|
|
121
123
|
/**
|
|
122
124
|
* A component that renders its children in a column.
|
|
123
125
|
*/
|
|
124
|
-
declare const Stack:
|
|
126
|
+
declare const Stack: (props: StackProps) => react_jsx_runtime.JSX.Element;
|
|
125
127
|
|
|
126
128
|
declare const Switch: (props: SwitchProps) => react_jsx_runtime.JSX.Element;
|
|
127
129
|
|
|
@@ -142,4 +144,4 @@ declare const ThemeProvider: ({ children, theme, fonts, }: ThemeProviderProps) =
|
|
|
142
144
|
|
|
143
145
|
declare const useTheme: () => theme_ui.ThemeUIContextValue;
|
|
144
146
|
|
|
145
|
-
export { ActionButton, type ActionButtonProps, Badge, type BadgeProps, Button, type ButtonProps, Checkbox, type CheckboxProps, CloseButton, type CloseButtonProps, Container, HelpText, type HelpTextProps, IconButton, InfiniteLinearProgress, Input, InputNumber, type InputNumberProps, InputPassword, type InputPasswordProps, type InputProps, Label, type LabelProps, Link, type LinkProps, Select, type SelectOption, type SelectOptions, type SelectProps, Stack, type StackProps, Switch, Textarea, type TextareaProps, ThemeProvider, type ThemeProviderProps, useTheme };
|
|
147
|
+
export { ActionButton, type ActionButtonProps, Badge, type BadgeProps, Button, type ButtonProps, Card, Checkbox, type CheckboxProps, CloseButton, type CloseButtonProps, Container, HelpText, type HelpTextProps, IconButton, InfiniteLinearProgress, Input, InputNumber, type InputNumberProps, InputPassword, type InputPasswordProps, type InputProps, Label, type LabelProps, Link, type LinkProps, Select, type SelectOption, type SelectOptions, type SelectProps, Stack, type StackProps, Switch, Textarea, type TextareaProps, ThemeProvider, type ThemeProviderProps, useTheme };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/ui",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.5",
|
|
4
4
|
"description": "Primitive layout, typographic, and other components for styling applications.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@theme-ui/match-media": "^0.17.1",
|
|
28
28
|
"react-select": "^5.9.0",
|
|
29
29
|
"theme-ui": "^0.17.1",
|
|
30
|
-
"@ttoss/theme": "^2.1.
|
|
30
|
+
"@ttoss/theme": "^2.1.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@emotion/react": "^11",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"react": "^19.0.0",
|
|
44
44
|
"tsup": "^8.3.5",
|
|
45
45
|
"@ttoss/config": "^1.35.2",
|
|
46
|
-
"@ttoss/
|
|
47
|
-
"@ttoss/
|
|
46
|
+
"@ttoss/react-icons": "^0.4.9",
|
|
47
|
+
"@ttoss/test-utils": "^2.1.22"
|
|
48
48
|
},
|
|
49
49
|
"keywords": [
|
|
50
50
|
"React",
|