@tooark/react 1.3.0 → 1.5.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.
Files changed (46) hide show
  1. package/README.md +24 -4
  2. package/README.pt-BR.md +24 -4
  3. package/dist/ark-alert.d.ts +4 -3
  4. package/dist/ark-avatar.d.ts +4 -3
  5. package/dist/ark-badge.d.ts +4 -3
  6. package/dist/ark-button.d.ts +5 -4
  7. package/dist/ark-calendar.d.ts +4 -3
  8. package/dist/ark-card.d.ts +4 -3
  9. package/dist/ark-carousel.d.ts +4 -3
  10. package/dist/ark-checkbox.d.ts +8 -3
  11. package/dist/ark-clock.d.ts +8 -3
  12. package/dist/ark-clock.js +3 -2
  13. package/dist/ark-color-swatches.d.ts +4 -3
  14. package/dist/ark-command-palette.d.ts +15 -6
  15. package/dist/ark-command-palette.js +2 -1
  16. package/dist/ark-copy-button.d.ts +4 -3
  17. package/dist/ark-datepicker.d.ts +4 -3
  18. package/dist/ark-dialog.d.ts +4 -3
  19. package/dist/ark-drawer.d.ts +4 -3
  20. package/dist/ark-empty.d.ts +4 -3
  21. package/dist/ark-file-input.d.ts +12 -5
  22. package/dist/ark-file-input.js +2 -1
  23. package/dist/ark-input.d.ts +4 -3
  24. package/dist/ark-kbd.d.ts +4 -3
  25. package/dist/ark-kv-editor.d.ts +4 -3
  26. package/dist/ark-mark.d.ts +4 -3
  27. package/dist/ark-menu.d.ts +7 -6
  28. package/dist/ark-progress.d.ts +4 -3
  29. package/dist/ark-radio.d.ts +8 -3
  30. package/dist/ark-scheduler.d.ts +4 -3
  31. package/dist/ark-select.d.ts +4 -3
  32. package/dist/ark-shape-picker.d.ts +4 -3
  33. package/dist/ark-skeleton.d.ts +4 -3
  34. package/dist/ark-spinner.d.ts +4 -3
  35. package/dist/ark-split-pane.d.ts +4 -3
  36. package/dist/ark-status-dot.d.ts +4 -3
  37. package/dist/ark-switch.d.ts +4 -3
  38. package/dist/ark-tabs.d.ts +7 -6
  39. package/dist/ark-textarea.d.ts +4 -3
  40. package/dist/ark-toaster.d.ts +4 -3
  41. package/dist/ark-toggle.d.ts +7 -6
  42. package/dist/ark-tooltip.d.ts +4 -3
  43. package/dist/dom-props.d.ts +8 -0
  44. package/dist/dom-props.js +1 -0
  45. package/dist/jsx-intrinsics.d.ts +8 -0
  46. package/package.json +4 -4
@@ -1,11 +1,14 @@
1
1
  import type { ArkFileInputStyleOptions } from "@tooark/core";
