@tooark/react 1.7.0 → 1.9.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 (98) hide show
  1. package/README.md +2 -2
  2. package/README.pt-BR.md +2 -2
  3. package/dist/ark-alert.d.ts +1 -1
  4. package/dist/ark-alert.js +2 -1
  5. package/dist/ark-avatar.d.ts +1 -1
  6. package/dist/ark-avatar.js +2 -1
  7. package/dist/ark-badge.d.ts +1 -1
  8. package/dist/ark-badge.js +2 -1
  9. package/dist/ark-button.d.ts +25 -4
  10. package/dist/ark-button.js +17 -1
  11. package/dist/ark-calendar.d.ts +1 -1
  12. package/dist/ark-calendar.js +2 -1
  13. package/dist/ark-card.d.ts +1 -1
  14. package/dist/ark-card.js +2 -1
  15. package/dist/ark-carousel.d.ts +1 -1
  16. package/dist/ark-carousel.js +2 -1
  17. package/dist/ark-checkbox.d.ts +1 -1
  18. package/dist/ark-checkbox.js +2 -1
  19. package/dist/ark-clock.d.ts +1 -1
  20. package/dist/ark-clock.js +2 -1
  21. package/dist/ark-color-swatches.d.ts +1 -1
  22. package/dist/ark-color-swatches.js +2 -1
  23. package/dist/ark-command-palette.d.ts +3 -3
  24. package/dist/ark-command-palette.js +3 -2
  25. package/dist/ark-copy-button.d.ts +1 -1
  26. package/dist/ark-copy-button.js +2 -1
  27. package/dist/ark-data-view.d.ts +1 -1
  28. package/dist/ark-data-view.js +2 -1
  29. package/dist/ark-datepicker.d.ts +1 -1
  30. package/dist/ark-datepicker.js +2 -1
  31. package/dist/ark-dialog.d.ts +1 -1
  32. package/dist/ark-dialog.js +2 -1
  33. package/dist/ark-drawer.d.ts +1 -1
  34. package/dist/ark-drawer.js +2 -1
  35. package/dist/ark-empty.d.ts +1 -1
  36. package/dist/ark-empty.js +2 -1
  37. package/dist/ark-file-input.d.ts +2 -2
  38. package/dist/ark-file-input.js +2 -1
  39. package/dist/ark-input.d.ts +6 -2
  40. package/dist/ark-input.js +2 -1
  41. package/dist/ark-kbd.d.ts +1 -1
  42. package/dist/ark-kbd.js +2 -1
  43. package/dist/ark-kv-editor.d.ts +1 -1
  44. package/dist/ark-kv-editor.js +2 -1
  45. package/dist/ark-mark.d.ts +1 -1
  46. package/dist/ark-mark.js +2 -1
  47. package/dist/ark-menu.d.ts +1 -1
  48. package/dist/ark-menu.js +4 -3
  49. package/dist/ark-nav.d.ts +1 -1
  50. package/dist/ark-nav.js +4 -3
  51. package/dist/ark-pagination.d.ts +2 -2
  52. package/dist/ark-pagination.js +2 -1
  53. package/dist/ark-progress.d.ts +1 -1
  54. package/dist/ark-progress.js +2 -1
  55. package/dist/ark-radio.d.ts +52 -3
  56. package/dist/ark-radio.js +31 -1
  57. package/dist/ark-scheduler.d.ts +1 -1
  58. package/dist/ark-scheduler.js +2 -1
  59. package/dist/ark-select.d.ts +1 -1
  60. package/dist/ark-select.js +2 -1
  61. package/dist/ark-shape-picker.d.ts +1 -1
  62. package/dist/ark-shape-picker.js +2 -1
  63. package/dist/ark-skeleton.d.ts +1 -1
  64. package/dist/ark-skeleton.js +2 -1
  65. package/dist/ark-spinner.d.ts +1 -1
  66. package/dist/ark-spinner.js +2 -1
  67. package/dist/ark-split-pane.d.ts +1 -1
  68. package/dist/ark-split-pane.js +2 -1
  69. package/dist/ark-status-dot.d.ts +1 -1
  70. package/dist/ark-status-dot.js +2 -1
  71. package/dist/ark-switch.d.ts +1 -1
  72. package/dist/ark-switch.js +2 -1
  73. package/dist/ark-tabs.d.ts +1 -1
  74. package/dist/ark-tabs.js +3 -2
  75. package/dist/ark-textarea.d.ts +1 -1
  76. package/dist/ark-textarea.js +2 -1
  77. package/dist/ark-time.d.ts +1 -1
  78. package/dist/ark-time.js +2 -1
  79. package/dist/ark-toaster.d.ts +1 -1
  80. package/dist/ark-toaster.js +2 -1
  81. package/dist/ark-toggle.d.ts +1 -1
  82. package/dist/ark-toggle.js +3 -2
  83. package/dist/ark-tooltip.d.ts +1 -1
  84. package/dist/ark-tooltip.js +2 -1
  85. package/dist/ark-tree.d.ts +2 -2
  86. package/dist/ark-tree.js +5 -3
  87. package/dist/chart.d.ts +1 -1
  88. package/dist/chart.js +2 -1
  89. package/dist/code.d.ts +1 -1
  90. package/dist/code.js +2 -1
  91. package/dist/dom-props.d.ts +6 -0
  92. package/dist/dom-props.js +13 -1
  93. package/dist/index.d.ts +4 -4
  94. package/dist/index.js +2 -2
  95. package/dist/jsx-intrinsics.d.ts +36 -0
  96. package/dist/wysiwyg.d.ts +2 -2
  97. package/dist/wysiwyg.js +3 -2
  98. package/package.json +6 -6
