@lets-events/react 10.1.1 → 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 +6 -0
  4. package/dist/index.d.mts +376 -6
  5. package/dist/index.d.ts +376 -6
  6. package/dist/index.js +73 -36
  7. package/dist/index.mjs +72 -36
  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 -208
  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 -280
  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/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
 
@@ -7516,6 +7531,7 @@ var CalendarButtonStyled = styled("button", {
7516
7531
  border: "none",
7517
7532
  maxWidth: "200px",
7518
7533
  padding: "0",
7534
+ cursor: "pointer",
7519
7535
  "> div > div": {
7520
7536
  paddingLeft: "1rem",
7521
7537
  "input": {
@@ -7805,7 +7821,7 @@ function Calendar(_a) {
7805
7821
  onClick: () => {
7806
7822
  setShowCalendar(false);
7807
7823
  },
7808
- typography: "buttonMedium",
7824
+ size: "medium",
7809
7825
  fontWeight: "medium",
7810
7826
  children: actionText != null ? actionText : "Aplicar"
7811
7827
  }
@@ -7902,6 +7918,19 @@ var InputStyled = styled("input", {
7902
7918
  MozAppearance: "textfield"
7903
7919
  }
7904
7920
  });
7921
+ var TimePickerButtonStyled = styled("button", {
7922
+ backgroundColor: "transparent",
7923
+ border: "none",
7924
+ maxWidth: "200px",
7925
+ padding: "0",
7926
+ cursor: "pointer",
7927
+ "> div > div": {
7928
+ paddingLeft: "1rem",
7929
+ input: {
7930
+ textAlign: "right"
7931
+ }
7932
+ }
7933
+ });
7905
7934
  var pad = (num) => String(num).padStart(2, "0");
7906
7935
  function TimePicker({
7907
7936
  selected,
@@ -7945,16 +7974,22 @@ function TimePicker({
7945
7974
  );
7946
7975
  return /* @__PURE__ */ jsxs6(TimePickerStyled, { ref: dropdownRef, children: [
7947
7976
  /* @__PURE__ */ jsx15(
7948
- TextField,
7977
+ TimePickerButtonStyled,
7949
7978
  {
7950
- value: selected,
7951
- readOnly: true,
7952
- type: "text",
7953
- placeholder: "00:00",
7954
- typography: "labelSmall",
7955
- fontWeight: "regular",
7979
+ type: "button",
7956
7980
  onClick: () => setIsOpen((prev) => !prev),
7957
- children: /* @__PURE__ */ jsx15(TextFieldSlot, { children: /* @__PURE__ */ jsx15(Icon_default, { name: "clock", size: "xl" }) })
7981
+ children: /* @__PURE__ */ jsx15(
7982
+ TextField,
7983
+ {
7984
+ value: selected,
7985
+ readOnly: true,
7986
+ type: "text",
7987
+ placeholder: "00:00",
7988
+ typography: "labelSmall",
7989
+ fontWeight: "regular",
7990
+ children: /* @__PURE__ */ jsx15(TextFieldSlot, { children: /* @__PURE__ */ jsx15(Icon_default, { name: "clock", size: "xl" }) })
7991
+ }
7992
+ )
7958
7993
  }
7959
7994
  ),
7960
7995
  isOpen && /* @__PURE__ */ jsxs6(
@@ -8094,7 +8129,7 @@ function TimePicker({
8094
8129
  setSelected(`${hours}:${minutes}`);
8095
8130
  setIsOpen(false);
8096
8131
  },
8097
- typography: "buttonMedium",
8132
+ size: "medium",
8098
8133
  fontWeight: "medium",
8099
8134
  children: "Aplicar"
8100
8135
  }
@@ -9228,6 +9263,7 @@ export {
9228
9263
  TextareaField,
9229
9264
  TextareaFieldStyle,
9230
9265
  TimePicker,
9266
+ TimePickerButtonStyled,
9231
9267
  TimePickerDropdownStyled,
9232
9268
  TimePickerFooterStyled,
9233
9269
  TimePickerStyled,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "10.1.1",
3
+ "version": "11.0.0",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",