@julseb-lib/react 1.0.60 → 1.0.62
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.cjs +10 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/types/components-props.d.cts +3 -1
- package/dist/types/components-props.d.ts +3 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1737,6 +1737,8 @@ declare const countries: Array<LibCountry>;
|
|
|
1737
1737
|
* @prop {number} [props.max=100] - Maximum allowed value for the counter.
|
|
1738
1738
|
* @prop {number} [props.step=1] - Increment/decrement step value.
|
|
1739
1739
|
* @prop {string} [containerClassName] - Additional CSS classes for the container.
|
|
1740
|
+
* @param props.onClickPlus - Callback function triggered when plus button is clicked
|
|
1741
|
+
* @param props.onClickMinus - Callback function triggered when minus button is clicked
|
|
1740
1742
|
* @prop {any} [props.rest] - Additional props spread to the input or span element.
|
|
1741
1743
|
*
|
|
1742
1744
|
* @returns {JSX.Element} The rendered InputCounter component.
|
package/dist/index.d.ts
CHANGED
|
@@ -1737,6 +1737,8 @@ declare const countries: Array<LibCountry>;
|
|
|
1737
1737
|
* @prop {number} [props.max=100] - Maximum allowed value for the counter.
|
|
1738
1738
|
* @prop {number} [props.step=1] - Increment/decrement step value.
|
|
1739
1739
|
* @prop {string} [containerClassName] - Additional CSS classes for the container.
|
|
1740
|
+
* @param props.onClickPlus - Callback function triggered when plus button is clicked
|
|
1741
|
+
* @param props.onClickMinus - Callback function triggered when minus button is clicked
|
|
1740
1742
|
* @prop {any} [props.rest] - Additional props spread to the input or span element.
|
|
1741
1743
|
*
|
|
1742
1744
|
* @returns {JSX.Element} The rendered InputCounter component.
|
package/dist/index.js
CHANGED
|
@@ -65967,6 +65967,8 @@ var InputCounter = ({
|
|
|
65967
65967
|
max = 100,
|
|
65968
65968
|
step = 1,
|
|
65969
65969
|
containerClassName,
|
|
65970
|
+
onClickPlus,
|
|
65971
|
+
onClickMinus,
|
|
65970
65972
|
...rest
|
|
65971
65973
|
}) => {
|
|
65972
65974
|
return /* @__PURE__ */ jsx314(
|
|
@@ -65998,7 +66000,10 @@ var InputCounter = ({
|
|
|
65998
66000
|
"aria-label": labelButtons?.minus,
|
|
65999
66001
|
tooltip: labelButtons?.minus ?? "Minus",
|
|
66000
66002
|
showTooltip: showButtonsTooltip && { offset: "xs" },
|
|
66001
|
-
onClick: () =>
|
|
66003
|
+
onClick: () => {
|
|
66004
|
+
setValue((prev) => prev - step);
|
|
66005
|
+
if (onClickMinus) onClickMinus();
|
|
66006
|
+
},
|
|
66002
66007
|
disabled: value === min
|
|
66003
66008
|
}
|
|
66004
66009
|
),
|
|
@@ -66032,7 +66037,10 @@ var InputCounter = ({
|
|
|
66032
66037
|
"aria-label": labelButtons?.plus,
|
|
66033
66038
|
tooltip: labelButtons?.plus ?? "Plus",
|
|
66034
66039
|
showTooltip: showButtonsTooltip && { offset: "xs" },
|
|
66035
|
-
onClick: () =>
|
|
66040
|
+
onClick: () => {
|
|
66041
|
+
setValue((prev) => prev + step);
|
|
66042
|
+
if (onClickPlus) onClickPlus();
|
|
66043
|
+
},
|
|
66036
66044
|
disabled: value === max
|
|
66037
66045
|
}
|
|
66038
66046
|
)
|