maquinaweb-ui 2.36.0 → 2.36.1

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 (61) hide show
  1. package/dist/{container-animation.d.ts → container-animation.d.mts} +3 -3
  2. package/dist/container-animation.d.mts.map +1 -0
  3. package/dist/{container-animation.js → container-animation.mjs} +3 -4
  4. package/dist/container-animation.mjs.map +1 -0
  5. package/dist/{input-Cp3f1KmR.js → input-B9ebQkfm.mjs} +4 -4
  6. package/dist/input-B9ebQkfm.mjs.map +1 -0
  7. package/dist/{input-help-etTqPzYc.js → input-help-BO1s6Ca6.mjs} +9 -9
  8. package/dist/input-help-BO1s6Ca6.mjs.map +1 -0
  9. package/dist/{input-suggest.d.ts → input-suggest.d.mts} +4 -4
  10. package/dist/input-suggest.d.mts.map +1 -0
  11. package/dist/{input-suggest.js → input-suggest.mjs} +7 -10
  12. package/dist/input-suggest.mjs.map +1 -0
  13. package/dist/{label-BqtcCyMj.js → label-ofBNlnV2.mjs} +4 -4
  14. package/dist/label-ofBNlnV2.mjs.map +1 -0
  15. package/dist/{page-header.d.ts → page-header.d.mts} +3 -3
  16. package/dist/page-header.d.mts.map +1 -0
  17. package/dist/{page-header.js → page-header.mjs} +2 -5
  18. package/dist/page-header.mjs.map +1 -0
  19. package/dist/{remote-selector.d.ts → remote-selector.d.mts} +4 -4
  20. package/dist/remote-selector.d.mts.map +1 -0
  21. package/dist/{remote-selector.js → remote-selector.mjs} +18 -22
  22. package/dist/remote-selector.mjs.map +1 -0
  23. package/dist/{scroll-area-C2WadzN5.js → scroll-area-erZKDarE.mjs} +5 -5
  24. package/dist/scroll-area-erZKDarE.mjs.map +1 -0
  25. package/dist/{split-text-poor.d.ts → split-text-poor.d.mts} +1 -1
  26. package/dist/split-text-poor.d.mts.map +1 -0
  27. package/dist/{split-text-poor.js → split-text-poor.mjs} +2 -3
  28. package/dist/split-text-poor.mjs.map +1 -0
  29. package/dist/{text-field.d.ts → text-field.d.mts} +7 -7
  30. package/dist/text-field.d.mts.map +1 -0
  31. package/dist/{text-field.js → text-field.mjs} +11 -14
  32. package/dist/text-field.mjs.map +1 -0
  33. package/dist/{toggle-field.d.ts → toggle-field.d.mts} +3 -3
  34. package/dist/toggle-field.d.mts.map +1 -0
  35. package/dist/{toggle-field.js → toggle-field.mjs} +6 -7
  36. package/dist/toggle-field.mjs.map +1 -0
  37. package/dist/{utils-C0f9Ma6r.js → utils-CG5oGEBQ.mjs} +2 -2
  38. package/dist/utils-CG5oGEBQ.mjs.map +1 -0
  39. package/dist/{with-mask-DnMiJlek.d.ts → with-mask-110DD-Lg.d.mts} +2 -2
  40. package/dist/with-mask-110DD-Lg.d.mts.map +1 -0
  41. package/package.json +12 -40
  42. package/dist/container-animation.d.ts.map +0 -1
  43. package/dist/container-animation.js.map +0 -1
  44. package/dist/input-Cp3f1KmR.js.map +0 -1
  45. package/dist/input-help-etTqPzYc.js.map +0 -1
  46. package/dist/input-suggest.d.ts.map +0 -1
  47. package/dist/input-suggest.js.map +0 -1
  48. package/dist/label-BqtcCyMj.js.map +0 -1
  49. package/dist/page-header.d.ts.map +0 -1
  50. package/dist/page-header.js.map +0 -1
  51. package/dist/remote-selector.d.ts.map +0 -1
  52. package/dist/remote-selector.js.map +0 -1
  53. package/dist/scroll-area-C2WadzN5.js.map +0 -1
  54. package/dist/split-text-poor.d.ts.map +0 -1
  55. package/dist/split-text-poor.js.map +0 -1
  56. package/dist/text-field.d.ts.map +0 -1
  57. package/dist/text-field.js.map +0 -1
  58. package/dist/toggle-field.d.ts.map +0 -1
  59. package/dist/toggle-field.js.map +0 -1
  60. package/dist/utils-C0f9Ma6r.js.map +0 -1
  61. package/dist/with-mask-DnMiJlek.d.ts.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { ComponentProps, ElementType } from "react";
2
- import * as react_jsx_runtime6 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/container-animation/container-animation.d.ts
5
5
  type ContainerAnimationProps<T extends ElementType = 'div'> = ComponentProps<'div'> & ComponentProps<T> & {
@@ -23,7 +23,7 @@ declare const ContainerAnimation: <T extends ElementType = "div">({
23
23
  distance,
24
24
  hideNotInView,
25
25
  ...props
26
- }: ContainerAnimationProps<T>) => react_jsx_runtime6.JSX.Element;
26
+ }: ContainerAnimationProps<T>) => react_jsx_runtime3.JSX.Element;
27
27
  //#endregion
28
28
  export { ContainerAnimation, type ContainerAnimationProps };
29
- //# sourceMappingURL=container-animation.d.ts.map
29
+ //# sourceMappingURL=container-animation.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container-animation.d.mts","names":[],"sources":["../src/components/container-animation/container-animation.tsx"],"sourcesContent":[],"mappings":";;;;KAiDY,kCAAkC,uBAC5C,wBACE,eAAe;;;EAFP,KAAA,CAAA,EAAA,MAAA;EAAkC,QAAA,CAAA,EAAA,MAAA;EAC5C,QAAA,CAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA;EACiB,aAAA,CAAA,EAAA,OAAA;EAAf,EAAA,CAAA,EAOO,CAPP,GAAA,MAAA;EAOO,SAAA,CAAA,EAAA,MAAA;CAAC;AAEN,cAEA,kBAkCL,EAAA,CAAA,UAlCqC,WAkCrC,GAAA,KAAA,CAAA,CAAA;EAAA,SAAA;EAAA,QAAA;EAAA,QAAA;EAAA,KAAA;EAAA,KAAA;EAAA,QAAA;EAAA,EAAA,EAlC0D,EAkC1D;EAAA,QAAA;EAAA,aAAA;EAAA,GAAA;AAAA,CAAA,EAvBE,uBAuBF,CAvB0B,CAuB1B,CAAA,EAAA,GAvB4B,kBAAA,CAAA,GAAA,CAAA,OAuB5B"}
@@ -1,7 +1,6 @@
1
1
  'use client';
2
2
 
3
-
4
- import { cn } from "./utils-C0f9Ma6r.js";
3
+ import { t as cn } from "./utils-CG5oGEBQ.mjs";
5
4
  import { useEffect, useRef, useState } from "react";
6
5
  import { jsx } from "react/jsx-runtime";
7
6
  import * as motion from "motion/react-m";
@@ -107,7 +106,7 @@ const getVariants = (position, space, delay) => {
107
106
  }
108
107
  };
109
108
  };
