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
package/dist/ui/tabs/index.js
CHANGED
|
@@ -24,9 +24,9 @@ export const TabSelected = m('TabSelected', { index: S.Number });
|
|
|
24
24
|
/** Sent when a tab receives keyboard focus in `Manual` mode without being activated. */
|
|
25
25
|
export const TabFocused = m('TabFocused', { index: S.Number });
|
|
26
26
|
/** Sent when the focus-tab command completes. */
|
|
27
|
-
export const
|
|
27
|
+
export const CompletedFocusTab = m('CompletedFocusTab');
|
|
28
28
|
/** Union of all messages the tabs component can produce. */
|
|
29
|
-
export const Message = S.Union(TabSelected, TabFocused,
|
|
29
|
+
export const Message = S.Union(TabSelected, TabFocused, CompletedFocusTab);
|
|
30
30
|
/** Creates an initial tabs model from a config. Defaults to first tab and automatic activation. */
|
|
31
31
|
export const init = (config) => {
|
|
32
32
|
const activeIndex = config.activeIndex ?? 0;
|
|
@@ -38,6 +38,7 @@ export const init = (config) => {
|
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
40
|
// UPDATE
|
|
41
|
+
export const FocusTab = Command.define('FocusTab', CompletedFocusTab);
|
|
41
42
|
/** Processes a tabs message and returns the next model and commands. */
|
|
42
43
|
export const update = (model, message) => M.value(message).pipe(M.withReturnType(), M.tagsExhaustive({
|
|
43
44
|
TabSelected: ({ index }) => {
|
|
@@ -48,7 +49,7 @@ export const update = (model, message) => M.value(message).pipe(M.withReturnType
|
|
|
48
49
|
focusedIndex: () => index,
|
|
49
50
|
}),
|
|
50
51
|
[
|
|
51
|
-
Task.focus(tabSelector).pipe(Effect.ignore, Effect.as(
|
|
52
|
+
FocusTab(Task.focus(tabSelector).pipe(Effect.ignore, Effect.as(CompletedFocusTab()))),
|
|
52
53
|
],
|
|
53
54
|
];
|
|
54
55
|
},
|
|
@@ -57,11 +58,11 @@ export const update = (model, message) => M.value(message).pipe(M.withReturnType
|
|
|
57
58
|
return [
|
|
58
59
|
evo(model, { focusedIndex: () => index }),
|
|
59
60
|
[
|
|
60
|
-
Task.focus(tabSelector).pipe(Effect.ignore, Effect.as(
|
|
61
|
+
FocusTab(Task.focus(tabSelector).pipe(Effect.ignore, Effect.as(CompletedFocusTab()))),
|
|
61
62
|
],
|
|
62
63
|
];
|
|
63
64
|
},
|
|
64
|
-
|
|
65
|
+
CompletedFocusTab: () => [model, []],
|
|
65
66
|
}));
|
|
66
67
|
const tabPanelId = (id, index) => `${id}-panel-${index}`;
|
|
67
68
|
const tabId = (id, index) => `${id}-tab-${index}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foldkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0",
|
|
4
4
|
"description": "A frontend framework for TypeScript, built on Effect, using The Elm Architecture",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -59,6 +59,10 @@
|
|
|
59
59
|
"types": "./dist/task/public.d.ts",
|
|
60
60
|
"import": "./dist/task/public.js"
|
|
61
61
|
},
|
|
62
|
+
"./test": {
|
|
63
|
+
"types": "./dist/test/public.d.ts",
|
|
64
|
+
"import": "./dist/test/public.js"
|
|
65
|
+
},
|
|
62
66
|
"./ui": {
|
|
63
67
|
"types": "./dist/ui/index.d.ts",
|
|
64
68
|
"import": "./dist/ui/index.js"
|