package/dist/ark-time.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { createElement, forwardRef, useEffect } from "react";
2
+ import { domAttrs } from "./dom-props.js";
2
3
  import { ensureTooarkComponentsRegistered } from "./register.js";
3
4
  /** `Date` e número viram ISO: o atributo é texto. */
4
5
  function isoOf(value) {
@@ -13,7 +14,7 @@ export const ArkTime = forwardRef(function ArkTime(props, forwardedRef) {
13
14
  ensureTooarkComponentsRegistered();
14
15
  }, []);
15
16
  const attrs = {
16
- ...rest,
17
+ ...domAttrs(rest),
17
18
  ref: forwardedRef,
18
19
  class: className,
19
20
  datetime: isoOf(datetime)
@@ -1,7 +1,7 @@
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
- import type { ArkDomProps } from "./dom-props.js";
4
+ import { type ArkDomProps } from "./dom-props.js";
5
5
  export type ArkToasterProps = ArkDomProps<ArkToasterStyleOptions & {
6
6
  className?: string;
7
7
  /** Botão de ação de um toast: detail traz o id do toast e o actionId das opções. */
@@ -1,4 +1,5 @@
1
1
  import { createElement, forwardRef, useEffect } from "react";
2
+ import { domAttrs } from "./dom-props.js";
2
3
  import { ensureTooarkComponentsRegistered } from "./register.js";
3
4
  import { useForwardedRef } from "./use-forwarded-ref.js";
4
5
  export const ArkToaster = forwardRef(function ArkToaster(props, forwardedRef) {
@@ -17,7 +18,7 @@ export const ArkToaster = forwardRef(function ArkToaster(props, forwardedRef) {
17
18
  }, [ref, onAction]);
18
19
  // O rest leva theme, duration, lang, testid e o que mais vier (data-*, aria-*) ao elemento.
19
20
  const attrs = {
20
- ...rest,
21
+ ...domAttrs(rest),
21
22
  ref: setRef,
22
23
  position,
23
24
  "max-visible": maxVisible,
@@ -1,7 +1,7 @@
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
- import type { ArkDomProps } from "./dom-props.js";
4
+ import { type ArkDomProps } from "./dom-props.js";
5
5
  export type ArkToggleProps = PropsWithChildren<ArkDomProps<ArkToggleStyleOptions & {
6
6
  disabled?: boolean;
7
7
  className?: string;
@@ -1,4 +1,5 @@
1
1
  import { createElement, forwardRef, useEffect } from "react";
2
+ import { domAttrs } from "./dom-props.js";
2
3
  import { ensureTooarkComponentsRegistered } from "./register.js";
3
4
  import { useForwardedRef } from "./use-forwarded-ref.js";
4
5
  export const ArkToggle = forwardRef(function ArkToggle(props, forwardedRef) {
@@ -16,7 +17,7 @@ export const ArkToggle = forwardRef(function ArkToggle(props, forwardedRef) {
16
17
  return () => el.removeEventListener("change", handler);
17
18
  }, [ref, onChange]);
18
19
  const attrs = {
19
- ...rest,
20
+ ...domAttrs(rest),
20
21
  ref: setRef,
21
22
  class: className,
22
23
  pressed: pressed ? "" : undefined,
@@ -39,7 +40,7 @@ export const ArkToggleGroup = forwardRef(function ArkToggleGroup(props, forwarde
39
40
  return () => el.removeEventListener("change", handler);
40
41
  }, [ref, onChange]);
41
42
  const attrs = {
42
- ...rest,
43
+ ...domAttrs(rest),
43
44
  ref: setRef,
44
45
  class: className,
45
46
  multiple: multiple ? "" : undefined,
@@ -1,7 +1,7 @@
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
- import type { ArkDomProps } from "./dom-props.js";
4
+ import { type ArkDomProps } from "./dom-props.js";
5
5
  export type ArkTooltipProps = PropsWithChildren<ArkDomProps<ArkTooltipStyleOptions & {
6
6
  /** Texto do balão; para conteúdo rico, passe um filho com slot="content". */
7
7
  content?: string;
@@ -1,4 +1,5 @@
1
1
  import { createElement, forwardRef, useEffect } from "react";
2
+ import { domAttrs } from "./dom-props.js";
2
3
  import { ensureTooarkComponentsRegistered } from "./register.js";
3
4
  export const ArkTooltip = forwardRef(function ArkTooltip(props, forwardedRef) {
4
5
  const { children, className, open, delay, ...rest } = props;
@@ -6,7 +7,7 @@ export const ArkTooltip = forwardRef(function ArkTooltip(props, forwardedRef) {
6
7
  ensureTooarkComponentsRegistered();
7
8
  }, []);
8
9
  const attrs = {
9
- ...rest,
10
+ ...domAttrs(rest),
10
11
  ref: forwardedRef,
11
12
  class: className,
12
13
  open: open ? "" : undefined,
@@ -1,7 +1,7 @@
1
1
  import type { ArkTreeItemStyleOptions, ArkTreeSelection, ArkTreeStyleOptions } from "@tooark/core";
2
2
  import type { ArkTree as ArkTreeElement, ArkTreeItem as ArkTreeItemElement } from "@tooark/web-components";
3
3
  import React, { type PropsWithChildren } from "react";
4
- import type { ArkDomProps } from "./dom-props.js";
4
+ import { type ArkDomProps } from "./dom-props.js";
5
5
  /** `detail` do `ark-toggle`: o item expandido ou recolhido. */
6
6
  export type ArkTreeToggleDetail = {
7
7
  value: string;
@@ -81,6 +81,6 @@ export declare const ArkTreeItem: React.ForwardRefExoticComponent<ArkTreeItemSty
81
81
  checked?: boolean | "mixed";
82
82
  disabled?: boolean;
83
83
  className?: string;
84
- } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "testid" | "label" | "loading" | "disabled" | "value" | "checked" | "selected" | "expanded" | "lazy"> & {
84
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "label" | "loading" | "disabled" | "value" | "checked" | "selected" | keyof ArkTreeItemStyleOptions | "expanded" | "lazy"> & {
85
85
  children?: React.ReactNode | undefined;
86
86
  } & React.RefAttributes<ArkTreeItemElement>>;
package/dist/ark-tree.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import { createElement, forwardRef, useEffect } from "react";
2
+ import { domAttrs } from "./dom-props.js";
2
3
  import { ensureTooarkComponentsRegistered } from "./register.js";
3
4
  import { useForwardedRef } from "./use-forwarded-ref.js";
4
5
  import { useIsomorphicLayoutEffect } from "./use-isomorphic-layout-effect.js";
5
6
  export const ArkTree = forwardRef(function ArkTree(props, forwardedRef) {
6
- const { children, className, checkboxes, propagate, value, onToggle, onSelectionChange, onActivate, ...rest } = props;
7
+ const { children, className, checkboxes, propagate, value, iconColor, onToggle, onSelectionChange, onActivate, ...rest } = props;
7
8
  const [ref, setRef] = useForwardedRef(forwardedRef);
8
9
  useEffect(() => {
9
10
  ensureTooarkComponentsRegistered();
@@ -25,11 +26,12 @@ export const ArkTree = forwardRef(function ArkTree(props, forwardedRef) {
25
26
  };
26
27
  }, [ref, onToggle, onSelectionChange, onActivate]);
27
28
  const attrs = {
28
- ...rest,
29
+ ...domAttrs(rest),
29
30
  ref: setRef,
30
31
  class: className,
31
32
  checkboxes: checkboxes ? "" : undefined,
32
33
  propagate: propagate ? "" : undefined,
34
+ "icon-color": iconColor || undefined,
33
35
  value: Array.isArray(value) ? (value.length ? JSON.stringify(value) : undefined) : value || undefined
34
36
  };
35
37
  return createElement("ark-tree", attrs, children);
@@ -40,7 +42,7 @@ export const ArkTreeItem = forwardRef(function ArkTreeItem(props, forwardedRef)
40
42
  ensureTooarkComponentsRegistered();
41
43
  }, []);
42
44
  const attrs = {
43
- ...rest,
45
+ ...domAttrs(rest),
44
46
  ref: forwardedRef,
45
47
  class: className,
46
48
  expanded: expanded ? "" : undefined,
package/dist/chart.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type ArkChart as ArkChartElement, type EChartsOption } from "@tooark/chart";
2
2
  import type React from "react";
3
- import type { ArkDomProps } from "./dom-props.js";
3
+ import { type ArkDomProps } from "./dom-props.js";
4
4
  /** Atributos da tag `ark-chart`, os mesmos da entrada principal, mais as propriedades JS. */
5
5
  type ArkChartTagProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
6
6
  testid?: string;
package/dist/chart.js CHANGED
@@ -2,6 +2,7 @@
2
2
  // @tooark/chart) só entre no app que importa este caminho. Também tipa a tag crua <ark-chart> com as propriedades JS.
3
3
  import { registerTooarkChart } from "@tooark/chart";
4
4
  import { createElement, forwardRef, useEffect } from "react";
5
+ import { domAttrs } from "./dom-props.js";
5
6
  import { useForwardedRef } from "./use-forwarded-ref.js";
6
7
  import { useIsomorphicLayoutEffect } from "./use-isomorphic-layout-effect.js";
7
8
  export const ArkChart = forwardRef(function ArkChart(props, forwardedRef) {
@@ -26,7 +27,7 @@ export const ArkChart = forwardRef(function ArkChart(props, forwardedRef) {
26
27
  return () => el.removeEventListener("ark-chart-click", handle);
27
28
  }, [ref, onChartClick]);
28
29
  const attrs = {
29
- ...rest,
30
+ ...domAttrs(rest),
30
31
  ref: setRef,
31
32
  class: className,
32
33
  "auto-resize": autoResize === false ? "false" : undefined
package/dist/code.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { type ArkCodeCompletion, type ArkCodeCompletionSource, type ArkCodeEditor as ArkCodeEditorElement, type ArkCodeExtension, type ArkCodeFormatter, type ArkCodeIndentStyle, type ArkCodeLanguage, type ArkCodeLineEnding, type ArkCodeVariable } from "@tooark/code";
2
2
  import type { ArkSize } from "@tooark/core";
3
3
  import type React from "react";
4
- import type { ArkDomProps } from "./dom-props.js";
4
+ import { type ArkDomProps } from "./dom-props.js";
5
5
  /** Atributos da tag `ark-code-editor`, os mesmos da entrada principal, mais as propriedades JS. */
6
6
  type ArkCodeEditorTagProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
7
7
  testid?: string;
package/dist/code.js CHANGED
@@ -3,6 +3,7 @@
3
3
  // propriedades JS.
4
4
  import { registerTooarkCode } from "@tooark/code";
5
5
  import { createElement, forwardRef, useEffect } from "react";
6
+ import { domAttrs } from "./dom-props.js";
6
7
  import { useForwardedRef } from "./use-forwarded-ref.js";
7
8
  import { useIsomorphicLayoutEffect } from "./use-isomorphic-layout-effect.js";
8
9
  /** Propriedades JS do editor, atribuídas pela ref e só quando a referência muda. */
@@ -56,7 +57,7 @@ export const ArkCodeEditor = forwardRef(function ArkCodeEditor(props, forwardedR
56
57
  }, [ref, onChange, onSubmit, onFormatError]);
57
58
  const off = (on) => (on === false ? "false" : undefined);
58
59
  const attrs = {
59
- ...rest,
60
+ ...domAttrs(rest),
60
61
  ref: setRef,
61
62
  class: className,
62
63
  readonly: readonly ? "" : undefined,
@@ -6,3 +6,9 @@ import type React from "react";
6
6
  * de fora: só os wrappers de elementos com conteúdo o declaram.
7
7
  */
8
8
  export type ArkDomProps<Props> = Props & Omit<React.HTMLAttributes<HTMLElement>, keyof Props | "children">;
9
+ /**
10
+ * O `rest` de um wrapper pronto para o elemento, com os `aria-*` booleanos convertidos em texto. Num custom element
11
+ * o React 19 grava `true` como atributo vazio (`aria-pressed=""`, valor inválido em ARIA), enquanto num elemento
12
+ * nativo grava `"true"`; os tipos do React aceitam o booleano nos dois, então o wrapper iguala o resultado.
13
+ */
14
+ export declare function domAttrs(rest: object): Record<string, unknown>;
package/dist/dom-props.js CHANGED
@@ -1 +1,13 @@
1
- export {};
1
+ /**
2
+ * O `rest` de um wrapper pronto para o elemento, com os `aria-*` booleanos convertidos em texto. Num custom element
3
+ * o React 19 grava `true` como atributo vazio (`aria-pressed=""`, valor inválido em ARIA), enquanto num elemento
4
+ * nativo grava `"true"`; os tipos do React aceitam o booleano nos dois, então o wrapper iguala o resultado.
5
+ */
6
+ export function domAttrs(rest) {
7
+ const attrs = { ...rest };
8
+ for (const name of Object.keys(attrs)) {
9
+ if (typeof attrs[name] === "boolean" && name.startsWith("aria-"))
10
+ attrs[name] = String(attrs[name]);
11
+ }
12
+ return attrs;
13
+ }
package/dist/index.d.ts CHANGED
@@ -6,8 +6,8 @@ export type { ArkAvatarProps } from "./ark-avatar.js";
6
6
  export { ArkAvatar } from "./ark-avatar.js";
7
7
  export type { ArkBadgeProps } from "./ark-badge.js";
8
8
  export { ArkBadge } from "./ark-badge.js";
9
- export type { ArkButtonProps } from "./ark-button.js";
10
- export { ArkButton } from "./ark-button.js";
9
+ export type { ArkButtonGroupProps, ArkButtonProps } from "./ark-button.js";
10
+ export { ArkButton, ArkButtonGroup } from "./ark-button.js";
11
11
  export type { ArkCalendarProps } from "./ark-calendar.js";
12
12
  export { ArkCalendar } from "./ark-calendar.js";
13
13
  export type { ArkCardProps } from "./ark-card.js";
@@ -52,8 +52,8 @@ export type { ArkPaginationProps } from "./ark-pagination.js";
52
52
  export { ArkPagination } from "./ark-pagination.js";
53
53
  export type { ArkProgressProps } from "./ark-progress.js";
54
54
  export { ArkProgress } from "./ark-progress.js";
55
- export type { ArkRadioProps } from "./ark-radio.js";
56
- export { ArkRadio } from "./ark-radio.js";
55
+ export type { ArkRadioGroupProps, ArkRadioProps } from "./ark-radio.js";
56
+ export { ArkRadio, ArkRadioGroup } from "./ark-radio.js";
57
57
  export type { ArkSchedulerProps } from "./ark-scheduler.js";
58
58
  export { ArkScheduler } from "./ark-scheduler.js";
59
59
  export type { ArkSelectProps } from "./ark-select.js";
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ export { dismissToast, getArkLocale, observeArkLocale, setArkLocale, showToast,
2
2
  export { ArkAlert } from "./ark-alert.js";
3
3
  export { ArkAvatar } from "./ark-avatar.js";
4
4
  export { ArkBadge } from "./ark-badge.js";
5
- export { ArkButton } from "./ark-button.js";
5
+ export { ArkButton, ArkButtonGroup } from "./ark-button.js";
6
6
  export { ArkCalendar } from "./ark-calendar.js";
7
7
  export { ArkCard } from "./ark-card.js";
8
8
  export { ArkCarousel } from "./ark-carousel.js";
@@ -25,7 +25,7 @@ export { ArkMenu, ArkMenuGroup, ArkMenuItem } from "./ark-menu.js";
25
25
  export { ArkNav, ArkNavGroup, ArkNavItem } from "./ark-nav.js";
26
26
  export { ArkPagination } from "./ark-pagination.js";
27
27
  export { ArkProgress } from "./ark-progress.js";
28
- export { ArkRadio } from "./ark-radio.js";
28
+ export { ArkRadio, ArkRadioGroup } from "./ark-radio.js";
29
29
  export { ArkScheduler } from "./ark-scheduler.js";
30
30
  export { ArkSelect } from "./ark-select.js";
31
31
  export { ArkShapePicker } from "./ark-shape-picker.js";
@@ -25,6 +25,7 @@ import type {
25
25
  ArkNavCollapsible,
26
26
  ArkNavSide,
27
27
  ArkNavVariant,
28
+ ArkOrientation,
28
29
  ArkRounded,
29
30
  ArkSize,
30
31
  ArkTabsFill,
@@ -34,6 +35,8 @@ import type {
34
35
  ArkTimeFormat,
35
36
  ArkToastPosition,
36
37
  ArkTooltipSide,
38
+ ArkTreeIcons,
39
+ ArkTreeItemIcon,
37
40
  ArkTreeSelection
38
41
  } from "@tooark/core";
39
42
  import React from "react";
@@ -73,6 +76,7 @@ interface ArkIntrinsicElements {
73
76
  "ark-button": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
74
77
  testid?: string;
75
78
  type?: ArkButtonType;
79
+ form?: string;
76
80
  disabled?: boolean;
77
81
  variant?: ArkButtonVariant;
78
82
  intent?: ArkIntent;
@@ -114,6 +118,34 @@ interface ArkIntrinsicElements {
114
118
  size?: ArkSize;
115
119
  theme?: ArkTheme;
116
120
  };
121
+ "ark-button-group": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
122
+ testid?: string;
123
+ orientation?: ArkOrientation;
124
+ spaced?: boolean;
125
+ "full-width"?: boolean;
126
+ disabled?: boolean;
127
+ label?: string;
128
+ variant?: ArkButtonVariant;
129
+ intent?: ArkIntent;
130
+ size?: ArkSize;
131
+ rounded?: ArkRounded;
132
+ theme?: ArkTheme;
133
+ };
134
+ "ark-radio-group": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
135
+ testid?: string;
136
+ value?: string;
137
+ name?: string;
138
+ label?: string;
139
+ helper?: string;
140
+ error?: boolean;
141
+ "error-message"?: string;
142
+ orientation?: ArkOrientation;
143
+ required?: boolean;
144
+ disabled?: boolean;
145
+ intent?: ArkIntent;
146
+ size?: ArkSize;
147
+ theme?: ArkTheme;
148
+ };
117
149
  "ark-radio": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
118
150
  testid?: string;
119
151
  checked?: boolean;
@@ -441,6 +473,8 @@ interface ArkIntrinsicElements {
441
473
  propagate?: boolean;
442
474
  value?: string;
443
475
  label?: string;
476
+ icons?: ArkTreeIcons;
477
+ "icon-color"?: string;
444
478
  size?: ArkSize;
445
479
  theme?: ArkTheme;
446
480
  };
@@ -448,6 +482,7 @@ interface ArkIntrinsicElements {
448
482
  testid?: string;
449
483
  value?: string;
450
484
  label?: string;
485
+ icon?: ArkTreeItemIcon;
451
486
  expanded?: boolean;
452
487
  lazy?: boolean;
453
488
  loading?: boolean;
@@ -582,6 +617,7 @@ interface ArkIntrinsicElements {
582
617
  autocomplete?: string;
583
618
  autofocus?: boolean;
584
619
  inputmode?: string;
620
+ list?: string;
585
621
  maxlength?: number | string;
586
622
  minlength?: number | string;
587
623
  pattern?: string;
package/dist/wysiwyg.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { ArkLang } from "@tooark/core";
2
2
  import { type ArkWysiwygContent, type ArkWysiwygEditor as ArkWysiwygEditorElement, type ArkWysiwygUploadError, type ArkWysiwygUploader, type ArkWysiwygViewer as ArkWysiwygViewerElement } from "@tooark/wysiwyg";
3
3
  import type React from "react";
4
- import type { ArkDomProps } from "./dom-props.js";
4
+ import { type ArkDomProps } from "./dom-props.js";
5
5
  /** Atributos da tag `ark-wysiwyg-editor`, os mesmos da entrada principal, mais as propriedades JS. */
6
6
  type ArkWysiwygEditorTagProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
7
7
  testid?: string;
@@ -90,7 +90,7 @@ export declare const ArkWysiwygEditor: React.ForwardRefExoticComponent<{
90
90
  onChange?: (event: CustomEvent<ArkWysiwygContent>) => void;
91
91
  /** Arquivo recusado ou upload que falhou, com o motivo em `detail`. */
92
92
  onUploadError?: (event: CustomEvent<ArkWysiwygUploadError>) => void;
93
- } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "lang" | "content" | "onChange" | "testid" | "theme" | "localeJson" | "toolbar" | "colors" | "placeholder" | "uploadFile" | "editable" | "highlights" | "maxFileSize" | "onUploadError"> & React.RefAttributes<ArkWysiwygEditorElement>>;
93
+ } & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "lang" | "content" | "onChange" | "testid" | "theme" | "localeJson" | "colors" | "placeholder" | "toolbar" | "uploadFile" | "editable" | "highlights" | "maxFileSize" | "onUploadError"> & React.RefAttributes<ArkWysiwygEditorElement>>;
94
94
  export type ArkWysiwygViewerProps = ArkDomProps<{
95
95
  /** Conteúdo como JSON do Tiptap, sanitizado ao entrar. */
96
96
  content?: ArkWysiwygContent | null;
package/dist/wysiwyg.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { registerTooarkWysiwyg } from "@tooark/wysiwyg";
2
2
  import { createElement, forwardRef, useEffect, useRef } from "react";
3
+ import { domAttrs } from "./dom-props.js";
3
4
  import { useForwardedRef } from "./use-forwarded-ref.js";
4
5
  import { useIsomorphicLayoutEffect } from "./use-isomorphic-layout-effect.js";
5
6
  export const ArkWysiwygEditor = forwardRef(function ArkWysiwygEditor(props, forwardedRef) {
@@ -42,7 +43,7 @@ export const ArkWysiwygEditor = forwardRef(function ArkWysiwygEditor(props, forw
42
43
  };
43
44
  }, [ref, onChange, onUploadError]);
44
45
  const attrs = {
45
- ...rest,
46
+ ...domAttrs(rest),
46
47
  ref: setRef,
47
48
  class: className,
48
49
  editable: editable === false ? "false" : undefined,
@@ -64,5 +65,5 @@ export const ArkWysiwygViewer = forwardRef(function ArkWysiwygViewer(props, forw
64
65
  if (el && content !== undefined && el.content !== content)
65
66
  el.content = content;
66
67
  }, [ref, content]);
67
- return createElement("ark-wysiwyg-viewer", { ...rest, ref: setRef, class: className });
68
+ return createElement("ark-wysiwyg-viewer", { ...domAttrs(rest), ref: setRef, class: className });
68
69
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tooark/react",
3
- "version": "1.7.0",
3
+ "version": "1.9.0",
4
4
  "description": "Tooark React — typed wrappers for ark-* components for React 18 and 19",
5
5
  "keywords": [
6
6
  "tooark",
@@ -100,13 +100,13 @@
100
100
  }
101
101
  },
102
102
  "dependencies": {
103
- "@tooark/core": "^1.7.0",
104
- "@tooark/web-components": "^1.7.0"
103
+ "@tooark/core": "^1.9.0",
104
+ "@tooark/web-components": "^1.9.0"
105
105
  },
106
106
  "devDependencies": {
107
- "@tooark/chart": "^1.7.0",
108
- "@tooark/code": "^1.7.0",
109
- "@tooark/wysiwyg": "^1.7.0"
107
+ "@tooark/chart": "^1.9.0",
108
+ "@tooark/code": "^1.9.0",
109
+ "@tooark/wysiwyg": "^1.9.0"
110
110
  },
111
111
  "scripts": {
112
112
  "build": "tsc -p tsconfig.json && tsc -p tsconfig.typecheck.json && node postbuild.mjs",