@yamada-ui/react 2.3.4-dev-20261114075014 → 2.3.4-dev-20261114103548

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.
@@ -12,15 +12,10 @@ const useTextarea = ({ autosize, maxRows, minRows, resizeRef, ...rest } = {}) =>
12
12
  });
13
13
  require_ref.assignRef(resizeRef, onResizeTextarea);
14
14
  return {
15
- getTextareaProps: (0, react.useCallback)((props = {}) => {
16
- return require_props.mergeProps(rest, props, {
17
- ref: require_ref.mergeRefs(ref),
18
- ...autosize ? {
19
- style: { resize: "none" },
20
- onChange: onResizeTextarea
21
- } : {}
22
- })();
23
- }, [
15
+ getTextareaProps: (0, react.useCallback)((props = {}) => require_props.mergeProps(rest, props, { ref }, autosize ? {
16
+ style: { resize: "none" },
17
+ onChange: onResizeTextarea
18
+ } : void 0)(), [
24
19
  autosize,
25
20
  onResizeTextarea,
26
21
  rest,
@@ -1 +1 @@
1
- {"version":3,"file":"use-textarea.cjs","names":["useAutosize","useCallback","mergeProps","mergeRefs"],"sources":["../../../../src/components/textarea/use-textarea.ts"],"sourcesContent":["\"use client\"\n\nimport type { ForwardedRef } from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { UseAutosizeProps } from \"./use-autosize\"\nimport { useCallback } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { assignRef, mergeRefs } from \"../../utils\"\nimport { useAutosize } from \"./use-autosize\"\n\nexport interface UseTextareaProps\n extends HTMLProps<\"textarea\">, Omit<UseAutosizeProps, \"disabled\" | \"ref\"> {\n /**\n * If `true`, the Textarea height auto-adjusts to text height.\n */\n autosize?: boolean\n /**\n * Ref to a resize function.\n */\n resizeRef?: ForwardedRef<() => void>\n}\n\nexport const useTextarea = ({\n autosize,\n maxRows,\n minRows,\n resizeRef,\n ...rest\n}: UseTextareaProps = {}) => {\n const { ref, onResizeTextarea } = useAutosize({\n disabled: !autosize,\n maxRows,\n minRows,\n })\n\n assignRef(resizeRef, onResizeTextarea)\n\n const getTextareaProps: PropGetter<\"textarea\"> = useCallback(\n (props = {}) => {\n const textareaProps = mergeProps(rest, props, {\n ref: mergeRefs(ref),\n ...(autosize\n ? {\n style: { resize: \"none\" as const },\n onChange: onResizeTextarea,\n }\n : {}),\n })()\n\n return textareaProps\n },\n [autosize, onResizeTextarea, rest, ref],\n )\n\n return {\n getTextareaProps,\n onResizeTextarea,\n }\n}\n\nexport type UseTextareaReturn = ReturnType<typeof useTextarea>\n"],"mappings":";;;;;;AAsBA,MAAa,eAAe,EAC1B,UACA,SACA,SACA,WACA,GAAG,SACiB,CAAC,MAAM;CAC3B,MAAM,EAAE,KAAK,qBAAqBA,qBAAAA,YAAY;EAC5C,UAAU,CAAC;EACX;EACA;CACF,CAAC;CAED,YAAA,UAAU,WAAW,gBAAgB;CAmBrC,OAAO;EACL,mBAAA,GAlB+CC,MAAAA,YAAAA,EAC9C,QAAQ,CAAC,MAAM;GAWd,OAVsBC,cAAAA,WAAW,MAAM,OAAO;IAC5C,KAAKC,YAAAA,UAAU,GAAG;IAClB,GAAI,WACA;KACE,OAAO,EAAE,QAAQ,OAAgB;KACjC,UAAU;IACZ,IACA,CAAC;GACP,CAAC,CAAC,CAEiB;EACrB,GACA;GAAC;GAAU;GAAkB;GAAM;EAAG,CAIvB;EACf;CACF;AACF"}
1
+ {"version":3,"file":"use-textarea.cjs","names":["useAutosize","useCallback","mergeProps"],"sources":["../../../../src/components/textarea/use-textarea.ts"],"sourcesContent":["\"use client\"\n\nimport type { ForwardedRef } from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { UseAutosizeProps } from \"./use-autosize\"\nimport { useCallback } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { assignRef } from \"../../utils\"\nimport { useAutosize } from \"./use-autosize\"\n\nexport interface UseTextareaProps\n extends HTMLProps<\"textarea\">, Omit<UseAutosizeProps, \"disabled\" | \"ref\"> {\n /**\n * If `true`, the Textarea height auto-adjusts to text height.\n */\n autosize?: boolean\n /**\n * Ref to a resize function.\n */\n resizeRef?: ForwardedRef<() => void>\n}\n\nexport const useTextarea = ({\n autosize,\n maxRows,\n minRows,\n resizeRef,\n ...rest\n}: UseTextareaProps = {}) => {\n const { ref, onResizeTextarea } = useAutosize({\n disabled: !autosize,\n maxRows,\n minRows,\n })\n\n assignRef(resizeRef, onResizeTextarea)\n\n const getTextareaProps: PropGetter<\"textarea\"> = useCallback(\n (props = {}) =>\n mergeProps(\n rest,\n props,\n { ref },\n autosize\n ? { style: { resize: \"none\" as const }, onChange: onResizeTextarea }\n : undefined,\n )(),\n [autosize, onResizeTextarea, rest, ref],\n )\n\n return {\n getTextareaProps,\n onResizeTextarea,\n }\n}\n\nexport type UseTextareaReturn = ReturnType<typeof useTextarea>\n"],"mappings":";;;;;;AAsBA,MAAa,eAAe,EAC1B,UACA,SACA,SACA,WACA,GAAG,SACiB,CAAC,MAAM;CAC3B,MAAM,EAAE,KAAK,qBAAqBA,qBAAAA,YAAY;EAC5C,UAAU,CAAC;EACX;EACA;CACF,CAAC;CAED,YAAA,UAAU,WAAW,gBAAgB;CAerC,OAAO;EACL,mBAAA,GAd+CC,MAAAA,YAAAA,EAC9C,QAAQ,CAAC,MACRC,cAAAA,WACE,MACA,OACA,EAAE,IAAI,GACN,WACI;GAAE,OAAO,EAAE,QAAQ,OAAgB;GAAG,UAAU;EAAiB,IACjE,KAAA,CACN,CAAC,CAAC,GACJ;GAAC;GAAU;GAAkB;GAAM;EAAG,CAIvB;EACf;CACF;AACF"}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { assignRef, mergeRefs } from "../../utils/ref.js";
2
+ import { assignRef } from "../../utils/ref.js";
3
3
  import { mergeProps } from "../../core/components/props.js";
4
4
  import { useAutosize } from "./use-autosize.js";
5
5
  import { useCallback } from "react";
@@ -12,15 +12,10 @@ const useTextarea = ({ autosize, maxRows, minRows, resizeRef, ...rest } = {}) =>
12
12
  });
13
13
  assignRef(resizeRef, onResizeTextarea);
14
14
  return {
15
- getTextareaProps: useCallback((props = {}) => {
16
- return mergeProps(rest, props, {
17
- ref: mergeRefs(ref),
18
- ...autosize ? {
19
- style: { resize: "none" },
20
- onChange: onResizeTextarea
21
- } : {}
22
- })();
23
- }, [
15
+ getTextareaProps: useCallback((props = {}) => mergeProps(rest, props, { ref }, autosize ? {
16
+ style: { resize: "none" },
17
+ onChange: onResizeTextarea
18
+ } : void 0)(), [
24
19
  autosize,
25
20
  onResizeTextarea,
26
21
  rest,
@@ -1 +1 @@
1
- {"version":3,"file":"use-textarea.js","names":[],"sources":["../../../../src/components/textarea/use-textarea.ts"],"sourcesContent":["\"use client\"\n\nimport type { ForwardedRef } from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { UseAutosizeProps } from \"./use-autosize\"\nimport { useCallback } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { assignRef, mergeRefs } from \"../../utils\"\nimport { useAutosize } from \"./use-autosize\"\n\nexport interface UseTextareaProps\n extends HTMLProps<\"textarea\">, Omit<UseAutosizeProps, \"disabled\" | \"ref\"> {\n /**\n * If `true`, the Textarea height auto-adjusts to text height.\n */\n autosize?: boolean\n /**\n * Ref to a resize function.\n */\n resizeRef?: ForwardedRef<() => void>\n}\n\nexport const useTextarea = ({\n autosize,\n maxRows,\n minRows,\n resizeRef,\n ...rest\n}: UseTextareaProps = {}) => {\n const { ref, onResizeTextarea } = useAutosize({\n disabled: !autosize,\n maxRows,\n minRows,\n })\n\n assignRef(resizeRef, onResizeTextarea)\n\n const getTextareaProps: PropGetter<\"textarea\"> = useCallback(\n (props = {}) => {\n const textareaProps = mergeProps(rest, props, {\n ref: mergeRefs(ref),\n ...(autosize\n ? {\n style: { resize: \"none\" as const },\n onChange: onResizeTextarea,\n }\n : {}),\n })()\n\n return textareaProps\n },\n [autosize, onResizeTextarea, rest, ref],\n )\n\n return {\n getTextareaProps,\n onResizeTextarea,\n }\n}\n\nexport type UseTextareaReturn = ReturnType<typeof useTextarea>\n"],"mappings":";;;;;;AAsBA,MAAa,eAAe,EAC1B,UACA,SACA,SACA,WACA,GAAG,SACiB,CAAC,MAAM;CAC3B,MAAM,EAAE,KAAK,qBAAqB,YAAY;EAC5C,UAAU,CAAC;EACX;EACA;CACF,CAAC;CAED,UAAU,WAAW,gBAAgB;CAmBrC,OAAO;EACL,kBAlB+C,aAC9C,QAAQ,CAAC,MAAM;GAWd,OAVsB,WAAW,MAAM,OAAO;IAC5C,KAAK,UAAU,GAAG;IAClB,GAAI,WACA;KACE,OAAO,EAAE,QAAQ,OAAgB;KACjC,UAAU;IACZ,IACA,CAAC;GACP,CAAC,CAAC,CAEiB;EACrB,GACA;GAAC;GAAU;GAAkB;GAAM;EAAG,CAIvB;EACf;CACF;AACF"}
1
+ {"version":3,"file":"use-textarea.js","names":[],"sources":["../../../../src/components/textarea/use-textarea.ts"],"sourcesContent":["\"use client\"\n\nimport type { ForwardedRef } from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { UseAutosizeProps } from \"./use-autosize\"\nimport { useCallback } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { assignRef } from \"../../utils\"\nimport { useAutosize } from \"./use-autosize\"\n\nexport interface UseTextareaProps\n extends HTMLProps<\"textarea\">, Omit<UseAutosizeProps, \"disabled\" | \"ref\"> {\n /**\n * If `true`, the Textarea height auto-adjusts to text height.\n */\n autosize?: boolean\n /**\n * Ref to a resize function.\n */\n resizeRef?: ForwardedRef<() => void>\n}\n\nexport const useTextarea = ({\n autosize,\n maxRows,\n minRows,\n resizeRef,\n ...rest\n}: UseTextareaProps = {}) => {\n const { ref, onResizeTextarea } = useAutosize({\n disabled: !autosize,\n maxRows,\n minRows,\n })\n\n assignRef(resizeRef, onResizeTextarea)\n\n const getTextareaProps: PropGetter<\"textarea\"> = useCallback(\n (props = {}) =>\n mergeProps(\n rest,\n props,\n { ref },\n autosize\n ? { style: { resize: \"none\" as const }, onChange: onResizeTextarea }\n : undefined,\n )(),\n [autosize, onResizeTextarea, rest, ref],\n )\n\n return {\n getTextareaProps,\n onResizeTextarea,\n }\n}\n\nexport type UseTextareaReturn = ReturnType<typeof useTextarea>\n"],"mappings":";;;;;;AAsBA,MAAa,eAAe,EAC1B,UACA,SACA,SACA,WACA,GAAG,SACiB,CAAC,MAAM;CAC3B,MAAM,EAAE,KAAK,qBAAqB,YAAY;EAC5C,UAAU,CAAC;EACX;EACA;CACF,CAAC;CAED,UAAU,WAAW,gBAAgB;CAerC,OAAO;EACL,kBAd+C,aAC9C,QAAQ,CAAC,MACR,WACE,MACA,OACA,EAAE,IAAI,GACN,WACI;GAAE,OAAO,EAAE,QAAQ,OAAgB;GAAG,UAAU;EAAiB,IACjE,KAAA,CACN,CAAC,CAAC,GACJ;GAAC;GAAU;GAAkB;GAAM;EAAG,CAIvB;EACf;CACF;AACF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yamada-ui/react",
3
3
  "type": "module",
4
- "version": "2.3.4-dev-20261114075014",
4
+ "version": "2.3.4-dev-20261114103548",
5
5
  "description": "React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion",
6
6
  "keywords": [
7
7
  "yamada",