@fuf-stack/uniform 1.0.4 → 1.1.0

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.
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkEP5CSMUMcjs = require('../chunk-EP5CSMUM.cjs');
4
+ var _chunk52MVVBSUcjs = require('../chunk-52MVVBSU.cjs');
5
5
  require('../chunk-OE5BOGGX.cjs');
6
6
  require('../chunk-Y3AB4GV6.cjs');
7
7
  require('../chunk-MAABMY3P.cjs');
@@ -12,5 +12,5 @@ require('../chunk-555JRYCS.cjs');
12
12
 
13
13
 
14
14
 
15
- exports.Input = _chunkEP5CSMUMcjs.Input_default; exports.default = _chunkEP5CSMUMcjs.Input_default2;
15
+ exports.Input = _chunk52MVVBSUcjs.Input_default; exports.default = _chunk52MVVBSUcjs.Input_default2;
16
16
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
- import { I as Input } from '../Input-Com9bFxL.cjs';
2
- export { a as InputProps } from '../Input-Com9bFxL.cjs';
1
+ import { I as Input } from '../Input-DeQoIu96.cjs';
2
+ export { a as InputProps } from '../Input-DeQoIu96.cjs';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react';
5
5
  import '../hooks/useInputValueTransform/index.cjs';
@@ -1,5 +1,5 @@
1
- import { I as Input } from '../Input-BpsVvxwO.js';
2
- export { a as InputProps } from '../Input-BpsVvxwO.js';
1
+ import { I as Input } from '../Input-ymA_W82l.js';
2
+ export { a as InputProps } from '../Input-ymA_W82l.js';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react';
5
5
  import '../hooks/useInputValueTransform/index.js';
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Input_default,
3
3
  Input_default2
4
- } from "../chunk-OEPBQXUN.js";
4
+ } from "../chunk-XSGUQCFJ.js";
5
5
  import "../chunk-NTDKZW4E.js";
6
6
  import "../chunk-CQWA2DFV.js";
7
7
  import "../chunk-2Q3ZW3QG.js";
@@ -5,6 +5,8 @@ import { InputValueTransform } from './hooks/useInputValueTransform/index.cjs';
5
5
  interface InputProps {
6
6
  /** CSS class name */
7
7
  className?: string;
8
+ /** shows clear button when input has value */
9
+ clearable?: boolean;
8
10
  /** debounce delay in milliseconds for form state updates (default: 300ms) */
9
11
  debounceDelay?: number;
10
12
  /** input field is disabled */
@@ -31,6 +33,6 @@ interface InputProps {
31
33
  /**
32
34
  * Input component based on [HeroUI Input](https://www.heroui.com//docs/components/input)
33
35
  */
34
- declare const Input: ({ className, debounceDelay, disabled, endContent, label, name, placeholder, size, startContent, testId: _testId, transform, type, }: InputProps) => react_jsx_runtime.JSX.Element;
36
+ declare const Input: ({ className, clearable, debounceDelay, disabled, endContent, label, name, placeholder, size, startContent, testId: _testId, transform, type, }: InputProps) => react_jsx_runtime.JSX.Element;
35
37
 
36
38
  export { Input as I, type InputProps as a };
@@ -5,6 +5,8 @@ import { InputValueTransform } from './hooks/useInputValueTransform/index.js';
5
5
  interface InputProps {
6
6
  /** CSS class name */
7
7
  className?: string;
8
+ /** shows clear button when input has value */
9
+ clearable?: boolean;
8
10
  /** debounce delay in milliseconds for form state updates (default: 300ms) */
9
11
  debounceDelay?: number;
10
12
  /** input field is disabled */
@@ -31,6 +33,6 @@ interface InputProps {
31
33
  /**
32
34
  * Input component based on [HeroUI Input](https://www.heroui.com//docs/components/input)
33
35
  */
34
- declare const Input: ({ className, debounceDelay, disabled, endContent, label, name, placeholder, size, startContent, testId: _testId, transform, type, }: InputProps) => react_jsx_runtime.JSX.Element;
36
+ declare const Input: ({ className, clearable, debounceDelay, disabled, endContent, label, name, placeholder, size, startContent, testId: _testId, transform, type, }: InputProps) => react_jsx_runtime.JSX.Element;
35
37
 
36
38
  export { Input as I, type InputProps as a };
@@ -12,12 +12,16 @@ var _chunkMAABMY3Pcjs = require('./chunk-MAABMY3P.cjs');
12
12
 
13
13
  var _chunkFLK6OPFYcjs = require('./chunk-FLK6OPFY.cjs');
14
14
 
15
+
16
+ var _chunk555JRYCScjs = require('./chunk-555JRYCS.cjs');
17
+
15
18
  // src/Input/Input.tsx
16
19
  var _input = require('@heroui/input');
17
20
  var _pixelutils = require('@fuf-stack/pixel-utils');
18
21
  var _jsxruntime = require('react/jsx-runtime');
19
22
  var Input = ({
20
23
  className = void 0,
24
+ clearable = false,
21
25
  debounceDelay = 300,
22
26
  disabled = false,
23
27
  endContent = void 0,
@@ -30,7 +34,7 @@ var Input = ({
30
34
  transform = void 0,
31
35
  type = void 0
32
36
  }) => {
33
- const { control, debugMode, getFieldState } = _chunkMAABMY3Pcjs.useFormContext.call(void 0, );
37
+ const { control, debugMode, getFieldState, resetField } = _chunkMAABMY3Pcjs.useFormContext.call(void 0, );
34
38
  const { error, invalid, required, testId } = getFieldState(name, _testId);
35
39
  const { field } = _chunkMAABMY3Pcjs.useController.call(void 0, {
36
40
  control,
@@ -52,11 +56,17 @@ var Input = ({
52
56
  type,
53
57
  value: fieldValue
54
58
  });
59
+ const clearableProps = clearable ? {
60
+ isClearable: true,
61
+ onClear: () => {
62
+ resetField(name);
63
+ }
64
+ } : {};
55
65
  const showTestIdCopyButton = debugMode === "debug-testids";
56
- const showLabel = label || showTestIdCopyButton;
66
+ const showLabel = label != null ? label : showTestIdCopyButton;
57
67
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
58
68
  _input.Input,
59
- {
69
+ _chunk555JRYCScjs.__spreadValues.call(void 0, {
60
70
  ref,
61
71
  className: _pixelutils.cn.call(void 0, className),
62
72
  "data-testid": testId,
@@ -72,18 +82,18 @@ var Input = ({
72
82
  radius: "sm",
73
83
  size,
74
84
  startContent,
85
+ type,
86
+ value,
75
87
  variant: "bordered",
76
88
  classNames: {
77
89
  inputWrapper: "bg-content1 group-data-[focus=true]:border-focus"
78
90
  },
79
- errorMessage: error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY3AB4GV6cjs.FieldValidationError_default, { error, testId }),
80
- label: showLabel && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
91
+ errorMessage: error ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY3AB4GV6cjs.FieldValidationError_default, { error, testId }) : null,
92
+ label: showLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
81
93
  label,
82
- showTestIdCopyButton && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOE5BOGGXcjs.FieldCopyTestIdButton_default, { testId })
83
- ] }),
84
- type,
85
- value
86
- }
94
+ showTestIdCopyButton != null ? showTestIdCopyButton : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOE5BOGGXcjs.FieldCopyTestIdButton_default, { testId })
95
+ ] }) : null
96
+ }, clearableProps)
87
97
  );
