foldkit 0.41.0 → 0.42.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/dist/devtools/overlay.js +1 -1
- package/dist/runtime/runtime.d.ts +2 -0
- package/dist/runtime/runtime.d.ts.map +1 -1
- package/dist/runtime/runtime.js +5 -1
- package/dist/ui/checkbox/index.d.ts +3 -3
- package/dist/ui/checkbox/index.d.ts.map +1 -1
- package/dist/ui/checkbox/index.js +11 -8
- package/dist/ui/combobox/multi.d.ts +4 -3
- package/dist/ui/combobox/multi.d.ts.map +1 -1
- package/dist/ui/combobox/multi.js +4 -4
- package/dist/ui/combobox/public.d.ts +2 -2
- package/dist/ui/combobox/public.d.ts.map +1 -1
- package/dist/ui/combobox/public.js +1 -1
- package/dist/ui/combobox/shared.d.ts +12 -1
- package/dist/ui/combobox/shared.d.ts.map +1 -1
- package/dist/ui/combobox/shared.js +32 -19
- package/dist/ui/combobox/single.d.ts +4 -3
- package/dist/ui/combobox/single.d.ts.map +1 -1
- package/dist/ui/combobox/single.js +4 -4
- package/dist/ui/dialog/index.d.ts +11 -3
- package/dist/ui/dialog/index.d.ts.map +1 -1
- package/dist/ui/dialog/index.js +15 -7
- package/dist/ui/dialog/public.d.ts +1 -1
- package/dist/ui/dialog/public.d.ts.map +1 -1
- package/dist/ui/dialog/public.js +1 -1
- package/dist/ui/disclosure/index.d.ts +8 -3
- package/dist/ui/disclosure/index.d.ts.map +1 -1
- package/dist/ui/disclosure/index.js +12 -7
- package/dist/ui/disclosure/public.d.ts +2 -2
- package/dist/ui/disclosure/public.d.ts.map +1 -1
- package/dist/ui/disclosure/public.js +1 -1
- package/dist/ui/listbox/multi.d.ts +4 -3
- package/dist/ui/listbox/multi.d.ts.map +1 -1
- package/dist/ui/listbox/multi.js +4 -4
- package/dist/ui/listbox/public.d.ts +3 -3
- package/dist/ui/listbox/public.d.ts.map +1 -1
- package/dist/ui/listbox/public.js +2 -2
- package/dist/ui/listbox/shared.d.ts +14 -1
- package/dist/ui/listbox/shared.d.ts.map +1 -1
- package/dist/ui/listbox/shared.js +31 -16
- package/dist/ui/listbox/single.d.ts +10 -5
- package/dist/ui/listbox/single.d.ts.map +1 -1
- package/dist/ui/listbox/single.js +8 -5
- package/dist/ui/menu/index.d.ts +19 -3
- package/dist/ui/menu/index.d.ts.map +1 -1
- package/dist/ui/menu/index.js +39 -21
- package/dist/ui/menu/public.d.ts +2 -2
- package/dist/ui/menu/public.d.ts.map +1 -1
- package/dist/ui/menu/public.js +1 -1
- package/dist/ui/popover/index.d.ts +20 -3
- package/dist/ui/popover/index.d.ts.map +1 -1
- package/dist/ui/popover/index.js +31 -14
- package/dist/ui/popover/public.d.ts +2 -2
- package/dist/ui/popover/public.d.ts.map +1 -1
- package/dist/ui/popover/public.js +1 -1
- package/dist/ui/radioGroup/index.d.ts +10 -5
- package/dist/ui/radioGroup/index.d.ts.map +1 -1
- package/dist/ui/radioGroup/index.js +18 -20
- package/dist/ui/radioGroup/public.d.ts +2 -2
- package/dist/ui/radioGroup/public.d.ts.map +1 -1
- package/dist/ui/radioGroup/public.js +1 -1
- package/dist/ui/switch/index.d.ts +3 -3
- package/dist/ui/switch/index.d.ts.map +1 -1
- package/dist/ui/switch/index.js +11 -8
- package/dist/ui/tabs/index.d.ts +8 -3
- package/dist/ui/tabs/index.d.ts.map +1 -1
- package/dist/ui/tabs/index.js +15 -8
- package/dist/ui/tabs/public.d.ts +2 -2
- package/dist/ui/tabs/public.d.ts.map +1 -1
- package/dist/ui/tabs/public.js +1 -1
- package/package.json +1 -1
package/dist/ui/dialog/index.js
CHANGED
|
@@ -42,9 +42,13 @@ export const init = (config) => ({
|
|
|
42
42
|
const dialogSelector = (id) => `#${id}`;
|
|
43
43
|
const panelSelector = (id) => `#${id}-panel`;
|
|
44
44
|
const withUpdateReturn = M.withReturnType();
|
|
45
|
+
/** Advances the dialog's enter/leave transition by waiting a double-rAF. */
|
|
45
46
|
export const RequestFrame = Command.define('RequestFrame', AdvancedTransitionFrame);
|
|
47
|
+
/** Locks page scroll and calls `showModal()` on the native dialog element. */
|
|
46
48
|
export const ShowDialog = Command.define('ShowDialog', CompletedShowDialog);
|
|
49
|
+
/** Calls `close()` on the native dialog element and unlocks page scroll. */
|
|
47
50
|
export const CloseDialog = Command.define('CloseDialog', CompletedCloseDialog);
|
|
51
|
+
/** Waits for all CSS transitions on the dialog panel to complete. */
|
|
48
52
|
export const WaitForTransitions = Command.define('WaitForTransitions', EndedTransition);
|
|
49
53
|
/** Processes a dialog message and returns the next model and commands. */
|
|
50
54
|
export const update = (model, message) => {
|
|
@@ -111,10 +115,14 @@ export const update = (model, message) => {
|
|
|
111
115
|
export const titleId = (model) => `${model.id}-title`;
|
|
112
116
|
/** Returns the ID used for `aria-describedby` on the dialog. Apply this to your description element. */
|
|
113
117
|
export const descriptionId = (model) => `${model.id}-description`;
|
|
118
|
+
/** Programmatically closes the dialog, updating the model and returning
|
|
119
|
+
* close commands. Use this in domain-event handlers when the dialog uses `onClosed`. */
|
|
120
|
+
export const close = (model) => update(model, Closed());
|
|
114
121
|
/** Renders a headless dialog component backed by the native `<dialog>` element with `showModal()`. */
|
|
115
122
|
export const view = (config) => {
|
|
116
123
|
const { AriaDescribedBy, AriaLabelledBy, Class, DataAttribute, Id, OnCancel, OnClick, Style, keyed, } = html();
|
|
117
|
-
const { model: { id, isOpen, transitionState },
|
|
124
|
+
const { model: { id, isOpen, transitionState }, toParentMessage, onClosed, panelContent, panelClassName, panelAttributes = [], backdropClassName, backdropAttributes = [], className, attributes = [], } = config;
|
|
125
|
+
const dispatchClosed = () => onClosed ? onClosed() : toParentMessage(Closed());
|
|
118
126
|
const isLeaving = transitionState === 'LeaveStart' || transitionState === 'LeaveAnimating';
|
|
119
127
|
const isVisible = isOpen || isLeaving;
|
|
120
128
|
const transitionAttributes = M.value(transitionState).pipe(M.when('EnterStart', () => [
|
|
@@ -136,7 +144,7 @@ export const view = (config) => {
|
|
|
136
144
|
Id(id),
|
|
137
145
|
AriaLabelledBy(`${id}-title`),
|
|
138
146
|
AriaDescribedBy(`${id}-description`),
|
|
139
|
-
OnCancel(
|
|
147
|
+
OnCancel(dispatchClosed()),
|
|
140
148
|
Style({
|
|
141
149
|
width: '100%',
|
|
142
150
|
height: '100%',
|
|
@@ -153,7 +161,7 @@ export const view = (config) => {
|
|
|
153
161
|
const backdrop = keyed('div')(`${id}-backdrop`, [
|
|
154
162
|
Style({ minHeight: '100vh' }),
|
|
155
163
|
...transitionAttributes,
|
|
156
|
-
...(isLeaving ? [] : [OnClick(
|
|
164
|
+
...(isLeaving ? [] : [OnClick(dispatchClosed())]),
|
|
157
165
|
...(backdropClassName ? [Class(backdropClassName)] : []),
|
|
158
166
|
...backdropAttributes,
|
|
159
167
|
], []);
|
|
@@ -167,12 +175,12 @@ export const view = (config) => {
|
|
|
167
175
|
return keyed('dialog')(id, dialogAttributes, content);
|
|
168
176
|
};
|
|
169
177
|
/** Creates a memoized dialog view. Static config is captured in a closure;
|
|
170
|
-
* only `model` and `
|
|
178
|
+
* only `model` and `toParentMessage` are compared per render via `createLazy`. */
|
|
171
179
|
export const lazy = (staticConfig) => {
|
|
172
180
|
const lazyView = createLazy();
|
|
173
|
-
return (model,
|
|
181
|
+
return (model, toParentMessage) => lazyView((currentModel, currentToMessage) => view({
|
|
174
182
|
...staticConfig,
|
|
175
183
|
model: currentModel,
|
|
176
|
-
|
|
177
|
-
}), [model,
|
|
184
|
+
toParentMessage: currentToMessage,
|
|
185
|
+
}), [model, toParentMessage]);
|
|
178
186
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { init, update, view, lazy, titleId, descriptionId, Model, Message, Opened, Closed, CompletedShowDialog, CompletedCloseDialog, AdvancedTransitionFrame, EndedTransition, } from './index';
|
|
1
|
+
export { init, update, close, view, lazy, titleId, descriptionId, Model, Message, Opened, Closed, CompletedShowDialog, CompletedCloseDialog, AdvancedTransitionFrame, EndedTransition, RequestFrame, ShowDialog, CloseDialog, WaitForTransitions, } from './index';
|
|
2
2
|
export type { InitConfig, ViewConfig } from './index';
|
|
3
3
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/dialog/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,aAAa,EACb,KAAK,EACL,OAAO,EACP,MAAM,EACN,MAAM,EACN,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/dialog/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,aAAa,EACb,KAAK,EACL,OAAO,EACP,MAAM,EACN,MAAM,EACN,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,YAAY,EACZ,UAAU,EACV,WAAW,EACX,kBAAkB,GACnB,MAAM,SAAS,CAAA;AAEhB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
|
package/dist/ui/dialog/public.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { init, update, view, lazy, titleId, descriptionId, Model, Message, Opened, Closed, CompletedShowDialog, CompletedCloseDialog, AdvancedTransitionFrame, EndedTransition, } from './index';
|
|
1
|
+
export { init, update, close, view, lazy, titleId, descriptionId, Model, Message, Opened, Closed, CompletedShowDialog, CompletedCloseDialog, AdvancedTransitionFrame, EndedTransition, RequestFrame, ShowDialog, CloseDialog, WaitForTransitions, } from './index';
|
|
@@ -30,6 +30,7 @@ export type InitConfig = Readonly<{
|
|
|
30
30
|
}>;
|
|
31
31
|
/** Creates an initial disclosure model from a config. Defaults to closed. */
|
|
32
32
|
export declare const init: (config: InitConfig) => Model;
|
|
33
|
+
/** Moves focus to the disclosure's toggle button. */
|
|
33
34
|
export declare const FocusButton: Command.CommandDefinition<"FocusButton", {
|
|
34
35
|
readonly _tag: "CompletedFocusButton";
|
|
35
36
|
}>;
|
|
@@ -38,7 +39,8 @@ export declare const update: (model: Model, message: Message) => readonly [Model
|
|
|
38
39
|
/** Configuration for rendering a disclosure with `view`. */
|
|
39
40
|
export type ViewConfig<Message> = Readonly<{
|
|
40
41
|
model: Model;
|
|
41
|
-
|
|
42
|
+
toParentMessage: (message: Toggled | Closed | CompletedFocusButton) => Message;
|
|
43
|
+
onToggled?: () => Message;
|
|
42
44
|
buttonClassName?: string;
|
|
43
45
|
buttonAttributes?: ReadonlyArray<Attribute<Message>>;
|
|
44
46
|
buttonContent: Html;
|
|
@@ -52,9 +54,12 @@ export type ViewConfig<Message> = Readonly<{
|
|
|
52
54
|
className?: string;
|
|
53
55
|
attributes?: ReadonlyArray<Attribute<Message>>;
|
|
54
56
|
}>;
|
|
57
|
+
/** Programmatically toggles the disclosure, updating the model and returning
|
|
58
|
+
* focus commands. Use this in domain-event handlers when the disclosure uses `onToggled`. */
|
|
59
|
+
export declare const toggle: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
55
60
|
/** Renders a headless disclosure component with accessible ARIA attributes and keyboard support. */
|
|
56
61
|
export declare const view: <Message>(config: ViewConfig<Message>) => Html;
|
|
57
62
|
/** Creates a memoized disclosure view. Static config is captured in a closure;
|
|
58
|
-
* only `model` and `
|
|
59
|
-
export declare const lazy: <Message>(staticConfig: Omit<ViewConfig<Message>, "model" | "
|
|
63
|
+
* only `model` and `toParentMessage` are compared per render via `createLazy`. */
|
|
64
|
+
export declare const lazy: <Message>(staticConfig: Omit<ViewConfig<Message>, "model" | "toParentMessage" | "onToggled">) => ((model: Model, toParentMessage: ViewConfig<Message>["toParentMessage"]) => Html);
|
|
60
65
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-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AAO,KAAK,KACX,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CACjC,CAAA;AAE1B,oGAAoG;AACpG,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,QAAQ,UAAU,CAAC,OAAO,CAAC,KAAG,IAoG3D,CAAA;AAED;mFACmF;AACnF,eAAO,MAAM,IAAI,GAAI,OAAO,EAC1B,cAAc,IAAI,CAChB,UAAU,CAAC,OAAO,CAAC,EACnB,OAAO,GAAG,iBAAiB,GAAG,WAAW,CAC1C,KACA,CAAC,CACF,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,iBAAiB,CAAC,KACpD,IAAI,CAgBR,CAAA"}
|
|
@@ -28,6 +28,7 @@ export const init = (config) => ({
|
|
|
28
28
|
const buttonId = (id) => `${id}-button`;
|
|
29
29
|
const buttonSelector = (id) => `#${CSS.escape(buttonId(id))}`;
|
|
30
30
|
const panelId = (id) => `${id}-panel`;
|
|
31
|
+
/** Moves focus to the disclosure's toggle button. */
|
|
31
32
|
export const FocusButton = Command.define('FocusButton', CompletedFocusButton);
|
|
32
33
|
/** Processes a disclosure message and returns the next model and commands. */
|
|
33
34
|
export const update = (model, message) => M.value(message).pipe(M.withReturnType(), M.tagsExhaustive({
|
|
@@ -44,12 +45,16 @@ export const update = (model, message) => M.value(message).pipe(M.withReturnType
|
|
|
44
45
|
},
|
|
45
46
|
CompletedFocusButton: () => [model, []],
|
|
46
47
|
}));
|
|
48
|
+
/** Programmatically toggles the disclosure, updating the model and returning
|
|
49
|
+
* focus commands. Use this in domain-event handlers when the disclosure uses `onToggled`. */
|
|
50
|
+
export const toggle = (model) => update(model, Toggled());
|
|
47
51
|
/** Renders a headless disclosure component with accessible ARIA attributes and keyboard support. */
|
|
48
52
|
export const view = (config) => {
|
|
49
53
|
const { div, empty, AriaControls, AriaDisabled, AriaExpanded, Class, DataAttribute, Disabled, Hidden, Id, OnClick, OnKeyDownPreventDefault, Tabindex, Type, keyed, } = html();
|
|
50
|
-
const { model: { id, isOpen },
|
|
54
|
+
const { model: { id, isOpen }, toParentMessage, onToggled, buttonClassName, buttonAttributes = [], buttonContent, panelClassName, panelAttributes = [], panelContent, isDisabled, persistPanel, buttonElement = 'button', panelElement = 'div', className, attributes = [], } = config;
|
|
55
|
+
const dispatchToggled = () => onToggled ? onToggled() : toParentMessage(Toggled());
|
|
51
56
|
const isNativeButton = buttonElement === 'button';
|
|
52
|
-
const handleKeyDown = (key) => M.value(key).pipe(M.whenOr('Enter', ' ', () => Option.some(
|
|
57
|
+
const handleKeyDown = (key) => M.value(key).pipe(M.whenOr('Enter', ' ', () => Option.some(dispatchToggled())), M.orElse(() => Option.none()));
|
|
53
58
|
const disabledAttributes = [
|
|
54
59
|
Disabled(true),
|
|
55
60
|
AriaDisabled(true),
|
|
@@ -58,7 +63,7 @@ export const view = (config) => {
|
|
|
58
63
|
const interactionAttributes = isDisabled
|
|
59
64
|
? disabledAttributes
|
|
60
65
|
: [
|
|
61
|
-
OnClick(
|
|
66
|
+
OnClick(dispatchToggled()),
|
|
62
67
|
...(!isNativeButton ? [OnKeyDownPreventDefault(handleKeyDown)] : []),
|
|
63
68
|
];
|
|
64
69
|
const resolvedButtonAttributes = [
|
|
@@ -90,12 +95,12 @@ export const view = (config) => {
|
|
|
90
95
|
]);
|
|
91
96
|
};
|
|
92
97
|
/** Creates a memoized disclosure view. Static config is captured in a closure;
|
|
93
|
-
* only `model` and `
|
|
98
|
+
* only `model` and `toParentMessage` are compared per render via `createLazy`. */
|
|
94
99
|
export const lazy = (staticConfig) => {
|
|
95
100
|
const lazyView = createLazy();
|
|
96
|
-
return (model,
|
|
101
|
+
return (model, toParentMessage) => lazyView((currentModel, currentToMessage) => view({
|
|
97
102
|
...staticConfig,
|
|
98
103
|
model: currentModel,
|
|
99
|
-
|
|
100
|
-
}), [model,
|
|
104
|
+
toParentMessage: currentToMessage,
|
|
105
|
+
}), [model, toParentMessage]);
|
|
101
106
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { init, update, view, lazy, Model, Message } from './index';
|
|
2
|
-
export type {
|
|
1
|
+
export { init, update, toggle, view, lazy, Model, Message, Toggled, Closed, CompletedFocusButton, FocusButton, } from './index';
|
|
2
|
+
export type { InitConfig, ViewConfig } from './index';
|
|
3
3
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/disclosure/public.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/disclosure/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,oBAAoB,EACpB,WAAW,GACZ,MAAM,SAAS,CAAA;AAEhB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { init, update, view, lazy, Model, Message } from './index';
|
|
1
|
+
export { init, update, toggle, view, lazy, Model, Message, Toggled, Closed, CompletedFocusButton, FocusButton, } from './index';
|
|
@@ -153,7 +153,8 @@ export declare const view: <Message, Item>(config: Readonly<{
|
|
|
153
153
|
} & {
|
|
154
154
|
readonly selectedItems: readonly string[];
|
|
155
155
|
};
|
|
156
|
-
|
|
156
|
+
toParentMessage: (message: import("./shared").Opened | import("./shared").Closed | import("./shared").ClosedByTab | import("./shared").ActivatedItem | import("./shared").DeactivatedItem | import("./shared").SelectedItem | import("./shared").MovedPointerOverItem | import("./shared").RequestedItemClick | import("./shared").Searched | import("./shared").PressedPointerOnButton | import("./shared").IgnoredMouseClick | import("./shared").SuppressedSpaceScroll) => Message;
|
|
157
|
+
onSelectedItem?: (value: string) => Message;
|
|
157
158
|
items: readonly Item[];
|
|
158
159
|
itemToConfig: (item: Item, context: Readonly<{
|
|
159
160
|
isActive: boolean;
|
|
@@ -200,6 +201,6 @@ export declare const view: <Message, Item>(config: Readonly<{
|
|
|
200
201
|
isInvalid?: boolean;
|
|
201
202
|
}>) => Html;
|
|
202
203
|
/** Creates a memoized multi-select listbox view. Static config is captured in a closure;
|
|
203
|
-
* only `model` and `
|
|
204
|
-
export declare const lazy: <Message, Item>(staticConfig: Omit<ViewConfig<Message, Item>, "model" | "
|
|
204
|
+
* only `model` and `toParentMessage` are compared per render via `createLazy`. */
|
|
205
|
+
export declare const lazy: <Message, Item>(staticConfig: Omit<ViewConfig<Message, Item>, "model" | "toParentMessage" | "onSelectedItem">) => ((model: Model, toParentMessage: BaseViewConfig<Message, Item, Model>["toParentMessage"]) => Html);
|
|
205
206
|
//# sourceMappingURL=multi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/multi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,IAAI,CAAC,EAAQ,MAAM,QAAQ,CAAA;AAEzD,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,YAAY,CAAA;AAElD,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,cAAc,EAIpB,MAAM,UAAU,CAAA;AAIjB,iKAAiK;AACjK,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;GAEjB,CAAA;AAED,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,6RAA6R;AAC7R,MAAM,MAAM,UAAU,GAAG,cAAc,GACrC,QAAQ,CAAC;IACP,aAAa,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CACtC,CAAC,CAAA;AAEJ,4HAA4H;AAC5H,eAAO,MAAM,IAAI,GAAI,QAAQ,UAAU,KAAG,KAGxC,CAAA;AAIF,wJAAwJ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IAAI,EAAE,KAAK,CAAC,CAAA;AAE5E,0JAA0J;AAC1J,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAYf,CAAA;AAEF;mFACmF;AACnF,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,IAAI,EAChC,cAAc,IAAI,CAChB,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,EACzB,OAAO,GAAG,iBAAiB,GAAG,gBAAgB,CAC/C,KACA,CAAC,CACF,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,iBAAiB,CAAC,KACrE,IAAI,CAoBR,CAAA"}
|
package/dist/ui/listbox/multi.js
CHANGED
|
@@ -25,12 +25,12 @@ export const view = makeView({
|
|
|
25
25
|
ariaMultiSelectable: true,
|
|
26
26
|
});
|
|
27
27
|
/** Creates a memoized multi-select listbox view. Static config is captured in a closure;
|
|
28
|
-
* only `model` and `
|
|
28
|
+
* only `model` and `toParentMessage` are compared per render via `createLazy`. */
|
|
29
29
|
export const lazy = (staticConfig) => {
|
|
30
30
|
const lazyView = createLazy();
|
|
31
|
-
return (model,
|
|
31
|
+
return (model, toParentMessage) => lazyView((currentModel, currentToMessage) => view({
|
|
32
32
|
...staticConfig,
|
|
33
33
|
model: currentModel,
|
|
34
|
-
|
|
35
|
-
}), [model,
|
|
34
|
+
toParentMessage: currentToMessage,
|
|
35
|
+
}), [model, toParentMessage]);
|
|
36
36
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { init, update, view, lazy, Model } from './single';
|
|
2
|
-
export { Message, Orientation } from './shared';
|
|
1
|
+
export { init, update, selectItem, view, lazy, Model } from './single';
|
|
2
|
+
export { Message, Orientation, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusButton, CompletedFocusItems, CompletedScrollIntoView, CompletedClickItem, ClearedSearch, AdvancedTransitionFrame, EndedTransition, DetectedButtonMovement, RequestFrame, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusButton, FocusItems, ScrollIntoView, ClickItem, DelayClearSearch, WaitForTransitions, DetectMovementOrTransitionEnd, } from './shared';
|
|
3
3
|
export { TransitionState } from '../transition';
|
|
4
|
-
export type { ActivationTrigger, Opened, Closed, ClosedByTab, ActivatedItem, DeactivatedItem,
|
|
4
|
+
export type { ActivationTrigger, Opened, Closed, ClosedByTab, ActivatedItem, DeactivatedItem, MovedPointerOverItem, RequestedItemClick, Searched, PressedPointerOnButton, IgnoredMouseClick, SuppressedSpaceScroll, ItemConfig, GroupHeading, } from './shared';
|
|
5
5
|
export type { InitConfig, ViewConfig } from './single';
|
|
6
6
|
export type { AnchorConfig } from '../anchor';
|
|
7
7
|
export * as Multi from './multiPublic';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAEtE,OAAO,EACL,OAAO,EACP,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAW,EACX,UAAU,EACV,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,UAAU,CAAA;AAEjB,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,YAAY,EACV,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,WAAW,EACX,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EACR,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,YAAY,GACb,MAAM,UAAU,CAAA;AAEjB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAEtD,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { init, update, view, lazy, Model } from './single';
|
|
2
|
-
export { Message, Orientation } from './shared';
|
|
1
|
+
export { init, update, selectItem, view, lazy, Model } from './single';
|
|
2
|
+
export { Message, Orientation, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusButton, CompletedFocusItems, CompletedScrollIntoView, CompletedClickItem, ClearedSearch, AdvancedTransitionFrame, EndedTransition, DetectedButtonMovement, RequestFrame, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusButton, FocusItems, ScrollIntoView, ClickItem, DelayClearSearch, WaitForTransitions, DetectMovementOrTransitionEnd, } from './shared';
|
|
3
3
|
export { TransitionState } from '../transition';
|
|
4
4
|
export * as Multi from './multiPublic';
|
|
@@ -164,40 +164,52 @@ type SelectedItemContext = Readonly<{
|
|
|
164
164
|
maybeUnlockScroll: Option.Option<Command.Command<Message>>;
|
|
165
165
|
maybeRestoreInert: Option.Option<Command.Command<Message>>;
|
|
166
166
|
}>;
|
|
167
|
+
/** Advances the listbox's enter/leave transition by waiting a double-rAF. */
|
|
167
168
|
export declare const RequestFrame: Command.CommandDefinition<"RequestFrame", {
|
|
168
169
|
readonly _tag: "AdvancedTransitionFrame";
|
|
169
170
|
}>;
|
|
171
|
+
/** Prevents page scrolling while the listbox is open in modal mode. */
|
|
170
172
|
export declare const LockScroll: Command.CommandDefinition<"LockScroll", {
|
|
171
173
|
readonly _tag: "CompletedLockScroll";
|
|
172
174
|
}>;
|
|
175
|
+
/** Re-enables page scrolling after the listbox closes. */
|
|
173
176
|
export declare const UnlockScroll: Command.CommandDefinition<"UnlockScroll", {
|
|
174
177
|
readonly _tag: "CompletedUnlockScroll";
|
|
175
178
|
}>;
|
|
179
|
+
/** Marks all elements outside the listbox as inert for modal behavior. */
|
|
176
180
|
export declare const InertOthers: Command.CommandDefinition<"InertOthers", {
|
|
177
181
|
readonly _tag: "CompletedSetupInert";
|
|
178
182
|
}>;
|
|
183
|
+
/** Removes the inert attribute from elements outside the listbox. */
|
|
179
184
|
export declare const RestoreInert: Command.CommandDefinition<"RestoreInert", {
|
|
180
185
|
readonly _tag: "CompletedTeardownInert";
|
|
181
186
|
}>;
|
|
187
|
+
/** Moves focus back to the listbox button after closing. */
|
|
182
188
|
export declare const FocusButton: Command.CommandDefinition<"FocusButton", {
|
|
183
189
|
readonly _tag: "CompletedFocusButton";
|
|
184
190
|
}>;
|
|
191
|
+
/** Moves focus to the listbox items container after opening. */
|
|
185
192
|
export declare const FocusItems: Command.CommandDefinition<"FocusItems", {
|
|
186
193
|
readonly _tag: "CompletedFocusItems";
|
|
187
194
|
}>;
|
|
195
|
+
/** Scrolls the active listbox item into view after keyboard navigation. */
|
|
188
196
|
export declare const ScrollIntoView: Command.CommandDefinition<"ScrollIntoView", {
|
|
189
197
|
readonly _tag: "CompletedScrollIntoView";
|
|
190
198
|
}>;
|
|
199
|
+
/** Programmatically clicks the active listbox item's DOM element. */
|
|
191
200
|
export declare const ClickItem: Command.CommandDefinition<"ClickItem", {
|
|
192
201
|
readonly _tag: "CompletedClickItem";
|
|
193
202
|
}>;
|
|
203
|
+
/** Waits for the typeahead search debounce period before clearing the query. */
|
|
194
204
|
export declare const DelayClearSearch: Command.CommandDefinition<"DelayClearSearch", {
|
|
195
205
|
readonly _tag: "ClearedSearch";
|
|
196
206
|
readonly version: number;
|
|
197
207
|
}>;
|
|
208
|
+
/** Waits for all CSS transitions on the listbox items container to complete. */
|
|
198
209
|
export declare const WaitForTransitions: Command.CommandDefinition<"WaitForTransitions", {
|
|
199
210
|
readonly _tag: "EndedTransition";
|
|
200
211
|
}>;
|
|
212
|
+
/** Detects whether the listbox button moved or the leave transition ended — whichever comes first. */
|
|
201
213
|
export declare const DetectMovementOrTransitionEnd: Command.CommandDefinition<"DetectMovementOrTransitionEnd", {
|
|
202
214
|
readonly _tag: "EndedTransition";
|
|
203
215
|
} | {
|
|
@@ -281,7 +293,8 @@ export type GroupHeading = Readonly<{
|
|
|
281
293
|
/** Configuration for rendering a listbox with `view`. */
|
|
282
294
|
export type BaseViewConfig<Message, Item, Model extends BaseModel> = Readonly<{
|
|
283
295
|
model: Model;
|
|
284
|
-
|
|
296
|
+
toParentMessage: (message: Opened | Closed | ClosedByTab | ActivatedItem | DeactivatedItem | SelectedItem | MovedPointerOverItem | RequestedItemClick | Searched | PressedPointerOnButton | IgnoredMouseClick | SuppressedSpaceScroll) => Message;
|
|
297
|
+
onSelectedItem?: (value: string) => Message;
|
|
285
298
|
items: ReadonlyArray<Item>;
|
|
286
299
|
itemToConfig: (item: Item, context: Readonly<{
|
|
287
300
|
isActive: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAEN,MAAM,EAEN,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,eAAe,CAAA;AAExC,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAQ,MAAM,YAAY,CAAA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@ export const closedModel = (model) => constrainedEvo(model, {
|
|
|
134
134
|
maybeLastPointerPosition: () => Option.none(),
|
|
135
135
|
maybeLastButtonPointerType: () => Option.none(),
|
|
136
136
|
});
|
|
137
|
+
/** Advances the listbox's enter/leave transition by waiting a double-rAF. */
|
|
137
138
|
export const RequestFrame = Command.define('RequestFrame', AdvancedTransitionFrame);
|
|
139
|
+
/** Prevents page scrolling while the listbox is open in modal mode. */
|
|
138
140
|
export const LockScroll = Command.define('LockScroll', CompletedLockScroll);
|
|
141
|
+
/** Re-enables page scrolling after the listbox closes. */
|
|
139
142
|
export const UnlockScroll = Command.define('UnlockScroll', CompletedUnlockScroll);
|
|
143
|
+
/** Marks all elements outside the listbox as inert for modal behavior. */
|
|
140
144
|
export const InertOthers = Command.define('InertOthers', CompletedSetupInert);
|
|
145
|
+
/** Removes the inert attribute from elements outside the listbox. */
|
|
141
146
|
export const RestoreInert = Command.define('RestoreInert', CompletedTeardownInert);
|
|
147
|
+
/** Moves focus back to the listbox button after closing. */
|
|
142
148
|
export const FocusButton = Command.define('FocusButton', CompletedFocusButton);
|
|
149
|
+
/** Moves focus to the listbox items container after opening. */
|
|
143
150
|
export const FocusItems = Command.define('FocusItems', CompletedFocusItems);
|
|
151
|
+
/** Scrolls the active listbox item into view after keyboard navigation. */
|
|
144
152
|
export const ScrollIntoView = Command.define('ScrollIntoView', CompletedScrollIntoView);
|
|
153
|
+
/** Programmatically clicks the active listbox item's DOM element. */
|
|
145
154
|
export const ClickItem = Command.define('ClickItem', CompletedClickItem);
|
|
155
|
+
/** Waits for the typeahead search debounce period before clearing the query. */
|
|
146
156
|
export const DelayClearSearch = Command.define('DelayClearSearch', ClearedSearch);
|
|
157
|
+
/** Waits for all CSS transitions on the listbox items container to complete. */
|
|
147
158
|
export const WaitForTransitions = Command.define('WaitForTransitions', EndedTransition);
|
|
159
|
+
/** Detects whether the listbox button moved or the leave transition ended — whichever comes first. */
|
|
148
160
|
export const DetectMovementOrTransitionEnd = Command.define('DetectMovementOrTransitionEnd', DetectedButtonMovement, EndedTransition);
|
|
149
161
|
export const makeUpdate = (handleSelectedItem) => {
|
|
150
162
|
const withUpdateReturn = M.withReturnType();
|
|
@@ -335,9 +347,12 @@ export const makeUpdate = (handleSelectedItem) => {
|
|
|
335
347
|
};
|
|
336
348
|
export const makeView = (behavior) => (config) => {
|
|
337
349
|
const { div, input, AriaActiveDescendant, AriaControls, AriaDisabled, AriaExpanded, AriaHasPopup, AriaLabelledBy, AriaMultiSelectable, AriaOrientation, AriaSelected, Attribute, Class, DataAttribute, Id, Name, OnBlur, OnClick, OnDestroy, OnInsert, OnKeyDownPreventDefault, OnKeyUpPreventDefault, OnPointerDown, OnPointerLeave, OnPointerMove, Role, Style, Tabindex, Type, Value, keyed, } = html();
|
|
338
|
-
const { model: { id, isOpen, orientation, transitionState, maybeActiveItemIndex, searchQuery, maybeLastButtonPointerType, },
|
|
350
|
+
const { model: { id, isOpen, orientation, transitionState, maybeActiveItemIndex, searchQuery, maybeLastButtonPointerType, }, toParentMessage, onSelectedItem, items, itemToConfig, isItemDisabled, isButtonDisabled, buttonContent, buttonClassName, buttonAttributes = [], itemsClassName, itemsAttributes = [], itemsScrollClassName, itemsScrollAttributes = [], backdropClassName, backdropAttributes = [], className, attributes = [], itemGroupKey, groupToHeading, groupClassName, groupAttributes = [], separatorClassName, separatorAttributes = [], anchor, name, form, isDisabled, isInvalid, } = config;
|
|
339
351
|
const itemToValue = config.itemToValue ?? (item => String(item));
|
|
340
352
|
const itemToSearchText = config.itemToSearchText ?? (item => itemToValue(item));
|
|
353
|
+
const dispatchSelectedItem = (value) => onSelectedItem
|
|
354
|
+
? onSelectedItem(value)
|
|
355
|
+
: toParentMessage(SelectedItem({ item: value }));
|
|
341
356
|
const isLeaving = transitionState === 'LeaveStart' || transitionState === 'LeaveAnimating';
|
|
342
357
|
const isVisible = isOpen || isLeaving;
|
|
343
358
|
const transitionAttributes = M.value(transitionState).pipe(M.when('EnterStart', () => [
|
|
@@ -372,28 +387,28 @@ export const makeView = (behavior) => (config) => {
|
|
|
372
387
|
const firstEnabledIndex = findFirstEnabledIndex(items.length, 0, isItemDisabledByIndex)(0, 1);
|
|
373
388
|
const lastEnabledIndex = findFirstEnabledIndex(items.length, 0, isItemDisabledByIndex)(items.length - 1, -1);
|
|
374
389
|
const selectedItemIndex = behavior.selectedItemIndex(config.model, items, itemToValue);
|
|
375
|
-
const handleButtonKeyDown = (key) => M.value(key).pipe(M.whenOr('Enter', ' ', 'ArrowDown', () => Option.some(
|
|
390
|
+
const handleButtonKeyDown = (key) => M.value(key).pipe(M.whenOr('Enter', ' ', 'ArrowDown', () => Option.some(toParentMessage(Opened({
|
|
376
391
|
maybeActiveItemIndex: Option.orElse(selectedItemIndex, () => Option.some(firstEnabledIndex)),
|
|
377
|
-
})))), M.when('ArrowUp', () => Option.some(
|
|
392
|
+
})))), M.when('ArrowUp', () => Option.some(toParentMessage(Opened({
|
|
378
393
|
maybeActiveItemIndex: Option.orElse(selectedItemIndex, () => Option.some(lastEnabledIndex)),
|
|
379
394
|
})))), M.orElse(() => Option.none()));
|
|
380
|
-
const handleButtonPointerDown = (pointerType, button) => Option.some(
|
|
395
|
+
const handleButtonPointerDown = (pointerType, button) => Option.some(toParentMessage(PressedPointerOnButton({
|
|
381
396
|
pointerType,
|
|
382
397
|
button,
|
|
383
398
|
})));
|
|
384
399
|
const handleButtonClick = () => {
|
|
385
400
|
const isMouse = Option.exists(maybeLastButtonPointerType, type => type === 'mouse');
|
|
386
401
|
if (isMouse) {
|
|
387
|
-
return
|
|
402
|
+
return toParentMessage(IgnoredMouseClick());
|
|
388
403
|
}
|
|
389
404
|
else if (isOpen) {
|
|
390
|
-
return
|
|
405
|
+
return toParentMessage(Closed());
|
|
391
406
|
}
|
|
392
407
|
else {
|
|
393
|
-
return
|
|
408
|
+
return toParentMessage(Opened({ maybeActiveItemIndex: Option.none() }));
|
|
394
409
|
}
|
|
395
410
|
};
|
|
396
|
-
const handleSpaceKeyUp = (key) => OptionExt.when(key === ' ',
|
|
411
|
+
const handleSpaceKeyUp = (key) => OptionExt.when(key === ' ', toParentMessage(SuppressedSpaceScroll()));
|
|
397
412
|
const resolveActiveIndex = (key) => Option.match(maybeActiveItemIndex, {
|
|
398
413
|
onNone: () => M.value(key).pipe(M.whenOr(previousKey, 'End', 'PageDown', () => lastEnabledIndex), M.orElse(() => firstEnabledIndex)),
|
|
399
414
|
onSome: activeIndex => keyToIndex(nextKey, previousKey, items.length, activeIndex, isItemDisabledByIndex)(key),
|
|
@@ -401,11 +416,11 @@ export const makeView = (behavior) => (config) => {
|
|
|
401
416
|
const searchForKey = (key) => {
|
|
402
417
|
const nextQuery = searchQuery + key;
|
|
403
418
|
const maybeTargetIndex = resolveTypeaheadMatch(items, nextQuery, maybeActiveItemIndex, isItemDisabledByIndex, itemToSearchText, Str.isNonEmpty(searchQuery));
|
|
404
|
-
return Option.some(
|
|
419
|
+
return Option.some(toParentMessage(Searched({ key, maybeTargetIndex })));
|
|
405
420
|
};
|
|
406
|
-
const handleItemsKeyDown = (key) => M.value(key).pipe(M.when('Escape', () => Option.some(
|
|
421
|
+
const handleItemsKeyDown = (key) => M.value(key).pipe(M.when('Escape', () => Option.some(toParentMessage(Closed()))), M.when('Enter', () => Option.map(maybeActiveItemIndex, index => toParentMessage(RequestedItemClick({ index })))), M.when(' ', () => Str.isNonEmpty(searchQuery)
|
|
407
422
|
? searchForKey(' ')
|
|
408
|
-
: Option.map(maybeActiveItemIndex, index =>
|
|
423
|
+
: Option.map(maybeActiveItemIndex, index => toParentMessage(RequestedItemClick({ index })))), M.when(isNavigationKey, () => Option.some(toParentMessage(ActivatedItem({
|
|
409
424
|
index: resolveActiveIndex(key),
|
|
410
425
|
activationTrigger: 'Keyboard',
|
|
411
426
|
})))), M.when(isPrintableKey, () => searchForKey(key)), M.orElse(() => Option.none()));
|
|
@@ -457,7 +472,7 @@ export const makeView = (behavior) => (config) => {
|
|
|
457
472
|
: [
|
|
458
473
|
OnKeyDownPreventDefault(handleItemsKeyDown),
|
|
459
474
|
OnKeyUpPreventDefault(handleSpaceKeyUp),
|
|
460
|
-
OnBlur(
|
|
475
|
+
OnBlur(toParentMessage(ClosedByTab())),
|
|
461
476
|
]),
|
|
462
477
|
...(itemsClassName ? [Class(itemsClassName)] : []),
|
|
463
478
|
...itemsAttributes,
|
|
@@ -483,13 +498,13 @@ export const makeView = (behavior) => (config) => {
|
|
|
483
498
|
: []),
|
|
484
499
|
...(isInteractive
|
|
485
500
|
? [
|
|
486
|
-
OnClick(
|
|
501
|
+
OnClick(dispatchSelectedItem(itemToValue(item))),
|
|
487
502
|
...(isActiveItem
|
|
488
503
|
? []
|
|
489
504
|
: [
|
|
490
|
-
OnPointerMove((screenX, screenY, pointerType) => OptionExt.when(pointerType !== 'touch',
|
|
505
|
+
OnPointerMove((screenX, screenY, pointerType) => OptionExt.when(pointerType !== 'touch', toParentMessage(MovedPointerOverItem({ index, screenX, screenY })))),
|
|
491
506
|
]),
|
|
492
|
-
OnPointerLeave(pointerType => OptionExt.when(pointerType !== 'touch',
|
|
507
|
+
OnPointerLeave(pointerType => OptionExt.when(pointerType !== 'touch', toParentMessage(DeactivatedItem()))),
|
|
493
508
|
]
|
|
494
509
|
: []),
|
|
495
510
|
...(itemConfig.className ? [Class(itemConfig.className)] : []),
|
|
@@ -538,7 +553,7 @@ export const makeView = (behavior) => (config) => {
|
|
|
538
553
|
});
|
|
539
554
|
};
|
|
540
555
|
const backdrop = keyed('div')(`${id}-backdrop`, [
|
|
541
|
-
...(isLeaving ? [] : [OnClick(
|
|
556
|
+
...(isLeaving ? [] : [OnClick(toParentMessage(Closed()))]),
|
|
542
557
|
...(backdropClassName ? [Class(backdropClassName)] : []),
|
|
543
558
|
...backdropAttributes,
|
|
544
559
|
], []);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Option, Schema as S } from 'effect';
|
|
2
|
+
import type * as Command from '../../command';
|
|
2
3
|
import { type Html } from '../../html';
|
|
3
|
-
import { type BaseInitConfig, type BaseViewConfig } from './shared';
|
|
4
|
+
import { type BaseInitConfig, type BaseViewConfig, type Message, SelectedItem } from './shared';
|
|
4
5
|
/** Schema for the listbox component's state, tracking open/closed status, active item, selected item, activation trigger, and typeahead search. */
|
|
5
6
|
export declare const Model: S.extend<S.Struct<{
|
|
6
7
|
id: typeof S.String;
|
|
@@ -47,7 +48,7 @@ export declare const update: (model: {
|
|
|
47
48
|
readonly maybeLastButtonPointerType: Option.Option<string>;
|
|
48
49
|
} & {
|
|
49
50
|
readonly maybeSelectedItem: Option.Option<string>;
|
|
50
|
-
}, message:
|
|
51
|
+
}, message: Message) => readonly [{
|
|
51
52
|
readonly id: string;
|
|
52
53
|
readonly orientation: "Horizontal" | "Vertical";
|
|
53
54
|
readonly isOpen: boolean;
|
|
@@ -130,6 +131,9 @@ export declare const update: (model: {
|
|
|
130
131
|
readonly pointerType: string;
|
|
131
132
|
}, never, never>;
|
|
132
133
|
}>[]];
|
|
134
|
+
/** Programmatically selects an item in the single-select listbox, closing the listbox and returning
|
|
135
|
+
* focus commands. Use this in domain-event handlers when the listbox uses `onSelectedItem`. */
|
|
136
|
+
export declare const selectItem: (model: Model, item: string) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
133
137
|
/** Configuration for rendering a single-select listbox with `view`. */
|
|
134
138
|
export type ViewConfig<Message, Item> = BaseViewConfig<Message, Item, Model>;
|
|
135
139
|
/** Renders a headless single-select listbox with typeahead search, keyboard navigation, selection tracking, and aria-activedescendant focus management. */
|
|
@@ -153,7 +157,8 @@ export declare const view: <Message, Item>(config: Readonly<{
|
|
|
153
157
|
} & {
|
|
154
158
|
readonly maybeSelectedItem: Option.Option<string>;
|
|
155
159
|
};
|
|
156
|
-
|
|
160
|
+
toParentMessage: (message: import("./shared").Opened | import("./shared").Closed | import("./shared").ClosedByTab | import("./shared").ActivatedItem | import("./shared").DeactivatedItem | SelectedItem | import("./shared").MovedPointerOverItem | import("./shared").RequestedItemClick | import("./shared").Searched | import("./shared").PressedPointerOnButton | import("./shared").IgnoredMouseClick | import("./shared").SuppressedSpaceScroll) => Message;
|
|
161
|
+
onSelectedItem?: (value: string) => Message;
|
|
157
162
|
items: readonly Item[];
|
|
158
163
|
itemToConfig: (item: Item, context: Readonly<{
|
|
159
164
|
isActive: boolean;
|
|
@@ -200,6 +205,6 @@ export declare const view: <Message, Item>(config: Readonly<{
|
|
|
200
205
|
isInvalid?: boolean;
|
|
201
206
|
}>) => Html;
|
|
202
207
|
/** Creates a memoized single-select listbox view. Static config is captured in a closure;
|
|
203
|
-
* only `model` and `
|
|
204
|
-
export declare const lazy: <Message, Item>(staticConfig: Omit<ViewConfig<Message, Item>, "model" | "
|
|
208
|
+
* only `model` and `toParentMessage` are compared per render via `createLazy`. */
|
|
209
|
+
export declare const lazy: <Message, Item>(staticConfig: Omit<ViewConfig<Message, Item>, "model" | "toParentMessage" | "onSelectedItem">) => ((model: Model, toParentMessage: BaseViewConfig<Message, Item, Model>["toParentMessage"]) => Html);
|
|
205
210
|
//# sourceMappingURL=single.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/single.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,IAAI,CAAC,EAAQ,MAAM,QAAQ,CAAA;AAEzD,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,YAAY,CAAA;AAElD,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"single.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/single.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,IAAI,CAAC,EAAQ,MAAM,QAAQ,CAAA;AAEzD,OAAO,KAAK,KAAK,OAAO,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,YAAY,CAAA;AAElD,OAAO,EACL,KAAK,c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,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,iBAAiB,CAAC,KACrE,IAAI,CAoBR,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Array, Option, Schema as S, pipe } from 'effect';
|
|
2
2
|
import { createLazy } from '../../html';
|
|
3
3
|
import { evo } from '../../struct';
|
|
4
|
-
import { BaseModel, baseInit, closedModel, makeUpdate, makeView, } from './shared';
|
|
4
|
+
import { BaseModel, SelectedItem, baseInit, closedModel, makeUpdate, makeView, } from './shared';
|
|
5
5
|
// MODEL
|
|
6
6
|
/** Schema for the listbox component's state, tracking open/closed status, active item, selected item, activation trigger, and typeahead search. */
|
|
7
7
|
export const Model = BaseModel.pipe(S.extend(S.Struct({ maybeSelectedItem: S.OptionFromSelf(S.String) })));
|
|
@@ -22,6 +22,9 @@ export const update = makeUpdate((model, item, context) => [
|
|
|
22
22
|
context.maybeRestoreInert,
|
|
23
23
|
]), Array.prepend(context.focusButton)),
|
|
24
24
|
]);
|
|
25
|
+
/** Programmatically selects an item in the single-select listbox, closing the listbox and returning
|
|
26
|
+
* focus commands. Use this in domain-event handlers when the listbox uses `onSelectedItem`. */
|
|
27
|
+
export const selectItem = (model, item) => update(model, SelectedItem({ item }));
|
|
25
28
|
/** Renders a headless single-select listbox with typeahead search, keyboard navigation, selection tracking, and aria-activedescendant focus management. */
|
|
26
29
|
export const view = makeView({
|
|
27
30
|
isItemSelected: (model, itemValue) => Option.exists(model.maybeSelectedItem, selectedItem => selectedItem === itemValue),
|
|
@@ -29,12 +32,12 @@ export const view = makeView({
|
|
|
29
32
|
ariaMultiSelectable: false,
|
|
30
33
|
});
|
|
31
34
|
/** Creates a memoized single-select listbox view. Static config is captured in a closure;
|
|
32
|
-
* only `model` and `
|
|
35
|
+
* only `model` and `toParentMessage` are compared per render via `createLazy`. */
|
|
33
36
|
export const lazy = (staticConfig) => {
|
|
34
37
|
const lazyView = createLazy();
|
|
35
|
-
return (model,
|
|
38
|
+
return (model, toParentMessage) => lazyView((currentModel, currentToMessage) => view({
|
|
36
39
|
...staticConfig,
|
|
37
40
|
model: currentModel,
|
|
38
|
-
|
|
39
|
-
}), [model,
|
|
41
|
+
toParentMessage: currentToMessage,
|
|
42
|
+
}), [model, toParentMessage]);
|
|
40
43
|
};
|