@yamada-ui/number-input 0.3.18 → 0.3.20
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/{chunk-RFBCX25F.mjs → chunk-NDEQKLFJ.mjs} +4 -4
- package/dist/index.js +4 -4
- package/dist/index.mjs +1 -1
- package/dist/number-input.d.mts +10 -10
- package/dist/number-input.d.ts +10 -10
- package/dist/number-input.js +4 -4
- package/dist/number-input.mjs +1 -1
- package/package.json +4 -4
|
@@ -487,7 +487,7 @@ var NumberInputField = forwardRef(
|
|
|
487
487
|
ui.input,
|
|
488
488
|
{
|
|
489
489
|
ref,
|
|
490
|
-
className: cx("ui-number-
|
|
490
|
+
className: cx("ui-number-input__field", className),
|
|
491
491
|
__css: css,
|
|
492
492
|
...rest
|
|
493
493
|
}
|
|
@@ -512,7 +512,7 @@ var NumberInputAddon = forwardRef(
|
|
|
512
512
|
ui.div,
|
|
513
513
|
{
|
|
514
514
|
ref,
|
|
515
|
-
className: cx("ui-number-
|
|
515
|
+
className: cx("ui-number-input__addon", className),
|
|
516
516
|
"aria-hidden": true,
|
|
517
517
|
__css: css,
|
|
518
518
|
...rest
|
|
@@ -540,7 +540,7 @@ var NumberIncrementStepper = forwardRef(
|
|
|
540
540
|
return /* @__PURE__ */ jsx(
|
|
541
541
|
Stepper,
|
|
542
542
|
{
|
|
543
|
-
className: cx("ui-number-
|
|
543
|
+
className: cx("ui-number-input__stepper--up", className),
|
|
544
544
|
...getIncrementProps(rest, ref),
|
|
545
545
|
__css: css,
|
|
546
546
|
children: children != null ? children : /* @__PURE__ */ jsx(ChevronIcon, { __css: { transform: "rotate(180deg)" } })
|
|
@@ -555,7 +555,7 @@ var NumberDecrementStepper = forwardRef(
|
|
|
555
555
|
return /* @__PURE__ */ jsx(
|
|
556
556
|
Stepper,
|
|
557
557
|
{
|
|
558
|
-
className: cx("ui-number-
|
|
558
|
+
className: cx("ui-number-input__stepper--down", className),
|
|
559
559
|
...getDecrementProps(rest, ref),
|
|
560
560
|
__css: css,
|
|
561
561
|
children: children != null ? children : /* @__PURE__ */ jsx(ChevronIcon, {})
|
package/dist/index.js
CHANGED
|
@@ -489,7 +489,7 @@ var NumberInputField = (0, import_core.forwardRef)(
|
|
|
489
489
|
import_core.ui.input,
|
|
490
490
|
{
|
|
491
491
|
ref,
|
|
492
|
-
className: (0, import_utils.cx)("ui-number-
|
|
492
|
+
className: (0, import_utils.cx)("ui-number-input__field", className),
|
|
493
493
|
__css: css,
|
|
494
494
|
...rest
|
|
495
495
|
}
|
|
@@ -514,7 +514,7 @@ var NumberInputAddon = (0, import_core.forwardRef)(
|
|
|
514
514
|
import_core.ui.div,
|
|
515
515
|
{
|
|
516
516
|
ref,
|
|
517
|
-
className: (0, import_utils.cx)("ui-number-
|
|
517
|
+
className: (0, import_utils.cx)("ui-number-input__addon", className),
|
|
518
518
|
"aria-hidden": true,
|
|
519
519
|
__css: css,
|
|
520
520
|
...rest
|
|
@@ -542,7 +542,7 @@ var NumberIncrementStepper = (0, import_core.forwardRef)(
|
|
|
542
542
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
543
543
|
Stepper,
|
|
544
544
|
{
|
|
545
|
-
className: (0, import_utils.cx)("ui-number-
|
|
545
|
+
className: (0, import_utils.cx)("ui-number-input__stepper--up", className),
|
|
546
546
|
...getIncrementProps(rest, ref),
|
|
547
547
|
__css: css,
|
|
548
548
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.ChevronIcon, { __css: { transform: "rotate(180deg)" } })
|
|
@@ -557,7 +557,7 @@ var NumberDecrementStepper = (0, import_core.forwardRef)(
|
|
|
557
557
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
558
558
|
Stepper,
|
|
559
559
|
{
|
|
560
|
-
className: (0, import_utils.cx)("ui-number-
|
|
560
|
+
className: (0, import_utils.cx)("ui-number-input__stepper--down", className),
|
|
561
561
|
...getDecrementProps(rest, ref),
|
|
562
562
|
__css: css,
|
|
563
563
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.ChevronIcon, {})
|
package/dist/index.mjs
CHANGED
package/dist/number-input.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import { UseCounterProps } from '@yamada-ui/use-counter';
|
|
|
5
5
|
import { PropGetter } from '@yamada-ui/utils';
|
|
6
6
|
import { InputHTMLAttributes } from 'react';
|
|
7
7
|
|
|
8
|
-
type ValidityState =
|
|
8
|
+
type ValidityState = "rangeUnderflow" | "rangeOverflow";
|
|
9
9
|
type UseNumberInputProps = UseFormControlProps<HTMLInputElement> & UseCounterProps & {
|
|
10
10
|
/**
|
|
11
11
|
* The HTML `name` attribute used for forms.
|
|
@@ -17,13 +17,13 @@ type UseNumberInputProps = UseFormControlProps<HTMLInputElement> & UseCounterPro
|
|
|
17
17
|
*
|
|
18
18
|
* @default 'decimal'
|
|
19
19
|
*/
|
|
20
|
-
inputMode?: InputHTMLAttributes<any>[
|
|
20
|
+
inputMode?: InputHTMLAttributes<any>["inputMode"];
|
|
21
21
|
/**
|
|
22
22
|
* The pattern used to check the <input> element's value against on form submission.
|
|
23
23
|
*
|
|
24
24
|
* @default '[0-9]*(.[0-9]+)?'
|
|
25
25
|
*/
|
|
26
|
-
pattern?: InputHTMLAttributes<any>[
|
|
26
|
+
pattern?: InputHTMLAttributes<any>["pattern"];
|
|
27
27
|
/**
|
|
28
28
|
* If `true`, the input will be focused as you increment or decrement the value with the stepper.
|
|
29
29
|
*
|
|
@@ -89,11 +89,11 @@ type NumberInputOptions = {
|
|
|
89
89
|
/**
|
|
90
90
|
* Props for container element.
|
|
91
91
|
*/
|
|
92
|
-
containerProps?: HTMLUIProps<
|
|
92
|
+
containerProps?: HTMLUIProps<"div">;
|
|
93
93
|
/**
|
|
94
94
|
* Props for addon component.
|
|
95
95
|
*/
|
|
96
|
-
addonProps?: HTMLUIProps<
|
|
96
|
+
addonProps?: HTMLUIProps<"div">;
|
|
97
97
|
/**
|
|
98
98
|
* Props for increment component.
|
|
99
99
|
*/
|
|
@@ -105,15 +105,15 @@ type NumberInputOptions = {
|
|
|
105
105
|
/**
|
|
106
106
|
* The border color when the input is focused.
|
|
107
107
|
*/
|
|
108
|
-
focusBorderColor?: ColorModeToken<CSS.Property.BorderColor,
|
|
108
|
+
focusBorderColor?: ColorModeToken<CSS.Property.BorderColor, "colors">;
|
|
109
109
|
/**
|
|
110
110
|
* The border color when the input is invalid.
|
|
111
111
|
*/
|
|
112
|
-
errorBorderColor?: ColorModeToken<CSS.Property.BorderColor,
|
|
112
|
+
errorBorderColor?: ColorModeToken<CSS.Property.BorderColor, "colors">;
|
|
113
113
|
};
|
|
114
|
-
type NumberInputProps = Omit<HTMLUIProps<
|
|
114
|
+
type NumberInputProps = Omit<HTMLUIProps<"input">, "disabled" | "required" | "readOnly" | "size" | "onChange"> & ThemeProps<"NumberInput"> & Omit<UseNumberInputProps, "disabled" | "required" | "readOnly"> & NumberInputOptions;
|
|
115
115
|
declare const NumberInput: _yamada_ui_core.Component<"input", NumberInputProps>;
|
|
116
|
-
type NumberIncrementStepperProps = HTMLUIProps<
|
|
117
|
-
type NumberDecrementStepperProps = HTMLUIProps<
|
|
116
|
+
type NumberIncrementStepperProps = HTMLUIProps<"div">;
|
|
117
|
+
type NumberDecrementStepperProps = HTMLUIProps<"div">;
|
|
118
118
|
|
|
119
119
|
export { NumberInput, NumberInputProps, UseNumberInputProps, UseNumberInputReturn, useNumberInput };
|
package/dist/number-input.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { UseCounterProps } from '@yamada-ui/use-counter';
|
|
|
5
5
|
import { PropGetter } from '@yamada-ui/utils';
|
|
6
6
|
import { InputHTMLAttributes } from 'react';
|
|
7
7
|
|
|
8
|
-
type ValidityState =
|
|
8
|
+
type ValidityState = "rangeUnderflow" | "rangeOverflow";
|
|
9
9
|
type UseNumberInputProps = UseFormControlProps<HTMLInputElement> & UseCounterProps & {
|
|
10
10
|
/**
|
|
11
11
|
* The HTML `name` attribute used for forms.
|
|
@@ -17,13 +17,13 @@ type UseNumberInputProps = UseFormControlProps<HTMLInputElement> & UseCounterPro
|
|
|
17
17
|
*
|
|
18
18
|
* @default 'decimal'
|
|
19
19
|
*/
|
|
20
|
-
inputMode?: InputHTMLAttributes<any>[
|
|
20
|
+
inputMode?: InputHTMLAttributes<any>["inputMode"];
|
|
21
21
|
/**
|
|
22
22
|
* The pattern used to check the <input> element's value against on form submission.
|
|
23
23
|
*
|
|
24
24
|
* @default '[0-9]*(.[0-9]+)?'
|
|
25
25
|
*/
|
|
26
|
-
pattern?: InputHTMLAttributes<any>[
|
|
26
|
+
pattern?: InputHTMLAttributes<any>["pattern"];
|
|
27
27
|
/**
|
|
28
28
|
* If `true`, the input will be focused as you increment or decrement the value with the stepper.
|
|
29
29
|
*
|
|
@@ -89,11 +89,11 @@ type NumberInputOptions = {
|
|
|
89
89
|
/**
|
|
90
90
|
* Props for container element.
|
|
91
91
|
*/
|
|
92
|
-
containerProps?: HTMLUIProps<
|
|
92
|
+
containerProps?: HTMLUIProps<"div">;
|
|
93
93
|
/**
|
|
94
94
|
* Props for addon component.
|
|
95
95
|
*/
|
|
96
|
-
addonProps?: HTMLUIProps<
|
|
96
|
+
addonProps?: HTMLUIProps<"div">;
|
|
97
97
|
/**
|
|
98
98
|
* Props for increment component.
|
|
99
99
|
*/
|
|
@@ -105,15 +105,15 @@ type NumberInputOptions = {
|
|
|
105
105
|
/**
|
|
106
106
|
* The border color when the input is focused.
|
|
107
107
|
*/
|
|
108
|
-
focusBorderColor?: ColorModeToken<CSS.Property.BorderColor,
|
|
108
|
+
focusBorderColor?: ColorModeToken<CSS.Property.BorderColor, "colors">;
|
|
109
109
|
/**
|
|
110
110
|
* The border color when the input is invalid.
|
|
111
111
|
*/
|
|
112
|
-
errorBorderColor?: ColorModeToken<CSS.Property.BorderColor,
|
|
112
|
+
errorBorderColor?: ColorModeToken<CSS.Property.BorderColor, "colors">;
|
|
113
113
|
};
|
|
114
|
-
type NumberInputProps = Omit<HTMLUIProps<
|
|
114
|
+
type NumberInputProps = Omit<HTMLUIProps<"input">, "disabled" | "required" | "readOnly" | "size" | "onChange"> & ThemeProps<"NumberInput"> & Omit<UseNumberInputProps, "disabled" | "required" | "readOnly"> & NumberInputOptions;
|
|
115
115
|
declare const NumberInput: _yamada_ui_core.Component<"input", NumberInputProps>;
|
|
116
|
-
type NumberIncrementStepperProps = HTMLUIProps<
|
|
117
|
-
type NumberDecrementStepperProps = HTMLUIProps<
|
|
116
|
+
type NumberIncrementStepperProps = HTMLUIProps<"div">;
|
|
117
|
+
type NumberDecrementStepperProps = HTMLUIProps<"div">;
|
|
118
118
|
|
|
119
119
|
export { NumberInput, NumberInputProps, UseNumberInputProps, UseNumberInputReturn, useNumberInput };
|
package/dist/number-input.js
CHANGED
|
@@ -487,7 +487,7 @@ var NumberInputField = (0, import_core.forwardRef)(
|
|
|
487
487
|
import_core.ui.input,
|
|
488
488
|
{
|
|
489
489
|
ref,
|
|
490
|
-
className: (0, import_utils.cx)("ui-number-
|
|
490
|
+
className: (0, import_utils.cx)("ui-number-input__field", className),
|
|
491
491
|
__css: css,
|
|
492
492
|
...rest
|
|
493
493
|
}
|
|
@@ -512,7 +512,7 @@ var NumberInputAddon = (0, import_core.forwardRef)(
|
|
|
512
512
|
import_core.ui.div,
|
|
513
513
|
{
|
|
514
514
|
ref,
|
|
515
|
-
className: (0, import_utils.cx)("ui-number-
|
|
515
|
+
className: (0, import_utils.cx)("ui-number-input__addon", className),
|
|
516
516
|
"aria-hidden": true,
|
|
517
517
|
__css: css,
|
|
518
518
|
...rest
|
|
@@ -540,7 +540,7 @@ var NumberIncrementStepper = (0, import_core.forwardRef)(
|
|
|
540
540
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
541
541
|
Stepper,
|
|
542
542
|
{
|
|
543
|
-
className: (0, import_utils.cx)("ui-number-
|
|
543
|
+
className: (0, import_utils.cx)("ui-number-input__stepper--up", className),
|
|
544
544
|
...getIncrementProps(rest, ref),
|
|
545
545
|
__css: css,
|
|
546
546
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.ChevronIcon, { __css: { transform: "rotate(180deg)" } })
|
|
@@ -555,7 +555,7 @@ var NumberDecrementStepper = (0, import_core.forwardRef)(
|
|
|
555
555
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
556
556
|
Stepper,
|
|
557
557
|
{
|
|
558
|
-
className: (0, import_utils.cx)("ui-number-
|
|
558
|
+
className: (0, import_utils.cx)("ui-number-input__stepper--down", className),
|
|
559
559
|
...getDecrementProps(rest, ref),
|
|
560
560
|
__css: css,
|
|
561
561
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.ChevronIcon, {})
|
package/dist/number-input.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/number-input",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.20",
|
|
4
4
|
"description": "Yamada UI number input component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yamada",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"url": "https://github.com/hirotomoyamada/yamada-ui/issues"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@yamada-ui/core": "0.12.
|
|
38
|
+
"@yamada-ui/core": "0.12.6",
|
|
39
39
|
"@yamada-ui/utils": "0.3.3",
|
|
40
|
-
"@yamada-ui/form-control": "0.3.
|
|
41
|
-
"@yamada-ui/icon": "0.3.
|
|
40
|
+
"@yamada-ui/form-control": "0.3.19",
|
|
41
|
+
"@yamada-ui/icon": "0.3.16",
|
|
42
42
|
"@yamada-ui/use-counter": "0.3.5",
|
|
43
43
|
"@yamada-ui/use-interval": "0.2.5",
|
|
44
44
|
"@yamada-ui/use-event-listener": "0.2.5"
|