@tooark/react 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/README.pt-BR.md +2 -2
- package/dist/ark-alert.d.ts +1 -1
- package/dist/ark-alert.js +2 -1
- package/dist/ark-avatar.d.ts +1 -1
- package/dist/ark-avatar.js +2 -1
- package/dist/ark-badge.d.ts +1 -1
- package/dist/ark-badge.js +2 -1
- package/dist/ark-button.d.ts +6 -2
- package/dist/ark-button.js +2 -1
- package/dist/ark-calendar.d.ts +1 -1
- package/dist/ark-calendar.js +2 -1
- package/dist/ark-card.d.ts +1 -1
- package/dist/ark-card.js +2 -1
- package/dist/ark-carousel.d.ts +1 -1
- package/dist/ark-carousel.js +2 -1
- package/dist/ark-checkbox.d.ts +1 -1
- package/dist/ark-checkbox.js +2 -1
- package/dist/ark-clock.d.ts +1 -1
- package/dist/ark-clock.js +2 -1
- package/dist/ark-color-swatches.d.ts +1 -1
- package/dist/ark-color-swatches.js +2 -1
- package/dist/ark-command-palette.d.ts +3 -3
- package/dist/ark-command-palette.js +3 -2
- package/dist/ark-copy-button.d.ts +1 -1
- package/dist/ark-copy-button.js +2 -1
- package/dist/ark-data-view.d.ts +1 -1
- package/dist/ark-data-view.js +2 -1
- package/dist/ark-datepicker.d.ts +1 -1
- package/dist/ark-datepicker.js +2 -1
- package/dist/ark-dialog.d.ts +1 -1
- package/dist/ark-dialog.js +2 -1
- package/dist/ark-drawer.d.ts +1 -1
- package/dist/ark-drawer.js +2 -1
- package/dist/ark-empty.d.ts +1 -1
- package/dist/ark-empty.js +2 -1
- package/dist/ark-file-input.d.ts +2 -2
- package/dist/ark-file-input.js +2 -1
- package/dist/ark-input.d.ts +6 -2
- package/dist/ark-input.js +2 -1
- package/dist/ark-kbd.d.ts +1 -1
- package/dist/ark-kbd.js +2 -1
- package/dist/ark-kv-editor.d.ts +1 -1
- package/dist/ark-kv-editor.js +2 -1
- package/dist/ark-mark.d.ts +1 -1
- package/dist/ark-mark.js +2 -1
- package/dist/ark-menu.d.ts +1 -1
- package/dist/ark-menu.js +4 -3
- package/dist/ark-nav.d.ts +1 -1
- package/dist/ark-nav.js +4 -3
- package/dist/ark-pagination.d.ts +2 -2
- package/dist/ark-pagination.js +2 -1
- package/dist/ark-progress.d.ts +1 -1
- package/dist/ark-progress.js +2 -1
- package/dist/ark-radio.d.ts +1 -1
- package/dist/ark-radio.js +2 -1
- package/dist/ark-scheduler.d.ts +1 -1
- package/dist/ark-scheduler.js +2 -1
- package/dist/ark-select.d.ts +1 -1
- package/dist/ark-select.js +2 -1
- package/dist/ark-shape-picker.d.ts +1 -1
- package/dist/ark-shape-picker.js +2 -1
- package/dist/ark-skeleton.d.ts +1 -1
- package/dist/ark-skeleton.js +2 -1
- package/dist/ark-spinner.d.ts +1 -1
- package/dist/ark-spinner.js +2 -1
- package/dist/ark-split-pane.d.ts +1 -1
- package/dist/ark-split-pane.js +2 -1
- package/dist/ark-status-dot.d.ts +1 -1
- package/dist/ark-status-dot.js +2 -1
- package/dist/ark-switch.d.ts +1 -1
- package/dist/ark-switch.js +2 -1
- package/dist/ark-tabs.d.ts +1 -1
- package/dist/ark-tabs.js +3 -2
- package/dist/ark-textarea.d.ts +1 -1
- package/dist/ark-textarea.js +2 -1
- package/dist/ark-time.d.ts +1 -1
- package/dist/ark-time.js +2 -1
- package/dist/ark-toaster.d.ts +1 -1
- package/dist/ark-toaster.js +2 -1
- package/dist/ark-toggle.d.ts +1 -1
- package/dist/ark-toggle.js +3 -2
- package/dist/ark-tooltip.d.ts +1 -1
- package/dist/ark-tooltip.js +2 -1
- package/dist/ark-tree.d.ts +2 -2
- package/dist/ark-tree.js +5 -3
- package/dist/chart.d.ts +1 -1
- package/dist/chart.js +2 -1
- package/dist/code.d.ts +1 -1
- package/dist/code.js +2 -1
- package/dist/dom-props.d.ts +6 -0
- package/dist/dom-props.js +13 -1
- package/dist/jsx-intrinsics.d.ts +7 -0
- package/dist/wysiwyg.d.ts +2 -2
- package/dist/wysiwyg.js +3 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -171,8 +171,8 @@ Installed automatically unless marked as peer; peer dependencies are yours to in
|
|
|
171
171
|
|
|
172
172
|
| Package | Version | Description |
|
|
173
173
|
| -------------------------------------------------------------------------------- | ----------------------- | ---------------------------------------------------------------- |
|
|
174
|
-
| [`@tooark/core`](https://www.npmjs.com/package/@tooark/core) | ^1.
|
|
175
|
-
| [`@tooark/web-components`](https://www.npmjs.com/package/@tooark/web-components) | ^1.
|
|
174
|
+
| [`@tooark/core`](https://www.npmjs.com/package/@tooark/core) | ^1.8.0 | Types, i18n, toast/announce services, motion and overlay helpers |
|
|
175
|
+
| [`@tooark/web-components`](https://www.npmjs.com/package/@tooark/web-components) | ^1.8.0 | The `ark-*` Custom Elements and their stylesheet |
|
|
176
176
|
| [`react`](https://www.npmjs.com/package/react) | >=18 (peer) | React 18 or 19 |
|
|
177
177
|
| [`react-dom`](https://www.npmjs.com/package/react-dom) | >=18 (peer) | React DOM renderer |
|
|
178
178
|
| [`@tooark/chart`](https://www.npmjs.com/package/@tooark/chart) | >=1.0.0 (optional peer) | ark-chart, for the `/chart` subpath |
|
package/README.pt-BR.md
CHANGED
|
@@ -171,8 +171,8 @@ Instaladas automaticamente, salvo as marcadas como peer, que ficam por sua conta
|
|
|
171
171
|
|
|
172
172
|
| Pacote | Versão | Descrição |
|
|
173
173
|
| -------------------------------------------------------------------------------- | ----------------------- | -------------------------------------------------------------------- |
|
|
174
|
-
| [`@tooark/core`](https://www.npmjs.com/package/@tooark/core) | ^1.
|
|
175
|
-
| [`@tooark/web-components`](https://www.npmjs.com/package/@tooark/web-components) | ^1.
|
|
174
|
+
| [`@tooark/core`](https://www.npmjs.com/package/@tooark/core) | ^1.8.0 | Tipos, i18n, serviços de toast/announce, motion e helpers de overlay |
|
|
175
|
+
| [`@tooark/web-components`](https://www.npmjs.com/package/@tooark/web-components) | ^1.8.0 | Os Custom Elements `ark-*` e a folha de estilo deles |
|
|
176
176
|
| [`react`](https://www.npmjs.com/package/react) | >=18 (peer) | React 18 ou 19 |
|
|
177
177
|
| [`react-dom`](https://www.npmjs.com/package/react-dom) | >=18 (peer) | Renderizador React DOM |
|
|
178
178
|
| [`@tooark/chart`](https://www.npmjs.com/package/@tooark/chart) | >=1.0.0 (peer opcional) | ark-chart, para a subpath `/chart` |
|
package/dist/ark-alert.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import type
|
|
4
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
5
5
|
export type ArkAlertProps = PropsWithChildren<ArkDomProps<ArkAlertStyleOptions & {
|
|
6
6
|
/** Título próprio no início do alerta. */
|
|
7
7
|
heading?: string;
|
package/dist/ark-alert.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
|
import { useForwardedRef } from "./use-forwarded-ref.js";
|
|
4
5
|
export const ArkAlert = forwardRef(function ArkAlert(props, forwardedRef) {
|
|
@@ -16,7 +17,7 @@ export const ArkAlert = forwardRef(function ArkAlert(props, forwardedRef) {
|
|
|
16
17
|
return () => el.removeEventListener("ark-dismiss", handler);
|
|
17
18
|
}, [ref, onDismiss]);
|
|
18
19
|
const attrs = {
|
|
19
|
-
...rest,
|
|
20
|
+
...domAttrs(rest),
|
|
20
21
|
ref: setRef,
|
|
21
22
|
class: className,
|
|
22
23
|
dismissible: dismissible ? "" : undefined,
|
package/dist/ark-avatar.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import type
|
|
4
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
5
5
|
export type ArkAvatarProps = ArkDomProps<ArkAvatarStyleOptions & {
|
|
6
6
|
/** Nome da pessoa: vira aria-label e as iniciais (primeira letra, ou primeira + última com sobrenome). */
|
|
7
7
|
name?: string;
|
package/dist/ark-avatar.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
|
export const ArkAvatar = forwardRef(function ArkAvatar(props, forwardedRef) {
|
|
4
5
|
const { className, ...rest } = props;
|
|
@@ -6,7 +7,7 @@ export const ArkAvatar = forwardRef(function ArkAvatar(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
|
};
|
package/dist/ark-badge.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import type
|
|
4
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
5
5
|
export type ArkBadgeProps = PropsWithChildren<ArkDomProps<ArkBadgeStyleOptions & {
|
|
6
6
|
className?: string;
|
|
7
7
|
}>>;
|
package/dist/ark-badge.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
|
export const ArkBadge = forwardRef(function ArkBadge(props, forwardedRef) {
|
|
4
5
|
const { children, className, ...rest } = props;
|
|
@@ -6,7 +7,7 @@ export const ArkBadge = forwardRef(function ArkBadge(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
|
};
|
package/dist/ark-button.d.ts
CHANGED
|
@@ -2,19 +2,23 @@ import type { ArkButtonNavigateDetail, ArkButtonStyleOptions, ArkButtonType } fr
|
|
|
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
|
|
5
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
6
6
|
/** Props do ArkButton: opções de estilo mais os atributos e handlers DOM do React (onClick, onFocus, id, style...). */
|
|
7
7
|
export type ArkButtonProps = PropsWithChildren<ArkDomProps<ArkButtonStyleOptions & {
|
|
8
8
|
type?: ArkButtonType;
|
|
9
9
|
disabled?: boolean;
|
|
10
|
+
/** Id do formulário a que o botão pertence quando fica fora dele, como no `<button form>` nativo. */
|
|
11
|
+
form?: string;
|
|
10
12
|
/** Clique simples no link (`href`), cancelável: `event.preventDefault()` e o roteamento da SPA. */
|
|
11
13
|
onNavigate?: (event: CustomEvent<ArkButtonNavigateDetail>) => void;
|
|
12
14
|
}>>;
|
|
13
15
|
export declare const ArkButton: React.ForwardRefExoticComponent<ArkButtonStyleOptions & {
|
|
14
16
|
type?: ArkButtonType;
|
|
15
17
|
disabled?: boolean;
|
|
18
|
+
/** Id do formulário a que o botão pertence quando fica fora dele, como no `<button form>` nativo. */
|
|
19
|
+
form?: string;
|
|
16
20
|
/** Clique simples no link (`href`), cancelável: `event.preventDefault()` e o roteamento da SPA. */
|
|
17
21
|
onNavigate?: (event: CustomEvent<ArkButtonNavigateDetail>) => void;
|
|
18
|
-
} & Omit<React.HTMLAttributes<HTMLElement>, "children" | keyof ArkButtonStyleOptions | "type" | "disabled" | "onNavigate"> & {
|
|
22
|
+
} & Omit<React.HTMLAttributes<HTMLElement>, "children" | "form" | keyof ArkButtonStyleOptions | "type" | "disabled" | "onNavigate"> & {
|
|
19
23
|
children?: React.ReactNode | undefined;
|
|
20
24
|
} & React.RefAttributes<ArkButtonElement>>;
|
package/dist/ark-button.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
|
import { useForwardedRef } from "./use-forwarded-ref.js";
|
|
4
5
|
export const ArkButton = forwardRef(function ArkButton(props, forwardedRef) {
|
|
@@ -18,7 +19,7 @@ export const ArkButton = forwardRef(function ArkButton(props, forwardedRef) {
|
|
|
18
19
|
// Handlers (onClick...) seguem no rest: o React os delega a partir da raiz, e o bloqueio
|
|
19
20
|
// de disabled/loading do host (captura + stopImmediatePropagation) impede que disparem.
|
|
20
21
|
const attrs = {
|
|
21
|
-
...rest,
|
|
22
|
+
...domAttrs(rest),
|
|
22
23
|
ref: setRef,
|
|
23
24
|
class: className,
|
|
24
25
|
"text-color": textColor,
|
package/dist/ark-calendar.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import type
|
|
4
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
5
5
|
export type ArkCalendarProps = ArkDomProps<ArkCalendarStyleOptions & {
|
|
6
6
|
lang?: ArkDatepickerLang;
|
|
7
7
|
localeJson?: Partial<ArkLocale>;
|
package/dist/ark-calendar.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef, useCallback, 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 ArkCalendar = forwardRef(function ArkCalendar(props, forwardedRef) {
|
|
@@ -21,7 +22,7 @@ export const ArkCalendar = forwardRef(function ArkCalendar(props, forwardedRef)
|
|
|
21
22
|
}, [ref, handleChange]);
|
|
22
23
|
// O rest leva ao elemento o que o wrapper não mapeia (id, style, data-*, aria-*).
|
|
23
24
|
const attrs = {
|
|
24
|
-
...rest,
|
|
25
|
+
...domAttrs(rest),
|
|
25
26
|
lang,
|
|
26
27
|
theme,
|
|
27
28
|
intent,
|
package/dist/ark-card.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import type
|
|
4
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
5
5
|
export type ArkCardProps = PropsWithChildren<ArkDomProps<ArkCardStyleOptions & {
|
|
6
6
|
/** Título (h2) na linha de cima; com ele o filho slot="header" vira a linha seguinte do cabeçalho. */
|
|
7
7
|
heading?: string;
|
package/dist/ark-card.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
|
export const ArkCard = forwardRef(function ArkCard(props, forwardedRef) {
|
|
4
5
|
const { children, className, headingLevel, wrapActions, ...rest } = props;
|
|
@@ -6,7 +7,7 @@ export const ArkCard = forwardRef(function ArkCard(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
|
"heading-level": headingLevel,
|
package/dist/ark-carousel.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import type
|
|
4
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
5
5
|
export type ArkCarouselProps = PropsWithChildren<ArkDomProps<ArkCarouselStyleOptions & {
|
|
6
6
|
snap?: ArkCarouselSnap;
|
|
7
7
|
onSlideChange?: (detail: {
|
package/dist/ark-carousel.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef, useCallback, 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 ArkCarousel = forwardRef(function ArkCarousel(props, forwardedRef) {
|
|
@@ -21,7 +22,7 @@ export const ArkCarousel = forwardRef(function ArkCarousel(props, forwardedRef)
|
|
|
21
22
|
}, [ref, handleSlideChange]);
|
|
22
23
|
// O rest leva ao elemento o que o wrapper não mapeia (id, style, data-*, aria-*).
|
|
23
24
|
const attrs = {
|
|
24
|
-
...rest,
|
|
25
|
+
...domAttrs(rest),
|
|
25
26
|
theme,
|
|
26
27
|
intent,
|
|
27
28
|
"accent-color": accentColor,
|
package/dist/ark-checkbox.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import type
|
|
4
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
5
5
|
export type ArkCheckboxProps = PropsWithChildren<ArkDomProps<ArkCheckboxStyleOptions & {
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
/** Nome no formulário (submete `value` quando marcado). */
|
package/dist/ark-checkbox.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
|
import { useForwardedRef } from "./use-forwarded-ref.js";
|
|
4
5
|
export const ArkCheckbox = forwardRef(function ArkCheckbox(props, forwardedRef) {
|
|
@@ -16,7 +17,7 @@ export const ArkCheckbox = forwardRef(function ArkCheckbox(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
|
checked: checked ? "" : undefined,
|
package/dist/ark-clock.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import type
|
|
4
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
5
5
|
export type ArkClockProps = ArkDomProps<ArkClockStyleOptions & {
|
|
6
6
|
value?: string;
|
|
7
7
|
lang?: ArkDatepickerLang;
|
package/dist/ark-clock.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
|
import { useForwardedRef } from "./use-forwarded-ref.js";
|
|
4
5
|
export const ArkClock = forwardRef(function ArkClock(props, forwardedRef) {
|
|
@@ -16,7 +17,7 @@ export const ArkClock = forwardRef(function ArkClock(props, forwardedRef) {
|
|
|
16
17
|
return () => el.removeEventListener("ark-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
|
seconds: seconds ? "" : undefined,
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import type
|
|
4
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
5
5
|
export type ArkColorSwatchesProps = ArkDomProps<ArkColorSwatchesStyleOptions & {
|
|
6
6
|
/** Cor selecionada (o value da amostra). */
|
|
7
7
|
value?: 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 ArkColorSwatches = forwardRef(function ArkColorSwatches(props, forwardedRef) {
|
|
@@ -16,7 +17,7 @@ export const ArkColorSwatches = forwardRef(function ArkColorSwatches(props, forw
|
|
|
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
|
colors: colors ? JSON.stringify(colors) : undefined,
|
|
@@ -2,7 +2,7 @@ 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
|
-
import type
|
|
5
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
6
6
|
export type ArkCommandPaletteProps = PropsWithChildren<ArkDomProps<ArkCommandPaletteStyleOptions & {
|
|
7
7
|
/** Aberta; a saída anima antes de sair do top layer. */
|
|
8
8
|
open?: boolean;
|
|
@@ -62,7 +62,7 @@ export declare const ArkCommandPalette: React.ForwardRefExoticComponent<ArkComma
|
|
|
62
62
|
}>) => void;
|
|
63
63
|
onOpen?: (event: CustomEvent) => void;
|
|
64
64
|
onClose?: (event: CustomEvent) => void;
|
|
65
|
-
} & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "aria-label" | "onSelect" | "
|
|
65
|
+
} & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "aria-label" | "onSelect" | "label" | "filter" | keyof ArkCommandPaletteStyleOptions | "open" | "placeholder" | "hotkey" | "queryDelay" | "hint" | "busy" | "noScrollLock" | "onQuery" | "onOpen" | "onClose"> & {
|
|
66
66
|
children?: React.ReactNode | undefined;
|
|
67
67
|
} & React.RefAttributes<ArkCommandPaletteElement>>;
|
|
68
68
|
export type ArkCommandItemProps = PropsWithChildren<ArkDomProps<ArkCommandItemStyleOptions & {
|
|
@@ -82,6 +82,6 @@ export declare const ArkCommandItem: React.ForwardRefExoticComponent<ArkCommandI
|
|
|
82
82
|
label?: string;
|
|
83
83
|
disabled?: boolean;
|
|
84
84
|
className?: string;
|
|
85
|
-
} & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "testid" | "
|
|
85
|
+
} & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "testid" | "label" | "disabled" | "value" | "group"> & {
|
|
86
86
|
children?: React.ReactNode | undefined;
|
|
87
87
|
} & React.RefAttributes<ArkCommandItemElement>>;
|
|
@@ -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
|
import { useIsomorphicLayoutEffect } from "./use-isomorphic-layout-effect.js";
|
|
@@ -28,7 +29,7 @@ export const ArkCommandPalette = forwardRef(function ArkCommandPalette(props, fo
|
|
|
28
29
|
};
|
|
29
30
|
}, [onSelect, onQuery, onOpen, onClose]);
|
|
30
31
|
const attrs = {
|
|
31
|
-
...rest,
|
|
32
|
+
...domAttrs(rest),
|
|
32
33
|
ref: setRef,
|
|
33
34
|
class: className,
|
|
34
35
|
open: open ? "" : undefined,
|
|
@@ -46,7 +47,7 @@ export const ArkCommandItem = forwardRef(function ArkCommandItem(props, forwarde
|
|
|
46
47
|
ensureTooarkComponentsRegistered();
|
|
47
48
|
}, []);
|
|
48
49
|
const attrs = {
|
|
49
|
-
...rest,
|
|
50
|
+
...domAttrs(rest),
|
|
50
51
|
ref: forwardedRef,
|
|
51
52
|
class: className,
|
|
52
53
|
disabled: disabled ? "" : undefined
|
|
@@ -2,7 +2,7 @@ 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
|
-
import type
|
|
5
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
6
6
|
export type ArkCopyButtonProps = PropsWithChildren<ArkDomProps<ArkCopyButtonStyleOptions & {
|
|
7
7
|
/** Texto a copiar. */
|
|
8
8
|
value?: string;
|
package/dist/ark-copy-button.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
|
import { useForwardedRef } from "./use-forwarded-ref.js";
|
|
4
5
|
export const ArkCopyButton = forwardRef(function ArkCopyButton(props, forwardedRef) {
|
|
@@ -16,7 +17,7 @@ export const ArkCopyButton = forwardRef(function ArkCopyButton(props, forwardedR
|
|
|
16
17
|
return () => el.removeEventListener("ark-copy", handler);
|
|
17
18
|
}, [ref, onCopy]);
|
|
18
19
|
const attrs = {
|
|
19
|
-
...rest,
|
|
20
|
+
...domAttrs(rest),
|
|
20
21
|
ref: setRef,
|
|
21
22
|
class: className,
|
|
22
23
|
for: htmlFor,
|
package/dist/ark-data-view.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { ArkDataViewCardContext, ArkDataViewCellContext, ArkDataViewColumn,
|
|
|
2
2
|
import type { ArkDataView as ArkDataViewElement } from "@tooark/web-components";
|
|
3
3
|
import type React from "react";
|
|
4
4
|
import { type PropsWithChildren } from "react";
|
|
5
|
-
import type
|
|
5
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
6
6
|
/**
|
|
7
7
|
* Coluna do ArkDataView: a do elemento, com um `render` que devolve o que um componente React devolveria (JSX, texto,
|
|
8
8
|
* `null` para nada) e que roda de novo a cada render do wrapper, como qualquer filho. Um nó DOM também é aceito.
|
package/dist/ark-data-view.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createElement, Fragment, forwardRef, useEffect, useReducer, useRef } from "react";
|
|
2
2
|
import { createPortal, flushSync } from "react-dom";
|
|
3
|
+
import { domAttrs } from "./dom-props.js";
|
|
3
4
|
import { ensureTooarkComponentsRegistered } from "./register.js";
|
|
4
5
|
import { useForwardedRef } from "./use-forwarded-ref.js";
|
|
5
6
|
import { useIsomorphicLayoutEffect } from "./use-isomorphic-layout-effect.js";
|
|
@@ -153,7 +154,7 @@ const ArkDataViewBase = forwardRef(function ArkDataView(props, forwardedRef) {
|
|
|
153
154
|
};
|
|
154
155
|
}, [ref, onQueryChange, onViewChange, onRowClick, onSelectionChange, onReorder]);
|
|
155
156
|
const attrs = {
|
|
156
|
-
...rest,
|
|
157
|
+
...domAttrs(rest),
|
|
157
158
|
ref: setRef,
|
|
158
159
|
class: className,
|
|
159
160
|
"row-key": rowKey,
|
package/dist/ark-datepicker.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import type
|
|
4
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
5
5
|
export type ArkDatepickerProps = ArkDomProps<ArkDatepickerStyleOptions & {
|
|
6
6
|
lang?: ArkDatepickerLang;
|
|
7
7
|
localeJson?: Partial<ArkLocale>;
|
package/dist/ark-datepicker.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef, useCallback, 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 ArkDatepicker = forwardRef(function ArkDatepicker(props, forwardedRef) {
|
|
@@ -22,7 +23,7 @@ export const ArkDatepicker = forwardRef(function ArkDatepicker(props, forwardedR
|
|
|
22
23
|
}, [ref, handleChange]);
|
|
23
24
|
// O rest leva ao elemento o que o wrapper não mapeia (id, style, data-*, aria-*).
|
|
24
25
|
const attrs = {
|
|
25
|
-
...rest,
|
|
26
|
+
...domAttrs(rest),
|
|
26
27
|
lang,
|
|
27
28
|
theme,
|
|
28
29
|
intent,
|
package/dist/ark-dialog.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import type
|
|
4
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
5
5
|
export type ArkDialogProps = PropsWithChildren<ArkDomProps<ArkDialogStyleOptions & {
|
|
6
6
|
/** Aberto; a saída anima antes de sair do top layer. */
|
|
7
7
|
open?: boolean;
|
package/dist/ark-dialog.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
|
import { useForwardedRef } from "./use-forwarded-ref.js";
|
|
4
5
|
import { useIsomorphicLayoutEffect } from "./use-isomorphic-layout-effect.js";
|
|
@@ -22,7 +23,7 @@ export const ArkDialog = forwardRef(function ArkDialog(props, forwardedRef) {
|
|
|
22
23
|
};
|
|
23
24
|
}, [onOpen, onClose]);
|
|
24
25
|
const attrs = {
|
|
25
|
-
...rest,
|
|
26
|
+
...domAttrs(rest),
|
|
26
27
|
ref: setRef,
|
|
27
28
|
class: className,
|
|
28
29
|
open: open ? "" : undefined,
|
package/dist/ark-drawer.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ 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
|
-
import type
|
|
5
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
6
6
|
export type ArkDrawerProps = PropsWithChildren<ArkDomProps<ArkDrawerStyleOptions & {
|
|
7
7
|
/** Aberta; a saída anima antes de esconder. */
|
|
8
8
|
open?: boolean;
|
package/dist/ark-drawer.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
|
import { useForwardedRef } from "./use-forwarded-ref.js";
|
|
4
5
|
import { useIsomorphicLayoutEffect } from "./use-isomorphic-layout-effect.js";
|
|
@@ -22,7 +23,7 @@ export const ArkDrawer = forwardRef(function ArkDrawer(props, forwardedRef) {
|
|
|
22
23
|
};
|
|
23
24
|
}, [onOpen, onClose]);
|
|
24
25
|
const attrs = {
|
|
25
|
-
...rest,
|
|
26
|
+
...domAttrs(rest),
|
|
26
27
|
ref: setRef,
|
|
27
28
|
class: className,
|
|
28
29
|
open: open ? "" : undefined,
|
package/dist/ark-empty.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import type
|
|
4
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
5
5
|
export type ArkEmptyProps = PropsWithChildren<ArkDomProps<ArkEmptyStyleOptions & {
|
|
6
6
|
/** Título (h3). */
|
|
7
7
|
heading?: string;
|
package/dist/ark-empty.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
|
export const ArkEmpty = forwardRef(function ArkEmpty(props, forwardedRef) {
|
|
4
5
|
const { children, className, headingLevel, ...rest } = props;
|
|
@@ -6,7 +7,7 @@ export const ArkEmpty = forwardRef(function ArkEmpty(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
|
"heading-level": headingLevel
|
package/dist/ark-file-input.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import type
|
|
4
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
5
5
|
export type ArkFileInputProps = ArkDomProps<ArkFileInputStyleOptions & {
|
|
6
6
|
/** Tipos aceitos pelo seletor nativo (accept). */
|
|
7
7
|
accept?: string;
|
|
@@ -51,4 +51,4 @@ export declare const ArkFileInput: React.ForwardRefExoticComponent<ArkFileInputS
|
|
|
51
51
|
files: File[];
|
|
52
52
|
paths?: string[];
|
|
53
53
|
}>) => void;
|
|
54
|
-
} & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "onChange" | "error" | "
|
|
54
|
+
} & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "onChange" | "error" | "label" | "name" | "disabled" | "helper" | keyof ArkFileInputStyleOptions | "accept" | "multiple" | "directory" | "errorMessage" | "required"> & React.RefAttributes<ArkFileInputElement>>;
|
package/dist/ark-file-input.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
|
import { useForwardedRef } from "./use-forwarded-ref.js";
|
|
4
5
|
export const ArkFileInput = forwardRef(function ArkFileInput(props, forwardedRef) {
|
|
@@ -16,7 +17,7 @@ export const ArkFileInput = forwardRef(function ArkFileInput(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
|
multiple: multiple ? "" : undefined,
|
package/dist/ark-input.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import type
|
|
4
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
5
5
|
export type ArkInputProps = PropsWithChildren<ArkDomProps<ArkInputStyleOptions & {
|
|
6
6
|
type?: string;
|
|
7
7
|
label?: string;
|
|
@@ -21,6 +21,8 @@ export type ArkInputProps = PropsWithChildren<ArkDomProps<ArkInputStyleOptions &
|
|
|
21
21
|
autocomplete?: string;
|
|
22
22
|
autofocus?: boolean;
|
|
23
23
|
inputmode?: string;
|
|
24
|
+
/** Id de um `<datalist>` da página com as sugestões do campo. */
|
|
25
|
+
list?: string;
|
|
24
26
|
maxlength?: number;
|
|
25
27
|
minlength?: number;
|
|
26
28
|
pattern?: string;
|
|
@@ -52,6 +54,8 @@ export declare const ArkInput: React.ForwardRefExoticComponent<ArkInputStyleOpti
|
|
|
52
54
|
autocomplete?: string;
|
|
53
55
|
autofocus?: boolean;
|
|
54
56
|
inputmode?: string;
|
|
57
|
+
/** Id de um `<datalist>` da página com as sugestões do campo. */
|
|
58
|
+
list?: string;
|
|
55
59
|
maxlength?: number;
|
|
56
60
|
minlength?: number;
|
|
57
61
|
pattern?: string;
|
|
@@ -63,6 +67,6 @@ export declare const ArkInput: React.ForwardRefExoticComponent<ArkInputStyleOpti
|
|
|
63
67
|
className?: string;
|
|
64
68
|
onInput?: (event: Event) => void;
|
|
65
69
|
onChange?: (event: Event) => void;
|
|
66
|
-
} & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "lang" | "aria-label" | "onChange" | "onInput" | "localeJson" | "error" | "
|
|
70
|
+
} & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className" | "lang" | "aria-label" | "onChange" | "onInput" | "localeJson" | "error" | "label" | "pattern" | "name" | "type" | "disabled" | "value" | "min" | "max" | "list" | "helper" | "placeholder" | "errorMessage" | "required" | keyof ArkInputStyleOptions | "readonly" | "reveal" | "autocomplete" | "autofocus" | "inputmode" | "maxlength" | "minlength" | "step" | "spellcheck"> & {
|
|
67
71
|
children?: React.ReactNode | undefined;
|
|
68
72
|
} & React.RefAttributes<ArkInputElement>>;
|
package/dist/ark-input.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
|
import { useForwardedRef } from "./use-forwarded-ref.js";
|
|
4
5
|
// Atributo do custom element: string ou ausente.
|
|
@@ -25,7 +26,7 @@ export const ArkInput = forwardRef(function ArkInput(props, forwardedRef) {
|
|
|
25
26
|
};
|
|
26
27
|
}, [ref, onInput, onChange]);
|
|
27
28
|
const attrs = {
|
|
28
|
-
...rest,
|
|
29
|
+
...domAttrs(rest),
|
|
29
30
|
ref: setRef,
|
|
30
31
|
class: className,
|
|
31
32
|
"error-message": errorMessage,
|
package/dist/ark-kbd.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ 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
|
-
import type
|
|
5
|
+
import { type ArkDomProps } from "./dom-props.js";
|
|
6
6
|
export type ArkKbdProps = PropsWithChildren<ArkDomProps<ArkKbdStyleOptions & {
|
|
7
7
|
className?: string;
|
|
8
8
|
}>>;
|
package/dist/ark-kbd.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
|
export const ArkKbd = forwardRef(function ArkKbd(props, forwardedRef) {
|
|
4
5
|
const { children, className, ...rest } = props;
|
|
@@ -6,7 +7,7 @@ export const ArkKbd = forwardRef(function ArkKbd(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
|
};
|