@zayne-labs/ui-react 0.10.43 → 0.10.45

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.
Files changed (46) hide show
  1. package/dist/esm/{client-gate-Cw8xLDk7.js → client-gate-B3fRopBx.js} +1 -1
  2. package/dist/esm/{client-gate-Cw8xLDk7.js.map → client-gate-B3fRopBx.js.map} +1 -1
  3. package/dist/esm/{cn-CRgXviN7.js → cn-Dnsqr-G7.js} +1 -1
  4. package/dist/esm/{cn-CRgXviN7.js.map → cn-Dnsqr-G7.js.map} +1 -1
  5. package/dist/esm/common/await/index.d.ts +6 -6
  6. package/dist/esm/common/await/index.js +3 -3
  7. package/dist/esm/common/client-gate/index.d.ts +2 -2
  8. package/dist/esm/common/client-gate/index.js +1 -1
  9. package/dist/esm/common/error-boundary/index.d.ts +1 -1
  10. package/dist/esm/common/error-boundary/index.js +1 -1
  11. package/dist/esm/common/for/index.d.ts +4 -4
  12. package/dist/esm/common/for/index.js +1 -1
  13. package/dist/esm/common/presence/index.d.ts +2 -2
  14. package/dist/esm/common/presence/index.js +1 -1
  15. package/dist/esm/common/show/index.d.ts +4 -4
  16. package/dist/esm/common/show/index.js +1 -1
  17. package/dist/esm/common/slot/index.d.ts +4 -4
  18. package/dist/esm/common/slot/index.js +1 -1
  19. package/dist/esm/common/suspense-with-boundary/index.d.ts +2 -2
  20. package/dist/esm/common/suspense-with-boundary/index.js +1 -1
  21. package/dist/esm/common/switch/index.d.ts +4 -4
  22. package/dist/esm/common/teleport/index.d.ts +1 -1
  23. package/dist/esm/common/teleport/index.js +3 -4
  24. package/dist/esm/common/teleport/index.js.map +1 -1
  25. package/dist/esm/{error-boundary-d5gAkevd.js → error-boundary-TM4xzQfq.js} +2 -2
  26. package/dist/esm/{error-boundary-d5gAkevd.js.map → error-boundary-TM4xzQfq.js.map} +1 -1
  27. package/dist/esm/{for-DsdwXl8s.js → for-BeCRb3k2.js} +1 -1
  28. package/dist/esm/{for-DsdwXl8s.js.map → for-BeCRb3k2.js.map} +1 -1
  29. package/dist/esm/{index-B18eyjt6.d.ts → index-Dvt8y6Uu.d.ts} +6 -6
  30. package/dist/esm/{index-TuD6cvBZ.d.ts → index-DzMX8Xce.d.ts} +4 -4
  31. package/dist/esm/{presence-C2HmLiVc.js → presence-Ctp-Trws.js} +3 -3
  32. package/dist/esm/{presence-C2HmLiVc.js.map → presence-Ctp-Trws.js.map} +1 -1
  33. package/dist/esm/{show-Ch_s-Sr-.js → show-7VInUu_D.js} +1 -1
  34. package/dist/esm/{show-Ch_s-Sr-.js.map → show-7VInUu_D.js.map} +1 -1
  35. package/dist/esm/{slot-DL8c8KCQ.js → slot-CURylbjq.js} +1 -1
  36. package/dist/esm/{slot-DL8c8KCQ.js.map → slot-CURylbjq.js.map} +1 -1
  37. package/dist/esm/ui/card/index.d.ts +8 -8
  38. package/dist/esm/ui/card/index.js +2 -2
  39. package/dist/esm/ui/carousel/index.js +4 -4
  40. package/dist/esm/ui/drag-scroll/index.js +2 -2
  41. package/dist/esm/ui/drop-zone/index.d.ts +17 -17
  42. package/dist/esm/ui/drop-zone/index.js +5 -5
  43. package/dist/esm/ui/form/index.d.ts +22 -22
  44. package/dist/esm/ui/form/index.js +12 -12
  45. package/dist/esm/ui/form/index.js.map +1 -1
  46. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"slot-DL8c8KCQ.js","names":["ReactFragment"],"sources":["../../src/components/common/slot/slot.tsx","../../src/components/common/slot/slot-parts.ts"],"sourcesContent":["import { composeRefs, type InferProps, mergeProps } from \"@zayne-labs/toolkit-react/utils\";\nimport { isArray, type UnknownObject } from \"@zayne-labs/toolkit-type-helpers\";\n\nimport { Children, cloneElement, isValidElement, Fragment as ReactFragment } from \"react\";\n\ntype SlotProps = InferProps<HTMLElement> & { ref?: React.Ref<HTMLElement> };\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * ----------------------------------------------------------------------------------------------- */\n\nexport function SlotRoot(props: SlotProps) {\n\tconst { children, ...restOfSlotProps } = props;\n\n\tconst childrenArray = isArray<React.ReactNode>(children) ? children : [children];\n\n\tconst slottable = childrenArray.find((element) => isSlottable(element));\n\n\tif (!slottable) {\n\t\treturn <SlotClone {...restOfSlotProps}>{children}</SlotClone>;\n\t}\n\n\tif (!isValidElement<SlotProps>(slottable)) {\n\t\treturn null;\n\t}\n\n\t// == The new element to render is the one passed as a child of `Slot.Slottable`\n\tconst newElement = slottable.props.children;\n\n\tif (Children.count(newElement) > 1) {\n\t\treturn Children.only(null);\n\t}\n\n\tconst resolvedNewElement = isArray(newElement) ? newElement[0] : newElement;\n\n\tif (!isValidElement(resolvedNewElement)) {\n\t\treturn null;\n\t}\n\n\tconst newChildren = childrenArray.map((child) => {\n\t\tif (child === slottable) {\n\t\t\t// == Because the new element will be the one rendered, we are only interested in grabbing its children (`newElement.props.children`)\n\t\t\treturn (resolvedNewElement.props as SlotProps).children;\n\t\t}\n\n\t\treturn child;\n\t});\n\n\treturn (\n\t\t<SlotClone {...restOfSlotProps}>\n\t\t\t{cloneElement(resolvedNewElement, undefined, newChildren)}\n\t\t</SlotClone>\n\t);\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * ----------------------------------------------------------------------------------------------- */\n\nexport function SlotSlottable({ children }: Pick<SlotProps, \"children\">) {\n\treturn children;\n}\n\nconst isSlottable = (child: React.ReactNode): child is React.ReactElement => {\n\treturn isValidElement(child) && child.type === SlotSlottable;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * ----------------------------------------------------------------------------------------------- */\ntype SlotCloneProps = Pick<SlotProps, \"children\" | \"ref\">;\n\nfunction SlotClone(props: SlotCloneProps) {\n\tconst { children, ref: forwardedRef, ...restOfSlotProps } = props;\n\n\tif (Children.count(children) > 1) {\n\t\treturn Children.only(null);\n\t}\n\n\tconst resolvedChild = isArray(children) ? children[0] : children;\n\n\tif (!isValidElement<UnknownObject>(resolvedChild)) {\n\t\treturn null;\n\t}\n\n\tconst childRef = (resolvedChild.props.ref\n\t\t?? (resolvedChild as unknown as UnknownObject).ref) as React.Ref<HTMLElement>;\n\n\tconst ref = composeRefs(forwardedRef, childRef);\n\n\tconst clonedProps = {\n\t\t...mergeProps(restOfSlotProps, resolvedChild.props),\n\t\t...(resolvedChild.type !== ReactFragment && { ref }),\n\t};\n\n\treturn cloneElement(resolvedChild, clonedProps);\n}\n","export { SlotRoot as Root, SlotSlottable as Slottable } from \"./slot\";\n"],"mappings":";;;;;;;AAWA,SAAgB,SAAS,OAAkB;CAC1C,MAAM,EAAE,UAAU,GAAG,oBAAoB;CAEzC,MAAM,gBAAgB,QAAyB,SAAS,GAAG,WAAW,CAAC,SAAS;CAEhF,MAAM,YAAY,cAAc,MAAM,YAAY,YAAY,QAAQ,CAAC;AAEvE,KAAI,CAAC,UACJ,QAAO,oBAAC;EAAU,GAAI;EAAkB;GAAqB;AAG9D,KAAI,CAAC,eAA0B,UAAU,CACxC,QAAO;CAIR,MAAM,aAAa,UAAU,MAAM;AAEnC,KAAI,SAAS,MAAM,WAAW,GAAG,EAChC,QAAO,SAAS,KAAK,KAAK;CAG3B,MAAM,qBAAqB,QAAQ,WAAW,GAAG,WAAW,KAAK;AAEjE,KAAI,CAAC,eAAe,mBAAmB,CACtC,QAAO;CAGR,MAAM,cAAc,cAAc,KAAK,UAAU;AAChD,MAAI,UAAU,UAEb,QAAQ,mBAAmB,MAAoB;AAGhD,SAAO;GACN;AAEF,QACC,oBAAC;EAAU,GAAI;YACb,aAAa,oBAAoB,QAAW,YAAY;GAC9C;;AAQd,SAAgB,cAAc,EAAE,YAAyC;AACxE,QAAO;;AAGR,MAAM,eAAe,UAAwD;AAC5E,QAAO,eAAe,MAAM,IAAI,MAAM,SAAS;;AAQhD,SAAS,UAAU,OAAuB;CACzC,MAAM,EAAE,UAAU,KAAK,cAAc,GAAG,oBAAoB;AAE5D,KAAI,SAAS,MAAM,SAAS,GAAG,EAC9B,QAAO,SAAS,KAAK,KAAK;CAG3B,MAAM,gBAAgB,QAAQ,SAAS,GAAG,SAAS,KAAK;AAExD,KAAI,CAAC,eAA8B,cAAc,CAChD,QAAO;CAMR,MAAM,MAAM,YAAY,cAHN,cAAc,MAAM,OACjC,cAA2C,IAED;AAO/C,QAAO,aAAa,eALA;EACnB,GAAG,WAAW,iBAAiB,cAAc,MAAM;EACnD,GAAI,cAAc,SAASA,YAAiB,EAAE,KAAK;EACnD,CAE8C"}