88
98
  };
89
99
  var Input_default = Input;
@@ -95,4 +105,4 @@ var Input_default2 = Input_default;
95
105
 
96
106
 
97
107
  exports.Input_default = Input_default; exports.Input_default2 = Input_default2;
98
- //# sourceMappingURL=chunk-EP5CSMUM.cjs.map
108
+ //# sourceMappingURL=chunk-52MVVBSU.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/uniform/dist/chunk-52MVVBSU.cjs","../src/Input/Input.tsx","../src/Input/index.ts"],"names":["Input_default"],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACbA,sCAAmC;AAEnC,oDAAmB;AAuHH,+CAAA;AAjFhB,IAAM,MAAA,EAAQ,CAAC;AAAA,EACb,UAAA,EAAY,KAAA,CAAA;AAAA,EACZ,UAAA,EAAY,KAAA;AAAA,EACZ,cAAA,EAAgB,GAAA;AAAA,EAChB,SAAA,EAAW,KAAA;AAAA,EACX,WAAA,EAAa,KAAA,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MAAM,qBAAA,EAAuB,UAAA,IAAc,eAAA;AAC3C,EAAA,MAAM,UAAA,EAAY,MAAA,GAAA,KAAA,EAAA,MAAA,EAAS,oBAAA;AAE3B,EAAA,uBACE,6BAAA;AAAA,IAAC,YAAA;AAAA,IAAA,8CAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,4BAAA,SAAY,CAAA;AAAA,MACvB,aAAA,EAAa,MAAA;AAAA,MACb,UAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA,EAAW,OAAA;AAAA,MACX,UAAA,EAAY,QAAA;AAAA,MACZ,cAAA,EAAe,SAAA;AAAA,MACf,IAAA;AAAA,MACA,MAAA;AAAA,MACA,QAAA;AAAA,MACA,WAAA;AAAA,MACA,MAAA,EAAO,IAAA;AAAA,MACP,IAAA;AAAA,MACA,YAAA;AAAA,MACA,IAAA;AAAA,MAEA,KAAA;AAAA,MACA,OAAA,EAAQ,UAAA;AAAA,MACR,UAAA,EAAY;AAAA,QACV,YAAA,EAAc;AAAA,MAChB,CAAA;AAAA,MACA,YAAA,EACE,MAAA,kBAAQ,6BAAA,8CAAC,EAAA,EAAqB,KAAA,EAAc,OAAA,CAAgB,EAAA,EAAK,IAAA;AAAA,MAEnE,KAAA,EACE,UAAA,kBACE,8BAAA,oBAAA,EAAA,EACG,QAAA,EAAA;AAAA,QAAA,KAAA;AAAA,QACA,qBAAA,GAAA,KAAA,EAAA,qBAAA,kBAAwB,6BAAA,+CAAC,EAAA,EAAsB,OAAA,CAAgB;AAAA,MAAA,EAAA,CAClE,EAAA,EACE;AAAA,IAAA,CAAA,EAEF,cAAA;AAAA,EACN,CAAA;AAEJ,CAAA;AAEA,IAAO,cAAA,EAAQ,KAAA;ADzCf;AACA;AE9FA,IAAOA,eAAAA,EAAQ,aAAA;AFgGf;AACA;AACE;AACA;AACF,+EAAC","file":"/home/runner/work/pixels/pixels/packages/uniform/dist/chunk-52MVVBSU.cjs","sourcesContent":[null,"import type { InputProps as HeroInputProps } from '@heroui/input';\nimport type { ReactNode } from 'react';\nimport type { InputValueTransform } from '../hooks';\n\nimport { Input as HeroInput } from '@heroui/input';\n\nimport { cn } from '@fuf-stack/pixel-utils';\n\nimport { useController, useFormContext, useInputValueDebounce } from '../hooks';\nimport { FieldCopyTestIdButton } from '../partials/FieldCopyTestIdButton';\nimport { FieldValidationError } from '../partials/FieldValidationError';\n\nexport interface InputProps {\n /** CSS class name */\n className?: string;\n /** shows clear button when input has value */\n clearable?: boolean;\n /** debounce delay in milliseconds for form state updates (default: 300ms) */\n debounceDelay?: number;\n /** input field is disabled */\n disabled?: boolean;\n /** added content to the end of the input Field. */\n endContent?: ReactNode;\n /** form field label (set to false to disable label) */\n label?: string | false;\n /** form field name */\n name: string;\n /** form field placeholder */\n placeholder?: string;\n /** size of the input */\n size?: 'sm' | 'md' | 'lg';\n /** content added to the start of the input field */\n startContent?: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** allows disentangled display and form values for a field */\n transform?: InputValueTransform;\n /** input type */\n type?: 'number' | 'password';\n}\n\n/**\n * Input component based on [HeroUI Input](https://www.heroui.com//docs/components/input)\n */\nconst Input = ({\n className = undefined,\n clearable = false,\n debounceDelay = 300,\n disabled = false,\n endContent = undefined,\n label = undefined,\n name,\n placeholder = ' ',\n size = undefined,\n startContent = undefined,\n testId: _testId = undefined,\n transform = undefined,\n type = undefined,\n}: InputProps) => {\n const { control, debugMode, getFieldState, resetField } = useFormContext();\n const { error, invalid, required, testId } = getFieldState(name, _testId);\n\n const { field } = useController({\n control,\n disabled,\n name,\n });\n\n const {\n disabled: isDisabled,\n onChange: fieldOnChange,\n onBlur: fieldOnBlur,\n value: fieldValue,\n ref,\n } = field;\n\n // Use hook that provides debounced onChange and enhanced blur handling\n const { onChange, onBlur, value } = useInputValueDebounce({\n debounceDelay,\n onBlur: fieldOnBlur,\n onChange: fieldOnChange,\n transform,\n type,\n value: fieldValue,\n });\n\n // If input is clearable add props for clearing input value\n const clearableProps: Pick<HeroInputProps, 'isClearable' | 'onClear'> =\n clearable\n ? {\n isClearable: true,\n onClear: () => {\n resetField(name);\n },\n }\n : {};\n\n const showTestIdCopyButton = debugMode === 'debug-testids';\n const showLabel = label ?? showTestIdCopyButton;\n\n return (\n <HeroInput\n ref={ref}\n className={cn(className)}\n data-testid={testId}\n endContent={endContent}\n isDisabled={isDisabled}\n isInvalid={invalid}\n isRequired={required}\n labelPlacement=\"outside\"\n name={name}\n onBlur={onBlur}\n onChange={onChange}\n placeholder={placeholder}\n radius=\"sm\"\n size={size}\n startContent={startContent}\n type={type}\n // @ts-expect-error can be number for input type number\n value={value}\n variant=\"bordered\"\n classNames={{\n inputWrapper: 'bg-content1 group-data-[focus=true]:border-focus',\n }}\n errorMessage={\n error ? <FieldValidationError error={error} testId={testId} /> : null\n }\n label={\n showLabel ? (\n <>\n {label}\n {showTestIdCopyButton ?? <FieldCopyTestIdButton testId={testId} />}\n </>\n ) : null\n }\n {...clearableProps}\n />\n );\n};\n\nexport default Input;\n","import Input from './Input';\n\nexport type { InputProps } from './Input';\n\nexport { Input };\n\nexport default Input;\n"]}
@@ -11,6 +11,9 @@ import {
11
11
  import {
12
12
  useInputValueDebounce
13
13
  } from "./chunk-6IU7IYYB.js";
14
+ import {
15
+ __spreadValues
16
+ } from "./chunk-K2V4ULA2.js";
14
17
 
15
18
  // src/Input/Input.tsx
16
19
  import { Input as HeroInput } from "@heroui/input";
@@ -18,6 +21,7 @@ import { cn } from "@fuf-stack/pixel-utils";
18
21
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
19
22
  var Input = ({
20
23
  className = void 0,
24
+ clearable = false,
21
25
  debounceDelay = 300,
22
26
  disabled = false,
23
27
  endContent = void 0,
@@ -30,7 +34,7 @@ var Input = ({
30
34
  transform = void 0,
31
35
  type = void 0
32
36
  }) => {
33
- const { control, debugMode, getFieldState } = useFormContext();
37
+ const { control, debugMode, getFieldState, resetField } = useFormContext();
34
38
  const { error, invalid, required, testId } = getFieldState(name, _testId);
35
39
  const { field } = useController({
36
40
  control,
@@ -52,11 +56,17 @@ var Input = ({
52
56
  type,
53
57
  value: fieldValue
54
58
  });
59
+ const clearableProps = clearable ? {
60
+ isClearable: true,
61
+ onClear: () => {
62
+ resetField(name);
63
+ }
64
+ } : {};
55
65
  const showTestIdCopyButton = debugMode === "debug-testids";
56
- const showLabel = label || showTestIdCopyButton;
66
+ const showLabel = label != null ? label : showTestIdCopyButton;
57
67
  return /* @__PURE__ */ jsx(
58
68
  HeroInput,
59
- {
69
+ __spreadValues({
60
70
  ref,
61
71
  className: cn(className),
62
72
  "data-testid": testId,
@@ -72,18 +82,18 @@ var Input = ({
72
82
  radius: "sm",
73
83
  size,
74
84
  startContent,
85
+ type,
86
+ value,
75
87
  variant: "bordered",
76
88
  classNames: {
77
89
  inputWrapper: "bg-content1 group-data-[focus=true]:border-focus"
78
90
  },
79
- errorMessage: error && /* @__PURE__ */ jsx(FieldValidationError_default, { error, testId }),
80
- label: showLabel && /* @__PURE__ */ jsxs(Fragment, { children: [
91
+ errorMessage: error ? /* @__PURE__ */ jsx(FieldValidationError_default, { error, testId }) : null,
92
+ label: showLabel ? /* @__PURE__ */ jsxs(Fragment, { children: [
81
93
  label,
82
- showTestIdCopyButton && /* @__PURE__ */ jsx(FieldCopyTestIdButton_default, { testId })
83
- ] }),
84
- type,
85
- value
86
- }
94
+ showTestIdCopyButton != null ? showTestIdCopyButton : /* @__PURE__ */ jsx(FieldCopyTestIdButton_default, { testId })
95
+ ] }) : null
96
+ }, clearableProps)
87
97
  );
88
98
  };
89
99
  var Input_default = Input;
@@ -95,4 +105,4 @@ export {
95
105
  Input_default,
96
106
  Input_default2
97
107
  };
98
- //# sourceMappingURL=chunk-OEPBQXUN.js.map
108
+ //# sourceMappingURL=chunk-XSGUQCFJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Input/Input.tsx","../src/Input/index.ts"],"sourcesContent":["import type { InputProps as HeroInputProps } from '@heroui/input';\nimport type { ReactNode } from 'react';\nimport type { InputValueTransform } from '../hooks';\n\nimport { Input as HeroInput } from '@heroui/input';\n\nimport { cn } from '@fuf-stack/pixel-utils';\n\nimport { useController, useFormContext, useInputValueDebounce } from '../hooks';\nimport { FieldCopyTestIdButton } from '../partials/FieldCopyTestIdButton';\nimport { FieldValidationError } from '../partials/FieldValidationError';\n\nexport interface InputProps {\n /** CSS class name */\n className?: string;\n /** shows clear button when input has value */\n clearable?: boolean;\n /** debounce delay in milliseconds for form state updates (default: 300ms) */\n debounceDelay?: number;\n /** input field is disabled */\n disabled?: boolean;\n /** added content to the end of the input Field. */\n endContent?: ReactNode;\n /** form field label (set to false to disable label) */\n label?: string | false;\n /** form field name */\n name: string;\n /** form field placeholder */\n placeholder?: string;\n /** size of the input */\n size?: 'sm' | 'md' | 'lg';\n /** content added to the start of the input field */\n startContent?: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** allows disentangled display and form values for a field */\n transform?: InputValueTransform;\n /** input type */\n type?: 'number' | 'password';\n}\n\n/**\n * Input component based on [HeroUI Input](https://www.heroui.com//docs/components/input)\n */\nconst Input = ({\n className = undefined,\n clearable = false,\n debounceDelay = 300,\n disabled = false,\n endContent = undefined,\n label = undefined,\n name,\n placeholder = ' ',\n size = undefined,\n startContent = undefined,\n testId: _testId = undefined,\n transform = undefined,\n type = undefined,\n}: InputProps) => {\n const { control, debugMode, getFieldState, resetField } = useFormContext();\n const { error, invalid, required, testId } = getFieldState(name, _testId);\n\n const { field } = useController({\n control,\n disabled,\n name,\n });\n\n const {\n disabled: isDisabled,\n onChange: fieldOnChange,\n onBlur: fieldOnBlur,\n value: fieldValue,\n ref,\n } = field;\n\n // Use hook that provides debounced onChange and enhanced blur handling\n const { onChange, onBlur, value } = useInputValueDebounce({\n debounceDelay,\n onBlur: fieldOnBlur,\n onChange: fieldOnChange,\n transform,\n type,\n value: fieldValue,\n });\n\n // If input is clearable add props for clearing input value\n const clearableProps: Pick<HeroInputProps, 'isClearable' | 'onClear'> =\n clearable\n ? {\n isClearable: true,\n onClear: () => {\n resetField(name);\n },\n }\n : {};\n\n const showTestIdCopyButton = debugMode === 'debug-testids';\n const showLabel = label ?? showTestIdCopyButton;\n\n return (\n <HeroInput\n ref={ref}\n className={cn(className)}\n data-testid={testId}\n endContent={endContent}\n isDisabled={isDisabled}\n isInvalid={invalid}\n isRequired={required}\n labelPlacement=\"outside\"\n name={name}\n onBlur={onBlur}\n onChange={onChange}\n placeholder={placeholder}\n radius=\"sm\"\n size={size}\n startContent={startContent}\n type={type}\n // @ts-expect-error can be number for input type number\n value={value}\n variant=\"bordered\"\n classNames={{\n inputWrapper: 'bg-content1 group-data-[focus=true]:border-focus',\n }}\n errorMessage={\n error ? <FieldValidationError error={error} testId={testId} /> : null\n }\n label={\n showLabel ? (\n <>\n {label}\n {showTestIdCopyButton ?? <FieldCopyTestIdButton testId={testId} />}\n </>\n ) : null\n }\n {...clearableProps}\n />\n );\n};\n\nexport default Input;\n","import Input from './Input';\n\nexport type { InputProps } from './Input';\n\nexport { Input };\n\nexport default Input;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAIA,SAAS,SAAS,iBAAiB;AAEnC,SAAS,UAAU;AAuHH,SAIN,UAJM,KAIN,YAJM;AAjFhB,IAAM,QAAQ,CAAC;AAAA,EACb,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,aAAa;AAAA,EACb,QAAQ;AAAA,EACR;AAAA,EACA,cAAc;AAAA,EACd,OAAO;AAAA,EACP,eAAe;AAAA,EACf,QAAQ,UAAU;AAAA,EAClB,YAAY;AAAA,EACZ,OAAO;AACT,MAAkB;AAChB,QAAM,EAAE,SAAS,WAAW,eAAe,WAAW,IAAI,eAAe;AACzE,QAAM,EAAE,OAAO,SAAS,UAAU,OAAO,IAAI,cAAc,MAAM,OAAO;AAExE,QAAM,EAAE,MAAM,IAAI,cAAc;AAAA,IAC9B;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM;AAAA,IACJ,UAAU;AAAA,IACV,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,OAAO;AAAA,IACP;AAAA,EACF,IAAI;AAGJ,QAAM,EAAE,UAAU,QAAQ,MAAM,IAAI,sBAAsB;AAAA,IACxD;AAAA,IACA,QAAQ;AAAA,IACR,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,OAAO;AAAA,EACT,CAAC;AAGD,QAAM,iBACJ,YACI;AAAA,IACE,aAAa;AAAA,IACb,SAAS,MAAM;AACb,iBAAW,IAAI;AAAA,IACjB;AAAA,EACF,IACA,CAAC;AAEP,QAAM,uBAAuB,cAAc;AAC3C,QAAM,YAAY,wBAAS;AAE3B,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,SAAS;AAAA,MACvB,eAAa;AAAA,MACb;AAAA,MACA;AAAA,MACA,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,gBAAe;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA,MACA,SAAQ;AAAA,MACR,YAAY;AAAA,QACV,cAAc;AAAA,MAChB;AAAA,MACA,cACE,QAAQ,oBAAC,gCAAqB,OAAc,QAAgB,IAAK;AAAA,MAEnE,OACE,YACE,iCACG;AAAA;AAAA,QACA,sDAAwB,oBAAC,iCAAsB,QAAgB;AAAA,SAClE,IACE;AAAA,OAEF;AAAA,EACN;AAEJ;AAEA,IAAO,gBAAQ;;;ACtIf,IAAOA,iBAAQ;","names":["Input_default"]}
package/dist/index.cjs CHANGED
@@ -27,7 +27,7 @@ var _chunkV64TRQMVcjs = require('./chunk-V64TRQMV.cjs');
27
27
  var _chunkTTD3KL6Ecjs = require('./chunk-TTD3KL6E.cjs');
28
28
 
29
29
 
30
- var _chunkEP5CSMUMcjs = require('./chunk-EP5CSMUM.cjs');
30
+ var _chunk52MVVBSUcjs = require('./chunk-52MVVBSU.cjs');
31
31
 
32
32
 
33
33
  var _chunkXHWBXZO5cjs = require('./chunk-XHWBXZO5.cjs');
@@ -88,5 +88,5 @@ require('./chunk-555JRYCS.cjs');
88
88
 
89
89
 
90
90
 
91
- exports.CheckboxGroup = _chunkX4O53MIJcjs.CheckboxGroup_default; exports.FieldArray = _chunkEO7TACW2cjs.FieldArray_default; exports.FieldCopyTestIdButton = _chunkOE5BOGGXcjs.FieldCopyTestIdButton_default; exports.FieldValidationError = _chunkY3AB4GV6cjs.FieldValidationError_default; exports.Form = _chunkV64TRQMVcjs.Form_default; exports.Grid = _chunkTTD3KL6Ecjs.Grid_default; exports.Input = _chunkEP5CSMUMcjs.Input_default; exports.RadioBoxes = _chunkXHWBXZO5cjs.RadioBoxes_default; exports.RadioGroup = _chunkKC26PALYcjs.RadioGroup_default; exports.RadioTabs = _chunkN7BZIGW7cjs.RadioTabs_default; exports.Select = _chunkUQFNR2ZIcjs.Select_default; exports.SubmitButton = _chunkCNSA2WD5cjs.SubmitButton_default; exports.Switch = _chunkNSYD7L53cjs.Switch_default; exports.TextArea = _chunkO3H3KD5Hcjs.TextArea_default; exports.checkFieldIsRequired = _chunkMAABMY3Pcjs.checkFieldIsRequired; exports.fromNullishString = _chunkYGNY6CKUcjs.fromNullishString; exports.toFormFormat = _chunkYGNY6CKUcjs.toFormFormat; exports.toNullishString = _chunkYGNY6CKUcjs.toNullishString; exports.toValidationFormat = _chunkYGNY6CKUcjs.toValidationFormat; exports.useClientValidation = _chunkMAABMY3Pcjs.useClientValidation; exports.useController = _chunkMAABMY3Pcjs.useController; exports.useFieldArray = _chunkMAABMY3Pcjs.useFieldArray; exports.useFormContext = _chunkMAABMY3Pcjs.useFormContext; exports.useInput = _chunkMAABMY3Pcjs.useInput; exports.useInputValueDebounce = _chunkFLK6OPFYcjs.useInputValueDebounce; exports.useInputValueTransform = _chunkP6HJOG7Dcjs.useInputValueTransform;
91
+ exports.CheckboxGroup = _chunkX4O53MIJcjs.CheckboxGroup_default; exports.FieldArray = _chunkEO7TACW2cjs.FieldArray_default; exports.FieldCopyTestIdButton = _chunkOE5BOGGXcjs.FieldCopyTestIdButton_default; exports.FieldValidationError = _chunkY3AB4GV6cjs.FieldValidationError_default; exports.Form = _chunkV64TRQMVcjs.Form_default; exports.Grid = _chunkTTD3KL6Ecjs.Grid_default; exports.Input = _chunk52MVVBSUcjs.Input_default; exports.RadioBoxes = _chunkXHWBXZO5cjs.RadioBoxes_default; exports.RadioGroup = _chunkKC26PALYcjs.RadioGroup_default; exports.RadioTabs = _chunkN7BZIGW7cjs.RadioTabs_default; exports.Select = _chunkUQFNR2ZIcjs.Select_default; exports.SubmitButton = _chunkCNSA2WD5cjs.SubmitButton_default; exports.Switch = _chunkNSYD7L53cjs.Switch_default; exports.TextArea = _chunkO3H3KD5Hcjs.TextArea_default; exports.checkFieldIsRequired = _chunkMAABMY3Pcjs.checkFieldIsRequired; exports.fromNullishString = _chunkYGNY6CKUcjs.fromNullishString; exports.toFormFormat = _chunkYGNY6CKUcjs.toFormFormat; exports.toNullishString = _chunkYGNY6CKUcjs.toNullishString; exports.toValidationFormat = _chunkYGNY6CKUcjs.toValidationFormat; exports.useClientValidation = _chunkMAABMY3Pcjs.useClientValidation; exports.useController = _chunkMAABMY3Pcjs.useController; exports.useFieldArray = _chunkMAABMY3Pcjs.useFieldArray; exports.useFormContext = _chunkMAABMY3Pcjs.useFormContext; exports.useInput = _chunkMAABMY3Pcjs.useInput; exports.useInputValueDebounce = _chunkFLK6OPFYcjs.useInputValueDebounce; exports.useInputValueTransform = _chunkP6HJOG7Dcjs.useInputValueTransform;
92
92
  //# sourceMappingURL=index.cjs.map
package/dist/index.d.cts CHANGED
@@ -8,7 +8,7 @@ export { useFieldArray } from 'react-hook-form';
8
8
  export { useInput } from '@heroui/input';
9
9
  export { UseInputValueDebounceOptions, UseInputValueDebounceReturn, useInputValueDebounce } from './hooks/useInputValueDebounce/index.cjs';
10
10
  export { InputValueTransform, UseInputValueTransformOptions, UseInputValueTransformReturn, useInputValueTransform } from './hooks/useInputValueTransform/index.cjs';
11
- export { I as Input, a as InputProps } from './Input-Com9bFxL.cjs';
11
+ export { I as Input, a as InputProps } from './Input-DeQoIu96.cjs';
12
12
  export { F as FieldCopyTestIdButton, a as FieldCopyTestIdButtonProps } from './FieldCopyTestIdButton-_TDlmw0L.cjs';
13
13
  export { F as FieldValidationError, a as FieldValidationErrorProps } from './FieldValidationError-CU_xw0BL.cjs';
14
14
  export { R as RadioBoxes, a as RadioBoxesProps } from './RadioBoxes-CE3mYoFk.cjs';
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ export { useFieldArray } from 'react-hook-form';
8
8
  export { useInput } from '@heroui/input';
9
9
  export { UseInputValueDebounceOptions, UseInputValueDebounceReturn, useInputValueDebounce } from './hooks/useInputValueDebounce/index.js';
10
10
  export { InputValueTransform, UseInputValueTransformOptions, UseInputValueTransformReturn, useInputValueTransform } from './hooks/useInputValueTransform/index.js';
11
- export { I as Input, a as InputProps } from './Input-BpsVvxwO.js';
11
+ export { I as Input, a as InputProps } from './Input-ymA_W82l.js';
12
12
  export { F as FieldCopyTestIdButton, a as FieldCopyTestIdButtonProps } from './FieldCopyTestIdButton-_TDlmw0L.js';
13
13
  export { F as FieldValidationError, a as FieldValidationErrorProps } from './FieldValidationError-CU_xw0BL.js';
14
14
  export { R as RadioBoxes, a as RadioBoxesProps } from './RadioBoxes-CE3mYoFk.js';
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  } from "./chunk-B62HKKMS.js";
28
28
  import {
29
29
  Input_default
30
- } from "./chunk-OEPBQXUN.js";
30
+ } from "./chunk-XSGUQCFJ.js";
31
31
  import {
32
32
  RadioBoxes_default
33
33
  } from "./chunk-CVZSGNBJ.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuf-stack/uniform",
3
- "version": "1.0.4",
3
+ "version": "1.1.0",
4
4
  "description": "fuf react form library",
5
5
  "author": "Fröhlich ∧ Frei",
6
6
  "homepage": "https://github.com/fuf-stack/pixels#readme",
@@ -139,13 +139,13 @@
139
139
  "@heroui/system": "2.4.20",
140
140
  "@heroui/theme": "2.4.20",
141
141
  "@react-aria/visually-hidden": "3.8.27",
142
- "framer-motion": "12.23.12",
142
+ "framer-motion": "12.23.15",
143
143
  "react-icons": "5.5.0",
144
144
  "react-hook-form": "7.55.0",
145
145
  "react-select": "5.10.2",
146
146
  "@fuf-stack/pixel-utils": "1.0.5",
147
147
  "@fuf-stack/veto": "0.12.1",
148
- "@fuf-stack/pixels": "1.2.2"
148
+ "@fuf-stack/pixels": "1.2.4"
149
149
  },
150
150
  "devDependencies": {
151
151
  "@types/debug": "4.1.12",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/uniform/dist/chunk-EP5CSMUM.cjs","../src/Input/Input.tsx","../src/Input/index.ts"],"names":["Input_default"],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACXA,sCAAmC;AAEnC,oDAAmB;AAsGF,+CAAA;AAlEjB,IAAM,MAAA,EAAQ,CAAC;AAAA,EACb,UAAA,EAAY,KAAA,CAAA;AAAA,EACZ,cAAA,EAAgB,GAAA;AAAA,EAChB,SAAA,EAAW,KAAA;AAAA,EACX,WAAA,EAAa,KAAA,CAAA;AAAA,EACb,MAAA,EAAQ,KAAA,CAAA;AAAA,EACR,IAAA;AAAA,EACA,YAAA,EAAc,GAAA;AAAA,EACd,KAAA,EAAO,KAAA,CAAA;AAAA,EACP,aAAA,EAAe,KAAA,CAAA;AAAA,EACf,MAAA,EAAQ,QAAA,EAAU,KAAA,CAAA;AAAA,EAClB,UAAA,EAAY,KAAA,CAAA;AAAA,EACZ,KAAA,EAAO,KAAA;AACT,CAAA,EAAA,GAAkB;AAChB,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AQ,UAAA;AAAA,MACR,UAAA,EAAY;AAAA,QACV,YAAA,EAAc;AAAA,MAChB,CAAA;AAAA,MACA,YAAA,EACE,MAAA,mBAAS,6BAAA,8CAAC,EAAA,EAAqB,KAAA,EAAc,OAAA,CAAgB,CAAA;AAAA,MAE/D,KAAA,EACE,UAAA,mBACE,8BAAA,oBAAA,EAAA,EACG,QAAA,EAAA;AAAA,QAAA,KAAA;AAAA,QACA,qBAAA,mBAAwB,6BAAA,+CAAC,EAAA,EAAsB,OAAA,CAAgB;AAAA,MAAA,EAAA,CAClE,CAAA;AAAA,MAGJ,IAAA;AAAA,MAEA;AAAA,IAAA;AAAA,EACF,CAAA;AAEJ,CAAA;AAEA,IAAO,cAAA,EAAQ,KAAA;ADnCf;AACA;AEpFA,IAAOA,eAAAA,EAAQ,aAAA;AFsFf;AACA;AACE;AACA;AACF,+EAAC","file":"/home/runner/work/pixels/pixels/packages/uniform/dist/chunk-EP5CSMUM.cjs","sourcesContent":[null,"import type { ReactNode } from 'react';\nimport type { InputValueTransform } from '../hooks';\n\nimport { Input as HeroInput } from '@heroui/input';\n\nimport { cn } from '@fuf-stack/pixel-utils';\n\nimport { useController, useFormContext, useInputValueDebounce } from '../hooks';\nimport { FieldCopyTestIdButton } from '../partials/FieldCopyTestIdButton';\nimport { FieldValidationError } from '../partials/FieldValidationError';\n\nexport interface InputProps {\n /** CSS class name */\n className?: string;\n /** debounce delay in milliseconds for form state updates (default: 300ms) */\n debounceDelay?: number;\n /** input field is disabled */\n disabled?: boolean;\n /** added content to the end of the input Field. */\n endContent?: ReactNode;\n /** form field label (set to false to disable label) */\n label?: string | false;\n /** form field name */\n name: string;\n /** form field placeholder */\n placeholder?: string;\n /** size of the input */\n size?: 'sm' | 'md' | 'lg';\n /** content added to the start of the input field */\n startContent?: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** allows disentangled display and form values for a field */\n transform?: InputValueTransform;\n /** input type */\n type?: 'number' | 'password';\n}\n\n/**\n * Input component based on [HeroUI Input](https://www.heroui.com//docs/components/input)\n */\nconst Input = ({\n className = undefined,\n debounceDelay = 300,\n disabled = false,\n endContent = undefined,\n label = undefined,\n name,\n placeholder = ' ',\n size = undefined,\n startContent = undefined,\n testId: _testId = undefined,\n transform = undefined,\n type = undefined,\n}: InputProps) => {\n const { control, debugMode, getFieldState } = useFormContext();\n const { error, invalid, required, testId } = getFieldState(name, _testId);\n\n const { field } = useController({\n control,\n disabled,\n name,\n });\n\n const {\n disabled: isDisabled,\n onChange: fieldOnChange,\n onBlur: fieldOnBlur,\n value: fieldValue,\n ref,\n } = field;\n\n // Use hook that provides debounced onChange and enhanced blur handling\n const { onChange, onBlur, value } = useInputValueDebounce({\n debounceDelay,\n onBlur: fieldOnBlur,\n onChange: fieldOnChange,\n transform,\n type,\n value: fieldValue,\n });\n\n const showTestIdCopyButton = debugMode === 'debug-testids';\n const showLabel = label || showTestIdCopyButton;\n\n return (\n <HeroInput\n ref={ref}\n className={cn(className)}\n data-testid={testId}\n endContent={endContent}\n isDisabled={isDisabled}\n isInvalid={invalid}\n isRequired={required}\n labelPlacement=\"outside\"\n name={name}\n onBlur={onBlur}\n onChange={onChange}\n placeholder={placeholder}\n radius=\"sm\"\n size={size}\n startContent={startContent}\n variant=\"bordered\"\n classNames={{\n inputWrapper: 'bg-content1 group-data-[focus=true]:border-focus',\n }}\n errorMessage={\n error && <FieldValidationError error={error} testId={testId} />\n }\n label={\n showLabel && (\n <>\n {label}\n {showTestIdCopyButton && <FieldCopyTestIdButton testId={testId} />}\n </>\n )\n }\n type={type}\n // @ts-expect-error can be number for input type number\n value={value}\n />\n );\n};\n\nexport default Input;\n","import Input from './Input';\n\nexport type { InputProps } from './Input';\n\nexport { Input };\n\nexport default Input;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Input/Input.tsx","../src/Input/index.ts"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type { InputValueTransform } from '../hooks';\n\nimport { Input as HeroInput } from '@heroui/input';\n\nimport { cn } from '@fuf-stack/pixel-utils';\n\nimport { useController, useFormContext, useInputValueDebounce } from '../hooks';\nimport { FieldCopyTestIdButton } from '../partials/FieldCopyTestIdButton';\nimport { FieldValidationError } from '../partials/FieldValidationError';\n\nexport interface InputProps {\n /** CSS class name */\n className?: string;\n /** debounce delay in milliseconds for form state updates (default: 300ms) */\n debounceDelay?: number;\n /** input field is disabled */\n disabled?: boolean;\n /** added content to the end of the input Field. */\n endContent?: ReactNode;\n /** form field label (set to false to disable label) */\n label?: string | false;\n /** form field name */\n name: string;\n /** form field placeholder */\n placeholder?: string;\n /** size of the input */\n size?: 'sm' | 'md' | 'lg';\n /** content added to the start of the input field */\n startContent?: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** allows disentangled display and form values for a field */\n transform?: InputValueTransform;\n /** input type */\n type?: 'number' | 'password';\n}\n\n/**\n * Input component based on [HeroUI Input](https://www.heroui.com//docs/components/input)\n */\nconst Input = ({\n className = undefined,\n debounceDelay = 300,\n disabled = false,\n endContent = undefined,\n label = undefined,\n name,\n placeholder = ' ',\n size = undefined,\n startContent = undefined,\n testId: _testId = undefined,\n transform = undefined,\n type = undefined,\n}: InputProps) => {\n const { control, debugMode, getFieldState } = useFormContext();\n const { error, invalid, required, testId } = getFieldState(name, _testId);\n\n const { field } = useController({\n control,\n disabled,\n name,\n });\n\n const {\n disabled: isDisabled,\n onChange: fieldOnChange,\n onBlur: fieldOnBlur,\n value: fieldValue,\n ref,\n } = field;\n\n // Use hook that provides debounced onChange and enhanced blur handling\n const { onChange, onBlur, value } = useInputValueDebounce({\n debounceDelay,\n onBlur: fieldOnBlur,\n onChange: fieldOnChange,\n transform,\n type,\n value: fieldValue,\n });\n\n const showTestIdCopyButton = debugMode === 'debug-testids';\n const showLabel = label || showTestIdCopyButton;\n\n return (\n <HeroInput\n ref={ref}\n className={cn(className)}\n data-testid={testId}\n endContent={endContent}\n isDisabled={isDisabled}\n isInvalid={invalid}\n isRequired={required}\n labelPlacement=\"outside\"\n name={name}\n onBlur={onBlur}\n onChange={onChange}\n placeholder={placeholder}\n radius=\"sm\"\n size={size}\n startContent={startContent}\n variant=\"bordered\"\n classNames={{\n inputWrapper: 'bg-content1 group-data-[focus=true]:border-focus',\n }}\n errorMessage={\n error && <FieldValidationError error={error} testId={testId} />\n }\n label={\n showLabel && (\n <>\n {label}\n {showTestIdCopyButton && <FieldCopyTestIdButton testId={testId} />}\n </>\n )\n }\n type={type}\n // @ts-expect-error can be number for input type number\n value={value}\n />\n );\n};\n\nexport default Input;\n","import Input from './Input';\n\nexport type { InputProps } from './Input';\n\nexport { Input };\n\nexport default Input;\n"],"mappings":";;;;;;;;;;;;;;;AAGA,SAAS,SAAS,iBAAiB;AAEnC,SAAS,UAAU;AAsGF,SAIP,UAJO,KAIP,YAJO;AAlEjB,IAAM,QAAQ,CAAC;AAAA,EACb,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,aAAa;AAAA,EACb,QAAQ;AAAA,EACR;AAAA,EACA,cAAc;AAAA,EACd,OAAO;AAAA,EACP,eAAe;AAAA,EACf,QAAQ,UAAU;AAAA,EAClB,YAAY;AAAA,EACZ,OAAO;AACT,MAAkB;AAChB,QAAM,EAAE,SAAS,WAAW,cAAc,IAAI,eAAe;AAC7D,QAAM,EAAE,OAAO,SAAS,UAAU,OAAO,IAAI,cAAc,MAAM,OAAO;AAExE,QAAM,EAAE,MAAM,IAAI,cAAc;AAAA,IAC9B;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM;AAAA,IACJ,UAAU;AAAA,IACV,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,OAAO;AAAA,IACP;AAAA,EACF,IAAI;AAGJ,QAAM,EAAE,UAAU,QAAQ,MAAM,IAAI,sBAAsB;AAAA,IACxD;AAAA,IACA,QAAQ;AAAA,IACR,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,OAAO;AAAA,EACT,CA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