foldkit 0.38.0 → 0.40.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 +4 -2
- package/dist/command/index.d.ts +15 -9
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +16 -4
- package/dist/command/public.d.ts +2 -2
- package/dist/command/public.d.ts.map +1 -1
- package/dist/command/public.js +1 -1
- package/dist/devtools/overlay.d.ts +34 -1
- package/dist/devtools/overlay.d.ts.map +1 -1
- package/dist/devtools/overlay.js +24 -16
- package/dist/fieldValidation/index.d.ts +45 -37
- package/dist/fieldValidation/index.d.ts.map +1 -1
- package/dist/fieldValidation/public.d.ts +1 -1
- package/dist/fieldValidation/public.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/runtime/managedResource.d.ts +1 -1
- package/dist/runtime/managedResource.js +1 -1
- package/dist/runtime/runtime.d.ts +10 -10
- package/dist/runtime/runtime.d.ts.map +1 -1
- package/dist/runtime/runtime.js +2 -2
- package/dist/runtime/subscription.d.ts +3 -3
- package/dist/runtime/subscription.d.ts.map +1 -1
- package/dist/runtime/subscription.js +2 -2
- package/dist/task/dom.d.ts +6 -6
- package/dist/task/dom.js +6 -6
- package/dist/task/inert.d.ts +2 -2
- package/dist/task/inert.js +2 -2
- package/dist/task/scrollLock.d.ts +2 -2
- package/dist/task/scrollLock.js +2 -2
- package/dist/task/time.d.ts +1 -1
- package/dist/task/time.js +1 -1
- package/dist/test/index.d.ts +40 -0
- package/dist/test/index.d.ts.map +1 -0
- package/dist/test/index.js +138 -0
- package/dist/test/public.d.ts +3 -0
- package/dist/test/public.d.ts.map +1 -0
- package/dist/test/public.js +1 -0
- package/dist/ui/checkbox/index.d.ts +1 -1
- package/dist/ui/checkbox/index.d.ts.map +1 -1
- package/dist/ui/combobox/multi.d.ts +8 -8
- package/dist/ui/combobox/public.d.ts +1 -1
- package/dist/ui/combobox/shared.d.ts +58 -26
- package/dist/ui/combobox/shared.d.ts.map +1 -1
- package/dist/ui/combobox/shared.js +34 -24
- package/dist/ui/combobox/single.d.ts +8 -8
- package/dist/ui/dialog/index.d.ts +20 -8
- package/dist/ui/dialog/index.d.ts.map +1 -1
- package/dist/ui/dialog/index.js +15 -11
- package/dist/ui/dialog/public.d.ts +1 -1
- package/dist/ui/dialog/public.js +1 -1
- package/dist/ui/disclosure/index.d.ts +8 -5
- package/dist/ui/disclosure/index.d.ts.map +1 -1
- package/dist/ui/disclosure/index.js +6 -5
- package/dist/ui/disclosure/public.d.ts +1 -1
- package/dist/ui/listbox/multi.d.ts +8 -8
- package/dist/ui/listbox/public.d.ts +1 -1
- package/dist/ui/listbox/shared.d.ts +61 -22
- package/dist/ui/listbox/shared.d.ts.map +1 -1
- package/dist/ui/listbox/shared.js +41 -29
- package/dist/ui/listbox/single.d.ts +8 -8
- package/dist/ui/menu/index.d.ts +56 -17
- package/dist/ui/menu/index.d.ts.map +1 -1
- package/dist/ui/menu/index.js +46 -34
- package/dist/ui/popover/index.d.ts +42 -13
- package/dist/ui/popover/index.d.ts.map +1 -1
- package/dist/ui/popover/index.js +34 -25
- package/dist/ui/radioGroup/index.d.ts +8 -5
- package/dist/ui/radioGroup/index.d.ts.map +1 -1
- package/dist/ui/radioGroup/index.js +5 -4
- package/dist/ui/switch/index.d.ts +1 -1
- package/dist/ui/switch/index.d.ts.map +1 -1
- package/dist/ui/tabs/index.d.ts +6 -3
- package/dist/ui/tabs/index.d.ts.map +1 -1
- package/dist/ui/tabs/index.js +6 -5
- package/package.json +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/ui/combobox/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAEN,MAAM,EAEN,MAAM,IAAI,CAAC,EAEZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,eAAe,CAAA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AAA;IAC3B,mBAAmB,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;IACvD,MAAM,CAAC,EAAE,YAAY,CAAA;CACtB,CAAC,CAAA;AAIF,qFAAqF;AACrF,MAAM,MAAM,YAAY,CAAC,KAAK,SAAS,SAAS,IAAI,QAAQ,CAAC;IAC3D,cAAc,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAA;IAC5D,mBAAmB,EAAE,OAAO,CAAA;CAC7B,CAAC,CAAA;AAEF,gNAAgN;AAChN,eAAO,MAAM,QAAQ,GAClB,KAAK,SAAS,SAAS,EAAE,UAAU,YAAY,CAAC,KAAK,CAAC,MACtD,OAAO,EAAE,IAAI,SAAS,MAAM,EAC3B,QAAQ,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,KAC3C,IAoiBF,CAAA"}
|
|
@@ -76,19 +76,19 @@ export const RequestedItemClick = m('RequestedItemClick', {
|
|
|
76
76
|
index: S.Number,
|
|
77
77
|
});
|
|
78
78
|
/** Sent when the scroll lock command completes. */
|
|
79
|
-
export const
|
|
79
|
+
export const CompletedLockScroll = m('CompletedLockScroll');
|
|
80
80
|
/** Sent when the scroll unlock command completes. */
|
|
81
|
-
export const
|
|
81
|
+
export const CompletedUnlockScroll = m('CompletedUnlockScroll');
|
|
82
82
|
/** Sent when the inert-others command completes. */
|
|
83
|
-
export const
|
|
83
|
+
export const CompletedSetupInert = m('CompletedSetupInert');
|
|
84
84
|
/** Sent when the restore-inert command completes. */
|
|
85
|
-
export const
|
|
85
|
+
export const CompletedTeardownInert = m('CompletedTeardownInert');
|
|
86
86
|
/** Sent when the focus-input command completes. */
|
|
87
|
-
export const
|
|
87
|
+
export const CompletedFocusInput = m('CompletedFocusInput');
|
|
88
88
|
/** Sent when the scroll-into-view command completes after keyboard activation. */
|
|
89
89
|
export const CompletedScrollIntoView = m('CompletedScrollIntoView');
|
|
90
90
|
/** Sent when the programmatic item click command completes. */
|
|
91
|
-
export const
|
|
91
|
+
export const CompletedClickItem = m('CompletedClickItem');
|
|
92
92
|
/** Sent internally when a double-rAF completes, advancing the transition to its animating phase. */
|
|
93
93
|
export const AdvancedTransitionFrame = m('AdvancedTransitionFrame');
|
|
94
94
|
/** Sent internally when all CSS transitions on the items container have completed. */
|
|
@@ -102,7 +102,7 @@ export const UpdatedInputValue = m('UpdatedInputValue', {
|
|
|
102
102
|
/** Sent when the optional toggle button is clicked. */
|
|
103
103
|
export const PressedToggleButton = m('PressedToggleButton');
|
|
104
104
|
/** Union of all messages the combobox component can produce. */
|
|
105
|
-
export const Message = S.Union(Opened, Closed, ClosedByTab, ActivatedItem, DeactivatedItem, SelectedItem, MovedPointerOverItem, RequestedItemClick,
|
|
105
|
+
export const Message = S.Union(Opened, Closed, ClosedByTab, ActivatedItem, DeactivatedItem, SelectedItem, MovedPointerOverItem, RequestedItemClick, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusInput, CompletedScrollIntoView, CompletedClickItem, AdvancedTransitionFrame, EndedTransition, DetectedInputMovement, UpdatedInputValue, PressedToggleButton);
|
|
106
106
|
// SELECTORS
|
|
107
107
|
export const inputSelector = (id) => `#${id}-input`;
|
|
108
108
|
export const inputWrapperSelector = (id) => `#${id}-input-wrapper`;
|
|
@@ -120,18 +120,28 @@ export const closedBaseModel = (model) => constrainedEvo(model, {
|
|
|
120
120
|
maybeLastPointerPosition: () => Option.none(),
|
|
121
121
|
});
|
|
122
122
|
/** Creates a combobox update function from variant-specific handlers. Shared logic (open, close, activate, transition) is handled internally; only close, selection, and immediate-activation behavior varies by variant. */
|
|
123
|
+
export const RequestFrame = Command.define('RequestFrame', AdvancedTransitionFrame);
|
|
124
|
+
export const LockScroll = Command.define('LockScroll', CompletedLockScroll);
|
|
125
|
+
export const UnlockScroll = Command.define('UnlockScroll', CompletedUnlockScroll);
|
|
126
|
+
export const InertOthers = Command.define('InertOthers', CompletedSetupInert);
|
|
127
|
+
export const RestoreInert = Command.define('RestoreInert', CompletedTeardownInert);
|
|
128
|
+
export const FocusInput = Command.define('FocusInput', CompletedFocusInput);
|
|
129
|
+
export const ScrollIntoView = Command.define('ScrollIntoView', CompletedScrollIntoView);
|
|
130
|
+
export const ClickItem = Command.define('ClickItem', CompletedClickItem);
|
|
131
|
+
export const WaitForTransitions = Command.define('WaitForTransitions', EndedTransition);
|
|
132
|
+
export const DetectMovementOrTransitionEnd = Command.define('DetectMovementOrTransitionEnd', DetectedInputMovement, EndedTransition);
|
|
123
133
|
export const makeUpdate = (handlers) => {
|
|
124
134
|
const withUpdateReturn = M.withReturnType();
|
|
125
135
|
return (model, message) => {
|
|
126
|
-
const maybeNextFrame = OptionExt.when(model.isAnimated, Task.nextFrame.pipe(Effect.as(AdvancedTransitionFrame())
|
|
127
|
-
const maybeLockScroll = OptionExt.when(model.isModal, Task.lockScroll.pipe(Effect.as(
|
|
128
|
-
const maybeUnlockScroll = OptionExt.when(model.isModal, Task.unlockScroll.pipe(Effect.as(
|
|
129
|
-
const maybeInertOthers = OptionExt.when(model.isModal, Task.inertOthers(model.id, [
|
|
136
|
+
const maybeNextFrame = OptionExt.when(model.isAnimated, RequestFrame(Task.nextFrame.pipe(Effect.as(AdvancedTransitionFrame()))));
|
|
137
|
+
const maybeLockScroll = OptionExt.when(model.isModal, LockScroll(Task.lockScroll.pipe(Effect.as(CompletedLockScroll()))));
|
|
138
|
+
const maybeUnlockScroll = OptionExt.when(model.isModal, UnlockScroll(Task.unlockScroll.pipe(Effect.as(CompletedUnlockScroll()))));
|
|
139
|
+
const maybeInertOthers = OptionExt.when(model.isModal, InertOthers(Task.inertOthers(model.id, [
|
|
130
140
|
inputWrapperSelector(model.id),
|
|
131
141
|
itemsSelector(model.id),
|
|
132
|
-
]).pipe(Effect.as(
|
|
133
|
-
const maybeRestoreInert = OptionExt.when(model.isModal, Task.restoreInert(model.id).pipe(Effect.as(
|
|
134
|
-
const focusInput = Task.focus(inputSelector(model.id)).pipe(Effect.ignore, Effect.as(
|
|
142
|
+
]).pipe(Effect.as(CompletedSetupInert()))));
|
|
143
|
+
const maybeRestoreInert = OptionExt.when(model.isModal, RestoreInert(Task.restoreInert(model.id).pipe(Effect.as(CompletedTeardownInert()))));
|
|
144
|
+
const focusInput = FocusInput(Task.focus(inputSelector(model.id)).pipe(Effect.ignore, Effect.as(CompletedFocusInput())));
|
|
135
145
|
return M.value(message).pipe(withUpdateReturn, M.tagsExhaustive({
|
|
136
146
|
Opened: ({ maybeActiveItemIndex }) => {
|
|
137
147
|
const nextModel = constrainedEvo(model, {
|
|
@@ -178,7 +188,7 @@ export const makeUpdate = (handlers) => {
|
|
|
178
188
|
nextModel,
|
|
179
189
|
activationTrigger === 'Keyboard'
|
|
180
190
|
? [
|
|
181
|
-
Task.scrollIntoView(itemSelector(model.id, index)).pipe(Effect.ignore, Effect.as(CompletedScrollIntoView())
|
|
191
|
+
ScrollIntoView(Task.scrollIntoView(itemSelector(model.id, index)).pipe(Effect.ignore, Effect.as(CompletedScrollIntoView()))),
|
|
182
192
|
]
|
|
183
193
|
: [],
|
|
184
194
|
];
|
|
@@ -214,7 +224,7 @@ export const makeUpdate = (handlers) => {
|
|
|
214
224
|
RequestedItemClick: ({ index }) => [
|
|
215
225
|
model,
|
|
216
226
|
[
|
|
217
|
-
Task.clickElement(itemSelector(model.id, index)).pipe(Effect.ignore, Effect.as(
|
|
227
|
+
ClickItem(Task.clickElement(itemSelector(model.id, index)).pipe(Effect.ignore, Effect.as(CompletedClickItem()))),
|
|
218
228
|
],
|
|
219
229
|
],
|
|
220
230
|
UpdatedInputValue: ({ value }) => {
|
|
@@ -273,14 +283,14 @@ export const makeUpdate = (handlers) => {
|
|
|
273
283
|
transitionState: () => 'EnterAnimating',
|
|
274
284
|
}),
|
|
275
285
|
[
|
|
276
|
-
Task.waitForTransitions(itemsSelector(model.id)).pipe(Effect.as(EndedTransition())
|
|
286
|
+
WaitForTransitions(Task.waitForTransitions(itemsSelector(model.id)).pipe(Effect.as(EndedTransition()))),
|
|
277
287
|
],
|
|
278
288
|
]), M.when('LeaveStart', () => [
|
|
279
289
|
constrainedEvo(model, {
|
|
280
290
|
transitionState: () => 'LeaveAnimating',
|
|
281
291
|
}),
|
|
282
292
|
[
|
|
283
|
-
Effect.raceFirst(Task.detectElementMovement(inputWrapperSelector(model.id)).pipe(Effect.as(DetectedInputMovement())), Task.waitForTransitions(itemsSelector(model.id)).pipe(Effect.as(EndedTransition())))
|
|
293
|
+
DetectMovementOrTransitionEnd(Effect.raceFirst(Task.detectElementMovement(inputWrapperSelector(model.id)).pipe(Effect.as(DetectedInputMovement())), Task.waitForTransitions(itemsSelector(model.id)).pipe(Effect.as(EndedTransition())))),
|
|
284
294
|
],
|
|
285
295
|
]), M.orElse(() => [model, []])),
|
|
286
296
|
EndedTransition: () => M.value(model.transitionState).pipe(withUpdateReturn, M.whenOr('EnterAnimating', 'LeaveAnimating', () => [
|
|
@@ -295,13 +305,13 @@ export const makeUpdate = (handlers) => {
|
|
|
295
305
|
}),
|
|
296
306
|
[],
|
|
297
307
|
]), M.orElse(() => [model, []])),
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
308
|
+
CompletedLockScroll: () => [model, []],
|
|
309
|
+
CompletedUnlockScroll: () => [model, []],
|
|
310
|
+
CompletedSetupInert: () => [model, []],
|
|
311
|
+
CompletedTeardownInert: () => [model, []],
|
|
312
|
+
CompletedFocusInput: () => [model, []],
|
|
303
313
|
CompletedScrollIntoView: () => [model, []],
|
|
304
|
-
|
|
314
|
+
CompletedClickItem: () => [model, []],
|
|
305
315
|
}));
|
|
306
316
|
};
|
|
307
317
|
};
|
|
@@ -50,7 +50,7 @@ export declare const update: (model: {
|
|
|
50
50
|
} & {
|
|
51
51
|
readonly maybeSelectedItem: Option.Option<string>;
|
|
52
52
|
readonly maybeSelectedDisplayText: Option.Option<string>;
|
|
53
|
-
}, message: import("./shared").Message) => [{
|
|
53
|
+
}, message: import("./shared").Message) => readonly [{
|
|
54
54
|
readonly id: string;
|
|
55
55
|
readonly isOpen: boolean;
|
|
56
56
|
readonly isAnimated: boolean;
|
|
@@ -101,19 +101,19 @@ export declare const update: (model: {
|
|
|
101
101
|
readonly _tag: "RequestedItemClick";
|
|
102
102
|
readonly index: number;
|
|
103
103
|
} | {
|
|
104
|
-
readonly _tag: "
|
|
104
|
+
readonly _tag: "CompletedLockScroll";
|
|
105
105
|
} | {
|
|
106
|
-
readonly _tag: "
|
|
106
|
+
readonly _tag: "CompletedUnlockScroll";
|
|
107
107
|
} | {
|
|
108
|
-
readonly _tag: "
|
|
108
|
+
readonly _tag: "CompletedSetupInert";
|
|
109
109
|
} | {
|
|
110
|
-
readonly _tag: "
|
|
110
|
+
readonly _tag: "CompletedTeardownInert";
|
|
111
111
|
} | {
|
|
112
|
-
readonly _tag: "
|
|
112
|
+
readonly _tag: "CompletedFocusInput";
|
|
113
113
|
} | {
|
|
114
114
|
readonly _tag: "CompletedScrollIntoView";
|
|
115
115
|
} | {
|
|
116
|
-
readonly _tag: "
|
|
116
|
+
readonly _tag: "CompletedClickItem";
|
|
117
117
|
} | {
|
|
118
118
|
readonly _tag: "AdvancedTransitionFrame";
|
|
119
119
|
} | {
|
|
@@ -151,7 +151,7 @@ export declare const view: <Message, Item extends string>(config: Readonly<{
|
|
|
151
151
|
readonly maybeSelectedItem: Option.Option<string>;
|
|
152
152
|
readonly maybeSelectedDisplayText: Option.Option<string>;
|
|
153
153
|
};
|
|
154
|
-
toMessage: (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").UpdatedInputValue | import("./shared").PressedToggleButton | import("./shared").
|
|
154
|
+
toMessage: (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").UpdatedInputValue | import("./shared").PressedToggleButton | import("./shared").CompletedLockScroll | import("./shared").CompletedUnlockScroll | import("./shared").CompletedSetupInert | import("./shared").CompletedTeardownInert | import("./shared").CompletedFocusInput | import("./shared").CompletedScrollIntoView | import("./shared").CompletedClickItem) => Message;
|
|
155
155
|
items: readonly Item[];
|
|
156
156
|
itemToConfig: (item: Item, context: Readonly<{
|
|
157
157
|
isActive: boolean;
|
|
@@ -15,9 +15,9 @@ export declare const Opened: import("../../schema").CallableTaggedStruct<"Opened
|
|
|
15
15
|
/** Sent when the dialog should close (Escape key, backdrop click, or programmatic). Triggers the closeModal command. */
|
|
16
16
|
export declare const Closed: import("../../schema").CallableTaggedStruct<"Closed", {}>;
|
|
17
17
|
/** Sent when the show-dialog command completes (scroll lock + showModal). */
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const CompletedShowDialog: import("../../schema").CallableTaggedStruct<"CompletedShowDialog", {}>;
|
|
19
19
|
/** Sent when the close-dialog command completes (closeModal + scroll unlock). */
|
|
20
|
-
export declare const
|
|
20
|
+
export declare const CompletedCloseDialog: import("../../schema").CallableTaggedStruct<"CompletedCloseDialog", {}>;
|
|
21
21
|
/** Sent internally when a double-rAF completes, advancing the transition to its animating phase. */
|
|
22
22
|
export declare const AdvancedTransitionFrame: import("../../schema").CallableTaggedStruct<"AdvancedTransitionFrame", {}>;
|
|
23
23
|
/** Sent internally when all CSS transitions on the dialog panel have completed. */
|
|
@@ -26,15 +26,15 @@ export declare const EndedTransition: import("../../schema").CallableTaggedStruc
|
|
|
26
26
|
export declare const Message: S.Union<[
|
|
27
27
|
typeof Opened,
|
|
28
28
|
typeof Closed,
|
|
29
|
-
typeof
|
|
30
|
-
typeof
|
|
29
|
+
typeof CompletedShowDialog,
|
|
30
|
+
typeof CompletedCloseDialog,
|
|
31
31
|
typeof AdvancedTransitionFrame,
|
|
32
32
|
typeof EndedTransition
|
|
33
33
|
]>;
|
|
34
34
|
export type Opened = typeof Opened.Type;
|
|
35
35
|
export type Closed = typeof Closed.Type;
|
|
36
|
-
export type
|
|
37
|
-
export type
|
|
36
|
+
export type CompletedShowDialog = typeof CompletedShowDialog.Type;
|
|
37
|
+
export type CompletedCloseDialog = typeof CompletedCloseDialog.Type;
|
|
38
38
|
export type Message = typeof Message.Type;
|
|
39
39
|
/** Configuration for creating a dialog model with `init`. `isAnimated` enables CSS transition coordination (default `false`). */
|
|
40
40
|
export type InitConfig = Readonly<{
|
|
@@ -45,7 +45,19 @@ export type InitConfig = Readonly<{
|
|
|
45
45
|
}>;
|
|
46
46
|
/** Creates an initial dialog model from a config. Defaults to closed and non-animated. */
|
|
47
47
|
export declare const init: (config: InitConfig) => Model;
|
|
48
|
-
type UpdateReturn = [Model, ReadonlyArray<Command.Command<Message>>];
|
|
48
|
+
type UpdateReturn = readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
49
|
+
export declare const RequestFrame: Command.CommandDefinition<"RequestFrame", {
|
|
50
|
+
readonly _tag: "AdvancedTransitionFrame";
|
|
51
|
+
}>;
|
|
52
|
+
export declare const ShowDialog: Command.CommandDefinition<"ShowDialog", {
|
|
53
|
+
readonly _tag: "CompletedShowDialog";
|
|
54
|
+
}>;
|
|
55
|
+
export declare const CloseDialog: Command.CommandDefinition<"CloseDialog", {
|
|
56
|
+
readonly _tag: "CompletedCloseDialog";
|
|
57
|
+
}>;
|
|
58
|
+
export declare const WaitForTransitions: Command.CommandDefinition<"WaitForTransitions", {
|
|
59
|
+
readonly _tag: "EndedTransition";
|
|
60
|
+
}>;
|
|
49
61
|
/** Processes a dialog message and returns the next model and commands. */
|
|
50
62
|
export declare const update: (model: Model, message: Message) => UpdateReturn;
|
|
51
63
|
/** Returns the ID used for `aria-labelledby` on the dialog. Apply this to your title element. */
|
|
@@ -55,7 +67,7 @@ export declare const descriptionId: (model: Model) => string;
|
|
|
55
67
|
/** Configuration for rendering a dialog with `view`. */
|
|
56
68
|
export type ViewConfig<Message> = Readonly<{
|
|
57
69
|
model: Model;
|
|
58
|
-
toMessage: (message: Closed |
|
|
70
|
+
toMessage: (message: Closed | CompletedShowDialog | CompletedCloseDialog) => Message;
|
|
59
71
|
panelContent: Html;
|
|
60
72
|
panelClassName?: string;
|
|
61
73
|
panelAttributes?: ReadonlyArray<Attribute<Message>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAEvE,OAAO,KAAK,OAAO,MAAM,eAAe,CAAA;AAExC,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAoB,MAAM,YAAY,CAAA;AAQxE,oIAAoI;AACpI,eAAO,MAAM,KAAK;;;;;;EAMhB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,wEAAwE;AACxE,eAAO,MAAM,MAAM,2DAAc,CAAA;AACjC,wHAAwH;AACxH,eAAO,MAAM,MAAM,2DAAc,CAAA;AACjC,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,wEAA2B,CAAA;AAC3D,iFAAiF;AACjF,eAAO,MAAM,oBAAoB,yEAA4B,CAAA;AAC7D,oGAAoG;AACpG,eAAO,MAAM,uBAAuB,4EAA+B,CAAA;AACnE,mFAAmF;AACnF,eAAO,MAAM,eAAe,oEAAuB,CAAA;AAEnD,8DAA8D;AAC9D,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,KAAK,CAC3B;IACE,OAAO,MAAM;IACb,OAAO,MAAM;IACb,OAAO,mBAAmB;IAC1B,OAAO,oBAAoB;IAC3B,OAAO,uBAAuB;IAC9B,OAAO,eAAe;CACvB,CAQF,CAAA;AAED,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,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opened = m('Opened');
|
|
|
21
21
|
/** Sent when the dialog should close (Escape key, backdrop click, or programmatic). Triggers the closeModal command. */
|
|
22
22
|
export const Closed = m('Closed');
|
|
23
23
|
/** Sent when the show-dialog command completes (scroll lock + showModal). */
|
|
24
|
-
export const
|
|
24
|
+
export const CompletedShowDialog = m('CompletedShowDialog');
|
|
25
25
|
/** Sent when the close-dialog command completes (closeModal + scroll unlock). */
|
|
26
|
-
export const
|
|
26
|
+
export const CompletedCloseDialog = m('CompletedCloseDialog');
|
|
27
27
|
/** Sent internally when a double-rAF completes, advancing the transition to its animating phase. */
|
|
28
28
|
export const AdvancedTransitionFrame = m('AdvancedTransitionFrame');
|
|
29
29
|
/** Sent internally when all CSS transitions on the dialog panel have completed. */
|
|
30
30
|
export const EndedTransition = m('EndedTransition');
|
|
31
31
|
/** Union of all messages the dialog component can produce. */
|
|
32
|
-
export const Message = S.Union(Opened, Closed,
|
|
32
|
+
export const Message = S.Union(Opened, Closed, CompletedShowDialog, CompletedCloseDialog, AdvancedTransitionFrame, EndedTransition);
|
|
33
33
|
/** Creates an initial dialog model from a config. Defaults to closed and non-animated. */
|
|
34
34
|
export const init = (config) => ({
|
|
35
35
|
id: config.id,
|
|
@@ -42,16 +42,20 @@ export const init = (config) => ({
|
|
|
42
42
|
const dialogSelector = (id) => `#${id}`;
|
|
43
43
|
const panelSelector = (id) => `#${id}-panel`;
|
|
44
44
|
const withUpdateReturn = M.withReturnType();
|
|
45
|
+
export const RequestFrame = Command.define('RequestFrame', AdvancedTransitionFrame);
|
|
46
|
+
export const ShowDialog = Command.define('ShowDialog', CompletedShowDialog);
|
|
47
|
+
export const CloseDialog = Command.define('CloseDialog', CompletedCloseDialog);
|
|
48
|
+
export const WaitForTransitions = Command.define('WaitForTransitions', EndedTransition);
|
|
45
49
|
/** Processes a dialog message and returns the next model and commands. */
|
|
46
50
|
export const update = (model, message) => {
|
|
47
|
-
const maybeNextFrame = OptionExt.when(model.isAnimated, Task.nextFrame.pipe(Effect.as(AdvancedTransitionFrame())
|
|
51
|
+
const maybeNextFrame = OptionExt.when(model.isAnimated, RequestFrame(Task.nextFrame.pipe(Effect.as(AdvancedTransitionFrame()))));
|
|
48
52
|
return M.value(message).pipe(withUpdateReturn, M.tagsExhaustive({
|
|
49
53
|
Opened: () => {
|
|
50
54
|
const focusOptions = Option.match(model.maybeFocusSelector, {
|
|
51
55
|
onNone: () => undefined,
|
|
52
56
|
onSome: focusSelector => ({ focusSelector }),
|
|
53
57
|
});
|
|
54
|
-
const maybeShow = Option.liftPredicate(Task.lockScroll.pipe(Effect.andThen(() => Task.showModal(dialogSelector(model.id), focusOptions)), Effect.ignore, Effect.as(
|
|
58
|
+
const maybeShow = Option.liftPredicate(ShowDialog(Task.lockScroll.pipe(Effect.andThen(() => Task.showModal(dialogSelector(model.id), focusOptions)), Effect.ignore, Effect.as(CompletedShowDialog()))), () => !model.isOpen);
|
|
55
59
|
return [
|
|
56
60
|
evo(model, {
|
|
57
61
|
isOpen: () => true,
|
|
@@ -75,18 +79,18 @@ export const update = (model, message) => {
|
|
|
75
79
|
Option.toArray(maybeNextFrame),
|
|
76
80
|
];
|
|
77
81
|
}
|
|
78
|
-
const maybeClose = Option.liftPredicate(Task.closeModal(dialogSelector(model.id)).pipe(Effect.andThen(() => Task.unlockScroll), Effect.ignore, Effect.as(
|
|
82
|
+
const maybeClose = Option.liftPredicate(CloseDialog(Task.closeModal(dialogSelector(model.id)).pipe(Effect.andThen(() => Task.unlockScroll), Effect.ignore, Effect.as(CompletedCloseDialog()))), () => model.isOpen);
|
|
79
83
|
return [evo(model, { isOpen: () => false }), Option.toArray(maybeClose)];
|
|
80
84
|
},
|
|
81
85
|
AdvancedTransitionFrame: () => M.value(model.transitionState).pipe(withUpdateReturn, M.when('EnterStart', () => [
|
|
82
86
|
evo(model, { transitionState: () => 'EnterAnimating' }),
|
|
83
87
|
[
|
|
84
|
-
Task.waitForTransitions(panelSelector(model.id)).pipe(Effect.as(EndedTransition())
|
|
88
|
+
WaitForTransitions(Task.waitForTransitions(panelSelector(model.id)).pipe(Effect.as(EndedTransition()))),
|
|
85
89
|
],
|
|
86
90
|
]), M.when('LeaveStart', () => [
|
|
87
91
|
evo(model, { transitionState: () => 'LeaveAnimating' }),
|
|
88
92
|
[
|
|
89
|
-
Task.waitForTransitions(panelSelector(model.id)).pipe(Effect.as(EndedTransition())
|
|
93
|
+
WaitForTransitions(Task.waitForTransitions(panelSelector(model.id)).pipe(Effect.as(EndedTransition()))),
|
|
90
94
|
],
|
|
91
95
|
]), M.orElse(() => [model, []])),
|
|
92
96
|
EndedTransition: () => M.value(model.transitionState).pipe(withUpdateReturn, M.when('EnterAnimating', () => [
|
|
@@ -95,11 +99,11 @@ export const update = (model, message) => {
|
|
|
95
99
|
]), M.when('LeaveAnimating', () => [
|
|
96
100
|
evo(model, { transitionState: () => 'Idle' }),
|
|
97
101
|
[
|
|
98
|
-
Task.closeModal(dialogSelector(model.id)).pipe(Effect.andThen(() => Task.unlockScroll), Effect.ignore, Effect.as(
|
|
102
|
+
CloseDialog(Task.closeModal(dialogSelector(model.id)).pipe(Effect.andThen(() => Task.unlockScroll), Effect.ignore, Effect.as(CompletedCloseDialog()))),
|
|
99
103
|
],
|
|
100
104
|
]), M.orElse(() => [model, []])),
|
|
101
|
-
|
|
102
|
-
|
|
105
|
+
CompletedShowDialog: () => [model, []],
|
|
106
|
+
CompletedCloseDialog: () => [model, []],
|
|
103
107
|
}));
|
|
104
108
|
};
|
|
105
109
|
// VIEW
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { init, update, view, lazy, titleId, descriptionId, Model, Message, Opened, Closed,
|
|
1
|
+
export { init, update, view, lazy, titleId, descriptionId, Model, Message, Opened, Closed, CompletedShowDialog, CompletedCloseDialog, AdvancedTransitionFrame, EndedTransition, } from './index';
|
|
2
2
|
export type { InitConfig, ViewConfig } from './index';
|
|
3
3
|
//# sourceMappingURL=public.d.ts.map
|
package/dist/ui/dialog/public.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { init, update, view, lazy, titleId, descriptionId, Model, Message, Opened, Closed,
|
|
1
|
+
export { init, update, view, lazy, titleId, descriptionId, Model, Message, Opened, Closed, CompletedShowDialog, CompletedCloseDialog, AdvancedTransitionFrame, EndedTransition, } from './index';
|
|
@@ -12,16 +12,16 @@ export declare const Toggled: import("../../schema").CallableTaggedStruct<"Toggl
|
|
|
12
12
|
/** Sent to explicitly close the disclosure, regardless of its current state. */
|
|
13
13
|
export declare const Closed: import("../../schema").CallableTaggedStruct<"Closed", {}>;
|
|
14
14
|
/** Sent when the focus-button command completes after closing. */
|
|
15
|
-
export declare const
|
|
15
|
+
export declare const CompletedFocusButton: import("../../schema").CallableTaggedStruct<"CompletedFocusButton", {}>;
|
|
16
16
|
/** Union of all messages the disclosure component can produce. */
|
|
17
17
|
export declare const Message: S.Union<[
|
|
18
18
|
typeof Toggled,
|
|
19
19
|
typeof Closed,
|
|
20
|
-
typeof
|
|
20
|
+
typeof CompletedFocusButton
|
|
21
21
|
]>;
|
|
22
22
|
export type Toggled = typeof Toggled.Type;
|
|
23
23
|
export type Closed = typeof Closed.Type;
|
|
24
|
-
export type
|
|
24
|
+
export type CompletedFocusButton = typeof CompletedFocusButton.Type;
|
|
25
25
|
export type Message = typeof Message.Type;
|
|
26
26
|
/** Configuration for creating a disclosure model with `init`. */
|
|
27
27
|
export type InitConfig = Readonly<{
|
|
@@ -30,12 +30,15 @@ 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
|
+
export declare const FocusButton: Command.CommandDefinition<"FocusButton", {
|
|
34
|
+
readonly _tag: "CompletedFocusButton";
|
|
35
|
+
}>;
|
|
33
36
|
/** Processes a disclosure message and returns the next model and commands. */
|
|
34
|
-
export declare const update: (model: Model, message: Message) => [Model, ReadonlyArray<Command.Command<Message>>];
|
|
37
|
+
export declare const update: (model: Model, message: Message) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
35
38
|
/** Configuration for rendering a disclosure with `view`. */
|
|
36
39
|
export type ViewConfig<Message> = Readonly<{
|
|
37
40
|
model: Model;
|
|
38
|
-
toMessage: (message: Toggled | Closed |
|
|
41
|
+
toMessage: (message: Toggled | Closed | CompletedFocusButton) => Message;
|
|
39
42
|
buttonClassName?: string;
|
|
40
43
|
buttonAttributes?: ReadonlyArray<Attribute<Message>>;
|
|
41
44
|
buttonContent: Html;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/disclosure/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAEhE,OAAO,KAAK,OAAO,MAAM,eAAe,CAAA;AACxC,OAAO,EACL,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,OAAO,EAGb,MAAM,YAAY,CAAA;AAOnB,kGAAkG;AAClG,eAAO,MAAM,KAAK;;;EAGhB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,iFAAiF;AACjF,eAAO,MAAM,OAAO,4DAAe,CAAA;AACnC,gFAAgF;AAChF,eAAO,MAAM,MAAM,2DAAc,CAAA;AACjC,kEAAkE;AAClE,eAAO,MAAM,oBAAoB,yEAA4B,CAAA;AAE7D,kEAAkE;AAClE,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,KAAK,CAC3B;IAAC,OAAO,OAAO;IAAE,OAAO,MAAM;IAAE,OAAO,oBAAoB;CAAC,CACZ,CAAA;AAElD,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AACzC,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAA;AACvC,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAC,IAAI,CAAA;A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,UAAU,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;CAC/C,CAAC,CAAA;AAEF,oGAAoG;AACpG,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,QAAQ,UAAU,CAAC,OAAO,CAAC,KAAG,IAgG3D,CAAA;AAED;6EAC6E;AAC7E,eAAO,MAAM,IAAI,GAAI,OAAO,EAC1B,cAAc,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC,KAC7D,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,KAAK,IAAI,CAgBtE,CAAA"}
|
|
@@ -16,9 +16,9 @@ export const Toggled = m('Toggled');
|
|
|
16
16
|
/** Sent to explicitly close the disclosure, regardless of its current state. */
|
|
17
17
|
export const Closed = m('Closed');
|
|
18
18
|
/** Sent when the focus-button command completes after closing. */
|
|
19
|
-
export const
|
|
19
|
+
export const CompletedFocusButton = m('CompletedFocusButton');
|
|
20
20
|
/** Union of all messages the disclosure component can produce. */
|
|
21
|
-
export const Message = S.Union(Toggled, Closed,
|
|
21
|
+
export const Message = S.Union(Toggled, Closed, CompletedFocusButton);
|
|
22
22
|
/** Creates an initial disclosure model from a config. Defaults to closed. */
|
|
23
23
|
export const init = (config) => ({
|
|
24
24
|
id: config.id,
|
|
@@ -28,20 +28,21 @@ 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
|
+
export const FocusButton = Command.define('FocusButton', CompletedFocusButton);
|
|
31
32
|
/** Processes a disclosure message and returns the next model and commands. */
|
|
32
33
|
export const update = (model, message) => M.value(message).pipe(M.withReturnType(), M.tagsExhaustive({
|
|
33
34
|
Toggled: () => {
|
|
34
|
-
const maybeFocus = Option.liftPredicate(Task.focus(buttonSelector(model.id)).pipe(Effect.ignore, Effect.as(
|
|
35
|
+
const maybeFocus = Option.liftPredicate(FocusButton(Task.focus(buttonSelector(model.id)).pipe(Effect.ignore, Effect.as(CompletedFocusButton()))), () => model.isOpen);
|
|
35
36
|
return [
|
|
36
37
|
evo(model, { isOpen: () => !model.isOpen }),
|
|
37
38
|
Option.toArray(maybeFocus),
|
|
38
39
|
];
|
|
39
40
|
},
|
|
40
41
|
Closed: () => {
|
|
41
|
-
const maybeFocus = Option.liftPredicate(Task.focus(buttonSelector(model.id)).pipe(Effect.ignore, Effect.as(
|
|
42
|
+
const maybeFocus = Option.liftPredicate(FocusButton(Task.focus(buttonSelector(model.id)).pipe(Effect.ignore, Effect.as(CompletedFocusButton()))), () => model.isOpen);
|
|
42
43
|
return [evo(model, { isOpen: () => false }), Option.toArray(maybeFocus)];
|
|
43
44
|
},
|
|
44
|
-
|
|
45
|
+
CompletedFocusButton: () => [model, []],
|
|
45
46
|
}));
|
|
46
47
|
/** Renders a headless disclosure component with accessible ARIA attributes and keyboard support. */
|
|
47
48
|
export const view = (config) => {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { init, update, view, lazy, Model, Message } from './index';
|
|
2
|
-
export type { Toggled, Closed,
|
|
2
|
+
export type { Toggled, Closed, CompletedFocusButton, InitConfig, ViewConfig, } from './index';
|
|
3
3
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -47,7 +47,7 @@ export declare const update: (model: {
|
|
|
47
47
|
readonly maybeLastButtonPointerType: Option.Option<string>;
|
|
48
48
|
} & {
|
|
49
49
|
readonly selectedItems: readonly string[];
|
|
50
|
-
}, message: import("./shared").Message) => [{
|
|
50
|
+
}, message: import("./shared").Message) => readonly [{
|
|
51
51
|
readonly id: string;
|
|
52
52
|
readonly orientation: "Horizontal" | "Vertical";
|
|
53
53
|
readonly isOpen: boolean;
|
|
@@ -74,23 +74,23 @@ export declare const update: (model: {
|
|
|
74
74
|
} | {
|
|
75
75
|
readonly _tag: "DeactivatedItem";
|
|
76
76
|
} | {
|
|
77
|
-
readonly _tag: "
|
|
77
|
+
readonly _tag: "CompletedLockScroll";
|
|
78
78
|
} | {
|
|
79
|
-
readonly _tag: "
|
|
79
|
+
readonly _tag: "CompletedUnlockScroll";
|
|
80
80
|
} | {
|
|
81
|
-
readonly _tag: "
|
|
81
|
+
readonly _tag: "CompletedSetupInert";
|
|
82
82
|
} | {
|
|
83
|
-
readonly _tag: "
|
|
83
|
+
readonly _tag: "CompletedTeardownInert";
|
|
84
84
|
} | {
|
|
85
85
|
readonly _tag: "CompletedScrollIntoView";
|
|
86
86
|
} | {
|
|
87
|
-
readonly _tag: "
|
|
87
|
+
readonly _tag: "CompletedClickItem";
|
|
88
88
|
} | {
|
|
89
89
|
readonly _tag: "AdvancedTransitionFrame";
|
|
90
90
|
} | {
|
|
91
91
|
readonly _tag: "EndedTransition";
|
|
92
92
|
} | {
|
|
93
|
-
readonly _tag: "
|
|
93
|
+
readonly _tag: "CompletedFocusButton";
|
|
94
94
|
} | {
|
|
95
95
|
readonly _tag: "Opened";
|
|
96
96
|
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
@@ -117,7 +117,7 @@ export declare const update: (model: {
|
|
|
117
117
|
readonly screenX: number;
|
|
118
118
|
readonly screenY: number;
|
|
119
119
|
} | {
|
|
120
|
-
readonly _tag: "
|
|
120
|
+
readonly _tag: "CompletedFocusItems";
|
|
121
121
|
} | {
|
|
122
122
|
readonly _tag: "IgnoredMouseClick";
|
|
123
123
|
} | {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { init, update, view, lazy, Model } from './single';
|
|
2
2
|
export { Message, Orientation } from './shared';
|
|
3
3
|
export { TransitionState } from '../transition';
|
|
4
|
-
export type { ActivationTrigger, Opened, Closed, ClosedByTab, ActivatedItem, DeactivatedItem, SelectedItem, MovedPointerOverItem, RequestedItemClick, Searched, ClearedSearch, PressedPointerOnButton, DetectedButtonMovement,
|
|
4
|
+
export type { ActivationTrigger, Opened, Closed, ClosedByTab, ActivatedItem, DeactivatedItem, SelectedItem, MovedPointerOverItem, RequestedItemClick, Searched, ClearedSearch, PressedPointerOnButton, DetectedButtonMovement, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusButton, CompletedFocusItems, CompletedScrollIntoView, CompletedClickItem, IgnoredMouseClick, SuppressedSpaceScroll, AdvancedTransitionFrame, EndedTransition, 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';
|