2
2
  import type { ArkFileInput as ArkFileInputElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
- export type ArkFileInputProps = ArkFileInputStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkFileInputProps = ArkDomProps<ArkFileInputStyleOptions & {
5
6
  /** Tipos aceitos pelo seletor nativo (accept). */
6
7
  accept?: string;
7
8
  /** Aceita varios arquivos; sem ele o drop fica com o primeiro. */
8
9
  multiple?: boolean;
10
+ /** Escolhe uma pasta inteira: o seletor abre em modo pasta e a zona le as pastas soltas. Padrao: desligado. */
11
+ directory?: boolean;
9
12
  /** Rotulo do campo (label for o input oculto; nomeia o botao junto do texto dele). */
10
13
  label?: string;
11
14
  helper?: string;
@@ -18,16 +21,19 @@ export type ArkFileInputProps = ArkFileInputStyleOptions & {
18
21
  /** Nome no formulario (input nativo oculto). */
19
22
  name?: string;
20
23
  className?: string;
21
- /** Arquivos escolhidos ou soltos: detail.files e um array de File. */
24
+ /** Arquivos escolhidos ou soltos em detail.files (array de File); com `directory`, detail.paths traz os caminhos. */
22
25
  onChange?: (event: CustomEvent<{
23
26
  files: File[];
27
+ paths?: string[];
24
28
  }>) => void;
25
- };
29
+ }>;
26
30
  export declare const ArkFileInput: React.ForwardRefExoticComponent<ArkFileInputStyleOptions & {
27
31
  /** Tipos aceitos pelo seletor nativo (accept). */
28
32
  accept?: string;
29
33
  /** Aceita varios arquivos; sem ele o drop fica com o primeiro. */
30
34
  multiple?: boolean;
35
+ /** Escolhe uma pasta inteira: o seletor abre em modo pasta e a zona le as pastas soltas. Padrao: desligado. */
36
+ directory?: boolean;
31
37
  /** Rotulo do campo (label for o input oculto; nomeia o botao junto do texto dele). */
32
38
  label?: string;
33
39
  helper?: string;
@@ -40,8 +46,9 @@ export declare const ArkFileInput: React.ForwardRefExoticComponent<ArkFileInputS
40
46
  /** Nome no formulario (input nativo oculto). */
41
47
  name?: string;
42
48
  className?: string;
43
- /** Arquivos escolhidos ou soltos: detail.files e um array de File. */
49
+ /** Arquivos escolhidos ou soltos em detail.files (array de File); com `directory`, detail.paths traz os caminhos. */
44
50
  onChange?: (event: CustomEvent<{
45
51
  files: File[];
52
+ paths?: string[];
46
53
  }>) => void;
47
- } & React.RefAttributes<ArkFileInputElement>>;
54
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "onChange" | "error" | "directory" | "label" | "name" | "disabled" | "helper" | keyof ArkFileInputStyleOptions | "accept" | "multiple" | "errorMessage" | "required"> & React.RefAttributes<ArkFileInputElement>>;
@@ -2,7 +2,7 @@ import { createElement, forwardRef, useEffect } from "react";
2
2
  import { ensureTooarkComponentsRegistered } from "./register.js";
3
3
  import { useForwardedRef } from "./use-forwarded-ref.js";
4
4
  export const ArkFileInput = forwardRef(function ArkFileInput(props, forwardedRef) {
5
- const { className, multiple, errorMessage, error, disabled, required, localeJson, onChange, ...rest } = props;
5
+ const { className, multiple, directory, errorMessage, error, disabled, required, localeJson, onChange, ...rest } = props;
6
6
  const [ref, setRef] = useForwardedRef(forwardedRef);
7
7
  useEffect(() => {
8
8
  ensureTooarkComponentsRegistered();
@@ -20,6 +20,7 @@ export const ArkFileInput = forwardRef(function ArkFileInput(props, forwardedRef
20
20
  ref: setRef,
21
21
  class: className,
22
22
  multiple: multiple ? "" : undefined,
23
+ directory: directory ? "" : undefined,
23
24
  "error-message": errorMessage,
24
25
  error: error ? "" : undefined,
25
26
  disabled: disabled ? "" : undefined,
@@ -1,7 +1,8 @@
1
1
  import type { ArkInputStyleOptions, ArkLang } from "@tooark/core";
2
2
  import type { ArkInput as ArkInputElement } from "@tooark/web-components";
3
3
  import React, { type PropsWithChildren } from "react";
4
- export type ArkInputProps = PropsWithChildren<ArkInputStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkInputProps = PropsWithChildren<ArkDomProps<ArkInputStyleOptions & {
5
6
  type?: string;
6
7
  label?: string;
7
8
  placeholder?: string;
@@ -31,7 +32,7 @@ export type ArkInputProps = PropsWithChildren<ArkInputStyleOptions & {
31
32
  className?: string;
32
33
  onInput?: (event: Event) => void;
33
34
  onChange?: (event: Event) => void;
34
- }>;
35
+ }>>;
35
36
  export declare const ArkInput: React.ForwardRefExoticComponent<ArkInputStyleOptions & {
36
37
  type?: string;
37
38
  label?: string;
@@ -62,6 +63,6 @@ export declare const ArkInput: React.ForwardRefExoticComponent<ArkInputStyleOpti
62
63
  className?: string;
63
64
  onInput?: (event: Event) => void;
64
65
  onChange?: (event: Event) => void;
65
- } & {
66
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "lang" | "aria-label" | "onChange" | "onInput" | "localeJson" | "error" | "step" | "label" | "pattern" | "name" | "type" | "disabled" | "value" | "min" | "max" | "helper" | "placeholder" | "errorMessage" | "required" | keyof ArkInputStyleOptions | "readonly" | "reveal" | "autocomplete" | "autofocus" | "inputmode" | "maxlength" | "minlength" | "spellcheck"> & {
66
67
  children?: React.ReactNode | undefined;
67
68
  } & React.RefAttributes<ArkInputElement>>;
package/dist/ark-kbd.d.ts CHANGED
@@ -2,11 +2,12 @@ import type { ArkKbdStyleOptions } from "@tooark/core";
2
2
  import type { ArkKbd as ArkKbdElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
4
  import { type PropsWithChildren } from "react";
5
- export type ArkKbdProps = PropsWithChildren<ArkKbdStyleOptions & {
5
+ import type { ArkDomProps } from "./dom-props.js";
6
+ export type ArkKbdProps = PropsWithChildren<ArkDomProps<ArkKbdStyleOptions & {
6
7
  className?: string;
7
- }>;
8
+ }>>;
8
9
  export declare const ArkKbd: React.ForwardRefExoticComponent<ArkKbdStyleOptions & {
9
10
  className?: string;
10
- } & {
11
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | keyof ArkKbdStyleOptions> & {
11
12
  children?: React.ReactNode | undefined;
12
13
  } & React.RefAttributes<ArkKbdElement>>;
@@ -1,7 +1,8 @@
1
1
  import type { ArkKvEditorStyleOptions, ArkKvRow, ArkKvValueField } from "@tooark/core";
2
2
  import type { ArkKvEditor as ArkKvEditorElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
- export type ArkKvEditorProps = ArkKvEditorStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkKvEditorProps = ArkDomProps<ArkKvEditorStyleOptions & {
5
6
  /** Linhas { id, key, value, enabled }; atribuir substitui tudo e renderiza de novo. */
6
7
  rows?: ArkKvRow[];
7
8
  /** Modo de edicao em massa (textarea). */
@@ -32,7 +33,7 @@ export type ArkKvEditorProps = ArkKvEditorStyleOptions & {
32
33
  onDelete?: (event: CustomEvent<{
33
34
  id: string;
34
35
  }>) => void;
35
- };
36
+ }>;
36
37
  export declare const ArkKvEditor: React.ForwardRefExoticComponent<ArkKvEditorStyleOptions & {
37
38
  /** Linhas { id, key, value, enabled }; atribuir substitui tudo e renderiza de novo. */
38
39
  rows?: ArkKvRow[];
@@ -64,4 +65,4 @@ export declare const ArkKvEditor: React.ForwardRefExoticComponent<ArkKvEditorSty
64
65
  onDelete?: (event: CustomEvent<{
65
66
  id: string;
66
67
  }>) => void;
67
- } & React.RefAttributes<ArkKvEditorElement>>;
68
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "onChange" | "secret" | "description" | "readonly" | keyof ArkKvEditorStyleOptions | "rows" | "bulk" | "types" | "keyPlaceholder" | "valuePlaceholder" | "descriptionPlaceholder" | "valueField" | "onAdd" | "onDelete"> & React.RefAttributes<ArkKvEditorElement>>;
@@ -1,13 +1,14 @@
1
1
  import type { ArkMarkStyleOptions } from "@tooark/core";
2
2
  import type { ArkMark as ArkMarkElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
- export type ArkMarkProps = ArkMarkStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkMarkProps = ArkDomProps<ArkMarkStyleOptions & {
5
6
  /** Com rotulo a marca vira role="img" nomeado; sem ele e decorativa (aria-hidden). */
6
7
  label?: string;
7
8
  className?: string;
8
- };
9
+ }>;
9
10
  export declare const ArkMark: React.ForwardRefExoticComponent<ArkMarkStyleOptions & {
10
11
  /** Com rotulo a marca vira role="img" nomeado; sem ele e decorativa (aria-hidden). */
11
12
  label?: string;
12
13
  className?: string;
13
- } & React.RefAttributes<ArkMarkElement>>;
14
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "label" | keyof ArkMarkStyleOptions> & React.RefAttributes<ArkMarkElement>>;
@@ -1,7 +1,8 @@
1
1
  import type { ArkMenuAlign, ArkMenuDirection, ArkMenuItemStyleOptions, ArkMenuStyleOptions } from "@tooark/core";
2
2
  import type { ArkMenu as ArkMenuElement, ArkMenuItem as ArkMenuItemElement } from "@tooark/web-components";
3
3
  import React, { type PropsWithChildren } from "react";
4
- export type ArkMenuProps = PropsWithChildren<ArkMenuStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkMenuProps = PropsWithChildren<ArkDomProps<ArkMenuStyleOptions & {
5
6
  /** id do gatilho (vira o atributo for): o menu escreve aria-* nele e escuta clique e setas. */
6
7
  htmlFor?: string;
7
8
  /** Aberto; refletido do estado do popover. */
@@ -18,7 +19,7 @@ export type ArkMenuProps = PropsWithChildren<ArkMenuStyleOptions & {
18
19
  }>) => void;
19
20
  onOpen?: (event: CustomEvent) => void;
20
21
  onClose?: (event: CustomEvent) => void;
21
- }>;
22
+ }>>;
22
23
  export declare const ArkMenu: React.ForwardRefExoticComponent<ArkMenuStyleOptions & {
23
24
  /** id do gatilho (vira o atributo for): o menu escreve aria-* nele e escuta clique e setas. */
24
25
  htmlFor?: string;
@@ -36,10 +37,10 @@ export declare const ArkMenu: React.ForwardRefExoticComponent<ArkMenuStyleOption
36
37
  }>) => void;
37
38
  onOpen?: (event: CustomEvent) => void;
38
39
  onClose?: (event: CustomEvent) => void;
39
- } & {
40
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "aria-label" | "onSelect" | "open" | "onOpen" | "onClose" | "htmlFor" | keyof ArkMenuStyleOptions | "align" | "direction"> & {
40
41
  children?: React.ReactNode | undefined;
41
42
  } & React.RefAttributes<ArkMenuElement>>;
42
- export type ArkMenuItemProps = PropsWithChildren<ArkMenuItemStyleOptions & {
43
+ export type ArkMenuItemProps = PropsWithChildren<ArkDomProps<ArkMenuItemStyleOptions & {
43
44
  value?: string;
44
45
  disabled?: boolean;
45
46
  /** Item checkbox: true marcado, false desmarcado; omitido e um item comum. */
@@ -49,7 +50,7 @@ export type ArkMenuItemProps = PropsWithChildren<ArkMenuItemStyleOptions & {
49
50
  /** Conteudo nao interativo (nome e e-mail), sem role de item. */
50
51
  static?: boolean;
51
52
  className?: string;
52
- }>;
53
+ }>>;
53
54
  export declare const ArkMenuItem: React.ForwardRefExoticComponent<ArkMenuItemStyleOptions & {
54
55
  value?: string;
55
56
  disabled?: boolean;
@@ -60,6 +61,6 @@ export declare const ArkMenuItem: React.ForwardRefExoticComponent<ArkMenuItemSty
60
61
  /** Conteudo nao interativo (nome e e-mail), sem role de item. */
61
62
  static?: boolean;
62
63
  className?: string;
63
- } & {
64
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "disabled" | "value" | "checked" | keyof ArkMenuItemStyleOptions | "divider" | "static"> & {
64
65
  children?: React.ReactNode | undefined;
65
66
  } & React.RefAttributes<ArkMenuItemElement>>;
@@ -1,7 +1,8 @@
1
1
  import type { ArkProgressStyleOptions } from "@tooark/core";
2
2
  import type { ArkProgress as ArkProgressElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
- export type ArkProgressProps = ArkProgressStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkProgressProps = ArkDomProps<ArkProgressStyleOptions & {
5
6
  /** Valor atual, de 0 a max. Padrao: 0. */
6
7
  value?: number;
7
8
  /** Valor maximo. Padrao: 100. */
@@ -13,7 +14,7 @@ export type ArkProgressProps = ArkProgressStyleOptions & {
13
14
  /** Mostra a porcentagem ao lado do trilho. */
14
15
  showValue?: boolean;
15
16
  className?: string;
16
- };
17
+ }>;
17
18
  export declare const ArkProgress: React.ForwardRefExoticComponent<ArkProgressStyleOptions & {
18
19
  /** Valor atual, de 0 a max. Padrao: 0. */
19
20
  value?: number;
@@ -26,4 +27,4 @@ export declare const ArkProgress: React.ForwardRefExoticComponent<ArkProgressSty
26
27
  /** Mostra a porcentagem ao lado do trilho. */
27
28
  showValue?: boolean;
28
29
  className?: string;
29
- } & React.RefAttributes<ArkProgressElement>>;
30
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "label" | "value" | "max" | "indeterminate" | keyof ArkProgressStyleOptions | "showValue"> & React.RefAttributes<ArkProgressElement>>;
@@ -1,7 +1,8 @@
1
1
  import type { ArkRadioStyleOptions } from "@tooark/core";
2
2
  import type { ArkRadio as ArkRadioElement } from "@tooark/web-components";
3
3
  import React, { type PropsWithChildren } from "react";
4
- export type ArkRadioProps = PropsWithChildren<ArkRadioStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkRadioProps = PropsWithChildren<ArkDomProps<ArkRadioStyleOptions & {
5
6
  disabled?: boolean;
6
7
  /** Nome do grupo: agrupa no formulario e para setas/roving tabindex. */
7
8
  name?: string;
@@ -9,12 +10,14 @@ export type ArkRadioProps = PropsWithChildren<ArkRadioStyleOptions & {
9
10
  value?: string;
10
11
  /** Rotulo proprio (<label for>); sem ele use aria-label ou filhos como rotulo livre. */
11
12
  label?: string;
13
+ /** Dica abaixo do rotulo, ligada ao controle por aria-describedby. */
14
+ helper?: string;
12
15
  className?: string;
13
16
  /** Dispara so no radio que ganhou a marca. */
14
17
  onChange?: (event: CustomEvent<{
15
18
  value: string;
16
19
  }>) => void;
17
- }>;
20
+ }>>;
18
21
  export declare const ArkRadio: React.ForwardRefExoticComponent<ArkRadioStyleOptions & {
19
22
  disabled?: boolean;
20
23
  /** Nome do grupo: agrupa no formulario e para setas/roving tabindex. */
@@ -23,11 +26,13 @@ export declare const ArkRadio: React.ForwardRefExoticComponent<ArkRadioStyleOpti
23
26
  value?: string;
24
27
  /** Rotulo proprio (<label for>); sem ele use aria-label ou filhos como rotulo livre. */
25
28
  label?: string;
29
+ /** Dica abaixo do rotulo, ligada ao controle por aria-describedby. */
30
+ helper?: string;
26
31
  className?: string;
27
32
  /** Dispara so no radio que ganhou a marca. */
28
33
  onChange?: (event: CustomEvent<{
29
34
  value: string;
30
35
  }>) => void;
31
- } & {
36
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "onChange" | "label" | "name" | "disabled" | "value" | "helper" | keyof ArkRadioStyleOptions> & {
32
37
  children?: React.ReactNode | undefined;
33
38
  } & React.RefAttributes<ArkRadioElement>>;
@@ -1,7 +1,8 @@
1
1
  import type { ArkDatepickerLang, ArkSchedulerEvent, ArkSchedulerStyleOptions } from "@tooark/core";
2
2
  import type { ArkScheduler as ArkSchedulerElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
- export type ArkSchedulerProps = ArkSchedulerStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkSchedulerProps = ArkDomProps<ArkSchedulerStyleOptions & {
5
6
  lang?: ArkDatepickerLang;
6
7
  /** JSON com strings próprias, mesclado sobre o inglês, quando lang é "custom". */
7
8
  localeJson?: string;
@@ -23,7 +24,7 @@ export type ArkSchedulerProps = ArkSchedulerStyleOptions & {
23
24
  end: string;
24
25
  view: string;
25
26
  }) => void;
26
- };
27
+ }>;
27
28
  export declare const ArkScheduler: React.ForwardRefExoticComponent<ArkSchedulerStyleOptions & {
28
29
  lang?: ArkDatepickerLang;
29
30
  /** JSON com strings próprias, mesclado sobre o inglês, quando lang é "custom". */
@@ -46,4 +47,4 @@ export declare const ArkScheduler: React.ForwardRefExoticComponent<ArkSchedulerS
46
47
  end: string;
47
48
  view: string;
48
49
  }) => void;
49
- } & React.RefAttributes<ArkSchedulerElement>>;
50
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "lang" | "localeJson" | keyof ArkSchedulerStyleOptions | "onEventClick" | "onSlotClick" | "onViewChange" | "onRangeChange"> & React.RefAttributes<ArkSchedulerElement>>;
@@ -1,7 +1,8 @@
1
1
  import type { ArkSelectOption, ArkSelectStyleOptions } from "@tooark/core";
2
2
  import type { ArkSelect as ArkSelectElement } from "@tooark/web-components";
3
3
  import React, { type PropsWithChildren } from "react";
4
- export type ArkSelectProps = PropsWithChildren<ArkSelectStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkSelectProps = PropsWithChildren<ArkDomProps<ArkSelectStyleOptions & {
5
6
  label?: string;
6
7
  placeholder?: string;
7
8
  options?: ArkSelectOption[];
@@ -17,7 +18,7 @@ export type ArkSelectProps = PropsWithChildren<ArkSelectStyleOptions & {
17
18
  onChange?: (event: CustomEvent<{
18
19
  value: string;
19
20
  }>) => void;
20
- }>;
21
+ }>>;
21
22
  export declare const ArkSelect: React.ForwardRefExoticComponent<ArkSelectStyleOptions & {
22
23
  label?: string;
23
24
  placeholder?: string;
@@ -34,6 +35,6 @@ export declare const ArkSelect: React.ForwardRefExoticComponent<ArkSelectStyleOp
34
35
  onChange?: (event: CustomEvent<{
35
36
  value: string;
36
37
  }>) => void;
37
- } & {
38
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "onChange" | "onInput" | "error" | "label" | "name" | "disabled" | "value" | "helper" | "placeholder" | "errorMessage" | "required" | keyof ArkSelectStyleOptions | "options"> & {
38
39
  children?: React.ReactNode | undefined;
39
40
  } & React.RefAttributes<ArkSelectElement>>;
@@ -1,7 +1,8 @@
1
1
  import type { ArkMarkShape, ArkShapePickerStyleOptions } from "@tooark/core";
2
2
  import type { ArkShapePicker as ArkShapePickerElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
- export type ArkShapePickerProps = ArkShapePickerStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkShapePickerProps = ArkDomProps<ArkShapePickerStyleOptions & {
5
6
  /** Forma selecionada. */
6
7
  value?: ArkMarkShape;
7
8
  /** Formas oferecidas, na ordem (ou "all"). Padrao: as dez. */
@@ -14,7 +15,7 @@ export type ArkShapePickerProps = ArkShapePickerStyleOptions & {
14
15
  onChange?: (event: CustomEvent<{
15
16
  value: ArkMarkShape;
16
17
  }>) => void;
17
- };
18
+ }>;
18
19
  export declare const ArkShapePicker: React.ForwardRefExoticComponent<ArkShapePickerStyleOptions & {
19
20
  /** Forma selecionada. */
20
21
  value?: ArkMarkShape;
@@ -28,4 +29,4 @@ export declare const ArkShapePicker: React.ForwardRefExoticComponent<ArkShapePic
28
29
  onChange?: (event: CustomEvent<{
29
30
  value: ArkMarkShape;
30
31
  }>) => void;
31
- } & React.RefAttributes<ArkShapePickerElement>>;
32
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "onChange" | "label" | "disabled" | "value" | keyof ArkShapePickerStyleOptions | "shapes"> & React.RefAttributes<ArkShapePickerElement>>;
@@ -1,14 +1,15 @@
1
1
  import type { ArkSkeletonStyleOptions } from "@tooark/core";
2
2
  import type { ArkSkeleton as ArkSkeletonElement } from "@tooark/web-components";
3
3
  import React, { type PropsWithChildren } from "react";
4
- export type ArkSkeletonProps = PropsWithChildren<ArkSkeletonStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkSkeletonProps = PropsWithChildren<ArkDomProps<ArkSkeletonStyleOptions & {
5
6
  /** Numero de barras; acima de 1 troca o bloco por barras em coluna. Padrao: 1. */
6
7
  rows?: number;
7
8
  /** Liga o brilho que varre (opt-in; para sob movimento reduzido). */
8
9
  animated?: boolean;
9
10
  className?: string;
10
11
  style?: React.CSSProperties;
11
- }>;
12
+ }>>;
12
13
  export declare const ArkSkeleton: React.ForwardRefExoticComponent<ArkSkeletonStyleOptions & {
13
14
  /** Numero de barras; acima de 1 troca o bloco por barras em coluna. Padrao: 1. */
14
15
  rows?: number;
@@ -16,6 +17,6 @@ export declare const ArkSkeleton: React.ForwardRefExoticComponent<ArkSkeletonSty
16
17
  animated?: boolean;
17
18
  className?: string;
18
19
  style?: React.CSSProperties;
19
- } & {
20
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "style" | "rows" | keyof ArkSkeletonStyleOptions | "animated"> & {
20
21
  children?: React.ReactNode | undefined;
21
22
  } & React.RefAttributes<ArkSkeletonElement>>;
@@ -1,13 +1,14 @@
1
1
  import type { ArkSpinnerStyleOptions } from "@tooark/core";
2
2
  import type { ArkSpinner as ArkSpinnerElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
- export type ArkSpinnerProps = ArkSpinnerStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkSpinnerProps = ArkDomProps<ArkSpinnerStyleOptions & {
5
6
  /** Rotulo so para leitores de tela. Padrao: a string `loading` do idioma. */
6
7
  label?: string;
7
8
  className?: string;
8
- };
9
+ }>;
9
10
  export declare const ArkSpinner: React.ForwardRefExoticComponent<ArkSpinnerStyleOptions & {
10
11
  /** Rotulo so para leitores de tela. Padrao: a string `loading` do idioma. */
11
12
  label?: string;
12
13
  className?: string;
13
- } & React.RefAttributes<ArkSpinnerElement>>;
14
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "label" | keyof ArkSpinnerStyleOptions> & React.RefAttributes<ArkSpinnerElement>>;
@@ -2,7 +2,8 @@ import type { ArkSplitPaneStyleOptions } from "@tooark/core";
2
2
  import type { ArkSplitPane as ArkSplitPaneElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
4
  import { type PropsWithChildren } from "react";
5
- export type ArkSplitPaneProps = PropsWithChildren<ArkSplitPaneStyleOptions & {
5
+ import type { ArkDomProps } from "./dom-props.js";
6
+ export type ArkSplitPaneProps = PropsWithChildren<ArkDomProps<ArkSplitPaneStyleOptions & {
6
7
  /** Tamanhos dos paineis em percentuais, na ordem dos filhos (ex.: [30, 70]); faltantes sao distribuidos. */
7
8
  sizes?: number[];
8
9
  className?: string;
@@ -10,7 +11,7 @@ export type ArkSplitPaneProps = PropsWithChildren<ArkSplitPaneStyleOptions & {
10
11
  onResize?: (event: CustomEvent<{
11
12
  sizes: number[];
12
13
  }>) => void;
13
- }>;
14
+ }>>;
14
15
  export declare const ArkSplitPane: React.ForwardRefExoticComponent<ArkSplitPaneStyleOptions & {
15
16
  /** Tamanhos dos paineis em percentuais, na ordem dos filhos (ex.: [30, 70]); faltantes sao distribuidos. */
16
17
  sizes?: number[];
@@ -19,6 +20,6 @@ export declare const ArkSplitPane: React.ForwardRefExoticComponent<ArkSplitPaneS
19
20
  onResize?: (event: CustomEvent<{
20
21
  sizes: number[];
21
22
  }>) => void;
22
- } & {
23
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | keyof ArkSplitPaneStyleOptions | "sizes" | "onResize"> & {
23
24
  children?: React.ReactNode | undefined;
24
25
  } & React.RefAttributes<ArkSplitPaneElement>>;
@@ -1,13 +1,14 @@
1
1
  import type { ArkStatusDotStyleOptions } from "@tooark/core";
2
2
  import type { ArkStatusDot as ArkStatusDotElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
- export type ArkStatusDotProps = ArkStatusDotStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkStatusDotProps = ArkDomProps<ArkStatusDotStyleOptions & {
5
6
  /** Com rotulo o ponto vira role="img" nomeado; sem ele e decorativo (aria-hidden). */
6
7
  label?: string;
7
8
  className?: string;
8
- };
9
+ }>;
9
10
  export declare const ArkStatusDot: React.ForwardRefExoticComponent<ArkStatusDotStyleOptions & {
10
11
  /** Com rotulo o ponto vira role="img" nomeado; sem ele e decorativo (aria-hidden). */
11
12
  label?: string;
12
13
  className?: string;
13
- } & React.RefAttributes<ArkStatusDotElement>>;
14
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "label" | keyof ArkStatusDotStyleOptions> & React.RefAttributes<ArkStatusDotElement>>;
@@ -1,7 +1,8 @@
1
1
  import type { ArkSwitchStyleOptions } from "@tooark/core";
2
2
  import type { ArkSwitch as ArkSwitchElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
- export type ArkSwitchProps = ArkSwitchStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkSwitchProps = ArkDomProps<ArkSwitchStyleOptions & {
5
6
  disabled?: boolean;
6
7
  name?: string;
7
8
  value?: string;
@@ -10,7 +11,7 @@ export type ArkSwitchProps = ArkSwitchStyleOptions & {
10
11
  onChange?: (event: CustomEvent<{
11
12
  checked: boolean;
12
13
  }>) => void;
13
- };
14
+ }>;
14
15
  export declare const ArkSwitch: React.ForwardRefExoticComponent<ArkSwitchStyleOptions & {
15
16
  disabled?: boolean;
16
17
  name?: string;
@@ -20,4 +21,4 @@ export declare const ArkSwitch: React.ForwardRefExoticComponent<ArkSwitchStyleOp
20
21
  onChange?: (event: CustomEvent<{
21
22
  checked: boolean;
22
23
  }>) => void;
23
- } & React.RefAttributes<ArkSwitchElement>>;
24
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "onChange" | "label" | "name" | "disabled" | "value" | keyof ArkSwitchStyleOptions> & React.RefAttributes<ArkSwitchElement>>;
@@ -1,7 +1,8 @@
1
1
  import type { ArkTabStyleOptions, ArkTabsStyleOptions } from "@tooark/core";
2
2
  import type { ArkTab as ArkTabElement, ArkTabs as ArkTabsElement } from "@tooark/web-components";
3
3
  import React, { type PropsWithChildren } from "react";
4
- export type ArkTabsProps = PropsWithChildren<ArkTabsStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkTabsProps = PropsWithChildren<ArkDomProps<ArkTabsStyleOptions & {
5
6
  /** Value da aba ativa; sem ele a primeira habilitada assume. */
6
7
  value?: string;
7
8
  /** Vira aria-label da faixa. */
@@ -14,7 +15,7 @@ export type ArkTabsProps = PropsWithChildren<ArkTabsStyleOptions & {
14
15
  onClose?: (event: CustomEvent<{
15
16
  value: string;
16
17
  }>) => void;
17
- }>;
18
+ }>>;
18
19
  export declare const ArkTabs: React.ForwardRefExoticComponent<ArkTabsStyleOptions & {
19
20
  /** Value da aba ativa; sem ele a primeira habilitada assume. */
20
21
  value?: string;
@@ -28,10 +29,10 @@ export declare const ArkTabs: React.ForwardRefExoticComponent<ArkTabsStyleOption
28
29
  onClose?: (event: CustomEvent<{
29
30
  value: string;
30
31
  }>) => void;
31
- } & {
32
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "onChange" | "label" | "value" | "onClose" | keyof ArkTabsStyleOptions> & {
32
33
  children?: React.ReactNode | undefined;
33
34
  } & React.RefAttributes<ArkTabsElement>>;
34
- export type ArkTabProps = PropsWithChildren<ArkTabStyleOptions & {
35
+ export type ArkTabProps = PropsWithChildren<ArkDomProps<ArkTabStyleOptions & {
35
36
  value: string;
36
37
  disabled?: boolean;
37
38
  /** id do painel que a aba controla (aria-controls). */
@@ -41,7 +42,7 @@ export type ArkTabProps = PropsWithChildren<ArkTabStyleOptions & {
41
42
  /** Ponto de alteracoes nao salvas. */
42
43
  dirty?: boolean;
43
44
  className?: string;
44
- }>;
45
+ }>>;
45
46
  export declare const ArkTab: React.ForwardRefExoticComponent<ArkTabStyleOptions & {
46
47
  value: string;
47
48
  disabled?: boolean;
@@ -52,6 +53,6 @@ export declare const ArkTab: React.ForwardRefExoticComponent<ArkTabStyleOptions
52
53
  /** Ponto de alteracoes nao salvas. */
53
54
  dirty?: boolean;
54
55
  className?: string;
55
- } & {
56
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "testid" | "disabled" | "value" | "controls" | "closable" | "dirty"> & {
56
57
  children?: React.ReactNode | undefined;
57
58
  } & React.RefAttributes<ArkTabElement>>;
@@ -1,7 +1,8 @@
1
1
  import type { ArkTextareaResize, ArkTextareaStyleOptions } from "@tooark/core";
2
2
  import type { ArkTextarea as ArkTextareaElement } from "@tooark/web-components";
3
3
  import React, { type PropsWithChildren } from "react";
4
- export type ArkTextareaProps = PropsWithChildren<ArkTextareaStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkTextareaProps = PropsWithChildren<ArkDomProps<ArkTextareaStyleOptions & {
5
6
  label?: string;
6
7
  placeholder?: string;
7
8
  value?: string;
@@ -31,7 +32,7 @@ export type ArkTextareaProps = PropsWithChildren<ArkTextareaStyleOptions & {
31
32
  className?: string;
32
33
  onInput?: (event: Event) => void;
33
34
  onChange?: (event: Event) => void;
34
- }>;
35
+ }>>;
35
36
  export declare const ArkTextarea: React.ForwardRefExoticComponent<ArkTextareaStyleOptions & {
36
37
  label?: string;
37
38
  placeholder?: string;
@@ -62,6 +63,6 @@ export declare const ArkTextarea: React.ForwardRefExoticComponent<ArkTextareaSty
62
63
  className?: string;
63
64
  onInput?: (event: Event) => void;
64
65
  onChange?: (event: Event) => void;
65
- } & {
66
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "aria-label" | "onChange" | "onInput" | "error" | "resize" | "label" | "name" | "disabled" | "value" | "helper" | "placeholder" | "errorMessage" | "required" | "readonly" | "autocomplete" | "autofocus" | "maxlength" | "minlength" | "spellcheck" | "rows" | keyof ArkTextareaStyleOptions | "autosize" | "monospace" | "wrap"> & {
66
67
  children?: React.ReactNode | undefined;
67
68
  } & React.RefAttributes<ArkTextareaElement>>;
@@ -1,14 +1,15 @@
1
1
  import type { ArkToasterStyleOptions } from "@tooark/core";
2
2
  import type { ArkToaster as ArkToasterElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
- export type ArkToasterProps = ArkToasterStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkToasterProps = ArkDomProps<ArkToasterStyleOptions & {
5
6
  className?: string;
6
7
  /** Botão de ação de um toast: detail traz o id do toast e o actionId das opções. */
7
8
  onAction?: (event: CustomEvent<{
8
9
  id: string;
9
10
  actionId: string | null;
10
11
  }>) => void;
11
- };
12
+ }>;
12
13
  export declare const ArkToaster: React.ForwardRefExoticComponent<ArkToasterStyleOptions & {
13
14
  className?: string;
14
15
  /** Botão de ação de um toast: detail traz o id do toast e o actionId das opções. */
@@ -16,4 +17,4 @@ export declare const ArkToaster: React.ForwardRefExoticComponent<ArkToasterStyle
16
17
  id: string;
17
18
  actionId: string | null;
18
19
  }>) => void;
19
- } & React.RefAttributes<ArkToasterElement>>;
20
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | keyof ArkToasterStyleOptions | "onAction"> & React.RefAttributes<ArkToasterElement>>;
@@ -1,14 +1,15 @@
1
1
  import type { ArkToggleGroupStyleOptions, ArkToggleStyleOptions } from "@tooark/core";
2
2
  import type { ArkToggle as ArkToggleElement, ArkToggleGroup as ArkToggleGroupElement } from "@tooark/web-components";
3
3
  import React, { type PropsWithChildren } from "react";
4
- export type ArkToggleProps = PropsWithChildren<ArkToggleStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkToggleProps = PropsWithChildren<ArkDomProps<ArkToggleStyleOptions & {
5
6
  disabled?: boolean;
6
7
  className?: string;
7
8
  onChange?: (event: CustomEvent<{
8
9
  pressed: boolean;
9
10
  value: string;
10
11
  }>) => void;
11
- }>;
12
+ }>>;
12
13
  export declare const ArkToggle: React.ForwardRefExoticComponent<ArkToggleStyleOptions & {
13
14
  disabled?: boolean;
14
15
  className?: string;
@@ -16,17 +17,17 @@ export declare const ArkToggle: React.ForwardRefExoticComponent<ArkToggleStyleOp
16
17
  pressed: boolean;
17
18
  value: string;
18
19
  }>) => void;
19
- } & {
20
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "onChange" | "disabled" | keyof ArkToggleStyleOptions> & {
20
21
  children?: React.ReactNode | undefined;
21
22
  } & React.RefAttributes<ArkToggleElement>>;
22
- export type ArkToggleGroupProps = PropsWithChildren<ArkToggleGroupStyleOptions & {
23
+ export type ArkToggleGroupProps = PropsWithChildren<ArkDomProps<ArkToggleGroupStyleOptions & {
23
24
  disabled?: boolean;
24
25
  className?: string;
25
26
  onChange?: (event: CustomEvent<{
26
27
  value?: string;
27
28
  values?: string[];
28
29
  }>) => void;
29
- }>;
30
+ }>>;
30
31
  export declare const ArkToggleGroup: React.ForwardRefExoticComponent<ArkToggleGroupStyleOptions & {
31
32
  disabled?: boolean;
32
33
  className?: string;
@@ -34,6 +35,6 @@ export declare const ArkToggleGroup: React.ForwardRefExoticComponent<ArkToggleGr
34
35
  value?: string;
35
36
  values?: string[];
36
37
  }>) => void;
37
- } & {
38
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "onChange" | "disabled" | keyof ArkToggleGroupStyleOptions> & {
38
39
  children?: React.ReactNode | undefined;
39
40
  } & React.RefAttributes<ArkToggleGroupElement>>;