@tooark/web-components 1.0.1 → 1.1.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 CHANGED
@@ -37,10 +37,16 @@ The `@tooark/web-components` package provides:
37
37
  ## 🔧 Installation
38
38
 
39
39
  ```bash
40
- pnpm add @tooark/web-components # brings @tooark/core and @tooark/tokens
40
+ pnpm add @tooark/web-components # brings @tooark/core and @tooark/tokens as its own dependencies
41
41
  ```
42
42
 
43
- Using React, Vue or Angular? Install `@tooark/react`, `@tooark/vue` or `@tooark/angular` instead: they depend on this package and add typed wrappers.
43
+ Those dependencies are transitive: with pnpm (isolated `node_modules`) your code cannot import them. When it imports `toast` or `announce` from `@tooark/core` (as in the examples below), install the core too:
44
+
45
+ ```bash
46
+ pnpm add @tooark/web-components @tooark/core
47
+ ```
48
+
49
+ Using React, Vue or Angular? Install `@tooark/react`, `@tooark/vue` or `@tooark/angular` instead: they depend on this package, add typed wrappers and re-export `toast`.
44
50
 
45
51
  ---
46
52
 
@@ -55,7 +61,7 @@ import "@tooark/web-components/styles.css";
55
61
  registerTooarkComponents(); // idempotent
56
62
  ```
57
63
 
58
- Declare the page's `color-scheme` to pick the theme (`light`, `dark` or `light dark` to follow the system); set `theme="light|dark"` on an element to force one side, and `lang="en|pt|es"` (or `locale-json`) on the elements that show text.
64
+ Declare the page's `color-scheme` to pick the theme (`light`, `dark` or `light dark` to follow the system); set `theme="light|dark"` on an element to force one side, and `lang="en|pt|es"` (or `lang="custom"` with `locale-json`) on the elements that show text.
59
65
 
60
66
  ---
61
67
 
@@ -74,8 +80,8 @@ Declare the page's `color-scheme` to pick the theme (`light`, `dark` or `light d
74
80
  - `ark-command-item` — Command palette item (the host is the `role="option"`): free children, `slot="trailing"` for a shortcut, `value`, `group`, `label` (filter text), `disabled`. Emits `ark-select`.
75
81
  - `ark-command-palette` — Command palette on the Popover API: search field (an `ark-input` of its own), `ark-command-item` children grouped and filtered (`filter`) or searched by the app (`ark-query`), arrows + Enter, `hotkey` (`/`, `mod+k`). Emits `ark-select`, `ark-query`, `ark-open`, `ark-close`.
76
82
  - `ark-copy-button` — Copy button: extends `ark-button` (same variants, sizes, `icon-only`, forms, hooks); copies `value` or the `for` element, swaps the icon for a check and the text/`title` for "copied" for `feedback-ms`, announces it. Emits `ark-copy`.
77
- - `ark-datepicker` — Date picker: inline (embeds `ark-calendar`) or `input` mode with field + popup, localized formatting, typed input parsing, forms.
78
- - `ark-dialog` — Modal dialog on the Popover API (top layer, `::backdrop` scrim, no portal): the host is the panel, your children are the body, `slot="footer"` is the footer; header from `label`, focus trap, Esc/scrim, `sm`–`xl`.
83
+ - `ark-datepicker` — Date/time picker composing `ark-input` + `ark-calendar` + `ark-clock`: `mode` datetime (default)/date/time, inline or `input` mode with field + popup, localized formatting, typed input parsing, forms.
84
+ - `ark-dialog` — Modal dialog on the Popover API (top layer, `::backdrop` scrim, no portal): the host is the panel, your children are the body, `slot="footer"` is the footer; header from `label`, focus trap, Esc/scrim, `sm`–`xl` or `full`.
79
85
  - `ark-drawer` — Drawer anchored to an edge: `overlay` (Popover API, scrim, focus trap, Esc) or `inline` (in the page flow, e.g. a bottom console); `side`, `size` preset or CSS length, header from `label`, `slot="footer"`, slide with the `sheet` easing. Emits `ark-open`/`ark-close`.
80
86
  - `ark-empty` — Empty state: dashed box with a dimmed `slot="icon"`, `heading` (h3), `description` and an optional `slot="action"` button; children stay in place, ordered by CSS.
81
87
  - `ark-file-input` — File field with the `ark-input` grid (label, helper/error): hidden native `<input type="file">` for forms, drop zone with `dragover` highlight, keyboard-accessible choose button, list of selected names, `accept`/`multiple`. Emits `change` with the files and announces them.