1
+ {"version":3,"file":"slot-CURylbjq.js","names":["ReactFragment"],"sources":["../../src/components/common/slot/slot.tsx","../../src/components/common/slot/slot-parts.ts"],"sourcesContent":["import { composeRefs, type InferProps, mergeProps } from \"@zayne-labs/toolkit-react/utils\";\nimport { isArray, type UnknownObject } from \"@zayne-labs/toolkit-type-helpers\";\n\nimport { Children, cloneElement, isValidElement, Fragment as ReactFragment } from \"react\";\n\ntype SlotProps = InferProps<HTMLElement> & { ref?: React.Ref<HTMLElement> };\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * ----------------------------------------------------------------------------------------------- */\n\nexport function SlotRoot(props: SlotProps) {\n\tconst { children, ...restOfSlotProps } = props;\n\n\tconst childrenArray = isArray<React.ReactNode>(children) ? children : [children];\n\n\tconst slottable = childrenArray.find((element) => isSlottable(element));\n\n\tif (!slottable) {\n\t\treturn <SlotClone {...restOfSlotProps}>{children}</SlotClone>;\n\t}\n\n\tif (!isValidElement<SlotProps>(slottable)) {\n\t\treturn null;\n\t}\n\n\t// == The new element to render is the one passed as a child of `Slot.Slottable`\n\tconst newElement = slottable.props.children;\n\n\tif (Children.count(newElement) > 1) {\n\t\treturn Children.only(null);\n\t}\n\n\tconst resolvedNewElement = isArray(newElement) ? newElement[0] : newElement;\n\n\tif (!isValidElement(resolvedNewElement)) {\n\t\treturn null;\n\t}\n\n\tconst newChildren = childrenArray.map((child) => {\n\t\tif (child === slottable) {\n\t\t\t// == Because the new element will be the one rendered, we are only interested in grabbing its children (`newElement.props.children`)\n\t\t\treturn (resolvedNewElement.props as SlotProps).children;\n\t\t}\n\n\t\treturn child;\n\t});\n\n\treturn (\n\t\t<SlotClone {...restOfSlotProps}>\n\t\t\t{cloneElement(resolvedNewElement, undefined, newChildren)}\n\t\t</SlotClone>\n\t);\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * ----------------------------------------------------------------------------------------------- */\n\nexport function SlotSlottable({ children }: Pick<SlotProps, \"children\">) {\n\treturn children;\n}\n\nconst isSlottable = (child: React.ReactNode): child is React.ReactElement => {\n\treturn isValidElement(child) && child.type === SlotSlottable;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * ----------------------------------------------------------------------------------------------- */\ntype SlotCloneProps = Pick<SlotProps, \"children\" | \"ref\">;\n\nfunction SlotClone(props: SlotCloneProps) {\n\tconst { children, ref: forwardedRef, ...restOfSlotProps } = props;\n\n\tif (Children.count(children) > 1) {\n\t\treturn Children.only(null);\n\t}\n\n\tconst resolvedChild = isArray(children) ? children[0] : children;\n\n\tif (!isValidElement<UnknownObject>(resolvedChild)) {\n\t\treturn null;\n\t}\n\n\tconst childRef = (resolvedChild.props.ref\n\t\t?? (resolvedChild as unknown as UnknownObject).ref) as React.Ref<HTMLElement>;\n\n\tconst ref = composeRefs(forwardedRef, childRef);\n\n\tconst clonedProps = {\n\t\t...mergeProps(restOfSlotProps, resolvedChild.props),\n\t\t...(resolvedChild.type !== ReactFragment && { ref }),\n\t};\n\n\treturn cloneElement(resolvedChild, clonedProps);\n}\n","export { SlotRoot as Root, SlotSlottable as Slottable } from \"./slot\";\n"],"mappings":";;;;;;;AAWA,SAAgB,SAAS,OAAkB;CAC1C,MAAM,EAAE,UAAU,GAAG,oBAAoB;CAEzC,MAAM,gBAAgB,QAAyB,SAAS,GAAG,WAAW,CAAC,SAAS;CAEhF,MAAM,YAAY,cAAc,MAAM,YAAY,YAAY,QAAQ,CAAC;AAEvE,KAAI,CAAC,UACJ,QAAO,oBAAC;EAAU,GAAI;EAAkB;GAAqB;AAG9D,KAAI,CAAC,eAA0B,UAAU,CACxC,QAAO;CAIR,MAAM,aAAa,UAAU,MAAM;AAEnC,KAAI,SAAS,MAAM,WAAW,GAAG,EAChC,QAAO,SAAS,KAAK,KAAK;CAG3B,MAAM,qBAAqB,QAAQ,WAAW,GAAG,WAAW,KAAK;AAEjE,KAAI,CAAC,eAAe,mBAAmB,CACtC,QAAO;CAGR,MAAM,cAAc,cAAc,KAAK,UAAU;AAChD,MAAI,UAAU,UAEb,QAAQ,mBAAmB,MAAoB;AAGhD,SAAO;GACN;AAEF,QACC,oBAAC;EAAU,GAAI;YACb,aAAa,oBAAoB,QAAW,YAAY;GAC9C;;AAQd,SAAgB,cAAc,EAAE,YAAyC;AACxE,QAAO;;AAGR,MAAM,eAAe,UAAwD;AAC5E,QAAO,eAAe,MAAM,IAAI,MAAM,SAAS;;AAQhD,SAAS,UAAU,OAAuB;CACzC,MAAM,EAAE,UAAU,KAAK,cAAc,GAAG,oBAAoB;AAE5D,KAAI,SAAS,MAAM,SAAS,GAAG,EAC9B,QAAO,SAAS,KAAK,KAAK;CAG3B,MAAM,gBAAgB,QAAQ,SAAS,GAAG,SAAS,KAAK;AAExD,KAAI,CAAC,eAA8B,cAAc,CAChD,QAAO;CAMR,MAAM,MAAM,YAAY,cAHN,cAAc,MAAM,OACjC,cAA2C,IAED;AAO/C,QAAO,aAAa,eALA;EACnB,GAAG,WAAW,iBAAiB,cAAc,MAAM;EACnD,GAAI,cAAc,SAASA,YAAiB,EAAE,KAAK;EACnD,CAE8C"}
@@ -1,16 +1,16 @@
1
1
  import { PolymorphicProps } from "@zayne-labs/toolkit-react/utils";
