@lets-events/react 10.1.2 → 11.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 +2 -2
- package/.turbo/turbo-build.log +18 -19
- package/CHANGELOG.md +3 -3
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +43 -28
- package/dist/index.mjs +43 -28
- package/package.json +1 -1
- package/src/components/Alert.tsx +303 -303
- package/src/components/Avatar.tsx +55 -55
- package/src/components/Badge.tsx +128 -128
- package/src/components/Box.tsx +3 -3
- package/src/components/Button/index.tsx +12 -12
- package/src/components/Button/styledComponents.ts +275 -250
- package/src/components/ButtonGroup.tsx +484 -484
- package/src/components/Calendar/index.tsx +136 -136
- package/src/components/Calendar/styledComponents.ts +209 -209
- package/src/components/Card.tsx +69 -69
- package/src/components/CheckboxGroup.tsx +214 -214
- package/src/components/Container.tsx +39 -39
- package/src/components/Dropdown.tsx +167 -167
- package/src/components/Filter.tsx +164 -164
- package/src/components/Flex.tsx +118 -118
- package/src/components/Grid.tsx +137 -137
- package/src/components/Icon.tsx +47 -47
- package/src/components/Modal.tsx +90 -90
- package/src/components/RadioGroup.tsx +210 -210
- package/src/components/Section.tsx +33 -33
- package/src/components/Step.tsx +164 -164
- package/src/components/Switch.tsx +108 -108
- package/src/components/Text.tsx +39 -30
- package/src/components/TextField.tsx +299 -299
- package/src/components/TextareaField.tsx +101 -101
- package/src/components/TimePicker.tsx +298 -298
- package/src/components/Toast/components/ToastItem.tsx +41 -41
- package/src/components/Toast/components/ToastProvider.tsx +63 -63
- package/src/components/Toast/hooks/useToast.ts +12 -12
- package/src/components/Toast/index.tsx +5 -5
- package/src/components/Toast/styles/index.ts +135 -135
- package/src/components/Toast/types/index.ts +46 -46
- package/src/components/Tooltip/index.tsx +66 -66
- package/src/components/Tooltip/styles.ts +77 -77
- package/src/hooks/useOnClickOutside.tsx +20 -20
- package/src/index.tsx +33 -33
- package/src/styles/index.ts +38 -38
- package/src/types/typographyValues.ts +178 -178
- package/tsconfig.json +3 -3
package/.eslintrc.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@lets-events/eslint-config"
|
|
1
|
+
{
|
|
2
|
+
"extends": "@lets-events/eslint-config"
|
|
3
3
|
}
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[34mCLI[39m
|
|
7
|
-
[34mCLI[39m
|
|
8
|
-
[34mCLI[39m
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[32mESM[39m
|
|
13
|
-
[
|
|
14
|
-
[32mCJS[39m
|
|
15
|
-
[
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
DTS dist/index.d.ts 347.67 KB
|
|
1
|
+
|
|
2
|
+
> @lets-events/react@11.0.0 build
|
|
3
|
+
> tsup src/index.tsx --format esm,cjs --dts --external react
|
|
4
|
+
|
|
5
|
+
[34mCLI[39m Building entry: src/index.tsx
|
|
6
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
+
[34mCLI[39m tsup v8.4.0
|
|
8
|
+
[34mCLI[39m Target: es6
|
|
9
|
+
[34mESM[39m Build start
|
|
10
|
+
[34mCJS[39m Build start
|
|
11
|
+
[32mESM[39m [1mdist\index.mjs [22m[32m275.49 KB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 209ms
|
|
13
|
+
[32mCJS[39m [1mdist\index.js [22m[32m283.94 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 209ms
|
|
15
|
+
[34mDTS[39m Build start
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 3499ms
|
|
17
|
+
[32mDTS[39m [1mdist\index.d.mts [22m[32m347.68 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist\index.d.ts [22m[32m347.68 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -8,7 +8,7 @@ import * as react from 'react';
|
|
|
8
8
|
import react__default, { ComponentProps, ElementType, ReactNode } from 'react';
|
|
9
9
|
import * as _radix_ui_themes from '@radix-ui/themes';
|
|
10
10
|
import { TextField as TextField$1, RadioGroup as RadioGroup$1, CheckboxGroup as CheckboxGroup$1, DropdownMenu as DropdownMenu$1, AlertDialog, Switch as Switch$1 } from '@radix-ui/themes';
|
|
11
|
-
import {
|
|
11
|
+
import { Colors } from '@lets-events/tokens';
|
|
12
12
|
import { MaskOptions, format, unformat } from '@react-input/mask';
|
|
13
13
|
import { Dialog } from 'radix-ui';
|
|
14
14
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
@@ -402,17 +402,17 @@ declare const TextStyle: _stitches_react_types_styled_component.StyledComponent<
|
|
|
402
402
|
transition: "transitions";
|
|
403
403
|
zIndex: "zIndices";
|
|
404
404
|
}, {}>>;
|
|
405
|
-
type TextProps = ComponentProps<typeof TextStyle> & {
|
|
405
|
+
type TextProps = Omit<ComponentProps<typeof TextStyle>, "color"> & {
|
|
406
406
|
as?: ElementType;
|
|
407
407
|
asChild?: boolean;
|
|
408
|
-
|
|
408
|
+
color?: keyof Colors;
|
|
409
409
|
};
|
|
410
|
-
declare function Text({ ...props }: TextProps): react_jsx_runtime.JSX.Element;
|
|
410
|
+
declare function Text({ color, ...props }: TextProps): react_jsx_runtime.JSX.Element;
|
|
411
411
|
|
|
412
412
|
declare const ButtonStyled: _stitches_react_types_styled_component.StyledComponent<react.ForwardRefExoticComponent<_radix_ui_themes.ButtonProps & react.RefAttributes<HTMLButtonElement>>, {
|
|
413
413
|
color?: "info" | "warning" | "purple" | "white" | "brand" | "error" | "success" | "neutral" | undefined;
|
|
414
414
|
variant?: "text" | "contained" | "outlined" | undefined;
|
|
415
|
-
|
|
415
|
+
size?: "medium" | "small" | "large" | "extraSmall" | undefined;
|
|
416
416
|
fontWeight?: "bold" | "medium" | "regular" | "semibold" | undefined;
|
|
417
417
|
outlinedBgColor?: "transparent" | "neutral" | undefined;
|
|
418
418
|
radii?: "full" | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import * as react from 'react';
|
|
|
8
8
|
import react__default, { ComponentProps, ElementType, ReactNode } from 'react';
|
|
9
9
|
import * as _radix_ui_themes from '@radix-ui/themes';
|
|
10
10
|
import { TextField as TextField$1, RadioGroup as RadioGroup$1, CheckboxGroup as CheckboxGroup$1, DropdownMenu as DropdownMenu$1, AlertDialog, Switch as Switch$1 } from '@radix-ui/themes';
|
|
11
|
-
import {
|
|
11
|
+
import { Colors } from '@lets-events/tokens';
|
|
12
12
|
import { MaskOptions, format, unformat } from '@react-input/mask';
|
|
13
13
|
import { Dialog } from 'radix-ui';
|
|
14
14
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
@@ -402,17 +402,17 @@ declare const TextStyle: _stitches_react_types_styled_component.StyledComponent<
|
|
|
402
402
|
transition: "transitions";
|
|
403
403
|
zIndex: "zIndices";
|
|
404
404
|
}, {}>>;
|
|
405
|
-
type TextProps = ComponentProps<typeof TextStyle> & {
|
|
405
|
+
type TextProps = Omit<ComponentProps<typeof TextStyle>, "color"> & {
|
|
406
406
|
as?: ElementType;
|
|
407
407
|
asChild?: boolean;
|
|
408
|
-
|
|
408
|
+
color?: keyof Colors;
|
|
409
409
|
};
|
|
410
|
-
declare function Text({ ...props }: TextProps): react_jsx_runtime.JSX.Element;
|
|
410
|
+
declare function Text({ color, ...props }: TextProps): react_jsx_runtime.JSX.Element;
|
|
411
411
|
|
|
412
412
|
declare const ButtonStyled: _stitches_react_types_styled_component.StyledComponent<react.ForwardRefExoticComponent<_radix_ui_themes.ButtonProps & react.RefAttributes<HTMLButtonElement>>, {
|
|
413
413
|
color?: "info" | "warning" | "purple" | "white" | "brand" | "error" | "success" | "neutral" | undefined;
|
|
414
414
|
variant?: "text" | "contained" | "outlined" | undefined;
|
|
415
|
-
|
|
415
|
+
size?: "medium" | "small" | "large" | "extraSmall" | undefined;
|
|
416
416
|
fontWeight?: "bold" | "medium" | "regular" | "semibold" | undefined;
|
|
417
417
|
outlinedBgColor?: "transparent" | "neutral" | undefined;
|
|
418
418
|
radii?: "full" | undefined;
|
package/dist/index.js
CHANGED
|
@@ -1620,24 +1620,6 @@ var typographyValues = {
|
|
|
1620
1620
|
lineHeight: "$labelExtraSmall"
|
|
1621
1621
|
}
|
|
1622
1622
|
};
|
|
1623
|
-
var typographyButtonValues = {
|
|
1624
|
-
buttonLarge: {
|
|
1625
|
-
fontSize: "$buttonLarge",
|
|
1626
|
-
lineHeight: "$buttonLarge"
|
|
1627
|
-
},
|
|
1628
|
-
buttonMedium: {
|
|
1629
|
-
fontSize: "$buttonMedium",
|
|
1630
|
-
lineHeight: "$buttonMedium"
|
|
1631
|
-
},
|
|
1632
|
-
buttonSmall: {
|
|
1633
|
-
fontSize: "$buttonSmall",
|
|
1634
|
-
lineHeight: "$buttonSmall"
|
|
1635
|
-
},
|
|
1636
|
-
buttonExtraSmall: {
|
|
1637
|
-
fontSize: "$buttonExtraSmall",
|
|
1638
|
-
lineHeight: "$buttonExtraSmall"
|
|
1639
|
-
}
|
|
1640
|
-
};
|
|
1641
1623
|
var typographyLabelValues = {
|
|
1642
1624
|
labelLarge: {
|
|
1643
1625
|
fontSize: "$labelLarge",
|
|
@@ -1662,7 +1644,7 @@ var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
|
1662
1644
|
var TextStyle = styled(import_themes.Text, {
|
|
1663
1645
|
fontFamily: "$default",
|
|
1664
1646
|
lineHeight: "$base",
|
|
1665
|
-
color: "$
|
|
1647
|
+
color: "$grey950",
|
|
1666
1648
|
variants: {
|
|
1667
1649
|
typography: typographyValues,
|
|
1668
1650
|
fontWeight: {
|
|
@@ -1674,8 +1656,15 @@ var TextStyle = styled(import_themes.Text, {
|
|
|
1674
1656
|
}
|
|
1675
1657
|
});
|
|
1676
1658
|
function Text(_a) {
|
|
1677
|
-
var props = __objRest(
|
|
1678
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1659
|
+
var _b = _a, { color } = _b, props = __objRest(_b, ["color"]);
|
|
1660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1661
|
+
TextStyle,
|
|
1662
|
+
__spreadProps(__spreadValues({}, props), {
|
|
1663
|
+
css: __spreadValues({
|
|
1664
|
+
color: color ? "$" + color : "$grey950"
|
|
1665
|
+
}, props.css)
|
|
1666
|
+
})
|
|
1667
|
+
);
|
|
1679
1668
|
}
|
|
1680
1669
|
|
|
1681
1670
|
// src/components/Button/styledComponents.ts
|
|
@@ -1696,7 +1685,7 @@ var ButtonStyled = styled(import_themes2.Button, {
|
|
|
1696
1685
|
alignItems: "center",
|
|
1697
1686
|
justifyContent: "center",
|
|
1698
1687
|
gap: "$10",
|
|
1699
|
-
padding: "$6 $
|
|
1688
|
+
padding: "$6 $12",
|
|
1700
1689
|
"&:disabled": {
|
|
1701
1690
|
cursor: "not-allowed",
|
|
1702
1691
|
transition: "none"
|
|
@@ -1896,7 +1885,32 @@ var ButtonStyled = styled(import_themes2.Button, {
|
|
|
1896
1885
|
}
|
|
1897
1886
|
}
|
|
1898
1887
|
},
|
|
1899
|
-
|
|
1888
|
+
size: {
|
|
1889
|
+
extraSmall: {
|
|
1890
|
+
height: "$24",
|
|
1891
|
+
fontSize: "$buttonExtraSmall",
|
|
1892
|
+
lineHeight: "$buttonExtraSmall",
|
|
1893
|
+
padding: "0 $12"
|
|
1894
|
+
},
|
|
1895
|
+
small: {
|
|
1896
|
+
height: "30px",
|
|
1897
|
+
fontSize: "$buttonSmall",
|
|
1898
|
+
lineHeight: "$buttonSmall",
|
|
1899
|
+
padding: "0 $14"
|
|
1900
|
+
},
|
|
1901
|
+
medium: {
|
|
1902
|
+
height: "40px",
|
|
1903
|
+
fontSize: "$buttonMedium",
|
|
1904
|
+
lineHeight: "$buttonMedium",
|
|
1905
|
+
padding: "0 $16"
|
|
1906
|
+
},
|
|
1907
|
+
large: {
|
|
1908
|
+
height: "48px",
|
|
1909
|
+
fontSize: "$buttonLarge",
|
|
1910
|
+
lineHeight: "$buttonLarge",
|
|
1911
|
+
padding: "0 $20"
|
|
1912
|
+
}
|
|
1913
|
+
},
|
|
1900
1914
|
fontWeight: {
|
|
1901
1915
|
regular: { fontWeight: "$regular" },
|
|
1902
1916
|
medium: { fontWeight: "$medium" },
|
|
@@ -1910,15 +1924,16 @@ var ButtonStyled = styled(import_themes2.Button, {
|
|
|
1910
1924
|
}
|
|
1911
1925
|
},
|
|
1912
1926
|
radii: {
|
|
1913
|
-
|
|
1927
|
+
full: {
|
|
1914
1928
|
borderRadius: "$full"
|
|
1915
1929
|
}
|
|
1916
1930
|
}
|
|
1917
1931
|
},
|
|
1918
1932
|
defaultVariants: {
|
|
1919
1933
|
variant: "contained",
|
|
1920
|
-
|
|
1921
|
-
|
|
1934
|
+
color: "brand",
|
|
1935
|
+
size: "medium",
|
|
1936
|
+
fontWeight: "medium"
|
|
1922
1937
|
}
|
|
1923
1938
|
});
|
|
1924
1939
|
|
|
@@ -7893,7 +7908,7 @@ function Calendar(_a) {
|
|
|
7893
7908
|
onClick: () => {
|
|
7894
7909
|
setShowCalendar(false);
|
|
7895
7910
|
},
|
|
7896
|
-
|
|
7911
|
+
size: "medium",
|
|
7897
7912
|
fontWeight: "medium",
|
|
7898
7913
|
children: actionText != null ? actionText : "Aplicar"
|
|
7899
7914
|
}
|
|
@@ -8201,7 +8216,7 @@ function TimePicker({
|
|
|
8201
8216
|
setSelected(`${hours}:${minutes}`);
|
|
8202
8217
|
setIsOpen(false);
|
|
8203
8218
|
},
|
|
8204
|
-
|
|
8219
|
+
size: "medium",
|
|
8205
8220
|
fontWeight: "medium",
|
|
8206
8221
|
children: "Aplicar"
|
|
8207
8222
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1533,24 +1533,6 @@ var typographyValues = {
|
|
|
1533
1533
|
lineHeight: "$labelExtraSmall"
|
|
1534
1534
|
}
|
|
1535
1535
|
};
|
|
1536
|
-
var typographyButtonValues = {
|
|
1537
|
-
buttonLarge: {
|
|
1538
|
-
fontSize: "$buttonLarge",
|
|
1539
|
-
lineHeight: "$buttonLarge"
|
|
1540
|
-
},
|
|
1541
|
-
buttonMedium: {
|
|
1542
|
-
fontSize: "$buttonMedium",
|
|
1543
|
-
lineHeight: "$buttonMedium"
|
|
1544
|
-
},
|
|
1545
|
-
buttonSmall: {
|
|
1546
|
-
fontSize: "$buttonSmall",
|
|
1547
|
-
lineHeight: "$buttonSmall"
|
|
1548
|
-
},
|
|
1549
|
-
buttonExtraSmall: {
|
|
1550
|
-
fontSize: "$buttonExtraSmall",
|
|
1551
|
-
lineHeight: "$buttonExtraSmall"
|
|
1552
|
-
}
|
|
1553
|
-
};
|
|
1554
1536
|
var typographyLabelValues = {
|
|
1555
1537
|
labelLarge: {
|
|
1556
1538
|
fontSize: "$labelLarge",
|
|
@@ -1575,7 +1557,7 @@ import { jsx as jsx2 } from "react/jsx-runtime";
|
|
|
1575
1557
|
var TextStyle = styled(TextRadix, {
|
|
1576
1558
|
fontFamily: "$default",
|
|
1577
1559
|
lineHeight: "$base",
|
|
1578
|
-
color: "$
|
|
1560
|
+
color: "$grey950",
|
|
1579
1561
|
variants: {
|
|
1580
1562
|
typography: typographyValues,
|
|
1581
1563
|
fontWeight: {
|
|
@@ -1587,8 +1569,15 @@ var TextStyle = styled(TextRadix, {
|
|
|
1587
1569
|
}
|
|
1588
1570
|
});
|
|
1589
1571
|
function Text(_a) {
|
|
1590
|
-
var props = __objRest(
|
|
1591
|
-
return /* @__PURE__ */ jsx2(
|
|
1572
|
+
var _b = _a, { color } = _b, props = __objRest(_b, ["color"]);
|
|
1573
|
+
return /* @__PURE__ */ jsx2(
|
|
1574
|
+
TextStyle,
|
|
1575
|
+
__spreadProps(__spreadValues({}, props), {
|
|
1576
|
+
css: __spreadValues({
|
|
1577
|
+
color: color ? "$" + color : "$grey950"
|
|
1578
|
+
}, props.css)
|
|
1579
|
+
})
|
|
1580
|
+
);
|
|
1592
1581
|
}
|
|
1593
1582
|
|
|
1594
1583
|
// src/components/Button/styledComponents.ts
|
|
@@ -1609,7 +1598,7 @@ var ButtonStyled = styled(ButtonRadix, {
|
|
|
1609
1598
|
alignItems: "center",
|
|
1610
1599
|
justifyContent: "center",
|
|
1611
1600
|
gap: "$10",
|
|
1612
|
-
padding: "$6 $
|
|
1601
|
+
padding: "$6 $12",
|
|
1613
1602
|
"&:disabled": {
|
|
1614
1603
|
cursor: "not-allowed",
|
|
1615
1604
|
transition: "none"
|
|
@@ -1809,7 +1798,32 @@ var ButtonStyled = styled(ButtonRadix, {
|
|
|
1809
1798
|
}
|
|
1810
1799
|
}
|
|
1811
1800
|
},
|
|
1812
|
-
|
|
1801
|
+
size: {
|
|
1802
|
+
extraSmall: {
|
|
1803
|
+
height: "$24",
|
|
1804
|
+
fontSize: "$buttonExtraSmall",
|
|
1805
|
+
lineHeight: "$buttonExtraSmall",
|
|
1806
|
+
padding: "0 $12"
|
|
1807
|
+
},
|
|
1808
|
+
small: {
|
|
1809
|
+
height: "30px",
|
|
1810
|
+
fontSize: "$buttonSmall",
|
|
1811
|
+
lineHeight: "$buttonSmall",
|
|
1812
|
+
padding: "0 $14"
|
|
1813
|
+
},
|
|
1814
|
+
medium: {
|
|
1815
|
+
height: "40px",
|
|
1816
|
+
fontSize: "$buttonMedium",
|
|
1817
|
+
lineHeight: "$buttonMedium",
|
|
1818
|
+
padding: "0 $16"
|
|
1819
|
+
},
|
|
1820
|
+
large: {
|
|
1821
|
+
height: "48px",
|
|
1822
|
+
fontSize: "$buttonLarge",
|
|
1823
|
+
lineHeight: "$buttonLarge",
|
|
1824
|
+
padding: "0 $20"
|
|
1825
|
+
}
|
|
1826
|
+
},
|
|
1813
1827
|
fontWeight: {
|
|
1814
1828
|
regular: { fontWeight: "$regular" },
|
|
1815
1829
|
medium: { fontWeight: "$medium" },
|
|
@@ -1823,15 +1837,16 @@ var ButtonStyled = styled(ButtonRadix, {
|
|
|
1823
1837
|
}
|
|
1824
1838
|
},
|
|
1825
1839
|
radii: {
|
|
1826
|
-
|
|
1840
|
+
full: {
|
|
1827
1841
|
borderRadius: "$full"
|
|
1828
1842
|
}
|
|
1829
1843
|
}
|
|
1830
1844
|
},
|
|
1831
1845
|
defaultVariants: {
|
|
1832
1846
|
variant: "contained",
|
|
1833
|
-
|
|
1834
|
-
|
|
1847
|
+
color: "brand",
|
|
1848
|
+
size: "medium",
|
|
1849
|
+
fontWeight: "medium"
|
|
1835
1850
|
}
|
|
1836
1851
|
});
|
|
1837
1852
|
|
|
@@ -7806,7 +7821,7 @@ function Calendar(_a) {
|
|
|
7806
7821
|
onClick: () => {
|
|
7807
7822
|
setShowCalendar(false);
|
|
7808
7823
|
},
|
|
7809
|
-
|
|
7824
|
+
size: "medium",
|
|
7810
7825
|
fontWeight: "medium",
|
|
7811
7826
|
children: actionText != null ? actionText : "Aplicar"
|
|
7812
7827
|
}
|
|
@@ -8114,7 +8129,7 @@ function TimePicker({
|
|
|
8114
8129
|
setSelected(`${hours}:${minutes}`);
|
|
8115
8130
|
setIsOpen(false);
|
|
8116
8131
|
},
|
|
8117
|
-
|
|
8132
|
+
size: "medium",
|
|
8118
8133
|
fontWeight: "medium",
|
|
8119
8134
|
children: "Aplicar"
|
|
8120
8135
|
}
|