foldkit 0.25.0 → 0.27.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/README.md +70 -55
- package/dist/fieldValidation/index.d.ts +39 -29
- package/dist/fieldValidation/index.d.ts.map +1 -1
- package/dist/fieldValidation/index.js +23 -24
- package/dist/fieldValidation/public.d.ts +2 -2
- package/dist/fieldValidation/public.d.ts.map +1 -1
- package/dist/fieldValidation/public.js +1 -1
- package/dist/html/index.d.ts +2 -9
- package/dist/html/index.d.ts.map +1 -1
- package/dist/html/public.d.ts +1 -1
- package/dist/html/public.d.ts.map +1 -1
- package/dist/ui/anchor.d.ts +19 -0
- package/dist/ui/anchor.d.ts.map +1 -0
- package/dist/ui/{menu/anchor.js → anchor.js} +3 -2
- package/dist/ui/combobox/multi.d.ts +178 -0
- package/dist/ui/combobox/multi.d.ts.map +1 -0
- package/dist/ui/combobox/multi.js +53 -0
- package/dist/ui/combobox/multiPublic.d.ts +3 -0
- package/dist/ui/combobox/multiPublic.d.ts.map +1 -0
- package/dist/ui/combobox/multiPublic.js +1 -0
- package/dist/ui/combobox/public.d.ts +8 -0
- package/dist/ui/combobox/public.d.ts.map +1 -0
- package/dist/ui/combobox/public.js +4 -0
- package/dist/ui/combobox/shared.d.ts +236 -0
- package/dist/ui/combobox/shared.d.ts.map +1 -0
- package/dist/ui/combobox/shared.js +560 -0
- package/dist/ui/combobox/single.d.ts +183 -0
- package/dist/ui/combobox/single.d.ts.map +1 -0
- package/dist/ui/combobox/single.js +73 -0
- package/dist/ui/dialog/index.d.ts +3 -0
- package/dist/ui/dialog/index.d.ts.map +1 -1
- package/dist/ui/dialog/index.js +11 -0
- 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 +3 -0
- package/dist/ui/disclosure/index.d.ts.map +1 -1
- package/dist/ui/disclosure/index.js +11 -0
- package/dist/ui/disclosure/public.d.ts +1 -1
- package/dist/ui/disclosure/public.d.ts.map +1 -1
- package/dist/ui/disclosure/public.js +1 -1
- package/dist/ui/index.d.ts +3 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +3 -0
- package/dist/ui/listbox/multi.d.ts +26 -21
- package/dist/ui/listbox/multi.d.ts.map +1 -1
- package/dist/ui/listbox/multi.js +11 -0
- package/dist/ui/listbox/multiPublic.d.ts +1 -1
- package/dist/ui/listbox/multiPublic.d.ts.map +1 -1
- package/dist/ui/listbox/multiPublic.js +1 -1
- package/dist/ui/listbox/public.d.ts +4 -3
- package/dist/ui/listbox/public.d.ts.map +1 -1
- package/dist/ui/listbox/public.js +3 -2
- package/dist/ui/listbox/shared.d.ts +10 -12
- package/dist/ui/listbox/shared.d.ts.map +1 -1
- package/dist/ui/listbox/shared.js +12 -6
- package/dist/ui/listbox/single.d.ts +26 -21
- package/dist/ui/listbox/single.d.ts.map +1 -1
- package/dist/ui/listbox/single.js +11 -0
- package/dist/ui/menu/index.d.ts +5 -4
- package/dist/ui/menu/index.d.ts.map +1 -1
- package/dist/ui/menu/index.js +23 -6
- package/dist/ui/menu/public.d.ts +3 -2
- package/dist/ui/menu/public.d.ts.map +1 -1
- package/dist/ui/menu/public.js +2 -1
- package/dist/ui/popover/index.d.ts +78 -0
- package/dist/ui/popover/index.d.ts.map +1 -0
- package/dist/ui/popover/index.js +248 -0
- package/dist/ui/popover/public.d.ts +5 -0
- package/dist/ui/popover/public.d.ts.map +1 -0
- package/dist/ui/popover/public.js +2 -0
- package/dist/ui/switch/index.d.ts +50 -0
- package/dist/ui/switch/index.d.ts.map +1 -0
- package/dist/ui/switch/index.js +77 -0
- package/dist/ui/switch/public.d.ts +3 -0
- package/dist/ui/switch/public.d.ts.map +1 -0
- package/dist/ui/switch/public.js +1 -0
- package/dist/ui/tabs/index.d.ts +3 -0
- package/dist/ui/tabs/index.d.ts.map +1 -1
- package/dist/ui/tabs/index.js +11 -0
- package/dist/ui/tabs/public.d.ts +1 -1
- package/dist/ui/tabs/public.d.ts.map +1 -1
- package/dist/ui/tabs/public.js +1 -1
- package/dist/ui/transition.d.ts +5 -0
- package/dist/ui/transition.d.ts.map +1 -0
- package/dist/ui/transition.js +3 -0
- package/package.json +14 -2
- package/dist/ui/menu/anchor.d.ts +0 -18
- package/dist/ui/menu/anchor.d.ts.map +0 -1
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { Option, Schema as S } from 'effect';
|
|
2
2
|
import type { Command } from '../../command';
|
|
3
3
|
import { type Html } from '../../html';
|
|
4
|
-
import type { AnchorConfig } from '../
|
|
4
|
+
import type { AnchorConfig } from '../anchor';
|
|
5
5
|
import { resolveTypeaheadMatch } from '../typeahead';
|
|
6
6
|
export { resolveTypeaheadMatch };
|
|
7
7
|
/** Schema for the activation trigger — whether the user interacted via mouse or keyboard. */
|
|
8
8
|
export declare const ActivationTrigger: S.Literal<["Pointer", "Keyboard"]>;
|
|
9
9
|
export type ActivationTrigger = typeof ActivationTrigger.Type;
|
|
10
|
-
/** Schema for the transition animation state, tracking enter/leave phases for CSS transition coordination. */
|
|
11
|
-
export declare const TransitionState: S.Literal<["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
12
|
-
export type TransitionState = typeof TransitionState.Type;
|
|
13
10
|
/** Schema for the listbox orientation — whether items flow vertically or horizontally. */
|
|
14
11
|
export declare const Orientation: S.Literal<["Vertical", "Horizontal"]>;
|
|
15
12
|
export type Orientation = typeof Orientation.Type;
|
|
@@ -146,19 +143,23 @@ type SelectedItemContext = Readonly<{
|
|
|
146
143
|
}>;
|
|
147
144
|
export declare const makeUpdate: <Model extends BaseModel>(handleSelectedItem: (model: Model, item: string, context: SelectedItemContext) => [Model, ReadonlyArray<Command<Message>>]) => (model: Model, message: Message) => [Model, readonly Command<{
|
|
148
145
|
readonly _tag: "Closed";
|
|
146
|
+
} | {
|
|
147
|
+
readonly _tag: "ClosedByTab";
|
|
148
|
+
} | {
|
|
149
|
+
readonly _tag: "DeactivatedItem";
|
|
149
150
|
} | {
|
|
150
151
|
readonly _tag: "NoOp";
|
|
152
|
+
} | {
|
|
153
|
+
readonly _tag: "AdvancedTransitionFrame";
|
|
154
|
+
} | {
|
|
155
|
+
readonly _tag: "EndedTransition";
|
|
151
156
|
} | {
|
|
152
157
|
readonly _tag: "Opened";
|
|
153
158
|
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
154
|
-
} | {
|
|
155
|
-
readonly _tag: "ClosedByTab";
|
|
156
159
|
} | {
|
|
157
160
|
readonly _tag: "ActivatedItem";
|
|
158
161
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
159
162
|
readonly index: number;
|
|
160
|
-
} | {
|
|
161
|
-
readonly _tag: "DeactivatedItem";
|
|
162
163
|
} | {
|
|
163
164
|
readonly _tag: "SelectedItem";
|
|
164
165
|
readonly item: string;
|
|
@@ -177,10 +178,6 @@ export declare const makeUpdate: <Model extends BaseModel>(handleSelectedItem: (
|
|
|
177
178
|
} | {
|
|
178
179
|
readonly _tag: "ClearedSearch";
|
|
179
180
|
readonly version: number;
|
|
180
|
-
} | {
|
|
181
|
-
readonly _tag: "AdvancedTransitionFrame";
|
|
182
|
-
} | {
|
|
183
|
-
readonly _tag: "EndedTransition";
|
|
184
181
|
} | {
|
|
185
182
|
readonly _tag: "DetectedButtonMovement";
|
|
186
183
|
} | {
|
|
@@ -215,6 +212,7 @@ export type BaseViewConfig<Message, Item, Model extends BaseModel> = Readonly<{
|
|
|
215
212
|
buttonContent: Html;
|
|
216
213
|
buttonClassName: string;
|
|
217
214
|
itemsClassName: string;
|
|
215
|
+
itemsScrollClassName?: string;
|
|
218
216
|
backdropClassName: string;
|
|
219
217
|
className?: string;
|
|
220
218
|
itemGroupKey?: (item: Item, index: number) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/shared.ts"],"names":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AAM,KAAK,OAAO,CAAA;IAC5D,iBAAiB,EAAE,CAAC,IAAI,EACtB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,EAC1B,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,KAChC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC1B,mBAAmB,EAAE,OAAO,CAAA;CAC7B,CAAC,CAAA;AAEF,eAAO,MAAM,QAAQ,GAClB,KAAK,SAAS,SAAS,EAAE,UAAU,YAAY,CAAC,KAAK,CAAC,MACtD,OAAO,EAAE,IAAI,EAAE,QAAQ,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,KAAG,IA2e9D,CAAA"}
|
|
@@ -4,16 +4,15 @@ import { html } from '../../html';
|
|
|
4
4
|
import { m } from '../../message';
|
|
5
5
|
import { makeConstrainedEvo } from '../../struct';
|
|
6
6
|
import * as Task from '../../task';
|
|
7
|
+
import { anchorHooks } from '../anchor';
|
|
7
8
|
import { groupContiguous } from '../group';
|
|
8
9
|
import { findFirstEnabledIndex, isPrintableKey, keyToIndex } from '../keyboard';
|
|
9
|
-
import {
|
|
10
|
+
import { TransitionState } from '../transition';
|
|
10
11
|
import { resolveTypeaheadMatch } from '../typeahead';
|
|
11
12
|
export { resolveTypeaheadMatch };
|
|
12
13
|
// MODEL
|
|
13
14
|
/** Schema for the activation trigger — whether the user interacted via mouse or keyboard. */
|
|
14
15
|
export const ActivationTrigger = S.Literal('Pointer', 'Keyboard');
|
|
15
|
-
/** Schema for the transition animation state, tracking enter/leave phases for CSS transition coordination. */
|
|
16
|
-
export const TransitionState = S.Literal('Idle', 'EnterStart', 'EnterAnimating', 'LeaveStart', 'LeaveAnimating');
|
|
17
16
|
/** Schema for the listbox orientation — whether items flow vertically or horizontally. */
|
|
18
17
|
export const Orientation = S.Literal('Vertical', 'Horizontal');
|
|
19
18
|
/** Schema fields shared by all listbox variants (single-select and multi-select). Spread into each variant's `S.Struct` to avoid duplicating field definitions. */
|
|
@@ -296,7 +295,7 @@ export const makeUpdate = (handleSelectedItem) => {
|
|
|
296
295
|
};
|
|
297
296
|
export const makeView = (behavior) => (config) => {
|
|
298
297
|
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();
|
|
299
|
-
const { model: { id, isOpen, orientation, transitionState, maybeActiveItemIndex, searchQuery, maybeLastButtonPointerType, }, toMessage, items, itemToConfig, isItemDisabled, isButtonDisabled, buttonContent, buttonClassName, itemsClassName, backdropClassName, className, itemGroupKey, groupToHeading, groupClassName, separatorClassName, anchor, name, form, isDisabled, isInvalid, } = config;
|
|
298
|
+
const { model: { id, isOpen, orientation, transitionState, maybeActiveItemIndex, searchQuery, maybeLastButtonPointerType, }, toMessage, items, itemToConfig, isItemDisabled, isButtonDisabled, buttonContent, buttonClassName, itemsClassName, itemsScrollClassName, backdropClassName, className, itemGroupKey, groupToHeading, groupClassName, separatorClassName, anchor, name, form, isDisabled, isInvalid, } = config;
|
|
300
299
|
const itemToValue = config.itemToValue ?? (item => String(item));
|
|
301
300
|
const itemToSearchText = config.itemToSearchText ?? (item => itemToValue(item));
|
|
302
301
|
const isLeaving = transitionState === 'LeaveStart' || transitionState === 'LeaveAnimating';
|
|
@@ -444,7 +443,11 @@ export const makeView = (behavior) => (config) => {
|
|
|
444
443
|
...(isInteractive
|
|
445
444
|
? [
|
|
446
445
|
OnClick(toMessage(SelectedItem({ item: itemToValue(item) }))),
|
|
447
|
-
|
|
446
|
+
...(isActiveItem
|
|
447
|
+
? []
|
|
448
|
+
: [
|
|
449
|
+
OnPointerMove((screenX, screenY, pointerType) => OptionExt.when(pointerType !== 'touch', toMessage(MovedPointerOverItem({ index, screenX, screenY })))),
|
|
450
|
+
]),
|
|
448
451
|
OnPointerLeave(pointerType => OptionExt.when(pointerType !== 'touch', toMessage(DeactivatedItem()))),
|
|
449
452
|
]
|
|
450
453
|
: []),
|
|
@@ -486,9 +489,12 @@ export const makeView = (behavior) => (config) => {
|
|
|
486
489
|
...(isLeaving ? [] : [OnClick(toMessage(Closed()))]),
|
|
487
490
|
], []);
|
|
488
491
|
const renderedItems = renderGroupedItems();
|
|
492
|
+
const scrollableItems = itemsScrollClassName
|
|
493
|
+
? [div([Class(itemsScrollClassName)], renderedItems)]
|
|
494
|
+
: renderedItems;
|
|
489
495
|
const visibleContent = [
|
|
490
496
|
backdrop,
|
|
491
|
-
keyed('div')(`${id}-items-container`, itemsContainerAttributes,
|
|
497
|
+
keyed('div')(`${id}-items-container`, itemsContainerAttributes, scrollableItems),
|
|
492
498
|
];
|
|
493
499
|
const formAttribute = form ? [Attribute('form', form)] : [];
|
|
494
500
|
const selectedValues = pipe(items, Array.filter(item => behavior.isItemSelected(config.model, itemToValue(item))), Array.map(itemToValue));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Option, Schema as S } from 'effect';
|
|
2
|
+
import type { Html } from '../../html';
|
|
2
3
|
import { type BaseInitConfig, type BaseViewConfig } from './shared';
|
|
3
4
|
/** Schema for the listbox component's state, tracking open/closed status, active item, selected item, activation trigger, and typeahead search. */
|
|
4
5
|
export declare const Model: S.extend<S.Struct<{
|
|
@@ -33,16 +34,16 @@ export declare const update: (model: {
|
|
|
33
34
|
readonly isOpen: boolean;
|
|
34
35
|
readonly isAnimated: boolean;
|
|
35
36
|
readonly isModal: boolean;
|
|
36
|
-
readonly orientation: "Vertical" | "Horizontal";
|
|
37
37
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
38
38
|
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
39
39
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
40
|
-
readonly searchQuery: string;
|
|
41
|
-
readonly searchVersion: number;
|
|
42
40
|
readonly maybeLastPointerPosition: Option.Option<{
|
|
43
41
|
readonly screenX: number;
|
|
44
42
|
readonly screenY: number;
|
|
45
43
|
}>;
|
|
44
|
+
readonly orientation: "Vertical" | "Horizontal";
|
|
45
|
+
readonly searchQuery: string;
|
|
46
|
+
readonly searchVersion: number;
|
|
46
47
|
readonly maybeLastButtonPointerType: Option.Option<string>;
|
|
47
48
|
} & {
|
|
48
49
|
readonly maybeSelectedItem: Option.Option<string>;
|
|
@@ -51,34 +52,38 @@ export declare const update: (model: {
|
|
|
51
52
|
readonly isOpen: boolean;
|
|
52
53
|
readonly isAnimated: boolean;
|
|
53
54
|
readonly isModal: boolean;
|
|
54
|
-
readonly orientation: "Vertical" | "Horizontal";
|
|
55
55
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
56
56
|
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
57
57
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
58
|
-
readonly searchQuery: string;
|
|
59
|
-
readonly searchVersion: number;
|
|
60
58
|
readonly maybeLastPointerPosition: Option.Option<{
|
|
61
59
|
readonly screenX: number;
|
|
62
60
|
readonly screenY: number;
|
|
63
61
|
}>;
|
|
62
|
+
readonly orientation: "Vertical" | "Horizontal";
|
|
63
|
+
readonly searchQuery: string;
|
|
64
|
+
readonly searchVersion: number;
|
|
64
65
|
readonly maybeLastButtonPointerType: Option.Option<string>;
|
|
65
66
|
} & {
|
|
66
67
|
readonly maybeSelectedItem: Option.Option<string>;
|
|
67
68
|
}, readonly import("../../command").Command<{
|
|
68
69
|
readonly _tag: "Closed";
|
|
70
|
+
} | {
|
|
71
|
+
readonly _tag: "ClosedByTab";
|
|
72
|
+
} | {
|
|
73
|
+
readonly _tag: "DeactivatedItem";
|
|
69
74
|
} | {
|
|
70
75
|
readonly _tag: "NoOp";
|
|
76
|
+
} | {
|
|
77
|
+
readonly _tag: "AdvancedTransitionFrame";
|
|
78
|
+
} | {
|
|
79
|
+
readonly _tag: "EndedTransition";
|
|
71
80
|
} | {
|
|
72
81
|
readonly _tag: "Opened";
|
|
73
82
|
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
74
|
-
} | {
|
|
75
|
-
readonly _tag: "ClosedByTab";
|
|
76
83
|
} | {
|
|
77
84
|
readonly _tag: "ActivatedItem";
|
|
78
85
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
79
86
|
readonly index: number;
|
|
80
|
-
} | {
|
|
81
|
-
readonly _tag: "DeactivatedItem";
|
|
82
87
|
} | {
|
|
83
88
|
readonly _tag: "SelectedItem";
|
|
84
89
|
readonly item: string;
|
|
@@ -97,10 +102,6 @@ export declare const update: (model: {
|
|
|
97
102
|
} | {
|
|
98
103
|
readonly _tag: "ClearedSearch";
|
|
99
104
|
readonly version: number;
|
|
100
|
-
} | {
|
|
101
|
-
readonly _tag: "AdvancedTransitionFrame";
|
|
102
|
-
} | {
|
|
103
|
-
readonly _tag: "EndedTransition";
|
|
104
105
|
} | {
|
|
105
106
|
readonly _tag: "DetectedButtonMovement";
|
|
106
107
|
} | {
|
|
@@ -117,16 +118,16 @@ export declare const view: <Message, Item>(config: Readonly<{
|
|
|
117
118
|
readonly isOpen: boolean;
|
|
118
119
|
readonly isAnimated: boolean;
|
|
119
120
|
readonly isModal: boolean;
|
|
120
|
-
readonly orientation: "Vertical" | "Horizontal";
|
|
121
121
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
122
122
|
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
123
123
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
124
|
-
readonly searchQuery: string;
|
|
125
|
-
readonly searchVersion: number;
|
|
126
124
|
readonly maybeLastPointerPosition: Option.Option<{
|
|
127
125
|
readonly screenX: number;
|
|
128
126
|
readonly screenY: number;
|
|
129
127
|
}>;
|
|
128
|
+
readonly orientation: "Vertical" | "Horizontal";
|
|
129
|
+
readonly searchQuery: string;
|
|
130
|
+
readonly searchVersion: number;
|
|
130
131
|
readonly maybeLastButtonPointerType: Option.Option<string>;
|
|
131
132
|
} & {
|
|
132
133
|
readonly maybeSelectedItem: Option.Option<string>;
|
|
@@ -139,20 +140,21 @@ export declare const view: <Message, Item>(config: Readonly<{
|
|
|
139
140
|
isSelected: boolean;
|
|
140
141
|
}>) => Readonly<{
|
|
141
142
|
className: string;
|
|
142
|
-
content:
|
|
143
|
+
content: Html;
|
|
143
144
|
}>;
|
|
144
145
|
isItemDisabled?: (item: Item, index: number) => boolean;
|
|
145
146
|
itemToSearchText?: (item: Item, index: number) => string;
|
|
146
147
|
itemToValue?: (item: Item) => string;
|
|
147
148
|
isButtonDisabled?: boolean;
|
|
148
|
-
buttonContent:
|
|
149
|
+
buttonContent: Html;
|
|
149
150
|
buttonClassName: string;
|
|
150
151
|
itemsClassName: string;
|
|
152
|
+
itemsScrollClassName?: string;
|
|
151
153
|
backdropClassName: string;
|
|
152
154
|
className?: string;
|
|
153
155
|
itemGroupKey?: (item: Item, index: number) => string;
|
|
154
156
|
groupToHeading?: (groupKey: string) => Readonly<{
|
|
155
|
-
content:
|
|
157
|
+
content: Html;
|
|
156
158
|
className: string;
|
|
157
159
|
}> | undefined;
|
|
158
160
|
groupClassName?: string;
|
|
@@ -168,5 +170,8 @@ export declare const view: <Message, Item>(config: Readonly<{
|
|
|
168
170
|
form?: string;
|
|
169
171
|
isDisabled?: boolean;
|
|
170
172
|
isInvalid?: boolean;
|
|
171
|
-
}>) =>
|
|
173
|
+
}>) => Html;
|
|
174
|
+
/** Creates a memoized single-select listbox view. Static config is captured in a closure;
|
|
175
|
+
* only `model` and `toMessage` are compared per render via `createLazy`. */
|
|
176
|
+
export declare const lazy: <Message, Item>(staticConfig: Omit<ViewConfig<Message, Item>, "model" | "toMessage">) => ((model: Model, toMessage: BaseViewConfig<Message, Item, Model>["toMessage"]) => Html);
|
|
172
177
|
//# 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;
|
|
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,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAGtC,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,cAAc,EAKpB,MAAM,UAAU,CAAA;AAIjB,mJAAmJ;AACnJ,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,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAC,CAAA;AAEJ,6HAA6H;AAC7H,eAAO,MAAM,IAAI,GAAI,QAAQ,UAAU,KAAG,KAGxC,CAAA;AAIF,qIAAqI;AACrI,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAYjB,CAAA;AAIF,uEAAuE;AACvE,MAAM,MAAM,UAAU,CAAC,OAAO,EAAE,IAAI,IAAI,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;AAE5E,2JAA2J;AAC3J,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAWf,CAAA;AAEF;6EAC6E;AAC7E,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,IAAI,EAChC,cAAc,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC,KACnE,CAAC,CACF,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,WAAW,CAAC,KACzD,IAAI,CAgBR,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Array, Option, Schema as S, pipe } from 'effect';
|
|
2
|
+
import { createLazy } from '../../html/lazy';
|
|
2
3
|
import { evo } from '../../struct';
|
|
3
4
|
import { BaseModel, baseInit, closedModel, makeUpdate, makeView, } from './shared';
|
|
4
5
|
// MODEL
|
|
@@ -27,3 +28,13 @@ export const view = makeView({
|
|
|
27
28
|
selectedItemIndex: (model, items, itemToValue) => Option.flatMap(model.maybeSelectedItem, selectedItem => Array.findFirstIndex(items, item => itemToValue(item) === selectedItem)),
|
|
28
29
|
ariaMultiSelectable: false,
|
|
29
30
|
});
|
|
31
|
+
/** Creates a memoized single-select listbox view. Static config is captured in a closure;
|
|
32
|
+
* only `model` and `toMessage` are compared per render via `createLazy`. */
|
|
33
|
+
export const lazy = (staticConfig) => {
|
|
34
|
+
const lazyView = createLazy();
|
|
35
|
+
return (model, toMessage) => lazyView((currentModel, currentToMessage) => view({
|
|
36
|
+
...staticConfig,
|
|
37
|
+
model: currentModel,
|
|
38
|
+
toMessage: currentToMessage,
|
|
39
|
+
}), [model, toMessage]);
|
|
40
|
+
};
|
package/dist/ui/menu/index.d.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { Schema as S } from 'effect';
|
|
2
2
|
import type { Command } from '../../command';
|
|
3
3
|
import { type Html } from '../../html';
|
|
4
|
+
import type { AnchorConfig } from '../anchor';
|
|
4
5
|
import { groupContiguous } from '../group';
|
|
5
6
|
import { resolveTypeaheadMatch } from '../typeahead';
|
|
6
|
-
import type { AnchorConfig } from './anchor';
|
|
7
7
|
/** Schema for the activation trigger — whether the user interacted via mouse or keyboard. */
|
|
8
8
|
export declare const ActivationTrigger: S.Literal<["Pointer", "Keyboard"]>;
|
|
9
9
|
export type ActivationTrigger = typeof ActivationTrigger.Type;
|
|
10
|
-
/** Schema for the transition animation state, tracking enter/leave phases for CSS transition coordination. */
|
|
11
|
-
export declare const TransitionState: S.Literal<["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
12
|
-
export type TransitionState = typeof TransitionState.Type;
|
|
13
10
|
/** Schema for the menu component's state, tracking open/closed status, active item, activation trigger, and typeahead search. */
|
|
14
11
|
export declare const Model: S.Struct<{
|
|
15
12
|
id: typeof S.String;
|
|
@@ -176,6 +173,7 @@ export type ViewConfig<Message, Item extends string> = Readonly<{
|
|
|
176
173
|
buttonContent: Html;
|
|
177
174
|
buttonClassName: string;
|
|
178
175
|
itemsClassName: string;
|
|
176
|
+
itemsScrollClassName?: string;
|
|
179
177
|
backdropClassName: string;
|
|
180
178
|
className?: string;
|
|
181
179
|
itemGroupKey?: (item: Item, index: number) => string;
|
|
@@ -187,4 +185,7 @@ export type ViewConfig<Message, Item extends string> = Readonly<{
|
|
|
187
185
|
export { groupContiguous, resolveTypeaheadMatch };
|
|
188
186
|
/** Renders a headless menu with typeahead search, keyboard navigation, and aria-activedescendant focus management. */
|
|
189
187
|
export declare const view: <Message, Item extends string>(config: ViewConfig<Message, Item>) => Html;
|
|
188
|
+
/** Creates a memoized menu view. Static config is captured in a closure;
|
|
189
|
+
* only `model` and `toMessage` are compared per render via `createLazy`. */
|
|
190
|
+
export declare const lazy: <Message, Item extends string>(staticConfig: Omit<ViewConfig<Message, Item>, "model" | "toMessage">) => ((model: Model, toMessage: ViewConfig<Message, Item>["toMessage"]) => Html);
|
|
190
191
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,OAAO,EAAE,KAAK,IAAI,EAAQ,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,OAAO,EAAE,KAAK,IAAI,EAAQ,MAAM,YAAY,CAAA;AAM5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAG1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAIpD,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,oCAAmC,CAAA;AACjE,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAA;AAQ7D,iIAAiI;AACjI,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;EAehB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,mJAAmJ;AACnJ,eAAO,MAAM,MAAM;;EAEjB,CAAA;AACF,kEAAkE;AAClE,eAAO,MAAM,MAAM,2DAAc,CAAA;AACjC,2EAA2E;AAC3E,eAAO,MAAM,WAAW,gEAAmB,CAAA;AAC3C,mGAAmG;AACnG,eAAO,MAAM,aAAa;;;EAGxB,CAAA;AACF,kDAAkD;AAClD,eAAO,MAAM,eAAe,oEAAuB,CAAA;AACnD,gEAAgE;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AC,CAAA;AAEF,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,CAAA;AAIjD,sHAAsH;AACtH,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,IAAI,SAAS,MAAM,EAC/C,QAAQ,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,KAChC,IA6aF,CAAA;AAED;6EAC6E;AAC7E,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,IAAI,SAAS,MAAM,EAC/C,cAAc,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC,KACnE,CAAC,CACF,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,WAAW,CAAC,KAC9C,IAAI,CAgBR,CAAA"}
|
package/dist/ui/menu/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Array, Effect, Match as M, Option, Predicate, Schema as S, String as Str, pipe, } from 'effect';
|
|
2
2
|
import { OptionExt } from '../../effectExtensions';
|
|
3
3
|
import { html } from '../../html';
|
|
4
|
+
import { createLazy } from '../../html/lazy';
|
|
4
5
|
import { m } from '../../message';
|
|
5
6
|
import { evo } from '../../struct';
|
|
6
7
|
import * as Task from '../../task';
|
|
8
|
+
import { anchorHooks } from '../anchor';
|
|
7
9
|
import { groupContiguous } from '../group';
|
|
8
10
|
import { findFirstEnabledIndex, isPrintableKey, keyToIndex } from '../keyboard';
|
|
11
|
+
import { TransitionState } from '../transition';
|
|
9
12
|
import { resolveTypeaheadMatch } from '../typeahead';
|
|
10
|
-
import { anchorHooks } from './anchor';
|
|
11
13
|
// MODEL
|
|
12
14
|
/** Schema for the activation trigger — whether the user interacted via mouse or keyboard. */
|
|
13
15
|
export const ActivationTrigger = S.Literal('Pointer', 'Keyboard');
|
|
14
|
-
/** Schema for the transition animation state, tracking enter/leave phases for CSS transition coordination. */
|
|
15
|
-
export const TransitionState = S.Literal('Idle', 'EnterStart', 'EnterAnimating', 'LeaveStart', 'LeaveAnimating');
|
|
16
16
|
const PointerOrigin = S.Struct({
|
|
17
17
|
screenX: S.Number,
|
|
18
18
|
screenY: S.Number,
|
|
@@ -311,7 +311,7 @@ const itemId = (id, index) => `${id}-item-${index}`;
|
|
|
311
311
|
/** Renders a headless menu with typeahead search, keyboard navigation, and aria-activedescendant focus management. */
|
|
312
312
|
export const view = (config) => {
|
|
313
313
|
const { div, AriaActiveDescendant, AriaControls, AriaDisabled, AriaExpanded, AriaHasPopup, AriaLabelledBy, Class, DataAttribute, Id, OnBlur, OnClick, OnDestroy, OnInsert, OnKeyDownPreventDefault, OnKeyUpPreventDefault, OnPointerDown, OnPointerLeave, OnPointerMove, OnPointerUp, Role, Style, Tabindex, Type, keyed, } = html();
|
|
314
|
-
const { model: { id, isOpen, transitionState, maybeActiveItemIndex, searchQuery, maybeLastButtonPointerType, }, toMessage, items, itemToConfig, isItemDisabled, itemToSearchText = (item) => item, isButtonDisabled, buttonContent, buttonClassName, itemsClassName, backdropClassName, className, itemGroupKey, groupToHeading, groupClassName, separatorClassName, anchor, } = config;
|
|
314
|
+
const { model: { id, isOpen, transitionState, maybeActiveItemIndex, searchQuery, maybeLastButtonPointerType, }, toMessage, items, itemToConfig, isItemDisabled, itemToSearchText = (item) => item, isButtonDisabled, buttonContent, buttonClassName, itemsClassName, itemsScrollClassName, backdropClassName, className, itemGroupKey, groupToHeading, groupClassName, separatorClassName, anchor, } = config;
|
|
315
315
|
const isLeaving = transitionState === 'LeaveStart' || transitionState === 'LeaveAnimating';
|
|
316
316
|
const isVisible = isOpen || isLeaving;
|
|
317
317
|
const transitionAttributes = M.value(transitionState).pipe(M.when('EnterStart', () => [
|
|
@@ -439,7 +439,11 @@ export const view = (config) => {
|
|
|
439
439
|
...(isInteractive
|
|
440
440
|
? [
|
|
441
441
|
OnClick(toMessage(SelectedItem({ index }))),
|
|
442
|
-
|
|
442
|
+
...(isActiveItem
|
|
443
|
+
? []
|
|
444
|
+
: [
|
|
445
|
+
OnPointerMove((screenX, screenY, pointerType) => OptionExt.when(pointerType !== 'touch', toMessage(MovedPointerOverItem({ index, screenX, screenY })))),
|
|
446
|
+
]),
|
|
443
447
|
OnPointerLeave(pointerType => OptionExt.when(pointerType !== 'touch', toMessage(DeactivatedItem()))),
|
|
444
448
|
]
|
|
445
449
|
: []),
|
|
@@ -481,9 +485,12 @@ export const view = (config) => {
|
|
|
481
485
|
...(isLeaving ? [] : [OnClick(toMessage(Closed()))]),
|
|
482
486
|
], []);
|
|
483
487
|
const renderedItems = renderGroupedItems();
|
|
488
|
+
const scrollableItems = itemsScrollClassName
|
|
489
|
+
? [div([Class(itemsScrollClassName)], renderedItems)]
|
|
490
|
+
: renderedItems;
|
|
484
491
|
const visibleContent = [
|
|
485
492
|
backdrop,
|
|
486
|
-
keyed('div')(`${id}-items-container`, itemsContainerAttributes,
|
|
493
|
+
keyed('div')(`${id}-items-container`, itemsContainerAttributes, scrollableItems),
|
|
487
494
|
];
|
|
488
495
|
const wrapperAttributes = [
|
|
489
496
|
...(className ? [Class(className)] : []),
|
|
@@ -494,3 +501,13 @@ export const view = (config) => {
|
|
|
494
501
|
...(isVisible ? visibleContent : []),
|
|
495
502
|
]);
|
|
496
503
|
};
|
|
504
|
+
/** Creates a memoized menu view. Static config is captured in a closure;
|
|
505
|
+
* only `model` and `toMessage` are compared per render via `createLazy`. */
|
|
506
|
+
export const lazy = (staticConfig) => {
|
|
507
|
+
const lazyView = createLazy();
|
|
508
|
+
return (model, toMessage) => lazyView((currentModel, currentToMessage) => view({
|
|
509
|
+
...staticConfig,
|
|
510
|
+
model: currentModel,
|
|
511
|
+
toMessage: currentToMessage,
|
|
512
|
+
}), [model, toMessage]);
|
|
513
|
+
};
|
package/dist/ui/menu/public.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { init, update, view, Model, Message
|
|
1
|
+
export { init, update, view, lazy, Model, Message } from './index';
|
|
2
|
+
export { TransitionState } from '../transition';
|
|
2
3
|
export type { ActivationTrigger, Opened, Closed, ClosedByTab, ActivatedItem, DeactivatedItem, SelectedItem, MovedPointerOverItem, Searched, ClearedSearch, NoOp, AdvancedTransitionFrame, EndedTransition, InitConfig, ViewConfig, ItemConfig, GroupHeading, } from './index';
|
|
3
|
-
export type { AnchorConfig } from '
|
|
4
|
+
export type { AnchorConfig } from '../anchor';
|
|
4
5
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/menu/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/menu/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,YAAY,EACV,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,WAAW,EACX,aAAa,EACb,eAAe,EACf,YAAY,EACZ,oBAAoB,EACpB,QAAQ,EACR,aAAa,EACb,IAAI,EACJ,uBAAuB,EACvB,eAAe,EACf,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,GACb,MAAM,SAAS,CAAA;AAEhB,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA"}
|
package/dist/ui/menu/public.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { init, update, view, Model, Message
|
|
1
|
+
export { init, update, view, lazy, Model, Message } from './index';
|
|
2
|
+
export { TransitionState } from '../transition';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Schema as S } from 'effect';
|
|
2
|
+
import type { Command } from '../../command';
|
|
3
|
+
import { type Html } from '../../html';
|
|
4
|
+
import type { AnchorConfig } from '../anchor';
|
|
5
|
+
/** Schema for the popover component's state, tracking open/closed status and transition animation. */
|
|
6
|
+
export declare const Model: S.Struct<{
|
|
7
|
+
id: typeof S.String;
|
|
8
|
+
isOpen: typeof S.Boolean;
|
|
9
|
+
isAnimated: typeof S.Boolean;
|
|
10
|
+
isModal: typeof S.Boolean;
|
|
11
|
+
transitionState: S.Literal<["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
12
|
+
maybeLastButtonPointerType: S.OptionFromSelf<typeof S.String>;
|
|
13
|
+
}>;
|
|
14
|
+
export type Model = typeof Model.Type;
|
|
15
|
+
/** Sent when the popover opens via button click or keyboard activation. */
|
|
16
|
+
export declare const Opened: import("../../schema").CallableTaggedStruct<"Opened", {}>;
|
|
17
|
+
/** Sent when the popover closes via Escape key or backdrop click. Returns focus to the button. */
|
|
18
|
+
export declare const Closed: import("../../schema").CallableTaggedStruct<"Closed", {}>;
|
|
19
|
+
/** Sent when focus leaves the popover panel via Tab key. Does NOT return focus to the button. */
|
|
20
|
+
export declare const ClosedByTab: import("../../schema").CallableTaggedStruct<"ClosedByTab", {}>;
|
|
21
|
+
/** Sent when the user presses a pointer device on the popover button. Records pointer type and toggles for mouse. */
|
|
22
|
+
export declare const PressedPointerOnButton: import("../../schema").CallableTaggedStruct<"PressedPointerOnButton", {
|
|
23
|
+
pointerType: typeof S.String;
|
|
24
|
+
button: typeof S.Number;
|
|
25
|
+
}>;
|
|
26
|
+
/** Placeholder message used when no action is needed. */
|
|
27
|
+
export declare const NoOp: import("../../schema").CallableTaggedStruct<"NoOp", {}>;
|
|
28
|
+
/** Sent internally when a double-rAF completes, advancing the transition to its animating phase. */
|
|
29
|
+
export declare const AdvancedTransitionFrame: import("../../schema").CallableTaggedStruct<"AdvancedTransitionFrame", {}>;
|
|
30
|
+
/** Sent internally when all CSS transitions on the popover panel have completed. */
|
|
31
|
+
export declare const EndedTransition: import("../../schema").CallableTaggedStruct<"EndedTransition", {}>;
|
|
32
|
+
/** Sent internally when the popover button moves in the viewport during a leave transition, cancelling the animation. */
|
|
33
|
+
export declare const DetectedButtonMovement: import("../../schema").CallableTaggedStruct<"DetectedButtonMovement", {}>;
|
|
34
|
+
/** Union of all messages the popover component can produce. */
|
|
35
|
+
export declare const Message: S.Union<[import("../../schema").CallableTaggedStruct<"Opened", {}>, import("../../schema").CallableTaggedStruct<"Closed", {}>, import("../../schema").CallableTaggedStruct<"ClosedByTab", {}>, import("../../schema").CallableTaggedStruct<"PressedPointerOnButton", {
|
|
36
|
+
pointerType: typeof S.String;
|
|
37
|
+
button: typeof S.Number;
|
|
38
|
+
}>, import("../../schema").CallableTaggedStruct<"NoOp", {}>, import("../../schema").CallableTaggedStruct<"AdvancedTransitionFrame", {}>, import("../../schema").CallableTaggedStruct<"EndedTransition", {}>, import("../../schema").CallableTaggedStruct<"DetectedButtonMovement", {}>]>;
|
|
39
|
+
export type Opened = typeof Opened.Type;
|
|
40
|
+
export type Closed = typeof Closed.Type;
|
|
41
|
+
export type ClosedByTab = typeof ClosedByTab.Type;
|
|
42
|
+
export type PressedPointerOnButton = typeof PressedPointerOnButton.Type;
|
|
43
|
+
export type NoOp = typeof NoOp.Type;
|
|
44
|
+
export type AdvancedTransitionFrame = typeof AdvancedTransitionFrame.Type;
|
|
45
|
+
export type EndedTransition = typeof EndedTransition.Type;
|
|
46
|
+
export type DetectedButtonMovement = typeof DetectedButtonMovement.Type;
|
|
47
|
+
export type Message = typeof Message.Type;
|
|
48
|
+
/** Configuration for creating a popover model with `init`. `isAnimated` enables CSS transition coordination (default `false`). `isModal` locks page scroll and inerts other elements when open (default `false`). */
|
|
49
|
+
export type InitConfig = Readonly<{
|
|
50
|
+
id: string;
|
|
51
|
+
isAnimated?: boolean;
|
|
52
|
+
isModal?: boolean;
|
|
53
|
+
}>;
|
|
54
|
+
/** Creates an initial popover model from a config. Defaults to closed. */
|
|
55
|
+
export declare const init: (config: InitConfig) => Model;
|
|
56
|
+
type UpdateReturn = [Model, ReadonlyArray<Command<Message>>];
|
|
57
|
+
/** Processes a popover message and returns the next model and commands. */
|
|
58
|
+
export declare const update: (model: Model, message: Message) => UpdateReturn;
|
|
59
|
+
/** Configuration for rendering a popover with `view`. */
|
|
60
|
+
export type ViewConfig<Message> = Readonly<{
|
|
61
|
+
model: Model;
|
|
62
|
+
toMessage: (message: Opened | Closed | ClosedByTab | PressedPointerOnButton | NoOp) => Message;
|
|
63
|
+
anchor: AnchorConfig;
|
|
64
|
+
buttonContent: Html;
|
|
65
|
+
buttonClassName: string;
|
|
66
|
+
panelContent: Html;
|
|
67
|
+
panelClassName: string;
|
|
68
|
+
backdropClassName: string;
|
|
69
|
+
isDisabled?: boolean;
|
|
70
|
+
className?: string;
|
|
71
|
+
}>;
|
|
72
|
+
/** Renders a headless popover with a trigger button and a floating panel. Uses the disclosure ARIA pattern (aria-expanded + aria-controls) with no role on the panel. */
|
|
73
|
+
export declare const view: <Message>(config: ViewConfig<Message>) => Html;
|
|
74
|
+
/** Creates a memoized popover view. Static config is captured in a closure;
|
|
75
|
+
* only `model` and `toMessage` are compared per render via `createLazy`. */
|
|
76
|
+
export declare const lazy: <Message>(staticConfig: Omit<ViewConfig<Message>, "model" | "toMessage">) => ((model: Model, toMessage: ViewConfig<Message>["toMessage"]) => Html);
|
|
77
|
+
export {};
|
|
78
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/popover/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,MAAM,IAAI,CAAC,EAAQ,MAAM,QAAQ,CAAA;AAE7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,OAAO,EAAE,KAAK,IAAI,EAAQ,MAAM,YAAY,CAAA;AAM5C,OAAO,KAAK,EAAE,YAAY,EAAE,MA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