@1doc/1ds-vue 2.13.0 → 2.15.0

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
@@ -456,11 +456,16 @@ export interface AttachmentCardProps {
456
456
  export interface AvatarProps {
457
457
  /**
458
458
  * URL da imagem. Se fornecida, o tipo será automaticamente 'Photo' visualmente.
459
- * O componente NÃO faz fallback automático quando a imagem falha ao
460
- * carregar: ele emite `onError` e o consumidor decide (ex.: limpar o
461
- * `src` para exibir as iniciais via `children`).
459
+ * Se a imagem falhar ao carregar, o avatar volta sozinho para as iniciais
460
+ * (`name` ou `children`) e emite `onError`. Um `src` novo tenta de novo.
462
461
  */
463
462
  src?: string;
463
+ /**
464
+ * Nome da pessoa: gera as iniciais (primeira letra do primeiro e do último
465
+ * nome, "Cris Lima" → "CL") e vira o nome acessível quando não há
466
+ * `ariaLabel`. Com `name`, as iniciais vêm dele, no lugar de `children`.
467
+ */
468
+ name?: string;
464
469
  /**
465
470
  * Texto alternativo para a imagem (acessibilidade).
466
471
  */
@@ -889,6 +894,12 @@ export interface ButtonProps {
889
894
  form?: string;
890
895
  autoFocus?: boolean;
891
896
  tabIndex?: number;
897
+ /** Botão que navega: vira `<a>` com a mesma aparência. Desabilitado, volta a ser `<button>`. */
898
+ href?: string;
899
+ /** Destino do link. `_blank` ganha `rel="noopener noreferrer"`. */
900
+ target?: string;
901
+ /** Relação do link. Sobrescreve o padrão do `target`. */
902
+ rel?: string;
892
903
  }
893
904
 
894
905
  export interface CalendarEvent {
@@ -1403,6 +1414,27 @@ export interface ContainerProps {
1403
1414
  children?: any;
1404
1415
  }
1405
1416
 
1417
+ export interface CounterProps {
1418
+ /** Valor final. Aceita número ou texto numérico ("1284", "22.31"). */
1419
+ value: number | string;
1420
+ /** De onde a contagem começa ao montar. @default 0 */
1421
+ from?: number;
1422
+ /** Duração da contagem, em milissegundos. @default 1000 */
1423
+ duration?: number;
1424
+ /** Casas decimais. Sem a prop, as do `value`. */
1425
+ decimals?: number;
1426
+ /** Idioma do formato do número. @default 'pt-BR' */
1427
+ locale?: string;
1428
+ /** Texto antes do número ("R$ "). */
1429
+ prefix?: string;
1430
+ /** Texto depois do número ("%", " páginas"). */
1431
+ suffix?: string;
1432
+ /** Mostra o valor final direto, sem contar. @default false */
1433
+ disableAnimation?: boolean;
1434
+ /** Classes CSS adicionais. */
1435
+ className?: string;
1436
+ }
1437
+
1406
1438
  export interface DataTableColumn {
1407
1439
  key: string;
1408
1440
  label: string;
@@ -1642,12 +1674,22 @@ export interface DrawerProps {
1642
1674
  }
1643
1675
 
1644
1676
  export interface DropdownItem {
1677
+ /** Ação deste item, chamada ao escolhê-lo (antes do `onSelect` do Dropdown). */
1678
+ onSelect?: (item: DropdownItem) => void;
1679
+ /** Campos próprios do produto (`command`, `payload`...) voltam intactos no `onSelect`. */
1680
+ [campo: string]: any;
1645
1681
  key: string;
1646
1682
  label: string;
1647
1683
  icon?: IconProp;
1648
1684
  disabled?: boolean;
1649
1685
  danger?: boolean;
1650
1686
  dividerAfter?: boolean;
1687
+ /** Item que navega: vira `<a>` (Ctrl+clique e nova aba funcionam). Desabilitado, volta a ser botão. */
1688
+ href?: string;
1689
+ /** Destino do link. `_blank` ganha `rel="noopener noreferrer"`. */
1690
+ target?: string;
1691
+ /** Relação do link. Sobrescreve o padrão do `target`. */
1692
+ rel?: string;
1651
1693
  }
1652
1694
 
1653
1695
  export interface DropdownProps {
@@ -1678,6 +1720,8 @@ export interface EmptyStateProps {
1678
1720
  actionLabel?: string;
1679
1721
  onAction?: () => void;
1680
1722
  size?: "sm" | "md" | "lg";
1723
+ /** Ocupa e centraliza no espaço disponível (coluna que rola, painel). @default false */
1724
+ fill?: boolean;
1681
1725
  className?: string;
1682
1726
  }
1683
1727
 
@@ -2057,6 +2101,8 @@ export interface ListProps {
2057
2101
  emptyIcon?: IconProp;
2058
2102
  /** Tamanho do estado vazio. @default 'sm' */
2059
2103
  emptySize?: "sm" | "md" | "lg";
2104
+ /** O estado vazio ocupa e centraliza no espaço disponível. @default false */
2105
+ emptyFill?: boolean;
2060
2106
  /** Rótulo do botão do estado vazio (exibido junto de `onEmptyAction`). */
2061
2107
  emptyActionLabel?: string;
2062
2108
  /** Chamado no botão do estado vazio. */
@@ -2089,6 +2135,12 @@ export interface ListItemProps {
2089
2135
  target?: string;
2090
2136
  /** Relação do link. Sobrescreve o padrão do `target`. */
2091
2137
  rel?: string;
2138
+ /** Superfície: `primary` é o item em destaque, azul-claro com hover próprio. Não é seleção. @default 'default' */
2139
+ variant?: "default" | "primary";
2140
+ /** Classes CSS do `li` (a linha visual), para animação de entrada. Sem efeito com `standalone`. */
2141
+ liClassName?: string;
2142
+ /** Estilo inline do `li` (variável CSS, transitionDelay). Sem efeito com `standalone`. */
2143
+ liStyle?: any;
2092
2144
  /** Item atual: fundo de seleção e `aria-current`. @default false */
2093
2145
  selected?: boolean;
2094
2146
  /** Bloqueia clique e foco. @default false */
@@ -2107,6 +2159,8 @@ export interface ListItemProps {
2107
2159
  start?: any;
2108
2160
  /** Conteúdo no fim da linha (badge, seta, valor). No Vue, slot `end`. */
2109
2161
  end?: any;
2162
+ /** Controles da linha (menu ⋮, botão), fora do elemento clicável. Só com o `li`. No Vue, slot `actions`. */
2163
+ actions?: any;
2110
2164
  /** Chamado no clique da linha (ou em Enter/Espaço no `as="div"`). */
2111
2165
  onClick?: (event: any) => void;
2112
2166
  /** Classes CSS adicionais, no elemento interativo. */
@@ -2991,8 +3045,8 @@ export type StackTag =
2991
3045
  export type StackOverflow = "visible" | "hidden" | "auto" | "scroll";
2992
3046
 
2993
3047
  export interface StatCardProps {
2994
- /** O número ou medida em destaque. */
2995
- value?: string | number;
3048
+ /** O número ou medida em destaque. Texto, número ou nó (um `Counter`); no Vue, slot `value`. */
3049
+ value?: any;
2996
3050
  /** O que o número significa. */
2997
3051
  label?: string;
2998
3052
  /** Ícone Font Awesome como objeto importado. */
@@ -3025,7 +3079,7 @@ export interface StatCardProps {
3025
3079
  * @default 'bottom'
3026
3080
  */
3027
3081
  labelPosition?: "bottom" | "top";
3028
- /** Segunda medida, menor, à direita da principal. 0 aparece; vazio e ausente não. */
3082
+ /** Segunda medida, no tamanho da principal, à direita dela. 0 aparece; vazio e ausente não. */
3029
3083
  secondaryValue?: string | number;
3030
3084
  /** O que a segunda medida significa. */
3031
3085
  secondaryLabel?: string;
@@ -3033,6 +3087,10 @@ export interface StatCardProps {
3033
3087
  size?: "md" | "sm";
3034
3088
  /** Cor do número principal. @default 'default' */
3035
3089
  valueTone?: "default" | "primary" | "positive" | "negative" | "info";
3090
+ /** Cor da segunda medida. Mesmas opções de `valueTone`. @default 'default' */
3091
+ secondaryTone?: "default" | "primary" | "positive" | "negative" | "info";
3092
+ /** Carregando: números viram Skeleton, a variação some, `aria-busy` no cartão. @default false */
3093
+ loading?: boolean;
3036
3094
  /**
3037
3095
  * Texto de ajuda: mostra o ⓘ ao lado do rótulo, com um Tooltip escuro. É um
3038
3096
  * botão focável dentro do cartão; com `onClick` no cartão, evite.
@@ -3353,6 +3411,12 @@ export interface TextProps {
3353
3411
  /**
3354
3412
  * Cor do texto usando tokens semânticos.
3355
3413
  *
3414
+ * SEM `color`, o texto HERDA a cor do pai (é o que deixa um Text dentro de um
3415
+ * botão, alerta ou cartão colorido acompanhar a cor dele). Dentro do
3416
+ * `AppShell` o pai já tem a cor de texto do tema. Fora dele, num título solto
3417
+ * na página, passe `color="primary"` (`neutral-dark-pure`, o texto principal,
3418
+ * não o azul) para o tema escuro funcionar.
3419
+ *
3356
3420
  * `disabled` (`neutral-dark-up`, #A3A3A3, 2,5:1 sobre branco) é SÓ para
3357
3421
  * texto de controle desabilitado (rótulo, valor ou ajuda de um campo ou
3358
3422
  * botão inativo), que o WCAG 1.4.3 isenta de contraste. Em qualquer outro
@@ -3790,6 +3854,7 @@ export declare const Combobox: ComponentWithProps<ComboboxProps>;
3790
3854
  export declare const ConfirmAIAction: ComponentWithProps<ConfirmAIActionProps>;
3791
3855
  export declare const ConfirmDialog: ComponentWithProps<ConfirmDialogProps>;
3792
3856
  export declare const Container: ComponentWithProps<ContainerProps>;
3857
+ export declare const Counter: ComponentWithProps<CounterProps>;
3793
3858
  export declare const DataTable: ComponentWithProps<DataTableProps>;
3794
3859
  export declare const DatePicker: ComponentWithProps<DatePickerProps>;
3795
3860
  export declare const DescriptionList: ComponentWithProps<DescriptionListProps>;
@@ -3849,101 +3914,3 @@ export declare const Toast: ComponentWithProps<ToastProps>;
3849
3914
  export declare const ToastStack: ComponentWithProps<ToastStackProps>;
3850
3915
  export declare const Tooltip: ComponentWithProps<TooltipProps>;
3851
3916
  export declare const Tree: ComponentWithProps<TreeProps>;
3852
-
3853
- // Global component registration for Volar
3854
- declare module '@vue/runtime-core' {
3855
- export interface GlobalComponents {
3856
- AIContent: ComponentWithProps<AIContentProps>;
3857
- AILabel: ComponentWithProps<AILabelProps>;
3858
- Accordion: ComponentWithProps<AccordionProps>;
3859
- Alert: ComponentWithProps<AlertProps>;
3860
- AppHeader: ComponentWithProps<AppHeaderProps>;
3861
- AppHeaderAction: ComponentWithProps<AppHeaderActionProps>;
3862
- AppNavItem: ComponentWithProps<AppNavItemProps>;
3863
- AppShell: ComponentWithProps<AppShellProps>;
3864
- AppSidebar: ComponentWithProps<AppSidebarProps>;
3865
- AppSubheader: ComponentWithProps<AppSubheaderProps>;
3866
- AttachmentCard: ComponentWithProps<AttachmentCardProps>;
3867
- Avatar: ComponentWithProps<AvatarProps>;
3868
- AvatarGroup: ComponentWithProps<AvatarGroupProps>;
3869
- Badge: ComponentWithProps<BadgeProps>;
3870
- BottomNavigation: ComponentWithProps<BottomNavigationProps>;
3871
- BottomSheet: ComponentWithProps<BottomSheetProps>;
3872
- Box: ComponentWithProps<BoxProps>;
3873
- Breadcrumb: ComponentWithProps<BreadcrumbProps>;
3874
- Button: ComponentWithProps<ButtonProps>;
3875
- Calendar: ComponentWithProps<CalendarProps>;
3876
- Card: ComponentWithProps<CardProps>;
3877
- BarChart: ComponentWithProps<BarChartProps>;
3878
- DonutChart: ComponentWithProps<DonutChartProps>;
3879
- LineChart: ComponentWithProps<LineChartProps>;
3880
- Checkbox: ComponentWithProps<CheckboxProps>;
3881
- Chips: ComponentWithProps<ChipsProps>;
3882
- Coachmark: ComponentWithProps<CoachmarkProps>;
3883
- CodeBlock: ComponentWithProps<CodeBlockProps>;
3884
- ColorPicker: ComponentWithProps<ColorPickerProps>;
3885
- Combobox: ComponentWithProps<ComboboxProps>;
3886
- ConfirmAIAction: ComponentWithProps<ConfirmAIActionProps>;
3887
- ConfirmDialog: ComponentWithProps<ConfirmDialogProps>;
3888
- Container: ComponentWithProps<ContainerProps>;
3889
- DataTable: ComponentWithProps<DataTableProps>;
3890
- DatePicker: ComponentWithProps<DatePickerProps>;
3891
- DescriptionList: ComponentWithProps<DescriptionListProps>;
3892
- Divider: ComponentWithProps<DividerProps>;
3893
- Drawer: ComponentWithProps<DrawerProps>;
3894
- Dropdown: ComponentWithProps<DropdownProps>;
3895
- EmptyState: ComponentWithProps<EmptyStateProps>;
3896
- FileInput: ComponentWithProps<FileInputProps>;
3897
- Grid: ComponentWithProps<GridProps>;
3898
- Icon: ComponentWithProps<IconProps>;
3899
- IconPicker: ComponentWithProps<IconPickerProps>;
3900
- Input: ComponentWithProps<InputProps>;
3901
- Kanban: ComponentWithProps<KanbanProps>;
3902
- KanbanCard: ComponentWithProps<KanbanCardProps>;
3903
- KanbanColumn: ComponentWithProps<KanbanColumnProps>;
3904
- Kbd: ComponentWithProps<KbdProps>;
3905
- Link: ComponentWithProps<LinkProps>;
3906
- List: ComponentWithProps<ListProps>;
3907
- ListItem: ComponentWithProps<ListItemProps>;
3908
- Logo: ComponentWithProps<LogoProps>;
3909
- Modal: ComponentWithProps<ModalProps>;
3910
- MultiSelect: ComponentWithProps<MultiSelectProps>;
3911
- OrgChart: ComponentWithProps<OrgChartProps>;
3912
- OtpInput: ComponentWithProps<OtpInputProps>;
3913
- PageHeader: ComponentWithProps<PageHeaderProps>;
3914
- Pagination: ComponentWithProps<PaginationProps>;
3915
- PhoneInput: ComponentWithProps<PhoneInputProps>;
3916
- Podium: ComponentWithProps<PodiumProps>;
3917
- Popover: ComponentWithProps<PopoverProps>;
3918
- Portal: ComponentWithProps<PortalProps>;
3919
- ProgressBar: ComponentWithProps<ProgressBarProps>;
3920
- Radio: ComponentWithProps<RadioProps>;
3921
- RadioGroup: ComponentWithProps<RadioGroupProps>;
3922
- RichTextEditor: ComponentWithProps<RichTextEditorProps>;
3923
- SegmentedControl: ComponentWithProps<SegmentedControlProps>;
3924
- Select: ComponentWithProps<SelectProps>;
3925
- SidePanel: ComponentWithProps<SidePanelProps>;
3926
- SidePanelItem: ComponentWithProps<SidePanelItemProps>;
3927
- SidePanelSearch: ComponentWithProps<SidePanelSearchProps>;
3928
- SidePanelSection: ComponentWithProps<SidePanelSectionProps>;
3929
- Skeleton: ComponentWithProps<SkeletonProps>;
3930
- Spinner: ComponentWithProps<SpinnerProps>;
3931
- Stack: ComponentWithProps<StackProps>;
3932
- StatCard: ComponentWithProps<StatCardProps>;
3933
- Stepper: ComponentWithProps<StepperProps>;
3934
- Switch: ComponentWithProps<SwitchProps>;
3935
- Tabs: ComponentWithProps<TabsProps>;
3936
- Tab: ComponentWithProps<TabProps>;
3937
- TabContent: ComponentWithProps<TabContentProps>;
3938
- TabsContent: ComponentWithProps<TabsContentProps>;
3939
- Tag: ComponentWithProps<TagProps>;
3940
- Text: ComponentWithProps<TextProps>;
3941
- Textarea: ComponentWithProps<TextareaProps>;
3942
- TimePicker: ComponentWithProps<TimePickerProps>;
3943
- Timeline: ComponentWithProps<TimelineProps>;
3944
- Toast: ComponentWithProps<ToastProps>;
3945
- ToastStack: ComponentWithProps<ToastStackProps>;
3946
- Tooltip: ComponentWithProps<TooltipProps>;
3947
- Tree: ComponentWithProps<TreeProps>;
3948
- }
3949
- }