@fuf-stack/uniform 2.0.0-next.4 → 2.0.0-next.5
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/Checkboxes/index.d.mts +49 -49
- package/dist/Checkboxes/index.mjs +5 -5
- package/dist/Checkboxes/index.mjs.map +1 -1
- package/dist/DatePicker/index.d.mts +59 -59
- package/dist/DatePicker/index.mjs +18 -18
- package/dist/DatePicker/index.mjs.map +1 -1
- package/dist/FieldArray/index.d.mts +6 -6
- package/dist/FieldArray/index.mjs +12 -12
- package/dist/FieldArray/index.mjs.map +1 -1
- package/dist/FieldCard/index.mjs +6 -6
- package/dist/FieldCard/index.mjs.map +1 -1
- package/dist/FieldReset/index.d.mts +1 -1
- package/dist/FieldReset/index.mjs +1 -1
- package/dist/Form/index.d.mts +2 -2
- package/dist/Form/index.mjs +4 -4
- package/dist/Form/index.mjs.map +1 -1
- package/dist/{FormContext-PXkVlBdU.mjs → FormContext-CVq3glVW.mjs} +5 -5
- package/dist/FormContext-CVq3glVW.mjs.map +1 -0
- package/dist/{FormContext-BnNJYZOo.d.mts → FormContext-Dvt3MiKq.d.mts} +3 -3
- package/dist/{FormContext-BnNJYZOo.d.mts.map → FormContext-Dvt3MiKq.d.mts.map} +1 -1
- package/dist/Input/index.d.mts +52 -52
- package/dist/Input/index.mjs +10 -10
- package/dist/Input/index.mjs.map +1 -1
- package/dist/RadioBoxes/index.d.mts +28 -28
- package/dist/RadioBoxes/index.mjs +3 -3
- package/dist/RadioBoxes/index.mjs.map +1 -1
- package/dist/RadioTabs/index.d.mts +21 -21
- package/dist/RadioTabs/index.d.mts.map +1 -1
- package/dist/RadioTabs/index.mjs +5 -5
- package/dist/RadioTabs/index.mjs.map +1 -1
- package/dist/Radios/index.d.mts +14 -14
- package/dist/Radios/index.mjs +2 -2
- package/dist/Select/index.d.mts +48 -48
- package/dist/Select/index.mjs +8 -8
- package/dist/Select/index.mjs.map +1 -1
- package/dist/Slider/index.d.mts +51 -51
- package/dist/Slider/index.mjs +7 -7
- package/dist/Slider/index.mjs.map +1 -1
- package/dist/Switch/index.d.mts +1 -1
- package/dist/Switch/index.mjs +2 -2
- package/dist/{Switch-aBYStBoY.d.mts → Switch-3ujfKWwt.d.mts} +38 -38
- package/dist/{Switch-aBYStBoY.d.mts.map → Switch-3ujfKWwt.d.mts.map} +1 -1
- package/dist/SwitchBox/index.d.mts +35 -35
- package/dist/SwitchBox/index.mjs +2 -2
- package/dist/TextArea/index.d.mts +18 -18
- package/dist/TextArea/index.mjs +7 -7
- package/dist/TextArea/index.mjs.map +1 -1
- package/dist/Time/index.d.mts +37 -37
- package/dist/Time/index.mjs +2 -2
- package/dist/hooks/useClientValidation/index.mjs +1 -1
- package/dist/hooks/useController/index.mjs +1 -1
- package/dist/hooks/useFormContext/index.d.mts +1 -1
- package/dist/hooks/useFormContext/index.mjs +1 -1
- package/dist/hooks/useInputValueDebounce/index.mjs +1 -1
- package/dist/hooks/useWatchFormReset/index.mjs +1 -1
- package/dist/hooks/useWatchUserChange/index.mjs +1 -1
- package/dist/partials/FieldHelper/index.d.mts +2 -2
- package/dist/partials/FieldValidationError/index.d.mts +11 -11
- package/dist/{radioControlVariants-CbtG5U4_.mjs → radioControlVariants-CxA0og5-.mjs} +7 -7
- package/dist/{radioControlVariants-CbtG5U4_.mjs.map → radioControlVariants-CxA0og5-.mjs.map} +1 -1
- package/dist/{switchVariants-0Xa7TQYg.mjs → switchVariants-B8dq8DYP.mjs} +9 -9
- package/dist/{switchVariants-0Xa7TQYg.mjs.map → switchVariants-B8dq8DYP.mjs.map} +1 -1
- package/dist/{timeVariants-Bkt4iwXx.mjs → timeVariants-CIX6R59-.mjs} +6 -6
- package/dist/{timeVariants-Bkt4iwXx.mjs.map → timeVariants-CIX6R59-.mjs.map} +1 -1
- package/dist/{useController-JtIeurpw.mjs → useController-SEAuP3G4.mjs} +6 -6
- package/dist/useController-SEAuP3G4.mjs.map +1 -0
- package/dist/{useFormContext-piqnN2L-.mjs → useFormContext-CQzJhAU4.mjs} +12 -8
- package/dist/useFormContext-CQzJhAU4.mjs.map +1 -0
- package/dist/{useUniformField-TTNPTsVn.mjs → useUniformField-BvPoQyLL.mjs} +4 -4
- package/dist/{useUniformField-TTNPTsVn.mjs.map → useUniformField-BvPoQyLL.mjs.map} +1 -1
- package/package.json +4 -4
- package/dist/FormContext-PXkVlBdU.mjs.map +0 -1
- package/dist/useController-JtIeurpw.mjs.map +0 -1
- package/dist/useFormContext-piqnN2L-.mjs.map +0 -1
|
@@ -2,7 +2,7 @@ import { flatArrayKey, toFormFormat, toSubmitFormat, toValidationFormat } from "
|
|
|
2
2
|
import React, { createContext, useCallback, useContext, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
3
3
|
import { useLocalStorage } from "@fuf-stack/pixels";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { FormProvider, useForm } from "react-hook-form";
|
|
5
|
+
import { FormProvider as FormProvider$1, useForm } from "react-hook-form";
|
|
6
6
|
import createDebug from "debug";
|
|
7
7
|
import { and, veto } from "@fuf-stack/veto";
|
|
8
8
|
// src/Form/subcomponents/SensitiveFields.tsx
|
|
@@ -391,7 +391,7 @@ debug("UniformContext exported", {
|
|
|
391
391
|
* - User change pub/sub notifications (`userChange`)
|
|
392
392
|
* - React Hook Form context
|
|
393
393
|
*/
|
|
394
|
-
const FormProvider
|
|
394
|
+
const FormProvider = ({ children, debugModeSettings = void 0, initialValues = void 0, onSubmit, validation: baseValidation = void 0, validationTrigger }) => {
|
|
395
395
|
const sensitiveFields = useMemo(() => {
|
|
396
396
|
return createSensitiveFields();
|
|
397
397
|
}, []);
|
|
@@ -501,7 +501,7 @@ const FormProvider$1 = ({ children, debugModeSettings = void 0, initialValues =
|
|
|
501
501
|
registry: sensitiveFields,
|
|
502
502
|
children: /* @__PURE__ */ jsx(UniformContext.Provider, {
|
|
503
503
|
value: contextValue,
|
|
504
|
-
children: /* @__PURE__ */ jsx(FormProvider, {
|
|
504
|
+
children: /* @__PURE__ */ jsx(FormProvider$1, {
|
|
505
505
|
...methods,
|
|
506
506
|
children: children({
|
|
507
507
|
handleSubmit,
|
|
@@ -511,6 +511,6 @@ const FormProvider$1 = ({ children, debugModeSettings = void 0, initialValues =
|
|
|
511
511
|
})
|
|
512
512
|
});
|
|
513
513
|
};
|
|
514
|
-
export { useSensitiveField as a, useSensitiveDebug as i, UniformContext as n, redactDebugData as r, FormProvider
|
|
514
|
+
export { useSensitiveField as a, useSensitiveDebug as i, UniformContext as n, redactDebugData as r, FormProvider as t };
|
|
515
515
|
|
|
516
|
-
//# sourceMappingURL=FormContext-
|
|
516
|
+
//# sourceMappingURL=FormContext-CVq3glVW.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormContext-CVq3glVW.mjs","names":["HookFormProvider"],"sources":["../src/Form/subcomponents/SensitiveFields.tsx","../src/helpers/disabledFields/disabledFields.ts","../src/Form/subcomponents/FormResolver.ts","../src/Form/subcomponents/FormContext.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport {\n createContext,\n useContext,\n useLayoutEffect,\n useSyncExternalStore,\n} from 'react';\n\n/**\n * Diagnostic redaction for explicitly registered form paths.\n *\n * Flow:\n * 1. FormProvider creates one registry for its form and supplies it through context.\n * 2. useUniformField calls useSensitiveField for declared password inputs and\n * fields marked sensitive. This module does not infer secrets from names,\n * inspect the DOM, or search strings for password-like content.\n * 3. Field layout effects register their paths before the provider marks the\n * initial registry ready. The debug viewer waits for that ready signal.\n * 4. The viewer and Uniform's debug logger redact diagnostic copies using the\n * same registry. JSON copy actions receive the viewer's redacted data too.\n *\n * This is protection against accidental disclosure in Uniform diagnostics,\n * not encryption or a boundary against browser inspection. Real values remain\n * available to inputs, validation, submission, and application callbacks.\n * Application logging and secrets embedded in unrelated paths/custom messages\n * are outside this path-based redaction mechanism.\n */\n\n// A fixed placeholder avoids exposing the secret's content, type, or length.\nconst REDACTED = '[REDACTED]';\n\n/**\n * Build a diagnostic copy with each registered field replaced by [REDACTED].\n *\n * Matching a field masks its entire subtree. For validation errors, that also\n * removes error metadata/messages beneath that field, which may contain input.\n * The source object is never changed: redacting form state itself would corrupt\n * validation and the values ultimately delivered to onSubmit.\n *\n * Paths use React Hook Form dot notation, with numeric bracket indices accepted\n * as well. Normalization removes Uniform's __FLAT__ transport wrapper so the\n * same registration covers raw form data and normalized/submitted array values.\n *\n * Traversal covers arrays and plain objects. Non-data instances such as dates\n * and DOM refs are preserved unless their path or an ancestor is sensitive.\n * This is deliberately not a general-purpose serializer or secret detector.\n *\n * @param data - Form values or errors destined for Uniform diagnostics\n * @param paths - Sensitive field paths registered for this form\n * @returns A diagnostic copy with registered fields replaced, or the unchanged\n * primitive/non-data instance when no traversal is necessary\n */\nexport const redactDebugData = (\n data: unknown,\n paths: readonly string[],\n): unknown => {\n const sensitivePaths = new Set(\n paths.map((path) => {\n return path\n .replace(/\\[(\\d+)\\]/g, '.$1')\n .split('.')\n .filter((part) => {\n return part !== '__FLAT__';\n })\n .join('.');\n }),\n );\n // Track only the current recursion's ancestors. This breaks traversal cycles\n // without reusing a differently redacted copy at another field path.\n const copies = new WeakMap<object, unknown>();\n const visit = (value: unknown, path: string): unknown => {\n // Check before descending or returning an object reference: a sensitive\n // field must be replaced wholesale, even when its value is an object.\n if (sensitivePaths.has(path)) {\n return REDACTED;\n }\n if (!value || typeof value !== 'object') {\n return value;\n }\n const existing = copies.get(value);\n if (existing) {\n return existing;\n }\n if (Array.isArray(value)) {\n const copy: unknown[] = [];\n copies.set(value, copy);\n value.forEach((item, index) => {\n copy[index] = visit(item, path ? `${path}.${index}` : String(index));\n });\n copies.delete(value);\n return copy;\n }\n // Preserve non-data objects, such as dates and refs in non-sensitive errors.\n const prototype: unknown = Object.getPrototypeOf(value);\n if (prototype !== Object.prototype && prototype !== null) {\n return value;\n }\n const copy: Record<string, unknown> = {};\n copies.set(value, copy);\n Object.entries(value as Record<string, unknown>).forEach(([key, entry]) => {\n // Define an own property rather than assigning through __proto__ or any\n // inherited setter when copying arbitrary form-data keys.\n Object.defineProperty(copy, key, {\n value: visit(entry, path ? `${path}.${key}` : key),\n enumerable: true,\n writable: true,\n configurable: true,\n });\n });\n // Cache only ancestors for cycle handling: shared objects at other paths\n // need their own redaction pass because sensitivity belongs to the path.\n copies.delete(value);\n return copy;\n };\n return visit(data, '');\n};\n\n/**\n * Create an isolated, append-only sensitivity registry for one form instance.\n *\n * Only field paths and readiness are stored here; the registry does not retain\n * password values. Paths intentionally survive input unmounts, resets, and a\n * later sensitive=false declaration because RHF can retain the original value.\n * A new form instance gets a fresh registry; there is no cross-form path sharing.\n *\n * Snapshot objects stay referentially stable until metadata actually changes.\n * useSyncExternalStore depends on that stability to avoid repeated renders.\n */\nexport const createSensitiveFields = () => {\n let snapshot: { paths: readonly string[]; ready: boolean } = {\n paths: [],\n ready: false,\n };\n const listeners = new Set<() => void>();\n const notify = () => {\n listeners.forEach((listener) => {\n listener();\n });\n };\n return {\n /** Return the current stable metadata snapshot, without reading form values. */\n getSnapshot: () => {\n return snapshot;\n },\n /** Subscribe to metadata changes; cleanup removes the listener, not paths. */\n subscribe: (listener: () => void) => {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n },\n /** Mark a path once; duplicate registrations and Strict Mode repeats are safe. */\n register: (name: string) => {\n if (snapshot.paths.includes(name)) {\n return;\n }\n // RHF retains values for unmounted fields. Retain their sensitivity for\n // the form's lifetime too, so hiding an input never reveals its secret.\n snapshot = { ...snapshot, paths: [...snapshot.paths, name] };\n notify();\n },\n /** Allow the debug viewer to render after initial field registration finishes. */\n ready: () => {\n if (snapshot.ready) {\n return;\n }\n snapshot = { ...snapshot, ready: true };\n notify();\n },\n /** Use the latest paths for logs, even while the debug viewer is closed. */\n redact: (data: unknown) => {\n return redactDebugData(data, snapshot.paths);\n },\n };\n};\n\ntype SensitiveFields = ReturnType<typeof createSensitiveFields>;\n// An immutable-in-practice empty fallback supports isolated viewer tests and\n// consumers without this provider. useSensitiveField never writes to it, so it\n// cannot leak registrations between unrelated forms or component tests.\nconst defaultSensitiveFields = createSensitiveFields();\ndefaultSensitiveFields.ready();\nconst SensitiveFieldsContext = createContext<SensitiveFields | undefined>(\n undefined,\n);\n\n/**\n * Supply the form-owned registry and release the initial debug-render gate.\n *\n * React runs descendant layout effects before this provider's layout effect,\n * so initially mounted fields register before ready becomes true. The viewer\n * must not render raw values while ready is false, even if debug mode was\n * restored from localStorage before the form's first render.\n */\nexport const SensitiveFieldsProvider = ({\n children,\n registry,\n}: {\n children: ReactNode;\n registry: SensitiveFields;\n}) => {\n // Child layout effects register initial fields before debug data is shown.\n useLayoutEffect(() => {\n registry.ready();\n }, [registry]);\n return (\n <SensitiveFieldsContext.Provider value={registry}>\n {children}\n </SensitiveFieldsContext.Provider>\n );\n};\n\n/**\n * Register a field's sensitivity as declared by its renderer/shared field hook.\n *\n * Registration happens during commit, not render, so abandoned React renders\n * cannot mutate the registry. Layout timing makes new registrations available\n * before paint. Password detection uses the declared input type in\n * useUniformField, so toggling the rendered type to text does not reveal debug\n * values. Once registered, a path is never downgraded within this form instance.\n *\n * @param name - The field path used for form registration\n * @param sensitive - Whether the renderer declares this field sensitive\n */\nexport const useSensitiveField = (name: string, sensitive: boolean) => {\n const registry = useContext(SensitiveFieldsContext);\n useLayoutEffect(() => {\n if (sensitive) {\n registry?.register(name);\n }\n }, [registry, name, sensitive]);\n};\n\n/**\n * Observe sensitivity metadata for rendering diagnostic copies.\n *\n * This subscription contains neither passwords nor RHF's mutable value objects.\n * The debug viewer keeps its existing value subscription and applies these paths\n * when handing values/errors to Json; getValues and onSubmit stay untouched.\n * Callers must honor ready before exposing an initial diagnostic payload.\n */\nexport const useSensitiveDebug = () => {\n const registry = useContext(SensitiveFieldsContext) ?? defaultSensitiveFields;\n // Subscribe only to stable metadata snapshots, not RHF's mutable value objects.\n return useSyncExternalStore(\n registry.subscribe,\n registry.getSnapshot,\n registry.getSnapshot,\n );\n};\n","import type { FieldValues } from 'react-hook-form';\n\nimport { flatArrayKey } from '../nullishFields/nullishFields';\n\n/** Removes one path by copying only its ancestors, leaving stored values and array indices intact. */\nconst omitPath = (\n value: unknown,\n [key, ...rest]: readonly string[],\n): unknown => {\n if (\n !value ||\n typeof value !== 'object' ||\n key === undefined ||\n !Object.getOwnPropertyDescriptor(value, key)\n ) {\n return value;\n }\n\n // Preserve holes left by previously omitted array entries.\n const copy = (Array.isArray(value) ? value.slice() : { ...value }) as Record<\n string,\n unknown\n >;\n\n if (rest.length) {\n copy[key] = omitPath(copy[key], rest);\n } else {\n // Delete rather than splice so later array fields keep their indices.\n delete copy[key];\n }\n\n return copy;\n};\n\n/** Omits disabled fields from normalized validation/submission data without changing form state. */\nconst omitDisabledValues = (\n values: FieldValues,\n names: readonly string[],\n): FieldValues => {\n return names.reduce((data, name) => {\n // Match RHF names to normalized data, where flat-array wrappers are gone.\n const path = name\n .replace(/\\[(\\d+)\\]/g, '.$1')\n .split('.')\n .filter((part) => {\n return part !== flatArrayKey;\n });\n\n return omitPath(data, path) as FieldValues;\n }, values);\n};\n\nexport default omitDisabledValues;\n","import type {\n VetoFormattedError,\n VetoInstance,\n VetoTypeAny,\n} from '@fuf-stack/veto';\nimport type {\n Control,\n FieldErrors,\n FieldValues,\n ResolverResult,\n} from 'react-hook-form';\n\nimport { useCallback, useMemo, useRef, useState } from 'react';\n\nimport { and, veto } from '@fuf-stack/veto';\n\nimport { toValidationFormat } from '../../helpers';\nimport omitDisabledValues from '../../helpers/disabledFields/disabledFields';\n\n/**\n * Hook that manages client validation schemas state.\n *\n * Provides a centralized way to add/remove dynamic validation schemas\n * that can be combined with base form validation.\n *\n * @returns Object with client validation state and memoized setter function\n */\nexport const useClientValidationManager = () => {\n // Client validation schemas state\n const [clientValidationSchemas, setClientValidationSchemas] = useState<\n Record<string, VetoTypeAny>\n >({});\n\n // Memoized function to set/clear client validation schema\n const setClientValidationSchema = useMemo(() => {\n return (key: string, schema: VetoTypeAny | null) => {\n // update client validation schemas\n setClientValidationSchemas((prev) => {\n // if no schema and no existing client validation schema for this key, do nothing\n if (!prev[key] && !schema) {\n return prev;\n }\n // if no schema, remove the client validation schema for this key\n if (!schema) {\n const { [key]: _removed, ...rest } = prev;\n return rest;\n }\n // if schema, add or update the client validation schema for this key\n return { ...prev, [key]: schema };\n });\n };\n }, []);\n\n return {\n clientValidationSchemas,\n setClientValidationSchema,\n };\n};\n\n/**\n * Hook that creates an extended validation instance combining base Veto validation with dynamic client validation.\n *\n * @param baseValidation - Optional base Veto validation schema\n * @returns Combined validation instance and client schema setter\n */\nexport const useExtendedValidation = (baseValidation?: VetoInstance) => {\n // Setup client validation schemas\n const { clientValidationSchemas, setClientValidationSchema } =\n useClientValidationManager();\n\n // Create a stable dependency array from the client validation schemas\n const clientSchemaValues = useMemo<VetoTypeAny[]>(\n () => {\n const keys = Object.keys(clientValidationSchemas).sort();\n return keys\n .map((key) => {\n return clientValidationSchemas[key];\n })\n .filter((schema): schema is VetoTypeAny => {\n return Boolean(schema);\n });\n },\n // Include the object identity to react to schema instance updates with same shape\n [clientValidationSchemas],\n );\n\n // Memoized extended validation instance\n const extendedValidation = useMemo(\n () => {\n const hasBaseValidation = !!baseValidation;\n const hasClientSchemas = clientSchemaValues.length > 0;\n\n // If no base validation and no client schemas, return undefined\n if (!hasBaseValidation && !hasClientSchemas) {\n return undefined;\n }\n\n // If no client schemas, return base validation\n if (!hasClientSchemas) {\n return baseValidation;\n }\n\n // Combine client validation schemas\n const clientSchemasCombined =\n clientSchemaValues.reduce<VetoTypeAny | null>(\n (combined, clientSchema) => {\n return combined ? and(combined, clientSchema) : clientSchema;\n },\n null,\n );\n\n // return combined validation\n if (baseValidation && clientSchemasCombined) {\n // Put client validation first so dynamic/domain-specific messages\n // are returned before generic base validation errors.\n const baseSchema = baseValidation.schema as VetoTypeAny;\n return veto(and(clientSchemasCombined, baseSchema));\n }\n\n // If we only have client schemas, return them as a veto instance\n if (clientSchemasCombined) {\n return veto(clientSchemasCombined);\n }\n\n // This should not happen due to the conditions above, but just in case\n return baseValidation;\n },\n // Recompute when validation schema instances change\n [baseValidation, clientSchemaValues],\n );\n\n return {\n extendedValidation,\n setClientValidationSchema,\n };\n};\n\n/**\n * Render state for formatted validation errors produced by the resolver.\n *\n * `errors` is the value exposed through Uniform context. `hash` is the stable\n * comparison key used to avoid re-rendering context consumers when validation\n * returns an equivalent error object with a new identity.\n */\ninterface ValidationErrorsState {\n /** Formatted validation errors exposed to Uniform consumers. */\n errors: VetoFormattedError | undefined;\n /** JSON hash of `errors`, used as a cheap equality signal. */\n hash: string | undefined;\n}\n\n/**\n * Creates a React Hook Form resolver from an extended validation instance and\n * stores its latest formatted Veto errors as React state.\n *\n * Bind the owning RHF control before validation runs. Each resolver call omits\n * disabled values from normalized input and validated output while preserving\n * stored form values. The schema stays unchanged, so required fields can still\n * report missing-value errors and defaults cannot restore disabled output.\n *\n * Keeping the resolver errors in state lets Uniform context consumers re-render\n * when validation output changes, while the hash prevents repeated validations\n * with equivalent errors from causing unnecessary updates.\n *\n * @param extendedValidation - Extended validation instance from useExtendedValidation\n * @returns Resolver, validation error state, and a binder for the owning RHF control\n */\nexport const useFormResolver = (extendedValidation?: VetoInstance) => {\n const control = useRef<Control | null>(null);\n\n // Resolver options only contain the triggered fields. Bind the complete RHF\n // control so disabled siblings and registry changes after reset are visible.\n const bindControl = useCallback((instance: Control) => {\n control.current = instance;\n return () => {\n if (control.current === instance) {\n control.current = null;\n }\n };\n }, []);\n\n // Keep the latest resolver errors in React state so Uniform context consumers\n // re-render when validation output changes. The paired hash lets us skip the\n // state update when a resolver run returns equivalent errors.\n const [validationErrorsState, setValidationErrorsState] =\n useState<ValidationErrorsState>({\n errors: undefined,\n hash: undefined,\n });\n\n /**\n * Updates resolver error state only when the formatted validation result\n * actually changes. Veto/RHF may create new error objects for equivalent\n * validation output, so the hash is the guard against avoidable context\n * refreshes.\n */\n const updateValidationErrors = useCallback(\n (errors: VetoFormattedError | undefined): void => {\n const nextHash = JSON.stringify(errors);\n\n setValidationErrorsState((current) => {\n if (current.hash === nextHash) {\n return current;\n }\n\n return {\n errors,\n hash: nextHash,\n };\n });\n },\n [],\n );\n\n // Memoized resolver function for React Hook Form\n const resolver = useMemo(() => {\n if (!extendedValidation) {\n return undefined;\n }\n\n return async (values: FieldValues): Promise<ResolverResult> => {\n const validationValues = toValidationFormat(values) ?? {};\n\n // RHF exposes no public complete disabled registry; this relies on its\n // internal control structure and needs checking when upgrading RHF.\n // Use one snapshot even if a field changes state during async validation.\n const disabledFields = [...(control.current?._names.disabled ?? [])];\n\n // Omit values, not schema rules: required disabled fields must still fail.\n const validationInput = omitDisabledValues(\n validationValues,\n disabledFields,\n );\n const result = await extendedValidation.validateAsync(validationInput);\n updateValidationErrors(result.errors ?? undefined);\n\n // Omit disabled values again because schema defaults or transforms may\n // have added them back to the output.\n const submissionValues = omitDisabledValues(\n result.data ?? {},\n disabledFields,\n );\n\n if (result.errors) {\n // Uniform retains Veto's per-field arrays, the field-state adapter flattens them\n return { errors: result.errors as unknown as FieldErrors, values: {} };\n }\n\n return { errors: {}, values: submissionValues };\n };\n }, [extendedValidation, updateValidationErrors]);\n\n return {\n bindControl,\n resolver,\n validationErrors: validationErrorsState.errors,\n validationErrorsHash: validationErrorsState.hash,\n };\n};\n","import type {\n VetoFormattedError,\n VetoInstance,\n VetoTypeAny,\n} from '@fuf-stack/veto';\nimport type { BaseSyntheticEvent, ReactNode } from 'react';\nimport type { FieldValues, Path, SubmitHandler } from 'react-hook-form';\n\nimport React, {\n useCallback,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { FormProvider as HookFormProvider, useForm } from 'react-hook-form';\n\nimport createDebug from 'debug';\n\nimport { useLocalStorage } from '@fuf-stack/pixels';\n\nimport { toFormFormat, toSubmitFormat } from '../../helpers';\nimport { useExtendedValidation, useFormResolver } from './FormResolver';\nimport {\n createSensitiveFields,\n SensitiveFieldsProvider,\n} from './SensitiveFields';\n\nconst debug = createDebug('uniform:FormContext');\n\ntype DebugMode = 'debug' | 'debug-testids' | 'off' | 'disabled';\n\nexport interface DebugModeSettings {\n /** disable form debug completely */\n disable?: boolean;\n /** custom localStorage key to save debug mode state */\n localStorageKey?: string;\n}\n\n/** Listener function that gets called when a form reset is triggered */\nexport type FormResetListener = () => void;\n\n/**\n * Listener function that gets called when a field changes due to user input\n */\nexport type UserChangeListener<TFieldValues extends object = object> = (\n fieldName: Path<TFieldValues>,\n value: unknown,\n) => void;\n\nconst DEBUG_MODE_LOCAL_STORAGE_KEY_DEFAULT = 'uniform:debug-mode';\n\n/**\n * The `UniformContext` provides control over the form's submission behavior and may optionally include\n * a Veto validation schema for form validation.\n *\n * Specifically, this context offers:\n * 1. **Form Submission Control**: The `preventSubmit` function allows components to enable or disable\n * form submissions.\n * 2. **Optional Validation Schema**: The `validation` property may hold a Veto validation schema instance\n * that can be used to validate form fields and handle validation logic.\n * 3. **Client Validation**: The `setClientValidationSchema` function allows setting dynamic client-side\n * validation schemas that complement the base Veto validation.\n * 4. **User Change Tracking**: The `userChange` property provides a pub/sub system for tracking\n * user-initiated field changes (typing, clicking, selecting) - NOT programmatic changes like\n * form.reset() or form.setValue(). Used by the `useWatchUserChange` hook to enable reactive\n * field dependencies.\n * 5. **Form Reset Tracking**: The `formReset` property provides a pub/sub system for tracking\n * programmatic form resets triggered via the wrapped `reset()` from `useFormContext`.\n * Used by hooks like `useWatchFormReset` to run reset-specific normalization logic.\n *\n * This context is useful for components that need to interact with or control the form submission state,\n * or access the validation schema for managing form validation logic.\n *\n * IMPORTANT: Context Singleton Pattern for HMR (Hot Module Replacement)\n * =====================================================================\n *\n * We use a global window variable to ensure only ONE context instance exists across\n * hot module reloads during development. This is critical because:\n *\n * **The Problem:**\n * When using Vite/Storybook with Fast Refresh (HMR), editing this file causes it to\n * be re-evaluated. Each re-evaluation runs `React.createContext()` again, creating a\n * NEW context instance. This leads to \"context instance mismatch\":\n *\n * 1. FormProvider (provider) loads and uses context instance A\n * 2. File is edited, HMR triggers\n * 3. SubmitButton (consumer) hot-reloads and imports context instance B\n * 4. Provider writes to instance A, Consumer reads from instance B\n * 5. Result: Consumer sees default values (triggerSubmit = () => undefined)\n * 6. Clicking submit does nothing because it calls the empty default function\n *\n * **The Solution:**\n * By storing the context in `window.__UNIFORM_CONTEXT__`, we ensure:\n * - First load: Create context and store in window\n * - Subsequent HMRs: Reuse the same context from window\n * - All components always reference the SAME context instance\n * - Provider and consumers can properly communicate\n *\n * **Why This Is Safe:**\n * - Only affects development (production has no HMR)\n * - Context type never changes (same interface)\n * - React handles cleanup on unmount normally\n * - No memory leaks (context is lightweight)\n *\n * Without this pattern, you'd need to restart the dev server after every edit\n * to FormContext.tsx to ensure all components use the same context instance.\n */\n\n// Define the context type\ninterface UniformContextType {\n /** Form debug mode enabled or not */\n debugMode: DebugMode;\n /** settings for form debug mode */\n debugModeSettings?: DebugModeSettings;\n /** Form reset tracking (programmatic reset calls) */\n formReset: {\n /**\n * Subscribe to programmatic form resets.\n * Returns an unsubscribe function.\n */\n subscribe: (listener: FormResetListener) => () => void;\n /**\n * Notify all subscribers about a programmatic form reset.\n * Called from useFormContext when reset() is invoked.\n */\n notify: () => void;\n };\n /** Function to update if the form can currently be submitted */\n preventSubmit: (prevent: boolean) => void;\n /** Setter to enable or disable form debug mode */\n setDebugMode: (debugMode: DebugMode) => void;\n /** Function to trigger form submit programmatically */\n triggerSubmit: (e?: BaseSyntheticEvent) => Promise<void> | void;\n /** User change tracking (user input only, not programmatic changes) */\n userChange: {\n /**\n * Subscribe to user field changes.\n * Returns an unsubscribe function.\n */\n subscribe: (listener: UserChangeListener) => () => void;\n /**\n * Notify all subscribers about a user field change.\n * Called from useController when user interacts with a field.\n */\n notify: (fieldName: string, value: unknown) => void;\n };\n /** Form validation configuration */\n validation: {\n /** Base validation schema instance (without client validation) */\n baseInstance?: VetoInstance;\n /** Veto validation schema instance for form validation */\n instance?: VetoInstance;\n /** Current validation errors in form */\n errors?: VetoFormattedError;\n /** Function to set client validation schema for a specific key */\n setClientValidationSchema: (\n key: string,\n schema: VetoTypeAny | null,\n ) => void;\n };\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nif (!(window as any).__UNIFORM_CONTEXT__) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (window as any).__UNIFORM_CONTEXT__ = React.createContext<UniformContextType>(\n {\n debugMode: 'off',\n formReset: {\n subscribe: () => {\n return () => {\n return undefined;\n };\n },\n notify: () => {\n return undefined;\n },\n },\n preventSubmit: () => {\n return undefined;\n },\n setDebugMode: () => {\n return undefined;\n },\n triggerSubmit: () => {\n return undefined;\n },\n userChange: {\n subscribe: () => {\n return () => {\n return undefined;\n };\n },\n notify: () => {\n return undefined;\n },\n },\n validation: {\n setClientValidationSchema: () => {\n return undefined;\n },\n },\n },\n );\n debug('Creating new UniformContext instance');\n} else {\n debug(\n 'Reusing existing UniformContext instance from window.__UNIFORM_CONTEXT__',\n );\n}\n\n// Export the singleton context instance from window\n// This ensures all imports get the same context, even after HMR\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const UniformContext = (window as any)\n .__UNIFORM_CONTEXT__ as React.Context<UniformContextType>;\n\ndebug('UniformContext exported', {\n contextExists: !!UniformContext,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n windowContextExists: !!(window as any).__UNIFORM_CONTEXT__,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n contextsMatch: UniformContext === (window as any).__UNIFORM_CONTEXT__,\n});\n\n// Define props for the internal FormProvider component\ninterface FormProviderProps {\n /** children form render function */\n children: (childProps: {\n handleSubmit: (e?: BaseSyntheticEvent) => Promise<void>;\n isValid: boolean;\n }) => ReactNode;\n /** settings for form debug mode */\n debugModeSettings?: DebugModeSettings;\n /** initial form values */\n initialValues?: FieldValues;\n /** form submit handler */\n onSubmit: SubmitHandler<FieldValues>;\n /** Veto validation schema instance */\n validation?: VetoInstance;\n /** when the validation should be triggered */\n validationTrigger: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';\n}\n\n/**\n * FormProvider component provides:\n * - Veto validation schema context\n * - Resolver-backed validation error state\n * - RHF control binding for disabled-value omission without changing schema rules\n * - Client validation schema management\n * - Submit handler with automatic data conversion and submission control with preventSubmit\n * - Form Debug Mode state\n * - Form reset pub/sub notifications (`formReset`)\n * - User change pub/sub notifications (`userChange`)\n * - React Hook Form context\n */\nconst FormProvider: React.FC<FormProviderProps> = ({\n children,\n debugModeSettings = undefined,\n initialValues = undefined,\n onSubmit,\n validation: baseValidation = undefined,\n validationTrigger,\n}) => {\n const sensitiveFields = useMemo(() => {\n return createSensitiveFields();\n }, []);\n\n // Form Debug mode state is handled in the form context\n const [debugMode, setDebugMode] = useLocalStorage<DebugMode>(\n debugModeSettings?.localStorageKey ?? DEBUG_MODE_LOCAL_STORAGE_KEY_DEFAULT,\n 'off',\n );\n\n // Create extended validation combining base + client validations\n const { extendedValidation, setClientValidationSchema } =\n useExtendedValidation(baseValidation);\n\n // Create resolver from extended validation + reactive validation error state\n const { bindControl, resolver, validationErrors, validationErrorsHash } =\n useFormResolver(extendedValidation);\n\n // Initialize react hook form with the resolver\n const methods = useForm({\n defaultValues: initialValues ? toFormFormat(initialValues) : initialValues,\n // set rhf mode\n // see: https://react-hook-form.com/docs/useform#mode\n mode: validationTrigger,\n resolver,\n });\n\n // The resolver is created before useForm, so bind its control afterwards,\n // before RHF's passive effects can trigger validation.\n useLayoutEffect(() => {\n return bindControl(methods.control);\n }, [bindControl, methods.control]);\n\n // Get isValid from React Hook Form's formState\n const isValid = methods.formState?.isValid;\n\n // Control if the form can currently be submitted\n const [preventSubmit, setPreventSubmit] = useState(false);\n\n // Form reset listener registry (stored in ref to avoid re-renders)\n const formResetListenersRef = useRef<Set<FormResetListener>>(new Set());\n\n // Subscribe to form reset notifications\n const subscribeFormReset = useCallback(\n (listener: FormResetListener): (() => void) => {\n formResetListenersRef.current.add(listener);\n return () => {\n formResetListenersRef.current.delete(listener);\n };\n },\n [],\n );\n\n // Notify all subscribers about a programmatic form reset\n const notifyFormReset = useCallback((): void => {\n formResetListenersRef.current.forEach((listener) => {\n listener();\n });\n }, []);\n\n // User change listener registry (stored in ref to avoid re-renders)\n const userChangeListenersRef = useRef<Set<UserChangeListener>>(new Set());\n\n // Subscribe to user changes\n const subscribeUserChange = useCallback(\n (listener: UserChangeListener): (() => void) => {\n userChangeListenersRef.current.add(listener);\n // Return cleanup function to unsubscribe\n return () => {\n userChangeListenersRef.current.delete(listener);\n };\n },\n [],\n );\n\n // Notify all subscribers about user change\n const notifyUserChange = useCallback(\n (fieldName: string, value: unknown): void => {\n // Notify all registered listeners\n userChangeListenersRef.current.forEach((listener) => {\n listener(fieldName as Path<object>, value);\n });\n },\n [],\n );\n\n // Create submit handler with automatic data conversion\n // eslint-disable-next-line consistent-return\n const handleSubmit = async (e?: React.BaseSyntheticEvent) => {\n debug('handleSubmit called', {\n preventSubmit,\n formStateIsValid: methods.formState.isValid,\n validationErrors: sensitiveFields.redact(methods.formState.errors),\n validationTrigger,\n formValues: sensitiveFields.redact(methods.getValues()),\n });\n\n // only prevent submit when form state is valid, because otherwise\n // submit will only trigger validation and add errors / focus invalid fields\n if (methods.formState.isValid && preventSubmit) {\n debug('⛔ Form submit PREVENTED', {\n formStateIsValid: methods.formState.isValid,\n preventSubmit,\n });\n console.warn(\n '[FormProvider] form submit was prevented because preventSubmit is true...',\n );\n e?.preventDefault();\n return Promise.resolve();\n }\n\n debug('✓ Form submit ALLOWED', {\n formStateIsValid: methods.formState.isValid,\n preventSubmit,\n reason: !methods.formState.isValid\n ? 'Form is invalid (will trigger validation and show errors)'\n : 'Form is valid and preventSubmit is false',\n });\n\n // Convert form data to submission format:\n // - Unwrap flat array wrappers and convert markers\n // - Remove empty strings, nulls, empty arrays, and empty objects\n const wrappedOnSubmit = (data: FieldValues, event?: BaseSyntheticEvent) => {\n const submitData = toSubmitFormat(data) ?? {};\n debug('onSubmit callback called', {\n // Match sensitive paths before removing empty rows shifts array indices.\n submitData:\n toSubmitFormat(sensitiveFields.redact(data) as FieldValues) ?? {},\n });\n return onSubmit(submitData, event);\n };\n\n await methods.handleSubmit(wrappedOnSubmit)(e);\n\n debug('handleSubmit completed');\n };\n\n // Memoize the context value so consumers only re-render when context-relevant\n // state changes, including resolver-backed validation errors.\n const contextValue = useMemo(\n () => {\n return {\n // set debugMode to disabled when debugModeSettings.disable is true\n // otherwise use current debug mode from localStorage\n debugMode: debugModeSettings?.disable ? 'disabled' : debugMode,\n preventSubmit: (prevent: boolean) => {\n debug('preventSubmit called', {\n previousValue: preventSubmit,\n newValue: prevent,\n formStateIsValid: methods.formState.isValid,\n validationErrors: sensitiveFields.redact(methods.formState.errors),\n });\n setPreventSubmit(prevent);\n },\n setClientValidationSchema,\n setDebugMode,\n triggerSubmit: handleSubmit,\n formReset: {\n subscribe: subscribeFormReset,\n notify: notifyFormReset,\n },\n userChange: {\n subscribe: subscribeUserChange,\n notify: notifyUserChange,\n },\n validation: {\n baseInstance: baseValidation,\n instance: extendedValidation,\n errors: validationErrors,\n setClientValidationSchema,\n },\n };\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [debugMode, debugModeSettings?.disable, validationErrorsHash],\n );\n\n return (\n <SensitiveFieldsProvider registry={sensitiveFields}>\n <UniformContext.Provider value={contextValue}>\n {/* Spread all hook form props into HookFormProvider */}\n <HookFormProvider {...methods}>\n {children({ handleSubmit, isValid })}\n </HookFormProvider>\n </UniformContext.Provider>\n </SensitiveFieldsProvider>\n );\n};\n\nexport default FormProvider;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;AAuBjB,MAAa,mBACX,MACA,UACY;CACZ,MAAM,iBAAiB,IAAI,IACzB,MAAM,KAAK,SAAS;EAClB,OAAO,KACJ,QAAQ,cAAc,KAAK,CAAC,CAC5B,MAAM,GAAG,CAAC,CACV,QAAQ,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AQ,UAAU,UACvB,8DACA;EACN,CAAC;EAKD,MAAM,mBAAmB,MAAmB,UAA+B;GACzE,MAAM,aAAa,eAAe,IAAI,KAAK,CAAC;GAC5C,MAAM,4BAA4B,EAEhC,YACE,eAAe,gBAAgB,OAAO,IAAI,CAAgB,KAAK,CAAC,EACpE,CAAC;GACD,OAAO,SAAS,YAAY,KAAK;EACnC;EAEA,MAAM,QAAQ,aAAa,eAAe,CAAC,CAAC,CAAC;EAE7C,MAAM,wBAAwB;CAChC;CAIA,MAAM,eAAe,cACb;EACJ,OAAO;GAGL,WAAW,mBAAmB,UAAU,aAAa;GACrD,gBAAgB,YAAqB;IACnC,MAAM,wBAAwB;KAC5B,eAAe;KACf,UAAU;KACV,kBAAkB,QAAQ,UAAU;KACpC,kBAAkB,gBAAgB,OAAO,QAAQ,UAAU,MAAM;IACnE,CAAC;IACD,iBAAiB,OAAO;GAC1B;GACA;GACA;GACA,eAAe;GACf,WAAW;IACT,WAAW;IACX,QAAQ;GACV;GACA,YAAY;IACV,WAAW;IACX,QAAQ;GACV;GACA,YAAY;IACV,cAAc;IACd,UAAU;IACV,QAAQ;IACR;GACF;EACF;CACF,GAEA;EAAC;EAAW,mBAAmB;EAAS;CAAoB,CAC9D;CAEA,OACE,oBAAC,yBAAD;EAAyB,UAAU;EACjC,UAAA,oBAAC,eAAe,UAAhB;GAAyB,OAAO;GAE9B,UAAA,oBAACA,gBAAD;IAAkB,GAAI;IACnB,UAAA,SAAS;KAAE;KAAc;IAAQ,CAAC;GACnB,CAAA;EACK,CAAA;CACF,CAAA;AAE7B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { BaseSyntheticEvent
|
|
2
|
-
import {
|
|
1
|
+
import React, { BaseSyntheticEvent } from "react";
|
|
2
|
+
import { Path } from "react-hook-form";
|
|
3
3
|
import { VetoFormattedError, VetoInstance, VetoTypeAny } from "@fuf-stack/veto";
|
|
4
4
|
type DebugMode = 'debug' | 'debug-testids' | 'off' | 'disabled';
|
|
5
5
|
interface DebugModeSettings {
|
|
@@ -121,4 +121,4 @@ interface UniformContextType {
|
|
|
121
121
|
}
|
|
122
122
|
declare const UniformContext: React.Context<UniformContextType>;
|
|
123
123
|
export { UniformContext as n, DebugModeSettings as t };
|
|
124
|
-
//# sourceMappingURL=FormContext-
|
|
124
|
+
//# sourceMappingURL=FormContext-Dvt3MiKq.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormContext-
|
|
1
|
+
{"version":3,"file":"FormContext-Dvt3MiKq.d.mts","names":[],"sources":["../src/Form/subcomponents/FormContext.tsx"],"mappings":";;;KA8BK;UAEY;;EAEf;;EAEA;;;KAIU;;;;KAKA,mBAAmB,yCAC7B,WAAW,KAAK,eAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA+DQ;;EAER,WAAW;;EAEX,oBAAoB;;EAEpB;;;;;IAKE,YAAY,UAAU;;;;;IAKtB;;;EAGF,gBAAgB;;EAEhB,eAAe,WAAW;;EAE1B,gBAAgB,IAAI,uBAAuB;;EAE3C;;;;;IAKE,YAAY,UAAU;;;;;IAKtB,SAAS,mBAAmB;;;EAG9B;;IAEE,eAAe;;IAEf,WAAW;;IAEX,SAAS;;IAET,4BACE,aACA,QAAQ;;;cAyDD,gBACa,MAAM,QAAQ"}
|
package/dist/Input/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as InputValueTransform } from "../index-cevZBrIN.mjs";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
|
-
import { TVClassName
|
|
3
|
+
import { TVClassName } from "@fuf-stack/pixel-utils";
|
|
4
4
|
/** Default styles for all public Input slots */
|
|
5
5
|
export declare const inputVariants: ((props?: ({
|
|
6
6
|
[x: string]: string | number | undefined;
|
|
@@ -22,12 +22,12 @@ export declare const inputVariants: ((props?: ({
|
|
|
22
22
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
23
23
|
})) | ({
|
|
24
24
|
number?: boolean | undefined;
|
|
25
|
-
password?: boolean | undefined;
|
|
26
|
-
size?: "md" | "sm" | "lg" | undefined;
|
|
27
25
|
invalid?: boolean | undefined;
|
|
28
|
-
|
|
26
|
+
password?: boolean | undefined;
|
|
29
27
|
disabled?: boolean | undefined;
|
|
28
|
+
readOnly?: boolean | undefined;
|
|
30
29
|
filled?: boolean | undefined;
|
|
30
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
31
31
|
clearable?: boolean | undefined;
|
|
32
32
|
} & ({
|
|
33
33
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -56,12 +56,12 @@ export declare const inputVariants: ((props?: ({
|
|
|
56
56
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
57
57
|
})) | ({
|
|
58
58
|
number?: boolean | undefined;
|
|
59
|
-
password?: boolean | undefined;
|
|
60
|
-
size?: "md" | "sm" | "lg" | undefined;
|
|
61
59
|
invalid?: boolean | undefined;
|
|
62
|
-
|
|
60
|
+
password?: boolean | undefined;
|
|
63
61
|
disabled?: boolean | undefined;
|
|
62
|
+
readOnly?: boolean | undefined;
|
|
64
63
|
filled?: boolean | undefined;
|
|
64
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
65
65
|
clearable?: boolean | undefined;
|
|
66
66
|
} & ({
|
|
67
67
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -90,12 +90,12 @@ export declare const inputVariants: ((props?: ({
|
|
|
90
90
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
91
91
|
})) | ({
|
|
92
92
|
number?: boolean | undefined;
|
|
93
|
-
password?: boolean | undefined;
|
|
94
|
-
size?: "md" | "sm" | "lg" | undefined;
|
|
95
93
|
invalid?: boolean | undefined;
|
|
96
|
-
|
|
94
|
+
password?: boolean | undefined;
|
|
97
95
|
disabled?: boolean | undefined;
|
|
96
|
+
readOnly?: boolean | undefined;
|
|
98
97
|
filled?: boolean | undefined;
|
|
98
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
99
99
|
clearable?: boolean | undefined;
|
|
100
100
|
} & ({
|
|
101
101
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -124,12 +124,12 @@ export declare const inputVariants: ((props?: ({
|
|
|
124
124
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
125
125
|
})) | ({
|
|
126
126
|
number?: boolean | undefined;
|
|
127
|
-
password?: boolean | undefined;
|
|
128
|
-
size?: "md" | "sm" | "lg" | undefined;
|
|
129
127
|
invalid?: boolean | undefined;
|
|
130
|
-
|
|
128
|
+
password?: boolean | undefined;
|
|
131
129
|
disabled?: boolean | undefined;
|
|
130
|
+
readOnly?: boolean | undefined;
|
|
132
131
|
filled?: boolean | undefined;
|
|
132
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
133
133
|
clearable?: boolean | undefined;
|
|
134
134
|
} & ({
|
|
135
135
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -159,12 +159,12 @@ export declare const inputVariants: ((props?: ({
|
|
|
159
159
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
160
160
|
})) | ({
|
|
161
161
|
number?: boolean | undefined;
|
|
162
|
-
password?: boolean | undefined;
|
|
163
|
-
size?: "md" | "sm" | "lg" | undefined;
|
|
164
162
|
invalid?: boolean | undefined;
|
|
165
|
-
|
|
163
|
+
password?: boolean | undefined;
|
|
166
164
|
disabled?: boolean | undefined;
|
|
165
|
+
readOnly?: boolean | undefined;
|
|
167
166
|
filled?: boolean | undefined;
|
|
167
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
168
168
|
clearable?: boolean | undefined;
|
|
169
169
|
} & ({
|
|
170
170
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -193,12 +193,12 @@ export declare const inputVariants: ((props?: ({
|
|
|
193
193
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
194
194
|
})) | ({
|
|
195
195
|
number?: boolean | undefined;
|
|
196
|
-
password?: boolean | undefined;
|
|
197
|
-
size?: "md" | "sm" | "lg" | undefined;
|
|
198
196
|
invalid?: boolean | undefined;
|
|
199
|
-
|
|
197
|
+
password?: boolean | undefined;
|
|
200
198
|
disabled?: boolean | undefined;
|
|
199
|
+
readOnly?: boolean | undefined;
|
|
201
200
|
filled?: boolean | undefined;
|
|
201
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
202
202
|
clearable?: boolean | undefined;
|
|
203
203
|
} & ({
|
|
204
204
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -227,12 +227,12 @@ export declare const inputVariants: ((props?: ({
|
|
|
227
227
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
228
228
|
})) | ({
|
|
229
229
|
number?: boolean | undefined;
|
|
230
|
-
password?: boolean | undefined;
|
|
231
|
-
size?: "md" | "sm" | "lg" | undefined;
|
|
232
230
|
invalid?: boolean | undefined;
|
|
233
|
-
|
|
231
|
+
password?: boolean | undefined;
|
|
234
232
|
disabled?: boolean | undefined;
|
|
233
|
+
readOnly?: boolean | undefined;
|
|
235
234
|
filled?: boolean | undefined;
|
|
235
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
236
236
|
clearable?: boolean | undefined;
|
|
237
237
|
} & ({
|
|
238
238
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -261,12 +261,12 @@ export declare const inputVariants: ((props?: ({
|
|
|
261
261
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
262
262
|
})) | ({
|
|
263
263
|
number?: boolean | undefined;
|
|
264
|
-
password?: boolean | undefined;
|
|
265
|
-
size?: "md" | "sm" | "lg" | undefined;
|
|
266
264
|
invalid?: boolean | undefined;
|
|
267
|
-
|
|
265
|
+
password?: boolean | undefined;
|
|
268
266
|
disabled?: boolean | undefined;
|
|
267
|
+
readOnly?: boolean | undefined;
|
|
269
268
|
filled?: boolean | undefined;
|
|
269
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
270
270
|
clearable?: boolean | undefined;
|
|
271
271
|
} & ({
|
|
272
272
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -295,12 +295,12 @@ export declare const inputVariants: ((props?: ({
|
|
|
295
295
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
296
296
|
})) | ({
|
|
297
297
|
number?: boolean | undefined;
|
|
298
|
-
password?: boolean | undefined;
|
|
299
|
-
size?: "md" | "sm" | "lg" | undefined;
|
|
300
298
|
invalid?: boolean | undefined;
|
|
301
|
-
|
|
299
|
+
password?: boolean | undefined;
|
|
302
300
|
disabled?: boolean | undefined;
|
|
301
|
+
readOnly?: boolean | undefined;
|
|
303
302
|
filled?: boolean | undefined;
|
|
303
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
304
304
|
clearable?: boolean | undefined;
|
|
305
305
|
} & ({
|
|
306
306
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -329,12 +329,12 @@ export declare const inputVariants: ((props?: ({
|
|
|
329
329
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
330
330
|
})) | ({
|
|
331
331
|
number?: boolean | undefined;
|
|
332
|
-
password?: boolean | undefined;
|
|
333
|
-
size?: "md" | "sm" | "lg" | undefined;
|
|
334
332
|
invalid?: boolean | undefined;
|
|
335
|
-
|
|
333
|
+
password?: boolean | undefined;
|
|
336
334
|
disabled?: boolean | undefined;
|
|
335
|
+
readOnly?: boolean | undefined;
|
|
337
336
|
filled?: boolean | undefined;
|
|
337
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
338
338
|
clearable?: boolean | undefined;
|
|
339
339
|
} & ({
|
|
340
340
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -363,12 +363,12 @@ export declare const inputVariants: ((props?: ({
|
|
|
363
363
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
364
364
|
})) | ({
|
|
365
365
|
number?: boolean | undefined;
|
|
366
|
-
password?: boolean | undefined;
|
|
367
|
-
size?: "md" | "sm" | "lg" | undefined;
|
|
368
366
|
invalid?: boolean | undefined;
|
|
369
|
-
|
|
367
|
+
password?: boolean | undefined;
|
|
370
368
|
disabled?: boolean | undefined;
|
|
369
|
+
readOnly?: boolean | undefined;
|
|
371
370
|
filled?: boolean | undefined;
|
|
371
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
372
372
|
clearable?: boolean | undefined;
|
|
373
373
|
} & ({
|
|
374
374
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -397,12 +397,12 @@ export declare const inputVariants: ((props?: ({
|
|
|
397
397
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
398
398
|
})) | ({
|
|
399
399
|
number?: boolean | undefined;
|
|
400
|
-
password?: boolean | undefined;
|
|
401
|
-
size?: "md" | "sm" | "lg" | undefined;
|
|
402
400
|
invalid?: boolean | undefined;
|
|
403
|
-
|
|
401
|
+
password?: boolean | undefined;
|
|
404
402
|
disabled?: boolean | undefined;
|
|
403
|
+
readOnly?: boolean | undefined;
|
|
405
404
|
filled?: boolean | undefined;
|
|
405
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
406
406
|
clearable?: boolean | undefined;
|
|
407
407
|
} & ({
|
|
408
408
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -431,12 +431,12 @@ export declare const inputVariants: ((props?: ({
|
|
|
431
431
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
432
432
|
})) | ({
|
|
433
433
|
number?: boolean | undefined;
|
|
434
|
-
password?: boolean | undefined;
|
|
435
|
-
size?: "md" | "sm" | "lg" | undefined;
|
|
436
434
|
invalid?: boolean | undefined;
|
|
437
|
-
|
|
435
|
+
password?: boolean | undefined;
|
|
438
436
|
disabled?: boolean | undefined;
|
|
437
|
+
readOnly?: boolean | undefined;
|
|
439
438
|
filled?: boolean | undefined;
|
|
439
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
440
440
|
clearable?: boolean | undefined;
|
|
441
441
|
} & ({
|
|
442
442
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -944,7 +944,7 @@ export declare const inputVariants: ((props?: ({
|
|
|
944
944
|
class?: never;
|
|
945
945
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
946
946
|
}))))[];
|
|
947
|
-
variantKeys:
|
|
947
|
+
variantKeys: (string | number)[] | never[];
|
|
948
948
|
};
|
|
949
949
|
base: undefined;
|
|
950
950
|
slots: {
|
|
@@ -1025,29 +1025,29 @@ export declare const inputVariants: ((props?: ({
|
|
|
1025
1025
|
};
|
|
1026
1026
|
defaultVariants: {
|
|
1027
1027
|
number?: boolean | undefined;
|
|
1028
|
-
password?: boolean | undefined;
|
|
1029
|
-
size?: "md" | "sm" | "lg" | undefined;
|
|
1030
1028
|
invalid?: boolean | undefined;
|
|
1031
|
-
|
|
1029
|
+
password?: boolean | undefined;
|
|
1032
1030
|
disabled?: boolean | undefined;
|
|
1031
|
+
readOnly?: boolean | undefined;
|
|
1033
1032
|
filled?: boolean | undefined;
|
|
1033
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
1034
1034
|
clearable?: boolean | undefined;
|
|
1035
1035
|
};
|
|
1036
1036
|
compoundVariants: ({
|
|
1037
1037
|
number?: boolean | boolean[] | undefined;
|
|
1038
|
-
password?: boolean | boolean[] | undefined;
|
|
1039
|
-
size?: "md" | "sm" | "lg" | ("md" | "sm" | "lg")[] | undefined;
|
|
1040
1038
|
invalid?: boolean | boolean[] | undefined;
|
|
1041
|
-
|
|
1039
|
+
password?: boolean | boolean[] | undefined;
|
|
1042
1040
|
disabled?: boolean | boolean[] | undefined;
|
|
1041
|
+
readOnly?: boolean | boolean[] | undefined;
|
|
1043
1042
|
filled?: boolean | boolean[] | undefined;
|
|
1043
|
+
size?: "sm" | "md" | "lg" | ("sm" | "md" | "lg")[] | undefined;
|
|
1044
1044
|
clearable?: boolean | boolean[] | undefined;
|
|
1045
1045
|
} & ({
|
|
1046
1046
|
class?: (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined) | {
|
|
1047
|
-
input?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
1048
1047
|
base?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
1049
1048
|
label?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
1050
1049
|
innerWrapper?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
1050
|
+
input?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
1051
1051
|
inputWrapper?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
1052
1052
|
clearButton?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
1053
1053
|
passwordToggle?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -1058,10 +1058,10 @@ export declare const inputVariants: ((props?: ({
|
|
|
1058
1058
|
} | {
|
|
1059
1059
|
class?: never;
|
|
1060
1060
|
className?: (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined) | {
|
|
1061
|
-
input?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
1062
1061
|
base?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
1063
1062
|
label?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
1064
1063
|
innerWrapper?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
1064
|
+
input?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
1065
1065
|
inputWrapper?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
1066
1066
|
clearButton?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
1067
1067
|
passwordToggle?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -1070,13 +1070,13 @@ export declare const inputVariants: ((props?: ({
|
|
|
1070
1070
|
};
|
|
1071
1071
|
}))[];
|
|
1072
1072
|
compoundSlots: ({
|
|
1073
|
-
slots: ("
|
|
1073
|
+
slots: ("base" | "label" | "innerWrapper" | "input" | "inputWrapper" | "clearButton" | "passwordToggle" | "stepper" | "stepperButton")[];
|
|
1074
1074
|
} & ({
|
|
1075
1075
|
filled?: boolean | boolean[] | undefined;
|
|
1076
1076
|
number?: boolean | boolean[] | undefined;
|
|
1077
1077
|
password?: boolean | boolean[] | undefined;
|
|
1078
1078
|
clearable?: boolean | boolean[] | undefined;
|
|
1079
|
-
size?: "
|
|
1079
|
+
size?: "sm" | "md" | "lg" | ("sm" | "md" | "lg")[] | undefined;
|
|
1080
1080
|
disabled?: boolean | boolean[] | undefined;
|
|
1081
1081
|
readOnly?: boolean | boolean[] | undefined;
|
|
1082
1082
|
invalid?: boolean | boolean[] | undefined;
|
|
@@ -1087,7 +1087,7 @@ export declare const inputVariants: ((props?: ({
|
|
|
1087
1087
|
class?: never;
|
|
1088
1088
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
1089
1089
|
})))[];
|
|
1090
|
-
variantKeys: ("number" | "
|
|
1090
|
+
variantKeys: ("number" | "invalid" | "password" | "disabled" | "readOnly" | "filled" | "size" | "clearable")[];
|
|
1091
1091
|
};
|
|
1092
1092
|
/** Class name overrides for the public Input styling slots. */
|
|
1093
1093
|
type ClassName = TVClassName<typeof inputVariants>;
|
package/dist/Input/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useInputValueDebounce } from "../hooks/useInputValueDebounce/index.mjs";
|
|
2
|
-
import { t as useUniformField } from "../useUniformField-
|
|
2
|
+
import { t as useUniformField } from "../useUniformField-BvPoQyLL.mjs";
|
|
3
3
|
import { t as FieldLayout } from "../FieldLayout-C9MEBZAC.mjs";
|
|
4
4
|
import { t as fieldHelperVariants } from "../fieldHelperVariants-ClP8taiS.mjs";
|
|
5
5
|
import { t as fieldLabelVariants } from "../fieldLabelVariants-C4ZqECec.mjs";
|
|
@@ -9,7 +9,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
import { tv } from "@fuf-stack/pixel-utils";
|
|
10
10
|
import { FaEye, FaEyeSlash } from "react-icons/fa6";
|
|
11
11
|
import { useStyling } from "@fuf-stack/pixels/StylingProvider";
|
|
12
|
-
import { Button, Group, Input, NumberField, TextField } from "react-aria-components";
|
|
12
|
+
import { Button, Group, Input as Input$1, NumberField, TextField } from "react-aria-components";
|
|
13
13
|
import { useFocusRing } from "react-aria/useFocusRing";
|
|
14
14
|
import { useObjectRef } from "react-aria/useObjectRef";
|
|
15
15
|
// src/Input/inputVariants.ts
|
|
@@ -93,7 +93,7 @@ const inputVariants = tv({
|
|
|
93
93
|
* @see https://react-aria.adobe.com/TextField
|
|
94
94
|
* @see https://react-aria.adobe.com/NumberField
|
|
95
95
|
*/
|
|
96
|
-
const InputField = ({ field, type, children, className = void 0, focused, hasValue, isFocusVisible }) => {
|
|
96
|
+
const InputField = ({ field, type = "text", children, className = void 0, focused, hasValue, isFocusVisible }) => {
|
|
97
97
|
const { disabled, invalid, name, onBlur, onChange: onValueChange, readOnly, required, value } = field;
|
|
98
98
|
const controlProps = getFieldControlProps(field);
|
|
99
99
|
const dataAttributes = getFieldDataAttributes(field);
|
|
@@ -130,7 +130,7 @@ const InputField = ({ field, type, children, className = void 0, focused, hasVal
|
|
|
130
130
|
return /* @__PURE__ */ jsx(TextField, {
|
|
131
131
|
...rootProps,
|
|
132
132
|
onChange: onValueChange,
|
|
133
|
-
type
|
|
133
|
+
type,
|
|
134
134
|
value: String(value ?? ""),
|
|
135
135
|
children
|
|
136
136
|
});
|
|
@@ -268,7 +268,7 @@ const InputWrapper = ({ field, clearable = false, endContent, hidePasswordToggle
|
|
|
268
268
|
"data-slot": "inner-wrapper",
|
|
269
269
|
children: [
|
|
270
270
|
startContent,
|
|
271
|
-
/* @__PURE__ */ jsx(Input, {
|
|
271
|
+
/* @__PURE__ */ jsx(Input$1, {
|
|
272
272
|
...controlProps,
|
|
273
273
|
ref: inputRef,
|
|
274
274
|
autoComplete: "off",
|
|
@@ -315,8 +315,8 @@ const InputWrapper = ({ field, clearable = false, endContent, hidePasswordToggle
|
|
|
315
315
|
* @see https://react-aria.adobe.com/TextField
|
|
316
316
|
* @see https://react-aria.adobe.com/NumberField
|
|
317
317
|
*/
|
|
318
|
-
const InputControl = (props) => {
|
|
319
|
-
const { field
|
|
318
|
+
const InputControl = ({ subscribeReset = void 0, ...props }) => {
|
|
319
|
+
const { field } = props;
|
|
320
320
|
const styling = useStyling();
|
|
321
321
|
const [passwordVisible, setPasswordVisible] = useState(false);
|
|
322
322
|
useEffect(() => {
|
|
@@ -393,7 +393,7 @@ const InputControl = (props) => {
|
|
|
393
393
|
};
|
|
394
394
|
// src/Input/Input.tsx
|
|
395
395
|
/** Form input field for text, passwords or numbers */
|
|
396
|
-
const Input
|
|
396
|
+
const Input = ({ className = void 0, clearable = false, debounceDelay = 300, endContent = void 0, startContent = void 0, size = "md", type = void 0, hidePasswordToggle = false, name, onClear = void 0, placeholder = " ", ...uniformProps }) => {
|
|
397
397
|
const { field, formReset } = useUniformField({
|
|
398
398
|
...uniformProps,
|
|
399
399
|
name,
|
|
@@ -409,7 +409,6 @@ const Input$1 = ({ className = void 0, clearable = false, debounceDelay = 300, e
|
|
|
409
409
|
value: field.value
|
|
410
410
|
});
|
|
411
411
|
return /* @__PURE__ */ jsx(InputControl, {
|
|
412
|
-
hidePasswordToggle,
|
|
413
412
|
className,
|
|
414
413
|
clearable,
|
|
415
414
|
endContent,
|
|
@@ -419,6 +418,7 @@ const Input$1 = ({ className = void 0, clearable = false, debounceDelay = 300, e
|
|
|
419
418
|
onChange,
|
|
420
419
|
value
|
|
421
420
|
},
|
|
421
|
+
hidePasswordToggle,
|
|
422
422
|
onClear,
|
|
423
423
|
onReset: clear,
|
|
424
424
|
placeholder,
|
|
@@ -429,7 +429,7 @@ const Input$1 = ({ className = void 0, clearable = false, debounceDelay = 300, e
|
|
|
429
429
|
}, `${name}-${type}-${hidePasswordToggle}`);
|
|
430
430
|
};
|
|
431
431
|
// src/Input/index.ts
|
|
432
|
-
var Input_default = Input
|
|
432
|
+
var Input_default = Input;
|
|
433
433
|
export { Input_default as default, inputVariants };
|
|
434
434
|
|
|
435
435
|
//# sourceMappingURL=index.mjs.map
|