@astryxdesign/core 0.7.7-canary.ab90555 → 0.7.7-canary.bf14580
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/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +5 -0
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +4 -3
- package/dist/Drawer/Drawer.js +0 -1
- package/dist/Field/PanelSearchInput.d.ts +9 -1
- package/dist/Field/PanelSearchInput.d.ts.map +1 -1
- package/dist/Field/PanelSearchInput.js +3 -1
- package/dist/MobileNav/MobileNav.js +0 -1
- package/dist/MultiSelector/hooks.d.ts.map +1 -1
- package/dist/MultiSelector/hooks.js +2 -4
- package/dist/Outline/Outline.d.ts +2 -4
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +4 -52
- package/dist/Outline/useOutlineFromMarkdown.d.ts.map +1 -1
- package/dist/Outline/useOutlineFromMarkdown.js +1 -0
- package/dist/Outline/useScrollSpy.js +3 -3
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +5 -0
- package/dist/Tokenizer/Tokenizer.d.ts +46 -59
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +24 -46
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts +25 -28
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts.map +1 -1
- package/dist/Tokenizer/TokenizerBottomSheet.js +157 -54
- package/dist/hooks/useHighlightedOptionScroll.d.ts +11 -1
- package/dist/hooks/useHighlightedOptionScroll.d.ts.map +1 -1
- package/dist/hooks/useHighlightedOptionScroll.js +103 -5
- package/dist/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.js +7 -1
- package/dist/internal/SheetConfirmation.d.ts +11 -0
- package/dist/internal/SheetConfirmation.d.ts.map +1 -0
- package/dist/internal/SheetConfirmation.js +92 -0
- package/dist/internal/sheetDraft.d.ts +35 -0
- package/dist/internal/sheetDraft.d.ts.map +1 -0
- package/dist/internal/sheetDraft.js +65 -0
- package/dist/internal/touch-sheet.d.ts +21 -0
- package/dist/internal/touch-sheet.d.ts.map +1 -0
- package/dist/internal/touch-sheet.js +19 -0
- package/dist/internal/useDismissSearchOnTouchDrag.d.ts +24 -0
- package/dist/internal/useDismissSearchOnTouchDrag.d.ts.map +1 -0
- package/dist/internal/useDismissSearchOnTouchDrag.js +56 -0
- package/package.json +8 -8
- package/src/CheckboxList/CheckboxList.tsx +4 -0
- package/src/Dialog/Dialog.tsx +19 -4
- package/src/Drawer/Drawer.tsx +1 -1
- package/src/Field/PanelSearchInput.tsx +11 -0
- package/src/MobileNav/MobileNav.tsx +1 -1
- package/src/MultiSelector/hooks.ts +2 -4
- package/src/Outline/Outline.doc.mjs +177 -51
- package/src/Outline/Outline.tsx +5 -57
- package/src/Outline/useOutlineFromMarkdown.doc.mjs +157 -0
- package/src/Outline/useOutlineFromMarkdown.ts +1 -0
- package/src/Outline/useScrollSpy.ts +3 -3
- package/src/RadioList/RadioList.doc.mjs +4 -2
- package/src/RadioList/RadioList.tsx +4 -0
- package/src/Tokenizer/Tokenizer.doc.mjs +16 -0
- package/src/Tokenizer/Tokenizer.tsx +68 -75
- package/src/Tokenizer/TokenizerBottomSheet.tsx +219 -93
- package/src/hooks/useHighlightedOptionScroll.ts +113 -9
- package/src/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.ts +7 -1
- package/src/internal/SheetConfirmation.tsx +101 -0
- package/src/internal/sheetDraft.ts +80 -0
- package/src/internal/touch-sheet.ts +21 -0
- package/src/internal/useDismissSearchOnTouchDrag.ts +69 -0
- package/dist/internal/tokenizer-presentation.d.ts +0 -21
- package/dist/internal/tokenizer-presentation.d.ts.map +0 -1
- package/dist/internal/tokenizer-presentation.js +0 -21
- package/src/internal/tokenizer-presentation.ts +0 -25
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxList.d.ts","sourceRoot":"","sources":["../../src/CheckboxList/CheckboxList.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAE9C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAEhD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,qBAAqB,CAAC;AAarD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAC7C,mBAAmB,CAAC,cAAc,CAAC,EACnC,UAAU,CACX;IACC,mDAAmD;IACnD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACtC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;;;OAUG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,MAAM,EACN,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,OAAoB,EACpB,WAAmB,EACnB,UAAkB,EAClB,eAAe,EACf,UAAkB,EAClB,QAAQ,EACR,GAAG,EACH,KAAK,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EAAE,kBAAkB,EACrC,kBAAkB,EAAE,mBAAmB,EACvC,GAAG,SAAS,EACb,EAAE,iBAAiB,+
|
|
1
|
+
{"version":3,"file":"CheckboxList.d.ts","sourceRoot":"","sources":["../../src/CheckboxList/CheckboxList.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAE9C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAEhD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,qBAAqB,CAAC;AAarD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAC7C,mBAAmB,CAAC,cAAc,CAAC,EACnC,UAAU,CACX;IACC,mDAAmD;IACnD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH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ergedRefs(ref, disabledMessageTooltip.ref),
|
|
160
160
|
...mergeProps(stylex.props(controlXstyle), controlClassName, controlStyle),
|
|
161
161
|
role: "group"
|
|
162
|
+
// Screen readers announce the whole group as unavailable. Its dimmed
|
|
163
|
+
// label then labels a disabled control. An enabled list keeps a
|
|
164
|
+
// caller's own value.
|
|
165
|
+
,
|
|
166
|
+
"aria-disabled": isDisabled || rest['aria-disabled']
|
|
162
167
|
// A caller aria-labelledby names the group together with its label.
|
|
163
168
|
,
|
|
164
169
|
"aria-labelledby": joinAriaIDs(labelID, ariaLabelledByProp),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA6B5C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAMhD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AA+B9C;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,gBAAgB,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzD,4EAA4E;AAC5E,UAAU,mBAAmB;IAC3B,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAe,SAAQ,mBAAmB;IACzD,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,yEAAyE;IACzE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAuBD,2FA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EhB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;OAOG;IACH,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC;IAE3C;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC;IAEpC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,MAAM,CAAC,EACrB,MAAM,EAAE,UAAU,EAClB,QAAgB,EAChB,YAAY,EACZ,KAAW,EACX,SAAmB,EACnB,QAAQ,EACR,OAAoB,EACpB,OAAgB,EAChB,OAAO,EACP,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,WAAW,sCAgbb;yBAhce,MAAM"}
|
package/dist/Dialog/Dialog.js
CHANGED
|
@@ -134,8 +134,9 @@ const styles = {
|
|
|
134
134
|
kVAEAm: "xixxii4",
|
|
135
135
|
kogj98: "x1bpp3o7",
|
|
136
136
|
kmVPX3: "x1717udv",
|
|
137
|
-
kMzoRj: "xc342km",
|
|
138
|
-
ksu8eU: "xng3xce",
|
|
137
|
+
kMzoRj: "xc342km x13rsnn2",
|
|
138
|
+
ksu8eU: "xng3xce xx61lck",
|
|
139
|
+
kVAM5u: "x1w1tqly",
|
|
139
140
|
kWkggS: "x10xzikg",
|
|
140
141
|
"--_dialog-radius": "xvuvksw",
|
|
141
142
|
kaIpWk: "xuacgfc",
|
|
@@ -162,7 +163,6 @@ const styles = {
|
|
|
162
163
|
},
|
|
163
164
|
backdrop: {
|
|
164
165
|
kGyWv1: "xnixb3f",
|
|
165
|
-
kba3nw: "x1abwkk1",
|
|
166
166
|
$$css: true
|
|
167
167
|
},
|
|
168
168
|
fullscreen: {
|
|
@@ -171,6 +171,7 @@ const styles = {
|
|
|
171
171
|
ks0D6T: "xlbgzzq",
|
|
172
172
|
kskxy: "x1wj9ous",
|
|
173
173
|
kaIpWk: "x2u8bby",
|
|
174
|
+
kMzoRj: "xc342km",
|
|
174
175
|
kogj98: "x1ghz6dp",
|
|
175
176
|
kpwlN0: "x10a8y8t",
|
|
176
177
|
$$css: true
|
package/dist/Drawer/Drawer.js
CHANGED
|
@@ -72,6 +72,14 @@ export interface PanelSearchInputProps extends Omit<BaseProps<HTMLInputElement>,
|
|
|
72
72
|
* the field to the same height as its rows.
|
|
73
73
|
*/
|
|
74
74
|
fieldXstyle?: StyleXStyles;
|
|
75
|
+
/**
|
|
76
|
+
* Draw the field as the shared input box — the input border, accent while
|
|
77
|
+
* focused, surface and radius — instead of the borderless panel row. A
|
|
78
|
+
* touch sheet is a full-width surface, not a bordered panel, so its field
|
|
79
|
+
* reads as a form input.
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
82
|
+
hasInputBox?: boolean;
|
|
75
83
|
}
|
|
76
84
|
/**
|
|
77
85
|
* Search row for the top of a dropdown panel: magnifier, borderless input, and
|
|
@@ -82,7 +90,7 @@ export interface PanelSearchInputProps extends Omit<BaseProps<HTMLInputElement>,
|
|
|
82
90
|
* option list's inline padding); every other prop (`role`, `aria-*`, `id`, …)
|
|
83
91
|
* passes through to the `<input>`, so the caller owns the combobox wiring.
|
|
84
92
|
*/
|
|
85
|
-
export declare function PanelSearchInput({ ref, label, clearLabel, placeholder, value, onValueChange, onKeyDown, onFocus, onBlur, onContainerKeyDown, fieldXstyle, xstyle, className, style, ...props }: PanelSearchInputProps): import("react").JSX.Element;
|
|
93
|
+
export declare function PanelSearchInput({ ref, label, clearLabel, placeholder, value, onValueChange, onKeyDown, onFocus, onBlur, onContainerKeyDown, fieldXstyle, hasInputBox, xstyle, className, style, ...props }: PanelSearchInputProps): import("react").JSX.Element;
|
|
86
94
|
export declare namespace PanelSearchInput {
|
|
87
95
|
var displayName: string;
|
|
88
96
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelSearchInput.d.ts","sourceRoot":"","sources":["../../src/Field/PanelSearchInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAwB,KAAK,GAAG,EAAC,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAenD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"PanelSearchInput.d.ts","sourceRoot":"","sources":["../../src/Field/PanelSearchInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAwB,KAAK,GAAG,EAAC,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAenD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAkF5C,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CACjD,SAAS,CAAC,gBAAgB,CAAC,EAC3B,UAAU,CACX;IACC,iEAAiE;IACjE,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAE5B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd,6EAA6E;IAC7E,UAAU,EAAE,MAAM,CAAC;IAEnB,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IAEd,kEAAkE;IAClE,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEvC,wCAAwC;IACxC,SAAS,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;IAEzD,0EAA0E;IAC1E,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IAEpD,yEAAyE;IACzE,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IAEnD;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;IAEhE;;;;;OAKG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,KAAK,EACL,UAAU,EACV,WAAW,EACX,KAAK,EACL,aAAa,EACb,SAAS,EACT,OAAO,EACP,MAAM,EACN,kBAAkB,EAClB,WAAW,EACX,WAAmB,EACnB,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,qBAAqB,+BAoFvB;yBArGe,gBAAgB"}
|
|
@@ -48,6 +48,7 @@ import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
|
48
48
|
import "../theme/tokens.stylex.js";
|
|
49
49
|
import { colorVars, durationVars, easeVars, radiusVars, spacingVars, typeScaleVars, typographyVars } from "../theme/tokens.stylex.js";
|
|
50
50
|
import { textEntryTraitAttributes } from "./textEntryTraits.js";
|
|
51
|
+
import { inputWrapperStyles } from "./inputStyles.stylex.js";
|
|
51
52
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
52
53
|
const styles = {
|
|
53
54
|
wrapper: {
|
|
@@ -101,6 +102,7 @@ export function PanelSearchInput({
|
|
|
101
102
|
onBlur,
|
|
102
103
|
onContainerKeyDown,
|
|
103
104
|
fieldXstyle,
|
|
105
|
+
hasInputBox = false,
|
|
104
106
|
xstyle,
|
|
105
107
|
className,
|
|
106
108
|
style,
|
|
@@ -146,7 +148,7 @@ export function PanelSearchInput({
|
|
|
146
148
|
...mergeProps(stylex.props(styles.wrapper, xstyle), className, style),
|
|
147
149
|
children: /*#__PURE__*/_jsxs("div", {
|
|
148
150
|
"data-keyboard-focus": isKeyboardFocus ? 'true' : undefined,
|
|
149
|
-
...stylex.props(styles.field, isKeyboardFocus && styles.fieldKeyboardFocus, fieldXstyle),
|
|
151
|
+
...stylex.props(styles.field, isKeyboardFocus && styles.fieldKeyboardFocus, hasInputBox && inputWrapperStyles.base, fieldXstyle),
|
|
150
152
|
children: [/*#__PURE__*/_jsx(Icon, {
|
|
151
153
|
icon: "search",
|
|
152
154
|
size: "sm",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/MultiSelector/hooks.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,SAAS,CAAC;AAGrD,UAAU,uBAAuB;IAC/B,eAAe,EAAE,uBAAuB,EAAE,CAAC;IAC3C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,+DAA+D;IAC/D,YAAY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AK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,iBAAiB,KACrB,IAAI,CAAC;CACX;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,eAAe,EACf,UAAkB,EAClB,MAAM,EACN,SAAiB,EACjB,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,QAAgB,EAChB,SAAS,EACT,MAAc,EACd,YAAY,EACZ,gBAAgB,GACjB,EAAE,uBAAuB,GAAG,sBAAsB,CAuSlD"}
|
|
@@ -86,13 +86,11 @@ export function useMultiCombobox({
|
|
|
86
86
|
// The action cell is the caller's control, usable whether or not the
|
|
87
87
|
// option itself is disabled (spec:AST-058 FR4).
|
|
88
88
|
if (cell === 'action') {
|
|
89
|
-
highlightOnHover(index);
|
|
90
|
-
setHighlightedCell('action');
|
|
89
|
+
highlightOnHover(index, () => setHighlightedCell('action'));
|
|
91
90
|
return;
|
|
92
91
|
}
|
|
93
92
|
if (!item.disabled) {
|
|
94
|
-
highlightOnHover(index);
|
|
95
|
-
setHighlightedCell('option');
|
|
93
|
+
highlightOnHover(index, () => setHighlightedCell('option'));
|
|
96
94
|
}
|
|
97
95
|
}, [highlightOnHover]);
|
|
98
96
|
const onKeyDown = useCallback(e => {
|
|
@@ -79,10 +79,8 @@ export interface OutlineProps extends BaseProps<HTMLElement> {
|
|
|
79
79
|
* scroll root) plus the heading's own `scroll-margin-top`. It defaults to the
|
|
80
80
|
* first item at the top and the last at the bottom.
|
|
81
81
|
*
|
|
82
|
-
* Keyboard:
|
|
83
|
-
*
|
|
84
|
-
* and Enter/Space activate — so a long table of contents costs one Tab press,
|
|
85
|
-
* not one per heading.
|
|
82
|
+
* Keyboard: each link is in the normal Tab order, and Enter/Space activate.
|
|
83
|
+
* There is no arrow, Home, or End movement between links.
|
|
86
84
|
*
|
|
87
85
|
* @example
|
|
88
86
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Outline.d.ts","sourceRoot":"","sources":["../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,OAAO,CAAC,EACtB,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,KAAK,EAAE,cAAc,EACrB,OAAmB,EACnB,eAAe,EACf,aAAa,EACb,MAAU,EACV,kBAAkB,EAClB,gBAAuB,EACvB,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,aAAa,EAAE,MAAM,EACrB,GAAG,KAAK,EACT,EAAE,YAAY,+BAqId;yBAtJe,OAAO"}
|
package/dist/Outline/Outline.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file Outline.tsx
|
|
7
|
-
* @input Uses React, StyleX, Astryx link provider integration, Outline hooks/types
|
|
7
|
+
* @input Uses React, StyleX, Astryx link provider integration, Outline hooks/types
|
|
8
8
|
* @output Exports Outline component and OutlineProps type
|
|
9
9
|
* @position Core implementation; consumed by index.ts
|
|
10
10
|
*
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* - Sliding indicator track (vertical divider + animated active bar)
|
|
13
13
|
* - Density variant (default/compact)
|
|
14
14
|
* - Scroll-spy active state when uncontrolled
|
|
15
|
-
* -
|
|
15
|
+
* - Each link in the normal Tab order (Enter/Space activate)
|
|
16
16
|
* - onNavigateStart / onNavigateEnd callbacks around the smooth scroll
|
|
17
17
|
* - Scroll scoping (offset, scrollContainerRef, hasScrollOnClick)
|
|
18
18
|
*
|
|
@@ -27,8 +27,6 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
27
27
|
import "../theme/tokens.stylex.js";
|
|
28
28
|
import { colorVars, durationVars, easeVars, radiusVars, spacingVars, typeScaleVars, fontWeightVars } from "../theme/tokens.stylex.js";
|
|
29
29
|
import { useLinkComponent } from "../Link/useLinkComponent.js";
|
|
30
|
-
import { useListFocus } from "../hooks/useListFocus.js";
|
|
31
|
-
import { useIsomorphicLayoutEffect } from "../hooks/useIsomorphicLayoutEffect.js";
|
|
32
30
|
import { mergeProps } from "../utils/index.js";
|
|
33
31
|
import { useScrollSpy } from "./useScrollSpy.js";
|
|
34
32
|
import { themeProps } from "../utils/themeProps.js";
|
|
@@ -172,10 +170,8 @@ function moveFocusTo(id) {
|
|
|
172
170
|
* scroll root) plus the heading's own `scroll-margin-top`. It defaults to the
|
|
173
171
|
* first item at the top and the last at the bottom.
|
|
174
172
|
*
|
|
175
|
-
* Keyboard:
|
|
176
|
-
*
|
|
177
|
-
* and Enter/Space activate — so a long table of contents costs one Tab press,
|
|
178
|
-
* not one per heading.
|
|
173
|
+
* Keyboard: each link is in the normal Tab order, and Enter/Space activate.
|
|
174
|
+
* There is no arrow, Home, or End movement between links.
|
|
179
175
|
*
|
|
180
176
|
* @example
|
|
181
177
|
* ```
|
|
@@ -240,47 +236,6 @@ export function Outline({
|
|
|
240
236
|
onNavigateEnd
|
|
241
237
|
});
|
|
242
238
|
|
|
243
|
-
// Roving tabindex over the links: the whole outline is one tab stop, and
|
|
244
|
-
// arrows move between headings. The hook owns `tabindex` on the items.
|
|
245
|
-
const {
|
|
246
|
-
listRef,
|
|
247
|
-
handleKeyDown: handleListKeyDown,
|
|
248
|
-
handleFocus
|
|
249
|
-
} = useListFocus({
|
|
250
|
-
itemSelector: 'a[href]',
|
|
251
|
-
orientation: 'vertical',
|
|
252
|
-
hasRovingTabIndex: true
|
|
253
|
-
});
|
|
254
|
-
|
|
255
|
-
// Seat the tab stop on the *active* heading. WAI-ARIA puts the single tab
|
|
256
|
-
// stop on the current item, so tabbing into a table of contents while
|
|
257
|
-
// reading section 7 lands on section 7 — not back at section 1, which is
|
|
258
|
-
// where useListFocus would otherwise leave it (it promotes the first item on
|
|
259
|
-
// mount and then keeps whichever item already holds the stop).
|
|
260
|
-
//
|
|
261
|
-
// Only while focus is outside the list: once the reader has arrowed to an
|
|
262
|
-
// item, the stop is theirs and scroll-spy must not yank it away. Sets
|
|
263
|
-
// `tabindex` only — it never steals focus. Registered after useListFocus so
|
|
264
|
-
// it runs after the hook's own layout effect and wins; on later commits the
|
|
265
|
-
// hook then finds this item already holding the stop and keeps it.
|
|
266
|
-
useIsomorphicLayoutEffect(() => {
|
|
267
|
-
const list = listRef.current;
|
|
268
|
-
if (list == null || list.contains(document.activeElement)) {
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
const links = Array.from(list.querySelectorAll('a[href]'));
|
|
272
|
-
const active = links.find(link => link.getAttribute('aria-current') === 'location');
|
|
273
|
-
if (active == null) {
|
|
274
|
-
return;
|
|
275
|
-
}
|
|
276
|
-
for (const link of links) {
|
|
277
|
-
const tabIndex = link === active ? '0' : '-1';
|
|
278
|
-
if (link.getAttribute('tabindex') !== tabIndex) {
|
|
279
|
-
link.setAttribute('tabindex', tabIndex);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
|
|
284
239
|
/**
|
|
285
240
|
* The single navigation path, shared by click and keyboard activation:
|
|
286
241
|
* push the hash, then hand off to the scroll-spy's `scrollTo`, which fires
|
|
@@ -342,10 +297,7 @@ export function Outline({
|
|
|
342
297
|
...{
|
|
343
298
|
className: "x78zum5 xdt5ytf x1lsbc85 x1ghz6dp x1717udv xe8uvvx x98rzlu xeuugli"
|
|
344
299
|
},
|
|
345
|
-
ref: listRef,
|
|
346
300
|
role: "list",
|
|
347
|
-
onKeyDown: handleListKeyDown,
|
|
348
|
-
onFocus: handleFocus,
|
|
349
301
|
children: items.map(item => {
|
|
350
302
|
const isActive = item.id === resolvedActiveId;
|
|
351
303
|
return /*#__PURE__*/_jsx("li", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOutlineFromMarkdown.d.ts","sourceRoot":"","sources":["../../src/Outline/useOutlineFromMarkdown.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useOutlineFromMarkdown.d.ts","sourceRoot":"","sources":["../../src/Outline/useOutlineFromMarkdown.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAC,+BAA+B,EAAC,MAAM,4BAA4B,CAAC;AAChF,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAEzC,uDAAuD;AACvD,wBAAgB,sBAAsB,CACpC,IAAI,SAAS,qBAAqB,GAAG,KAAK,EAE1C,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,+BAA+B,CAAC,IAAI,CAAC,GAC9C,WAAW,EAAE,CAWf"}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* SYNC: When modified, update these files to stay in sync:
|
|
12
12
|
* - /packages/core/src/Outline/Outline.doc.mjs
|
|
13
|
+
* - /packages/core/src/Outline/useOutlineFromMarkdown.doc.mjs
|
|
13
14
|
* - /packages/core/src/Outline/index.ts
|
|
14
15
|
*/
|
|
15
16
|
import { useMemo } from 'react';
|
|
@@ -302,9 +302,9 @@ export function useScrollSpy({
|
|
|
302
302
|
const onSettle = () => finish(true);
|
|
303
303
|
const onManual = () => finish(false);
|
|
304
304
|
const onKeyDown = event => {
|
|
305
|
-
//
|
|
306
|
-
//
|
|
307
|
-
//
|
|
305
|
+
// The outline prevents the Space key that activates a link. The
|
|
306
|
+
// browser then does not scroll. So this key is not a manual scroll, and
|
|
307
|
+
// it does not end the navigation.
|
|
308
308
|
if (!event.defaultPrevented && SCROLL_KEYS.has(event.key)) {
|
|
309
309
|
finish(false);
|
|
310
310
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioList.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioList.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,EAKZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAKhD,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CA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CACrB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,EACxB,GAAG,EACH,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,KAAK,EACL,QAAQ,EACR,WAAwB,EACxB,UAAkB,EAClB,eAAe,EACf,UAAkB,EAClB,UAAkB,EAClB,IAAW,EACX,MAAM,EACN,YAAY,EACZ,KAAK,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,iBAAiB,EAAE,kBAAkB,EACrC,kBAAkB,EAAE,mBAAmB,EACvC,GAAG,SAAS,EACb,EAAE,cAAc,qBAkOhB;yBA9Pe,SAAS"}
|
|
@@ -247,6 +247,11 @@ export function RadioList({
|
|
|
247
247
|
disabledMessageTooltip.ref(el);
|
|
248
248
|
},
|
|
249
249
|
role: "radiogroup"
|
|
250
|
+
// Screen readers announce the whole group as unavailable. Its dimmed
|
|
251
|
+
// label then labels a disabled control. An enabled list keeps a
|
|
252
|
+
// caller's own value.
|
|
253
|
+
,
|
|
254
|
+
"aria-disabled": isDisabled || rest['aria-disabled']
|
|
250
255
|
// A caller aria-labelledby names the group together with its label.
|
|
251
256
|
,
|
|
252
257
|
"aria-labelledby": joinAriaIDs(labelID, ariaLabelledByProp),
|
|
@@ -2,16 +2,10 @@
|
|
|
2
2
|
* @file Tokenizer.tsx
|
|
3
3
|
* @input Uses React, BaseTypeahead, Field, Token, useAnnounce,
|
|
4
4
|
* useAdaptivePresentation, and TokenizerBottomSheet (lazy)
|
|
5
|
-
* @output Exports Tokenizer multi-select typeahead component
|
|
6
|
-
* internal TokenizerWithPresentation signature the `internal/tokenizer-presentation`
|
|
7
|
-
* entry re-exports
|
|
5
|
+
* @output Exports Tokenizer multi-select typeahead component
|
|
8
6
|
* @position Composed component; forwards DOM ref and exposes focus control via
|
|
9
|
-
* handleRef. The
|
|
10
|
-
*
|
|
11
|
-
* offers no `experimental.presentation` while its user experience is being
|
|
12
|
-
* finished (`component:Tokenizer` DEC-3, implementation gap), and only
|
|
13
|
-
* Astryx's own packages reach it through the internal entry
|
|
14
|
-
* (`architecture:react-component-runtime` INV13).
|
|
7
|
+
* handleRef. The experimental `presentation` option swaps the inline
|
|
8
|
+
* combobox for a trigger that opens TokenizerBottomSheet.
|
|
15
9
|
*
|
|
16
10
|
* SYNC: When modified, update:
|
|
17
11
|
* - /packages/core/src/Tokenizer/index.ts
|
|
@@ -59,35 +53,6 @@ export interface TokenizerHandle {
|
|
|
59
53
|
/** Blur the typeahead input. */
|
|
60
54
|
blur(): void;
|
|
61
55
|
}
|
|
62
|
-
/**
|
|
63
|
-
* The presentation options the sheet-capable signature admits. Not public:
|
|
64
|
-
* `TokenizerProps` has no `experimental` while the sheet's user experience is
|
|
65
|
-
* being finished; Astryx's own packages reach the sheet through
|
|
66
|
-
* `@astryxdesign/core/internal/tokenizer-presentation`.
|
|
67
|
-
*/
|
|
68
|
-
export interface TokenizerPresentationOptions {
|
|
69
|
-
/**
|
|
70
|
-
* How the field presents its choices.
|
|
71
|
-
* - `'popover'`: the inline combobox with its anchored suggestion menu —
|
|
72
|
-
* the stable behavior.
|
|
73
|
-
* - `'bottom-sheet'`: a trigger showing the selected tokens that opens one
|
|
74
|
-
* tall modal sheet: a search row on top, full-width checkbox rows that
|
|
75
|
-
* keep their place while the sheet is open, a create row with
|
|
76
|
-
* `hasCreate`, and a footer with a confirmed Clear all and Done. Suited
|
|
77
|
-
* to compact touch screens, where the inline combobox competes with the
|
|
78
|
-
* software keyboard.
|
|
79
|
-
* - `'adaptive'`: the bottom sheet on compact coarse-pointer screens,
|
|
80
|
-
* otherwise the popover — the same resolution Selector uses.
|
|
81
|
-
*
|
|
82
|
-
* In the sheet presentation the trigger is the control: `ref`, `id`,
|
|
83
|
-
* `aria-*`, and `data-*` reach it. `renderItem`, `renderToken`,
|
|
84
|
-
* `endContent`, `hasClear`, `hasEntriesOnFocus`, `menuWidth`,
|
|
85
|
-
* `tokenOverflowBehavior`, and `hasAutoFocus` have no surface to act on
|
|
86
|
-
* and warn once in development.
|
|
87
|
-
* @default 'popover'
|
|
88
|
-
*/
|
|
89
|
-
presentation?: 'popover' | 'bottom-sheet' | 'adaptive';
|
|
90
|
-
}
|
|
91
56
|
export interface TokenizerProps<T extends SearchableItem> extends Omit<FieldInputBaseProps<HTMLInputElement>, 'onChange' | 'onFocus' | 'onBlur' | 'onKeyDown'> {
|
|
92
57
|
/**
|
|
93
58
|
* Key handler. Runs after the built-in key handling, so it observes every key
|
|
@@ -241,38 +206,60 @@ export interface TokenizerProps<T extends SearchableItem> extends Omit<FieldInpu
|
|
|
241
206
|
ref?: React.Ref<HTMLInputElement>;
|
|
242
207
|
/** Imperative handle ref for focus/blur control. */
|
|
243
208
|
handleRef?: React.Ref<TokenizerHandle>;
|
|
209
|
+
/**
|
|
210
|
+
* Experimental options, outside the stable compatibility promise: anything
|
|
211
|
+
* in this object may change or be removed in a patch release. Omit it for
|
|
212
|
+
* the stable behavior.
|
|
213
|
+
* @experimental
|
|
214
|
+
*/
|
|
215
|
+
experimental?: {
|
|
216
|
+
/**
|
|
217
|
+
* How the field presents its choices.
|
|
218
|
+
* - `'popover'`: the inline combobox with its anchored suggestion menu —
|
|
219
|
+
* the stable behavior.
|
|
220
|
+
* - `'bottom-sheet'`: a trigger showing the selected tokens that opens one
|
|
221
|
+
* tall modal sheet: a search row on top, full-width checkbox rows that
|
|
222
|
+
* keep their place while the sheet is open, a create row with
|
|
223
|
+
* `hasCreate`, and a footer pinned in every state with a confirmed Clear
|
|
224
|
+
* all and Save. The sheet edits a draft: `onChange` fires once, when Save
|
|
225
|
+
* commits it, and a swipe, scrim or Escape close of a changed draft asks
|
|
226
|
+
* before discarding. Suited to compact touch screens, where the inline
|
|
227
|
+
* combobox competes with the software keyboard.
|
|
228
|
+
* - `'adaptive'`: the bottom sheet on compact coarse-pointer screens,
|
|
229
|
+
* otherwise the popover — the same resolution Selector uses.
|
|
230
|
+
*
|
|
231
|
+
* In the sheet presentation the trigger is the control: `ref`, `id`,
|
|
232
|
+
* `aria-*`, and `data-*` reach it. `renderItem`, `renderToken`,
|
|
233
|
+
* `endContent`, `hasClear`, `hasEntriesOnFocus`, `menuWidth`,
|
|
234
|
+
* `tokenOverflowBehavior`, and `hasAutoFocus` have no surface to act on
|
|
235
|
+
* and warn once in development.
|
|
236
|
+
* @experimental
|
|
237
|
+
* @default 'popover'
|
|
238
|
+
*/
|
|
239
|
+
presentation?: 'popover' | 'bottom-sheet' | 'adaptive';
|
|
240
|
+
};
|
|
244
241
|
}
|
|
245
242
|
/**
|
|
246
|
-
* The props
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
* `
|
|
251
|
-
* `
|
|
252
|
-
* their released shapes — names no presentation.
|
|
243
|
+
* The props the experimental opt-in admits. `experimental` is present, and
|
|
244
|
+
* `ref` also accepts the sheet presentation's trigger button, the control it
|
|
245
|
+
* stands for there. Only the overload below reaches this type. `TokenizerProps`
|
|
246
|
+
* stays the component's declared props type: it is an interface, so
|
|
247
|
+
* `interface X extends TokenizerProps<T>`, `Omit<TokenizerProps<T>, …>` and
|
|
248
|
+
* `ComponentProps<typeof Tokenizer>` keep their released shapes.
|
|
253
249
|
*/
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
experimental
|
|
250
|
+
type TokenizerExperimentalProps<T extends SearchableItem> = Omit<TokenizerProps<T>, 'ref' | 'experimental'> & {
|
|
251
|
+
/** @experimental */
|
|
252
|
+
experimental: NonNullable<TokenizerProps<T>['experimental']>;
|
|
257
253
|
/**
|
|
258
254
|
* Ref forwarded to the control: the combobox input in the popover
|
|
259
255
|
* presentation, the trigger button in the sheet presentation.
|
|
256
|
+
* @experimental
|
|
260
257
|
*/
|
|
261
258
|
ref?: React.Ref<HTMLInputElement | HTMLButtonElement>;
|
|
262
259
|
};
|
|
260
|
+
export declare function Tokenizer<T extends SearchableItem>(props: TokenizerExperimentalProps<T>): React.JSX.Element;
|
|
263
261
|
export declare function Tokenizer<T extends SearchableItem>(props: TokenizerProps<T>): React.JSX.Element;
|
|
264
262
|
export declare namespace Tokenizer {
|
|
265
263
|
var displayName: string;
|
|
266
264
|
}
|
|
267
|
-
/**
|
|
268
|
-
* The same component with the sheet presentation reachable: `experimental`
|
|
269
|
-
* (`presentation: 'popover' | 'bottom-sheet' | 'adaptive'`) and a `ref` that
|
|
270
|
-
* also takes the trigger button. Not public — re-exported only by
|
|
271
|
-
* `@astryxdesign/core/internal/tokenizer-presentation`, the entry reserved
|
|
272
|
-
* for Astryx's own packages (`architecture:react-component-runtime` INV13),
|
|
273
|
-
* while the sheet's user experience is being finished (`component:Tokenizer`
|
|
274
|
-
* DEC-3). The public `Tokenizer` renders the popover presentation for every
|
|
275
|
-
* field.
|
|
276
|
-
*/
|
|
277
|
-
export declare const TokenizerWithPresentation: <T extends SearchableItem>(props: TokenizerWithPresentationProps<T>) => React.JSX.Element;
|
|
278
265
|
//# sourceMappingURL=Tokenizer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tokenizer.d.ts","sourceRoot":"","sources":["../../src/Tokenizer/Tokenizer.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"Tokenizer.d.ts","sourceRoot":"","sources":["../../src/Tokenizer/Tokenizer.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAYZ,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAUf,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,qBAAqB,CAAC;AAU7B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EAGL,KAAK,WAAW,EAKjB,MAAM,UAAU,CAAC;AAIlB,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAWtD,OAAO,KAAK,EAEV,cAAc,EACd,YAA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AAC,CAAC;IAC7D;;;;OAIG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,GAAG,iBAAiB,CAAC,CAAC;CACvD,CAAC;AAmXF,wBAAgB,SAAS,CAAC,CAAC,SAAS,cAAc,EAChD,KAAK,EAAE,0BAA0B,CAAC,CAAC,CAAC,GACnC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;AACrB,wBAAgB,SAAS,CAAC,CAAC,SAAS,cAAc,EAChD,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,GACvB,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;yBAFL,SAAS"}
|
|
@@ -6,16 +6,10 @@
|
|
|
6
6
|
* @file Tokenizer.tsx
|
|
7
7
|
* @input Uses React, BaseTypeahead, Field, Token, useAnnounce,
|
|
8
8
|
* useAdaptivePresentation, and TokenizerBottomSheet (lazy)
|
|
9
|
-
* @output Exports Tokenizer multi-select typeahead component
|
|
10
|
-
* internal TokenizerWithPresentation signature the `internal/tokenizer-presentation`
|
|
11
|
-
* entry re-exports
|
|
9
|
+
* @output Exports Tokenizer multi-select typeahead component
|
|
12
10
|
* @position Composed component; forwards DOM ref and exposes focus control via
|
|
13
|
-
* handleRef. The
|
|
14
|
-
*
|
|
15
|
-
* offers no `experimental.presentation` while its user experience is being
|
|
16
|
-
* finished (`component:Tokenizer` DEC-3, implementation gap), and only
|
|
17
|
-
* Astryx's own packages reach it through the internal entry
|
|
18
|
-
* (`architecture:react-component-runtime` INV13).
|
|
11
|
+
* handleRef. The experimental `presentation` option swaps the inline
|
|
12
|
+
* combobox for a trigger that opens TokenizerBottomSheet.
|
|
19
13
|
*
|
|
20
14
|
* SYNC: When modified, update:
|
|
21
15
|
* - /packages/core/src/Tokenizer/index.ts
|
|
@@ -84,20 +78,12 @@ registerEnglishFallback(english);
|
|
|
84
78
|
*/
|
|
85
79
|
|
|
86
80
|
/**
|
|
87
|
-
* The
|
|
88
|
-
* `
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* The props of the sheet-capable signature: `TokenizerProps` plus the
|
|
95
|
-
* presentation options and a `ref` that also accepts the sheet presentation's
|
|
96
|
-
* trigger button, the control it stands for there. Not public: reached only
|
|
97
|
-
* as `TokenizerWithPresentation` through the internal entry, so the released
|
|
98
|
-
* `TokenizerProps` — an interface, so `interface X extends TokenizerProps<T>`,
|
|
99
|
-
* `Omit<TokenizerProps<T>, …>` and `ComponentProps<typeof Tokenizer>` keep
|
|
100
|
-
* their released shapes — names no presentation.
|
|
81
|
+
* The props the experimental opt-in admits. `experimental` is present, and
|
|
82
|
+
* `ref` also accepts the sheet presentation's trigger button, the control it
|
|
83
|
+
* stands for there. Only the overload below reaches this type. `TokenizerProps`
|
|
84
|
+
* stays the component's declared props type: it is an interface, so
|
|
85
|
+
* `interface X extends TokenizerProps<T>`, `Omit<TokenizerProps<T>, …>` and
|
|
86
|
+
* `ComponentProps<typeof Tokenizer>` keep their released shapes.
|
|
101
87
|
*/
|
|
102
88
|
|
|
103
89
|
// =============================================================================
|
|
@@ -394,10 +380,10 @@ function EndLane({
|
|
|
394
380
|
});
|
|
395
381
|
}
|
|
396
382
|
|
|
397
|
-
//
|
|
398
|
-
// Tokenizer>`
|
|
399
|
-
//
|
|
400
|
-
// `
|
|
383
|
+
// Keep this overload first. TypeScript resolves `ComponentProps<typeof
|
|
384
|
+
// Tokenizer>` against the last overload, so that type stays the stable props.
|
|
385
|
+
// A call that passes `experimental` matches this one and may pass the wider
|
|
386
|
+
// `ref`.
|
|
401
387
|
|
|
402
388
|
export function Tokenizer({
|
|
403
389
|
label,
|
|
@@ -514,6 +500,14 @@ export function Tokenizer({
|
|
|
514
500
|
sheetQueryRef.current = query;
|
|
515
501
|
onChangeQuery?.(query);
|
|
516
502
|
}, [onChangeQuery]);
|
|
503
|
+
// Save's one report. The sheet announced each edit as it happened, so
|
|
504
|
+
// nothing is announced here; a field that is disabled at Save reports
|
|
505
|
+
// nothing.
|
|
506
|
+
const handleSheetCommit = useCallback((items, change) => {
|
|
507
|
+
if (!isDisabled) {
|
|
508
|
+
onChange(items, change);
|
|
509
|
+
}
|
|
510
|
+
}, [isDisabled, onChange]);
|
|
517
511
|
// Set around a focus move the field makes itself — a presentation swap
|
|
518
512
|
// handing focus from one control to the other — so the receiving control
|
|
519
513
|
// does not report it as focus entering from outside.
|
|
@@ -1202,17 +1196,13 @@ export function Tokenizer({
|
|
|
1202
1196
|
label: label,
|
|
1203
1197
|
searchSource: searchSource,
|
|
1204
1198
|
value: value,
|
|
1205
|
-
|
|
1199
|
+
maxEntries: maxEntries,
|
|
1206
1200
|
hasCreate: hasCreate,
|
|
1207
1201
|
maxMenuItems: maxMenuItems ?? 10,
|
|
1208
1202
|
minQueryLength: minQueryLength ?? 1,
|
|
1209
1203
|
debounceMs: debounceMs ?? 150,
|
|
1210
1204
|
emptySearchText: emptySearchText,
|
|
1211
|
-
|
|
1212
|
-
onRemove: handleRemove,
|
|
1213
|
-
onClearAll: () => handleClearAll({
|
|
1214
|
-
silent: true
|
|
1215
|
-
}),
|
|
1205
|
+
onCommit: handleSheetCommit,
|
|
1216
1206
|
onChangeQuery: handleSheetQueryChange
|
|
1217
1207
|
})]
|
|
1218
1208
|
});
|
|
@@ -1279,16 +1269,4 @@ export function Tokenizer({
|
|
|
1279
1269
|
children: [tokenizerContent, showsDisabledMessage && disabledMessageTooltip.renderTooltip(disabledMessage)]
|
|
1280
1270
|
});
|
|
1281
1271
|
}
|
|
1282
|
-
Tokenizer.displayName = 'Tokenizer';
|
|
1283
|
-
|
|
1284
|
-
/**
|
|
1285
|
-
* The same component with the sheet presentation reachable: `experimental`
|
|
1286
|
-
* (`presentation: 'popover' | 'bottom-sheet' | 'adaptive'`) and a `ref` that
|
|
1287
|
-
* also takes the trigger button. Not public — re-exported only by
|
|
1288
|
-
* `@astryxdesign/core/internal/tokenizer-presentation`, the entry reserved
|
|
1289
|
-
* for Astryx's own packages (`architecture:react-component-runtime` INV13),
|
|
1290
|
-
* while the sheet's user experience is being finished (`component:Tokenizer`
|
|
1291
|
-
* DEC-3). The public `Tokenizer` renders the popover presentation for every
|
|
1292
|
-
* field.
|
|
1293
|
-
*/
|
|
1294
|
-
export const TokenizerWithPresentation = Tokenizer;
|
|
1272
|
+
Tokenizer.displayName = 'Tokenizer';
|