@astryxdesign/core 0.2.0-canary.ea693ac → 0.2.0-canary.f306f13
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/AvatarGroup/AvatarGroupOverflow.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.js +2 -6
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +2 -4
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +2 -2
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +4 -19
- package/dist/CodeBlock/CodeBlock.js +2 -2
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +1 -10
- package/dist/DropdownMenu/DropdownMenuRadioGroup.d.ts +11 -8
- package/dist/DropdownMenu/DropdownMenuRadioGroup.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioGroup.js +1 -3
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +1 -1
- package/dist/Field/FieldLabel.d.ts +1 -2
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +3 -7
- package/dist/Item/Item.d.ts +3 -16
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +6 -31
- package/dist/List/ListItem.d.ts +1 -11
- package/dist/List/ListItem.d.ts.map +1 -1
- package/dist/List/ListItem.js +0 -2
- package/dist/MetadataList/MetadataList.d.ts +1 -1
- package/dist/MetadataList/MetadataList.d.ts.map +1 -1
- package/dist/MetadataList/MetadataList.js +2 -4
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +2 -13
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +2 -3
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +0 -5
- package/dist/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/Skeleton/Skeleton.js +2 -2
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +4 -15
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +1 -1
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +9 -61
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +1 -3
- package/dist/Token/Token.d.ts +1 -4
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +43 -68
- package/dist/Typeahead/BaseTypeahead.d.ts +0 -9
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +0 -2
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +1 -8
- package/dist/astryx.css +3 -16
- package/dist/astryx.umd.js +48 -48
- package/dist/astryx.umd.js.map +4 -4
- package/dist/hooks/useKeyboardHint.d.ts +1 -1
- package/dist/hooks/useKeyboardHint.d.ts.map +1 -1
- package/dist/hooks/useKeyboardHint.js +2 -4
- package/locales/en.json +0 -32
- package/locales/pseudo.json +0 -24
- package/package.json +1 -1
- package/src/AvatarGroup/AvatarGroup.test.tsx +1 -21
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +2 -4
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +1 -1
- package/src/Button/Button.test.tsx +0 -16
- package/src/Button/Button.tsx +2 -4
- package/src/CheckboxInput/CheckboxInput.test.tsx +0 -23
- package/src/CheckboxInput/CheckboxInput.tsx +2 -17
- package/src/CheckboxList/CheckboxList.test.tsx +3 -94
- package/src/CheckboxList/CheckboxListItem.tsx +10 -17
- package/src/CodeBlock/CodeBlock.test.tsx +0 -17
- package/src/CodeBlock/CodeBlock.tsx +2 -2
- package/src/ContextMenu/ContextMenu.test.tsx +2 -17
- package/src/ContextMenu/ContextMenu.tsx +1 -10
- package/src/DropdownMenu/DropdownMenuRadioGroup.doc.mjs +12 -4
- package/src/DropdownMenu/DropdownMenuRadioGroup.tsx +10 -9
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +1 -1
- package/src/DropdownMenu/DropdownMenuSelectable.test.tsx +2 -20
- package/src/Field/FieldLabel.test.tsx +0 -25
- package/src/Field/FieldLabel.tsx +2 -11
- package/src/Item/Item.doc.mjs +0 -5
- package/src/Item/Item.test.tsx +0 -88
- package/src/Item/Item.tsx +11 -57
- package/src/List/ListItem.doc.mjs +0 -12
- package/src/List/ListItem.tsx +0 -13
- package/src/MetadataList/MetadataList.test.tsx +0 -24
- package/src/MetadataList/MetadataList.tsx +2 -6
- package/src/MultiSelector/MultiSelector.test.tsx +0 -76
- package/src/MultiSelector/MultiSelector.tsx +2 -22
- package/src/RadioList/RadioList.test.tsx +4 -26
- package/src/RadioList/RadioListItem.tsx +1 -8
- package/src/SegmentedControl/SegmentedControl.test.tsx +0 -28
- package/src/SegmentedControl/SegmentedControlItem.tsx +2 -20
- package/src/Selector/Selector.test.tsx +0 -22
- package/src/Selector/Selector.tsx +1 -8
- package/src/Skeleton/Skeleton.test.tsx +0 -16
- package/src/Skeleton/Skeleton.tsx +1 -13
- package/src/Switch/Switch.test.tsx +0 -37
- package/src/Switch/Switch.tsx +3 -52
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.test.tsx +0 -19
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +1 -3
- package/src/Toast/ToastViewport.test.tsx +8 -218
- package/src/Toast/ToastViewport.tsx +12 -71
- package/src/ToggleButton/ToggleButton.test.tsx +0 -24
- package/src/ToggleButton/ToggleButton.tsx +1 -19
- package/src/Token/Token.test.tsx +0 -145
- package/src/Token/Token.tsx +33 -73
- package/src/Typeahead/BaseTypeahead.tsx +0 -12
- package/src/Typeahead/Typeahead.test.tsx +0 -62
- package/src/Typeahead/Typeahead.tsx +0 -6
- package/src/hooks/useKeyboardHint.test.tsx +0 -22
- package/src/hooks/useKeyboardHint.tsx +2 -6
- package/dist/Token/TokenLink.d.ts +0 -62
- package/dist/Token/TokenLink.d.ts.map +0 -1
- package/dist/Token/TokenLink.js +0 -76
- package/src/Token/TokenLink.tsx +0 -107
- package/src/__tests__/forcedColors.ts +0 -60
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file AvatarGroupOverflow.tsx
|
|
3
|
-
* @input Uses React, StyleX, AvatarGroupContext
|
|
3
|
+
* @input Uses React, StyleX, AvatarGroupContext
|
|
4
4
|
* @output Exports AvatarGroupOverflow for overflow indicator
|
|
5
5
|
* @position Slot component used inside AvatarGroup
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarGroupOverflow.d.ts","sourceRoot":"","sources":["../../src/AvatarGroup/AvatarGroupOverflow.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAW5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"AvatarGroupOverflow.d.ts","sourceRoot":"","sources":["../../src/AvatarGroup/AvatarGroupOverflow.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAW5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAM5C,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CACpD,SAAS,CAAC,WAAW,CAAC,EACtB,SAAS,CACV;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA4ED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,KAAK,EACL,OAAO,EACP,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,wBAAwB,GAAG,SAAS,CAyDtC;yBAlEe,mBAAmB"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @file AvatarGroupOverflow.tsx
|
|
6
|
-
* @input Uses React, StyleX, AvatarGroupContext
|
|
6
|
+
* @input Uses React, StyleX, AvatarGroupContext
|
|
7
7
|
* @output Exports AvatarGroupOverflow for overflow indicator
|
|
8
8
|
* @position Slot component used inside AvatarGroup
|
|
9
9
|
*
|
|
@@ -19,7 +19,6 @@ import { colorVars, typographyVars, fontWeightVars, radiusVars, spacingVars } fr
|
|
|
19
19
|
import { mergeProps } from "../utils/index.js";
|
|
20
20
|
import { useAvatarGroup } from "./AvatarGroupContext.js";
|
|
21
21
|
import { themeProps } from "../utils/themeProps.js";
|
|
22
|
-
import { useTranslator } from "../i18n/index.js";
|
|
23
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
23
|
const BORDER_WIDTH = 2;
|
|
25
24
|
const OVERFLOW_FONT_RATIO = 0.35;
|
|
@@ -106,13 +105,10 @@ export function AvatarGroupOverflow({
|
|
|
106
105
|
style,
|
|
107
106
|
...rest
|
|
108
107
|
}) {
|
|
109
|
-
const t = useTranslator();
|
|
110
108
|
const group = useAvatarGroup();
|
|
111
109
|
const numericSize = group?.numericSize ?? 36;
|
|
112
110
|
const overlap = group?.overlap ?? 0;
|
|
113
|
-
const label =
|
|
114
|
-
count
|
|
115
|
-
});
|
|
111
|
+
const label = `${count} more`;
|
|
116
112
|
const content = children ?? `+${count}`;
|
|
117
113
|
if (onClick) {
|
|
118
114
|
return /*#__PURE__*/_jsx("button", {
|
package/dist/Button/Button.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file Button.tsx
|
|
3
|
-
* @input Uses React, ButtonHTMLAttributes, ReactNode
|
|
3
|
+
* @input Uses React, ButtonHTMLAttributes, ReactNode
|
|
4
4
|
* @output Exports Button component, ButtonProps, ButtonVariant types
|
|
5
5
|
* @position Core implementation; consumed by index.ts, tested by Button.test.tsx
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAwB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAsB3C,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAwB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;A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Button.tsx
|
|
7
|
-
* @input Uses React, ButtonHTMLAttributes, ReactNode
|
|
7
|
+
* @input Uses React, ButtonHTMLAttributes, ReactNode
|
|
8
8
|
* @output Exports Button component, ButtonProps, ButtonVariant types
|
|
9
9
|
* @position Core implementation; consumed by index.ts, tested by Button.test.tsx
|
|
10
10
|
*
|
|
@@ -30,7 +30,6 @@ import { useButtonGroup } from "../ButtonGroup/ButtonGroupContext.js";
|
|
|
30
30
|
import { mergeProps, mergeRefs } from "../utils/index.js";
|
|
31
31
|
import { useLinkComponent } from "../Link/useLinkComponent.js";
|
|
32
32
|
import { themeProps } from "../utils/themeProps.js";
|
|
33
|
-
import { useTranslator } from "../i18n/index.js";
|
|
34
33
|
|
|
35
34
|
/**
|
|
36
35
|
* Base button styles
|
|
@@ -377,7 +376,6 @@ export function Button({
|
|
|
377
376
|
ref,
|
|
378
377
|
...props
|
|
379
378
|
}) {
|
|
380
|
-
const t = useTranslator();
|
|
381
379
|
const size = useSize(sizeProp, 'md');
|
|
382
380
|
const buttonGroup = useButtonGroup();
|
|
383
381
|
const [isPending, startTransition] = useTransition();
|
|
@@ -500,7 +498,7 @@ export function Button({
|
|
|
500
498
|
}), /*#__PURE__*/_jsx(VisuallyHidden, {
|
|
501
499
|
role: "status",
|
|
502
500
|
"aria-live": "polite",
|
|
503
|
-
children: isLoadingState ?
|
|
501
|
+
children: isLoadingState ? 'Loading' : ''
|
|
504
502
|
})]
|
|
505
503
|
});
|
|
506
504
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxInput.d.ts","sourceRoot":"","sources":["../../src/CheckboxInput/CheckboxInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAML,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAY3C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM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N,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,kBAAkB,+BA0NpB;yBAnPe,aAAa"}
|
|
@@ -102,7 +102,7 @@ const styles = {
|
|
|
102
102
|
},
|
|
103
103
|
checkmark: {
|
|
104
104
|
k1xSpc: "x1s85apg",
|
|
105
|
-
kMwMTN: "x17wrial
|
|
105
|
+
kMwMTN: "x17wrial",
|
|
106
106
|
$$css: true
|
|
107
107
|
},
|
|
108
108
|
checkmarkVisible: {
|
|
@@ -111,7 +111,7 @@ const styles = {
|
|
|
111
111
|
},
|
|
112
112
|
indeterminateMark: {
|
|
113
113
|
k1xSpc: "x1s85apg",
|
|
114
|
-
kWkggS: "x1azo05
|
|
114
|
+
kWkggS: "x1azo05",
|
|
115
115
|
kaIpWk: "xjspbzw",
|
|
116
116
|
$$css: true
|
|
117
117
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxListItem.d.ts","sourceRoot":"","sources":["../../src/CheckboxList/CheckboxListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"CheckboxListItem.d.ts","sourceRoot":"","sources":["../../src/CheckboxList/CheckboxListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAuB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAI3D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAuB5C,MAAM,WAAW,qBAAsB,SAAQ,SAAS,CAAC,aAAa,CAAC;IACrE;;;;;;OAMG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;;;;;;;;;;;;;;;;OAiBG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;IACtC;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;CAChC;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,YAAY,EAAE,SAAS,EACvB,KAAK,EACL,WAAW,EACX,UAAU,EACV,UAAU,EAAE,cAAsB,EAClC,SAAS,EAAE,aAAqB,EAChC,SAAS,EACT,OAAO,EACP,GAAG,EACH,MAAM,EACN,SAAS,EACT,KAAK,EACL,OAAO,EAAE,WAAW,EACpB,GAAG,SAAS,EACb,EAAE,qBAAqB,+BA6HvB;yBA7Ie,gBAAgB"}
|
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
* - /apps/storybook/stories/CheckboxList.stories.tsx
|
|
16
16
|
* - /packages/cli/templates/blocks/components/CheckboxList/ (showcase blocks)
|
|
17
17
|
*/
|
|
18
|
-
import { use
|
|
18
|
+
import { use } from 'react';
|
|
19
19
|
import * as stylex from '@stylexjs/stylex';
|
|
20
20
|
import "../theme/tokens.stylex.js";
|
|
21
21
|
import { colorVars } from "../theme/tokens.stylex.js";
|
|
22
|
+
import { composeEventHandlers } from "../utils/index.js";
|
|
22
23
|
import { useDevWarning } from "../hooks/useDevWarning.js";
|
|
23
24
|
import { CheckboxInput } from "../CheckboxInput/CheckboxInput.js";
|
|
24
25
|
import { ListItem } from "../List/ListItem.js";
|
|
@@ -121,14 +122,6 @@ export function CheckboxListItem({
|
|
|
121
122
|
|
|
122
123
|
// Whether this item is interactive (has a toggle handler)
|
|
123
124
|
const isInteractive = !effectiveReadOnly && (ctx != null || onCheck != null);
|
|
124
|
-
|
|
125
|
-
// The checkbox is the row's single keyboard control and action. The row is
|
|
126
|
-
// an enlarged click/tap target that delegates surface clicks to it via
|
|
127
|
-
// ListItem's `interactiveRef` (useClickableContainer), so each option is
|
|
128
|
-
// exactly one tab stop. Delegate whenever the row should respond to clicks:
|
|
129
|
-
// a toggleable item, or one carrying a consumer `onClick`.
|
|
130
|
-
const checkboxRef = useRef(null);
|
|
131
|
-
const hasRowInteraction = isInteractive || onClickProp != null;
|
|
132
125
|
const handleToggle = () => {
|
|
133
126
|
if (effectiveDisabled || effectiveReadOnly || isBusy) {
|
|
134
127
|
return;
|
|
@@ -154,25 +147,17 @@ export function CheckboxListItem({
|
|
|
154
147
|
label: label,
|
|
155
148
|
description: description,
|
|
156
149
|
endContent: endContent,
|
|
157
|
-
isDisabled: effectiveDisabled
|
|
158
|
-
|
|
159
|
-
// would add an invisible row button = a second tab stop). The checkbox
|
|
160
|
-
// stays the option's sole focusable control (WCAG 4.1.2 / APG checkbox
|
|
161
|
-
// pattern). A consumer onClick rides on the checkbox itself (below), so
|
|
162
|
-
// it still fires for both direct and delegated (row-surface) clicks.
|
|
163
|
-
,
|
|
164
|
-
interactiveRef: hasRowInteraction ? checkboxRef : undefined,
|
|
150
|
+
isDisabled: effectiveDisabled,
|
|
151
|
+
onClick: isInteractive || onClickProp ? composeEventHandlers(onClickProp, isInteractive ? handleToggle : undefined) : undefined,
|
|
165
152
|
"aria-busy": isBusy || undefined,
|
|
166
153
|
xstyle: [resolvedChecked === true && !effectiveDisabled && !effectiveReadOnly && styles.selected, xstyle],
|
|
167
154
|
className: className,
|
|
168
155
|
style: style,
|
|
169
156
|
startContent: /*#__PURE__*/_jsx(CheckboxInput, {
|
|
170
|
-
ref: checkboxRef,
|
|
171
157
|
label: checkboxLabel,
|
|
172
158
|
isLabelHidden: true,
|
|
173
159
|
value: resolvedChecked,
|
|
174
160
|
onChange: () => handleToggle(),
|
|
175
|
-
onClick: onClickProp,
|
|
176
161
|
isDisabled: effectiveDisabled,
|
|
177
162
|
isReadOnly: effectiveReadOnly,
|
|
178
163
|
isLoading: isBusy,
|
|
@@ -437,7 +437,7 @@ export function CodeBlock({
|
|
|
437
437
|
setCopied(true);
|
|
438
438
|
// Swapping the button's aria-label alone isn't reliably announced by
|
|
439
439
|
// screen readers, so confirm the copy via a polite live region.
|
|
440
|
-
announce(
|
|
440
|
+
announce('Copied');
|
|
441
441
|
onCopy?.();
|
|
442
442
|
// Restart the reset timer on every copy — otherwise a rapid re-copy
|
|
443
443
|
// is reverted early by the previous click's timer.
|
|
@@ -451,7 +451,7 @@ export function CodeBlock({
|
|
|
451
451
|
} catch {
|
|
452
452
|
// Clipboard failures leave the copied state unchanged.
|
|
453
453
|
}
|
|
454
|
-
}, [code, onCopy, announce
|
|
454
|
+
}, [code, onCopy, announce]);
|
|
455
455
|
const sizeStyle = size === 'sm' ? styles.sizeSm : styles.sizeMd;
|
|
456
456
|
// Digits in the largest line number — sizes the gutter column width.
|
|
457
457
|
const maxLineDigits = String(lines.length).length;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../src/ContextMenu/ContextMenu.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAON,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AA0BrC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAGjD,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AAqDtC,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAC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AC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,oBAAqB,SAAQ,oBAAoB;IACzD,gDAAgD;IAChD,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,UAAU,wBAAyB,SAAQ,oBAAoB;IAC7D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,+CAA+C;IAC/C,WAAW,EAAE,SAAS,CAAC;CACxB;AAED,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,wBAAwB,CAAC;AAM/E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,SAAS,EACT,IAAW,EACX,KAAK,EAAE,cAAc,EACrB,UAAkB,EAClB,YAAY,EACZ,GAAG,EACH,SAAS,EACT,KAAK,EACL,MAAM,EACN,aAAa,EACb,aAAa,EAAE,MAAM,EACrB,GAAG,KAAK,EACT,EAAE,gBAAgB,qBAmRlB;yBAjSe,WAAW"}
|
|
@@ -253,21 +253,12 @@ export function ContextMenu({
|
|
|
253
253
|
}
|
|
254
254
|
return;
|
|
255
255
|
}
|
|
256
|
-
// APG menu pattern: Tab closes the menu. Menu items are tabIndex={-1}
|
|
257
|
-
// so Tab would otherwise leak focus into the page while the menu stayed
|
|
258
|
-
// open (menus-5). Do NOT preventDefault — closing restores focus to the
|
|
259
|
-
// previously focused element, and the browser's default Tab then
|
|
260
|
-
// continues from there to the next element.
|
|
261
|
-
if (e.key === 'Tab') {
|
|
262
|
-
closeMenu();
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
256
|
if (typeahead.onKeyDown(e)) {
|
|
266
257
|
e.preventDefault();
|
|
267
258
|
return;
|
|
268
259
|
}
|
|
269
260
|
listNavKeyDown(e);
|
|
270
|
-
}, [listNavKeyDown,
|
|
261
|
+
}, [listNavKeyDown, typeahead, ownsEvent]);
|
|
271
262
|
|
|
272
263
|
// Place the zero-size cursor anchor at a point in the trigger's local
|
|
273
264
|
// coordinate space and open the menu. Positioning the anchor inside the
|
|
@@ -22,13 +22,16 @@ export interface DropdownMenuRadioGroupProps extends Omit<BaseProps, 'onChange'>
|
|
|
22
22
|
*/
|
|
23
23
|
onChange: (value: string) => void;
|
|
24
24
|
/**
|
|
25
|
-
* Accessible
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* `aria-labelledby` (via base props) instead if the name already exists as a
|
|
29
|
-
* visible element on the page.
|
|
25
|
+
* Accessible label for the group. Required (together with `aria-labelledby`,
|
|
26
|
+
* one of the two) so screen readers announce the radios as a named set,
|
|
27
|
+
* e.g. "Sort by".
|
|
30
28
|
*/
|
|
31
|
-
label
|
|
29
|
+
'aria-label'?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The id of an element that labels the group, as an alternative to
|
|
32
|
+
* `aria-label`.
|
|
33
|
+
*/
|
|
34
|
+
'aria-labelledby'?: string;
|
|
32
35
|
/**
|
|
33
36
|
* Whether selecting a value closes the menu. Radio items default to closing
|
|
34
37
|
* on selection (a single-choice commit), unlike checkbox items which stay
|
|
@@ -51,14 +54,14 @@ export interface DropdownMenuRadioGroupProps extends Omit<BaseProps, 'onChange'>
|
|
|
51
54
|
* DropdownMenuRadioItem,
|
|
52
55
|
* } from '@astryxdesign/core/DropdownMenu';
|
|
53
56
|
* <DropdownMenu button={{label: 'Sort'}}>
|
|
54
|
-
* <DropdownMenuRadioGroup value={sort} onChange={setSort} label="Sort by">
|
|
57
|
+
* <DropdownMenuRadioGroup value={sort} onChange={setSort} aria-label="Sort by">
|
|
55
58
|
* <DropdownMenuRadioItem value="newest" label="Newest" />
|
|
56
59
|
* <DropdownMenuRadioItem value="oldest" label="Oldest" />
|
|
57
60
|
* </DropdownMenuRadioGroup>
|
|
58
61
|
* </DropdownMenu>
|
|
59
62
|
* ```
|
|
60
63
|
*/
|
|
61
|
-
export declare function DropdownMenuRadioGroup({ value, onChange,
|
|
64
|
+
export declare function DropdownMenuRadioGroup({ value, onChange, hasCloseOnSelect, children, className, style, ...rest }: DropdownMenuRadioGroupProps): import("react").JSX.Element;
|
|
62
65
|
export declare namespace DropdownMenuRadioGroup {
|
|
63
66
|
var displayName: string;
|
|
64
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenuRadioGroup.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenuRadioGroup.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,EAAU,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAI9C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAiB5C,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CACvD,SAAS,EACT,UAAU,CACX;IACC;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC
|
|
1
|
+
{"version":3,"file":"DropdownMenuRadioGroup.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenuRadioGroup.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,EAAU,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAI9C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAiB5C,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CACvD,SAAS,EACT,UAAU,CACX;IACC;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,QAAQ,EACR,gBAAuB,EACvB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,2BAA2B,+BAgB7B;yBAxBe,sBAAsB"}
|
|
@@ -30,7 +30,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
30
30
|
* DropdownMenuRadioItem,
|
|
31
31
|
* } from '@astryxdesign/core/DropdownMenu';
|
|
32
32
|
* <DropdownMenu button={{label: 'Sort'}}>
|
|
33
|
-
* <DropdownMenuRadioGroup value={sort} onChange={setSort} label="Sort by">
|
|
33
|
+
* <DropdownMenuRadioGroup value={sort} onChange={setSort} aria-label="Sort by">
|
|
34
34
|
* <DropdownMenuRadioItem value="newest" label="Newest" />
|
|
35
35
|
* <DropdownMenuRadioItem value="oldest" label="Oldest" />
|
|
36
36
|
* </DropdownMenuRadioGroup>
|
|
@@ -40,7 +40,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
40
40
|
export function DropdownMenuRadioGroup({
|
|
41
41
|
value,
|
|
42
42
|
onChange,
|
|
43
|
-
label,
|
|
44
43
|
hasCloseOnSelect = true,
|
|
45
44
|
children,
|
|
46
45
|
className,
|
|
@@ -55,7 +54,6 @@ export function DropdownMenuRadioGroup({
|
|
|
55
54
|
return /*#__PURE__*/_jsx("div", {
|
|
56
55
|
...rest,
|
|
57
56
|
role: "group",
|
|
58
|
-
"aria-label": label,
|
|
59
57
|
...mergeProps({
|
|
60
58
|
className: "x78zum5 xdt5ytf x1lsbc85"
|
|
61
59
|
}, {
|
|
@@ -56,7 +56,7 @@ export interface DropdownMenuRadioItemProps extends Omit<BaseProps, 'role' | 'ar
|
|
|
56
56
|
*
|
|
57
57
|
* @example
|
|
58
58
|
* ```
|
|
59
|
-
* <DropdownMenuRadioGroup value={sort} onChange={setSort} label="Sort by">
|
|
59
|
+
* <DropdownMenuRadioGroup value={sort} onChange={setSort} aria-label="Sort by">
|
|
60
60
|
* <DropdownMenuRadioItem value="newest" label="Newest" />
|
|
61
61
|
* <DropdownMenuRadioItem value="oldest" label="Oldest" icon="clock" />
|
|
62
62
|
* </DropdownMenuRadioGroup>
|
|
@@ -107,7 +107,7 @@ const dotSizeStyles = {
|
|
|
107
107
|
*
|
|
108
108
|
* @example
|
|
109
109
|
* ```
|
|
110
|
-
* <DropdownMenuRadioGroup value={sort} onChange={setSort} label="Sort by">
|
|
110
|
+
* <DropdownMenuRadioGroup value={sort} onChange={setSort} aria-label="Sort by">
|
|
111
111
|
* <DropdownMenuRadioItem value="newest" label="Newest" />
|
|
112
112
|
* <DropdownMenuRadioItem value="oldest" label="Oldest" icon="clock" />
|
|
113
113
|
* </DropdownMenuRadioGroup>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file FieldLabel.tsx
|
|
3
|
-
* @input Uses React, Icon, IconType
|
|
3
|
+
* @input Uses React, Icon, IconType
|
|
4
4
|
* @output Exports FieldLabel component, FieldLabelProps
|
|
5
5
|
* @position Core label implementation; used by Field, CheckboxInput, Switch
|
|
6
6
|
*
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* - /packages/core/src/Field/Field.doc.mjs (props table, features, implementation notes)
|
|
9
9
|
* - /packages/core/src/Field/index.ts (exports if types change)
|
|
10
10
|
* - /packages/cli/templates/blocks/components/Field/ (showcase blocks)
|
|
11
|
-
* - /packages/core/locales/en.json (@astryx.field.required / @astryx.field.optional)
|
|
12
11
|
*/
|
|
13
12
|
import type { ReactNode } from 'react';
|
|
14
13
|
import type { BaseProps } from '../BaseProps';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldLabel.d.ts","sourceRoot":"","sources":["../../src/Field/FieldLabel.tsx"],"names":[],"mappings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AAS,EACT,KAAK,EACL,MAAM,EACN,GAAG,EACH,GAAG,IAAI,EACR,EAAE,eAAe,+BA0DjB;yBA5Ee,UAAU"}
|
package/dist/Field/FieldLabel.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
|
-
'use client';
|
|
4
|
-
|
|
5
3
|
/**
|
|
6
4
|
* @file FieldLabel.tsx
|
|
7
|
-
* @input Uses React, Icon, IconType
|
|
5
|
+
* @input Uses React, Icon, IconType
|
|
8
6
|
* @output Exports FieldLabel component, FieldLabelProps
|
|
9
7
|
* @position Core label implementation; used by Field, CheckboxInput, Switch
|
|
10
8
|
*
|
|
@@ -12,15 +10,14 @@
|
|
|
12
10
|
* - /packages/core/src/Field/Field.doc.mjs (props table, features, implementation notes)
|
|
13
11
|
* - /packages/core/src/Field/index.ts (exports if types change)
|
|
14
12
|
* - /packages/cli/templates/blocks/components/Field/ (showcase blocks)
|
|
15
|
-
* - /packages/core/locales/en.json (@astryx.field.required / @astryx.field.optional)
|
|
16
13
|
*/
|
|
14
|
+
|
|
17
15
|
import * as stylex from '@stylexjs/stylex';
|
|
18
16
|
import { mergeProps } from "../utils/index.js";
|
|
19
17
|
import "../theme/tokens.stylex.js";
|
|
20
18
|
import { colorVars, fontWeightVars, spacingVars, typographyVars, typeScaleVars } from "../theme/tokens.stylex.js";
|
|
21
19
|
import { Icon, renderIconSlot } from "../Icon/index.js";
|
|
22
20
|
import { Tooltip } from "../Tooltip/index.js";
|
|
23
|
-
import { useTranslator } from "../i18n/index.js";
|
|
24
21
|
import { themeProps } from "../utils/themeProps.js";
|
|
25
22
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
26
23
|
const styles = {
|
|
@@ -90,8 +87,7 @@ export function FieldLabel({
|
|
|
90
87
|
ref,
|
|
91
88
|
...rest
|
|
92
89
|
}) {
|
|
93
|
-
const
|
|
94
|
-
const statusText = isOptional ? t('@astryx.field.optional') : isRequired ? t('@astryx.field.required') : null;
|
|
90
|
+
const statusText = isOptional ? 'Optional' : isRequired ? 'Required' : null;
|
|
95
91
|
|
|
96
92
|
// A group label (e.g. for a radiogroup) must not be a literal `<label>`
|
|
97
93
|
// element: a `<label>` semantically names a single form control and can't be
|
package/dist/Item/Item.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file Item.tsx
|
|
3
|
-
* @input Uses React, ReactNode, StyleXStyles, theme tokens
|
|
3
|
+
* @input Uses React, ReactNode, StyleXStyles, theme tokens
|
|
4
4
|
* @output Exports Item component, ItemProps type
|
|
5
5
|
* @position Core layout primitive; consumed by index.ts, tested by Item.test.tsx
|
|
6
6
|
*
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* - /apps/storybook/stories/Item.stories.tsx
|
|
12
12
|
* - /packages/cli/templates/blocks/components/Item/ (showcase blocks)
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
14
|
+
import type { ReactNode } from 'react';
|
|
15
15
|
import type { BaseProps } from '../BaseProps';
|
|
16
16
|
export type ItemAlign = 'center' | 'start';
|
|
17
17
|
export type ItemDensity = 'compact' | 'balanced' | 'spacious';
|
|
@@ -72,19 +72,6 @@ export interface ItemProps extends BaseProps<HTMLElement> {
|
|
|
72
72
|
* Click handler. Makes the item clickable with button semantics.
|
|
73
73
|
*/
|
|
74
74
|
onClick?: (event: React.MouseEvent) => void;
|
|
75
|
-
/**
|
|
76
|
-
* Ref to a nested control inside the item (e.g. a checkbox in
|
|
77
|
-
* `startContent`) that already provides the item's keyboard access and
|
|
78
|
-
* action. When set, the item becomes an enlarged click/tap target that
|
|
79
|
-
* delegates surface clicks to that control via the `useClickableContainer`
|
|
80
|
-
* pattern: it renders no invisible button/anchor, so the row adds no second
|
|
81
|
-
* tab stop (WCAG 4.1.2 — one focusable control per option). Clicks on the
|
|
82
|
-
* control itself, and on any other nested interactive element, are left to
|
|
83
|
-
* that element. Mutually exclusive with `onClick`/`href` — when
|
|
84
|
-
* `interactiveRef` is set those are ignored (the nested control is the sole
|
|
85
|
-
* action).
|
|
86
|
-
*/
|
|
87
|
-
interactiveRef?: React.RefObject<HTMLElement | null>;
|
|
88
75
|
/**
|
|
89
76
|
* Link URL. Makes the item a link via an invisible anchor element.
|
|
90
77
|
*/
|
|
@@ -139,7 +126,7 @@ export interface ItemProps extends BaseProps<HTMLElement> {
|
|
|
139
126
|
* />
|
|
140
127
|
* ```
|
|
141
128
|
*/
|
|
142
|
-
export declare function Item({ as: Component, marker, startContent, label, description, endContent, align, density, labelLines, descriptionLines, onClick,
|
|
129
|
+
export declare function Item({ as: Component, marker, startContent, label, description, endContent, align, density, labelLines, descriptionLines, onClick, href, target: targetFromProps, rel: relFromProps, isHighlighted, isSelected, isDisabled, xstyle, className, style, ref, role, ...restProps }: ItemProps): import("react").JSX.Element;
|
|
143
130
|
export declare namespace Item {
|
|
144
131
|
var displayName: string;
|
|
145
132
|
}
|
package/dist/Item/Item.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../src/Item/Item.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../src/Item/Item.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAUrC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAU5C,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC3C,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE9D,MAAM,WAAW,SAAU,SAAQ,SAAS,CAAC,WAAW,CAAC;IACvD,yCAAyC;IACzC,GAAG,CAAC,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EACP,IAAI,EACJ,MAAM,EAAE,eAAe,EACvB,GAAG,EAAE,YAAY,EACjB,aAAqB,EACrB,UAAkB,EAClB,UAAkB,EAClB,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,IAAI,EACJ,GAAG,SAAS,EACb,EAAE,SAAS,+BA+KX;yBAvMe,IAAI"}
|
package/dist/Item/Item.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file Item.tsx
|
|
7
|
-
* @input Uses React, ReactNode, StyleXStyles, theme tokens
|
|
7
|
+
* @input Uses React, ReactNode, StyleXStyles, theme tokens
|
|
8
8
|
* @output Exports Item component, ItemProps type
|
|
9
9
|
* @position Core layout primitive; consumed by index.ts, tested by Item.test.tsx
|
|
10
10
|
*
|
|
@@ -15,15 +15,12 @@
|
|
|
15
15
|
* - /apps/storybook/stories/Item.stories.tsx
|
|
16
16
|
* - /packages/cli/templates/blocks/components/Item/ (showcase blocks)
|
|
17
17
|
*/
|
|
18
|
-
import { useRef } from 'react';
|
|
19
18
|
import * as stylex from '@stylexjs/stylex';
|
|
20
19
|
import "../theme/tokens.stylex.js";
|
|
21
20
|
import { colorVars, radiusVars, spacingVars, durationVars, easeVars, typeScaleVars } from "../theme/tokens.stylex.js";
|
|
22
|
-
import { mergeProps
|
|
21
|
+
import { mergeProps } from "../utils/index.js";
|
|
23
22
|
import { computeTargetAndRel } from "../Link/computeTargetAndRel.js";
|
|
24
23
|
import { useLinkComponent } from "../Link/useLinkComponent.js";
|
|
25
|
-
import { useClickableContainer } from "../hooks/useClickableContainer.js";
|
|
26
|
-
import { useDevWarning } from "../hooks/useDevWarning.js";
|
|
27
24
|
import { themeProps } from "../utils/themeProps.js";
|
|
28
25
|
|
|
29
26
|
// =============================================================================
|
|
@@ -179,7 +176,6 @@ export function Item({
|
|
|
179
176
|
labelLines,
|
|
180
177
|
descriptionLines,
|
|
181
178
|
onClick,
|
|
182
|
-
interactiveRef,
|
|
183
179
|
href,
|
|
184
180
|
target: targetFromProps,
|
|
185
181
|
rel: relFromProps,
|
|
@@ -194,23 +190,7 @@ export function Item({
|
|
|
194
190
|
...restProps
|
|
195
191
|
}) {
|
|
196
192
|
const LinkComponent = useLinkComponent();
|
|
197
|
-
|
|
198
|
-
// Delegation mode: the row is an enlarged click/tap target for a nested
|
|
199
|
-
// control (e.g. a checkbox) that owns the keyboard access and action. The
|
|
200
|
-
// control is the row's only tab stop; the row proxies surface clicks to it.
|
|
201
|
-
const isDelegate = interactiveRef != null;
|
|
202
|
-
const containerRef = useRef(null);
|
|
203
|
-
// Only onClick is needed: onMouseUp handles middle-click href navigation,
|
|
204
|
-
// which delegation mode never has (href is ignored here).
|
|
205
|
-
const {
|
|
206
|
-
onClick: delegatedOnClick
|
|
207
|
-
} = useClickableContainer({
|
|
208
|
-
containerRef,
|
|
209
|
-
interactiveRef: interactiveRef ?? undefined,
|
|
210
|
-
disabled: isDisabled
|
|
211
|
-
});
|
|
212
|
-
useDevWarning('Item', '`interactiveRef` is mutually exclusive with `onClick`/`href`. In ' + 'delegation mode the row only forwards clicks to the referenced control, ' + 'so `onClick`/`href` are ignored. Drop one of them.', isDelegate && (onClick != null || href != null));
|
|
213
|
-
const isInteractive = onClick != null || href != null || isDelegate;
|
|
193
|
+
const isInteractive = onClick != null || href != null;
|
|
214
194
|
const {
|
|
215
195
|
target,
|
|
216
196
|
rel
|
|
@@ -253,12 +233,7 @@ export function Item({
|
|
|
253
233
|
className: "x3psx0u x78zum5"
|
|
254
234
|
},
|
|
255
235
|
children: startContent
|
|
256
|
-
}), hasParentRole
|
|
257
|
-
/*#__PURE__*/
|
|
258
|
-
// Delegation mode (and parent-role mode) put the label in a plain span:
|
|
259
|
-
// keyboard access lives on the nested control, so no invisible
|
|
260
|
-
// button/anchor is rendered and the row adds no second tab stop.
|
|
261
|
-
_jsx("span", {
|
|
236
|
+
}), hasParentRole ? /*#__PURE__*/_jsx("span", {
|
|
262
237
|
...{
|
|
263
238
|
0: {
|
|
264
239
|
className: "x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h"
|
|
@@ -319,7 +294,7 @@ export function Item({
|
|
|
319
294
|
})]
|
|
320
295
|
});
|
|
321
296
|
return /*#__PURE__*/_jsx(Component, {
|
|
322
|
-
ref:
|
|
297
|
+
ref: ref,
|
|
323
298
|
...restProps,
|
|
324
299
|
"aria-selected": allowsAriaSelected && isSelected || undefined
|
|
325
300
|
// aria-selected is invalid on roles that don't permit it (listitem, a
|
|
@@ -334,7 +309,7 @@ export function Item({
|
|
|
334
309
|
align
|
|
335
310
|
}), stylex.props(styles.root, densityStyles[density], align === 'start' && styles.alignStart, isInteractive && styles.interactive, isInteractive && styles.focusVisibleOutline, isHighlighted && styles.highlighted, isSelected && styles.selected, isDisabled && !hasParentRole && styles.disabled, xstyle), className, style),
|
|
336
311
|
role: role,
|
|
337
|
-
onClick:
|
|
312
|
+
onClick: hasParentRole ? onClick : isInteractive ? handleContainerClick : undefined,
|
|
338
313
|
children: innerContent
|
|
339
314
|
});
|
|
340
315
|
}
|
package/dist/List/ListItem.d.ts
CHANGED
|
@@ -49,16 +49,6 @@ export interface ListItemProps extends BaseProps<HTMLLIElement> {
|
|
|
49
49
|
* Automatically enables hover/press styles when provided.
|
|
50
50
|
*/
|
|
51
51
|
onClick?: (e: React.MouseEvent) => void;
|
|
52
|
-
/**
|
|
53
|
-
* Ref to a nested control inside the item (e.g. a checkbox in
|
|
54
|
-
* `startContent`) that already provides the item's keyboard access and
|
|
55
|
-
* action. When set, the item becomes an enlarged click/tap target that
|
|
56
|
-
* delegates surface clicks to that control via the `useClickableContainer`
|
|
57
|
-
* pattern: it renders no invisible button/anchor, so the row adds no second
|
|
58
|
-
* tab stop (WCAG 4.1.2 — one focusable control per option). Mutually
|
|
59
|
-
* exclusive with `onClick`/`href` — when set those are ignored.
|
|
60
|
-
*/
|
|
61
|
-
interactiveRef?: React.RefObject<HTMLElement | null>;
|
|
62
52
|
/**
|
|
63
53
|
* URL for link items. Renders an invisible anchor element.
|
|
64
54
|
* Automatically enables hover/press styles when provided.
|
|
@@ -98,7 +88,7 @@ export interface ListItemProps extends BaseProps<HTMLLIElement> {
|
|
|
98
88
|
* <ListItem label="Docs" href="/docs" target="_blank" rel="noreferrer" />
|
|
99
89
|
* ```
|
|
100
90
|
*/
|
|
101
|
-
export declare function ListItem({ label, description, startContent, endContent, onClick,
|
|
91
|
+
export declare function ListItem({ label, description, startContent, endContent, onClick, href, target, rel, isDisabled, isSelected, xstyle, className, style, ref, ...restProps }: ListItemProps): import("react").JSX.Element;
|
|
102
92
|
export declare namespace ListItem {
|
|
103
93
|
var displayName: string;
|
|
104
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../src/List/ListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAM,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAQ1C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAU5C,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,aAAa,CAAC;IAC7D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC/B;;;;;;OAMG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAExC
|
|
1
|
+
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../src/List/ListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAM,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAQ1C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAU5C,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,aAAa,CAAC;IAC7D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC/B;;;;;;OAMG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAExC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA4ED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,WAAW,EACX,YAAY,EACZ,UAAU,EACV,OAAO,EACP,IAAI,EACJ,MAAM,EACN,GAAG,EACH,UAAkB,EAClB,UAAkB,EAClB,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,SAAS,EACb,EAAE,aAAa,+BA8Cf;yBA9De,QAAQ"}
|
package/dist/List/ListItem.js
CHANGED
|
@@ -85,7 +85,6 @@ export function ListItem({
|
|
|
85
85
|
startContent,
|
|
86
86
|
endContent,
|
|
87
87
|
onClick,
|
|
88
|
-
interactiveRef,
|
|
89
88
|
href,
|
|
90
89
|
target,
|
|
91
90
|
rel,
|
|
@@ -134,7 +133,6 @@ export function ListItem({
|
|
|
134
133
|
description: description,
|
|
135
134
|
endContent: endContent,
|
|
136
135
|
onClick: onClick,
|
|
137
|
-
interactiveRef: interactiveRef,
|
|
138
136
|
href: href,
|
|
139
137
|
target: target,
|
|
140
138
|
rel: rel,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file MetadataList.tsx
|
|
3
|
-
* @input Uses React, ReactNode, StyleXStyles, theme tokens, MetadataListContext
|
|
3
|
+
* @input Uses React, ReactNode, StyleXStyles, theme tokens, MetadataListContext
|
|
4
4
|
* @output Exports MetadataList component, MetadataListProps, MetadataListColumns types
|
|
5
5
|
* @position Core implementation; consumed by index.ts, tested by MetadataList.test.tsx
|
|
6
6
|
*
|