@clickpalm/react 1.3.14 → 1.3.16
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/index.d.ts +4056 -4054
- package/dist/index.js +12 -4
- package/dist/index.mjs +12 -4
- package/package.json +61 -61
package/dist/index.js
CHANGED
|
@@ -1004,7 +1004,7 @@ var StyledLabel = styled("label", {
|
|
|
1004
1004
|
// src/components/Calendar/index.tsx
|
|
1005
1005
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1006
1006
|
calendarStyles();
|
|
1007
|
-
var Calendar2 = ({ label, onChange, defaultValue }) => {
|
|
1007
|
+
var Calendar2 = ({ label, onChange, onMonthChange, defaultValue }) => {
|
|
1008
1008
|
const [selected, setSelected] = (0, import_react4.useState)(defaultValue);
|
|
1009
1009
|
const [month, setMonth] = (0, import_react4.useState)(/* @__PURE__ */ new Date());
|
|
1010
1010
|
const [open, setOpen] = (0, import_react4.useState)(true);
|
|
@@ -1015,6 +1015,10 @@ var Calendar2 = ({ label, onChange, defaultValue }) => {
|
|
|
1015
1015
|
onChange(formatted);
|
|
1016
1016
|
}
|
|
1017
1017
|
};
|
|
1018
|
+
const handleMonthChange = (month2) => {
|
|
1019
|
+
setMonth(month2);
|
|
1020
|
+
onMonthChange && onMonthChange(month2);
|
|
1021
|
+
};
|
|
1018
1022
|
(0, import_react4.useEffect)(() => {
|
|
1019
1023
|
if (selected) {
|
|
1020
1024
|
setMonth(selected);
|
|
@@ -1030,7 +1034,7 @@ var Calendar2 = ({ label, onChange, defaultValue }) => {
|
|
|
1030
1034
|
selected,
|
|
1031
1035
|
onSelect: handleDaySelect,
|
|
1032
1036
|
month,
|
|
1033
|
-
onMonthChange:
|
|
1037
|
+
onMonthChange: handleMonthChange,
|
|
1034
1038
|
locale: import_locale.ptBR,
|
|
1035
1039
|
showOutsideDays: true,
|
|
1036
1040
|
classNames: {
|
|
@@ -1750,7 +1754,7 @@ var datePickerStyles = globalCss({
|
|
|
1750
1754
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1751
1755
|
datePickerStyles();
|
|
1752
1756
|
var oneYearMore = new Date((/* @__PURE__ */ new Date()).getFullYear() + 1, 11);
|
|
1753
|
-
var Datepicker = (0, import_react8.forwardRef)(({ label, placeholder, value, onChange, errorMessage, endDate = oneYearMore }, ref) => {
|
|
1757
|
+
var Datepicker = (0, import_react8.forwardRef)(({ label, placeholder, value, onChange, onMonthChange, errorMessage, endDate = oneYearMore }, ref) => {
|
|
1754
1758
|
const [selected, setSelected] = (0, import_react8.useState)(void 0);
|
|
1755
1759
|
const [month, setMonth] = (0, import_react8.useState)(/* @__PURE__ */ new Date());
|
|
1756
1760
|
const [open, setOpen] = (0, import_react8.useState)(false);
|
|
@@ -1765,6 +1769,10 @@ var Datepicker = (0, import_react8.forwardRef)(({ label, placeholder, value, onC
|
|
|
1765
1769
|
}
|
|
1766
1770
|
setOpen(false);
|
|
1767
1771
|
};
|
|
1772
|
+
const handleMonthChange = (month2) => {
|
|
1773
|
+
setMonth(month2);
|
|
1774
|
+
onMonthChange && onMonthChange(month2);
|
|
1775
|
+
};
|
|
1768
1776
|
(0, import_react8.useEffect)(() => {
|
|
1769
1777
|
const handleClickOutside = (event) => {
|
|
1770
1778
|
if (calendarRef.current && !calendarRef.current.contains(event.target) && inputRef.current && !inputRef.current.contains(event.target)) {
|
|
@@ -1815,7 +1823,7 @@ var Datepicker = (0, import_react8.forwardRef)(({ label, placeholder, value, onC
|
|
|
1815
1823
|
selected,
|
|
1816
1824
|
onSelect: handleDaySelect,
|
|
1817
1825
|
month,
|
|
1818
|
-
onMonthChange:
|
|
1826
|
+
onMonthChange: handleMonthChange,
|
|
1819
1827
|
locale: import_locale2.ptBR,
|
|
1820
1828
|
showOutsideDays: true,
|
|
1821
1829
|
captionLayout: "dropdown",
|
package/dist/index.mjs
CHANGED
|
@@ -934,7 +934,7 @@ var StyledLabel = styled("label", {
|
|
|
934
934
|
// src/components/Calendar/index.tsx
|
|
935
935
|
import { jsx as jsx18, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
936
936
|
calendarStyles();
|
|
937
|
-
var Calendar2 = ({ label, onChange, defaultValue }) => {
|
|
937
|
+
var Calendar2 = ({ label, onChange, onMonthChange, defaultValue }) => {
|
|
938
938
|
const [selected, setSelected] = useState(defaultValue);
|
|
939
939
|
const [month, setMonth] = useState(/* @__PURE__ */ new Date());
|
|
940
940
|
const [open, setOpen] = useState(true);
|
|
@@ -945,6 +945,10 @@ var Calendar2 = ({ label, onChange, defaultValue }) => {
|
|
|
945
945
|
onChange(formatted);
|
|
946
946
|
}
|
|
947
947
|
};
|
|
948
|
+
const handleMonthChange = (month2) => {
|
|
949
|
+
setMonth(month2);
|
|
950
|
+
onMonthChange && onMonthChange(month2);
|
|
951
|
+
};
|
|
948
952
|
useEffect(() => {
|
|
949
953
|
if (selected) {
|
|
950
954
|
setMonth(selected);
|
|
@@ -960,7 +964,7 @@ var Calendar2 = ({ label, onChange, defaultValue }) => {
|
|
|
960
964
|
selected,
|
|
961
965
|
onSelect: handleDaySelect,
|
|
962
966
|
month,
|
|
963
|
-
onMonthChange:
|
|
967
|
+
onMonthChange: handleMonthChange,
|
|
964
968
|
locale: ptBR,
|
|
965
969
|
showOutsideDays: true,
|
|
966
970
|
classNames: {
|
|
@@ -1680,7 +1684,7 @@ var datePickerStyles = globalCss({
|
|
|
1680
1684
|
import { jsx as jsx23, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1681
1685
|
datePickerStyles();
|
|
1682
1686
|
var oneYearMore = new Date((/* @__PURE__ */ new Date()).getFullYear() + 1, 11);
|
|
1683
|
-
var Datepicker = forwardRef5(({ label, placeholder, value, onChange, errorMessage, endDate = oneYearMore }, ref) => {
|
|
1687
|
+
var Datepicker = forwardRef5(({ label, placeholder, value, onChange, onMonthChange, errorMessage, endDate = oneYearMore }, ref) => {
|
|
1684
1688
|
const [selected, setSelected] = useState4(void 0);
|
|
1685
1689
|
const [month, setMonth] = useState4(/* @__PURE__ */ new Date());
|
|
1686
1690
|
const [open, setOpen] = useState4(false);
|
|
@@ -1695,6 +1699,10 @@ var Datepicker = forwardRef5(({ label, placeholder, value, onChange, errorMessag
|
|
|
1695
1699
|
}
|
|
1696
1700
|
setOpen(false);
|
|
1697
1701
|
};
|
|
1702
|
+
const handleMonthChange = (month2) => {
|
|
1703
|
+
setMonth(month2);
|
|
1704
|
+
onMonthChange && onMonthChange(month2);
|
|
1705
|
+
};
|
|
1698
1706
|
useEffect4(() => {
|
|
1699
1707
|
const handleClickOutside = (event) => {
|
|
1700
1708
|
if (calendarRef.current && !calendarRef.current.contains(event.target) && inputRef.current && !inputRef.current.contains(event.target)) {
|
|
@@ -1745,7 +1753,7 @@ var Datepicker = forwardRef5(({ label, placeholder, value, onChange, errorMessag
|
|
|
1745
1753
|
selected,
|
|
1746
1754
|
onSelect: handleDaySelect,
|
|
1747
1755
|
month,
|
|
1748
|
-
onMonthChange:
|
|
1756
|
+
onMonthChange: handleMonthChange,
|
|
1749
1757
|
locale: ptBR2,
|
|
1750
1758
|
showOutsideDays: true,
|
|
1751
1759
|
captionLayout: "dropdown",
|
package/package.json
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
2
|
+
"name": "@clickpalm/react",
|
|
3
|
+
"description": "Design System da Clikpalm",
|
|
4
|
+
"author": "Enisson Shilo",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"version": "1.3.16",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/clickpalm/clickpalm-designsystem-lib.git"
|
|
10
|
+
},
|
|
11
|
+
"main": "dist/index.js",
|
|
12
|
+
"module": "dist/index.mjs",
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": "./dist/index.mjs",
|
|
17
|
+
"require": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsup src/index.tsx --format esm,cjs --dts --external react --inject-style",
|
|
26
|
+
"dev": "tsup src/index.tsx --format esm,cjs --dts --external react --watch --inject-style"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@radix-ui/react-accordion": "^1.2.11",
|
|
30
|
+
"@radix-ui/react-avatar": "^1.0.0",
|
|
31
|
+
"@radix-ui/react-checkbox": "^1.0.0",
|
|
32
|
+
"@radix-ui/react-dialog": "^1.1.14",
|
|
33
|
+
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
34
|
+
"@radix-ui/react-icons": "^1.3.2",
|
|
35
|
+
"@radix-ui/react-one-time-password-field": "^0.1.7",
|
|
36
|
+
"@radix-ui/react-password-toggle-field": "^0.1.2",
|
|
37
|
+
"@radix-ui/react-progress": "^1.1.7",
|
|
38
|
+
"@radix-ui/react-radio-group": "^1.3.7",
|
|
39
|
+
"@radix-ui/react-select": "^2.2.4",
|
|
40
|
+
"@radix-ui/react-switch": "^1.2.5",
|
|
41
|
+
"@radix-ui/react-tabs": "^1.1.12",
|
|
42
|
+
"@radix-ui/react-toast": "^1.2.14",
|
|
43
|
+
"@radix-ui/react-tooltip": "^1.2.7",
|
|
44
|
+
"@stitches/react": "^1.2.8",
|
|
45
|
+
"date-fns": "^4.1.0",
|
|
46
|
+
"react-day-picker": "^9.7.0"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"react": "^18.0.0",
|
|
50
|
+
"react-dom": "^18.0.0"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@clickpalm/tokens": "workspace:*",
|
|
54
|
+
"@types/react": "^18.3.21",
|
|
55
|
+
"@types/react-dom": "18.0.0",
|
|
56
|
+
"tslib": "^2.8.0",
|
|
57
|
+
"tsup": "^6.2.3",
|
|
58
|
+
"typescript": "^4.8.4"
|
|
59
|
+
},
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"access": "public"
|
|
62
|
+
}
|
|
63
63
|
}
|