@cnc-ti/layout-basic 8.3.4 → 8.3.5

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.ts CHANGED
@@ -4,6 +4,7 @@ import * as React$1 from 'react';
4
4
  import React__default, { HTMLAttributes, ReactNode, PropsWithChildren, ReactElement, ComponentProps, SVGProps, ElementType } from 'react';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import * as DialogPrimitive from '@radix-ui/react-dialog';
7
+ import { DialogProps } from '@radix-ui/react-dialog';
7
8
  import * as Accordion from '@radix-ui/react-accordion';
8
9
  import * as PopoverPrimitive from '@radix-ui/react-popover';
9
10
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
@@ -11,7 +12,7 @@ import * as SelectPrimitive from '@radix-ui/react-select';
11
12
  import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
12
13
 
13
14
  declare const buttonVariants: (props?: ({
14
- variant?: "default" | "confirm" | "create" | "secondary" | "danger" | null | undefined;
15
+ variant?: "default" | "confirm" | "create" | "secondary" | "danger" | "outline" | null | undefined;
15
16
  size?: "default" | "sm" | "lg" | "icon" | null | undefined;
16
17
  outline?: boolean | null | undefined;
17
18
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
@@ -393,4 +394,134 @@ interface TitleProps {
393
394
  */
394
395
  declare function Title({ title, as: Component }: TitleProps): react_jsx_runtime.JSX.Element;
395
396
 
396
- export { AplicationsHeader, Badge, type BadgeSize, type BadgeVariant, Button, type ButtonProps, Card, CardContent, CardFooter, CardFooterItem, CardHeader, Collapsible, AnimatedCollapsibleContent as CollapsibleContent, CollapsibleTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Header, HeaderContainer, HeaderProfileHeader, HeaderProfileItem, type HeaderProps, Input, type InputProps, Modal, ModalEntidade, ModalMudancaEntidade, type ModalProps, PageHeader, PageHeaderActionsContainer, PageHeaderTitle, PageHeaderTitleContent, Popover, PopoverContent, PopoverTrigger, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectPortal, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectViewport, Sidebar, SidebarContainer, type SidebarContainerProps, SidebarImageBrand, type SidebarImageBrandProps, SidebarNavCollapse, type SidebarNavCollapseProps, SidebarNavLink, type SidebarNavLinkProps, type SidebarProps, Title, buttonVariants };
397
+ /**
398
+ * Representa uma opção que pode ser selecionada no combobox.
399
+ * @typedef {Object} ItemOption
400
+ * @property {*} value - O valor associado à opção.
401
+ * @property {string} label - O rótulo que será exibido para o usuário.
402
+ */
403
+ interface ItemOption {
404
+ value: any;
405
+ label: string;
406
+ }
407
+ /**
408
+ * Propriedades para o componente Combobox.
409
+ *
410
+ * @typedef {Object} ComboboxProps
411
+ * @property {ItemOption[]} [options] - Lista de opções disponíveis para seleção.
412
+ * @property {string} [placeholder] - Placeholder exibido quando nenhuma opção estiver selecionada.
413
+ * @property {{ placeholder?: string, emptyMessage?: string }} [command] - Configurações do campo de busca da lista de opções.
414
+ * @property {(value: string) => void} [onChange] - Função chamada quando uma opção for selecionada.
415
+ * @property {string} [value] - Valor atualmente selecionado.
416
+ */
417
+ interface ComboboxProps {
418
+ options?: ItemOption[];
419
+ placeholder?: string;
420
+ command?: {
421
+ placeholder?: string;
422
+ emptyMessage?: string;
423
+ };
424
+ onChange?: (value: string) => void;
425
+ value?: string;
426
+ }
427
+ /**
428
+ * Componente Combobox reutilizável com suporte a busca, exibição de placeholder e seleção de opções.
429
+ *
430
+ * @param {ComboboxProps} props - Propriedades do componente.
431
+ * @returns {JSX.Element} O componente renderizado.
432
+ *
433
+ * @example
434
+ * ```tsx
435
+ * <Combobox
436
+ * options={[
437
+ * { value: 'apple', label: 'Apple' },
438
+ * { value: 'banana', label: 'Banana' },
439
+ * ]}
440
+ * placeholder="Selecione uma fruta"
441
+ * command={{ placeholder: 'Buscar...', emptyMessage: 'Nenhum resultado' }}
442
+ * value={selected}
443
+ * onChange={(newValue) => setSelected(newValue)}
444
+ * />
445
+ * ```
446
+ */
447
+ declare function Combobox({ options, placeholder, command, onChange, value, }: ComboboxProps): react_jsx_runtime.JSX.Element;
448
+
449
+ declare const Command: React$1.ForwardRefExoticComponent<Omit<{
450
+ children?: React$1.ReactNode;
451
+ } & Pick<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
452
+ ref?: React$1.Ref<HTMLDivElement>;
453
+ } & {
454
+ asChild?: boolean;
455
+ }, "asChild" | "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
456
+ label?: string;
457
+ shouldFilter?: boolean;
458
+ filter?: (value: string, search: string, keywords?: string[]) => number;
459
+ defaultValue?: string;
460
+ value?: string;
461
+ onValueChange?: (value: string) => void;
462
+ loop?: boolean;
463
+ disablePointerSelection?: boolean;
464
+ vimBindings?: boolean;
465
+ } & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
466
+ declare const CommandDialog: ({ children, ...props }: DialogProps) => react_jsx_runtime.JSX.Element;
467
+ declare const CommandInput: React$1.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React$1.InputHTMLAttributes<HTMLInputElement>> & {
468
+ ref?: React$1.Ref<HTMLInputElement>;
469
+ } & {
470
+ asChild?: boolean;
471
+ }, "asChild" | "key" | keyof React$1.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
472
+ value?: string;
473
+ onValueChange?: (search: string) => void;
474
+ } & React$1.RefAttributes<HTMLInputElement>, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
475
+ declare const CommandList: React$1.ForwardRefExoticComponent<Omit<{
476
+ children?: React$1.ReactNode;
477
+ } & Pick<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
478
+ ref?: React$1.Ref<HTMLDivElement>;
479
+ } & {
480
+ asChild?: boolean;
481
+ }, "asChild" | "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
482
+ label?: string;
483
+ } & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
484
+ declare const CommandEmpty: React$1.ForwardRefExoticComponent<Omit<{
485
+ children?: React$1.ReactNode;
486
+ } & Pick<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
487
+ ref?: React$1.Ref<HTMLDivElement>;
488
+ } & {
489
+ asChild?: boolean;
490
+ }, "asChild" | "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
491
+ declare const CommandGroup: React$1.ForwardRefExoticComponent<Omit<{
492
+ children?: React$1.ReactNode;
493
+ } & Omit<Pick<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
494
+ ref?: React$1.Ref<HTMLDivElement>;
495
+ } & {
496
+ asChild?: boolean;
497
+ }, "asChild" | "key" | keyof React$1.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
498
+ heading?: React$1.ReactNode;
499
+ value?: string;
500
+ forceMount?: boolean;
501
+ } & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
502
+ declare const CommandSeparator: React$1.ForwardRefExoticComponent<Omit<Pick<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
503
+ ref?: React$1.Ref<HTMLDivElement>;
504
+ } & {
505
+ asChild?: boolean;
506
+ }, "asChild" | "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
507
+ alwaysRender?: boolean;
508
+ } & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
509
+ declare const CommandItem: React$1.ForwardRefExoticComponent<Omit<{
510
+ children?: React$1.ReactNode;
511
+ } & Omit<Pick<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
512
+ ref?: React$1.Ref<HTMLDivElement>;
513
+ } & {
514
+ asChild?: boolean;
515
+ }, "asChild" | "key" | keyof React$1.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
516
+ disabled?: boolean;
517
+ onSelect?: (value: string) => void;
518
+ value?: string;
519
+ keywords?: string[];
520
+ forceMount?: boolean;
521
+ } & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
522
+ declare const CommandShortcut: {
523
+ ({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
524
+ displayName: string;
525
+ };
526
+
527
+ export { AplicationsHeader, Badge, type BadgeSize, type BadgeVariant, Button, type ButtonProps, Card, CardContent, CardFooter, CardFooterItem, CardHeader, Collapsible, AnimatedCollapsibleContent as CollapsibleContent, CollapsibleTrigger, Combobox, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Header, HeaderContainer, HeaderProfileHeader, HeaderProfileItem, type HeaderProps, Input, type InputProps, type ItemOption, Modal, ModalEntidade, ModalMudancaEntidade, type ModalProps, PageHeader, PageHeaderActionsContainer, PageHeaderTitle, PageHeaderTitleContent, Popover, PopoverContent, PopoverTrigger, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectPortal, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectViewport, Sidebar, SidebarContainer, type SidebarContainerProps, SidebarImageBrand, type SidebarImageBrandProps, SidebarNavCollapse, type SidebarNavCollapseProps, SidebarNavLink, type SidebarNavLinkProps, type SidebarProps, Title, buttonVariants };