2
- import * as react_jsx_runtime9 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime22 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/ui/card/card.d.ts
5
- declare function CardRoot<TElement extends React.ElementType = "article">(props: PolymorphicProps<TElement>): react_jsx_runtime9.JSX.Element;
6
- declare function CardHeader<TElement extends React.ElementType = "header">(props: PolymorphicProps<TElement>): react_jsx_runtime9.JSX.Element;
7
- declare function CardTitle<TElement extends React.ElementType = "h3">(props: PolymorphicProps<TElement>): react_jsx_runtime9.JSX.Element;
8
- declare function CardDescription<TElement extends React.ElementType = "p">(props: PolymorphicProps<TElement>): react_jsx_runtime9.JSX.Element;
9
- declare function CardContent<TElement extends React.ElementType = "div">(props: PolymorphicProps<TElement>): react_jsx_runtime9.JSX.Element;
10
- declare function CardAction<TElement extends React.ElementType = "div">(props: PolymorphicProps<TElement>): react_jsx_runtime9.JSX.Element;
5
+ declare function CardRoot<TElement extends React.ElementType = "article">(props: PolymorphicProps<TElement>): react_jsx_runtime22.JSX.Element;
6
+ declare function CardHeader<TElement extends React.ElementType = "header">(props: PolymorphicProps<TElement>): react_jsx_runtime22.JSX.Element;
7
+ declare function CardTitle<TElement extends React.ElementType = "h3">(props: PolymorphicProps<TElement>): react_jsx_runtime22.JSX.Element;
8
+ declare function CardDescription<TElement extends React.ElementType = "p">(props: PolymorphicProps<TElement>): react_jsx_runtime22.JSX.Element;
9
+ declare function CardContent<TElement extends React.ElementType = "div">(props: PolymorphicProps<TElement>): react_jsx_runtime22.JSX.Element;
10
+ declare function CardAction<TElement extends React.ElementType = "div">(props: PolymorphicProps<TElement>): react_jsx_runtime22.JSX.Element;
11
11
  declare function CardFooter<TElement extends React.ElementType = "footer">(props: PolymorphicProps<TElement, {
12
12
  asChild?: boolean;
13
- }>): react_jsx_runtime9.JSX.Element;
13
+ }>): react_jsx_runtime22.JSX.Element;
14
14
  declare namespace card_parts_d_exports {
15
15
  export { CardAction as Action, CardContent as Content, CardDescription as Description, CardFooter as Footer, CardHeader as Header, CardRoot as Root, CardTitle as Title };
16
16
  }
@@ -1,6 +1,6 @@
1
1
  import { t as __export } from "../../chunk-BL-4obUL.js";
