@astryxdesign/core 0.7.9-canary.a866c2a → 0.7.9-canary.aabfc16
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/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +5 -1
- package/package.json +4 -4
- package/src/TabList/Tab.tsx +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../src/TabList/Tab.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EAAc,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAYzD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAO5C,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../src/TabList/Tab.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EAAc,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAYzD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAO5C,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AASrD,MAAM,WAAW,QAAS,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IAC5D;;;;OAIG;IACH,EAAE,CAAC,EAAE,iBAAiB,CAAC;IACvB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AA2KD;;;;;;;;;;;GAWG;AACH,wBAAgB,GAAG,CAAC,EAClB,EAAE,EACF,GAAG,EACH,KAAK,EACL,KAAK,EACL,aAAqB,EACrB,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,MAAM,EACN,SAAS,EACT,KAAK,EACL,OAAO,EACP,GAAG,SAAS,EACb,EAAE,QAAQ,qBAuLV;yBAvMe,GAAG"}
|
package/dist/TabList/Tab.js
CHANGED
|
@@ -28,6 +28,7 @@ import { usePressFeedback } from "../hooks/usePressFeedback.js";
|
|
|
28
28
|
import { useLinkComponent } from "../Link/useLinkComponent.js";
|
|
29
29
|
import { mergeProps } from "../utils/index.js";
|
|
30
30
|
import { useDevWarning } from "../hooks/useDevWarning.js";
|
|
31
|
+
import { withholdCallerHandlers } from "../utils/disabledInteraction.js";
|
|
31
32
|
import { EDGE_COMP_ATTR } from "../Layout/edgeCompensation.stylex.js";
|
|
32
33
|
import { themeProps } from "../utils/themeProps.js";
|
|
33
34
|
import { focusOutlineProps } from "../utils/focusOutline.stylex.js";
|
|
@@ -216,7 +217,10 @@ export function Tab({
|
|
|
216
217
|
children: displayIcon
|
|
217
218
|
}) : null;
|
|
218
219
|
const sharedProps = {
|
|
219
|
-
|
|
220
|
+
// A disabled tab keeps its tab stop, so the browser still sends it events.
|
|
221
|
+
// It runs no caller handler other than `onFocus` and `onBlur`, as a natively
|
|
222
|
+
// disabled control runs none. `onClick` is guarded in `handleSelect`.
|
|
223
|
+
...withholdCallerHandlers(restProps, isDisabled),
|
|
220
224
|
...pressable,
|
|
221
225
|
...(isLabelHidden ? {
|
|
222
226
|
'aria-label': label
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/core",
|
|
3
|
-
"version": "0.7.9-canary.
|
|
3
|
+
"version": "0.7.9-canary.aabfc16",
|
|
4
4
|
"displayName": "Astryx Core",
|
|
5
5
|
"description": "The component library. Accessible, themeable React components with built-in spacing, dark mode, and StyleX styling.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
@@ -880,9 +880,9 @@
|
|
|
880
880
|
"react-dom": ">=19.0.0"
|
|
881
881
|
},
|
|
882
882
|
"devDependencies": {
|
|
883
|
-
"@astryxdesign/a11y-spec": "0.7.9-canary.
|
|
884
|
-
"@astryxdesign/cli": "0.7.9-canary.
|
|
885
|
-
"@astryxdesign/interaction-harness": "0.7.9-canary.
|
|
883
|
+
"@astryxdesign/a11y-spec": "0.7.9-canary.aabfc16",
|
|
884
|
+
"@astryxdesign/cli": "0.7.9-canary.aabfc16",
|
|
885
|
+
"@astryxdesign/interaction-harness": "0.7.9-canary.aabfc16",
|
|
886
886
|
"@babel/cli": "^7.29.7",
|
|
887
887
|
"@babel/core": "^7.29.7",
|
|
888
888
|
"@babel/preset-react": "^7.29.7",
|
package/src/TabList/Tab.tsx
CHANGED
|
@@ -39,6 +39,7 @@ import {useLinkComponent} from '../Link/useLinkComponent';
|
|
|
39
39
|
import type {LinkComponentType} from '../Link/types';
|
|
40
40
|
import {mergeProps} from '../utils';
|
|
41
41
|
import {useDevWarning} from '../hooks/useDevWarning';
|
|
42
|
+
import {withholdCallerHandlers} from '../utils/disabledInteraction';
|
|
42
43
|
import {EDGE_COMP_ATTR} from '../Layout/edgeCompensation.stylex';
|
|
43
44
|
import {themeProps} from '../utils/themeProps';
|
|
44
45
|
import {focusOutlineProps} from '../utils/focusOutline.stylex';
|
|
@@ -362,7 +363,10 @@ export function Tab({
|
|
|
362
363
|
) : null;
|
|
363
364
|
|
|
364
365
|
const sharedProps = {
|
|
365
|
-
|
|
366
|
+
// A disabled tab keeps its tab stop, so the browser still sends it events.
|
|
367
|
+
// It runs no caller handler other than `onFocus` and `onBlur`, as a natively
|
|
368
|
+
// disabled control runs none. `onClick` is guarded in `handleSelect`.
|
|
369
|
+
...withholdCallerHandlers(restProps, isDisabled),
|
|
366
370
|
...pressable,
|
|
367
371
|
...(isLabelHidden ? {'aria-label': label} : {}),
|
|
368
372
|
[EDGE_COMP_ATTR]: '',
|