@zag-js/tabs 0.1.13 → 0.1.15

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/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { RequiredBy, DirectionProperty, CommonProperties, Context, PropTypes, No
2
2
  import * as _zag_js_core from '@zag-js/core';
3
3
  import { StateMachine } from '@zag-js/core';
4
4
 
5
- declare type IntlMessages = {
5
+ declare type IntlTranslations = {
6
6
  tablistLabel?: string;
7
7
  deleteLabel?(value: string): string;
8
8
  };
@@ -21,7 +21,7 @@ declare type PublicContext = DirectionProperty & CommonProperties & {
21
21
  /**
22
22
  * Specifies the localized strings that identifies the accessibility elements and their states
23
23
  */
24
- messages: IntlMessages;
24
+ translations: IntlTranslations;
25
25
  /**
26
26
  * Whether the keyboard navigation will loop from last tab to first, and vice versa.
27
27
  * @default true
package/dist/index.js CHANGED
@@ -235,7 +235,7 @@ var dom = defineDomHelpers({
235
235
 
236
236
  // src/tabs.connect.ts
237
237
  function connect(state, send, normalize) {
238
- const messages = state.context.messages;
238
+ const translations = state.context.translations;
239
239
  const isFocused = state.matches("focused");
240
240
  return {
241
241
  value: state.context.value,
@@ -258,7 +258,7 @@ function connect(state, send, normalize) {
258
258
  "data-focus": dataAttr(isFocused),
259
259
  "aria-orientation": state.context.orientation,
260
260
  "data-orientation": state.context.orientation,
261
- "aria-label": messages.tablistLabel,
261
+ "aria-label": translations.tablistLabel,
262
262
  onKeyDown(event) {
263
263
  const keyMap = {
264
264
  ArrowDown() {
@@ -351,7 +351,7 @@ function connect(state, send, normalize) {
351
351
  "data-part": "delete-button",
352
352
  type: "button",
353
353
  tabIndex: -1,
354
- "aria-label": (_a = messages.deleteLabel) == null ? void 0 : _a.call(messages, value),
354
+ "aria-label": (_a = translations.deleteLabel) == null ? void 0 : _a.call(translations, value),
355
355
  disabled,
356
356
  onClick() {
357
357
  send({ type: "DELETE", value });
@@ -394,7 +394,7 @@ function machine(ctx) {
394
394
  hasMeasuredRect: false,
395
395
  isIndicatorRendered: false,
396
396
  loop: true,
397
- messages: {},
397
+ translations: {},
398
398
  ...ctx
399
399
  },
400
400
  computed: {
package/dist/index.mjs CHANGED
@@ -208,7 +208,7 @@ var dom = defineDomHelpers({
208
208
 
209
209
  // src/tabs.connect.ts
210
210
  function connect(state, send, normalize) {
211
- const messages = state.context.messages;
211
+ const translations = state.context.translations;
212
212
  const isFocused = state.matches("focused");
213
213
  return {
214
214
  value: state.context.value,
@@ -231,7 +231,7 @@ function connect(state, send, normalize) {
231
231
  "data-focus": dataAttr(isFocused),
232
232
  "aria-orientation": state.context.orientation,
233
233
  "data-orientation": state.context.orientation,
234
- "aria-label": messages.tablistLabel,
234
+ "aria-label": translations.tablistLabel,
235
235
  onKeyDown(event) {
236
236
  const keyMap = {
237
237
  ArrowDown() {
@@ -324,7 +324,7 @@ function connect(state, send, normalize) {
324
324
  "data-part": "delete-button",
325
325
  type: "button",
326
326
  tabIndex: -1,
327
- "aria-label": (_a = messages.deleteLabel) == null ? void 0 : _a.call(messages, value),
327
+ "aria-label": (_a = translations.deleteLabel) == null ? void 0 : _a.call(translations, value),
328
328
  disabled,
329
329
  onClick() {
330
330
  send({ type: "DELETE", value });
@@ -367,7 +367,7 @@ function machine(ctx) {
367
367
  hasMeasuredRect: false,
368
368
  isIndicatorRendered: false,
369
369
  loop: true,
370
- messages: {},
370
+ translations: {},
371
371
  ...ctx
372
372
  },
373
373
  computed: {
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@zag-js/tabs",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Core logic for the tabs widget implemented as a state machine",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
5
8
  "keywords": [
6
9
  "js",
7
10
  "machine",
@@ -14,9 +17,6 @@
14
17
  "author": "Segun Adebayo <sage@adebayosegun.com>",
15
18
  "homepage": "https://github.com/chakra-ui/zag#readme",
16
19
  "license": "MIT",
17
- "main": "dist/index.js",
18
- "types": "dist/index.d.ts",
19
- "module": "dist/index.mjs",
20
20
  "repository": "https://github.com/chakra-ui/zag/tree/main/packages/tabs",
21
21
  "sideEffects": false,
22
22
  "files": [
@@ -29,12 +29,12 @@
29
29
  "url": "https://github.com/chakra-ui/zag/issues"
30
30
  },
31
31
  "dependencies": {
32
- "@zag-js/core": "0.1.10",
33
- "@zag-js/types": "0.2.5"
32
+ "@zag-js/core": "0.1.12",
33
+ "@zag-js/types": "0.2.7"
34
34
  },
35
35
  "devDependencies": {
36
- "@zag-js/dom-utils": "0.1.11",
37
- "@zag-js/utils": "0.1.4"
36
+ "@zag-js/dom-utils": "0.1.13",
37
+ "@zag-js/utils": "0.1.6"
38
38
  },
39
39
  "scripts": {
40
40
  "build-fast": "tsup src/index.ts --format=esm,cjs",