@gridui/number-field 1.0.0 → 1.0.3

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/README.md CHANGED
@@ -5,4 +5,4 @@ Core family. Public API: `NumberField`, `NumberFieldProps`.
5
5
  Import components from `@gridui/number-field` and load `@gridui/number-field/styles.css` after Theme.
6
6
  Load styles for any composed dependency used by this family. Applications own routes, labels, state persistence, and branding.
7
7
 
8
- See [component ownership](../../docs/component-ownership.md) and [release history](.changeset/history/).
8
+ See [component ownership](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md) and [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-core/number-field/.changeset/history).
package/dist/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  // src/number-field/number-field.tsx
2
2
  import { Button } from "@gridui/button";
3
+ import { useFormReset } from "@gridui/form";
3
4
  import { controlVariants } from "@gridui/input";
4
5
  import { cn } from "@gridui/style-utils";
5
6
  import { Minus, Plus } from "lucide-react";
6
- import { useEffect, useImperativeHandle, useRef, useState } from "react";
7
+ import { useImperativeHandle, useRef, useState } from "react";
7
8
  import { jsx, jsxs } from "react/jsx-runtime";
8
9
  var NumberField = (props) => {
9
10
  const {
@@ -34,28 +35,11 @@ var NumberField = (props) => {
34
35
  useImperativeHandle(ref, () => {
35
36
  return input.current;
36
37
  });
37
- useEffect(() => {
38
- const form = input.current?.form;
39
- if (!form || value !== void 0) {
40
- return;
38
+ useFormReset(input, () => {
39
+ if (value === void 0) {
40
+ setLocal(initial.current);
41
41
  }
42
- let mounted = true;
43
- const reset = (event) => {
44
- setTimeout(() => {
45
- if (mounted && !event.defaultPrevented) {
46
- setLocal(initial.current);
47
- }
48
- }, 0);
49
- };
50
- form.addEventListener("reset", reset);
51
- return () => {
52
- mounted = false;
53
- form.removeEventListener("reset", reset);
54
- };
55
- }, [
56
- restProps.form,
57
- value
58
- ]);
42
+ }, restProps.form);
59
43
  const change = (next) => {
60
44
  if (restProps.readOnly || restProps.disabled || input.current?.matches(":disabled")) {
61
45
  return;
@@ -83,7 +67,7 @@ var NumberField = (props) => {
83
67
  return /* @__PURE__ */ jsxs(
84
68
  "div",
85
69
  {
86
- className: "flex min-w-0 items-stretch gap-gridui-4",
70
+ className: "gridui-u-flex gridui-u-min-w-0 gridui-u-items-stretch gridui-u-gap-gridui-4",
87
71
  dir: restProps.dir,
88
72
  children: [
89
73
  /* @__PURE__ */ jsx(
@@ -115,7 +99,7 @@ var NumberField = (props) => {
115
99
  max,
116
100
  step,
117
101
  value: current ?? "",
118
- className: cn(controlVariants({ size: controlSize }), "gridui-number-field flex-1", className),
102
+ className: cn(controlVariants({ size: controlSize }), "gridui-number-field gridui-u-flex-1", className),
119
103
  onChange: (event) => {
120
104
  onChange?.(event);
121
105
  if (!event.defaultPrevented) {
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/number-field/number-field.tsx"],
4
- "sourcesContent": ["/**\n * @author WMXPY\n * @package Number Field\n * @namespace NumberField\n * @description Number Field\n */\n\nimport { Button } from \"@gridui/button\";\nimport { controlVariants } from \"@gridui/input\";\nimport { cn } from \"@gridui/style-utils\";\nimport { Minus, Plus } from \"lucide-react\";\nimport { type ComponentPropsWithRef, type FC, useEffect, useImperativeHandle, useRef, useState } from \"react\";\n\nexport type NumberFieldProps = Omit<ComponentPropsWithRef<\"input\">, \"type\" | \"value\" | \"defaultValue\" | \"min\" | \"max\" | \"step\" | \"size\"> & {\n readonly value?: number | null;\n readonly defaultValue?: number | null;\n readonly min?: number;\n readonly max?: number;\n readonly step?: number;\n readonly controlSize?: \"standard\" | \"small\";\n readonly incrementLabel: string;\n readonly decrementLabel: string;\n readonly onValueChange?: (value: number | null) => void;\n};\n\nexport const NumberField: FC<NumberFieldProps> = (props: NumberFieldProps) => {\n const { value, defaultValue = null, min, max, step = 1, controlSize = \"standard\", incrementLabel, decrementLabel,\n onValueChange, onChange, className, ref, ...restProps } = props;\n if (!Number.isFinite(step) || step <= 0 || (min !== undefined && !Number.isFinite(min)) || (max !== undefined && !Number.isFinite(max))\n || (min !== undefined && max !== undefined && min > max)\n || (value !== undefined && value !== null && !Number.isFinite(value))\n || (defaultValue !== null && !Number.isFinite(defaultValue))) {\n throw new RangeError(\"NumberField requires finite values and bounds, an ordered range, and a positive step.\");\n }\n const [\n local,\n setLocal,\n ] = useState<number | null>(defaultValue);\n const input = useRef<HTMLInputElement>(null);\n const initial = useRef(defaultValue);\n const current = value === undefined ? local : value;\n useImperativeHandle(ref, () => {\n return input.current as HTMLInputElement;\n });\n useEffect(() => {\n const form = input.current?.form;\n if (!form || value !== undefined) {\n return;\n }\n let mounted = true;\n const reset = (event: Event) => {\n // Wait until React bubbling handlers can cancel the native reset.\n setTimeout(() => {\n if (mounted && !event.defaultPrevented) {\n setLocal(initial.current);\n }\n }, 0);\n };\n form.addEventListener(\"reset\", reset);\n return () => {\n mounted = false;\n form.removeEventListener(\"reset\", reset);\n };\n }, [\n restProps.form,\n value,\n ]);\n const change = (next: number | null) => {\n if (restProps.readOnly || restProps.disabled || input.current?.matches(\":disabled\")) {\n return;\n }\n if (value === undefined) {\n setLocal(next);\n }\n if (next !== current) {\n onValueChange?.(next);\n }\n };\n const move = (direction: number) => {\n const element = input.current;\n if (!element || restProps.readOnly || element.matches(\":disabled\")) {\n return;\n }\n element.stepUp(direction);\n const next = element.valueAsNumber;\n change(Number.isFinite(next) ? next : null);\n // A controlled consumer can reject the requested value.\n if (value !== undefined) {\n element.value = current === null ? \"\" : String(current);\n }\n element.focus();\n };\n return (<div\n className=\"flex min-w-0 items-stretch gap-gridui-4\"\n dir={restProps.dir}\n >\n <Button\n variant=\"secondary\"\n layout=\"icon\"\n size={controlSize}\n aria-label={decrementLabel}\n disabled={restProps.disabled || restProps.readOnly || (current !== null && min !== undefined && current <= min)}\n onClick={() => {\n move(-1);\n }}\n >\n <Minus\n aria-hidden=\"true\"\n />\n </Button>\n <input\n {...restProps}\n ref={input}\n type=\"number\"\n min={min}\n max={max}\n step={step}\n value={current ?? \"\"}\n className={cn(controlVariants({ size: controlSize }), \"gridui-number-field flex-1\", className)}\n onChange={(event) => {\n onChange?.(event);\n if (!event.defaultPrevented) {\n change(Number.isFinite(event.currentTarget.valueAsNumber) ? event.currentTarget.valueAsNumber : null);\n }\n }}\n />\n <Button\n variant=\"secondary\"\n layout=\"icon\"\n size={controlSize}\n aria-label={incrementLabel}\n disabled={restProps.disabled || restProps.readOnly || (current !== null && max !== undefined && current >= max)}\n onClick={() => {\n move(1);\n }}\n >\n <Plus\n aria-hidden=\"true\"\n />\n </Button>\n </div>);\n};\n"],
5
- "mappings": ";AAOA,SAAS,cAAc;AACvB,SAAS,uBAAuB;AAChC,SAAS,UAAU;AACnB,SAAS,OAAO,YAAY;AAC5B,SAA8C,WAAW,qBAAqB,QAAQ,gBAAgB;AAiF1F,SAcA,KAdA;AAnEL,IAAM,cAAoC,CAAC,UAA4B;AAC1E,QAAM;AAAA,IAAE;AAAA,IAAO,eAAe;AAAA,IAAM;AAAA,IAAK;AAAA,IAAK,OAAO;AAAA,IAAG,cAAc;AAAA,IAAY;AAAA,IAAgB;AAAA,IAC9F;AAAA,IAAe;AAAA,IAAU;AAAA,IAAW;AAAA,IAAK,GAAG;AAAA,EAAU,IAAI;AAC9D,MAAI,CAAC,OAAO,SAAS,IAAI,KAAK,QAAQ,KAAM,QAAQ,UAAa,CAAC,OAAO,SAAS,GAAG,KAAO,QAAQ,UAAa,CAAC,OAAO,SAAS,GAAG,KAC7H,QAAQ,UAAa,QAAQ,UAAa,MAAM,OAChD,UAAU,UAAa,UAAU,QAAQ,CAAC,OAAO,SAAS,KAAK,KAC/D,iBAAiB,QAAQ,CAAC,OAAO,SAAS,YAAY,GAAI;AAC9D,UAAM,IAAI,WAAW,uFAAuF;AAAA,EAChH;AACA,QAAM;AAAA,IACF;AAAA,IACA;AAAA,EACJ,IAAI,SAAwB,YAAY;AAC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AA;AAAA,MACL,WAAU;AAAA,MACV,KAAK,UAAU;AAAA,MAEf;AAAA;AAAA,UAAC;AAAA;AAAA,YACG,SAAQ;AAAA,YACR,QAAO;AAAA,YACP,MAAM;AAAA,YACN,cAAY;AAAA,YACZ,UAAU,UAAU,YAAY,UAAU,YAAa,YAAY,QAAQ,QAAQ,UAAa,WAAW;AAAA,YAC3G,SAAS,MAAM;AACX,mBAAK,EAAE;AAAA,YACX;AAAA,YAEA;AAAA,cAAC;AAAA;AAAA,gBACG,eAAY;AAAA;AAAA,YAChB;AAAA;AAAA,QACJ;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACI,GAAG;AAAA,YACJ,KAAK;AAAA,YACL,MAAK;AAAA,YACL;AAAA,YACA;AAAA,YACA;AAAA,YACA,OAAO,WAAW;AAAA,YAClB,WAAW,GAAG,gBAAgB,EAAE,MAAM,YAAY,CAAC,GAAG,8BAA8B,SAAS;AAAA,YAC7F,UAAU,CAAC,UAAU;AACjB,yBAAW,KAAK;AAChB,kBAAI,CAAC,MAAM,kBAAkB;AACzB,uBAAO,OAAO,SAAS,MAAM,cAAc,aAAa,IAAI,MAAM,cAAc,gBAAgB,IAAI;AAAA,cACxG;AAAA,YACJ;AAAA;AAAA,QACJ;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACG,SAAQ;AAAA,YACR,QAAO;AAAA,YACP,MAAM;AAAA,YACN,cAAY;AAAA,YACZ,UAAU,UAAU,YAAY,UAAU,YAAa,YAAY,QAAQ,QAAQ,UAAa,WAAW;AAAA,YAC3G,SAAS,MAAM;AACX,mBAAK,CAAC;AAAA,YACV;AAAA,YAEA;AAAA,cAAC;AAAA;AAAA,gBACG,eAAY;AAAA;AAAA,YAChB;AAAA;AAAA,QACJ;AAAA;AAAA;AAAA,EACJ;AACJ;",
4
+ "sourcesContent": ["/**\n * @author WMXPY\n * @package Number Field\n * @namespace NumberField\n * @description Number Field\n */\n\nimport { Button } from \"@gridui/button\";\nimport { useFormReset } from \"@gridui/form\";\nimport { controlVariants } from \"@gridui/input\";\nimport { cn } from \"@gridui/style-utils\";\nimport { Minus, Plus } from \"lucide-react\";\nimport { type ComponentPropsWithRef, type FC, useImperativeHandle, useRef, useState } from \"react\";\n\nexport type NumberFieldProps = Omit<ComponentPropsWithRef<\"input\">, \"type\" | \"value\" | \"defaultValue\" | \"min\" | \"max\" | \"step\" | \"size\"> & {\n readonly value?: number | null;\n readonly defaultValue?: number | null;\n readonly min?: number;\n readonly max?: number;\n readonly step?: number;\n readonly controlSize?: \"standard\" | \"small\";\n readonly incrementLabel: string;\n readonly decrementLabel: string;\n readonly onValueChange?: (value: number | null) => void;\n};\n\nexport const NumberField: FC<NumberFieldProps> = (props: NumberFieldProps) => {\n const { value, defaultValue = null, min, max, step = 1, controlSize = \"standard\", incrementLabel, decrementLabel,\n onValueChange, onChange, className, ref, ...restProps } = props;\n if (!Number.isFinite(step) || step <= 0 || (min !== undefined && !Number.isFinite(min)) || (max !== undefined && !Number.isFinite(max))\n || (min !== undefined && max !== undefined && min > max)\n || (value !== undefined && value !== null && !Number.isFinite(value))\n || (defaultValue !== null && !Number.isFinite(defaultValue))) {\n throw new RangeError(\"NumberField requires finite values and bounds, an ordered range, and a positive step.\");\n }\n const [\n local,\n setLocal,\n ] = useState<number | null>(defaultValue);\n const input = useRef<HTMLInputElement>(null);\n const initial = useRef(defaultValue);\n const current = value === undefined ? local : value;\n useImperativeHandle(ref, () => {\n return input.current as HTMLInputElement;\n });\n useFormReset(input, () => {\n if (value === undefined) {\n setLocal(initial.current);\n }\n }, restProps.form);\n const change = (next: number | null) => {\n if (restProps.readOnly || restProps.disabled || input.current?.matches(\":disabled\")) {\n return;\n }\n if (value === undefined) {\n setLocal(next);\n }\n if (next !== current) {\n onValueChange?.(next);\n }\n };\n const move = (direction: number) => {\n const element = input.current;\n if (!element || restProps.readOnly || element.matches(\":disabled\")) {\n return;\n }\n element.stepUp(direction);\n const next = element.valueAsNumber;\n change(Number.isFinite(next) ? next : null);\n // A controlled consumer can reject the requested value.\n if (value !== undefined) {\n element.value = current === null ? \"\" : String(current);\n }\n element.focus();\n };\n return (<div\n className=\"gridui-u-flex gridui-u-min-w-0 gridui-u-items-stretch gridui-u-gap-gridui-4\"\n dir={restProps.dir}\n >\n <Button\n variant=\"secondary\"\n layout=\"icon\"\n size={controlSize}\n aria-label={decrementLabel}\n disabled={restProps.disabled || restProps.readOnly || (current !== null && min !== undefined && current <= min)}\n onClick={() => {\n move(-1);\n }}\n >\n <Minus\n aria-hidden=\"true\"\n />\n </Button>\n <input\n {...restProps}\n ref={input}\n type=\"number\"\n min={min}\n max={max}\n step={step}\n value={current ?? \"\"}\n className={cn(controlVariants({ size: controlSize }), \"gridui-number-field gridui-u-flex-1\", className)}\n onChange={(event) => {\n onChange?.(event);\n if (!event.defaultPrevented) {\n change(Number.isFinite(event.currentTarget.valueAsNumber) ? event.currentTarget.valueAsNumber : null);\n }\n }}\n />\n <Button\n variant=\"secondary\"\n layout=\"icon\"\n size={controlSize}\n aria-label={incrementLabel}\n disabled={restProps.disabled || restProps.readOnly || (current !== null && max !== undefined && current >= max)}\n onClick={() => {\n move(1);\n }}\n >\n <Plus\n aria-hidden=\"true\"\n />\n </Button>\n </div>);\n};\n"],
5
+ "mappings": ";AAOA,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,UAAU;AACnB,SAAS,OAAO,YAAY;AAC5B,SAA8C,qBAAqB,QAAQ,gBAAgB;AA+D/E,SAcA,KAdA;AAjDL,IAAM,cAAoC,CAAC,UAA4B;AAC1E,QAAM;AAAA,IAAE;AAAA,IAAO,eAAe;AAAA,IAAM;AAAA,IAAK;AAAA,IAAK,OAAO;AAAA,IAAG,cAAc;AAAA,IAAY;AAAA,IAAgB;AAAA,IAC9F;AAAA,IAAe;AAAA,IAAU;AAAA,IAAW;AAAA,IAAK,GAAG;AAAA,EAAU,IAAI;AAC9D,MAAI,CAAC,OAAO,SAAS,IAAI,KA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windcss.com */
2
2
  @layer theme, base, components, utilities;
3
3
  @layer utilities {
4
- .flex {
4
+ .gridui-u-flex {
5
5
  display: flex;
6
6
  }
7
- .min-w-0 {
7
+ .gridui-u-min-w-0 {
8
8
  min-width: 0px;
9
9
  }
10
- .flex-1 {
10
+ .gridui-u-flex-1 {
11
11
  flex: 1;
12
12
  }
13
- .items-stretch {
13
+ .gridui-u-items-stretch {
14
14
  align-items: stretch;
15
15
  }
16
- .gap-gridui-4 {
16
+ .gridui-u-gap-gridui-4 {
17
17
  gap: var(--gridui-space-4);
18
18
  }
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridui/number-field",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "GridUI React number field",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -26,17 +26,19 @@
26
26
  "react-dom": "^19.2.0"
27
27
  },
28
28
  "dependencies": {
29
- "@gridui/button": "^2.1.1",
30
- "@gridui/input": "^1.0.0",
31
- "@gridui/style-utils": "^2.1.2",
32
- "@gridui/theme": "^2.1.2",
33
- "lucide-react": "1.62.0"
29
+ "@gridui/button": "^2.2.0",
30
+ "@gridui/form": "^2.0.2",
31
+ "@gridui/input": "^1.1.2",
32
+ "@gridui/style-utils": "^2.1.4",
33
+ "@gridui/theme": "^2.3.2",
34
+ "lucide-react": "1.65.0"
34
35
  },
35
36
  "devDependencies": {
36
- "@gridui-internal/configuration": "0.0.0",
37
+ "@gridui-internal/configuration": "0.0.0-internal",
37
38
  "@jest/globals": "30.5.2",
39
+ "@storybook/react-vite": "10.6.5",
38
40
  "@types/jest": "30.0.0",
39
- "@types/node": "26.6.5",
41
+ "@types/node": "26.6.6",
40
42
  "@types/react": "19.3.0",
41
43
  "@types/react-dom": "19.3.0",
42
44
  "jest": "30.5.2",