@@ -90,7 +96,7 @@ Declare the page's `color-scheme` to pick the theme (`light`, `dark` or `light d
90
96
  - `ark-scheduler` — Scheduler with `week`/`day` views (time grid with overlap resolved into columns), plus `month` and `agenda`; colored, clickable events.
91
97
  - `ark-select` — Native `<select>` styled like `ark-input`: label, helper/error with aria, `placeholder`, options from data (`options` JSON attribute or JS property, `group` → `<optgroup>`), sizes, intents, `rounded`.
92
98
  - `ark-shape-picker` — Shape picker as a `radiogroup`: the six `ark-mark` shapes drawn in `color`, `value`, arrows navigate, localized shape names, `disabled`, `size`. Emits `change` with the shape.
93
- - `ark-skeleton` — Loading placeholder: the host is the block (`.ark-skeleton`, `aria-hidden`), sized by your class/style; `rows` renders bars, `animated` opts into the pulse, `rounded`.
99
+ - `ark-skeleton` — Loading placeholder: the host is the block (`.ark-skeleton`, `aria-hidden`), sized by your class/style; `rows` renders bars, `animated` opts into the shimmer (a sweeping highlight), `rounded`.
94
100
  - `ark-spinner` — Standalone loading indicator (`role="status"`): the button's spinner SVG on `.ark-animate-spin` (keeps spinning under reduced motion), screen-reader label by `lang` or `label`, `size`, optional `intent` (inherits the text color otherwise).
95
101
  - `ark-split-pane` — Resizable panels: your children are the panels, the handles are the component's own nodes at the end of the host; `direction`, `sizes` (percentages, rewritten on every change), `data-min`/`data-max` per panel, keyboard and pointer-capture drag. Emits `ark-resize`.
96
102
  - `ark-status-dot` — Status dot: the host is the circle in the intent color (default `neutral`); `label` makes it a named `role="img"`, without it it is decorative; `size`. Static, never pulses.
@@ -176,8 +182,8 @@ Installed automatically unless marked as peer; peer dependencies are yours to in
176
182
 
177
183
  | Package | Version | Description |
178
184
  | ---------------------------------------------------------------- | ------- | ---------------------------------------------------------------- |