2
- import { n as SlotRoot } from "../../slot-DL8c8KCQ.js";
3
- import { t as cnMerge } from "../../cn-CRgXviN7.js";
2
+ import { n as SlotRoot } from "../../slot-CURylbjq.js";
3
+ import { t as cnMerge } from "../../cn-Dnsqr-G7.js";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
 
6
6
  //#region src/components/ui/card/card.tsx
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
 
3
3
  import { t as __export } from "../../chunk-BL-4obUL.js";
4
- import { t as cnMerge } from "../../cn-CRgXviN7.js";
5
- import { n as For } from "../../for-DsdwXl8s.js";
6
- import { i as ShowRoot, n as ShowContent, r as ShowFallback } from "../../show-Ch_s-Sr-.js";
4
+ import { n as For } from "../../for-BeCRb3k2.js";
5
+ import { i as ShowRoot, n as ShowContent, r as ShowFallback } from "../../show-7VInUu_D.js";
6
+ import { t as cnMerge } from "../../cn-Dnsqr-G7.js";
7
7
  import { isFunction } from "@zayne-labs/toolkit-type-helpers";
8
8
  import { useMemo, useState } from "react";
9
+ import { useAnimationInterval, useCallbackRef, useStore } from "@zayne-labs/toolkit-react";
9
10
  import { jsx, jsxs } from "react/jsx-runtime";
10
11
  import { createStore } from "@zayne-labs/toolkit-core";
11
- import { useAnimationInterval, useCallbackRef, useStore } from "@zayne-labs/toolkit-react";
12
12
  import { createReactStoreContext } from "@zayne-labs/toolkit-react/zustand";
13
13
 
14
14
  //#region src/components/ui/carousel/carousel-store-context.ts
@@ -1,8 +1,8 @@
1
- import { t as cnMerge } from "../../cn-CRgXviN7.js";
1
+ import { t as cnMerge } from "../../cn-Dnsqr-G7.js";
2
2
  import { composeRefs, mergeTwoProps } from "@zayne-labs/toolkit-react/utils";
3
3
  import { useCallback, useMemo, useRef } from "react";
4
- import { checkIsDeviceMobile, on } from "@zayne-labs/toolkit-core";
5
4
  import { useCallbackRef, useLazyRef } from "@zayne-labs/toolkit-react";
5
+ import { checkIsDeviceMobile, on } from "@zayne-labs/toolkit-core";
6
6
 
7
7
  //#region src/components/ui/drag-scroll/utils.ts
8
8
  const updateCursor = (element) => {
@@ -1,11 +1,11 @@
1
1
  import { InferProps, PolymorphicPropsStrict } from "@zayne-labs/toolkit-react/utils";
2
2
  import * as _zayne_labs_toolkit_type_helpers0 from "@zayne-labs/toolkit-type-helpers";
3
3
  import { Awaitable, SelectorFn } from "@zayne-labs/toolkit-type-helpers";
4
- import * as react35 from "react";
5
- import * as react_jsx_runtime38 from "react/jsx-runtime";
4
+ import * as react1 from "react";
5
+ import "@zayne-labs/toolkit-react";
6
+ import * as react_jsx_runtime10 from "react/jsx-runtime";
6
7
  import * as _zayne_labs_toolkit_core1 from "@zayne-labs/toolkit-core";
7
8
  import { FileMeta, FileOrFileMeta, FileValidationErrorContextEach, FileValidationHooksAsync, FileValidationSettingsAsync } from "@zayne-labs/toolkit-core";
8
- import "@zayne-labs/toolkit-react";
9
9
 
10
10
  //#region src/components/ui/drop-zone/drop-zone-store.d.ts
11
11
  type RequiredUseDropZoneProps = { [Key in keyof Required<UseDropZoneProps>]: UseDropZoneProps[Key] | undefined };
@@ -223,7 +223,7 @@ interface UseDropZoneProps extends FileValidationSettingsAsync {
223
223
  declare const DropZoneStoreContextProvider: (props: {
224
224
  children: React.ReactNode;
225
225
  store: _zayne_labs_toolkit_core1.StoreApi<DropZoneStore>;
226
- }) => react35.FunctionComponentElement<react35.ProviderProps<_zayne_labs_toolkit_core1.StoreApi<DropZoneStore>>>, useDropZoneStoreContext: <TResult = DropZoneStore>(selector?: _zayne_labs_toolkit_type_helpers0.SelectorFn<DropZoneStore, TResult> | undefined) => TResult;
226
+ }) => react1.FunctionComponentElement<react1.ProviderProps<_zayne_labs_toolkit_core1.StoreApi<DropZoneStore>>>, useDropZoneStoreContext: <TResult = DropZoneStore>(selector?: _zayne_labs_toolkit_type_helpers0.SelectorFn<DropZoneStore, TResult> | undefined) => TResult;
227
227
  type FileItemContextType = {
228
228
  fileState: FileState;
229
229
  };