110
- const ContainerAnimation = ({ className, children, position = "top", delay = 0, space = 20, duration = .8, as: As = "div", distance = [95, 5], hideNotInView = false,...props }) => {
109
+ const ContainerAnimation = ({ className, children, position = "top", delay = 0, space = 20, duration = .8, as: As = "div", distance = [95, 5], hideNotInView = false, ...props }) => {
111
110
  const ref = useRef(null);
112
111
  const isInView = useInView(ref, {
113
112
  once: true,
@@ -128,4 +127,4 @@ const ContainerAnimation = ({ className, children, position = "top", delay = 0,
128
127
 
129
128
  //#endregion
130
129
  export { ContainerAnimation };
131
- //# sourceMappingURL=container-animation.js.map
130
+ //# sourceMappingURL=container-animation.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container-animation.mjs","names":[],"sources":["../node_modules/motion-dom/dist/es/utils/resolve-elements.mjs","../node_modules/framer-motion/dist/es/render/dom/viewport/index.mjs","../node_modules/framer-motion/dist/es/utils/use-in-view.mjs","../src/components/container-animation/container-animation.tsx"],"sourcesContent":["function resolveElements(elementOrSelector, scope, selectorCache) {\n if (elementOrSelector instanceof EventTarget) {\n return [elementOrSelector];\n }\n else if (typeof elementOrSelector === \"string\") {\n let root = document;\n if (scope) {\n root = scope.current;\n }\n const elements = selectorCache?.[elementOrSelector] ??\n root.querySelectorAll(elementOrSelector);\n return elements ? Array.from(elements) : [];\n }\n return Array.from(elementOrSelector);\n}\n\nexport { resolveElements };\n","import { resolveElements } from 'motion-dom';\n\nconst thresholds = {\n some: 0,\n all: 1,\n};\nfunction inView(elementOrSelector, onStart, { root, margin: rootMargin, amount = \"some\" } = {}) {\n const elements = resolveElements(elementOrSelector);\n const activeIntersections = new WeakMap();\n const onIntersectionChange = (entries) => {\n entries.forEach((entry) => {\n const onEnd = activeIntersections.get(entry.target);\n /**\n * If there's no change to the intersection, we don't need to\n * do anything here.\n */\n if (entry.isIntersecting === Boolean(onEnd))\n return;\n if (entry.isIntersecting) {\n const newOnEnd = onStart(entry.target, entry);\n if (typeof newOnEnd === \"function\") {\n activeIntersections.set(entry.target, newOnEnd);\n }\n else {\n observer.unobserve(entry.target);\n }\n }\n else if (typeof onEnd === \"function\") {\n onEnd(entry);\n activeIntersections.delete(entry.target);\n }\n });\n };\n const observer = new IntersectionObserver(onIntersectionChange, {\n root,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholds[amount],\n });\n elements.forEach((element) => observer.observe(element));\n return () => observer.disconnect();\n}\n\nexport { inView };\n","\"use client\";\nimport { useState, useEffect } from 'react';\nimport { inView } from '../render/dom/viewport/index.mjs';\n\nfunction useInView(ref, { root, margin, amount, once = false, initial = false, } = {}) {\n const [isInView, setInView] = useState(initial);\n useEffect(() => {\n if (!ref.current || (once && isInView))\n return;\n const onEnter = () => {\n setInView(true);\n return once ? undefined : () => setInView(false);\n };\n const options = {\n root: (root && root.current) || undefined,\n margin,\n amount,\n };\n return inView(ref.current, onEnter, options);\n }, [root, ref, margin, once, amount]);\n return isInView;\n}\n\nexport { useInView };\n","'use client';\n\nimport { type ComponentProps, type ElementType, useRef } from 'react';\n\nimport { cn } from '@/lib/utils';\nimport { useInView } from 'motion/react';\nimport * as motion from 'motion/react-m';\n\nconst getVariants = (\n position: 'top' | 'bottom' | 'left' | 'right',\n space: number,\n delay: number\n) => {\n const directions = {\n top: {\n transform: `translateY(${space}px)`,\n },\n bottom: {\n transform: `translateY(-${space}px)`,\n },\n left: {\n transform: `translateX(${space}px)`,\n },\n right: {\n transform: `translateX(-${space}px)`,\n },\n };\n\n const dir = directions[position] || directions.top;\n\n return {\n hidden: {\n opacity: 0,\n filter: 'blur(6px)',\n ...dir,\n },\n visible: {\n opacity: 1,\n filter: 'blur(0px)',\n transform: 'translateY(0px) translateX(0px)',\n transition: {\n delay,\n duration: 0.5,\n staggerChildren: 0.1,\n },\n },\n };\n};\n\nexport type ContainerAnimationProps<T extends ElementType = 'div'> =\n ComponentProps<'div'> &\n ComponentProps<T> & {\n position?: 'top' | 'bottom' | 'left' | 'right';\n delay?: number;\n space?: number;\n duration?: number;\n distance?: [number, number];\n hideNotInView?: boolean;\n as?: T | string;\n className?: string;\n };\n\nconst ContainerAnimation = <T extends ElementType = 'div'>({\n className,\n children,\n position = 'top',\n delay = 0,\n space = 20,\n duration = 0.8,\n as: As = 'div',\n distance = [95, 5],\n hideNotInView = false,\n ...props\n}: ContainerAnimationProps<T>) => {\n const ref = useRef<HTMLElement>(null);\n const isInView = useInView(ref, {\n once: true,\n margin:\n `-${100 - (distance[0] || 0)}% 0% -${(distance[1] as number) || 0}% 0%` as any,\n });\n\n const variants = getVariants(position, space, delay);\n\n return (\n <motion.div\n animate={isInView ? 'visible' : 'hidden'}\n className={cn('initial-opacity', className)}\n initial=\"hidden\"\n transition={{ duration }}\n variants={variants}\n {...props}\n ref={ref}\n >\n {(!hideNotInView || isInView) && children}\n </motion.div>\n );\n};\n\nexport { ContainerAnimation };\n"],"x_google_ignoreList":[0,1,2],"mappings":";;;;;;;;AAAA,SAAS,gBAAgB,mBAAmB,OAAO,eAAe;AAC9D,KAAI,6BAA6B,YAC7B,QAAO,CAAC,kBAAkB;UAErB,OAAO,sBAAsB,UAAU;EAC5C,IAAI,OAAO;AACX,MAAI,MACA,QAAO,MAAM;EAEjB,MAAM,WAAW,gBAAgB,sBAC7B,KAAK,iBAAiB,kBAAkB;AAC5C,SAAO,WAAW,MAAM,KAAK,SAAS,GAAG,EAAE;;AAE/C,QAAO,MAAM,KAAK,kBAAkB;;;;;ACXxC,MAAM,aAAa;CACf,MAAM;CACN,KAAK;CACR;AACD,SAAS,OAAO,mBAAmB,SAAS,EAAE,MAAM,QAAQ,YAAY,SAAS,WAAW,EAAE,EAAE;CAC5F,MAAM,WAAW,gBAAgB,kBAAkB;CACnD,MAAM,sCAAsB,IAAI,SAAS;CACzC,MAAM,wBAAwB,YAAY;AACtC,UAAQ,SAAS,UAAU;GACvB,MAAM,QAAQ,oBAAoB,IAAI,MAAM,OA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C;EACD,SAAS;GACP,SAAS;GACT,QAAQ;GACR,WAAW;GACX,YAAY;IACV;IACA,UAAU;IACV,iBAAiB;IAClB;GACF;EACF;;AAgBH,MAAM,sBAAqD,EACzD,WACA,UACA,WAAW,OACX,QAAQ,GACR,QAAQ,IACR,WAAW,IACX,IAAI,KAAK,OACT,WAAW,CAAC,IAAI,EAAE,EAClB,gBAAgB,OAChB,GAAG,YAC6B;CAChC,MAAM,MAAM,OAAoB,KAAK;CACrC,MAAM,WAAW,UAAU,KAAK;EAC9B,MAAM;EACN,QACE,IAAI,OAAO,SAAS,MAAM,GAAG,QAAS,SAAS,MAAiB,EAAE;EACrE,CAAC;CAEF,MAAM,WAAW,YAAY,UAAU,OAAO,MAAM;AAEpD,QACE,oBAAC,OAAO;EACN,SAAS,WAAW,YAAY;EAChC,WAAW,GAAG,mBAAmB,UAAU;EAC3C,SAAQ;EACR,YAAY,EAAE,UAAU;EACd;EACV,GAAI;EACC;aAEH,CAAC,iBAAiB,aAAa;GACtB"}
@@ -1,4 +1,4 @@
1
- import { cn } from "./utils-C0f9Ma6r.js";
1
+ import { t as cn } from "./utils-CG5oGEBQ.mjs";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import inputmask from "inputmask";
4
4
 
@@ -119,7 +119,7 @@ function withMask(mask, options) {
119
119
 
120
120
  //#endregion
121
121
  //#region src/components/ui/input.tsx
122
- function Input({ className, type,...props }) {
122
+ function Input({ className, type, ...props }) {
123
123
  return /* @__PURE__ */ jsx("input", {
124
124
  className: cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/75 focus-visible:ring-[2px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive ring-offset-[2px] transition-all duration-300", className),
125
125
  "data-slot": "input",
@@ -129,5 +129,5 @@ function Input({ className, type,...props }) {
129
129
  }
130
130
 
131
131
  //#endregion
132
- export { Input, withMask };
133
- //# sourceMappingURL=input-Cp3f1KmR.js.map
132
+ export { withMask as n, Input as t };
133
+ //# sourceMappingURL=input-B9ebQkfm.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-B9ebQkfm.mjs","names":["options: Options","masks: Record<string, Inputmask.Options>","isServer"],"sources":["../src/hooks/get-mask-options.ts","../src/hooks/is-server.ts","../src/hooks/module-interop.ts","../src/hooks/with-mask.ts","../src/components/ui/input.tsx"],"sourcesContent":["import type { Mask, Options } from './with-mask';\n\nexport default function getMaskOptions(\n mask?: Mask,\n _options?: Options\n): Options {\n const options: Options = {\n jitMasking: false,\n ..._options,\n };\n if (!mask) return options;\n\n const masks: Record<string, Inputmask.Options> = {\n datetime: {\n alias: 'datetime',\n ...options,\n },\n email: {\n alias: 'email',\n placeholder: '',\n ...options,\n },\n numeric: {\n alias: 'numeric',\n placeholder: '',\n ...options,\n },\n currency: {\n alias: 'currency',\n prefix: '$ ',\n placeholder: '',\n ...options,\n },\n decimal: {\n alias: 'decimal',\n placeholder: '',\n ...options,\n },\n integer: {\n alias: 'integer',\n placeholder: '',\n ...options,\n },\n percentage: {\n alias: 'percentage',\n placeholder: ' %',\n suffix: ' %',\n ...options,\n },\n url: {\n alias: 'url',\n placeholder: 'https://',\n ...options,\n },\n ip: {\n alias: 'ip',\n ...options,\n },\n mac: {\n alias: 'mac',\n ...options,\n },\n ssn: {\n alias: 'ssn',\n ...options,\n },\n\n // alias for brazilians <3\n // ty <3\n 'brl-currency': {\n alias: 'currency',\n prefix: 'R$ ',\n placeholder: '0,00',\n displayFormat: 'currency',\n radixPoint: ',',\n autoUnmask: true,\n ...options,\n },\n cpf: {\n mask: '999.999.999-99',\n placeholder: '___.___.___-__',\n ...options,\n },\n cnpj: {\n mask: '99.999.999/9999-99',\n placeholder: '__.___.___/____-__',\n ...options,\n },\n };\n\n if (typeof mask === 'string' && masks[mask]) return masks[mask];\n\n return {\n mask,\n ...options,\n };\n}\n","const isServer = !(\n typeof window !== 'undefined' && window.document?.createElement\n);\n\nexport default isServer;\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Synchronously resolve the default value of a module.\n */\nexport default function interopDefaultSync<T = any>(module: T): T {\n if (typeof module === 'object' && module !== null) {\n if ('default' in module) {\n return module.default as T;\n }\n return module;\n }\n return module;\n}\n","import inputmask from 'inputmask';\nimport Inputmask from 'inputmask';\nimport getMaskOptions from './get-mask-options';\nimport isServer from './is-server';\nimport interopDefaultSync from './module-interop';\n\nexport type { UseFormRegister, UseFormRegisterReturn } from 'react-hook-form';\n\nexport type Mask =\n | 'datetime'\n | 'email'\n | 'numeric'\n | 'currency'\n | 'decimal'\n | 'integer'\n | 'percentage'\n | 'url'\n | 'ip'\n | 'mac'\n | 'ssn'\n | 'brl-currency'\n | 'cpf'\n | 'cnpj'\n | (string & {})\n | (string[] & {})\n | null;\nexport type Options = Inputmask.Options;\nexport type Input = HTMLInputElement | HTMLTextAreaElement | HTMLElement;\n\nexport default function withMask(mask: Mask, options?: Options) {\n return (input: Input | null): void => {\n if (isServer || mask === null || !input) return;\n\n const maskInput = interopDefaultSync(inputmask)(\n getMaskOptions(mask, options)\n );\n\n maskInput.mask(input);\n };\n}\n","import type * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/75 focus-visible:ring-[2px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive ring-offset-[2px] transition-all duration-300',\n className\n )}\n data-slot=\"input\"\n type={type}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"mappings":";;;;;AAEA,SAAwB,eACtB,MACA,UACS;CACT,MAAMA,UAAmB;EACvB,YAAY;EACZ,GAAG;EACJ;AACD,KAAI,CAAC,KAAM,QAAO;CAElB,MAAMC,QAA2C;EAC/C,UAAU;GACR,OAAO;GACP,GAAG;GACJ;EACD,OAAO;GACL,OAAO;GACP,aAAa;GACb,GAAG;GACJ;EACD,SAAS;GACP,OAAO;GACP,aAAa;GACb,GAAG;GACJ;EACD,UAAU;GACR,OAAO;GACP,QAAQ;GACR,aAAa;GACb,GAAG;GACJ;EACD,SAAS;GACP,OAAO;GACP,aAAa;GACb,GAAG;GACJ;EACD,SAAS;GACP,OAAO;GACP,aAAa;GACb,GAAG;GACJ;EACD,YAAY;GACV,OAAO;GACP,aAAa;GACb,QAAQ;GACR,GAAG;GACJ;EACD,KAAK;GACH,OAAO;GACP,aAAa;GACb,GAAG;GACJ;EACD,IAAI;GACF,OAAO;GACP,GAAG;GACJ;EACD,KAAK;GACH,OAAO;GACP,GAAG;GACJ;EACD,KAAK;GACH,OAAO;GACP,GAAG;GACJ;EAID,gBAAgB;GACd,OAAO;GACP,QAAQ;GACR,aAAa;GACb,eAAe;GACf,YAAY;GACZ,YAAY;GACZ,GAAG;GACJ;EACD,KAAK;GACH,MAAM;GACN,aAAa;GACb,GAAG;GACJ;EACD,MAAM;GACJ,MAAM;GACN,aAAa;GACb,GAAG;GACJ;EACF;AAED,KAAI,OAAO,SAAS,YAAY,MAAM,MAAO,QAAO,MAAM;AAE1D,QAAO;EACL;EACA,GAAG;EACJ;;;;;AC/FH,MAAM,WAAW,EACf,OAAO,WAAW,eAAe,OAAO,UAAU;AAGpD,wBAAe;;;;;;;ACAf,SAAwB,mBAA4B,QAAc;AAChE,KAAI,OAAO,WAAW,YAAY,WAAW,MAAM;AACjD,MAAI,aAAa,OACf,QAAO,OAAO;AAEhB,SAAO;;AAET,QAAO;;;;;ACkBT,SAAwB,SAAS,MAAY,SAAmB;AAC9D,SAAQ,UAA8B;AACpC,MAAIC,qBAAY,SAAS,QAAQ,CAAC,MAAO;AAMzC,EAJkB,mBAAmB,UAAU,CAC7C,eAAe,MAAM,QAAQ,CAC9B,CAES,KAAK,MAAM;;;;;;ACjCzB,SAAS,MAAM,EAAE,WAAW,MAAM,GAAG,SAAwC;AAC3E,QACE,oBAAC;EACC,WAAW,GACT,mcACA,iFACA,wJACA,UACD;EACD,aAAU;EACJ;EACN,GAAI;GACJ"}
@@ -1,5 +1,5 @@
1
- import { cn } from "./utils-C0f9Ma6r.js";
2
- import { Label } from "./label-BqtcCyMj.js";
1
+ import { t as cn } from "./utils-CG5oGEBQ.mjs";
2
+ import { t as Label } from "./label-ofBNlnV2.mjs";
3
3
  import { useFormContext, useFormState } from "react-hook-form";
4
4
  import * as React from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -34,7 +34,7 @@ const useFormField = () => {
34
34
  };
35
35
  };
36
36
  const FormItemContext = React.createContext({});
37
- function FormItem({ className,...props }) {
37
+ function FormItem({ className, ...props }) {
38
38
  const id = React.useId();
39
39
  return /* @__PURE__ */ jsx(FormItemContext.Provider, {
40
40
  value: { id },
@@ -45,7 +45,7 @@ function FormItem({ className,...props }) {
45
45
  })
46
46
  });
47
47
  }
48
- function FormLabel({ className,...props }) {
48
+ function FormLabel({ className, ...props }) {
49
49
  const { error, formItemId } = useFormField();
50
50
  return /* @__PURE__ */ jsx(Label, {
51
51
  className: cn("data-[error=true]:text-destructive", className),
@@ -55,7 +55,7 @@ function FormLabel({ className,...props }) {
55
55
  ...props
56
56
  });
57
57
  }
58
- function FormMessage({ className,...props }) {
58
+ function FormMessage({ className, ...props }) {
59
59
  const { error, formMessageId } = useFormField();
60
60
  const body = error ? String(error?.message ?? "") : props.children;
61
61
  if (!body) return null;
@@ -70,7 +70,7 @@ function FormMessage({ className,...props }) {
70
70
 
71
71
  //#endregion
72
72
  //#region src/components/ui/tooltip.tsx
73
- function TooltipProvider({ delayDuration = 0,...props }) {
73
+ function TooltipProvider({ delayDuration = 0, ...props }) {
74
74
  return /* @__PURE__ */ jsx(TooltipPrimitive.Provider, {
75
75
  "data-slot": "tooltip-provider",
76
76
  delayDuration,
@@ -89,7 +89,7 @@ function TooltipTrigger({ ...props }) {
89
89
  ...props
90
90
  });
91
91
  }
92
- function TooltipContent({ className, sideOffset = 0, children,...props }) {
92
+ function TooltipContent({ className, sideOffset = 0, children, ...props }) {
93
93
  return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs(TooltipPrimitive.Content, {
94
94
  className: cn("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance", className),
95
95
  "data-slot": "tooltip-content",
@@ -136,5 +136,5 @@ const InputHelp = ({ help, name, className }) => {
136
136
  };
137
137
 
138
138
  //#endregion
139
- export { FormItem, FormLabel, FormMessage, InputHelp };
140
- //# sourceMappingURL=input-help-etTqPzYc.js.map
139
+ export { FormMessage as i, FormItem as n, FormLabel as r, InputHelp as t };
140
+ //# sourceMappingURL=input-help-BO1s6Ca6.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-help-BO1s6Ca6.mjs","names":["ContentHelp: React.FC<{\n children: React.ReactNode;\n help?: React.ReactNode | string;\n className?: string;\n side?: 'top' | 'right' | 'bottom' | 'left';\n sideOffset?: number;\n}>","TooltipPortal","InputHelp: React.FC<{\n help?: string;\n name?: string;\n className?: string;\n}>"],"sources":["../src/components/ui/form.tsx","../src/components/ui/tooltip.tsx","../src/components/ui/content-help.tsx","../src/components/ui/input-help.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n useFormState,\n} from 'react-hook-form';\n\nimport type * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport { Label } from '@/components/ui/label';\n\nimport { cn } from '@/lib/utils';\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName;\n};\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>(\n {} as FormFieldContextValue\n);\n\nconst FormContext = React.createContext<{\n onSubmit?: (data?: FieldValues) => void;\n helper?: Record<string, string>;\n}>({});\n\nexport const useFormContextSubmit = () => {\n const context = React.useContext(FormContext);\n if (!context) {\n return {};\n }\n return context;\n};\n\nconst Form: React.FC<\n React.ComponentProps<typeof FormProvider<FieldValues>> & {\n onSubmit?: (data?: FieldValues) => void;\n helper?: Record<string, string>;\n }\n> = ({ onSubmit, helper, ...props }) => {\n return (\n <FormContext.Provider value={{ onSubmit, helper }}>\n <FormProvider {...props} />\n </FormContext.Provider>\n );\n};\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState } = useFormContext();\n const formState = useFormState({ name: fieldContext.name });\n const fieldState = getFieldState(fieldContext.name, formState);\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n};\n\ntype FormItemContextValue = {\n id: string;\n};\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n {} as FormItemContextValue\n);\n\nfunction FormItem({ className, ...props }: React.ComponentProps<'div'>) {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div\n className={cn('flex flex-col gap-1', className)}\n data-slot=\"form-item\"\n {...props}\n />\n </FormItemContext.Provider>\n );\n}\n\nfunction FormLabel({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n className={cn('data-[error=true]:text-destructive', className)}\n data-error={!!error}\n data-slot=\"form-label\"\n htmlFor={formItemId}\n {...props}\n />\n );\n}\n\nfunction FormControl({ ...props }: React.ComponentProps<typeof Slot>) {\n const { error, formItemId, formDescriptionId, formMessageId } =\n useFormField();\n\n return (\n <Slot\n aria-describedby={\n !error\n ? `${formDescriptionId}`\n : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={!!error}\n data-slot=\"form-control\"\n id={formItemId}\n {...props}\n />\n );\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<'p'>) {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n className={cn('text-muted-foreground text-sm', className)}\n data-slot=\"form-description\"\n id={formDescriptionId}\n {...props}\n />\n );\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<'p'>) {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? '') : props.children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n className={cn('text-destructive text-xs', className)}\n data-slot=\"form-message\"\n id={formMessageId}\n {...props}\n >\n {body}\n </p>\n );\n}\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n};\n","'use client';\n\nimport * as React from 'react';\n\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\n\nimport { cn } from '@/lib/utils';\n\nfunction TooltipProvider({\n delayDuration = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delayDuration={delayDuration}\n {...props}\n />\n );\n}\n\nfunction Tooltip({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return (\n <TooltipProvider>\n <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n </TooltipProvider>\n );\n}\n\nfunction TooltipTrigger({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n className={cn(\n 'bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance',\n className\n )}\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]\" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n","import { Portal as TooltipPortal } from '@radix-ui/react-tooltip';\n\nimport { cn } from '@/lib/utils';\nimport { Tooltip, TooltipContent, TooltipTrigger } from './tooltip';\n\nconst ContentHelp: React.FC<{\n children: React.ReactNode;\n help?: React.ReactNode | string;\n className?: string;\n side?: 'top' | 'right' | 'bottom' | 'left';\n sideOffset?: number;\n}> = ({ children, help, className, side = 'top', sideOffset = 10 }) => {\n return help ? (\n <Tooltip delayDuration={250}>\n <TooltipTrigger asChild>{children as any}</TooltipTrigger>\n <TooltipPortal>\n <TooltipContent\n className={cn('flex items-center px-2 leading-none', className)}\n side={side}\n sideOffset={10}\n >\n <p className=\"w-full text-wrap whitespace-break-spaces\">{help}</p>\n </TooltipContent>\n </TooltipPortal>\n </Tooltip>\n ) : (\n children\n );\n};\n\nexport { ContentHelp };\n","'use client';\n\nimport { ContentHelp } from '@/components/ui/content-help';\n\nimport { Info } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { useFormContextSubmit } from './form';\n\nconst InputHelp: React.FC<{\n help?: string;\n name?: string;\n className?: string;\n}> = ({ help, name, className }) => {\n const { helper } = useFormContextSubmit();\n const helpText = (name && helper?.[name]) || help;\n\n return (\n helpText && (\n <ContentHelp\n className={cn(\n 'whitespace-pre-line leading-relaxed max-w-96 text-[13px]'\n )}\n help={helpText}\n >\n <button\n className={cn('mb-0.5 size-fit hover:bg-muted rounded-sm', className)}\n type=\"button\"\n >\n <Info className=\"size-3.5\" />\n </button>\n </ContentHelp>\n )\n );\n};\nexport { InputHelp };\n"],"mappings":";;;;;;;;;;;AA2BA,MAAM,mBAAmB,MAAM,cAC7B,EAAE,CACH;AAED,MAAM,cAAc,MAAM,cAGvB,EAAE,CAAC;AAEN,MAAa,6BAA6B;CACxC,MAAM,UAAU,MAAM,WAAW,YAAY;AAC7C,KAAI,CAAC,QACH,QAAO,EAAE;AAEX,QAAO;;AA6BT,MAAM,qBAAqB;CACzB,MAAM,eAAe,MAAM,WAAW,iBAAiB;CACvD,MAAM,cAAc,MAAM,WAAW,gBAAgB;CACrD,MAAM,E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;EAAK,aAAU;EAAU,GAAI;GAAS,GACxC;;AAItB,SAAS,eAAe,EACtB,GAAG,SACqD;AACxD,QAAO,oBAAC,iBAAiB;EAAQ,aAAU;EAAkB,GAAI;GAAS;;AAG5E,SAAS,eAAe,EACtB,WACA,aAAa,GACb,UACA,GAAG,SACqD;AACxD,QACE,oBAAC,iBAAiB,oBAChB,qBAAC,iBAAiB;EAChB,WAAW,GACT,qaACA,UACD;EACD,aAAU;EACE;EACZ,GAAI;aAEH,UACD,oBAAC,iBAAiB,SAAM,WAAU,uGAAuG;GAChH,GACH;;;;;ACpD9B,MAAMA,eAMA,EAAE,UAAU,MAAM,WAAW,OAAO,OAAO,aAAa,SAAS;AACrE,QAAO,OACL,qBAAC;EAAQ,eAAe;aACtB,oBAAC;GAAe;GAAS;IAAiC,EAC1D,oBAACC,oBACC,oBAAC;GACC,WAAW,GAAG,uCAAuC,UAAU;GACzD;GACN,YAAY;aAEZ,oBAAC;IAAE,WAAU;cAA4C;KAAS;IACnD,GACH;GACR,GAEV;;;;;ACjBJ,MAAMC,aAIA,EAAE,MAAM,MAAM,gBAAgB;CAClC,MAAM,EAAE,WAAW,sBAAsB;CACzC,MAAM,WAAY,QAAQ,SAAS,SAAU;AAE7C,QACE,YACE,oBAAC;EACC,WAAW,GACT,2DACD;EACD,MAAM;YAEN,oBAAC;GACC,WAAW,GAAG,6CAA6C,UAAU;GACrE,MAAK;aAEL,oBAAC,QAAK,WAAU,aAAa;IACtB;GACG"}
@@ -1,7 +1,7 @@
1
- import { Mask, Options } from "./with-mask-DnMiJlek.js";
1
+ import { n as Options, t as Mask } from "./with-mask-110DD-Lg.mjs";
2
2
  import { FieldPath, FieldValues, UseControllerProps } from "react-hook-form";
3
3
  import { Dispatch, SetStateAction } from "react";
4
- import * as react_jsx_runtime7 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
5
5
  import { PopoverProps } from "@radix-ui/react-popover";
6
6
 
7
7
  //#region src/components/input-suggest/input-suggest.d.ts
@@ -71,7 +71,7 @@ declare function InputSuggest<TFieldValues extends FieldValues = FieldValues, TF
71
71
  debounceTime,
72
72
  maxWait,
73
73
  ...props
74
- }: InputSuggestProps<TFieldValues, TFieldName> & PopoverProps): react_jsx_runtime7.JSX.Element;
74
+ }: InputSuggestProps<TFieldValues, TFieldName> & PopoverProps): react_jsx_runtime1.JSX.Element;
75
75
  //#endregion
76
76
  export { InputSuggest, type InputSuggestProps };
77
- //# sourceMappingURL=input-suggest.d.ts.map
77
+ //# sourceMappingURL=input-suggest.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-suggest.d.mts","names":[],"sources":["../src/components/input-suggest/input-suggest.tsx"],"sourcesContent":[],"mappings":";;;;;;;UAmCiB,uCACM,cAAc,gCAChB,UAAU,gBAAgB,UAAU,uBAC/C,mBAAmB,cAAc;;;EAH1B,QAAA,CAAA,EAAA,CAAA,MAAA,EAAiB,MAAA,EAAA,GAAA,IAAA;EACX,QAAA,CAAA,EAMV,QANU,CAMD,cANC,CAAA,MAAA,CAAA,CAAA;EAAc,KAAA,CAAA,EAAA,MAAA;EACN,WAAA,CAAA,EAAA,MAAA;EAAV,SAAA,CAAA,EAAA,MAAA;EAAoC,OAAA,EAAA,CAAA,MAAA,CAAA,EAAA,MAAA,EAAA,aAAA,CAAA,EAWrC,MAXqC,EAAA,GAAA;IAAV,IAAA,CAAA,EAAA;MAClB,EAAA,EAAA,MAAA,GAAA,MAAA;MAAc,CAAA,GAAA,EAAA,MAAA,CAAA,EAAA,GAAA;IAIrB,CAAA,EAAA;IAAT,OAAA,CAAA,EAAA,GAAA;EAMO,CAAA;EAqBX,QAAA,CAAA,EAAA,OAAA;EACO,KAAA,CAAA,EAAA,MAAA;EACE,kBAAA,CAAA,EAAA,OAAA;EAjCR,YAAA,CAAA,EAAA,GAAA,GAAA,IAAA;EAAkB,UAAA,CAAA,EAAA,OAAA;EAuCnB,OAAA,CAAA,EAAA,MAAY;EACE,IAAA,CAAA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ormLabel, FormMessage, InputHelp } from "./input-help-etTqPzYc.js";
8
- import { Popover, PopoverContent, PopoverTrigger, ScrollBar } from "./scroll-area-C2WadzN5.js";
3
+ import { t as cn } from "./utils-CG5oGEBQ.mjs";
4
+ import { n as withMask, t as Input } from "./input-B9ebQkfm.mjs";
5
+ import { i as FormMessage, n as FormItem, r as FormLabel, t as InputHelp } from "./input-help-BO1s6Ca6.mjs";
6
+ import { i as PopoverTrigger, n as Popover, r as PopoverContent, t as ScrollBar } from "./scroll-area-erZKDarE.mjs";
9
7
  import { useController, useFormContext } from "react-hook-form";
10
8
  import { useCallback, useEffect, useState } from "react";
11
9
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -14,12 +12,11 @@ import { useDebounce } from "use-debounce";
14
12
  import { ScrollArea, ScrollAreaViewport } from "@radix-ui/react-scroll-area";
15
13
 
16
14
  //#region src/components/input-suggest/input-suggest.tsx
17
- function InputSuggest({ name, nameSearch, onSearch, fieldValue = "name", label, className, placeholder, useData, setValue, required, disabled, updateSearchOnBlur = true, value, extra, extraOnClick, withPortal = false, counter, help, prefix, refineValue, refineSuggest, limit = 10, mask, maskOptions, children, onClear, initialParams, debounceTime = 100, maxWait = 200,...props }) {
15
+ function InputSuggest({ name, nameSearch, onSearch, fieldValue = "name", label, className, placeholder, useData, setValue, required, disabled, updateSearchOnBlur = true, value, extra, extraOnClick, withPortal = false, counter, help, prefix, refineValue, refineSuggest, limit = 10, mask, maskOptions, children, onClear, initialParams, debounceTime = 100, maxWait = 200, ...props }) {
18
16
  const form = useFormContext();
19
17
  const inputName = prefix ? `${prefix}.${name}` : name;
20
- const searchName = prefix ? `${prefix}.${nameSearch}` : nameSearch;
21
18
  const { field: searchField } = useController({
22
- name: searchName,
19
+ name: prefix ? `${prefix}.${nameSearch}` : nameSearch,
23
20
  control: form.control
24
21
  });
25
22
  const { field, fieldState } = useController({
@@ -183,4 +180,4 @@ function InputSuggest({ name, nameSearch, onSearch, fieldValue = "name", label,
183
180
 
184
181
  //#endregion
185
182
  export { InputSuggest };
186
- //# sourceMappingURL=input-suggest.js.map
183
+ //# sourceMappingURL=input-suggest.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-suggest.mjs","names":["item"],"sources":["../src/components/input-suggest/input-suggest.tsx"],"sourcesContent":["'use client';\n\nimport {\n Dispatch,\n SetStateAction,\n useCallback,\n useEffect,\n useState,\n} from 'react';\n\nimport {\n FieldPath,\n FieldValues,\n UseControllerProps,\n useController,\n useFormContext,\n} from 'react-hook-form';\nimport { useDebounce } from 'use-debounce';\nimport withMask, {\n type Mask,\n type Options as MaskOptions,\n} from '@/hooks/with-mask';\n\nimport type { PopoverProps } from '@radix-ui/react-popover';\nimport { ScrollArea, ScrollAreaViewport } from '@radix-ui/react-scroll-area';\nimport { Input } from '@/components/ui/input';\nimport { FormItem, FormLabel, FormMessage } from '@/ui/form';\nimport { InputHelp } from '@/ui/input-help';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/ui/popover';\nimport { ScrollBar } from '../ui/scroll-area';\n\nimport { Check } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\nexport interface InputSuggestProps<\n TFieldValues extends FieldValues = FieldValues,\n TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> extends UseControllerProps<TFieldValues, TFieldName> {\n label: string;\n search?: string;\n onSearch?: (search: string) => void;\n setValue?: Dispatch<SetStateAction<string>>;\n value?: string;\n placeholder?: string;\n className?: string;\n useData: (\n search?: string,\n initialParams?: Object\n ) => {\n data?: {\n id: string | number;\n [key: string]: any;\n }[];\n refresh?: any;\n };\n required?: boolean;\n extra?: string;\n updateSearchOnBlur?: boolean;\n extraOnClick?: () => void;\n withPortal?: boolean;\n counter?: number;\n help?: string;\n nameSearch: string;\n prefix?: string;\n refineValue?: (value: any) => any;\n refineSuggest?: (suggest: any) => any;\n limit?: number;\n fieldValue?: string;\n mask?: Mask;\n maskOptions?: MaskOptions;\n initialParams?: Object;\n onClear?: () => void;\n debounceTime?: number;\n maxWait?: number;\n}\n\nfunction InputSuggest<\n TFieldValues extends FieldValues = FieldValues,\n TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n name,\n nameSearch,\n onSearch,\n fieldValue = 'name',\n label,\n className,\n placeholder,\n useData,\n setValue,\n required,\n disabled,\n updateSearchOnBlur = true,\n value,\n extra,\n extraOnClick,\n withPortal = false,\n counter,\n help,\n prefix,\n refineValue,\n refineSuggest,\n limit = 10,\n mask,\n maskOptions,\n children,\n onClear,\n initialParams,\n debounceTime = 100,\n maxWait = 200,\n ...props\n}: InputSuggestProps<TFieldValues, TFieldName> & PopoverProps) {\n const form = useFormContext();\n const inputName = prefix ? `${prefix}.${name}` : name;\n const searchName = prefix ? `${prefix}.${nameSearch}` : nameSearch;\n\n const { field: searchField } = useController({\n name: searchName,\n control: form.control,\n });\n const { field, fieldState } = useController({\n name: inputName,\n control: form.control,\n });\n\n const [ariaSelected, setAriaSelected] = useState(-1);\n\n const [open, setOpen] = useState(false);\n\n const [searchDebounced] = useDebounce(searchField.value, debounceTime, {\n maxWait: maxWait,\n });\n const { data } = useData?.(searchDebounced, initialParams);\n\n const onChange = useCallback(\n (item: any) => {\n const searchValue = item?.[fieldValue as keyof typeof item];\n searchField.onChange(searchValue);\n onSearch?.(searchValue);\n field.onChange(refineValue?.(item) || item);\n setOpen(false);\n },\n [field.value, refineValue, fieldValue]\n );\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (e.target.value === '') {\n searchField.onChange('');\n field.onChange(null);\n onClear?.();\n onSearch?.('');\n return;\n }\n searchField.onChange(e.target.value);\n onSearch?.(e.target.value);\n setOpen(true);\n const item = data?.find((item) => item[fieldValue] === e.target.value);\n if (item) {\n onChange(item);\n setOpen(false);\n }\n },\n [field, searchField, onClear, onSearch]\n );\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n e.stopPropagation();\n ariaSelected < (data?.length ?? 0) - 1 &&\n setAriaSelected((prev) => prev + 1);\n }\n if (e.key === 'ArrowUp') {\n e.preventDefault();\n e.stopPropagation();\n ariaSelected > 0 && setAriaSelected((prev) => prev - 1);\n }\n if (e.key === 'Enter' && data && data[ariaSelected]) {\n e.preventDefault();\n e.stopPropagation();\n onChange(data[ariaSelected]);\n }\n },\n [data, ariaSelected, onChange]\n );\n\n useEffect(() => {\n const searchValue = field?.value?.[fieldValue as keyof typeof field.value];\n if (searchValue !== searchField.value && updateSearchOnBlur) {\n searchField.onChange(searchValue);\n onSearch?.(searchValue);\n }\n }, [field.value]);\n\n return (\n <FormItem\n className={cn('w-full flex flex-col', className)}\n id={`input-suggest-${inputName}`}\n >\n <div className=\"flex items-end gap-1.5\">\n <FormLabel htmlFor={inputName}>\n {label}:\n {required && (\n <span className=\"text-red-500 text-lg leading-[1px]\">*</span>\n )}\n </FormLabel>\n\n <InputHelp help={help} name={inputName} />\n </div>\n <Popover onOpenChange={setOpen} open={open} {...props}>\n <PopoverTrigger className=\"outline-hidden w-full relative\">\n <Input\n autoComplete=\"off\"\n className={cn(fieldState.error && 'border-destructive')}\n disabled={disabled}\n name={name}\n onInput={handleChange}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n ref={\n mask\n ? withMask(mask, { autoUnmask: true, ...maskOptions })\n : (undefined as any)\n }\n value={searchField.value}\n />\n {children}\n </PopoverTrigger>\n {fieldState.error && <FormMessage />}\n <PopoverContent\n className={cn(\n 'mt-1 w-(--radix-popover-trigger-width) max-w-2xl p-0 z-50',\n data?.length === 0 && 'hidden'\n )}\n onOpenAutoFocus={(e) => e.preventDefault()}\n >\n <ScrollArea className=\"h-fit max-h-[300px]\" id=\"scroll\">\n <ScrollAreaViewport className=\"w-full h-fit max-h-[300px]\">\n <ul className=\"p-1\">\n {data?.slice(0, limit)?.map((item) => (\n <li\n aria-selected={data[ariaSelected]?.id === item.id}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden aria-selected:bg-accent/50 aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 transition-all hover:bg-accent/50 hover:text-accent-foreground',\n field?.value?.id === item.id &&\n 'bg-accent! text-accent-foreground'\n )}\n key={item.id}\n onMouseDown={(e) => {\n onChange(item);\n e.preventDefault();\n }}\n >\n <span className=\"line-clamp-1 flex-1\">\n {refineSuggest\n ? refineSuggest(item)\n : item?.[fieldValue as keyof typeof item]}\n </span>\n {field?.value?.id == item.id && (\n <Check className=\"ml-auto h-4 w-4 shrink-0\" />\n )}\n </li>\n ))}\n\n {extra && (\n <li\n className={cn(\n 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden aria-selected:bg-accent/50 aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 transition-all hover:text-accent-foreground sticky bottom-0.5 bg-white hover:bg-accent'\n )}\n onMouseDown={(e) => {\n e.preventDefault();\n extraOnClick?.();\n }}\n >\n <span className=\"line-clamp-1\">{extra}</span>\n </li>\n )}\n\n {(data?.length === 0 || !data) && !extra && (\n <p className=\"text-sm text-center text-accent-foreground/50 py-2\">\n Nenhum resultado encontrado.\n </p>\n )}\n </ul>\n </ScrollAreaViewport>\n <ScrollBar />\n </ScrollArea>\n </PopoverContent>\n </Popover>\n </FormItem>\n );\n}\n\nexport { InputSuggest };\n"],"mappings":";;;;;;;;;;;;;;AA6EA,SAAS,aAGP,EACA,MACA,YACA,UACA,aAAa,QACb,OACA,WACA,aACA,SACA,UACA,UACA,UACA,qBAAqB,MACrB,OACA,OACA,cACA,aAAa,OACb,SACA,MACA,QACA,aACA,eACA,QAAQ,IACR,MACA,aACA,UACA,SACA,eACA,eAAe,KACf,UAAU,KACV,GAAG,SAC0D;CAC7D,MAAM,OAAO,gBAAgB;CAC7B,MAAM,YAAY,SAAS,GAAG,OAAO,GAAG,SAAS;CAGjD,MAAM,EAAE,OAA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cAAc,MAAM;AAClB,oBAAS,KAAK;AACd,aAAE,gBAAgB;;qBAGpB,oBAAC;WAAK,WAAU;qBACb,gBACG,cAAc,KAAK,GACnB,OAAO;YACN,EACN,OAAO,OAAO,MAAM,KAAK,MACxB,oBAAC,SAAM,WAAU,6BAA6B;YAZ3C,KAAK,GAcP,CACL;SAED,SACC,oBAAC;UACC,WAAW,GACT,6TACD;UACD,cAAc,MAAM;AAClB,aAAE,gBAAgB;AAClB,2BAAgB;;oBAGlB,oBAAC;WAAK,WAAU;qBAAgB;YAAa;WAC1C;UAGL,MAAM,WAAW,KAAK,CAAC,SAAS,CAAC,SACjC,oBAAC;UAAE,WAAU;oBAAqD;WAE9D;;SAEH;QACc,EACrB,oBAAC,cAAY;OACF;MACE;;IACT;GACD"}
@@ -1,10 +1,10 @@
1
- import { cn } from "./utils-C0f9Ma6r.js";
1
+ import { t as cn } from "./utils-CG5oGEBQ.mjs";
2
2
  import "react";
3
3
  import * as LabelPrimitive from "@radix-ui/react-label";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
 
6
6
  //#region src/components/ui/label.tsx
7
- function Label({ className,...props }) {
7
+ function Label({ className, ...props }) {
8
8
  return /* @__PURE__ */ jsx(LabelPrimitive.Root, {
9
9
  className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
10
10
  "data-slot": "label",
@@ -13,5 +13,5 @@ function Label({ className,...props }) {
13
13
  }
14
14
 
15
15
  //#endregion
16
- export { Label };
17
- //# sourceMappingURL=label-BqtcCyMj.js.map
16
+ export { Label as t };
17
+ //# sourceMappingURL=label-ofBNlnV2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label-ofBNlnV2.mjs","names":[],"sources":["../src/components/ui/label.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\n\nimport { cn } from '@/lib/utils';\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n className={cn(\n 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className\n )}\n data-slot=\"label\"\n {...props}\n />\n );\n}\n\nexport { Label };\n"],"mappings":";;;;;;AAQA,SAAS,MAAM,EACb,WACA,GAAG,SACgD;AACnD,QACE,oBAAC,eAAe;EACd,WAAW,GACT,uNACA,UACD;EACD,aAAU;EACV,GAAI;GACJ"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/components/page-header/page-header.d.ts
4
4
  interface PageHeaderProps {
@@ -10,7 +10,7 @@ declare function PageHeader({
10
10
  title,
11
11
  help,
12
12
  description
13
- }: PageHeaderProps): react_jsx_runtime5.JSX.Element;
13
+ }: PageHeaderProps): react_jsx_runtime2.JSX.Element;
14
14
  //#endregion
15
15
  export { PageHeader, type PageHeaderProps };
16
- //# sourceMappingURL=page-header.d.ts.map
16
+ //# sourceMappingURL=page-header.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-header.d.mts","names":[],"sources":["../src/components/page-header/page-header.tsx"],"sourcesContent":[],"mappings":";;;UAEiB,eAAA;;;EAAA,WAAA,CAAA,EAAA,MAAe;AAI/B;iBAEQ,UAAA,CACP;EAAA,KAAA;EAAA,IAAA;EAAA;AAAA,CAAA,EAGC,eAHD,CAAA,EAGgB,kBAAA,CAAA,GAAA,CAAA,OAHhB"}
@@ -1,9 +1,6 @@
1
1
  'use client';
2
2
 
3
-
4
- import "./utils-C0f9Ma6r.js";
5
- import "./label-BqtcCyMj.js";
6
- import { InputHelp } from "./input-help-etTqPzYc.js";
3
+ import { t as InputHelp } from "./input-help-BO1s6Ca6.mjs";
7
4
  import { jsx, jsxs } from "react/jsx-runtime";
8
5
 
9
6
  //#region src/components/page-header/page-header.tsx
@@ -25,4 +22,4 @@ function PageHeader({ title, help, description }) {
25
22
 
26
23
  //#endregion
27
24
  export { PageHeader };
28
- //# sourceMappingURL=page-header.js.map
25
+ //# sourceMappingURL=page-header.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-header.mjs","names":[],"sources":["../src/components/page-header/page-header.tsx"],"sourcesContent":["import { InputHelp } from \"../ui/input-help\";\n\nexport interface PageHeaderProps {\n title: string;\n help?: string;\n description?: string;\n}\n\nfunction PageHeader({\n title,\n help,\n description,\n}: PageHeaderProps) {\n return (\n <div className=\"flex flex-col mb-10\">\n <div className=\"flex items-start gap-2\">\n <h1 className=\"text-2xl font-bold\">{title}</h1>\n {help && <InputHelp help={help} />}\n </div>\n {description && (\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n )}\n </div>\n );\n}\n\nexport { PageHeader };\n"],"mappings":";;;;;;AAQA,SAAS,WAAW,EAClB,OACA,MACA,eACkB;AAClB,QACE,qBAAC;EAAI,WAAU;aACb,qBAAC;GAAI,WAAU;cACb,oBAAC;IAAG,WAAU;cAAsB;KAAW,EAC9C,QAAQ,oBAAC,aAAgB,OAAQ;IAC9B,EACL,eACC,oBAAC;GAAE,WAAU;aAAiC;IAAgB;GAE5D"}
@@ -1,5 +1,5 @@
1
1
  import { FieldPath, FieldPathValue, FieldValues, UseControllerProps } from "react-hook-form";
2
- import * as react_jsx_runtime3 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
  import { Options } from "nuqs";
4
4
  import { PopoverProps } from "@radix-ui/react-popover";
5
5
 
@@ -63,7 +63,7 @@ declare function RemoteSelectorField<T, TFieldValues extends FieldValues = Field
63
63
  initialRequest,
64
64
  forceToggle,
65
65
  ...props
66
- }: RemoteSelectorFieldProps<TFieldValues, TFieldName> & BaseRemoteSelectorProps<T>): react_jsx_runtime3.JSX.Element;
66
+ }: RemoteSelectorFieldProps<TFieldValues, TFieldName> & BaseRemoteSelectorProps<T>): react_jsx_runtime0.JSX.Element;
67
67
  interface RemoteSelectorQueryProps<T> extends BaseRemoteSelectorProps<T> {
68
68
  name: string;
69
69
  defaultValue?: string;
@@ -83,7 +83,7 @@ declare function RemoteSelectorQuery<T>({
83
83
  fieldLabel,
84
84
  type,
85
85
  ...props
86
- }: RemoteSelectorQueryProps<T>): react_jsx_runtime3.JSX.Element;
86
+ }: RemoteSelectorQueryProps<T>): react_jsx_runtime0.JSX.Element;
87
87
  //#endregion
88
88
  export { type BaseRemoteSelectorProps, RemoteSelectorField as RemoteSelector, RemoteSelectorField, type RemoteSelectorFieldProps, RemoteSelectorQuery, type RemoteSelectorQueryProps, type TUseData };
89
- //# sourceMappingURL=remote-selector.d.ts.map
89
+ //# sourceMappingURL=remote-selector.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-selector.d.mts","names":[],"sources":["../src/components/ui/selector.tsx","../src/components/remote-selector/remote-selector.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAkCU,KAFE,aAEF,CAAA,CAAA,CAAA,GAAA;EAAI,IAAA,CAAA,EAAA,QAAA,GAAA,UAAA;EACM,KAAA,CAAA,EADV,CACU,GADN,CACM,EAAA;EAAI,QAAA,CAAA,EAAA,CAAA,IAAA,EAAJ,CAAI,GAAA,CAAA,EAAA,GAAA,SAAA,GAAA,IAAA,EAAA,GAAA,IAAA;EAId,MAAM,CAAA,EAAA,MAAA;EACP,QAAA,CAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,GAAA,IAAA;EACW,WAAA,CAAA,EAAA,MAAA;EACD,KAAA,CAAA,EAHT,KAAA,CAAM,SAGG;EACD,KAAA,EAHT,CAGS,EAAA;EAOR,UAAM,EAAA,MATI,CASJ;EAKM,QAAA,CAAA,EAAA,MAbH,CAaG;EAAI,OAAA,CAAA,EAAA,MAZR,CAYQ;EACnB,QAAA,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opoverContent, PopoverTrigger, ScrollBar } from "./scroll-area-C2WadzN5.js";
3
+ import { t as cn } from "./utils-CG5oGEBQ.mjs";
4
+ import { i as FormMessage, n as FormItem, t as InputHelp } from "./input-help-BO1s6Ca6.mjs";
5
+ import { i as PopoverTrigger, n as Popover, r as PopoverContent, t as ScrollBar } from "./scroll-area-erZKDarE.mjs";
8
6
  import { useController, useFormContext } from "react-hook-form";
9
7
  import * as React from "react";
10
8
  import { createElement, useEffect, useId, useMemo, useState } from "react";
@@ -30,7 +28,7 @@ const badgeVariants = cva("inline-flex items-center rounded-full border px-2.5 p
30
28
  } },
31
29
  defaultVariants: { variant: "default" }
32
30
  });
33
- function Badge({ className, variant,...props }) {
31
+ function Badge({ className, variant, ...props }) {
34
32
  return /* @__PURE__ */ jsx("div", {
35
33
  className: cn(badgeVariants({ variant }), className),
36
34
  ...props
@@ -61,7 +59,7 @@ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whites
61
59
  size: "default"
62
60
  }
63
61
  });
64
- function Button({ className, variant, size, asChild = false,...props }) {
62
+ function Button({ className, variant, size, asChild = false, ...props }) {
65
63
  return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
66
64
  className: cn(buttonVariants({
67
65
  variant,
@@ -75,7 +73,7 @@ function Button({ className, variant, size, asChild = false,...props }) {
75
73
 
76
74
  //#endregion
77
75
  //#region src/components/ui/checkbox.tsx
78
- function Checkbox$1({ className, onCheckedChange,...props }) {
76
+ function Checkbox$1({ className, onCheckedChange, ...props }) {
79
77
  const [isChecked, setIsChecked] = React.useState(props?.checked ?? props?.defaultChecked ?? false);
80
78
  React.useEffect(() => {
81
79
  if (props?.checked !== void 0) setIsChecked(props.checked);
@@ -99,7 +97,7 @@ function Checkbox$1({ className, onCheckedChange,...props }) {
99
97
  forceMount: true,
100
98
  children: /* @__PURE__ */ jsx(motion.svg, {
101
99
  animate: isChecked ? "checked" : "unchecked",
102
- className: "size-3",
100
+ className: cn("size-3", isChecked && "text-primary-foreground"),
103
101
  "data-slot": "checkbox-indicator",
104
102
  fill: "none",
105
103
  initial: "unchecked",
@@ -135,14 +133,14 @@ function Checkbox$1({ className, onCheckedChange,...props }) {
135
133
 
136
134
  //#endregion
137
135
  //#region src/components/ui/command.tsx
138
- function Command$1({ className,...props }) {
136
+ function Command$1({ className, ...props }) {
139
137
  return /* @__PURE__ */ jsx(Command, {
140
138
  className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className),
141
139
  "data-slot": "command",
142
140
  ...props
143
141
  });
144
142
  }
145
- function CommandInput({ className,...props }) {
143
+ function CommandInput({ className, ...props }) {
146
144
  return /* @__PURE__ */ jsxs("div", {
147
145
  className: "flex h-9 items-center gap-2 border-b px-3",
148
146
  "data-slot": "command-input-wrapper",
@@ -153,7 +151,7 @@ function CommandInput({ className,...props }) {
153
151
  })]
154
152
  });
155
153
  }
156
- function CommandList({ className,...props }) {
154
+ function CommandList({ className, ...props }) {
157
155
  return /* @__PURE__ */ jsx(Command.List, {
158
156
  className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
159
157
  "data-slot": "command-list",
@@ -167,14 +165,14 @@ function CommandEmpty({ ...props }) {
167
165
  ...props
168
166
  });
169
167
  }
170
- function CommandGroup({ className,...props }) {
168
+ function CommandGroup({ className, ...props }) {
171
169
  return /* @__PURE__ */ jsx(Command.Group, {
172
170
  className: cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className),
173
171
  "data-slot": "command-group",
174
172
  ...props
175
173
  });
176
174
  }
177
- function CommandItem({ className,...props }) {
175
+ function CommandItem({ className, ...props }) {
178
176
  return /* @__PURE__ */ jsx(Command.Item, {
179
177
  className: cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
180
178
  "data-slot": "command-item",
@@ -184,7 +182,7 @@ function CommandItem({ className,...props }) {
184
182
 
185
183
  //#endregion
186
184
  //#region src/components/ui/selector.tsx
187
- function Selector({ type = "single", value, onChange, search, onSearch, items, label, placeholder, fieldLabel, fieldKey, groupBy, searchPlaceholder, name, empty = "Nenhuma opção encontrada...", disabled = false, className, required, error, selectFirstIsOne, help, extra, extraOnClick, open, setOpen, maxVisibleBadges = 3, id,...props }) {
185
+ function Selector({ type = "single", value, onChange, search, onSearch, items, label, placeholder, fieldLabel, fieldKey, groupBy, searchPlaceholder, name, empty = "Nenhuma opção encontrada...", disabled = false, className, required, error, selectFirstIsOne, help, extra, extraOnClick, open, setOpen, maxVisibleBadges = 3, id, ...props }) {
188
186
  const itemKey = fieldKey || fieldLabel;
189
187
  const isMultiple = type === "multiple";
190
188
  const selectedItems = isMultiple && Array.isArray(value) ? value : [];
@@ -210,10 +208,9 @@ function Selector({ type = "single", value, onChange, search, onSearch, items, l
210
208
  selectedGroups: [],
211
209
  unselectedGroups: buildGroups(items, groupBy)
212
210
  };
213
- const unselectedItems = items.filter((item) => !isItemSelected(item));
214
211
  return {
215
212
  selectedGroups: selectedItems,
216
- unselectedGroups: buildGroups(unselectedItems, groupBy)
213
+ unselectedGroups: buildGroups(items.filter((item) => !isItemSelected(item)), groupBy)
217
214
  };
218
215
  }, [
219
216
  groupBy,
@@ -370,7 +367,7 @@ const buildGroups = (items, groupBy) => {
370
367
 
371
368
  //#endregion
372
369
  //#region src/components/remote-selector/remote-selector.tsx
373
- function RemoteSelectorField({ name, nameValue, className, required, defaultValue, onChange: onChangeCallback, useData, initialParams, initialRequest = false, forceToggle = false,...props }) {
370
+ function RemoteSelectorField({ name, nameValue, className, required, defaultValue, onChange: onChangeCallback, useData, initialParams, initialRequest = false, forceToggle = false, ...props }) {
374
371
  const { control, setValue } = useFormContext();
375
372
  const { field, fieldState } = useController({
376
373
  control,
@@ -411,7 +408,7 @@ function RemoteSelectorField({ name, nameValue, className, required, defaultValu
411
408
  })
412
409
  });
413
410
  }
414
- function RemoteSelectorQuery({ name, defaultValue, options, useData, initialParams, initialRequest = false, forceToggle = false, onChange: onChangeCallback, fieldKey, fieldLabel, type = "single",...props }) {
411
+ function RemoteSelectorQuery({ name, defaultValue, options, useData, initialParams, initialRequest = false, forceToggle = false, onChange: onChangeCallback, fieldKey, fieldLabel, type = "single", ...props }) {
415
412
  const id = useId();
416
413
  const [open, setOpen] = useState(false);
417
414
  const [search, setSearch] = useState("");
@@ -422,8 +419,7 @@ function RemoteSelectorQuery({ name, defaultValue, options, useData, initialPara
422
419
  }, [forceToggle]);
423
420
  const itemKey = fieldKey || fieldLabel;
424
421
  const isMultiple = type === "multiple";
425
- const parser = isMultiple ? parseAsArrayOf(parseAsString).withDefault([]) : parseAsString.withDefault(defaultValue ?? "");
426
- const [queryIds, setQueryIds] = useQueryState(name, parser.withOptions({
422
+ const [queryIds, setQueryIds] = useQueryState(name, (isMultiple ? parseAsArrayOf(parseAsString).withDefault([]) : parseAsString.withDefault(defaultValue ?? "")).withOptions({
427
423
  clearOnDefault: true,
428
424
  shallow: false,
429
425
  ...options
@@ -454,4 +450,4 @@ function RemoteSelectorQuery({ name, defaultValue, options, useData, initialPara
454
450
 
455
451
  //#endregion
456
452
  export { RemoteSelectorField as RemoteSelector, RemoteSelectorField, RemoteSelectorQuery };
457
- //# sourceMappingURL=remote-selector.js.map
453
+ //# sourceMappingURL=remote-selector.mjs.map