foldkit 0.71.0 → 0.72.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/task/index.d.ts +1 -1
- package/dist/task/index.d.ts.map +1 -1
- package/dist/task/index.js +1 -1
- package/dist/task/public.d.ts +1 -1
- package/dist/task/public.d.ts.map +1 -1
- package/dist/task/public.js +1 -1
- package/dist/task/timing.d.ts +9 -5
- package/dist/task/timing.d.ts.map +1 -1
- package/dist/task/timing.js +11 -11
- package/dist/test/apps/disabledButton.d.ts +5 -5
- package/dist/ui/{transition → animation}/index.d.ts +9 -8
- package/dist/ui/animation/index.d.ts.map +1 -0
- package/dist/ui/{transition → animation}/index.js +8 -7
- package/dist/ui/animation/public.d.ts +3 -0
- package/dist/ui/animation/public.d.ts.map +1 -0
- package/dist/ui/animation/public.js +1 -0
- package/dist/ui/{transition → animation}/schema.d.ts +14 -14
- package/dist/ui/animation/schema.d.ts.map +1 -0
- package/dist/ui/animation/schema.js +35 -0
- package/dist/ui/{transition → animation}/update.d.ts +7 -7
- package/dist/ui/animation/update.d.ts.map +1 -0
- package/dist/ui/{transition → animation}/update.js +12 -12
- package/dist/ui/combobox/multi.d.ts +7 -7
- package/dist/ui/combobox/public.d.ts +1 -1
- 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 +13 -13
- package/dist/ui/combobox/shared.d.ts.map +1 -1
- package/dist/ui/combobox/shared.js +31 -31
- package/dist/ui/combobox/single.d.ts +7 -7
- package/dist/ui/datePicker/index.d.ts +3 -3
- package/dist/ui/dialog/index.d.ts +7 -7
- package/dist/ui/dialog/index.d.ts.map +1 -1
- package/dist/ui/dialog/index.js +28 -28
- 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/index.d.ts +1 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/ui/listbox/multi.d.ts +7 -7
- package/dist/ui/listbox/public.d.ts +1 -1
- package/dist/ui/listbox/public.d.ts.map +1 -1
- package/dist/ui/listbox/public.js +1 -1
- package/dist/ui/listbox/shared.d.ts +13 -13
- package/dist/ui/listbox/shared.d.ts.map +1 -1
- package/dist/ui/listbox/shared.js +29 -29
- package/dist/ui/listbox/single.d.ts +7 -7
- package/dist/ui/menu/index.d.ts +11 -11
- package/dist/ui/menu/index.d.ts.map +1 -1
- package/dist/ui/menu/index.js +29 -29
- package/dist/ui/menu/public.d.ts +1 -1
- 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 +12 -12
- package/dist/ui/popover/index.d.ts.map +1 -1
- package/dist/ui/popover/index.js +30 -30
- package/dist/ui/popover/public.d.ts +1 -1
- package/dist/ui/popover/public.d.ts.map +1 -1
- package/dist/ui/popover/public.js +1 -1
- package/dist/ui/toast/index.d.ts +44 -44
- package/dist/ui/toast/index.d.ts.map +1 -1
- package/dist/ui/toast/index.js +7 -7
- package/dist/ui/toast/public.d.ts +1 -1
- package/dist/ui/toast/public.d.ts.map +1 -1
- package/dist/ui/toast/public.js +1 -1
- package/dist/ui/toast/schema.d.ts +11 -11
- package/dist/ui/toast/schema.d.ts.map +1 -1
- package/dist/ui/toast/schema.js +7 -7
- package/dist/ui/toast/update.d.ts +35 -35
- package/dist/ui/toast/update.d.ts.map +1 -1
- package/dist/ui/toast/update.js +16 -16
- package/package.json +5 -5
- package/dist/ui/transition/index.d.ts.map +0 -1
- package/dist/ui/transition/public.d.ts +0 -3
- package/dist/ui/transition/public.d.ts.map +0 -1
- package/dist/ui/transition/public.js +0 -1
- package/dist/ui/transition/schema.d.ts.map +0 -1
- package/dist/ui/transition/schema.js +0 -35
- package/dist/ui/transition/update.d.ts.map +0 -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;AAExC,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAQ,MAAM,YAAY,CAAA;AAK5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;
|
|
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;AAExC,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAQ,MAAM,YAAY,CAAA;AAK5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAc7C,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAG1C,OAAO,EAAE,eAAe,EAAE,CAAA;AAI1B,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,oCAAmC,CAAA;AACjE,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAA;AAE7D,oKAAoK;AACpK,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;EAepB,CAAA;AACF,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA;AAE7C,4EAA4E;AAC5E,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACn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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,IA+iBF,CAAA"}
|
|
@@ -6,13 +6,13 @@ import { m } from '../../message';
|
|
|
6
6
|
import { makeConstrainedEvo } from '../../struct';
|
|
7
7
|
import * as Task from '../../task';
|
|
8
8
|
import { anchorHooks } from '../anchor';
|
|
9
|
+
// NOTE: Animation imports are split across schema + update to avoid a circular
|
|
10
|
+
// dependency: animation → html → runtime → devtools → combobox → animation.
|
|
11
|
+
// The barrel (../animation) imports from html, which starts the cycle.
|
|
12
|
+
import { EndedAnimation as AnimationEndedAnimation, Hid as AnimationHid, Message as AnimationMessage, Model as AnimationModel, Showed as AnimationShowed, init as animationInit, } from '../animation/schema';
|
|
13
|
+
import { update as animationUpdate } from '../animation/update';
|
|
9
14
|
import { groupContiguous } from '../group';
|
|
10
15
|
import { findFirstEnabledIndex, keyToIndex } from '../keyboard';
|
|
11
|
-
// NOTE: Transition imports are split across schema + update to avoid a circular
|
|
12
|
-
// dependency: transition → html → runtime → devtools → combobox → transition.
|
|
13
|
-
// The barrel (../transition) imports from html, which starts the cycle.
|
|
14
|
-
import { EndedTransition as TransitionEndedTransition, Hid as TransitionHid, Message as TransitionMessage, Model as TransitionModel, Showed as TransitionShowed, init as transitionInit, } from '../transition/schema';
|
|
15
|
-
import { update as transitionUpdate } from '../transition/update';
|
|
16
16
|
export { groupContiguous };
|
|
17
17
|
// MODEL
|
|
18
18
|
/** Schema for the activation trigger — whether the user interacted via mouse or keyboard. */
|
|
@@ -26,7 +26,7 @@ export const BaseModel = S.Struct({
|
|
|
26
26
|
nullable: S.Boolean,
|
|
27
27
|
immediate: S.Boolean,
|
|
28
28
|
selectInputOnFocus: S.Boolean,
|
|
29
|
-
|
|
29
|
+
animation: AnimationModel,
|
|
30
30
|
maybeActiveItemIndex: S.OptionFromSelf(S.Number),
|
|
31
31
|
activationTrigger: ActivationTrigger,
|
|
32
32
|
inputValue: S.String,
|
|
@@ -41,7 +41,7 @@ export const baseInit = (config) => ({
|
|
|
41
41
|
nullable: config.nullable ?? false,
|
|
42
42
|
immediate: config.immediate ?? false,
|
|
43
43
|
selectInputOnFocus: config.selectInputOnFocus ?? false,
|
|
44
|
-
|
|
44
|
+
animation: animationInit({ id: `${config.id}-items` }),
|
|
45
45
|
maybeActiveItemIndex: Option.none(),
|
|
46
46
|
activationTrigger: 'Keyboard',
|
|
47
47
|
inputValue: '',
|
|
@@ -93,9 +93,9 @@ export const CompletedFocusInput = m('CompletedFocusInput');
|
|
|
93
93
|
export const CompletedScrollIntoView = m('CompletedScrollIntoView');
|
|
94
94
|
/** Sent when the programmatic item click command completes. */
|
|
95
95
|
export const CompletedClickItem = m('CompletedClickItem');
|
|
96
|
-
/** Wraps
|
|
97
|
-
export const
|
|
98
|
-
message:
|
|
96
|
+
/** Wraps an Animation submodel message for delegation. */
|
|
97
|
+
export const GotAnimationMessage = m('GotAnimationMessage', {
|
|
98
|
+
message: AnimationMessage,
|
|
99
99
|
});
|
|
100
100
|
/** Sent when the user types in the input. */
|
|
101
101
|
export const UpdatedInputValue = m('UpdatedInputValue', {
|
|
@@ -104,7 +104,7 @@ export const UpdatedInputValue = m('UpdatedInputValue', {
|
|
|
104
104
|
/** Sent when the optional toggle button is clicked. */
|
|
105
105
|
export const PressedToggleButton = m('PressedToggleButton');
|
|
106
106
|
/** Union of all messages the combobox component can produce. */
|
|
107
|
-
export const Message = S.Union(Opened, Closed, ClosedByTab, ActivatedItem, DeactivatedItem, SelectedItem, MovedPointerOverItem, RequestedItemClick, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusInput, CompletedScrollIntoView, CompletedClickItem,
|
|
107
|
+
export const Message = S.Union(Opened, Closed, ClosedByTab, ActivatedItem, DeactivatedItem, SelectedItem, MovedPointerOverItem, RequestedItemClick, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusInput, CompletedScrollIntoView, CompletedClickItem, GotAnimationMessage, UpdatedInputValue, PressedToggleButton);
|
|
108
108
|
// SELECTORS
|
|
109
109
|
export const inputSelector = (id) => `#${id}-input`;
|
|
110
110
|
export const inputWrapperSelector = (id) => `#${id}-input-wrapper`;
|
|
@@ -134,26 +134,26 @@ export const FocusInput = Command.define('FocusInput', CompletedFocusInput);
|
|
|
134
134
|
export const ScrollIntoView = Command.define('ScrollIntoView', CompletedScrollIntoView);
|
|
135
135
|
/** Programmatically clicks the active combobox item's DOM element. */
|
|
136
136
|
export const ClickItem = Command.define('ClickItem', CompletedClickItem);
|
|
137
|
-
/** Detects whether the combobox input wrapper moved or the leave
|
|
138
|
-
export const
|
|
139
|
-
const
|
|
140
|
-
const [
|
|
141
|
-
const mappedCommands =
|
|
137
|
+
/** Detects whether the combobox input wrapper moved or the leave animation ended — whichever comes first. Both outcomes signal the Animation submodel that leave is complete. */
|
|
138
|
+
export const DetectMovementOrAnimationEnd = Command.define('DetectMovementOrAnimationEnd', GotAnimationMessage);
|
|
139
|
+
const delegateToAnimation = (model, animationMessage) => {
|
|
140
|
+
const [nextAnimation, animationCommands, maybeOutMessage] = animationUpdate(model.animation, animationMessage);
|
|
141
|
+
const mappedCommands = animationCommands.map(Command.mapEffect(Effect.map(message => GotAnimationMessage({ message }))));
|
|
142
142
|
const additionalCommands = Option.match(maybeOutMessage, {
|
|
143
143
|
onNone: () => [],
|
|
144
144
|
onSome: M.type().pipe(M.tagsExhaustive({
|
|
145
145
|
StartedLeaveAnimating: () => [
|
|
146
|
-
|
|
147
|
-
message:
|
|
148
|
-
}))), Task.
|
|
149
|
-
message:
|
|
146
|
+
DetectMovementOrAnimationEnd(Effect.raceFirst(Task.detectElementMovement(inputWrapperSelector(model.id)).pipe(Effect.as(GotAnimationMessage({
|
|
147
|
+
message: AnimationEndedAnimation(),
|
|
148
|
+
}))), Task.waitForAnimationSettled(itemsSelector(model.id)).pipe(Effect.as(GotAnimationMessage({
|
|
149
|
+
message: AnimationEndedAnimation(),
|
|
150
150
|
}))))),
|
|
151
151
|
],
|
|
152
152
|
TransitionedOut: () => [],
|
|
153
153
|
})),
|
|
154
154
|
});
|
|
155
155
|
return [
|
|
156
|
-
constrainedEvo(model, {
|
|
156
|
+
constrainedEvo(model, { animation: () => nextAnimation }),
|
|
157
157
|
[...mappedCommands, ...additionalCommands],
|
|
158
158
|
];
|
|
159
159
|
};
|
|
@@ -171,12 +171,12 @@ export const makeUpdate = (handlers) => {
|
|
|
171
171
|
const focusInput = FocusInput(Task.focus(inputSelector(model.id)).pipe(Effect.ignore, Effect.as(CompletedFocusInput())));
|
|
172
172
|
const openCombobox = (baseModel) => {
|
|
173
173
|
if (model.isAnimated) {
|
|
174
|
-
const [nextModel,
|
|
174
|
+
const [nextModel, animationCommands] = delegateToAnimation(baseModel, AnimationShowed());
|
|
175
175
|
return [
|
|
176
176
|
constrainedEvo(nextModel, { isOpen: () => true }),
|
|
177
177
|
[
|
|
178
178
|
...Array.getSomes([maybeLockScroll, maybeInertOthers]),
|
|
179
|
-
...
|
|
179
|
+
...animationCommands,
|
|
180
180
|
],
|
|
181
181
|
];
|
|
182
182
|
}
|
|
@@ -188,8 +188,8 @@ export const makeUpdate = (handlers) => {
|
|
|
188
188
|
const closeCombobox = (baseModel, commands) => {
|
|
189
189
|
const closed = handlers.handleClose(baseModel);
|
|
190
190
|
if (model.isAnimated) {
|
|
191
|
-
const [nextModel,
|
|
192
|
-
return [nextModel, [...commands, ...
|
|
191
|
+
const [nextModel, animationCommands] = delegateToAnimation(closed, AnimationHid());
|
|
192
|
+
return [nextModel, [...commands, ...animationCommands]];
|
|
193
193
|
}
|
|
194
194
|
return [closed, commands];
|
|
195
195
|
};
|
|
@@ -251,8 +251,8 @@ export const makeUpdate = (handlers) => {
|
|
|
251
251
|
maybeRestoreInert,
|
|
252
252
|
});
|
|
253
253
|
if (model.isOpen && !nextModel.isOpen && model.isAnimated) {
|
|
254
|
-
const [transitionedModel,
|
|
255
|
-
return [transitionedModel, [...commands, ...
|
|
254
|
+
const [transitionedModel, animationCommands] = delegateToAnimation(nextModel, AnimationHid());
|
|
255
|
+
return [transitionedModel, [...commands, ...animationCommands]];
|
|
256
256
|
}
|
|
257
257
|
return [nextModel, commands];
|
|
258
258
|
},
|
|
@@ -291,7 +291,7 @@ export const makeUpdate = (handlers) => {
|
|
|
291
291
|
}));
|
|
292
292
|
return [nextModel, [focusInput, ...commands]];
|
|
293
293
|
},
|
|
294
|
-
|
|
294
|
+
GotAnimationMessage: ({ message: animationMessage }) => delegateToAnimation(model, animationMessage),
|
|
295
295
|
CompletedLockScroll: () => [model, []],
|
|
296
296
|
CompletedUnlockScroll: () => [model, []],
|
|
297
297
|
CompletedSetupInert: () => [model, []],
|
|
@@ -305,7 +305,7 @@ export const makeUpdate = (handlers) => {
|
|
|
305
305
|
/** Creates a combobox view function from variant-specific behavior. Shared rendering logic (input, items, transitions, keyboard navigation) is handled internally; only selection display varies by variant. */
|
|
306
306
|
export const makeView = (behavior) => (config) => {
|
|
307
307
|
const { div, input, AriaActiveDescendant, AriaControls, AriaDisabled, AriaExpanded, AriaInvalid, AriaLabelledBy, AriaMultiSelectable, AriaSelected, Attribute, Autocomplete, Class, DataAttribute, Id, Name, OnBlur, OnClick, OnDestroy, OnFocus, OnInput, OnInsert, OnKeyDownPreventDefault, OnPointerLeave, OnPointerMove, Placeholder, Role, Style, Tabindex, Type, Value, keyed, } = html();
|
|
308
|
-
const { model: { id, isOpen, immediate,
|
|
308
|
+
const { model: { id, isOpen, immediate, animation: { transitionState }, maybeActiveItemIndex, }, toParentMessage, onSelectedItem, items, itemToConfig, itemToValue, itemToDisplayText, isItemDisabled, inputClassName, inputAttributes = [], inputPlaceholder, inputWrapperClassName, inputWrapperAttributes = [], itemsClassName, itemsAttributes = [], itemsScrollClassName, itemsScrollAttributes = [], backdropClassName, backdropAttributes = [], className, attributes = [], buttonContent, buttonClassName, buttonAttributes = [], formName, isDisabled, isInvalid, openOnFocus, itemGroupKey, groupToHeading, groupClassName, groupAttributes = [], separatorClassName, separatorAttributes = [], anchor, } = config;
|
|
309
309
|
const dispatchSelectedItem = (item, index) => onSelectedItem
|
|
310
310
|
? onSelectedItem(itemToValue(item, index))
|
|
311
311
|
: toParentMessage(SelectedItem({
|
|
@@ -314,7 +314,7 @@ export const makeView = (behavior) => (config) => {
|
|
|
314
314
|
}));
|
|
315
315
|
const isLeaving = transitionState === 'LeaveStart' || transitionState === 'LeaveAnimating';
|
|
316
316
|
const isVisible = isOpen || isLeaving;
|
|
317
|
-
const
|
|
317
|
+
const animationAttributes = M.value(transitionState).pipe(M.when('EnterStart', () => [
|
|
318
318
|
DataAttribute('closed', ''),
|
|
319
319
|
DataAttribute('enter', ''),
|
|
320
320
|
DataAttribute('transition', ''),
|
|
@@ -458,7 +458,7 @@ export const makeView = (behavior) => (config) => {
|
|
|
458
458
|
AriaLabelledBy(`${id}-input`),
|
|
459
459
|
Tabindex(-1),
|
|
460
460
|
...anchorAttributes,
|
|
461
|
-
...
|
|
461
|
+
...animationAttributes,
|
|
462
462
|
...(itemsClassName ? [Class(itemsClassName)] : []),
|
|
463
463
|
...itemsAttributes,
|
|
464
464
|
];
|
|
@@ -11,7 +11,7 @@ export declare const Model: S.extend<S.Struct<{
|
|
|
11
11
|
nullable: typeof S.Boolean;
|
|
12
12
|
immediate: typeof S.Boolean;
|
|
13
13
|
selectInputOnFocus: typeof S.Boolean;
|
|
14
|
-
|
|
14
|
+
animation: S.Struct<{
|
|
15
15
|
id: typeof S.String;
|
|
16
16
|
isShowing: typeof S.Boolean;
|
|
17
17
|
transitionState: S.Literal<["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
@@ -41,7 +41,7 @@ export declare const update: (model: {
|
|
|
41
41
|
readonly isOpen: boolean;
|
|
42
42
|
readonly isAnimated: boolean;
|
|
43
43
|
readonly isModal: boolean;
|
|
44
|
-
readonly
|
|
44
|
+
readonly animation: {
|
|
45
45
|
readonly id: string;
|
|
46
46
|
readonly isShowing: boolean;
|
|
47
47
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
@@ -64,7 +64,7 @@ export declare const update: (model: {
|
|
|
64
64
|
readonly isOpen: boolean;
|
|
65
65
|
readonly isAnimated: boolean;
|
|
66
66
|
readonly isModal: boolean;
|
|
67
|
-
readonly
|
|
67
|
+
readonly animation: {
|
|
68
68
|
readonly id: string;
|
|
69
69
|
readonly isShowing: boolean;
|
|
70
70
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
@@ -128,15 +128,15 @@ export declare const update: (model: {
|
|
|
128
128
|
} | {
|
|
129
129
|
readonly _tag: "CompletedFocusInput";
|
|
130
130
|
} | {
|
|
131
|
-
readonly _tag: "
|
|
131
|
+
readonly _tag: "GotAnimationMessage";
|
|
132
132
|
readonly message: {
|
|
133
133
|
readonly _tag: "Showed";
|
|
134
134
|
} | {
|
|
135
135
|
readonly _tag: "Hid";
|
|
136
136
|
} | {
|
|
137
|
-
readonly _tag: "
|
|
137
|
+
readonly _tag: "AdvancedAnimationFrame";
|
|
138
138
|
} | {
|
|
139
|
-
readonly _tag: "
|
|
139
|
+
readonly _tag: "EndedAnimation";
|
|
140
140
|
};
|
|
141
141
|
} | {
|
|
142
142
|
readonly _tag: "UpdatedInputValue";
|
|
@@ -163,7 +163,7 @@ export declare const view: <Message, Item extends string>(config: Readonly<{
|
|
|
163
163
|
readonly isOpen: boolean;
|
|
164
164
|
readonly isAnimated: boolean;
|
|
165
165
|
readonly isModal: boolean;
|
|
166
|
-
readonly
|
|
166
|
+
readonly animation: {
|
|
167
167
|
readonly id: string;
|
|
168
168
|
readonly isShowing: boolean;
|
|
169
169
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
@@ -65,7 +65,7 @@ export declare const Model: S.Struct<{
|
|
|
65
65
|
isAnimated: typeof S.Boolean;
|
|
66
66
|
isModal: typeof S.Boolean;
|
|
67
67
|
contentFocus: typeof S.Boolean;
|
|
68
|
-
|
|
68
|
+
animation: S.Struct<{
|
|
69
69
|
id: typeof S.String;
|
|
70
70
|
isShowing: typeof S.Boolean;
|
|
71
71
|
transitionState: S.Literal<["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
@@ -102,8 +102,8 @@ export declare const GotPopoverMessage: import("../../schema").CallableTaggedStr
|
|
|
102
102
|
message: S.Union<[import("../../schema").CallableTaggedStruct<"Opened", {}>, import("../../schema").CallableTaggedStruct<"Closed", {}>, import("../../schema").CallableTaggedStruct<"ClosedByTab", {}>, import("../../schema").CallableTaggedStruct<"PressedPointerOnButton", {
|
|
103
103
|
pointerType: typeof S.String;
|
|
104
104
|
button: typeof S.Number;
|
|
105
|
-
}>, import("../../schema").CallableTaggedStruct<"CompletedFocusPanel", {}>, import("../../schema").CallableTaggedStruct<"CompletedFocusButton", {}>, import("../../schema").CallableTaggedStruct<"CompletedLockScroll", {}>, import("../../schema").CallableTaggedStruct<"CompletedUnlockScroll", {}>, import("../../schema").CallableTaggedStruct<"CompletedSetupInert", {}>, import("../../schema").CallableTaggedStruct<"CompletedTeardownInert", {}>, import("../../schema").CallableTaggedStruct<"IgnoredMouseClick", {}>, import("../../schema").CallableTaggedStruct<"SuppressedSpaceScroll", {}>, import("../../schema").CallableTaggedStruct<"
|
|
106
|
-
message: S.Union<[import("../../schema").CallableTaggedStruct<"Showed", {}>, import("../../schema").CallableTaggedStruct<"Hid", {}>, import("../../schema").CallableTaggedStruct<"
|
|
105
|
+
}>, import("../../schema").CallableTaggedStruct<"CompletedFocusPanel", {}>, import("../../schema").CallableTaggedStruct<"CompletedFocusButton", {}>, import("../../schema").CallableTaggedStruct<"CompletedLockScroll", {}>, import("../../schema").CallableTaggedStruct<"CompletedUnlockScroll", {}>, import("../../schema").CallableTaggedStruct<"CompletedSetupInert", {}>, import("../../schema").CallableTaggedStruct<"CompletedTeardownInert", {}>, import("../../schema").CallableTaggedStruct<"IgnoredMouseClick", {}>, import("../../schema").CallableTaggedStruct<"SuppressedSpaceScroll", {}>, import("../../schema").CallableTaggedStruct<"GotAnimationMessage", {
|
|
106
|
+
message: S.Union<[import("../../schema").CallableTaggedStruct<"Showed", {}>, import("../../schema").CallableTaggedStruct<"Hid", {}>, import("../../schema").CallableTaggedStruct<"AdvancedAnimationFrame", {}>, import("../../schema").CallableTaggedStruct<"EndedAnimation", {}>]>;
|
|
107
107
|
}>]>;
|
|
108
108
|
}>;
|
|
109
109
|
/** Sent when the user commits a date via click or keyboard. Updates the
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Schema as S } from 'effect';
|
|
2
2
|
import * as Command from '../../command';
|
|
3
3
|
import { type Attribute, type Html } from '../../html';
|
|
4
|
-
/** Schema for the dialog component's state, tracking its unique ID, open/closed status, animation support, and
|
|
4
|
+
/** Schema for the dialog component's state, tracking its unique ID, open/closed status, animation support, and animation lifecycle phase. */
|
|
5
5
|
export declare const Model: S.Struct<{
|
|
6
6
|
id: typeof S.String;
|
|
7
7
|
isOpen: typeof S.Boolean;
|
|
8
8
|
isAnimated: typeof S.Boolean;
|
|
9
|
-
|
|
9
|
+
animation: S.Struct<{
|
|
10
10
|
id: typeof S.String;
|
|
11
11
|
isShowing: typeof S.Boolean;
|
|
12
12
|
transitionState: S.Literal<["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
@@ -22,9 +22,9 @@ export declare const Closed: import("../../schema").CallableTaggedStruct<"Closed
|
|
|
22
22
|
export declare const CompletedShowDialog: import("../../schema").CallableTaggedStruct<"CompletedShowDialog", {}>;
|
|
23
23
|
/** Sent when the close-dialog command completes (closeModal + scroll unlock). */
|
|
24
24
|
export declare const CompletedCloseDialog: import("../../schema").CallableTaggedStruct<"CompletedCloseDialog", {}>;
|
|
25
|
-
/** Wraps
|
|
26
|
-
export declare const
|
|
27
|
-
message: S.Union<[import("../../schema").CallableTaggedStruct<"Showed", {}>, import("../../schema").CallableTaggedStruct<"Hid", {}>, import("../../schema").CallableTaggedStruct<"
|
|
25
|
+
/** Wraps an Animation submodel message for delegation. */
|
|
26
|
+
export declare const GotAnimationMessage: import("../../schema").CallableTaggedStruct<"GotAnimationMessage", {
|
|
27
|
+
message: S.Union<[import("../../schema").CallableTaggedStruct<"Showed", {}>, import("../../schema").CallableTaggedStruct<"Hid", {}>, import("../../schema").CallableTaggedStruct<"AdvancedAnimationFrame", {}>, import("../../schema").CallableTaggedStruct<"EndedAnimation", {}>]>;
|
|
28
28
|
}>;
|
|
29
29
|
/** Union of all messages the dialog component can produce. */
|
|
30
30
|
export declare const Message: S.Union<[
|
|
@@ -32,14 +32,14 @@ export declare const Message: S.Union<[
|
|
|
32
32
|
typeof Closed,
|
|
33
33
|
typeof CompletedShowDialog,
|
|
34
34
|
typeof CompletedCloseDialog,
|
|
35
|
-
typeof
|
|
35
|
+
typeof GotAnimationMessage
|
|
36
36
|
]>;
|
|
37
37
|
export type Opened = typeof Opened.Type;
|
|
38
38
|
export type Closed = typeof Closed.Type;
|
|
39
39
|
export type CompletedShowDialog = typeof CompletedShowDialog.Type;
|
|
40
40
|
export type CompletedCloseDialog = typeof CompletedCloseDialog.Type;
|
|
41
41
|
export type Message = typeof Message.Type;
|
|
42
|
-
/** Configuration for creating a dialog model with `init`. `isAnimated` enables
|
|
42
|
+
/** Configuration for creating a dialog model with `init`. `isAnimated` enables animation coordination (default `false`). */
|
|
43
43
|
export type InitConfig = Readonly<{
|
|
44
44
|
id: string;
|
|
45
45
|
isOpen?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,M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AA;IACnD,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,kBAAkB,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;IACtD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;CAC/C,CAAC,CAAA;AAEF;2EAC2E;AAC3E,eAAO,MAAM,IAAI,GACf,OAAO,KAAK,KACX,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAClC,CAAA;AAEzB;yFACyF;AACzF,eAAO,MAAM,KAAK,GAChB,OAAO,KAAK,KACX,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAClC,CAAA;AAEzB,sGAAsG;AACtG,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,QAAQ,UAAU,CAAC,OAAO,CAAC,KAAG,IA8G3D,CAAA;AAED;;;;oDAIoD;AACpD,eAAO,MAAM,IAAI,GAAI,OAAO,EAC1B,cAAc,IAAI,CAChB,UAAU,CAAC,OAAO,CAAC,EACnB,OAAO,GAAG,iBAAiB,GAAG,UAAU,GAAG,cAAc,CAC1D,KACA,CAAC,CACF,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,iBAAiB,CAAC,EACvD,YAAY,EAAE,IAAI,KACf,IAAI,CAkBR,CAAA"}
|
package/dist/ui/dialog/index.js
CHANGED
|
@@ -4,18 +4,18 @@ import { createLazy, html } from '../../html';
|
|
|
4
4
|
import { m } from '../../message';
|
|
5
5
|
import { evo } from '../../struct';
|
|
6
6
|
import * as Task from '../../task';
|
|
7
|
-
// NOTE:
|
|
8
|
-
// dependency:
|
|
9
|
-
// The barrel (../
|
|
10
|
-
import { Hid as
|
|
11
|
-
import { defaultLeaveCommand as
|
|
7
|
+
// NOTE: Animation imports are split across schema + update to avoid a circular
|
|
8
|
+
// dependency: animation → html → runtime → devtools → dialog → animation.
|
|
9
|
+
// The barrel (../animation) imports from html, which starts the cycle.
|
|
10
|
+
import { Hid as AnimationHid, Message as AnimationMessage, Model as AnimationModel, Showed as AnimationShowed, init as animationInit, } from '../animation/schema';
|
|
11
|
+
import { defaultLeaveCommand as animationDefaultLeaveCommand, update as animationUpdate, } from '../animation/update';
|
|
12
12
|
// MODEL
|
|
13
|
-
/** Schema for the dialog component's state, tracking its unique ID, open/closed status, animation support, and
|
|
13
|
+
/** Schema for the dialog component's state, tracking its unique ID, open/closed status, animation support, and animation lifecycle phase. */
|
|
14
14
|
export const Model = S.Struct({
|
|
15
15
|
id: S.String,
|
|
16
16
|
isOpen: S.Boolean,
|
|
17
17
|
isAnimated: S.Boolean,
|
|
18
|
-
|
|
18
|
+
animation: AnimationModel,
|
|
19
19
|
maybeFocusSelector: S.OptionFromSelf(S.String),
|
|
20
20
|
});
|
|
21
21
|
// MESSAGE
|
|
@@ -27,18 +27,18 @@ export const Closed = m('Closed');
|
|
|
27
27
|
export const CompletedShowDialog = m('CompletedShowDialog');
|
|
28
28
|
/** Sent when the close-dialog command completes (closeModal + scroll unlock). */
|
|
29
29
|
export const CompletedCloseDialog = m('CompletedCloseDialog');
|
|
30
|
-
/** Wraps
|
|
31
|
-
export const
|
|
32
|
-
message:
|
|
30
|
+
/** Wraps an Animation submodel message for delegation. */
|
|
31
|
+
export const GotAnimationMessage = m('GotAnimationMessage', {
|
|
32
|
+
message: AnimationMessage,
|
|
33
33
|
});
|
|
34
34
|
/** Union of all messages the dialog component can produce. */
|
|
35
|
-
export const Message = S.Union(Opened, Closed, CompletedShowDialog, CompletedCloseDialog,
|
|
35
|
+
export const Message = S.Union(Opened, Closed, CompletedShowDialog, CompletedCloseDialog, GotAnimationMessage);
|
|
36
36
|
/** Creates an initial dialog model from a config. Defaults to closed and non-animated. */
|
|
37
37
|
export const init = (config) => ({
|
|
38
38
|
id: config.id,
|
|
39
39
|
isOpen: config.isOpen ?? false,
|
|
40
40
|
isAnimated: config.isAnimated ?? false,
|
|
41
|
-
|
|
41
|
+
animation: animationInit({
|
|
42
42
|
id: `${config.id}-panel`,
|
|
43
43
|
...(config.isOpen !== undefined ? { isShowing: config.isOpen } : {}),
|
|
44
44
|
}),
|
|
@@ -52,21 +52,21 @@ export const ShowDialog = Command.define('ShowDialog', CompletedShowDialog);
|
|
|
52
52
|
/** Calls `close()` on the native dialog element and unlocks page scroll. */
|
|
53
53
|
export const CloseDialog = Command.define('CloseDialog', CompletedCloseDialog);
|
|
54
54
|
const closeDialog = (id) => CloseDialog(Task.closeModal(dialogSelector(id)).pipe(Effect.andThen(() => Task.unlockScroll), Effect.ignore, Effect.as(CompletedCloseDialog())));
|
|
55
|
-
const toParentMessage = (message) =>
|
|
56
|
-
const
|
|
57
|
-
const [
|
|
58
|
-
const mappedCommands =
|
|
55
|
+
const toParentMessage = (message) => GotAnimationMessage({ message });
|
|
56
|
+
const delegateToAnimation = (model, animationMessage) => {
|
|
57
|
+
const [nextAnimation, animationCommands, maybeOutMessage] = animationUpdate(model.animation, animationMessage);
|
|
58
|
+
const mappedCommands = animationCommands.map(Command.mapEffect(Effect.map(toParentMessage)));
|
|
59
59
|
const additionalCommands = Option.match(maybeOutMessage, {
|
|
60
60
|
onNone: () => [],
|
|
61
61
|
onSome: M.type().pipe(M.tagsExhaustive({
|
|
62
62
|
StartedLeaveAnimating: () => [
|
|
63
|
-
Command.mapEffect(
|
|
63
|
+
Command.mapEffect(animationDefaultLeaveCommand(nextAnimation), Effect.map(toParentMessage)),
|
|
64
64
|
],
|
|
65
65
|
TransitionedOut: () => [closeDialog(model.id)],
|
|
66
66
|
})),
|
|
67
67
|
});
|
|
68
68
|
return [
|
|
69
|
-
evo(model, {
|
|
69
|
+
evo(model, { animation: () => nextAnimation }),
|
|
70
70
|
[...mappedCommands, ...additionalCommands],
|
|
71
71
|
];
|
|
72
72
|
};
|
|
@@ -79,29 +79,29 @@ export const update = (model, message) => M.value(message).pipe(withUpdateReturn
|
|
|
79
79
|
});
|
|
80
80
|
const maybeShow = Option.liftPredicate(ShowDialog(Task.lockScroll.pipe(Effect.andThen(() => Task.showModal(dialogSelector(model.id), focusOptions)), Effect.ignore, Effect.as(CompletedShowDialog()))), () => !model.isOpen);
|
|
81
81
|
if (model.isAnimated) {
|
|
82
|
-
const [nextModel,
|
|
82
|
+
const [nextModel, animationCommands] = delegateToAnimation(model, AnimationShowed());
|
|
83
83
|
return [
|
|
84
84
|
evo(nextModel, { isOpen: () => true }),
|
|
85
|
-
[...Option.toArray(maybeShow), ...
|
|
85
|
+
[...Option.toArray(maybeShow), ...animationCommands],
|
|
86
86
|
];
|
|
87
87
|
}
|
|
88
88
|
return [evo(model, { isOpen: () => true }), Option.toArray(maybeShow)];
|
|
89
89
|
},
|
|
90
90
|
Closed: () => {
|
|
91
|
-
const { transitionState } = model.
|
|
91
|
+
const { transitionState } = model.animation;
|
|
92
92
|
const isLeaving = transitionState === 'LeaveStart' ||
|
|
93
93
|
transitionState === 'LeaveAnimating';
|
|
94
94
|
if (isLeaving) {
|
|
95
95
|
return [model, []];
|
|
96
96
|
}
|
|
97
97
|
if (model.isAnimated) {
|
|
98
|
-
const [nextModel,
|
|
99
|
-
return [nextModel,
|
|
98
|
+
const [nextModel, animationCommands] = delegateToAnimation(evo(model, { isOpen: () => false }), AnimationHid());
|
|
99
|
+
return [nextModel, animationCommands];
|
|
100
100
|
}
|
|
101
101
|
const maybeClose = Option.liftPredicate(closeDialog(model.id), () => model.isOpen);
|
|
102
102
|
return [evo(model, { isOpen: () => false }), Option.toArray(maybeClose)];
|
|
103
103
|
},
|
|
104
|
-
|
|
104
|
+
GotAnimationMessage: ({ message: animationMessage }) => delegateToAnimation(model, animationMessage),
|
|
105
105
|
CompletedShowDialog: () => [model, []],
|
|
106
106
|
CompletedCloseDialog: () => [model, []],
|
|
107
107
|
}));
|
|
@@ -119,11 +119,11 @@ export const close = (model) => update(model, Closed());
|
|
|
119
119
|
/** Renders a headless dialog component backed by the native `<dialog>` element with `showModal()`. */
|
|
120
120
|
export const view = (config) => {
|
|
121
121
|
const { AriaDescribedBy, AriaLabelledBy, Class, DataAttribute, Id, OnCancel, OnClick, Open, Style, keyed, } = html();
|
|
122
|
-
const { model: { id, isOpen,
|
|
122
|
+
const { model: { id, isOpen, animation: { transitionState }, }, toParentMessage, onClosed, panelContent, panelClassName, panelAttributes = [], backdropClassName, backdropAttributes = [], className, attributes = [], } = config;
|
|
123
123
|
const dispatchClosed = () => onClosed ? onClosed() : toParentMessage(Closed());
|
|
124
124
|
const isLeaving = transitionState === 'LeaveStart' || transitionState === 'LeaveAnimating';
|
|
125
125
|
const isVisible = isOpen || isLeaving;
|
|
126
|
-
const
|
|
126
|
+
const animationAttributes = M.value(transitionState).pipe(M.when('EnterStart', () => [
|
|
127
127
|
DataAttribute('closed', ''),
|
|
128
128
|
DataAttribute('enter', ''),
|
|
129
129
|
DataAttribute('transition', ''),
|
|
@@ -162,14 +162,14 @@ export const view = (config) => {
|
|
|
162
162
|
];
|
|
163
163
|
const backdrop = keyed('div')(`${id}-backdrop`, [
|
|
164
164
|
Style({ minHeight: '100vh' }),
|
|
165
|
-
...
|
|
165
|
+
...animationAttributes,
|
|
166
166
|
...(isLeaving ? [] : [OnClick(dispatchClosed())]),
|
|
167
167
|
...(backdropClassName ? [Class(backdropClassName)] : []),
|
|
168
168
|
...backdropAttributes,
|
|
169
169
|
], []);
|
|
170
170
|
const panel = keyed('div')(`${id}-panel`, [
|
|
171
171
|
Id(`${id}-panel`),
|
|
172
|
-
...
|
|
172
|
+
...animationAttributes,
|
|
173
173
|
...(panelClassName ? [Class(panelClassName)] : []),
|
|
174
174
|
...panelAttributes,
|
|
175
175
|
], [panelContent]);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { init, update, open, close, view, lazy, titleId, descriptionId, Model, Message, Opened, Closed, CompletedShowDialog, CompletedCloseDialog,
|
|
1
|
+
export { init, update, open, close, view, lazy, titleId, descriptionId, Model, Message, Opened, Closed, CompletedShowDialog, CompletedCloseDialog, GotAnimationMessage, ShowDialog, CloseDialog, } 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,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,aAAa,EACb,KAAK,EACL,OAAO,EACP,MAAM,EACN,MAAM,EACN,mBAAmB,EACnB,oBAAoB,EACpB,
|
|
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,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,aAAa,EACb,KAAK,EACL,OAAO,EACP,MAAM,EACN,MAAM,EACN,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,WAAW,GACZ,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, open, close, view, lazy, titleId, descriptionId, Model, Message, Opened, Closed, CompletedShowDialog, CompletedCloseDialog,
|
|
1
|
+
export { init, update, open, close, view, lazy, titleId, descriptionId, Model, Message, Opened, Closed, CompletedShowDialog, CompletedCloseDialog, GotAnimationMessage, ShowDialog, CloseDialog, } from './index';
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * as Animation from './animation/public';
|
|
1
2
|
export * as Button from './button/public';
|
|
2
3
|
export * as Calendar from './calendar/public';
|
|
3
4
|
export * as DatePicker from './datePicker/public';
|
|
@@ -19,5 +20,4 @@ export * as Textarea from './textarea/public';
|
|
|
19
20
|
export * as Tabs from './tabs/public';
|
|
20
21
|
export * as Toast from './toast/public';
|
|
21
22
|
export * as Tooltip from './tooltip/public';
|
|
22
|
-
export * as Transition from './transition/public';
|
|
23
23
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AACzC,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAA;AACjD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AACzC,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAA;AACjD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAA;AACvC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAA;AAC3C,OAAO,KAAK,IAAI,MAAM,eAAe,CAAA;AACrC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAA;AAC3C,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAA;AACjD,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AACzC,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,IAA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|
1
|
+
export * as Animation from './animation/public';
|
|
1
2
|
export * as Button from './button/public';
|
|
2
3
|
export * as Calendar from './calendar/public';
|
|
3
4
|
export * as DatePicker from './datePicker/public';
|
|
@@ -19,4 +20,3 @@ export * as Textarea from './textarea/public';
|
|
|
19
20
|
export * as Tabs from './tabs/public';
|
|
20
21
|
export * as Toast from './toast/public';
|
|
21
22
|
export * as Tooltip from './tooltip/public';
|
|
22
|
-
export * as Transition from './transition/public';
|
|
@@ -9,7 +9,7 @@ export declare const Model: S.extend<S.Struct<{
|
|
|
9
9
|
isAnimated: typeof S.Boolean;
|
|
10
10
|
isModal: typeof S.Boolean;
|
|
11
11
|
orientation: S.Literal<["Vertical", "Horizontal"]>;
|
|
12
|
-
|
|
12
|
+
animation: S.Struct<{
|
|
13
13
|
id: typeof S.String;
|
|
14
14
|
isShowing: typeof S.Boolean;
|
|
15
15
|
transitionState: S.Literal<["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
@@ -40,7 +40,7 @@ export declare const update: (model: {
|
|
|
40
40
|
readonly isAnimated: boolean;
|
|
41
41
|
readonly isModal: boolean;
|
|
42
42
|
readonly orientation: "Vertical" | "Horizontal";
|
|
43
|
-
readonly
|
|
43
|
+
readonly animation: {
|
|
44
44
|
readonly id: string;
|
|
45
45
|
readonly isShowing: boolean;
|
|
46
46
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
@@ -62,7 +62,7 @@ export declare const update: (model: {
|
|
|
62
62
|
readonly isAnimated: boolean;
|
|
63
63
|
readonly isModal: boolean;
|
|
64
64
|
readonly orientation: "Vertical" | "Horizontal";
|
|
65
|
-
readonly
|
|
65
|
+
readonly animation: {
|
|
66
66
|
readonly id: string;
|
|
67
67
|
readonly isShowing: boolean;
|
|
68
68
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
@@ -132,15 +132,15 @@ export declare const update: (model: {
|
|
|
132
132
|
} | {
|
|
133
133
|
readonly _tag: "SuppressedSpaceScroll";
|
|
134
134
|
} | {
|
|
135
|
-
readonly _tag: "
|
|
135
|
+
readonly _tag: "GotAnimationMessage";
|
|
136
136
|
readonly message: {
|
|
137
137
|
readonly _tag: "Showed";
|
|
138
138
|
} | {
|
|
139
139
|
readonly _tag: "Hid";
|
|
140
140
|
} | {
|
|
141
|
-
readonly _tag: "
|
|
141
|
+
readonly _tag: "AdvancedAnimationFrame";
|
|
142
142
|
} | {
|
|
143
|
-
readonly _tag: "
|
|
143
|
+
readonly _tag: "EndedAnimation";
|
|
144
144
|
};
|
|
145
145
|
} | {
|
|
146
146
|
readonly _tag: "PressedPointerOnButton";
|
|
@@ -166,7 +166,7 @@ export declare const view: <Message, Item>(config: Readonly<{
|
|
|
166
166
|
readonly isAnimated: boolean;
|
|
167
167
|
readonly isModal: boolean;
|
|
168
168
|
readonly orientation: "Vertical" | "Horizontal";
|
|
169
|
-
readonly
|
|
169
|
+
readonly animation: {
|
|
170
170
|
readonly id: string;
|
|
171
171
|
readonly isShowing: boolean;
|
|
172
172
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { init, update, open, close, selectItem, view, lazy, Model, } from './single';
|
|
2
|
-
export { Message, Orientation, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusButton, CompletedFocusItems, CompletedScrollIntoView, CompletedClickItem, ClearedSearch,
|
|
2
|
+
export { Message, Orientation, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusButton, CompletedFocusItems, CompletedScrollIntoView, CompletedClickItem, ClearedSearch, GotAnimationMessage, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusButton, FocusItems, ScrollIntoView, ClickItem, DelayClearSearch, DetectMovementOrAnimationEnd, } from './shared';
|
|
3
3
|
export type { ActivationTrigger, Opened, Closed, ClosedByTab, ActivatedItem, DeactivatedItem, MovedPointerOverItem, RequestedItemClick, Searched, PressedPointerOnButton, IgnoredMouseClick, SuppressedSpaceScroll, ItemConfig, GroupHeading, } from './shared';
|
|
4
4
|
export type { InitConfig, ViewConfig } from './single';
|
|
5
5
|
export type { AnchorConfig } from '../anchor';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,KAAK,GACN,MAAM,UAAU,CAAA;AAEjB,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,
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,KAAK,GACN,MAAM,UAAU,CAAA;AAEjB,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,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAW,EACX,UAAU,EACV,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,4BAA4B,GAC7B,MAAM,UAAU,CAAA;AAEjB,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"}
|