@@ -232,29 +232,29 @@ type FileItemContextType = {
232
232
  type DropZoneRootProps = UseDropZoneProps & {
233
233
  children: React.ReactNode;
234
234
  };
235
- declare function DropZoneRoot(props: DropZoneRootProps): react_jsx_runtime38.JSX.Element;
235
+ declare function DropZoneRoot(props: DropZoneRootProps): react_jsx_runtime10.JSX.Element;
236
236
  type DropZoneContextProps<TSlice> = {
237
237
  children: React.ReactNode | ((context: TSlice) => React.ReactNode);
238
238
  selector?: SelectorFn<DropZoneStore, TSlice>;
239
239
  };
240
- declare function DropZoneContext<TSlice = DropZoneStore>(props: DropZoneContextProps<TSlice>): react35.ReactNode;
240
+ declare function DropZoneContext<TSlice = DropZoneStore>(props: DropZoneContextProps<TSlice>): react1.ReactNode;
241
241
  type DropZoneContainerProps = PartInputProps["container"] & {
242
242
  asChild?: boolean;
243
243
  };
244
- declare function DropZoneContainer<TElement extends React.ElementType = "div">(props: PolymorphicPropsStrict<TElement, DropZoneContainerProps>): react_jsx_runtime38.JSX.Element;
244
+ declare function DropZoneContainer<TElement extends React.ElementType = "div">(props: PolymorphicPropsStrict<TElement, DropZoneContainerProps>): react_jsx_runtime10.JSX.Element;
245
245
  type DropZoneInputProps = PartInputProps["input"] & {
246
246
  asChild?: boolean;
247
247
  };
248
- declare function DropZoneInput(props: DropZoneInputProps): react_jsx_runtime38.JSX.Element;
248
+ declare function DropZoneInput(props: DropZoneInputProps): react_jsx_runtime10.JSX.Element;
249
249
  type DropZoneAreaProps<TSlice> = DropZoneContextProps<TSlice> & PartInputProps["container"] & {
250
250
  classNames?: Partial<Record<Extract<keyof PartInputProps, "container" | "input">, string>>;
251
251
  extraProps?: Partial<Pick<PartInputProps, "container" | "input">>;
252
252
  };
253
- declare function DropZoneArea<TSlice = DropZoneStore>(props: DropZoneAreaProps<TSlice>): react_jsx_runtime38.JSX.Element;
253
+ declare function DropZoneArea<TSlice = DropZoneStore>(props: DropZoneAreaProps<TSlice>): react_jsx_runtime10.JSX.Element;
254
254
  type DropZoneTriggerProps = PartInputProps["trigger"] & {
255
255
  asChild?: boolean;
256
256
  };
257
- declare function DropZoneTrigger(props: DropZoneTriggerProps): react_jsx_runtime38.JSX.Element;
257
+ declare function DropZoneTrigger(props: DropZoneTriggerProps): react_jsx_runtime10.JSX.Element;
258
258
  type ListPerItemContext = Pick<DropZoneStore, "actions"> & {
259
259
  array: DropZoneStore["fileStateArray"];
260
260
  fileState: DropZoneStore["fileStateArray"][number];
@@ -273,21 +273,21 @@ type DropZoneFileListProps = Omit<PartInputProps["fileList"], "children"> & {
273
273
  asChild?: boolean;
274
274
  forceMount?: boolean;
275
275
  } & (FileListManualListVariant | FileListPerItemVariant);
276
- declare function DropZoneFileList<TElement extends React.ElementType = "ul">(props: PolymorphicPropsStrict<TElement, DropZoneFileListProps>): react_jsx_runtime38.JSX.Element;
276
+ declare function DropZoneFileList<TElement extends React.ElementType = "ul">(props: PolymorphicPropsStrict<TElement, DropZoneFileListProps>): react_jsx_runtime10.JSX.Element;
277
277
  type DropZoneFileItemProps = FileItemContextType & PartInputProps["fileItem"] & {
278
278
  asChild?: boolean;
279
279
  };
280
- declare function DropZoneFileItem<TElement extends React.ElementType = "li">(props: PolymorphicPropsStrict<TElement, DropZoneFileItemProps>): react_jsx_runtime38.JSX.Element;
280
+ declare function DropZoneFileItem<TElement extends React.ElementType = "li">(props: PolymorphicPropsStrict<TElement, DropZoneFileItemProps>): react_jsx_runtime10.JSX.Element;
281
281
  type DropZoneFileItemDeleteProps = PartInputProps["fileItemDelete"] & {
282
282
  asChild?: boolean;
283
283
  };
284
- declare function DropZoneFileItemDelete(props: DropZoneFileItemDeleteProps): react_jsx_runtime38.JSX.Element;
284
+ declare function DropZoneFileItemDelete(props: DropZoneFileItemDeleteProps): react_jsx_runtime10.JSX.Element;
285
285
  type DropZoneFileItemProgressProps = PartInputProps["fileItemProgress"] & {
286
286
  asChild?: boolean;
287
287
  forceMount?: boolean;
288
288
  size?: number;
289
289
  };
290
- declare function DropZoneFileItemProgress<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, DropZoneFileItemProgressProps>): react_jsx_runtime38.JSX.Element | null;
290
+ declare function DropZoneFileItemProgress<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, DropZoneFileItemProgressProps>): react_jsx_runtime10.JSX.Element | null;
291
291
  type RenderPreviewDetails<TElement extends React.ElementType = "svg"> = {
292
292
  node?: React.ReactNode;
293
293
  } & {
@@ -316,7 +316,7 @@ type DropZoneFileItemPreviewProps = Omit<PartInputProps["fileItemPreview"], "chi
316
316
  }) => React.ReactNode);
317
317
  renderPreview?: boolean | RenderPreview;
318
318
  };
319
- declare function DropZoneFileItemPreview<TElement extends React.ElementType>(props: PolymorphicPropsStrict<TElement, DropZoneFileItemPreviewProps>): react_jsx_runtime38.JSX.Element | null;
319
+ declare function DropZoneFileItemPreview<TElement extends React.ElementType>(props: PolymorphicPropsStrict<TElement, DropZoneFileItemPreviewProps>): react_jsx_runtime10.JSX.Element | null;
320
320
  type DropZoneFileItemMetadataProps = Omit<PartInputProps["fileItemMetadata"], "children"> & Partial<Pick<FileItemContextType, "fileState">> & {
321
321
  asChild?: boolean;
322
322
  children?: React.ReactNode | ((context: Pick<FileItemContextType, "fileState">) => React.ReactNode);
@@ -326,12 +326,12 @@ type DropZoneFileItemMetadataProps = Omit<PartInputProps["fileItemMetadata"], "c
326
326
  };
327
327
  size?: "default" | "sm";
328
328
  };
329
- declare function DropZoneFileItemMetadata(props: DropZoneFileItemMetadataProps): react_jsx_runtime38.JSX.Element | null;
329
+ declare function DropZoneFileItemMetadata(props: DropZoneFileItemMetadataProps): react_jsx_runtime10.JSX.Element | null;
330
330
  type DropZoneFileClearProps = PartInputProps["fileItemClear"] & {
331
331
  asChild?: boolean;
332
332
  forceMount?: boolean;
333
333
  };
334
- declare function DropZoneFileClear(props: DropZoneFileClearProps): react_jsx_runtime38.JSX.Element | null;
334
+ declare function DropZoneFileClear(props: DropZoneFileClearProps): react_jsx_runtime10.JSX.Element | null;
335
335
  declare namespace drop_zone_parts_d_exports {
336
336
  export { DropZoneArea as Area, DropZoneContainer as Container, DropZoneContext as Context, DropZoneFileClear as FileClear, DropZoneFileItem as FileItem, DropZoneFileItemDelete as FileItemDelete, DropZoneFileItemMetadata as FileItemMetadata, DropZoneFileItemPreview as FileItemPreview, DropZoneFileItemProgress as FileItemProgress, DropZoneFileList as FileList, DropZoneInput as Input, DropZoneRoot as Root, DropZoneTrigger as Trigger };
337
337
  }
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
 
3
3
  import { t as __export } from "../../chunk-BL-4obUL.js";
