@sebgroup/green-react 1.0.0-beta.43 → 1.0.0-beta.44
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/index.esm.js +61 -30
- package/index.umd.js +61 -30
- package/lib/accordion/accordion-item.d.ts +1 -1
- package/lib/accordion/accordion.d.ts +1 -1
- package/package.json +3 -3
package/index.esm.js
CHANGED
|
@@ -1843,6 +1843,7 @@ const ButtonGroup = ({
|
|
|
1843
1843
|
});
|
|
1844
1844
|
};
|
|
1845
1845
|
|
|
1846
|
+
/* eslint-disable-next-line */
|
|
1846
1847
|
const validateInputValue = (target, rules, setError) => {
|
|
1847
1848
|
const errorMessage = validateInputValueErrors(rules, target);
|
|
1848
1849
|
errorMessage ? setErrorInsert(setError, target.name) : setErrorRemove(setError, target.name);
|
|
@@ -1860,17 +1861,24 @@ const validateInputValueErrors = (rules, target) => {
|
|
|
1860
1861
|
|
|
1861
1862
|
return validateTextInputValues(value, rules);
|
|
1862
1863
|
};
|
|
1864
|
+
/* eslint-disable-next-line */
|
|
1865
|
+
|
|
1863
1866
|
|
|
1864
1867
|
const setErrorInsert = (setError, name) => {
|
|
1868
|
+
/* eslint-disable-next-line */
|
|
1865
1869
|
setError(errors => {
|
|
1866
1870
|
return Object.assign(Object.assign({}, errors), {
|
|
1867
1871
|
[name]: true
|
|
1868
1872
|
});
|
|
1869
1873
|
});
|
|
1870
1874
|
};
|
|
1875
|
+
/* eslint-disable-next-line */
|
|
1876
|
+
|
|
1871
1877
|
|
|
1872
1878
|
const setErrorRemove = (setError, name) => {
|
|
1879
|
+
/* eslint-disable-next-line */
|
|
1873
1880
|
setError(errors => {
|
|
1881
|
+
/* eslint-disable-next-line */
|
|
1874
1882
|
const newError = Object.assign({}, errors);
|
|
1875
1883
|
delete newError[name];
|
|
1876
1884
|
return newError;
|
|
@@ -1904,9 +1912,15 @@ const FormProvider = _a => {
|
|
|
1904
1912
|
onFormSubmit
|
|
1905
1913
|
} = _a,
|
|
1906
1914
|
props = __rest(_a, ["children", "direction", "formSize", "onSubmit", "onFormSubmit"]);
|
|
1915
|
+
/* eslint-disable-next-line */
|
|
1916
|
+
|
|
1907
1917
|
|
|
1908
1918
|
const [values, setValues] = React.useState();
|
|
1919
|
+
/* eslint-disable-next-line */
|
|
1920
|
+
|
|
1909
1921
|
const [errors, setErrors] = React.useState();
|
|
1922
|
+
/* eslint-disable-next-line */
|
|
1923
|
+
|
|
1910
1924
|
const [fields, setFields] = React.useState({});
|
|
1911
1925
|
|
|
1912
1926
|
const formSubmit = event => {
|
|
@@ -1966,21 +1980,29 @@ const FormItems = ({
|
|
|
1966
1980
|
errors
|
|
1967
1981
|
} = useFormContext();
|
|
1968
1982
|
React.useEffect(() => {
|
|
1983
|
+
/* eslint-disable-next-line */
|
|
1969
1984
|
setFields(fields => Object.assign(Object.assign({}, fields), {
|
|
1970
1985
|
[name]: validate === null || validate === void 0 ? void 0 : validate.rules
|
|
1971
1986
|
}));
|
|
1987
|
+
/* eslint-disable-next-line */
|
|
1972
1988
|
|
|
1973
1989
|
const removeValues = values => {
|
|
1990
|
+
/* eslint-disable-next-line */
|
|
1974
1991
|
const newValues = Object.assign({}, values);
|
|
1975
1992
|
delete newValues[name];
|
|
1976
1993
|
return newValues;
|
|
1977
1994
|
};
|
|
1978
1995
|
|
|
1979
1996
|
return () => {
|
|
1997
|
+
/* eslint-disable-next-line */
|
|
1980
1998
|
setFields(fields => removeValues(fields));
|
|
1999
|
+
/* eslint-disable-next-line */
|
|
2000
|
+
|
|
1981
2001
|
setValues(values => removeValues(values));
|
|
2002
|
+
/* eslint-disable-next-line */
|
|
2003
|
+
|
|
1982
2004
|
setErrors(errors => removeValues(errors));
|
|
1983
|
-
};
|
|
2005
|
+
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1984
2006
|
}, []);
|
|
1985
2007
|
|
|
1986
2008
|
const onChange = event => {
|
|
@@ -1995,6 +2017,8 @@ const FormItems = ({
|
|
|
1995
2017
|
|
|
1996
2018
|
if (type === 'checkbox') {
|
|
1997
2019
|
inputValue = checked ? value : null;
|
|
2020
|
+
/* eslint-disable-next-line */
|
|
2021
|
+
|
|
1998
2022
|
checked ? setValues(values => Object.assign(Object.assign({}, values), {
|
|
1999
2023
|
[name]: value
|
|
2000
2024
|
})) : setValues(values => Object.assign(Object.assign({}, values), {
|
|
@@ -2002,6 +2026,8 @@ const FormItems = ({
|
|
|
2002
2026
|
}));
|
|
2003
2027
|
} else {
|
|
2004
2028
|
inputValue = value;
|
|
2029
|
+
/* eslint-disable-next-line */
|
|
2030
|
+
|
|
2005
2031
|
setValues(values => Object.assign(Object.assign({}, values), {
|
|
2006
2032
|
[name]: value
|
|
2007
2033
|
}));
|
|
@@ -2014,6 +2040,8 @@ const FormItems = ({
|
|
|
2014
2040
|
checked
|
|
2015
2041
|
}, validate === null || validate === void 0 ? void 0 : validate.rules, setErrors);
|
|
2016
2042
|
};
|
|
2043
|
+
/* eslint-disable-next-line */
|
|
2044
|
+
|
|
2017
2045
|
|
|
2018
2046
|
return /*#__PURE__*/React.cloneElement(children, {
|
|
2019
2047
|
validator: (errors === null || errors === void 0 ? void 0 : errors[name]) && validate,
|
|
@@ -2166,26 +2194,24 @@ const Checkbox = _a => {
|
|
|
2166
2194
|
|
|
2167
2195
|
const inputProps = useInput(props, onChange);
|
|
2168
2196
|
const validatorClassName = validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator);
|
|
2169
|
-
return
|
|
2170
|
-
|
|
2171
|
-
|
|
2197
|
+
return jsxs("div", Object.assign({
|
|
2198
|
+
className: "form-group"
|
|
2199
|
+
}, {
|
|
2200
|
+
children: [jsxs("label", Object.assign({
|
|
2201
|
+
htmlFor: inputProps.id,
|
|
2202
|
+
className: `form-control ${validatorClassName}`
|
|
2172
2203
|
}, {
|
|
2173
|
-
children: [
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
}, {
|
|
2185
|
-
children: validator.message
|
|
2186
|
-
}))]
|
|
2187
|
-
}))
|
|
2188
|
-
});
|
|
2204
|
+
children: [label, jsx("input", Object.assign({
|
|
2205
|
+
type: "checkbox"
|
|
2206
|
+
}, inputProps, {
|
|
2207
|
+
className: validatorClassName
|
|
2208
|
+
})), jsx("i", {})]
|
|
2209
|
+
})), validator && jsx("span", Object.assign({
|
|
2210
|
+
className: "form-info"
|
|
2211
|
+
}, {
|
|
2212
|
+
children: validator.message
|
|
2213
|
+
}))]
|
|
2214
|
+
}));
|
|
2189
2215
|
};
|
|
2190
2216
|
const RadioButton = /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
2191
2217
|
var {
|
|
@@ -2364,7 +2390,8 @@ const RadioGroup = ({
|
|
|
2364
2390
|
} else {
|
|
2365
2391
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2366
2392
|
return () => {};
|
|
2367
|
-
}
|
|
2393
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2394
|
+
|
|
2368
2395
|
}, []);
|
|
2369
2396
|
return jsxs("div", Object.assign({
|
|
2370
2397
|
className: "form-group"
|
|
@@ -2475,7 +2502,7 @@ const Link = _a => {
|
|
|
2475
2502
|
role: button ? 'button' : undefined,
|
|
2476
2503
|
className: className
|
|
2477
2504
|
}, props);
|
|
2478
|
-
setAnchorProps(newProps);
|
|
2505
|
+
setAnchorProps(newProps); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2479
2506
|
}, [button]);
|
|
2480
2507
|
return jsx("a", Object.assign({}, anchorProps, {
|
|
2481
2508
|
children: children
|
|
@@ -2560,7 +2587,7 @@ function Badge(_a) {
|
|
|
2560
2587
|
if (!!customColor || !!customBackgroundColor) {
|
|
2561
2588
|
setType('');
|
|
2562
2589
|
}
|
|
2563
|
-
}, []);
|
|
2590
|
+
}, [badgeType, customColor, customBackgroundColor]);
|
|
2564
2591
|
return !isClosed ? jsxs("span", Object.assign({}, props, {
|
|
2565
2592
|
className: `badge ${type}`,
|
|
2566
2593
|
style: {
|
|
@@ -2605,16 +2632,20 @@ const useStepper = ({
|
|
|
2605
2632
|
min,
|
|
2606
2633
|
max,
|
|
2607
2634
|
step: _step
|
|
2608
|
-
});
|
|
2635
|
+
}); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2636
|
+
|
|
2609
2637
|
useEffect(() => {
|
|
2610
2638
|
if (max !== data.max) stepper.setMax(max);
|
|
2611
|
-
}, [stepper, max]);
|
|
2639
|
+
}, [stepper, max]); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2640
|
+
|
|
2612
2641
|
useEffect(() => {
|
|
2613
2642
|
if (min !== data.min) stepper.setMin(min);
|
|
2614
|
-
}, [stepper, min]);
|
|
2643
|
+
}, [stepper, min]); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2644
|
+
|
|
2615
2645
|
useEffect(() => {
|
|
2616
2646
|
if (_step !== data.step) stepper.setStep(_step || 1);
|
|
2617
|
-
}, [stepper, _step]);
|
|
2647
|
+
}, [stepper, _step]); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2648
|
+
|
|
2618
2649
|
useEffect(() => {
|
|
2619
2650
|
if (_value !== data.value) stepper.setValue(_value || 0, false);
|
|
2620
2651
|
}, [stepper, _value]);
|
|
@@ -2626,7 +2657,7 @@ const useStepper = ({
|
|
|
2626
2657
|
max,
|
|
2627
2658
|
step: _step,
|
|
2628
2659
|
onChange
|
|
2629
|
-
}, setData));
|
|
2660
|
+
}, setData)); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2630
2661
|
}, []);
|
|
2631
2662
|
return [stepper, data];
|
|
2632
2663
|
};
|
|
@@ -2962,7 +2993,7 @@ const useDatepicker = (datepickerRef, datepickerDialogRef, dateInputRef, datepic
|
|
|
2962
2993
|
if (state) setState(state);
|
|
2963
2994
|
}, options, datepickerRef.current, datepickerDialogRef.current, dateInputRef.current, datepickerTriggerRef.current));
|
|
2964
2995
|
}
|
|
2965
|
-
}, [datepicker, datepickerRef, datepickerDialogRef, dateInputRef, options]);
|
|
2996
|
+
}, [datepicker, datepickerRef, datepickerDialogRef, dateInputRef, datepickerTriggerRef, options]);
|
|
2966
2997
|
return {
|
|
2967
2998
|
datepicker,
|
|
2968
2999
|
data,
|
|
@@ -2987,7 +3018,7 @@ const Datepicker = (options = {}) => {
|
|
|
2987
3018
|
|
|
2988
3019
|
const selDateSub = (_a = datepicker.selectedDate$) === null || _a === void 0 ? void 0 : _a.subscribe(newDate => options.onChange && options.onChange(newDate));
|
|
2989
3020
|
return () => selDateSub === null || selDateSub === void 0 ? void 0 : selDateSub.unsubscribe();
|
|
2990
|
-
}, [datepicker]);
|
|
3021
|
+
}, [datepicker, options]);
|
|
2991
3022
|
|
|
2992
3023
|
const classNames = day => Object.entries({
|
|
2993
3024
|
disabled: !day.currentMonth,
|
package/index.umd.js
CHANGED
|
@@ -1849,6 +1849,7 @@
|
|
|
1849
1849
|
});
|
|
1850
1850
|
};
|
|
1851
1851
|
|
|
1852
|
+
/* eslint-disable-next-line */
|
|
1852
1853
|
const validateInputValue = (target, rules, setError) => {
|
|
1853
1854
|
const errorMessage = validateInputValueErrors(rules, target);
|
|
1854
1855
|
errorMessage ? setErrorInsert(setError, target.name) : setErrorRemove(setError, target.name);
|
|
@@ -1866,17 +1867,24 @@
|
|
|
1866
1867
|
|
|
1867
1868
|
return validateTextInputValues(value, rules);
|
|
1868
1869
|
};
|
|
1870
|
+
/* eslint-disable-next-line */
|
|
1871
|
+
|
|
1869
1872
|
|
|
1870
1873
|
const setErrorInsert = (setError, name) => {
|
|
1874
|
+
/* eslint-disable-next-line */
|
|
1871
1875
|
setError(errors => {
|
|
1872
1876
|
return Object.assign(Object.assign({}, errors), {
|
|
1873
1877
|
[name]: true
|
|
1874
1878
|
});
|
|
1875
1879
|
});
|
|
1876
1880
|
};
|
|
1881
|
+
/* eslint-disable-next-line */
|
|
1882
|
+
|
|
1877
1883
|
|
|
1878
1884
|
const setErrorRemove = (setError, name) => {
|
|
1885
|
+
/* eslint-disable-next-line */
|
|
1879
1886
|
setError(errors => {
|
|
1887
|
+
/* eslint-disable-next-line */
|
|
1880
1888
|
const newError = Object.assign({}, errors);
|
|
1881
1889
|
delete newError[name];
|
|
1882
1890
|
return newError;
|
|
@@ -1910,9 +1918,15 @@
|
|
|
1910
1918
|
onFormSubmit
|
|
1911
1919
|
} = _a,
|
|
1912
1920
|
props = __rest(_a, ["children", "direction", "formSize", "onSubmit", "onFormSubmit"]);
|
|
1921
|
+
/* eslint-disable-next-line */
|
|
1922
|
+
|
|
1913
1923
|
|
|
1914
1924
|
const [values, setValues] = React__default["default"].useState();
|
|
1925
|
+
/* eslint-disable-next-line */
|
|
1926
|
+
|
|
1915
1927
|
const [errors, setErrors] = React__default["default"].useState();
|
|
1928
|
+
/* eslint-disable-next-line */
|
|
1929
|
+
|
|
1916
1930
|
const [fields, setFields] = React__default["default"].useState({});
|
|
1917
1931
|
|
|
1918
1932
|
const formSubmit = event => {
|
|
@@ -1972,21 +1986,29 @@
|
|
|
1972
1986
|
errors
|
|
1973
1987
|
} = useFormContext();
|
|
1974
1988
|
React__default["default"].useEffect(() => {
|
|
1989
|
+
/* eslint-disable-next-line */
|
|
1975
1990
|
setFields(fields => Object.assign(Object.assign({}, fields), {
|
|
1976
1991
|
[name]: validate === null || validate === void 0 ? void 0 : validate.rules
|
|
1977
1992
|
}));
|
|
1993
|
+
/* eslint-disable-next-line */
|
|
1978
1994
|
|
|
1979
1995
|
const removeValues = values => {
|
|
1996
|
+
/* eslint-disable-next-line */
|
|
1980
1997
|
const newValues = Object.assign({}, values);
|
|
1981
1998
|
delete newValues[name];
|
|
1982
1999
|
return newValues;
|
|
1983
2000
|
};
|
|
1984
2001
|
|
|
1985
2002
|
return () => {
|
|
2003
|
+
/* eslint-disable-next-line */
|
|
1986
2004
|
setFields(fields => removeValues(fields));
|
|
2005
|
+
/* eslint-disable-next-line */
|
|
2006
|
+
|
|
1987
2007
|
setValues(values => removeValues(values));
|
|
2008
|
+
/* eslint-disable-next-line */
|
|
2009
|
+
|
|
1988
2010
|
setErrors(errors => removeValues(errors));
|
|
1989
|
-
};
|
|
2011
|
+
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1990
2012
|
}, []);
|
|
1991
2013
|
|
|
1992
2014
|
const onChange = event => {
|
|
@@ -2001,6 +2023,8 @@
|
|
|
2001
2023
|
|
|
2002
2024
|
if (type === 'checkbox') {
|
|
2003
2025
|
inputValue = checked ? value : null;
|
|
2026
|
+
/* eslint-disable-next-line */
|
|
2027
|
+
|
|
2004
2028
|
checked ? setValues(values => Object.assign(Object.assign({}, values), {
|
|
2005
2029
|
[name]: value
|
|
2006
2030
|
})) : setValues(values => Object.assign(Object.assign({}, values), {
|
|
@@ -2008,6 +2032,8 @@
|
|
|
2008
2032
|
}));
|
|
2009
2033
|
} else {
|
|
2010
2034
|
inputValue = value;
|
|
2035
|
+
/* eslint-disable-next-line */
|
|
2036
|
+
|
|
2011
2037
|
setValues(values => Object.assign(Object.assign({}, values), {
|
|
2012
2038
|
[name]: value
|
|
2013
2039
|
}));
|
|
@@ -2020,6 +2046,8 @@
|
|
|
2020
2046
|
checked
|
|
2021
2047
|
}, validate === null || validate === void 0 ? void 0 : validate.rules, setErrors);
|
|
2022
2048
|
};
|
|
2049
|
+
/* eslint-disable-next-line */
|
|
2050
|
+
|
|
2023
2051
|
|
|
2024
2052
|
return /*#__PURE__*/React__default["default"].cloneElement(children, {
|
|
2025
2053
|
validator: (errors === null || errors === void 0 ? void 0 : errors[name]) && validate,
|
|
@@ -2172,26 +2200,24 @@
|
|
|
2172
2200
|
|
|
2173
2201
|
const inputProps = useInput(props, onChange);
|
|
2174
2202
|
const validatorClassName = extract.validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator);
|
|
2175
|
-
return jsxRuntime.
|
|
2176
|
-
|
|
2177
|
-
|
|
2203
|
+
return jsxRuntime.jsxs("div", Object.assign({
|
|
2204
|
+
className: "form-group"
|
|
2205
|
+
}, {
|
|
2206
|
+
children: [jsxRuntime.jsxs("label", Object.assign({
|
|
2207
|
+
htmlFor: inputProps.id,
|
|
2208
|
+
className: `form-control ${validatorClassName}`
|
|
2178
2209
|
}, {
|
|
2179
|
-
children: [jsxRuntime.
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
}, {
|
|
2191
|
-
children: validator.message
|
|
2192
|
-
}))]
|
|
2193
|
-
}))
|
|
2194
|
-
});
|
|
2210
|
+
children: [label, jsxRuntime.jsx("input", Object.assign({
|
|
2211
|
+
type: "checkbox"
|
|
2212
|
+
}, inputProps, {
|
|
2213
|
+
className: validatorClassName
|
|
2214
|
+
})), jsxRuntime.jsx("i", {})]
|
|
2215
|
+
})), validator && jsxRuntime.jsx("span", Object.assign({
|
|
2216
|
+
className: "form-info"
|
|
2217
|
+
}, {
|
|
2218
|
+
children: validator.message
|
|
2219
|
+
}))]
|
|
2220
|
+
}));
|
|
2195
2221
|
};
|
|
2196
2222
|
const RadioButton = /*#__PURE__*/React__default["default"].forwardRef((_a, ref) => {
|
|
2197
2223
|
var {
|
|
@@ -2370,7 +2396,8 @@
|
|
|
2370
2396
|
} else {
|
|
2371
2397
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2372
2398
|
return () => {};
|
|
2373
|
-
}
|
|
2399
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2400
|
+
|
|
2374
2401
|
}, []);
|
|
2375
2402
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
2376
2403
|
className: "form-group"
|
|
@@ -2481,7 +2508,7 @@
|
|
|
2481
2508
|
role: button ? 'button' : undefined,
|
|
2482
2509
|
className: className
|
|
2483
2510
|
}, props);
|
|
2484
|
-
setAnchorProps(newProps);
|
|
2511
|
+
setAnchorProps(newProps); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2485
2512
|
}, [button]);
|
|
2486
2513
|
return jsxRuntime.jsx("a", Object.assign({}, anchorProps, {
|
|
2487
2514
|
children: children
|
|
@@ -2566,7 +2593,7 @@
|
|
|
2566
2593
|
if (!!customColor || !!customBackgroundColor) {
|
|
2567
2594
|
setType('');
|
|
2568
2595
|
}
|
|
2569
|
-
}, []);
|
|
2596
|
+
}, [badgeType, customColor, customBackgroundColor]);
|
|
2570
2597
|
return !isClosed ? jsxRuntime.jsxs("span", Object.assign({}, props, {
|
|
2571
2598
|
className: `badge ${type}`,
|
|
2572
2599
|
style: {
|
|
@@ -2611,16 +2638,20 @@
|
|
|
2611
2638
|
min,
|
|
2612
2639
|
max,
|
|
2613
2640
|
step: _step
|
|
2614
|
-
});
|
|
2641
|
+
}); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2642
|
+
|
|
2615
2643
|
React.useEffect(() => {
|
|
2616
2644
|
if (max !== data.max) stepper.setMax(max);
|
|
2617
|
-
}, [stepper, max]);
|
|
2645
|
+
}, [stepper, max]); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2646
|
+
|
|
2618
2647
|
React.useEffect(() => {
|
|
2619
2648
|
if (min !== data.min) stepper.setMin(min);
|
|
2620
|
-
}, [stepper, min]);
|
|
2649
|
+
}, [stepper, min]); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2650
|
+
|
|
2621
2651
|
React.useEffect(() => {
|
|
2622
2652
|
if (_step !== data.step) stepper.setStep(_step || 1);
|
|
2623
|
-
}, [stepper, _step]);
|
|
2653
|
+
}, [stepper, _step]); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2654
|
+
|
|
2624
2655
|
React.useEffect(() => {
|
|
2625
2656
|
if (_value !== data.value) stepper.setValue(_value || 0, false);
|
|
2626
2657
|
}, [stepper, _value]);
|
|
@@ -2632,7 +2663,7 @@
|
|
|
2632
2663
|
max,
|
|
2633
2664
|
step: _step,
|
|
2634
2665
|
onChange
|
|
2635
|
-
}, setData));
|
|
2666
|
+
}, setData)); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2636
2667
|
}, []);
|
|
2637
2668
|
return [stepper, data];
|
|
2638
2669
|
};
|
|
@@ -2968,7 +2999,7 @@
|
|
|
2968
2999
|
if (state) setState(state);
|
|
2969
3000
|
}, options, datepickerRef.current, datepickerDialogRef.current, dateInputRef.current, datepickerTriggerRef.current));
|
|
2970
3001
|
}
|
|
2971
|
-
}, [datepicker, datepickerRef, datepickerDialogRef, dateInputRef, options]);
|
|
3002
|
+
}, [datepicker, datepickerRef, datepickerDialogRef, dateInputRef, datepickerTriggerRef, options]);
|
|
2972
3003
|
return {
|
|
2973
3004
|
datepicker,
|
|
2974
3005
|
data,
|
|
@@ -2993,7 +3024,7 @@
|
|
|
2993
3024
|
|
|
2994
3025
|
const selDateSub = (_a = datepicker.selectedDate$) === null || _a === void 0 ? void 0 : _a.subscribe(newDate => options.onChange && options.onChange(newDate));
|
|
2995
3026
|
return () => selDateSub === null || selDateSub === void 0 ? void 0 : selDateSub.unsubscribe();
|
|
2996
|
-
}, [datepicker]);
|
|
3027
|
+
}, [datepicker, options]);
|
|
2997
3028
|
|
|
2998
3029
|
const classNames = day => Object.entries({
|
|
2999
3030
|
disabled: !day.currentMonth,
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebgroup/green-react",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.44",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": "^17 || ^18",
|
|
6
6
|
"react-dom": "^17 || ^18"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@sebgroup/chlorophyll": "^1.0.0-beta.
|
|
10
|
-
"@sebgroup/extract": "^1.0.0-beta.
|
|
9
|
+
"@sebgroup/chlorophyll": "^1.0.0-beta.45",
|
|
10
|
+
"@sebgroup/extract": "^1.0.0-beta.44"
|
|
11
11
|
},
|
|
12
12
|
"description": "React components built on top of @sebgroup/chlorophyll.",
|
|
13
13
|
"repository": {
|