@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.
Files changed (47) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.turbo/turbo-build.log +18 -19
  3. package/CHANGELOG.md +3 -3
  4. package/dist/index.d.mts +5 -5
  5. package/dist/index.d.ts +5 -5
  6. package/dist/index.js +43 -28
  7. package/dist/index.mjs +43 -28
  8. package/package.json +1 -1
  9. package/src/components/Alert.tsx +303 -303
  10. package/src/components/Avatar.tsx +55 -55
  11. package/src/components/Badge.tsx +128 -128
  12. package/src/components/Box.tsx +3 -3
  13. package/src/components/Button/index.tsx +12 -12
  14. package/src/components/Button/styledComponents.ts +275 -250
  15. package/src/components/ButtonGroup.tsx +484 -484
  16. package/src/components/Calendar/index.tsx +136 -136
  17. package/src/components/Calendar/styledComponents.ts +209 -209
  18. package/src/components/Card.tsx +69 -69
  19. package/src/components/CheckboxGroup.tsx +214 -214
  20. package/src/components/Container.tsx +39 -39
  21. package/src/components/Dropdown.tsx +167 -167
  22. package/src/components/Filter.tsx +164 -164
  23. package/src/components/Flex.tsx +118 -118
  24. package/src/components/Grid.tsx +137 -137
  25. package/src/components/Icon.tsx +47 -47
  26. package/src/components/Modal.tsx +90 -90
  27. package/src/components/RadioGroup.tsx +210 -210
  28. package/src/components/Section.tsx +33 -33
  29. package/src/components/Step.tsx +164 -164
  30. package/src/components/Switch.tsx +108 -108
  31. package/src/components/Text.tsx +39 -30
  32. package/src/components/TextField.tsx +299 -299
  33. package/src/components/TextareaField.tsx +101 -101
  34. package/src/components/TimePicker.tsx +298 -298
  35. package/src/components/Toast/components/ToastItem.tsx +41 -41
  36. package/src/components/Toast/components/ToastProvider.tsx +63 -63
  37. package/src/components/Toast/hooks/useToast.ts +12 -12
  38. package/src/components/Toast/index.tsx +5 -5
  39. package/src/components/Toast/styles/index.ts +135 -135
  40. package/src/components/Toast/types/index.ts +46 -46
  41. package/src/components/Tooltip/index.tsx +66 -66
  42. package/src/components/Tooltip/styles.ts +77 -77
  43. package/src/hooks/useOnClickOutside.tsx +20 -20
  44. package/src/index.tsx +33 -33
  45. package/src/styles/index.ts +38 -38
  46. package/src/types/typographyValues.ts +178 -178
  47. 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
  }
@@ -1,19 +1,18 @@
1
-
2
-
3
- > @lets-events/react@10.1.2 build
4
- > tsup src/index.tsx --format esm,cjs --dts --external react
5
-
6
- CLI Building entry: src/index.tsx
7
- CLI Using tsconfig: tsconfig.json
8
- CLI tsup v8.4.0
9
- CLI Target: es6
10
- ESM Build start
11
- CJS Build start
12
- ESM dist/index.mjs 275.16 KB
13
- ESM ⚡️ Build success in 279ms
14
- CJS dist/index.js 283.61 KB
15
- CJS ⚡️ Build success in 279ms
16
- DTS Build start
17
- DTS ⚡️ Build success in 5671ms
18
- DTS dist/index.d.mts 347.67 KB
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
+ CLI Building entry: src/index.tsx
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.4.0
8
+ CLI Target: es6
9
+ ESM Build start
10
+ CJS Build start
11
+ ESM dist\index.mjs 275.49 KB
12
+ ESM ⚡️ Build success in 209ms
13
+ CJS dist\index.js 283.94 KB
14
+ CJS ⚡️ Build success in 209ms
15
+ DTS Build start
16
+ DTS ⚡️ Build success in 3499ms
17
+ DTS dist\index.d.mts 347.68 KB
18
+ DTS dist\index.d.ts 347.68 KB
package/CHANGELOG.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # @lets-events/react
2
2
 
3
- ## 10.1.2
3
+ ## 11.0.0
4
4
 
5
- ### Patch Changes
5
+ ### Major Changes
6
6
 
7
- - Click area of timerPicker
7
+ - Fix Button Sizes & Text Color
8
8
 
9
9
  ## 10.1.1
10
10
 
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 { CSS } from '@stitches/react';
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
- css?: CSS;
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
- typography?: "buttonLarge" | "buttonMedium" | "buttonSmall" | "buttonExtraSmall" | undefined;
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 { CSS } from '@stitches/react';
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
- css?: CSS;
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
- typography?: "buttonLarge" | "buttonMedium" | "buttonSmall" | "buttonExtraSmall" | undefined;
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: "$gray100",
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(_a, []);
1678
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TextStyle, __spreadValues({}, props));
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 $16",
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
- typography: typographyButtonValues,
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
- "full": {
1927
+ full: {
1914
1928
  borderRadius: "$full"
1915
1929
  }
1916
1930
  }
1917
1931
  },
1918
1932
  defaultVariants: {
1919
1933
  variant: "contained",
1920
- typography: "buttonMedium",
1921
- color: "brand"
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
- typography: "buttonMedium",
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
- typography: "buttonMedium",
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: "$gray100",
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(_a, []);
1591
- return /* @__PURE__ */ jsx2(TextStyle, __spreadValues({}, props));
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 $16",
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
- typography: typographyButtonValues,
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
- "full": {
1840
+ full: {
1827
1841
  borderRadius: "$full"
1828
1842
  }
1829
1843
  }
1830
1844
  },
1831
1845
  defaultVariants: {
1832
1846
  variant: "contained",
1833
- typography: "buttonMedium",
1834
- color: "brand"
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
- typography: "buttonMedium",
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
- typography: "buttonMedium",
8132
+ size: "medium",
8118
8133
  fontWeight: "medium",
8119
8134
  children: "Aplicar"
8120
8135
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "10.1.2",
3
+ "version": "11.0.0",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",