4
- import { n as SlotRoot } from "../../slot-DL8c8KCQ.js";
5
- import { t as cnMerge } from "../../cn-CRgXviN7.js";
6
- import { n as For } from "../../for-DsdwXl8s.js";
7
- import { t as Presence } from "../../presence-C2HmLiVc.js";
4
+ import { n as SlotRoot } from "../../slot-CURylbjq.js";
5
+ import { n as For } from "../../for-BeCRb3k2.js";
6
+ import { t as Presence } from "../../presence-Ctp-Trws.js";
7
+ import { t as cnMerge } from "../../cn-Dnsqr-G7.js";
8
8
  import { composeRefs, composeTwoEventHandlers } from "@zayne-labs/toolkit-react/utils";
9
9
  import { isBoolean, isFile, isFunction, isNumber, isObject, isString } from "@zayne-labs/toolkit-type-helpers";
10
10
  import { useCallback, useMemo, useRef } from "react";
11
+ import { createCustomContext, useCallbackRef, useConstant, useShallowCompSelector, useShallowCompValue, useStore, useUnmountEffect } from "@zayne-labs/toolkit-react";
11
12
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
12
13
  import { createFileURL, createStore, dataAttr, formatBytes, generateFileID, handleFileValidationAsync, toArray } from "@zayne-labs/toolkit-core";
13
- import { createCustomContext, useCallbackRef, useConstant, useShallowCompSelector, useShallowCompValue, useStore, useUnmountEffect } from "@zayne-labs/toolkit-react";
14
14
  import { createReactStoreContext } from "@zayne-labs/toolkit-react/zustand";
15
15
 
16
16
  //#region src/components/ui/drop-zone/drop-zone-context.ts
@@ -1,8 +1,8 @@
1
1
  import { DiscriminatedRenderItemProps, DiscriminatedRenderProps, InferProps, PolymorphicPropsStrict } from "@zayne-labs/toolkit-react/utils";
2
2
  import { UnionDiscriminator } from "@zayne-labs/toolkit-type-helpers";
3
- import * as react6 from "react";
4
- import * as react_jsx_runtime16 from "react/jsx-runtime";
3
+ import * as react36 from "react";
5
4
  import "@zayne-labs/toolkit-react";
5
+ import * as react_jsx_runtime33 from "react/jsx-runtime";
6
6
  import { Control, ControllerProps, FieldPath, FormStateSubscribeProps, RegisterOptions, UseFormReturn, UseFormStateReturn, WatchProps, useFormContext as useFormRootContext } from "react-hook-form";
7
7
 
8
8
  //#region src/components/ui/form/form-context.d.ts
@@ -38,7 +38,7 @@ type FormRootProps<TFieldValues extends FieldValues, TTransformedValues> = Infer
38
38
  children: React.ReactNode;
39
39
  form: UseFormReturn<TFieldValues, unknown, TTransformedValues>;
40
40
  };
41
- declare function FormRoot<TFieldValues extends FieldValues, TTransformedValues = TFieldValues>(props: FormRootProps<TFieldValues, TTransformedValues>): react_jsx_runtime16.JSX.Element;
41
+ declare function FormRoot<TFieldValues extends FieldValues, TTransformedValues = TFieldValues>(props: FormRootProps<TFieldValues, TTransformedValues>): react_jsx_runtime33.JSX.Element;
42
42
  type FormFieldProps<TControl, TFieldValues extends FieldValues, TTransformedValues> = (TControl extends (Control<infer TValues>) ? {
43
43
  control?: never;
44
44
  name: FieldPath<TValues>;
@@ -52,23 +52,23 @@ type FormFieldProps<TControl, TFieldValues extends FieldValues, TTransformedValu
52
52
  className?: never;
53
53
  withWrapper: false;
54
54
  });
55
- declare function FormField<TControl, TFieldValues extends FieldValues = FieldValues, TTransformedValues = TFieldValues>(props: FormFieldProps<TControl, TFieldValues, TTransformedValues>): react_jsx_runtime16.JSX.Element;
55
+ declare function FormField<TControl, TFieldValues extends FieldValues = FieldValues, TTransformedValues = TFieldValues>(props: FormFieldProps<TControl, TFieldValues, TTransformedValues>): react_jsx_runtime33.JSX.Element;
56
56
  type FormFieldControlledFieldProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TTransformedValues = TFieldValues> = ControllerProps<TFieldValues, TName, TTransformedValues>;
57
- declare function FormFieldWithController<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TTransformedValues = TFieldValues>(props: FormFieldControlledFieldProps<TFieldValues, TName, TTransformedValues>): react_jsx_runtime16.JSX.Element;
57
+ declare function FormFieldWithController<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TTransformedValues = TFieldValues>(props: FormFieldControlledFieldProps<TFieldValues, TName, TTransformedValues>): react_jsx_runtime33.JSX.Element;
58
58
  type FormFieldBoundControllerProps<TFieldValues extends FieldValues, TTransformedValues> = Omit<ControllerProps<TFieldValues, never, TTransformedValues>, "control" | "name">;
59
- declare function FormFieldBoundController<TFieldValues extends FieldValues = Record<string, never>, TTransformedValues = TFieldValues>(props: FormFieldBoundControllerProps<TFieldValues, TTransformedValues>): react_jsx_runtime16.JSX.Element;
60
- declare function FormFieldContext(props: FormFieldContextProps): react6.ReactNode;
61
- declare function FormLabel(props: InferProps<"label">): react_jsx_runtime16.JSX.Element;
62
- declare function FormInputGroup(props: InferProps<"div">): react_jsx_runtime16.JSX.Element;
59
+ declare function FormFieldBoundController<TFieldValues extends FieldValues = Record<string, never>, TTransformedValues = TFieldValues>(props: FormFieldBoundControllerProps<TFieldValues, TTransformedValues>): react_jsx_runtime33.JSX.Element;
60
+ declare function FormFieldContext(props: FormFieldContextProps): react36.ReactNode;
61
+ declare function FormLabel(props: InferProps<"label">): react_jsx_runtime33.JSX.Element;
62
+ declare function FormInputGroup(props: InferProps<"div">): react_jsx_runtime33.JSX.Element;
63
63
  type FormSideItemProps = {
64
64
  children?: React.ReactNode;
65
65
  className?: string;
66
66
  };
67
- declare function FormInputLeftItem<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, FormSideItemProps>): react_jsx_runtime16.JSX.Element;
67
+ declare function FormInputLeftItem<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, FormSideItemProps>): react_jsx_runtime33.JSX.Element;
68
68
  declare namespace FormInputLeftItem {
69
69
  var slotSymbol: symbol;
70
70
  }
