@cnc-ti/layout-basic 8.3.21 → 8.3.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -434,6 +434,7 @@ interface ComboboxProps {
434
434
  };
435
435
  onChange?: (value: string) => void;
436
436
  value?: string;
437
+ onInput?: (value: string) => void;
437
438
  }
438
439
  /**
439
440
  * Componente Combobox reutilizável com suporte a busca, exibição de placeholder e seleção de opções.
@@ -455,7 +456,7 @@ interface ComboboxProps {
455
456
  * />
456
457
  * ```
457
458
  */
458
- declare function Combobox({ options, placeholder, command, onChange, value, }: ComboboxProps): react_jsx_runtime.JSX.Element;
459
+ declare function Combobox({ options, placeholder, command, onChange, value, onInput, }: ComboboxProps): react_jsx_runtime.JSX.Element;
459
460
 
460
461
  declare const Command: React$1.ForwardRefExoticComponent<Omit<{
461
462
  children?: React$1.ReactNode;
package/dist/index.d.ts CHANGED
@@ -434,6 +434,7 @@ interface ComboboxProps {
434
434
  };
435
435
  onChange?: (value: string) => void;
436
436
  value?: string;
437
+ onInput?: (value: string) => void;
437
438
  }
438
439
  /**
439
440
  * Componente Combobox reutilizável com suporte a busca, exibição de placeholder e seleção de opções.
@@ -455,7 +456,7 @@ interface ComboboxProps {
455
456
  * />
456
457
  * ```
457
458
  */
458
- declare function Combobox({ options, placeholder, command, onChange, value, }: ComboboxProps): react_jsx_runtime.JSX.Element;
459
+ declare function Combobox({ options, placeholder, command, onChange, value, onInput, }: ComboboxProps): react_jsx_runtime.JSX.Element;
459
460
 
460
461
  declare const Command: React$1.ForwardRefExoticComponent<Omit<{
461
462
  children?: React$1.ReactNode;
package/dist/index.js CHANGED
@@ -10776,7 +10776,7 @@ var Input = React58.forwardRef(
10776
10776
  type,
10777
10777
  id: idGenerate,
10778
10778
  className: cn(
10779
- "cnc-flex cnc-h-8 cnc-w-full cnc-rounded-md cnc-border cnc-border-input cnc-bg-transparent cnc-px-3 cnc-py-1 cnc-text-base cnc-shadow-sm cnc-transition-colors",
10779
+ "cnc-flex cnc-h-10 cnc-w-full cnc-rounded-md cnc-border cnc-border-input cnc-bg-transparent cnc-px-3 cnc-py-1 cnc-text-base cnc-shadow-sm cnc-transition-colors",
10780
10780
  " file:cnc-border-0 file:cnc-bg-transparent file:cnc-text-sm file:cnc-font-medium file:cnc-text-foreground placeholder:cnc-text-muted-foreground focus-visible:cnc-outline-none",
10781
10781
  "focus-visible:cnc-ring-2 focus-visible:cnc-ring-brand-gray-500/50 disabled:cnc-cursor-not-allowed disabled:cnc-opacity-50 md:cnc-text-sm ",
10782
10782
  "not-disabled:hover:cnc-border-brand-gray-500",
@@ -10796,6 +10796,7 @@ var React59 = __toESM(require("react"));
10796
10796
  var import_jsx_runtime33 = require("react/jsx-runtime");
10797
10797
  var Checkbox = React59.forwardRef(
10798
10798
  ({ className, id, label, ...props }, ref) => {
10799
+ console.log();
10799
10800
  const idGenerate = id ? id : label && `field-${Date.now()}-${Math.random() * 1e5}`;
10800
10801
  return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "cnc-w-full cnc-flex cnc-flex-row", children: [
10801
10802
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
@@ -11565,7 +11566,8 @@ function Combobox({
11565
11566
  placeholder = "",
11566
11567
  command,
11567
11568
  onChange,
11568
- value = ""
11569
+ value = "",
11570
+ onInput
11569
11571
  }) {
11570
11572
  const [open, setOpen] = React64.useState(false);
11571
11573
  return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Popover3, { open, onOpenChange: setOpen, children: [
@@ -11588,7 +11590,13 @@ function Combobox({
11588
11590
  align: "start",
11589
11591
  className: "cnc-w-[--radix-popover-trigger-width] cnc-p-0",
11590
11592
  children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Command, { children: [
11591
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CommandInput, { placeholder: command?.placeholder }),
11593
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11594
+ CommandInput,
11595
+ {
11596
+ placeholder: command?.placeholder,
11597
+ onInput: (e) => onInput && onInput(e.target?.value)
11598
+ }
11599
+ ),
11592
11600
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(CommandList, { children: [
11593
11601
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CommandEmpty, { children: command?.emptyMessage ?? "Nenhum item encontrado" }),
11594
11602
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CommandGroup, { children: options?.map((option) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(