@cnc-ti/layout-basic 8.3.27 → 8.3.29
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 +16 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -7
- 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
|
@@ -10759,15 +10759,18 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
|
10759
10759
|
var React58 = __toESM(require("react"));
|
|
10760
10760
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
10761
10761
|
var Input = React58.forwardRef(
|
|
10762
|
-
({ className, type, id, label, ...props }, ref) => {
|
|
10762
|
+
({ className, type, id, label, required, ...props }, ref) => {
|
|
10763
10763
|
const idGenerate = id ? id : label && `field-${Date.now()}-${Math.random() * 1e5}`;
|
|
10764
10764
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "cnc-w-full", children: [
|
|
10765
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime32.
|
|
10765
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
10766
10766
|
"label",
|
|
10767
10767
|
{
|
|
10768
10768
|
htmlFor: idGenerate,
|
|
10769
10769
|
className: "cnc-block cnc-text-sm cnc-mb-1 cnc-font-medium cnc-text-brand-gray-600",
|
|
10770
|
-
children:
|
|
10770
|
+
children: [
|
|
10771
|
+
label,
|
|
10772
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-red-500", children: " *" })
|
|
10773
|
+
]
|
|
10771
10774
|
}
|
|
10772
10775
|
),
|
|
10773
10776
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
@@ -11567,17 +11570,22 @@ function Combobox({
|
|
|
11567
11570
|
command,
|
|
11568
11571
|
onChange,
|
|
11569
11572
|
value = "",
|
|
11570
|
-
onInput
|
|
11573
|
+
onInput,
|
|
11574
|
+
modal = false,
|
|
11575
|
+
popoverClassName,
|
|
11576
|
+
buttonClassName,
|
|
11577
|
+
disabled = false
|
|
11571
11578
|
}) {
|
|
11572
11579
|
const [open, setOpen] = React64.useState(false);
|
|
11573
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Popover3, { open, onOpenChange: setOpen, children: [
|
|
11580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Popover3, { open, onOpenChange: setOpen, modal, children: [
|
|
11574
11581
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(PopoverTrigger3, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
11575
11582
|
Button,
|
|
11576
11583
|
{
|
|
11577
11584
|
variant: "outline",
|
|
11578
11585
|
role: "combobox",
|
|
11579
11586
|
"aria-expanded": open,
|
|
11580
|
-
className: "cnc-w-full cnc-justify-between cnc-truncate ",
|
|
11587
|
+
className: cn("cnc-w-full cnc-justify-between cnc-truncate ", buttonClassName),
|
|
11588
|
+
disabled,
|
|
11581
11589
|
children: [
|
|
11582
11590
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { children: value ? options?.find((framework) => framework.value === value)?.label : placeholder }),
|
|
11583
11591
|
/* @__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 +11596,7 @@ function Combobox({
|
|
|
11588
11596
|
PopoverContent3,
|
|
11589
11597
|
{
|
|
11590
11598
|
align: "start",
|
|
11591
|
-
className: "cnc-w-[--radix-popover-trigger-width] cnc-p-0",
|
|
11599
|
+
className: cn("cnc-w-[--radix-popover-trigger-width] cnc-p-0", popoverClassName),
|
|
11592
11600
|
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Command, { children: [
|
|
11593
11601
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11594
11602
|
CommandInput,
|
|
@@ -11609,6 +11617,7 @@ function Combobox({
|
|
|
11609
11617
|
setOpen(false);
|
|
11610
11618
|
},
|
|
11611
11619
|
keywords: [option.value, option.label],
|
|
11620
|
+
disabled: option.disabled,
|
|
11612
11621
|
children: [
|
|
11613
11622
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11614
11623
|
Check,
|