71
- declare function FormInputRightItem<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, FormSideItemProps>): react_jsx_runtime16.JSX.Element;
71
+ declare function FormInputRightItem<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, FormSideItemProps>): react_jsx_runtime33.JSX.Element;
72
72
  declare namespace FormInputRightItem {
73
73
  var slotSymbol: symbol;
74
74
  }
@@ -104,13 +104,13 @@ type FormSelectPrimitiveProps<TFieldValues extends FieldValues> = React.Componen
104
104
  };
105
105
  declare function FormInputPrimitive<TFieldValues extends FieldValues>(props: FormInputPrimitiveProps<TFieldValues> & {
106
106
  rules?: RegisterOptions;
107
- }): react_jsx_runtime16.JSX.Element;
107
+ }): react_jsx_runtime33.JSX.Element;
108
108
  declare function FormTextAreaPrimitive<TFieldValues extends FieldValues>(props: FormTextAreaPrimitiveProps<TFieldValues> & {
109
109
  rules?: RegisterOptions;
110
- }): react_jsx_runtime16.JSX.Element;
110
+ }): react_jsx_runtime33.JSX.Element;
111
111
  declare function FormSelectPrimitive<TFieldValues extends FieldValues>(props: FormSelectPrimitiveProps<TFieldValues> & {
112
112
  rules?: RegisterOptions;
113
- }): react_jsx_runtime16.JSX.Element;
113
+ }): react_jsx_runtime33.JSX.Element;
114
114
  type PrimitivePropsToOmit = "control" | "formState" | "name";
115
115
  type FormInputProps = Omit<FormInputPrimitiveProps<FieldValues>, PrimitivePropsToOmit> & {
116
116
  rules?: RegisterOptions;
@@ -128,10 +128,10 @@ type CombinedFormInputProps = (FormSelectProps & {
128
128
  }) | FormInputProps;
129
129
  declare function FormInput(props: CombinedFormInputProps & {
130
130
  rules?: RegisterOptions;
131
- }): react_jsx_runtime16.JSX.Element;
132
- declare function FormTextArea(props: FormTextAreaProps): react_jsx_runtime16.JSX.Element;
133
- declare function FormSelect(props: FormSelectProps): react_jsx_runtime16.JSX.Element;
134
- declare function FormDescription(props: InferProps<"p">): react_jsx_runtime16.JSX.Element;
131
+ }): react_jsx_runtime33.JSX.Element;
132
+ declare function FormTextArea(props: FormTextAreaProps): react_jsx_runtime33.JSX.Element;
133
+ declare function FormSelect(props: FormSelectProps): react_jsx_runtime33.JSX.Element;
134
+ declare function FormDescription(props: InferProps<"p">): react_jsx_runtime33.JSX.Element;
135
135
  type ErrorMessageRenderProps = {
136
136
  className: string;
137
137
  "data-index": number;
@@ -190,15 +190,15 @@ type FormErrorMessageProps<TControl, TFieldValues extends FieldValues, TTransfor
190
190
  errorField: string;
191
191
  type: "root";
192
192
  };
193
- declare function FormErrorMessage<TControl, TFieldValues extends FieldValues = FieldValues, TTransformedValues = TFieldValues>(props: FormErrorMessageProps<TControl, TFieldValues, TTransformedValues>): react_jsx_runtime16.JSX.Element;
193
+ declare function FormErrorMessage<TControl, TFieldValues extends FieldValues = FieldValues, TTransformedValues = TFieldValues>(props: FormErrorMessageProps<TControl, TFieldValues, TTransformedValues>): react_jsx_runtime33.JSX.Element;
194
194
  type FormSubmitProps = InferProps<"button"> & {
195
195
  asChild?: boolean;
196
196
  };
197
- declare function FormSubmit<TElement extends React.ElementType = "button">(props: PolymorphicPropsStrict<TElement, FormSubmitProps>): react_jsx_runtime16.JSX.Element;
197
+ declare function FormSubmit<TElement extends React.ElementType = "button">(props: PolymorphicPropsStrict<TElement, FormSubmitProps>): react_jsx_runtime33.JSX.Element;
198
198
  type FormWatchProps<TFieldValues extends FieldValues, TFieldName extends Array<FieldPath<TFieldValues>> | FieldPath<TFieldValues> | ReadonlyArray<FieldPath<TFieldValues>> | undefined, TTransformedValues, TComputeValue, TComputedProps extends Omit<WatchProps<TFieldName, TFieldValues, unknown, TTransformedValues, TComputeValue>, "names"> = Omit<WatchProps<TFieldName, TFieldValues, unknown, TTransformedValues, TComputeValue>, "names">> = DiscriminatedRenderProps<TComputedProps["render"]> & Omit<TComputedProps, "render">;
199
- declare function FormWatch<TFieldValues extends FieldValues = FieldValues, const TFieldName extends Array<FieldPath<TFieldValues>> | FieldPath<TFieldValues> | ReadonlyArray<FieldPath<TFieldValues>> | undefined = undefined, TTransformedValues = TFieldValues, TComputeValue = undefined>(props: FormWatchProps<TFieldValues, TFieldName, TTransformedValues, TComputeValue>): react6.ReactNode;
199
+ declare function FormWatch<TFieldValues extends FieldValues = FieldValues, const TFieldName extends Array<FieldPath<TFieldValues>> | FieldPath<TFieldValues> | ReadonlyArray<FieldPath<TFieldValues>> | undefined = undefined, TTransformedValues = TFieldValues, TComputeValue = undefined>(props: FormWatchProps<TFieldValues, TFieldName, TTransformedValues, TComputeValue>): react36.ReactNode;
200
200
  type FormStateSubscribeProps$1<TFieldValues extends FieldValues, TTransformedValues, TComputedProps extends FormStateSubscribeProps<TFieldValues, TTransformedValues> = FormStateSubscribeProps<TFieldValues, TTransformedValues>> = DiscriminatedRenderProps<TComputedProps["render"]> & Omit<TComputedProps, "render">;
