@cnc-ti/layout-basic 8.3.27 → 8.3.28
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 +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -416,6 +416,7 @@ declare function Title({ title, as: Component }: TitleProps): react_jsx_runtime.
|
|
|
416
416
|
interface ItemOption {
|
|
417
417
|
value: any;
|
|
418
418
|
label: string;
|
|
419
|
+
disabled?: boolean;
|
|
419
420
|
}
|
|
420
421
|
/**
|
|
421
422
|
* Propriedades para o componente Combobox.
|
|
@@ -437,6 +438,14 @@ interface ComboboxProps {
|
|
|
437
438
|
onChange?: (value: string) => void;
|
|
438
439
|
value?: string;
|
|
439
440
|
onInput?: (value: string) => void;
|
|
441
|
+
/** Se o popover deve ter comportamento modal (padrão: false para compatibilidade com Drawers) */
|
|
442
|
+
modal?: boolean;
|
|
443
|
+
/** Classes CSS adicionais para o PopoverContent */
|
|
444
|
+
popoverClassName?: string;
|
|
445
|
+
/** Classes CSS adicionais para o botão trigger */
|
|
446
|
+
buttonClassName?: string;
|
|
447
|
+
/** Desabilita o combobox */
|
|
448
|
+
disabled?: boolean;
|
|
440
449
|
}
|
|
441
450
|
/**
|
|
442
451
|
* Componente Combobox reutilizável com suporte a busca, exibição de placeholder e seleção de opções.
|
|
@@ -458,7 +467,7 @@ interface ComboboxProps {
|
|
|
458
467
|
* />
|
|
459
468
|
* ```
|
|
460
469
|
*/
|
|
461
|
-
declare function Combobox({ options, placeholder, command, onChange, value, onInput, }: ComboboxProps): react_jsx_runtime.JSX.Element;
|
|
470
|
+
declare function Combobox({ options, placeholder, command, onChange, value, onInput, modal, popoverClassName, buttonClassName, disabled, }: ComboboxProps): react_jsx_runtime.JSX.Element;
|
|
462
471
|
|
|
463
472
|
declare const Command: React$1.ForwardRefExoticComponent<Omit<{
|
|
464
473
|
children?: React$1.ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -416,6 +416,7 @@ declare function Title({ title, as: Component }: TitleProps): react_jsx_runtime.
|
|
|
416
416
|
interface ItemOption {
|
|
417
417
|
value: any;
|
|
418
418
|
label: string;
|
|
419
|
+
disabled?: boolean;
|
|
419
420
|
}
|
|
420
421
|
/**
|
|
421
422
|
* Propriedades para o componente Combobox.
|
|
@@ -437,6 +438,14 @@ interface ComboboxProps {
|
|
|
437
438
|
onChange?: (value: string) => void;
|
|
438
439
|
value?: string;
|
|
439
440
|
onInput?: (value: string) => void;
|
|
441
|
+
/** Se o popover deve ter comportamento modal (padrão: false para compatibilidade com Drawers) */
|
|
442
|
+
modal?: boolean;
|
|
443
|
+
/** Classes CSS adicionais para o PopoverContent */
|
|
444
|
+
popoverClassName?: string;
|
|
445
|
+
/** Classes CSS adicionais para o botão trigger */
|
|
446
|
+
buttonClassName?: string;
|
|
447
|
+
/** Desabilita o combobox */
|
|
448
|
+
disabled?: boolean;
|
|
440
449
|
}
|
|
441
450
|
/**
|
|
442
451
|
* Componente Combobox reutilizável com suporte a busca, exibição de placeholder e seleção de opções.
|
|
@@ -458,7 +467,7 @@ interface ComboboxProps {
|
|
|
458
467
|
* />
|
|
459
468
|
* ```
|
|
460
469
|
*/
|
|
461
|
-
declare function Combobox({ options, placeholder, command, onChange, value, onInput, }: ComboboxProps): react_jsx_runtime.JSX.Element;
|
|
470
|
+
declare function Combobox({ options, placeholder, command, onChange, value, onInput, modal, popoverClassName, buttonClassName, disabled, }: ComboboxProps): react_jsx_runtime.JSX.Element;
|
|
462
471
|
|
|
463
472
|
declare const Command: React$1.ForwardRefExoticComponent<Omit<{
|
|
464
473
|
children?: React$1.ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -11567,17 +11567,22 @@ function Combobox({
|
|
|
11567
11567
|
command,
|
|
11568
11568
|
onChange,
|
|
11569
11569
|
value = "",
|
|
11570
|
-
onInput
|
|
11570
|
+
onInput,
|
|
11571
|
+
modal = false,
|
|
11572
|
+
popoverClassName,
|
|
11573
|
+
buttonClassName,
|
|
11574
|
+
disabled = false
|
|
11571
11575
|
}) {
|
|
11572
11576
|
const [open, setOpen] = React64.useState(false);
|
|
11573
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Popover3, { open, onOpenChange: setOpen, children: [
|
|
11577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Popover3, { open, onOpenChange: setOpen, modal, children: [
|
|
11574
11578
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(PopoverTrigger3, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
11575
11579
|
Button,
|
|
11576
11580
|
{
|
|
11577
11581
|
variant: "outline",
|
|
11578
11582
|
role: "combobox",
|
|
11579
11583
|
"aria-expanded": open,
|
|
11580
|
-
className: "cnc-w-full cnc-justify-between cnc-truncate ",
|
|
11584
|
+
className: cn("cnc-w-full cnc-justify-between cnc-truncate ", buttonClassName),
|
|
11585
|
+
disabled,
|
|
11581
11586
|
children: [
|
|
11582
11587
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { children: value ? options?.find((framework) => framework.value === value)?.label : placeholder }),
|
|
11583
11588
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ChevronsUpDown, { className: "cnc-ml-2 cnc-h-4 cnc-w-4 cnc-shrink-0 cnc-opacity-50" })
|
|
@@ -11588,7 +11593,7 @@ function Combobox({
|
|
|
11588
11593
|
PopoverContent3,
|
|
11589
11594
|
{
|
|
11590
11595
|
align: "start",
|
|
11591
|
-
className: "cnc-w-[--radix-popover-trigger-width] cnc-p-0",
|
|
11596
|
+
className: cn("cnc-w-[--radix-popover-trigger-width] cnc-p-0", popoverClassName),
|
|
11592
11597
|
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Command, { children: [
|
|
11593
11598
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11594
11599
|
CommandInput,
|
|
@@ -11609,6 +11614,7 @@ function Combobox({
|
|
|
11609
11614
|
setOpen(false);
|
|
11610
11615
|
},
|
|
11611
11616
|
keywords: [option.value, option.label],
|
|
11617
|
+
disabled: option.disabled,
|
|
11612
11618
|
children: [
|
|
11613
11619
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11614
11620
|
Check,
|