@tooark/react 1.4.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 (45) hide show
  1. package/README.md +3 -3
  2. package/README.pt-BR.md +3 -3
  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 +4 -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 +7 -6
  15. package/dist/ark-copy-button.d.ts +4 -3
  16. package/dist/ark-datepicker.d.ts +4 -3
  17. package/dist/ark-dialog.d.ts +4 -3
  18. package/dist/ark-drawer.d.ts +4 -3
  19. package/dist/ark-empty.d.ts +4 -3
  20. package/dist/ark-file-input.d.ts +12 -5
  21. package/dist/ark-file-input.js +2 -1
  22. package/dist/ark-input.d.ts +4 -3
  23. package/dist/ark-kbd.d.ts +4 -3
  24. package/dist/ark-kv-editor.d.ts +4 -3
  25. package/dist/ark-mark.d.ts +4 -3
  26. package/dist/ark-menu.d.ts +7 -6
  27. package/dist/ark-progress.d.ts +4 -3
  28. package/dist/ark-radio.d.ts +4 -3
  29. package/dist/ark-scheduler.d.ts +4 -3
  30. package/dist/ark-select.d.ts +4 -3
  31. package/dist/ark-shape-picker.d.ts +4 -3
  32. package/dist/ark-skeleton.d.ts +4 -3
  33. package/dist/ark-spinner.d.ts +4 -3
  34. package/dist/ark-split-pane.d.ts +4 -3
  35. package/dist/ark-status-dot.d.ts +4 -3
  36. package/dist/ark-switch.d.ts +4 -3
  37. package/dist/ark-tabs.d.ts +7 -6
  38. package/dist/ark-textarea.d.ts +4 -3
  39. package/dist/ark-toaster.d.ts +4 -3
  40. package/dist/ark-toggle.d.ts +7 -6
  41. package/dist/ark-tooltip.d.ts +4 -3
  42. package/dist/dom-props.d.ts +8 -0
  43. package/dist/dom-props.js +1 -0
  44. package/dist/jsx-intrinsics.d.ts +2 -0
  45. package/package.json +4 -4
package/README.md CHANGED
@@ -30,7 +30,7 @@ The `@tooark/react` package provides:
30
30
 
31
31
  - one component per element (41 wrappers: `ArkAlert`, `ArkAvatar`, `ArkBadge`, `ArkButton`, `ArkCalendar`, `ArkCard`, …) with typed props that extend the `Ark*StyleOptions` from `@tooark/core`;
32
32
  - camelCase props map to attributes; booleans are passed as present/absent; object props (`events`, `rows`, `options`, and `localeJson` on `ArkCalendar`/`ArkDatepicker`) are serialized or assigned as properties for you (on the other wrappers `localeJson` is a JSON string);
33
- - custom events become handlers receiving the `CustomEvent` (`onChange`, `onClose`, `onSelect`, …) or, on the calendar, datepicker, clock, carousel and scheduler, its `detail`; native events (`onClick`, `onInput`) work as usual, and `ArkButtonProps` extends `React.HTMLAttributes<HTMLElement>`, so `onClick`, `onFocus`, `id`, `style`, … are typed (a `disabled` or `loading` button never fires `onClick`);
33
+ - custom events become handlers receiving the `CustomEvent` (`onChange`, `onClose`, `onSelect`, …) or, on the calendar, datepicker, clock, carousel and scheduler, its `detail`; every props type also takes React's DOM attributes and handlers (`id`, `style`, `title`, `tabIndex`, `aria-*`, `data-*`, `onClick`, `onKeyDown`, `onFocus`, …), typed and forwarded to the element; what the wrapper defines wins over the React prop of the same name (`onChange` is the element's `CustomEvent`), and a `disabled` or `loading` button never fires `onClick`;
34
34
  - the elements register themselves on first render (`ensureTooarkComponentsRegistered`), browser only, so SSR frameworks are fine;
35
35
  - `IntrinsicElements` typings for every `ark-*` tag, for the side packages or when you prefer the raw element;
36
36
  - `toast`, `showToast`, `dismissToast` re-exported from `@tooark/core`.
@@ -167,8 +167,8 @@ Installed automatically unless marked as peer; peer dependencies are yours to in
167
167
 
168
168
  | Package | Version | Description |
169
169
  | -------------------------------------------------------------------------------- | ----------- | ---------------------------------------------------------------- |