201
- declare function FormStateSubscribe<TFieldValues extends FieldValues, TTransformedValues = TFieldValues>(props: FormStateSubscribeProps$1<TFieldValues, TTransformedValues>): react6.ReactNode;
201
+ declare function FormStateSubscribe<TFieldValues extends FieldValues, TTransformedValues = TFieldValues>(props: FormStateSubscribeProps$1<TFieldValues, TTransformedValues>): react36.ReactNode;
202
202
  declare namespace form_parts_d_exports {
203
203
  export { FormDescription as Description, FormErrorMessage as ErrorMessage, FormErrorMessagePrimitive as ErrorMessagePrimitive, FormField as Field, FormFieldBoundController as FieldBoundController, FormFieldContext as FieldContext, FormFieldWithController as FieldWithController, FormInput as Input, FormInputGroup as InputGroup, FormInputLeftItem as InputLeftItem, FormInputPrimitive as InputPrimitive, FormInputRightItem as InputRightItem, FormLabel as Label, FormRoot as Root, FormSelect as Select, FormStateSubscribe as StateSubscribe, FormSubmit as Submit, FormTextArea as TextArea, FormTextAreaPrimitive as TextAreaPrimitive, FormWatch as Watch };
204
204
  }
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
 
3
3
  import { t as __export } from "../../chunk-BL-4obUL.js";
4
- import { n as SlotRoot } from "../../slot-DL8c8KCQ.js";
5
- import { t as cnMerge } from "../../cn-CRgXviN7.js";
6
- import { r as ForWithWrapper } from "../../for-DsdwXl8s.js";
4
+ import { n as SlotRoot } from "../../slot-CURylbjq.js";
5
+ import { r as ForWithWrapper } from "../../for-BeCRb3k2.js";
6
+ import { t as cnMerge } from "../../cn-Dnsqr-G7.js";
7
7
  import { composeRefs, composeTwoEventHandlers, getMultipleSlots } from "@zayne-labs/toolkit-react/utils";
8
8
  import { defineEnum, isObject } from "@zayne-labs/toolkit-type-helpers";
9
9
  import { Fragment, createElement, useEffect, useId, useMemo, useRef } from "react";
10
+ import { ContextError, createCustomContext, useCallbackRef, useToggle } from "@zayne-labs/toolkit-react";
10
11
  import { jsx, jsxs } from "react/jsx-runtime";
11
12
  import { dataAttr, on, toArray } from "@zayne-labs/toolkit-core";
12
- import { ContextError, createCustomContext, useCallbackRef, useToggle } from "@zayne-labs/toolkit-react";
13
13
  import { Controller, FormProvider, useFormContext, useFormContext as useFormRootContext, useFormState, useWatch } from "react-hook-form";
14
14
 
15
15
  //#region src/components/ui/form/icons.tsx
@@ -203,7 +203,7 @@ function FormFieldContext(props) {
203
203
  }
204
204
  function FormLabel(props) {
205
205
  const fieldContextValues = useStrictFormFieldContext();
206
- const { children, htmlFor = fieldContextValues.formItemId, ...restOfProps } = props;
206
+ const { children, htmlFor, ...restOfProps } = props;
207
207
  const { isDisabled, isInvalid } = useLaxFormFieldState({ name: fieldContextValues.name });
208
208
  return /* @__PURE__ */ jsx("label", {
209
209
  "data-scope": "form",
@@ -211,7 +211,7 @@ function FormLabel(props) {
211
211
  "data-slot": "form-label",
212
212
  "data-disabled": dataAttr(isDisabled),
213
213
  "data-invalid": dataAttr(isInvalid),
214
- htmlFor,
214
+ htmlFor: Object.hasOwn(props, "htmlFor") ? htmlFor : fieldContextValues.formItemId,
215
215
  ...restOfProps,
216
216
  children
217
217
  });
@@ -263,7 +263,7 @@ const inputTypesWithoutFullWidth = new Set(["checkbox", "radio"]);
263
263
  function FormInputPrimitive(props) {
264
264
  const fieldContextValues = useLaxFormFieldContext();
265
265
  const formRootContextValues = useLaxFormRootContext();
266
- const { className, classNames, control, fieldState, id = fieldContextValues?.formItemId, name = fieldContextValues?.name, rules, type = "text", withEyeIcon = formRootContextValues?.withEyeIcon ?? true, ...restOfProps } = props;
266
+ const { className, classNames, control, fieldState, id, name, rules, type = "text", withEyeIcon = formRootContextValues?.withEyeIcon ?? true, ...restOfProps } = props;
267
267
  const fieldStateFromLaxFormField = useLaxFormFieldState({
268
268
  control,
269
269
  name
@@ -290,8 +290,8 @@ function FormInputPrimitive(props) {
290
290
  "aria-invalid": dataAttr(isInvalid),
291
291
  "data-invalid": dataAttr(isInvalid),
292
292
  "data-disabled": dataAttr(isDisabled),
293
- id,
294
- name,
293
+ id: Object.hasOwn(props, "id") ? id : fieldContextValues?.formItemId,
294
+ name: Object.hasOwn(props, "name") ? name : fieldContextValues?.name,
295
295
  type: type === "password" && isPasswordVisible ? "text" : type,
296
296
  className: cnMerge(!inputTypesWithoutFullWidth.has(type) && "w-full min-w-0", `bg-transparent text-sm outline-hidden transition-[color,box-shadow] selection:bg-zu-primary
297
297
  selection:text-zu-primary-foreground file:inline-flex file:h-7 file:border-0
@@ -311,7 +311,7 @@ function FormInputPrimitive(props) {
311
311
  }
312
312
  function FormTextAreaPrimitive(props) {
313
313
  const fieldContextValues = useLaxFormFieldContext();
314
- const { className, classNames, control, fieldState, id = fieldContextValues?.formItemId, name = fieldContextValues?.name, rules, ...restOfProps } = props;
314
+ const { className, classNames, control, fieldState, id, name, rules, ...restOfProps } = props;
315
315
  const fieldStateFromLaxFormField = useLaxFormFieldState({
316
316
  control,
317
317
  name
@@ -326,8 +326,8 @@ function FormTextAreaPrimitive(props) {
326
326
  "aria-invalid": dataAttr(isInvalid),
327
327
  "data-disabled": dataAttr(isDisabled),
328
328
  "data-invalid": dataAttr(isInvalid),
329
- id,
330
- name,
329
+ id: Object.hasOwn(props, "id") ? id : fieldContextValues?.formItemId,
330
+ name: Object.hasOwn(props, "name") ? name : fieldContextValues?.name,
331
331
  className: cnMerge(`w-full bg-transparent text-sm placeholder:text-zu-muted-foreground
332
332
  focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50`, className, classNames?.base, isInvalid && classNames?.error),
333
333
  ...Boolean(name) && register?.(name, rules),