@foldkit/ui 0.141.2 → 0.142.1
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 +2 -2
- package/dist/checkbox/index.d.ts +4 -0
- package/dist/checkbox/index.d.ts.map +1 -1
- package/dist/combobox/shared.d.ts.map +1 -1
- package/dist/combobox/shared.js +71 -73
- package/dist/datePicker/index.d.ts.map +1 -1
- package/dist/datePicker/index.js +76 -89
- package/dist/dialog/index.d.ts.map +1 -1
- package/dist/dialog/index.js +27 -29
- package/dist/listbox/multi.d.ts +2 -0
- package/dist/listbox/multi.d.ts.map +1 -1
- package/dist/listbox/public.d.ts +1 -1
- package/dist/listbox/public.d.ts.map +1 -1
- package/dist/listbox/public.js +1 -1
- package/dist/listbox/shared.d.ts +20 -0
- package/dist/listbox/shared.d.ts.map +1 -1
- package/dist/listbox/shared.js +83 -64
- package/dist/listbox/single.d.ts +2 -0
- package/dist/listbox/single.d.ts.map +1 -1
- package/dist/menu/index.d.ts.map +1 -1
- package/dist/menu/index.js +53 -55
- package/dist/popover/index.d.ts.map +1 -1
- package/dist/popover/index.js +33 -35
- package/dist/radioGroup/index.d.ts +137 -51
- package/dist/radioGroup/index.d.ts.map +1 -1
- package/dist/radioGroup/index.js +149 -60
- package/dist/radioGroup/public.d.ts +2 -2
- package/dist/radioGroup/public.d.ts.map +1 -1
- package/dist/radioGroup/public.js +1 -1
- package/dist/slider/index.d.ts +28 -0
- package/dist/slider/index.d.ts.map +1 -1
- package/dist/slider/index.js +11 -8
- package/dist/switch/index.d.ts +4 -0
- package/dist/switch/index.d.ts.map +1 -1
- package/dist/test/apps/disabledButton.d.ts.map +1 -1
- package/dist/test/apps/disabledButton.js +16 -10
- package/dist/toast/update.d.ts.map +1 -1
- package/dist/toast/update.js +44 -50
- package/package.json +6 -6
package/dist/listbox/shared.js
CHANGED
|
@@ -6,6 +6,7 @@ import { m } from 'foldkit/message';
|
|
|
6
6
|
import * as Mount from 'foldkit/mount';
|
|
7
7
|
import { makeConstrainedEvo } from 'foldkit/struct';
|
|
8
8
|
import { defineView } from 'foldkit/submodel';
|
|
9
|
+
import * as Update from 'foldkit/update';
|
|
9
10
|
import { AnchorConfig, anchorSetup, portalToContainingRoot } from '../anchor.js';
|
|
10
11
|
// NOTE: Animation imports are split across schema + update to avoid a circular
|
|
11
12
|
// dependency: animation → html → runtime → devtools → listbox → animation.
|
|
@@ -110,6 +111,8 @@ export const CompletedClickItem = m('CompletedClickItem');
|
|
|
110
111
|
export const IgnoredMouseClick = m('IgnoredMouseClick');
|
|
111
112
|
/** Sent when a Space key-up is captured to prevent page scrolling. */
|
|
112
113
|
export const SuppressedSpaceScroll = m('SuppressedSpaceScroll');
|
|
114
|
+
/** Sent when Enter or Space would commit the active item but the listbox is read-only. Update no-ops; the Message keeps the keypress visible and lets the view prevent the browser's default Space scroll. */
|
|
115
|
+
export const SuppressedItemCommit = m('SuppressedItemCommit');
|
|
113
116
|
/** Sent when the listbox items panel mounts and Floating UI has positioned it. Update no-ops; surfaces the positioning side effect for DevTools. */
|
|
114
117
|
export const CompletedAnchorListbox = m('CompletedAnchorListbox');
|
|
115
118
|
/** Sent when the listbox backdrop mounts and is portaled to the document body. Update no-ops; surfaces the portal side effect for DevTools. */
|
|
@@ -145,6 +148,7 @@ export const Message = S.Union([
|
|
|
145
148
|
CompletedClickItem,
|
|
146
149
|
IgnoredMouseClick,
|
|
147
150
|
SuppressedSpaceScroll,
|
|
151
|
+
SuppressedItemCommit,
|
|
148
152
|
CompletedAnchorListbox,
|
|
149
153
|
CompletedPortalListboxBackdrop,
|
|
150
154
|
GotAnimationMessage,
|
|
@@ -241,27 +245,24 @@ export const DetectMovementOrAnimationEnd = Command.define('DetectMovementOrAnim
|
|
|
241
245
|
});
|
|
242
246
|
export const makeUpdate = (handleSelectedItem) => {
|
|
243
247
|
const withUpdateReturn = M.withReturnType();
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
})
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
Option.none(),
|
|
260
|
-
]), "@foldkit/ui/listbox/shared.js#delegateToAnimation");
|
|
261
|
-
};
|
|
248
|
+
const foldAnimationOutMessage = M.type().pipe(M.withReturnType(), M.tagsExhaustive({
|
|
249
|
+
StartedLeaveAnimating: () => __foldkitBrandViewResult((model => __foldkitBrandViewResult(([
|
|
250
|
+
model,
|
|
251
|
+
[DetectMovementOrAnimationEnd({ id: model.id })],
|
|
252
|
+
]), "@foldkit/ui/listbox/shared.js#anonymous")), "@foldkit/ui/listbox/shared.js#StartedLeaveAnimating"),
|
|
253
|
+
TransitionedOut: () => __foldkitBrandViewResult((model => __foldkitBrandViewResult(([model, []]), "@foldkit/ui/listbox/shared.js#anonymous~2")), "@foldkit/ui/listbox/shared.js#TransitionedOut"),
|
|
254
|
+
}));
|
|
255
|
+
const foldAnimation = Update.foldChild({
|
|
256
|
+
update: animationUpdate,
|
|
257
|
+
read: (model) => __foldkitBrandViewResult((Option.some(model.animation)), "@foldkit/ui/listbox/shared.js#read"),
|
|
258
|
+
write: (model, nextAnimation) => __foldkitBrandViewResult((constrainedEvo(model, { animation: () => __foldkitBrandViewResult((nextAnimation), "@foldkit/ui/listbox/shared.js#animation") })), "@foldkit/ui/listbox/shared.js#write"),
|
|
259
|
+
toParentMessage: message => __foldkitBrandViewResult((GotAnimationMessage({ message })), "@foldkit/ui/listbox/shared.js#toParentMessage"),
|
|
260
|
+
toParentOutMessage: () => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/listbox/shared.js#toParentOutMessage"),
|
|
261
|
+
foldOutMessage: foldAnimationOutMessage,
|
|
262
|
+
});
|
|
262
263
|
const openListbox = (baseModel, openCommands) => {
|
|
263
264
|
if (baseModel.isAnimated) {
|
|
264
|
-
const [nextModel, animationCommands] =
|
|
265
|
+
const [nextModel, animationCommands] = foldAnimation(baseModel, AnimationShowed());
|
|
265
266
|
return __foldkitBrandViewResult(([
|
|
266
267
|
constrainedEvo(nextModel, { isOpen: () => __foldkitBrandViewResult((true), "@foldkit/ui/listbox/shared.js#isOpen~2") }),
|
|
267
268
|
[...openCommands, ...animationCommands],
|
|
@@ -280,7 +281,7 @@ export const makeUpdate = (handleSelectedItem) => {
|
|
|
280
281
|
}
|
|
281
282
|
const closed = closedModel(baseModel);
|
|
282
283
|
if (baseModel.isAnimated) {
|
|
283
|
-
const [nextModel, animationCommands] =
|
|
284
|
+
const [nextModel, animationCommands] = foldAnimation(closed, AnimationHid());
|
|
284
285
|
return __foldkitBrandViewResult(([nextModel, [...commands, ...animationCommands], maybeOutMessage]), "@foldkit/ui/listbox/shared.js#closeListbox");
|
|
285
286
|
}
|
|
286
287
|
return __foldkitBrandViewResult(([closed, commands, maybeOutMessage]), "@foldkit/ui/listbox/shared.js#closeListbox");
|
|
@@ -304,11 +305,11 @@ export const makeUpdate = (handleSelectedItem) => {
|
|
|
304
305
|
maybeUnlockScroll,
|
|
305
306
|
maybeRestoreInert,
|
|
306
307
|
]);
|
|
307
|
-
return __foldkitBrandViewResult((M.value(message).pipe(withUpdateReturn, M.tag('CompletedLockScroll', 'CompletedUnlockScroll', 'CompletedInertOthers', 'CompletedRestoreInert', 'CompletedFocusButton', 'CompletedFocusItems', 'CompletedScrollIntoView', 'CompletedClickItem', 'SuppressedSpaceScroll', 'CompletedAnchorListbox', 'CompletedPortalListboxBackdrop', () => __foldkitBrandViewResult(([model, [], Option.none()]), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
308
|
+
return __foldkitBrandViewResult((M.value(message).pipe(withUpdateReturn, M.tag('CompletedLockScroll', 'CompletedUnlockScroll', 'CompletedInertOthers', 'CompletedRestoreInert', 'CompletedFocusButton', 'CompletedFocusItems', 'CompletedScrollIntoView', 'CompletedClickItem', 'SuppressedSpaceScroll', 'SuppressedItemCommit', 'CompletedAnchorListbox', 'CompletedPortalListboxBackdrop', () => __foldkitBrandViewResult(([model, [], Option.none()]), "@foldkit/ui/listbox/shared.js#anonymous~3")), M.tagsExhaustive({
|
|
308
309
|
Opened: ({ maybeActiveItemIndex }) => __foldkitBrandViewResult((openListbox(constrainedEvo(model, {
|
|
309
310
|
maybeActiveItemIndex: () => __foldkitBrandViewResult((maybeActiveItemIndex), "@foldkit/ui/listbox/shared.js#maybeActiveItemIndex~2"),
|
|
310
311
|
activationTrigger: () => __foldkitBrandViewResult((Option.match(maybeActiveItemIndex, {
|
|
311
|
-
onNone: () => __foldkitBrandViewResult(('Pointer'), "@foldkit/ui/listbox/shared.js#onNone
|
|
312
|
+
onNone: () => __foldkitBrandViewResult(('Pointer'), "@foldkit/ui/listbox/shared.js#onNone"),
|
|
312
313
|
onSome: () => __foldkitBrandViewResult(('Keyboard'), "@foldkit/ui/listbox/shared.js#onSome"),
|
|
313
314
|
})), "@foldkit/ui/listbox/shared.js#activationTrigger"),
|
|
314
315
|
searchQuery: () => __foldkitBrandViewResult((''), "@foldkit/ui/listbox/shared.js#searchQuery~2"),
|
|
@@ -333,7 +334,7 @@ export const makeUpdate = (handleSelectedItem) => {
|
|
|
333
334
|
Option.none(),
|
|
334
335
|
]), "@foldkit/ui/listbox/shared.js#ActivatedItem"),
|
|
335
336
|
MovedPointerOverItem: ({ index, screenX, screenY }) => {
|
|
336
|
-
const isSamePosition = Option.exists(model.maybeLastPointerPosition, position => __foldkitBrandViewResult((position.screenX === screenX && position.screenY === screenY), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
337
|
+
const isSamePosition = Option.exists(model.maybeLastPointerPosition, position => __foldkitBrandViewResult((position.screenX === screenX && position.screenY === screenY), "@foldkit/ui/listbox/shared.js#anonymous~4"));
|
|
337
338
|
if (isSamePosition) {
|
|
338
339
|
return __foldkitBrandViewResult(([model, [], Option.none()]), "@foldkit/ui/listbox/shared.js#MovedPointerOverItem");
|
|
339
340
|
}
|
|
@@ -372,7 +373,7 @@ export const makeUpdate = (handleSelectedItem) => {
|
|
|
372
373
|
constrainedEvo(model, {
|
|
373
374
|
searchQuery: () => __foldkitBrandViewResult((nextSearchQuery), "@foldkit/ui/listbox/shared.js#searchQuery~3"),
|
|
374
375
|
searchVersion: () => __foldkitBrandViewResult((nextSearchVersion), "@foldkit/ui/listbox/shared.js#searchVersion~3"),
|
|
375
|
-
maybeActiveItemIndex: () => __foldkitBrandViewResult((Option.orElse(maybeTargetIndex, () => __foldkitBrandViewResult((model.maybeActiveItemIndex), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
376
|
+
maybeActiveItemIndex: () => __foldkitBrandViewResult((Option.orElse(maybeTargetIndex, () => __foldkitBrandViewResult((model.maybeActiveItemIndex), "@foldkit/ui/listbox/shared.js#anonymous~5"))), "@foldkit/ui/listbox/shared.js#maybeActiveItemIndex~6"),
|
|
376
377
|
}),
|
|
377
378
|
[DelayClearSearch({ version: nextSearchVersion })],
|
|
378
379
|
Option.none(),
|
|
@@ -388,7 +389,7 @@ export const makeUpdate = (handleSelectedItem) => {
|
|
|
388
389
|
Option.none(),
|
|
389
390
|
]), "@foldkit/ui/listbox/shared.js#CompletedDelayClearSearch");
|
|
390
391
|
},
|
|
391
|
-
GotAnimationMessage: ({ message: animationMessage }) => __foldkitBrandViewResult((
|
|
392
|
+
GotAnimationMessage: ({ message: animationMessage }) => __foldkitBrandViewResult((foldAnimation(model, animationMessage)), "@foldkit/ui/listbox/shared.js#GotAnimationMessage"),
|
|
392
393
|
PressedPointerOnButton: ({ pointerType, button }) => {
|
|
393
394
|
const withPointerType = constrainedEvo(model, {
|
|
394
395
|
maybeLastButtonPointerType: () => __foldkitBrandViewResult((Option.some(pointerType)), "@foldkit/ui/listbox/shared.js#maybeLastButtonPointerType~2"),
|
|
@@ -440,42 +441,42 @@ export const makeUpdate = (handleSelectedItem) => {
|
|
|
440
441
|
* Exposed so Scene tests can call
|
|
441
442
|
* `Scene.Mount.resolve(AnchorListbox, CompletedAnchorListbox())`. */
|
|
442
443
|
export const AnchorListbox = Mount.define('AnchorListbox', { buttonId: S.String, anchor: AnchorConfig }, CompletedAnchorListbox)(({ buttonId, anchor }) => __foldkitBrandViewResult((element => __foldkitBrandViewResult((Effect.gen(function* () {
|
|
443
|
-
yield* Effect.acquireRelease(Effect.sync(() => __foldkitBrandViewResult((anchorSetup({ buttonId, anchor, focusAfterPosition: true })(element)), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
444
|
-
return __foldkitBrandViewResult((CompletedAnchorListbox()), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
445
|
-
})), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
444
|
+
yield* Effect.acquireRelease(Effect.sync(() => __foldkitBrandViewResult((anchorSetup({ buttonId, anchor, focusAfterPosition: true })(element)), "@foldkit/ui/listbox/shared.js#anonymous~9")), cleanup => __foldkitBrandViewResult((Effect.sync(cleanup)), "@foldkit/ui/listbox/shared.js#anonymous~10"));
|
|
445
|
+
return __foldkitBrandViewResult((CompletedAnchorListbox()), "@foldkit/ui/listbox/shared.js#anonymous~8");
|
|
446
|
+
})), "@foldkit/ui/listbox/shared.js#anonymous~7")), "@foldkit/ui/listbox/shared.js#anonymous~6"));
|
|
446
447
|
/** The backdrop-portaling Mount this Listbox renders. Exposed so Scene tests can
|
|
447
448
|
* call `Scene.Mount.resolve(PortalListboxBackdrop, CompletedPortalListboxBackdrop())` to
|
|
448
449
|
* acknowledge the mount produced by the rendered backdrop. */
|
|
449
450
|
export const PortalListboxBackdrop = Mount.define('PortalListboxBackdrop', CompletedPortalListboxBackdrop)(element => __foldkitBrandViewResult((Effect.gen(function* () {
|
|
450
|
-
yield* Effect.acquireRelease(Effect.sync(() => __foldkitBrandViewResult((portalToContainingRoot(element)), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
451
|
-
return __foldkitBrandViewResult((CompletedPortalListboxBackdrop()), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
452
|
-
})), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
451
|
+
yield* Effect.acquireRelease(Effect.sync(() => __foldkitBrandViewResult((portalToContainingRoot(element)), "@foldkit/ui/listbox/shared.js#anonymous~13")), cleanup => __foldkitBrandViewResult((Effect.sync(cleanup)), "@foldkit/ui/listbox/shared.js#anonymous~14"));
|
|
452
|
+
return __foldkitBrandViewResult((CompletedPortalListboxBackdrop()), "@foldkit/ui/listbox/shared.js#anonymous~12");
|
|
453
|
+
})), "@foldkit/ui/listbox/shared.js#anonymous~11"));
|
|
453
454
|
export const makeView = (behavior) => {
|
|
454
455
|
const impl = defineView((model, viewInputs, h) => {
|
|
455
456
|
const { id, isOpen, orientation, animation: { transitionState }, maybeActiveItemIndex, searchQuery, maybeLastButtonPointerType, } = model;
|
|
456
|
-
const { items, itemToConfig, isItemDisabled, isButtonDisabled, buttonContent, buttonClassName, buttonAttributes = [], itemsClassName, itemsAttributes = [], itemsScrollClassName, itemsScrollAttributes = [], backdropClassName, backdropAttributes = [], className, attributes = [], itemGroupKey, groupToHeading, groupClassName, groupAttributes = [], separatorClassName, separatorAttributes = [], anchor = {}, name, form, isDisabled, isInvalid, ariaLabel, ariaLabelledBy, selectedValues, } = viewInputs;
|
|
457
|
-
const itemToValue = viewInputs.itemToValue ?? ((item) => __foldkitBrandViewResult((String(item)), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
457
|
+
const { items, itemToConfig, isItemDisabled, isButtonDisabled, buttonContent, buttonClassName, buttonAttributes = [], itemsClassName, itemsAttributes = [], itemsScrollClassName, itemsScrollAttributes = [], backdropClassName, backdropAttributes = [], className, attributes = [], itemGroupKey, groupToHeading, groupClassName, groupAttributes = [], separatorClassName, separatorAttributes = [], anchor = {}, name, form, isDisabled, isReadOnly = false, isInvalid, ariaLabel, ariaLabelledBy, selectedValues, } = viewInputs;
|
|
458
|
+
const itemToValue = viewInputs.itemToValue ?? ((item) => __foldkitBrandViewResult((String(item)), "@foldkit/ui/listbox/shared.js#anonymous~16"));
|
|
458
459
|
const isValueSelected = (itemValue) => __foldkitBrandViewResult((Array.contains(selectedValues, itemValue)), "@foldkit/ui/listbox/shared.js#isValueSelected");
|
|
459
|
-
const itemToSearchText = viewInputs.itemToSearchText ?? ((item) => __foldkitBrandViewResult((itemToValue(item)), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
460
|
+
const itemToSearchText = viewInputs.itemToSearchText ?? ((item) => __foldkitBrandViewResult((itemToValue(item)), "@foldkit/ui/listbox/shared.js#anonymous~17"));
|
|
460
461
|
const isLeaving = transitionState === 'LeaveStart' || transitionState === 'LeaveAnimating';
|
|
461
462
|
const isVisible = isOpen || isLeaving;
|
|
462
463
|
const animationAttributes = M.value(transitionState).pipe(M.when('EnterStart', () => __foldkitBrandViewResult(([
|
|
463
464
|
h.DataAttribute('closed', ''),
|
|
464
465
|
h.DataAttribute('enter', ''),
|
|
465
466
|
h.DataAttribute('transition', ''),
|
|
466
|
-
]), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
467
|
+
]), "@foldkit/ui/listbox/shared.js#anonymous~18")), M.when('EnterAnimating', () => __foldkitBrandViewResult(([
|
|
467
468
|
h.DataAttribute('enter', ''),
|
|
468
469
|
h.DataAttribute('transition', ''),
|
|
469
|
-
]), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
470
|
+
]), "@foldkit/ui/listbox/shared.js#anonymous~19")), M.when('LeaveStart', () => __foldkitBrandViewResult(([
|
|
470
471
|
h.DataAttribute('leave', ''),
|
|
471
472
|
h.DataAttribute('transition', ''),
|
|
472
|
-
]), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
473
|
+
]), "@foldkit/ui/listbox/shared.js#anonymous~20")), M.when('LeaveAnimating', () => __foldkitBrandViewResult(([
|
|
473
474
|
h.DataAttribute('closed', ''),
|
|
474
475
|
h.DataAttribute('leave', ''),
|
|
475
476
|
h.DataAttribute('transition', ''),
|
|
476
|
-
]), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
477
|
+
]), "@foldkit/ui/listbox/shared.js#anonymous~21")), M.orElse(() => __foldkitBrandViewResult(([]), "@foldkit/ui/listbox/shared.js#anonymous~22")));
|
|
477
478
|
const isItemDisabledByIndex = (index) => __foldkitBrandViewResult((Predicate.isNotUndefined(isItemDisabled) &&
|
|
478
|
-
pipe(items, Array.get(index), Option.exists(item => __foldkitBrandViewResult((isItemDisabled(item, index)), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
479
|
+
pipe(items, Array.get(index), Option.exists(item => __foldkitBrandViewResult((isItemDisabled(item, index)), "@foldkit/ui/listbox/shared.js#anonymous~23")))), "@foldkit/ui/listbox/shared.js#isItemDisabledByIndex");
|
|
479
480
|
const isButtonEffectivelyDisabled = isDisabled || isButtonDisabled;
|
|
480
481
|
const nextKey = orientation === 'Horizontal' ? 'ArrowRight' : 'ArrowDown';
|
|
481
482
|
const previousKey = orientation === 'Horizontal' ? 'ArrowLeft' : 'ArrowUp';
|
|
@@ -490,20 +491,20 @@ export const makeView = (behavior) => {
|
|
|
490
491
|
const isNavigationKey = (key) => __foldkitBrandViewResult((Array.contains(navigationKeys, key)), "@foldkit/ui/listbox/shared.js#isNavigationKey");
|
|
491
492
|
const firstEnabledIndex = findFirstEnabledIndex(items.length, 0, isItemDisabledByIndex)(0, 1);
|
|
492
493
|
const lastEnabledIndex = findFirstEnabledIndex(items.length, 0, isItemDisabledByIndex)(items.length - 1, -1);
|
|
493
|
-
const selectedItemIndex = pipe(selectedValues, Array.head, Option.flatMap(selectedValue => __foldkitBrandViewResult((Array.findFirstIndex(items, item => __foldkitBrandViewResult((itemToValue(item) === selectedValue), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
494
|
+
const selectedItemIndex = pipe(selectedValues, Array.head, Option.flatMap(selectedValue => __foldkitBrandViewResult((Array.findFirstIndex(items, item => __foldkitBrandViewResult((itemToValue(item) === selectedValue), "@foldkit/ui/listbox/shared.js#anonymous~25"))), "@foldkit/ui/listbox/shared.js#anonymous~24")));
|
|
494
495
|
const handleButtonKeyDown = (key) => {
|
|
495
496
|
if (isOpen) {
|
|
496
497
|
return __foldkitBrandViewResult((handleItemsKeyDown(key)), "@foldkit/ui/listbox/shared.js#handleButtonKeyDown");
|
|
497
498
|
}
|
|
498
499
|
return __foldkitBrandViewResult((M.value(key).pipe(M.whenOr('Enter', ' ', 'ArrowDown', () => __foldkitBrandViewResult((Option.some(Opened({
|
|
499
|
-
maybeActiveItemIndex: Option.orElse(selectedItemIndex, () => __foldkitBrandViewResult((Option.some(firstEnabledIndex)), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
500
|
-
}))), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
501
|
-
maybeActiveItemIndex: Option.orElse(selectedItemIndex, () => __foldkitBrandViewResult((Option.some(lastEnabledIndex)), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
502
|
-
}))), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
500
|
+
maybeActiveItemIndex: Option.orElse(selectedItemIndex, () => __foldkitBrandViewResult((Option.some(firstEnabledIndex)), "@foldkit/ui/listbox/shared.js#anonymous~27")),
|
|
501
|
+
}))), "@foldkit/ui/listbox/shared.js#anonymous~26")), M.when('ArrowUp', () => __foldkitBrandViewResult((Option.some(Opened({
|
|
502
|
+
maybeActiveItemIndex: Option.orElse(selectedItemIndex, () => __foldkitBrandViewResult((Option.some(lastEnabledIndex)), "@foldkit/ui/listbox/shared.js#anonymous~29")),
|
|
503
|
+
}))), "@foldkit/ui/listbox/shared.js#anonymous~28")), M.orElse(() => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/listbox/shared.js#anonymous~30")))), "@foldkit/ui/listbox/shared.js#handleButtonKeyDown");
|
|
503
504
|
};
|
|
504
505
|
const handleButtonPointerDown = (pointerType, button) => __foldkitBrandViewResult((Option.some(PressedPointerOnButton({ pointerType, button }))), "@foldkit/ui/listbox/shared.js#handleButtonPointerDown");
|
|
505
506
|
const handleButtonClick = () => {
|
|
506
|
-
const isMouse = Option.exists(maybeLastButtonPointerType, type => __foldkitBrandViewResult((type === 'mouse'), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
507
|
+
const isMouse = Option.exists(maybeLastButtonPointerType, type => __foldkitBrandViewResult((type === 'mouse'), "@foldkit/ui/listbox/shared.js#anonymous~31"));
|
|
507
508
|
if (isMouse) {
|
|
508
509
|
return __foldkitBrandViewResult((IgnoredMouseClick()), "@foldkit/ui/listbox/shared.js#handleButtonClick");
|
|
509
510
|
}
|
|
@@ -516,7 +517,7 @@ export const makeView = (behavior) => {
|
|
|
516
517
|
};
|
|
517
518
|
const handleSpaceKeyUp = (key) => __foldkitBrandViewResult((OptionExt.when(key === ' ', SuppressedSpaceScroll())), "@foldkit/ui/listbox/shared.js#handleSpaceKeyUp");
|
|
518
519
|
const resolveActiveIndex = (key) => __foldkitBrandViewResult((Option.match(maybeActiveItemIndex, {
|
|
519
|
-
onNone: () => __foldkitBrandViewResult((M.value(key).pipe(M.whenOr(previousKey, 'End', 'PageDown', () => __foldkitBrandViewResult((lastEnabledIndex), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
520
|
+
onNone: () => __foldkitBrandViewResult((M.value(key).pipe(M.whenOr(previousKey, 'End', 'PageDown', () => __foldkitBrandViewResult((lastEnabledIndex), "@foldkit/ui/listbox/shared.js#anonymous~32")), M.orElse(() => __foldkitBrandViewResult((firstEnabledIndex), "@foldkit/ui/listbox/shared.js#anonymous~33")))), "@foldkit/ui/listbox/shared.js#onNone~2"),
|
|
520
521
|
onSome: activeIndex => __foldkitBrandViewResult((keyToIndex(nextKey, previousKey, items.length, activeIndex, isItemDisabledByIndex)(key)), "@foldkit/ui/listbox/shared.js#onSome~2"),
|
|
521
522
|
})), "@foldkit/ui/listbox/shared.js#resolveActiveIndex");
|
|
522
523
|
const searchForKey = (key) => {
|
|
@@ -524,12 +525,20 @@ export const makeView = (behavior) => {
|
|
|
524
525
|
const maybeTargetIndex = resolveTypeaheadMatch(items, nextQuery, maybeActiveItemIndex, isItemDisabledByIndex, itemToSearchText, Str.isNonEmpty(searchQuery));
|
|
525
526
|
return __foldkitBrandViewResult((Option.some(Searched({ key, maybeTargetIndex }))), "@foldkit/ui/listbox/shared.js#searchForKey");
|
|
526
527
|
};
|
|
527
|
-
const
|
|
528
|
+
const resolveCommitMessage = () => {
|
|
529
|
+
if (isReadOnly) {
|
|
530
|
+
return __foldkitBrandViewResult((Option.as(maybeActiveItemIndex, SuppressedItemCommit())), "@foldkit/ui/listbox/shared.js#resolveCommitMessage");
|
|
531
|
+
}
|
|
532
|
+
else {
|
|
533
|
+
return __foldkitBrandViewResult((Option.map(maybeActiveItemIndex, index => __foldkitBrandViewResult((RequestedItemClick({ index })), "@foldkit/ui/listbox/shared.js#anonymous~34"))), "@foldkit/ui/listbox/shared.js#resolveCommitMessage");
|
|
534
|
+
}
|
|
535
|
+
};
|
|
536
|
+
const handleItemsKeyDown = (key) => __foldkitBrandViewResult((M.value(key).pipe(M.when('Escape', () => __foldkitBrandViewResult((Option.some(Closed())), "@foldkit/ui/listbox/shared.js#anonymous~35")), M.when('Enter', resolveCommitMessage), M.when(' ', () => __foldkitBrandViewResult((Str.isNonEmpty(searchQuery)
|
|
528
537
|
? searchForKey(' ')
|
|
529
|
-
:
|
|
538
|
+
: resolveCommitMessage()), "@foldkit/ui/listbox/shared.js#anonymous~36")), M.when(isNavigationKey, () => __foldkitBrandViewResult((Option.some(ActivatedItem({
|
|
530
539
|
index: resolveActiveIndex(key),
|
|
531
540
|
activationTrigger: 'Keyboard',
|
|
532
|
-
}))), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
541
|
+
}))), "@foldkit/ui/listbox/shared.js#anonymous~37")), M.when(isPrintableKey, () => __foldkitBrandViewResult((searchForKey(key)), "@foldkit/ui/listbox/shared.js#anonymous~38")), M.orElse(() => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/listbox/shared.js#anonymous~39")))), "@foldkit/ui/listbox/shared.js#handleItemsKeyDown");
|
|
533
542
|
const resolveButtonLabel = () => {
|
|
534
543
|
if (Predicate.isNotUndefined(ariaLabel)) {
|
|
535
544
|
return __foldkitBrandViewResult(([h.AriaLabel(ariaLabel)]), "@foldkit/ui/listbox/shared.js#resolveButtonLabel");
|
|
@@ -563,12 +572,13 @@ export const makeView = (behavior) => {
|
|
|
563
572
|
h.Style({ position: 'relative', zIndex: '1' }),
|
|
564
573
|
]
|
|
565
574
|
: []),
|
|
575
|
+
...(isReadOnly ? [h.DataAttribute('readonly', '')] : []),
|
|
566
576
|
...(isInvalid ? [h.DataAttribute('invalid', '')] : []),
|
|
567
577
|
...(buttonClassName ? [h.Class(buttonClassName)] : []),
|
|
568
578
|
...buttonAttributes,
|
|
569
579
|
];
|
|
570
580
|
const maybeActiveDescendant = Option.match(maybeActiveItemIndex, {
|
|
571
|
-
onNone: () => __foldkitBrandViewResult(([]), "@foldkit/ui/listbox/shared.js#onNone~
|
|
581
|
+
onNone: () => __foldkitBrandViewResult(([]), "@foldkit/ui/listbox/shared.js#onNone~3"),
|
|
572
582
|
onSome: index => __foldkitBrandViewResult(([h.AriaActiveDescendant(itemId(id, index))]), "@foldkit/ui/listbox/shared.js#onSome~3"),
|
|
573
583
|
});
|
|
574
584
|
const anchorAttributes = [
|
|
@@ -584,6 +594,9 @@ export const makeView = (behavior) => {
|
|
|
584
594
|
h.Role('listbox'),
|
|
585
595
|
h.AriaOrientation(Str.toLowerCase(orientation)),
|
|
586
596
|
...(behavior.ariaMultiSelectable ? [h.AriaMultiSelectable(true)] : []),
|
|
597
|
+
...(isReadOnly
|
|
598
|
+
? [h.AriaReadonly(true), h.DataAttribute('readonly', '')]
|
|
599
|
+
: []),
|
|
587
600
|
h.AriaLabelledBy(`${id}-button`),
|
|
588
601
|
...maybeActiveDescendant,
|
|
589
602
|
h.Tabindex(0),
|
|
@@ -600,15 +613,17 @@ export const makeView = (behavior) => {
|
|
|
600
613
|
...itemsAttributes,
|
|
601
614
|
];
|
|
602
615
|
const listboxItems = Array.map(items, (item, index) => {
|
|
603
|
-
const isActiveItem = Option.exists(maybeActiveItemIndex, activeIndex => __foldkitBrandViewResult((activeIndex === index), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
616
|
+
const isActiveItem = Option.exists(maybeActiveItemIndex, activeIndex => __foldkitBrandViewResult((activeIndex === index), "@foldkit/ui/listbox/shared.js#anonymous~41"));
|
|
604
617
|
const isDisabledItem = isItemDisabledByIndex(index);
|
|
605
618
|
const isSelectedItem = isValueSelected(itemToValue(item));
|
|
606
619
|
const itemConfig = itemToConfig(item, {
|
|
607
620
|
isActive: isActiveItem,
|
|
608
621
|
isDisabled: isDisabledItem,
|
|
622
|
+
isReadOnly,
|
|
609
623
|
isSelected: isSelectedItem,
|
|
610
624
|
});
|
|
611
|
-
const
|
|
625
|
+
const isHoverable = !isDisabledItem && !isLeaving;
|
|
626
|
+
const isClickable = isHoverable && !isReadOnly;
|
|
612
627
|
return __foldkitBrandViewResult((h.keyed('div')(itemId(id, index), [
|
|
613
628
|
h.Id(itemId(id, index)),
|
|
614
629
|
h.Role('option'),
|
|
@@ -618,9 +633,12 @@ export const makeView = (behavior) => {
|
|
|
618
633
|
...(isDisabledItem
|
|
619
634
|
? [h.AriaDisabled(true), h.DataAttribute('disabled', '')]
|
|
620
635
|
: []),
|
|
621
|
-
...(
|
|
636
|
+
...(isReadOnly ? [h.DataAttribute('readonly', '')] : []),
|
|
637
|
+
...(isClickable
|
|
638
|
+
? [h.OnClick(SelectedItem({ item: itemToValue(item) }))]
|
|
639
|
+
: []),
|
|
640
|
+
...(isHoverable
|
|
622
641
|
? [
|
|
623
|
-
h.OnClick(SelectedItem({ item: itemToValue(item) })),
|
|
624
642
|
...(isActiveItem
|
|
625
643
|
? []
|
|
626
644
|
: [
|
|
@@ -628,27 +646,27 @@ export const makeView = (behavior) => {
|
|
|
628
646
|
index,
|
|
629
647
|
screenX,
|
|
630
648
|
screenY,
|
|
631
|
-
}))), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
649
|
+
}))), "@foldkit/ui/listbox/shared.js#anonymous~42")),
|
|
632
650
|
]),
|
|
633
|
-
h.OnPointerLeave(pointerType => __foldkitBrandViewResult((OptionExt.when(pointerType !== 'touch', DeactivatedItem())), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
651
|
+
h.OnPointerLeave(pointerType => __foldkitBrandViewResult((OptionExt.when(pointerType !== 'touch', DeactivatedItem())), "@foldkit/ui/listbox/shared.js#anonymous~43")),
|
|
634
652
|
]
|
|
635
653
|
: []),
|
|
636
654
|
...(itemConfig.className ? [h.Class(itemConfig.className)] : []),
|
|
637
|
-
], [itemConfig.content])), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
655
|
+
], [itemConfig.content])), "@foldkit/ui/listbox/shared.js#anonymous~40");
|
|
638
656
|
});
|
|
639
657
|
const renderGroupedItems = () => {
|
|
640
658
|
if (!itemGroupKey) {
|
|
641
659
|
return __foldkitBrandViewResult((listboxItems), "@foldkit/ui/listbox/shared.js#renderGroupedItems");
|
|
642
660
|
}
|
|
643
661
|
const segments = groupContiguous(listboxItems, (_, index) => __foldkitBrandViewResult((Array.get(items, index).pipe(Option.match({
|
|
644
|
-
onNone: () => __foldkitBrandViewResult((''), "@foldkit/ui/listbox/shared.js#onNone~
|
|
662
|
+
onNone: () => __foldkitBrandViewResult((''), "@foldkit/ui/listbox/shared.js#onNone~4"),
|
|
645
663
|
onSome: item => __foldkitBrandViewResult((itemGroupKey(item, index)), "@foldkit/ui/listbox/shared.js#onSome~4"),
|
|
646
|
-
}))), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
664
|
+
}))), "@foldkit/ui/listbox/shared.js#anonymous~44"));
|
|
647
665
|
return __foldkitBrandViewResult((Array.flatMap(segments, (segment, segmentIndex) => {
|
|
648
666
|
const maybeHeading = Option.fromNullishOr(groupToHeading?.(segment.key));
|
|
649
667
|
const headingId = `${id}-heading-${segment.key}`;
|
|
650
668
|
const headingElement = Option.match(maybeHeading, {
|
|
651
|
-
onNone: () => __foldkitBrandViewResult(([]), "@foldkit/ui/listbox/shared.js#onNone~
|
|
669
|
+
onNone: () => __foldkitBrandViewResult(([]), "@foldkit/ui/listbox/shared.js#onNone~5"),
|
|
652
670
|
onSome: heading => __foldkitBrandViewResult(([
|
|
653
671
|
h.keyed('div')(headingId, [
|
|
654
672
|
h.Id(headingId),
|
|
@@ -679,7 +697,7 @@ export const makeView = (behavior) => {
|
|
|
679
697
|
]),
|
|
680
698
|
]
|
|
681
699
|
: [];
|
|
682
|
-
return __foldkitBrandViewResult(([...separator, groupElement]), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
700
|
+
return __foldkitBrandViewResult(([...separator, groupElement]), "@foldkit/ui/listbox/shared.js#anonymous~45");
|
|
683
701
|
})), "@foldkit/ui/listbox/shared.js#renderGroupedItems");
|
|
684
702
|
};
|
|
685
703
|
const backdrop = h.keyed('div')(`${id}-backdrop`, [
|
|
@@ -715,7 +733,7 @@ export const makeView = (behavior) => {
|
|
|
715
733
|
h.Name(name),
|
|
716
734
|
h.Value(selectedValue),
|
|
717
735
|
...formAttribute,
|
|
718
|
-
])), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
736
|
+
])), "@foldkit/ui/listbox/shared.js#anonymous~46")),
|
|
719
737
|
})
|
|
720
738
|
: [];
|
|
721
739
|
const wrapperAttributes = [
|
|
@@ -723,6 +741,7 @@ export const makeView = (behavior) => {
|
|
|
723
741
|
...attributes,
|
|
724
742
|
...(isVisible ? [h.DataAttribute('open', '')] : []),
|
|
725
743
|
...(isDisabled ? [h.DataAttribute('disabled', '')] : []),
|
|
744
|
+
...(isReadOnly ? [h.DataAttribute('readonly', '')] : []),
|
|
726
745
|
...(isInvalid ? [h.DataAttribute('invalid', '')] : []),
|
|
727
746
|
];
|
|
728
747
|
return __foldkitBrandViewResult((h.div(wrapperAttributes, [
|
|
@@ -731,9 +750,9 @@ export const makeView = (behavior) => {
|
|
|
731
750
|
]),
|
|
732
751
|
...hiddenInputs,
|
|
733
752
|
...(isVisible ? visibleContent : []),
|
|
734
|
-
])), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
753
|
+
])), "@foldkit/ui/listbox/shared.js#anonymous~15");
|
|
735
754
|
});
|
|
736
755
|
return __foldkitBrandViewResult((() =>
|
|
737
756
|
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
738
|
-
__foldkitBrandViewResult((impl), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
757
|
+
__foldkitBrandViewResult((impl), "@foldkit/ui/listbox/shared.js#anonymous~47")), "@foldkit/ui/listbox/shared.js#makeView");
|
|
739
758
|
};
|
package/dist/listbox/single.d.ts
CHANGED
|
@@ -123,6 +123,8 @@ export declare const update: (model: {
|
|
|
123
123
|
} | {
|
|
124
124
|
readonly _tag: "CompletedDelayClearSearch";
|
|
125
125
|
readonly version: number;
|
|
126
|
+
} | {
|
|
127
|
+
readonly _tag: "SuppressedItemCommit";
|
|
126
128
|
} | {
|
|
127
129
|
readonly _tag: "PressedPointerOnButton";
|
|
128
130
|
readonly pointerType: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single.d.ts","sourceRoot":"","sources":["../../src/listbox/single.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC5C,OAAO,KAAK,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,KAAK,IAAI,IAAI,YAAY,EAAc,MAAM,kBAAkB,CAAA;AAExE,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,oBAAoB,EAEzB,KAAK,gBAAgB,EACrB,KAAK,OAAO,EAEZ,KAAK,UAAU,EAMhB,MAAM,aAAa,CAAA;AAIpB,wOAAwO;AACxO,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;EAEhB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,mOAAmO;AACnO,MAAM,MAAM,UAAU,GAAG,cAAc,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AC;KACjC,CAAA;IACD,KAAK,EAAE,CACL,KAAK,EAAE,KAAK,KACT,SAAS;QACZ,KAAK;QACL,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACvC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;KACjC,CAAA;CACF,CAAC,CAAA;AAEF;;;;;;;;;;;;;;;;;;;wDAmBwD;AACxD,eAAO,MAAM,MAAM,GACjB,IAAI,GAAG,MAAM,EACb,KAAK,SAAS,MAAM,GAAG,IAAI,SAAS,MAAM,GAAG,IAAI,GAAG,MAAM,OACvD,MAAM,CAAC,IAAI,EAAE,KAAK,CAuBtB,CAAA"}
|
package/dist/menu/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAGN,MAAM,EAEN,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AACf,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAExD,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA;AAEtC,OAAO,EAAE,KAAK,IAAI,IAAI,YAAY,EAAc,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAGN,MAAM,EAEN,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AACf,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAExD,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA;AAEtC,OAAO,EAAE,KAAK,IAAI,IAAI,YAAY,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