179
- | [`@tooark/core`](https://www.npmjs.com/package/@tooark/core) | ^1.0.0 | Types, i18n, toast/announce services, motion and overlay helpers |
180
- | [`@tooark/tokens`](https://www.npmjs.com/package/@tooark/tokens) | ^1.0.0 | Design tokens (colors, sizes, radii, motion) and primitive types |
185
+ | [`@tooark/core`](https://www.npmjs.com/package/@tooark/core) | ^1.1.0 | Types, i18n, toast/announce services, motion and overlay helpers |
186
+ | [`@tooark/tokens`](https://www.npmjs.com/package/@tooark/tokens) | ^1.1.0 | Design tokens (colors, sizes, motion) and primitive types |
181
187
  | [`tslib`](https://www.npmjs.com/package/tslib) | ^2.8.1 | TypeScript runtime helpers |
182
188
 
183
189
  ---
package/README.pt-BR.md CHANGED
@@ -37,10 +37,16 @@ O pacote `@tooark/web-components` fornece:
37
37
  ## 🔧 Instalação
38
38
 
39
39
  ```bash
40
- pnpm add @tooark/web-components # traz @tooark/core e @tooark/tokens
40
+ pnpm add @tooark/web-components # traz @tooark/core e @tooark/tokens como dependências dele
41
41
  ```
42
42
 
43
- Usa React, Vue ou Angular? Instale `@tooark/react`, `@tooark/vue` ou `@tooark/angular`: eles dependem deste pacote e acrescentam wrappers tipados.
43
+ Essas dependências são transitivas: com pnpm (`node_modules` isolado) o seu código não consegue importá-las. Quando ele importar `toast` ou `announce` do `@tooark/core` (como nos exemplos abaixo), instale o core também:
44
+
45
+ ```bash
46
+ pnpm add @tooark/web-components @tooark/core
47
+ ```
48
+
49
+ Usa React, Vue ou Angular? Instale `@tooark/react`, `@tooark/vue` ou `@tooark/angular`: eles dependem deste pacote, acrescentam wrappers tipados e reexportam o `toast`.
44
50
 
45
51
  ---
46
52
 
@@ -55,17 +61,17 @@ import "@tooark/web-components/styles.css";
55
61
  registerTooarkComponents(); // idempotente
56
62
  ```
57
63
 
58
- Declare o `color-scheme` da página para escolher o tema (`light`, `dark` ou `light dark` para seguir o sistema); `theme="light|dark"` num elemento força um lado, e `lang="en|pt|es"` (ou `locale-json`) nos elementos que mostram texto.
64
+ Declare o `color-scheme` da página para escolher o tema (`light`, `dark` ou `light dark` para seguir o sistema); `theme="light|dark"` num elemento força um lado, e `lang="en|pt|es"` (ou `lang="custom"` com `locale-json`) nos elementos que mostram texto.
59
65
 
60
66
  ---
61
67
 
62
68
  ## 📦 Componentes
63
69
 
64
- - `ark-alert` — Alerta/banner: o host é a caixa na cor suave do intent, os filhos são a mensagem (texto livre ou elementos), `slot="icon"` à esquerda, `slot="action"` à direita, `heading`, `dismissible` com saída animada, live region (`status`/`alert`).
70
+ - `ark-alert` — Alerta/banner: o host é a caixa na cor suave do intent, os filhos são a mensagem (texto livre ou elementos), `slot="icon"` à esquerda, `slot="action"` à direita, `heading`, `dismissible` com saída animada, `live` region (`status`/`alert`).
65
71
  - `ark-avatar` — Avatar (`role="img"` nomeado por `name`): iniciais de `name`, imagem `src` que cai para as iniciais em erro de carga, `size`, `shape` circle/square, `color` própria.
66
72
  - `ark-badge` — Rótulo curto de status/categoria: intents, `soft`/`solid`/`outline`, `xs`–`md`, `rounded`, `color` própria via `color-mix`. O host é o badge; ícone e texto ficam como filhos.
67
73
  - `ark-button` — Intents, tamanhos, variantes (solid/outline/ghost), `rounded` (até `full`), estados `loading`/`icon-only`/`full-width`, feedback `status` (glifo de sucesso/erro + anúncio) e modo link (`href`).
68
- - `ark-calendar` — Grid de mês inline: localizado, teclado WAI-ARIA, motion, views de mês/ano no título e eventos com cor (`dots`/`count`/`list`).
74
+ - `ark-calendar` — Grid de mês inline (no estilo do DateCalendar do MUI): localizado, teclado WAI-ARIA, motion, views de mês/ano no título e eventos com cor (`dots`/`count`/`list`).
69
75
  - `ark-card` — Cartão: o host é a caixa (`surface`, `border`, `rounded`) e uma grid: `heading` (h2) ou `slot="header"` com `slot="actions"` na linha de cima, filhos sem slot como corpo, `slot="footer"` por último com divisor; `padding` none–lg.
70
76
  - `ark-carousel` — CSS scroll snap nativo (touch/trackpad rolam nativamente, arrasto com mouse emulado), autoplay, loop, dots e setas. Os slides continuam sendo seus filhos diretos.
71
77
  - `ark-checkbox` — Checkbox desenhado pelo componente (botão `role="checkbox"` + input nativo oculto para formulário e `<fieldset disabled>`): `checked`, `indeterminate`, `label`/`aria-label`/filhos livres como rótulo, tamanhos, intents. Emite `change`.
@@ -74,8 +80,8 @@ Declare o `color-scheme` da página para escolher o tema (`light`, `dark` ou `li
74
80
  - `ark-command-item` — Item da paleta de comandos (o host é o `role="option"`): filhos livres, `slot="trailing"` para o atalho, `value`, `group`, `label` (texto do filtro), `disabled`. Emite `ark-select`.
75
81
  - `ark-command-palette` — Paleta de comandos sobre a Popover API: campo de busca (um `ark-input` próprio), filhos `ark-command-item` agrupados e filtrados (`filter`) ou buscados pelo app (`ark-query`), setas + Enter, `hotkey` (`/`, `mod+k`). Emite `ark-select`, `ark-query`, `ark-open`, `ark-close`.
76
82
  - `ark-copy-button` — Botão de copiar: estende o `ark-button` (mesmas variantes, tamanhos, `icon-only`, formulário, hooks); copia `value` ou o elemento de `for`, troca o ícone por um check e o texto/`title` por "copiado" durante `feedback-ms`, anuncia. Emite `ark-copy`.
77
- - `ark-datepicker` — Compõe `ark-input` + `ark-calendar` + `ark-clock`: `mode` datetime (padrão)/date/time, inline ou campo+popup, parse de digitação, formulário.
78
- - `ark-dialog` — Diálogo modal sobre a Popover API (top layer, scrim por `::backdrop`, sem portal): o host é o painel, seus filhos são o corpo, `slot="footer"` é o rodapé; cabeçalho de `label`, focus trap, Esc/scrim, `sm`–`xl`.
83
+ - `ark-datepicker` — Seletor de data/hora que compõe `ark-input` + `ark-calendar` + `ark-clock`: `mode` datetime (padrão)/date/time, inline ou modo `input` com campo + popup, formatação localizada, parse da digitação, formulário.
84
+ - `ark-dialog` — Diálogo modal sobre a Popover API (top layer, scrim por `::backdrop`, sem portal): o host é o painel, seus filhos são o corpo, `slot="footer"` é o rodapé; cabeçalho de `label`, focus trap, Esc/scrim, `sm`–`xl` ou `full`.
79
85
  - `ark-drawer` — Gaveta ancorada numa borda: `overlay` (Popover API, scrim, focus trap, Esc) ou `inline` (no fluxo da página, ex.: console inferior); `side`, `size` preset ou comprimento CSS, cabeçalho de `label`, `slot="footer"`, slide com o easing `sheet`. Emite `ark-open`/`ark-close`.
80
86
  - `ark-empty` — Estado vazio: caixa tracejada com `slot="icon"` apagado, `heading` (h3), `description` e um botão opcional em `slot="action"`; os filhos ficam no lugar, ordenados por CSS.
81
87
  - `ark-file-input` — Campo de arquivo com a grid do `ark-input` (label, helper/erro): `<input type="file">` nativo oculto para o formulário, zona de soltar com realce em `dragover`, botão de escolher acessível por teclado, lista dos nomes escolhidos, `accept`/`multiple`. Emite `change` com os arquivos e os anuncia.
@@ -90,7 +96,7 @@ Declare o `color-scheme` da página para escolher o tema (`light`, `dark` ou `li
90
96
  - `ark-scheduler` — Agenda com views `week`/`day` (timeline por horário e sobreposição em colunas), `month` e `agenda`; eventos coloridos e clicáveis.
91
97
  - `ark-select` — `<select>` nativo estilizado como o `ark-input`: label, helper/erro com aria, `placeholder`, opções por dados (atributo `options` em JSON ou propriedade JS, `group` → `<optgroup>`), tamanhos, intents, `rounded`.
92
98
  - `ark-shape-picker` — Seletor de forma como `radiogroup`: as seis formas do `ark-mark` desenhadas em `color`, `value`, setas navegam, nomes das formas localizados, `disabled`, `size`. Emite `change` com a forma.
93
- - `ark-skeleton` — Placeholder de carregamento: o host é o bloco (`.ark-skeleton`, `aria-hidden`), dimensionado pela sua class/style; `rows` renderiza barras, `animated` liga o pulso, `rounded`.
99
+ - `ark-skeleton` — Placeholder de carregamento: o host é o bloco (`.ark-skeleton`, `aria-hidden`), dimensionado pela sua class/style; `rows` renderiza barras, `animated` liga o shimmer (um brilho que varre), `rounded`.
94
100
  - `ark-spinner` — Indicador de carregamento solto (`role="status"`): o SVG do spinner do botão em `.ark-animate-spin` (continua girando sob movimento reduzido), rótulo para leitor de tela por `lang` ou `label`, `size`, `intent` opcional (senão herda a cor do texto).
95
101
  - `ark-split-pane` — Painéis redimensionáveis: os seus filhos são os painéis, as alças são nós próprios do componente ao fim do host; `direction`, `sizes` (percentuais, reescritos a cada mudança), `data-min`/`data-max` por painel, teclado e arrasto com pointer capture. Emite `ark-resize`.
96
102
  - `ark-status-dot` — Ponto de status: o host é o círculo na cor do intent (padrão `neutral`); `label` o torna um `role="img"` nomeado, sem ele é decorativo; `size`. Estático, nunca pulsa.
@@ -176,8 +182,8 @@ Instaladas automaticamente, salvo as marcadas como peer, que ficam por sua conta
176
182
 
177
183
  | Pacote | Versão | Descrição |
178
184
  | ---------------------------------------------------------------- | ------ | -------------------------------------------------------------------- |
179
- | [`@tooark/core`](https://www.npmjs.com/package/@tooark/core) | ^1.0.0 | Tipos, i18n, serviços de toast/announce, motion e helpers de overlay |
180
- | [`@tooark/tokens`](https://www.npmjs.com/package/@tooark/tokens) | ^1.0.0 | Design tokens (cores, tamanhos, raios, motion) e tipos primitivos |
185
+ | [`@tooark/core`](https://www.npmjs.com/package/@tooark/core) | ^1.1.0 | Tipos, i18n, serviços de toast/announce, motion e helpers de overlay |
186
+ | [`@tooark/tokens`](https://www.npmjs.com/package/@tooark/tokens) | ^1.1.0 | Design tokens (cores, tamanhos, motion) e tipos primitivos |
181
187
  | [`tslib`](https://www.npmjs.com/package/tslib) | ^2.8.1 | Helpers de runtime do TypeScript |
182
188
 
183
189
  ---