170
- | [`@tooark/core`](https://www.npmjs.com/package/@tooark/core) | ^1.4.0 | Types, i18n, toast/announce services, motion and overlay helpers |
171
- | [`@tooark/web-components`](https://www.npmjs.com/package/@tooark/web-components) | ^1.4.0 | The `ark-*` Custom Elements and their stylesheet |
170
+ | [`@tooark/core`](https://www.npmjs.com/package/@tooark/core) | ^1.5.0 | Types, i18n, toast/announce services, motion and overlay helpers |
171
+ | [`@tooark/web-components`](https://www.npmjs.com/package/@tooark/web-components) | ^1.5.0 | The `ark-*` Custom Elements and their stylesheet |
172
172
  | [`react`](https://www.npmjs.com/package/react) | >=18 (peer) | React 18 or 19 |
173
173
  | [`react-dom`](https://www.npmjs.com/package/react-dom) | >=18 (peer) | React DOM renderer |
174
174
 
package/README.pt-BR.md CHANGED
@@ -30,7 +30,7 @@ O pacote `@tooark/react` fornece:
30
30
 
31
31
  - um componente por elemento (41 wrappers: `ArkAlert`, `ArkAvatar`, `ArkBadge`, `ArkButton`, `ArkCalendar`, `ArkCard`, …) com props tipadas que estendem os `Ark*StyleOptions` do `@tooark/core`;
32
32
  - props camelCase viram atributos; booleanos vão como presente/ausente; props de objeto (`events`, `rows`, `options` e o `localeJson` de `ArkCalendar`/`ArkDatepicker`) são serializadas ou atribuídas como propriedade para você (nos demais wrappers o `localeJson` é uma string JSON);
33
- - eventos customizados viram handlers que recebem o `CustomEvent` (`onChange`, `onClose`, `onSelect`, …) ou, no calendário, datepicker, relógio, carrossel e agenda, o `detail` dele; eventos nativos (`onClick`, `onInput`) funcionam como sempre, e o `ArkButtonProps` estende `React.HTMLAttributes<HTMLElement>`, então `onClick`, `onFocus`, `id`, `style`, … são tipados (um botão `disabled` ou `loading` nunca dispara o `onClick`);
33
+ - eventos customizados viram handlers que recebem o `CustomEvent` (`onChange`, `onClose`, `onSelect`, …) ou, no calendário, datepicker, relógio, carrossel e agenda, o `detail` dele; todo tipo de props também aceita os atributos e handlers DOM do React (`id`, `style`, `title`, `tabIndex`, `aria-*`, `data-*`, `onClick`, `onKeyDown`, `onFocus`, …), tipados e repassados ao elemento; o que o wrapper define vale sobre a prop do React de mesmo nome (`onChange` é o `CustomEvent` do elemento), e um botão `disabled` ou `loading` nunca dispara o `onClick`;
34
34
  - os elementos se registram no primeiro render (`ensureTooarkComponentsRegistered`), só no navegador, então frameworks com SSR funcionam;
35
35
  - tipagens `IntrinsicElements` de toda tag `ark-*`, para os pacotes laterais ou quando você preferir o elemento cru;
36
36
  - `toast`, `showToast`, `dismissToast` reexportados do `@tooark/core`.
@@ -167,8 +167,8 @@ Instaladas automaticamente, salvo as marcadas como peer, que ficam por sua conta
167
167
 
168
168
  | Pacote | Versão | Descrição |
169
169
  | -------------------------------------------------------------------------------- | ----------- | -------------------------------------------------------------------- |
170
- | [`@tooark/core`](https://www.npmjs.com/package/@tooark/core) | ^1.4.0 | Tipos, i18n, serviços de toast/announce, motion e helpers de overlay |
171
- | [`@tooark/web-components`](https://www.npmjs.com/package/@tooark/web-components) | ^1.4.0 | Os Custom Elements `ark-*` e a folha de estilo deles |
170
+ | [`@tooark/core`](https://www.npmjs.com/package/@tooark/core) | ^1.5.0 | Tipos, i18n, serviços de toast/announce, motion e helpers de overlay |
171
+ | [`@tooark/web-components`](https://www.npmjs.com/package/@tooark/web-components) | ^1.5.0 | Os Custom Elements `ark-*` e a folha de estilo deles |
172
172
  | [`react`](https://www.npmjs.com/package/react) | >=18 (peer) | React 18 ou 19 |
173
173
  | [`react-dom`](https://www.npmjs.com/package/react-dom) | >=18 (peer) | Renderizador React DOM |
174
174
 
@@ -1,7 +1,8 @@
1
1
  import type { ArkAlertStyleOptions } from "@tooark/core";
2
2
  import type { ArkAlert as ArkAlertElement } from "@tooark/web-components";
3
3
  import React, { type PropsWithChildren } from "react";
4
- export type ArkAlertProps = PropsWithChildren<ArkAlertStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkAlertProps = PropsWithChildren<ArkDomProps<ArkAlertStyleOptions & {
5
6
  /** Titulo proprio no inicio do alerta. */
6
7
  heading?: string;
7
8
  /** Botao de dispensar (rotulo por lang/localeJson). */
@@ -9,7 +10,7 @@ export type ArkAlertProps = PropsWithChildren<ArkAlertStyleOptions & {
9
10
  className?: string;
10
11
  /** Depois da saida animada: o host ganha `hidden`; desmontar e do app. */
11
12
  onDismiss?: (event: CustomEvent) => void;
12
- }>;
13
+ }>>;
13
14
  export declare const ArkAlert: React.ForwardRefExoticComponent<ArkAlertStyleOptions & {
14
15
  /** Titulo proprio no inicio do alerta. */
15
16
  heading?: string;
@@ -18,6 +19,6 @@ export declare const ArkAlert: React.ForwardRefExoticComponent<ArkAlertStyleOpti
18
19
  className?: string;
19
20
  /** Depois da saida animada: o host ganha `hidden`; desmontar e do app. */
20
21
  onDismiss?: (event: CustomEvent) => void;
21
- } & {
22
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | keyof ArkAlertStyleOptions | "heading" | "dismissible" | "onDismiss"> & {
22
23
  children?: React.ReactNode | undefined;
23
24
  } & React.RefAttributes<ArkAlertElement>>;
@@ -1,17 +1,18 @@
1
1
  import type { ArkAvatarStyleOptions } from "@tooark/core";
2
2
  import type { ArkAvatar as ArkAvatarElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
- export type ArkAvatarProps = ArkAvatarStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkAvatarProps = ArkDomProps<ArkAvatarStyleOptions & {
5
6
  /** Nome da pessoa: vira aria-label e as iniciais (primeira letra, ou primeira + ultima com sobrenome). */
6
7
  name?: string;
7
8
  /** Imagem; em erro de carga caem as iniciais. */
8
9
  src?: string;
9
10
  className?: string;
10
- };
11
+ }>;
11
12
  export declare const ArkAvatar: React.ForwardRefExoticComponent<ArkAvatarStyleOptions & {
12
13
  /** Nome da pessoa: vira aria-label e as iniciais (primeira letra, ou primeira + ultima com sobrenome). */
13
14
  name?: string;
14
15
  /** Imagem; em erro de carga caem as iniciais. */
15
16
  src?: string;
16
17
  className?: string;
17
- } & React.RefAttributes<ArkAvatarElement>>;
18
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | keyof ArkAvatarStyleOptions | "name" | "src"> & React.RefAttributes<ArkAvatarElement>>;
@@ -1,11 +1,12 @@
1
1
  import type { ArkBadgeStyleOptions } from "@tooark/core";
2
2
  import type { ArkBadge as ArkBadgeElement } from "@tooark/web-components";
3
3
  import React, { type PropsWithChildren } from "react";
4
- export type ArkBadgeProps = PropsWithChildren<ArkBadgeStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkBadgeProps = PropsWithChildren<ArkDomProps<ArkBadgeStyleOptions & {
5
6
  className?: string;
6
- }>;
7
+ }>>;
7
8
  export declare const ArkBadge: React.ForwardRefExoticComponent<ArkBadgeStyleOptions & {
8
9
  className?: string;
9
- } & {
10
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | keyof ArkBadgeStyleOptions> & {
10
11
  children?: React.ReactNode | undefined;
11
12
  } & React.RefAttributes<ArkBadgeElement>>;
@@ -2,14 +2,15 @@ import type { ArkButtonStyleOptions, ArkButtonType } from "@tooark/core";
2
2
  import type { ArkButton as ArkButtonElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
4
  import { type PropsWithChildren } from "react";
5
+ import type { ArkDomProps } from "./dom-props.js";
5
6
  /** Props do ArkButton: opções de estilo mais os atributos e handlers DOM do React (onClick, onFocus, id, style...). */
6
- export type ArkButtonProps = PropsWithChildren<ArkButtonStyleOptions & Omit<React.HTMLAttributes<HTMLElement>, keyof ArkButtonStyleOptions | "children"> & {
7
+ export type ArkButtonProps = PropsWithChildren<ArkDomProps<ArkButtonStyleOptions & {
7
8
  type?: ArkButtonType;
8
9
  disabled?: boolean;
9
- }>;
10
- export declare const ArkButton: React.ForwardRefExoticComponent<ArkButtonStyleOptions & Omit<React.HTMLAttributes<HTMLElement>, "children" | keyof ArkButtonStyleOptions> & {
10
+ }>>;
11
+ export declare const ArkButton: React.ForwardRefExoticComponent<ArkButtonStyleOptions & {
11
12
  type?: ArkButtonType;
12
13
  disabled?: boolean;
13
- } & {
14
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | keyof ArkButtonStyleOptions | "type" | "disabled"> & {
14
15
  children?: React.ReactNode | undefined;
15
16
  } & React.RefAttributes<ArkButtonElement>>;
@@ -1,7 +1,8 @@
1
1
  import type { ArkCalendarEvent, ArkCalendarStyleOptions, ArkDatepickerLang, ArkLocale } from "@tooark/core";
2
2
  import type { ArkCalendar as ArkCalendarElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
- export type ArkCalendarProps = ArkCalendarStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkCalendarProps = ArkDomProps<ArkCalendarStyleOptions & {
5
6
  lang?: ArkDatepickerLang;
6
7
  localeJson?: Partial<ArkLocale>;
7
8
  value?: string;
@@ -13,7 +14,7 @@ export type ArkCalendarProps = ArkCalendarStyleOptions & {
13
14
  events: ArkCalendarEvent[];
14
15
  }) => void;
15
16
  className?: string;
16
- };
17
+ }>;
17
18
  export declare const ArkCalendar: React.ForwardRefExoticComponent<ArkCalendarStyleOptions & {
18
19
  lang?: ArkDatepickerLang;
19
20
  localeJson?: Partial<ArkLocale>;
@@ -26,4 +27,4 @@ export declare const ArkCalendar: React.ForwardRefExoticComponent<ArkCalendarSty
26
27
  events: ArkCalendarEvent[];
27
28
  }) => void;
28
29
  className?: string;
29
- } & React.RefAttributes<ArkCalendarElement>>;
30
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "lang" | "onChange" | "localeJson" | keyof ArkCalendarStyleOptions | "value" | "min" | "max"> & React.RefAttributes<ArkCalendarElement>>;
@@ -1,15 +1,16 @@
1
1
  import type { ArkCardStyleOptions } from "@tooark/core";
2
2
  import type { ArkCard as ArkCardElement } from "@tooark/web-components";
3
3
  import React, { type PropsWithChildren } from "react";
4
- export type ArkCardProps = PropsWithChildren<ArkCardStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkCardProps = PropsWithChildren<ArkDomProps<ArkCardStyleOptions & {
5
6
  /** Titulo (h2) na linha de cima; com ele o filho slot="header" vira a linha seguinte do cabecalho. */
6
7
  heading?: string;
7
8
  className?: string;
8
- }>;
9
+ }>>;
9
10
  export declare const ArkCard: React.ForwardRefExoticComponent<ArkCardStyleOptions & {
10
11
  /** Titulo (h2) na linha de cima; com ele o filho slot="header" vira a linha seguinte do cabecalho. */
11
12
  heading?: string;
12
13
  className?: string;
13
- } & {
14
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "heading" | keyof ArkCardStyleOptions> & {
14
15
  children?: React.ReactNode | undefined;
15
16
  } & React.RefAttributes<ArkCardElement>>;
@@ -1,19 +1,20 @@
1
1
  import type { ArkCarouselSnap, ArkCarouselStyleOptions } from "@tooark/core";
2
2
  import type { ArkCarousel as ArkCarouselElement } from "@tooark/web-components";
3
3
  import React, { type PropsWithChildren } from "react";
4
- export type ArkCarouselProps = PropsWithChildren<ArkCarouselStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkCarouselProps = PropsWithChildren<ArkDomProps<ArkCarouselStyleOptions & {
5
6
  snap?: ArkCarouselSnap;
6
7
  onSlideChange?: (detail: {
7
8
  index: number;
8
9
  }) => void;
9
10
  className?: string;
10
- }>;
11
+ }>>;
11
12
  export declare const ArkCarousel: React.ForwardRefExoticComponent<ArkCarouselStyleOptions & {
12
13
  snap?: ArkCarouselSnap;
13
14
  onSlideChange?: (detail: {
14
15
  index: number;
15
16
  }) => void;
16
17
  className?: string;
17
- } & {
18
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | keyof ArkCarouselStyleOptions | "onSlideChange"> & {
18
19
  children?: React.ReactNode | undefined;
19
20
  } & React.RefAttributes<ArkCarouselElement>>;
@@ -1,7 +1,8 @@
1
1
  import type { ArkCheckboxStyleOptions } from "@tooark/core";
2
2
  import type { ArkCheckbox as ArkCheckboxElement } from "@tooark/web-components";
3
3
  import React, { type PropsWithChildren } from "react";
4
- export type ArkCheckboxProps = PropsWithChildren<ArkCheckboxStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkCheckboxProps = PropsWithChildren<ArkDomProps<ArkCheckboxStyleOptions & {
5
6
  disabled?: boolean;
6
7
  /** Nome no formulario (submete `value` quando marcado). */
7
8
  name?: string;
@@ -15,7 +16,7 @@ export type ArkCheckboxProps = PropsWithChildren<ArkCheckboxStyleOptions & {
15
16
  onChange?: (event: CustomEvent<{
16
17
  checked: boolean;
17
18
  }>) => void;
18
- }>;
19
+ }>>;
19
20
  export declare const ArkCheckbox: React.ForwardRefExoticComponent<ArkCheckboxStyleOptions & {
20
21
  disabled?: boolean;
21
22
  /** Nome no formulario (submete `value` quando marcado). */
@@ -30,6 +31,6 @@ export declare const ArkCheckbox: React.ForwardRefExoticComponent<ArkCheckboxSty
30
31
  onChange?: (event: CustomEvent<{
31
32
  checked: boolean;
32
33
  }>) => void;
33
- } & {
34
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "onChange" | "label" | "name" | "disabled" | "value" | keyof ArkCheckboxStyleOptions | "helper"> & {
34
35
  children?: React.ReactNode | undefined;
35
36
  } & React.RefAttributes<ArkCheckboxElement>>;
@@ -1,19 +1,24 @@
1
1
  import type { ArkClockStyleOptions, ArkDatepickerLang } from "@tooark/core";
2
2
  import type { ArkClock as ArkClockElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
- export type ArkClockProps = ArkClockStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkClockProps = ArkDomProps<ArkClockStyleOptions & {
5
6
  value?: string;
6
7
  lang?: ArkDatepickerLang;
8
+ /** JSON com strings proprias (hours, minutes, seconds), mesclado sobre o ingles, quando lang e "custom". */
9
+ localeJson?: string;
7
10
  className?: string;
8
11
  onChange?: (detail: {
9
12
  value: string;
10
13
  }) => void;
11
- };
14
+ }>;
12
15
  export declare const ArkClock: React.ForwardRefExoticComponent<ArkClockStyleOptions & {
13
16
  value?: string;
14
17
  lang?: ArkDatepickerLang;
18
+ /** JSON com strings proprias (hours, minutes, seconds), mesclado sobre o ingles, quando lang e "custom". */
19
+ localeJson?: string;
15
20
  className?: string;
16
21
  onChange?: (detail: {
17
22
  value: string;
18
23
  }) => void;
19
- } & React.RefAttributes<ArkClockElement>>;
24
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "lang" | "onChange" | "localeJson" | "value" | keyof ArkClockStyleOptions> & React.RefAttributes<ArkClockElement>>;
package/dist/ark-clock.js CHANGED
@@ -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 ArkClock = forwardRef(function ArkClock(props, forwardedRef) {
5
- const { className, seconds, stepMinutes, hoursFormat, onChange, ...rest } = props;
5
+ const { className, seconds, stepMinutes, hoursFormat, localeJson, onChange, ...rest } = props;
6
6
  const [ref, setRef] = useForwardedRef(forwardedRef);
7
7
  useEffect(() => {
8
8
  ensureTooarkComponentsRegistered();
@@ -21,7 +21,8 @@ export const ArkClock = forwardRef(function ArkClock(props, forwardedRef) {
21
21
  class: className,
22
22
  seconds: seconds ? "" : undefined,
23
23
  "step-minutes": stepMinutes !== undefined ? String(stepMinutes) : undefined,
24
- "hours-format": hoursFormat
24
+ "hours-format": hoursFormat,
25
+ "locale-json": localeJson
25
26
  };
26
27
  return createElement("ark-clock", attrs);
27
28
  });
@@ -1,7 +1,8 @@
1
1
  import type { ArkColorSwatch, ArkColorSwatchesStyleOptions } from "@tooark/core";
2
2
  import type { ArkColorSwatches as ArkColorSwatchesElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
- export type ArkColorSwatchesProps = ArkColorSwatchesStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkColorSwatchesProps = ArkDomProps<ArkColorSwatchesStyleOptions & {
5
6
  /** Cor selecionada (o value da amostra). */
6
7
  value?: string;
7
8
  /** Amostras { name, value }[]; vai como JSON no atributo. */
@@ -14,7 +15,7 @@ export type ArkColorSwatchesProps = ArkColorSwatchesStyleOptions & {
14
15
  onChange?: (event: CustomEvent<{
15
16
  value: string;
16
17
  }>) => void;
17
- };
18
+ }>;
18
19
  export declare const ArkColorSwatches: React.ForwardRefExoticComponent<ArkColorSwatchesStyleOptions & {
19
20
  /** Cor selecionada (o value da amostra). */
20
21
  value?: string;
@@ -28,4 +29,4 @@ export declare const ArkColorSwatches: React.ForwardRefExoticComponent<ArkColorS
28
29
  onChange?: (event: CustomEvent<{
29
30
  value: string;
30
31
  }>) => void;
31
- } & React.RefAttributes<ArkColorSwatchesElement>>;
32
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "onChange" | "label" | "disabled" | "value" | keyof ArkColorSwatchesStyleOptions | "colors"> & React.RefAttributes<ArkColorSwatchesElement>>;
@@ -2,7 +2,8 @@ import type { ArkCommandItemStyleOptions, ArkCommandPaletteStyleOptions } from "
2
2
  import type { ArkCommandItem as ArkCommandItemElement, ArkCommandPalette as ArkCommandPaletteElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
4
  import { type PropsWithChildren } from "react";
5
- export type ArkCommandPaletteProps = PropsWithChildren<ArkCommandPaletteStyleOptions & {
5
+ import type { ArkDomProps } from "./dom-props.js";
6
+ export type ArkCommandPaletteProps = PropsWithChildren<ArkDomProps<ArkCommandPaletteStyleOptions & {
6
7
  /** Aberta; a saida anima antes de sair do top layer. */
7
8
  open?: boolean;
8
9
  /** Placeholder e nome do campo de busca. Padrao: a string `search` do idioma. */
@@ -31,7 +32,7 @@ export type ArkCommandPaletteProps = PropsWithChildren<ArkCommandPaletteStyleOpt
31
32
  }>) => void;
32
33
  onOpen?: (event: CustomEvent) => void;
33
34
  onClose?: (event: CustomEvent) => void;
34
- }>;
35
+ }>>;
35
36
  export declare const ArkCommandPalette: React.ForwardRefExoticComponent<ArkCommandPaletteStyleOptions & {
36
37
  /** Aberta; a saida anima antes de sair do top layer. */
37
38
  open?: boolean;
@@ -61,10 +62,10 @@ export declare const ArkCommandPalette: React.ForwardRefExoticComponent<ArkComma
61
62
  }>) => void;
62
63
  onOpen?: (event: CustomEvent) => void;
63
64
  onClose?: (event: CustomEvent) => void;
64
- } & {
65
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "aria-label" | "onSelect" | "hint" | "label" | "filter" | keyof ArkCommandPaletteStyleOptions | "open" | "placeholder" | "hotkey" | "queryDelay" | "busy" | "noScrollLock" | "onQuery" | "onOpen" | "onClose"> & {
65
66
  children?: React.ReactNode | undefined;
66
67
  } & React.RefAttributes<ArkCommandPaletteElement>>;
67
- export type ArkCommandItemProps = PropsWithChildren<ArkCommandItemStyleOptions & {
68
+ export type ArkCommandItemProps = PropsWithChildren<ArkDomProps<ArkCommandItemStyleOptions & {
68
69
  value: string;
69
70
  /** Secao em que a paleta lista o item. */
70
71
  group?: string;
@@ -72,7 +73,7 @@ export type ArkCommandItemProps = PropsWithChildren<ArkCommandItemStyleOptions &
72
73
  label?: string;
73
74
  disabled?: boolean;
74
75
  className?: string;
75
- }>;
76
+ }>>;
76
77
  export declare const ArkCommandItem: React.ForwardRefExoticComponent<ArkCommandItemStyleOptions & {
77
78
  value: string;
78
79
  /** Secao em que a paleta lista o item. */
@@ -81,6 +82,6 @@ export declare const ArkCommandItem: React.ForwardRefExoticComponent<ArkCommandI
81
82
  label?: string;
82
83
  disabled?: boolean;
83
84
  className?: string;
84
- } & {
85
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "testid" | "group" | "label" | "disabled" | "value"> & {
85
86
  children?: React.ReactNode | undefined;
86
87
  } & React.RefAttributes<ArkCommandItemElement>>;
@@ -2,7 +2,8 @@ import type { ArkCopyButtonStyleOptions } from "@tooark/core";
2
2
  import type { ArkCopyButton as ArkCopyButtonElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
4
  import { type PropsWithChildren } from "react";
5
- export type ArkCopyButtonProps = PropsWithChildren<ArkCopyButtonStyleOptions & {
5
+ import type { ArkDomProps } from "./dom-props.js";
6
+ export type ArkCopyButtonProps = PropsWithChildren<ArkDomProps<ArkCopyButtonStyleOptions & {
6
7
  /** Texto a copiar. */
7
8
  value?: string;
8
9
  /** id de um elemento (vira o atributo for): copia o value de inputs/textareas ou o textContent. */
@@ -14,7 +15,7 @@ export type ArkCopyButtonProps = PropsWithChildren<ArkCopyButtonStyleOptions & {
14
15
  onCopy?: (event: CustomEvent<{
15
16
  value: string;
16
17
  }>) => void;
17
- }>;
18
+ }>>;
18
19
  export declare const ArkCopyButton: React.ForwardRefExoticComponent<ArkCopyButtonStyleOptions & {
19
20
  /** Texto a copiar. */
20
21
  value?: string;
@@ -27,6 +28,6 @@ export declare const ArkCopyButton: React.ForwardRefExoticComponent<ArkCopyButto
27
28
  onCopy?: (event: CustomEvent<{
28
29
  value: string;
29
30
  }>) => void;
30
- } & {
31
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "onCopy" | "disabled" | "value" | keyof ArkCopyButtonStyleOptions | "htmlFor" | "feedbackMs"> & {
31
32
  children?: React.ReactNode | undefined;
32
33
  } & React.RefAttributes<ArkCopyButtonElement>>;
@@ -1,7 +1,8 @@
1
1
  import type { ArkDatepickerLang, ArkDatepickerStyleOptions, ArkLocale } from "@tooark/core";
2
2
  import type { ArkDatepicker as ArkDatepickerElement } from "@tooark/web-components";
3
3
  import React from "react";
4
- export type ArkDatepickerProps = ArkDatepickerStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkDatepickerProps = ArkDomProps<ArkDatepickerStyleOptions & {
5
6
  lang?: ArkDatepickerLang;
6
7
  localeJson?: Partial<ArkLocale>;
7
8
  value?: string;
@@ -12,7 +13,7 @@ export type ArkDatepickerProps = ArkDatepickerStyleOptions & {
12
13
  date: Date | null;
13
14
  }) => void;
14
15
  className?: string;
15
- };
16
+ }>;
16
17
  export declare const ArkDatepicker: React.ForwardRefExoticComponent<ArkDatepickerStyleOptions & {
17
18
  lang?: ArkDatepickerLang;
18
19
  localeJson?: Partial<ArkLocale>;
@@ -24,4 +25,4 @@ export declare const ArkDatepicker: React.ForwardRefExoticComponent<ArkDatepicke
24
25
  date: Date | null;
25
26
  }) => void;
26
27
  className?: string;
27
- } & React.RefAttributes<ArkDatepickerElement>>;
28
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "lang" | "onChange" | "localeJson" | "value" | "min" | "max" | keyof ArkDatepickerStyleOptions> & React.RefAttributes<ArkDatepickerElement>>;
@@ -1,7 +1,8 @@
1
1
  import type { ArkDialogCloseReason, ArkDialogStyleOptions } from "@tooark/core";
2
2
  import type { ArkDialog as ArkDialogElement } from "@tooark/web-components";
3
3
  import React, { type PropsWithChildren } from "react";
4
- export type ArkDialogProps = PropsWithChildren<ArkDialogStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkDialogProps = PropsWithChildren<ArkDomProps<ArkDialogStyleOptions & {
5
6
  /** Aberto; a saida anima antes de sair do top layer. */
6
7
  open?: boolean;
7
8
  /** Titulo (h2) e nome acessivel. Sem ele, passe aria-label. */
@@ -19,7 +20,7 @@ export type ArkDialogProps = PropsWithChildren<ArkDialogStyleOptions & {
19
20
  onClose?: (event: CustomEvent<{
20
21
  reason: ArkDialogCloseReason;
21
22
  }>) => void;
22
- }>;
23
+ }>>;
23
24
  export declare const ArkDialog: React.ForwardRefExoticComponent<ArkDialogStyleOptions & {
24
25
  /** Aberto; a saida anima antes de sair do top layer. */
25
26
  open?: boolean;
@@ -38,6 +39,6 @@ export declare const ArkDialog: React.ForwardRefExoticComponent<ArkDialogStyleOp
38
39
  onClose?: (event: CustomEvent<{
39
40
  reason: ArkDialogCloseReason;
40
41
  }>) => void;
41
- } & {
42
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "aria-label" | "label" | "open" | "noScrollLock" | "onOpen" | "onClose" | keyof ArkDialogStyleOptions | "noCloseButton" | "persistent"> & {
42
43
  children?: React.ReactNode | undefined;
43
44
  } & React.RefAttributes<ArkDialogElement>>;
@@ -2,7 +2,8 @@ import type { ArkDrawerCloseReason, ArkDrawerStyleOptions } from "@tooark/core";
2
2
  import type { ArkDrawer as ArkDrawerElement } from "@tooark/web-components";
3
3
  import type React from "react";
4
4
  import { type PropsWithChildren } from "react";
5
- export type ArkDrawerProps = PropsWithChildren<ArkDrawerStyleOptions & {
5
+ import type { ArkDomProps } from "./dom-props.js";
6
+ export type ArkDrawerProps = PropsWithChildren<ArkDomProps<ArkDrawerStyleOptions & {
6
7
  /** Aberta; a saida anima antes de esconder. */
7
8
  open?: boolean;
8
9
  /** Titulo (h2) e nome acessivel. Sem ele, passe aria-label. */
@@ -20,7 +21,7 @@ export type ArkDrawerProps = PropsWithChildren<ArkDrawerStyleOptions & {
20
21
  onClose?: (event: CustomEvent<{
21
22
  reason: ArkDrawerCloseReason;
22
23
  }>) => void;
23
- }>;
24
+ }>>;
24
25
  export declare const ArkDrawer: React.ForwardRefExoticComponent<ArkDrawerStyleOptions & {
25
26
  /** Aberta; a saida anima antes de esconder. */
26
27
  open?: boolean;
@@ -39,6 +40,6 @@ export declare const ArkDrawer: React.ForwardRefExoticComponent<ArkDrawerStyleOp
39
40
  onClose?: (event: CustomEvent<{
40
41
  reason: ArkDrawerCloseReason;
41
42
  }>) => void;
42
- } & {
43
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "aria-label" | "label" | "open" | "noScrollLock" | "onOpen" | "onClose" | "noCloseButton" | "persistent" | keyof ArkDrawerStyleOptions> & {
43
44
  children?: React.ReactNode | undefined;
44
45
  } & React.RefAttributes<ArkDrawerElement>>;
@@ -1,19 +1,20 @@
1
1
  import type { ArkEmptyStyleOptions } from "@tooark/core";
2
2
  import type { ArkEmpty as ArkEmptyElement } from "@tooark/web-components";
3
3
  import React, { type PropsWithChildren } from "react";
4
- export type ArkEmptyProps = PropsWithChildren<ArkEmptyStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkEmptyProps = PropsWithChildren<ArkDomProps<ArkEmptyStyleOptions & {
5
6
  /** Titulo (h3). */
6
7
  heading?: string;
7
8
  /** Texto abaixo do titulo. */
8
9
  description?: string;
9
10
  className?: string;
10
- }>;
11
+ }>>;
11
12
  export declare const ArkEmpty: React.ForwardRefExoticComponent<ArkEmptyStyleOptions & {
12
13
  /** Titulo (h3). */
13
14
  heading?: string;
14
15
  /** Texto abaixo do titulo. */
15
16
  description?: string;
16
17
  className?: string;
17
- } & {
18
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "heading" | keyof ArkEmptyStyleOptions | "description"> & {
18
19
  children?: React.ReactNode | undefined;
19
20
  } & React.RefAttributes<ArkEmptyElement>>;
@@ -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;
@@ -16,7 +17,7 @@ export type ArkRadioProps = PropsWithChildren<ArkRadioStyleOptions & {
16
17
  onChange?: (event: CustomEvent<{
17
18
  value: string;
18
19
  }>) => void;
19
- }>;
20
+ }>>;
20
21
  export declare const ArkRadio: React.ForwardRefExoticComponent<ArkRadioStyleOptions & {
21
22
  disabled?: boolean;
22
23
  /** Nome do grupo: agrupa no formulario e para setas/roving tabindex. */
@@ -32,6 +33,6 @@ export declare const ArkRadio: React.ForwardRefExoticComponent<ArkRadioStyleOpti
32
33
  onChange?: (event: CustomEvent<{
33
34
  value: string;
34
35
  }>) => void;
35
- } & {
36
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "onChange" | "label" | "name" | "disabled" | "value" | "helper" | keyof ArkRadioStyleOptions> & {
36
37
  children?: React.ReactNode | undefined;
37
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>>;
@@ -1,19 +1,20 @@
1
1
  import type { ArkTooltipStyleOptions } from "@tooark/core";
2
2
  import type { ArkTooltip as ArkTooltipElement } from "@tooark/web-components";
3
3
  import React, { type PropsWithChildren } from "react";
4
- export type ArkTooltipProps = PropsWithChildren<ArkTooltipStyleOptions & {
4
+ import type { ArkDomProps } from "./dom-props.js";
5
+ export type ArkTooltipProps = PropsWithChildren<ArkDomProps<ArkTooltipStyleOptions & {
5
6
  /** Texto do balao; para conteudo rico, passe um filho com slot="content". */
6
7
  content?: string;
7
8
  /** Aberto; refletido do estado do balao. */
8
9
  open?: boolean;
9
10
  className?: string;
10
- }>;
11
+ }>>;
11
12
  export declare const ArkTooltip: React.ForwardRefExoticComponent<ArkTooltipStyleOptions & {
12
13
  /** Texto do balao; para conteudo rico, passe um filho com slot="content". */
13
14
  content?: string;
14
15
  /** Aberto; refletido do estado do balao. */
15
16
  open?: boolean;
16
17
  className?: string;
17
- } & {
18
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "content" | "open" | keyof ArkTooltipStyleOptions> & {
18
19
  children?: React.ReactNode | undefined;
19
20
  } & React.RefAttributes<ArkTooltipElement>>;
@@ -0,0 +1,8 @@
1
+ import type React from "react";
2
+ /**
3
+ * Props de um wrapper somadas aos atributos e handlers DOM do React (`id`, `style`, `title`, `tabIndex`, `aria-*`,
4
+ * `onClick`, `onKeyDown`...), que o wrapper repassa ao elemento `ark-*`. O que o wrapper define vale sobre o homônimo
5
+ * do React: `className`, e um `onChange` que recebe o `CustomEvent` do elemento em vez do `FormEvent`. `children` fica
6
+ * de fora: só os wrappers de elementos com conteúdo o declaram.
7
+ */
8
+ export type ArkDomProps<Props> = Props & Omit<React.HTMLAttributes<HTMLElement>, keyof Props | "children">;
@@ -0,0 +1 @@
1
+ export {};
@@ -191,6 +191,7 @@ interface ArkIntrinsicElements {
191
191
  "ark-clock": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
192
192
  testid?: string;
193
193
  lang?: ArkDatepickerLang;
194
+ "locale-json"?: string;
194
195
  theme?: ArkTheme;
195
196
  intent?: ArkIntent;
196
197
  value?: string;
@@ -425,6 +426,7 @@ interface ArkIntrinsicElements {
425
426
  testid?: string;
426
427
  accept?: string;
427
428
  multiple?: boolean;
429
+ directory?: boolean;
428
430
  label?: string;
429
431
  helper?: string;
430
432
  "error-message"?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tooark/react",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Tooark React — typed wrappers for ark-* components for React 18 and 19",
5
5
  "keywords": [
6
6
  "tooark",
@@ -61,11 +61,11 @@
61
61
  "react-dom": ">=18"
62
62
  },
63
63
  "dependencies": {
64
- "@tooark/core": "^1.4.0",
65
- "@tooark/web-components": "^1.4.0"
64
+ "@tooark/core": "^1.5.0",
65
+ "@tooark/web-components": "^1.5.0"
66
66
  },
67
67
  "scripts": {
68
- "build": "tsc -p tsconfig.json && node postbuild.mjs",
68
+ "build": "tsc -p tsconfig.json && tsc -p tsconfig.typecheck.json && node postbuild.mjs",
69
69
  "clean": "rimraf dist"
70
70
  }
71
71
  }