@foldkit/ui 0.148.2 → 0.149.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/animation/index.d.ts +3 -3
- package/dist/animation/index.d.ts.map +1 -1
- package/dist/animation/index.js +2 -2
- package/dist/animation/public.d.ts +1 -1
- package/dist/animation/public.d.ts.map +1 -1
- package/dist/animation/public.js +1 -1
- package/dist/animation/schema.d.ts +12 -21
- package/dist/animation/schema.d.ts.map +1 -1
- package/dist/animation/schema.js +11 -15
- package/dist/animation/update.d.ts +1 -1
- package/dist/animation/update.d.ts.map +1 -1
- package/dist/animation/update.js +9 -9
- package/dist/calendar/index.d.ts +50 -105
- package/dist/calendar/index.d.ts.map +1 -1
- package/dist/calendar/index.js +61 -98
- package/dist/calendar/public.d.ts +1 -1
- package/dist/calendar/public.d.ts.map +1 -1
- package/dist/calendar/public.js +1 -1
- package/dist/combobox/multi.d.ts +9 -9
- package/dist/combobox/multi.d.ts.map +1 -1
- package/dist/combobox/multi.js +9 -9
- package/dist/combobox/public.d.ts +1 -1
- package/dist/combobox/public.d.ts.map +1 -1
- package/dist/combobox/public.js +1 -1
- package/dist/combobox/shared.d.ts +93 -137
- package/dist/combobox/shared.d.ts.map +1 -1
- package/dist/combobox/shared.js +108 -153
- package/dist/combobox/single.d.ts +9 -9
- package/dist/combobox/single.d.ts.map +1 -1
- package/dist/combobox/single.js +10 -10
- package/dist/datePicker/index.d.ts +88 -84
- package/dist/datePicker/index.d.ts.map +1 -1
- package/dist/datePicker/index.js +33 -63
- package/dist/datePicker/public.d.ts +1 -1
- package/dist/datePicker/public.d.ts.map +1 -1
- package/dist/datePicker/public.js +1 -1
- package/dist/dialog/index.d.ts +28 -49
- package/dist/dialog/index.d.ts.map +1 -1
- package/dist/dialog/index.js +39 -67
- package/dist/dialog/public.d.ts +1 -1
- package/dist/dialog/public.d.ts.map +1 -1
- package/dist/dialog/public.js +1 -1
- package/dist/dragAndDrop/index.d.ts +45 -72
- package/dist/dragAndDrop/index.d.ts.map +1 -1
- package/dist/dragAndDrop/index.js +72 -93
- package/dist/dragAndDrop/public.d.ts +1 -1
- package/dist/dragAndDrop/public.d.ts.map +1 -1
- package/dist/dragAndDrop/public.js +1 -1
- package/dist/fileDrop/index.d.ts +14 -35
- package/dist/fileDrop/index.d.ts.map +1 -1
- package/dist/fileDrop/index.js +20 -46
- package/dist/fileDrop/public.d.ts +1 -1
- package/dist/fileDrop/public.d.ts.map +1 -1
- package/dist/fileDrop/public.js +1 -1
- package/dist/listbox/multi.d.ts +7 -7
- package/dist/listbox/multi.d.ts.map +1 -1
- package/dist/listbox/multi.js +8 -8
- 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 +80 -127
- package/dist/listbox/shared.d.ts.map +1 -1
- package/dist/listbox/shared.js +92 -149
- package/dist/listbox/single.d.ts +7 -7
- package/dist/listbox/single.d.ts.map +1 -1
- package/dist/listbox/single.js +8 -8
- package/dist/menu/index.d.ts +86 -134
- package/dist/menu/index.d.ts.map +1 -1
- package/dist/menu/index.js +141 -189
- package/dist/menu/public.d.ts +1 -1
- package/dist/menu/public.d.ts.map +1 -1
- package/dist/menu/public.js +1 -1
- package/dist/popover/index.d.ts +39 -65
- package/dist/popover/index.d.ts.map +1 -1
- package/dist/popover/index.js +68 -98
- package/dist/popover/public.d.ts +1 -1
- package/dist/popover/public.d.ts.map +1 -1
- package/dist/popover/public.js +1 -1
- package/dist/radioGroup/index.d.ts +18 -29
- package/dist/radioGroup/index.d.ts.map +1 -1
- package/dist/radioGroup/index.js +22 -27
- package/dist/radioGroup/public.d.ts +1 -1
- package/dist/radioGroup/public.d.ts.map +1 -1
- package/dist/radioGroup/public.js +1 -1
- package/dist/slider/index.d.ts +29 -51
- package/dist/slider/index.d.ts.map +1 -1
- package/dist/slider/index.js +36 -56
- package/dist/slider/public.d.ts +1 -1
- package/dist/slider/public.d.ts.map +1 -1
- package/dist/slider/public.js +1 -1
- package/dist/tabs/index.d.ts +18 -28
- package/dist/tabs/index.d.ts.map +1 -1
- package/dist/tabs/index.js +22 -26
- package/dist/tabs/public.d.ts +1 -1
- package/dist/tabs/public.d.ts.map +1 -1
- package/dist/tabs/public.js +1 -1
- package/dist/test/apps/disabledButton.d.ts +71 -14
- package/dist/test/apps/disabledButton.d.ts.map +1 -1
- package/dist/test/apps/disabledButton.js +14 -13
- package/dist/toast/index.d.ts +124 -109
- package/dist/toast/index.d.ts.map +1 -1
- package/dist/toast/index.js +5 -5
- package/dist/toast/public.d.ts +1 -1
- package/dist/toast/public.d.ts.map +1 -1
- package/dist/toast/public.js +1 -1
- package/dist/toast/schema.d.ts +72 -84
- package/dist/toast/schema.d.ts.map +1 -1
- package/dist/toast/schema.js +31 -41
- package/dist/toast/test.d.ts.map +1 -1
- package/dist/toast/test.js +6 -3
- package/dist/toast/update.d.ts +104 -89
- package/dist/toast/update.d.ts.map +1 -1
- package/dist/toast/update.js +19 -20
- package/dist/tooltip/message.d.ts +26 -47
- package/dist/tooltip/message.d.ts.map +1 -1
- package/dist/tooltip/message.js +15 -40
- package/dist/tooltip/public.d.ts +1 -1
- package/dist/tooltip/public.d.ts.map +1 -1
- package/dist/tooltip/public.js +1 -1
- package/dist/tooltip/tooltip.d.ts +1 -1
- package/dist/tooltip/tooltip.d.ts.map +1 -1
- package/dist/tooltip/tooltip.js +15 -16
- package/dist/virtualList/index.d.ts +46 -23
- package/dist/virtualList/index.d.ts.map +1 -1
- package/dist/virtualList/index.js +12 -23
- package/dist/virtualList/public.d.ts +1 -1
- package/dist/virtualList/public.d.ts.map +1 -1
- package/dist/virtualList/public.js +1 -1
- package/package.json +3 -3
|
@@ -68,101 +68,105 @@ export declare const Model: S.Struct<{
|
|
|
68
68
|
}>;
|
|
69
69
|
}>;
|
|
70
70
|
export type Model = typeof Model.Type;
|
|
71
|
-
/**
|
|
72
|
-
export declare const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
readonly
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
/** Union of all messages the date picker component can produce. */
|
|
72
|
+
export declare const Message: import("foldkit/message").MessageUnion<{
|
|
73
|
+
readonly GotCalendarMessage: {
|
|
74
|
+
readonly message: import("foldkit/message").MessageUnion<{
|
|
75
|
+
readonly ClickedDay: {
|
|
76
|
+
readonly date: S.Struct<{
|
|
77
|
+
readonly year: S.Int;
|
|
78
|
+
readonly month: S.Int;
|
|
79
|
+
readonly day: S.Int;
|
|
80
|
+
}>;
|
|
81
|
+
};
|
|
82
|
+
readonly PressedKeyOnGrid: {
|
|
83
|
+
readonly key: S.String;
|
|
84
|
+
readonly isShift: S.Boolean;
|
|
85
|
+
};
|
|
86
|
+
readonly ClickedPreviousMonthButton: {};
|
|
87
|
+
readonly ClickedNextMonthButton: {};
|
|
88
|
+
readonly ClickedHeading: {};
|
|
89
|
+
readonly SelectedMonth: {
|
|
90
|
+
readonly month: S.Int;
|
|
91
|
+
};
|
|
92
|
+
readonly SelectedYear: {
|
|
93
|
+
readonly year: S.Int;
|
|
94
|
+
};
|
|
95
|
+
readonly PagedYears: {
|
|
96
|
+
readonly direction: S.Literals<readonly [1, -1]>;
|
|
97
|
+
};
|
|
98
|
+
readonly FocusedGrid: {};
|
|
99
|
+
readonly BlurredGrid: {};
|
|
100
|
+
readonly RefreshedToday: {
|
|
101
|
+
readonly today: S.Struct<{
|
|
102
|
+
readonly year: S.Int;
|
|
103
|
+
readonly month: S.Int;
|
|
104
|
+
readonly day: S.Int;
|
|
105
|
+
}>;
|
|
106
|
+
};
|
|
107
|
+
readonly CompletedFocusGrid: {};
|
|
78
108
|
}>;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
109
|
+
};
|
|
110
|
+
readonly GotPopoverMessage: {
|
|
111
|
+
readonly message: import("foldkit/message").MessageUnion<{
|
|
112
|
+
readonly RequestedOpen: {};
|
|
113
|
+
readonly RequestedClose: {};
|
|
114
|
+
readonly BlurredPanel: {};
|
|
115
|
+
readonly PressedPointerOnButton: {
|
|
116
|
+
readonly pointerType: S.String;
|
|
117
|
+
readonly button: S.Number;
|
|
118
|
+
};
|
|
119
|
+
readonly CompletedFocusPanel: {};
|
|
120
|
+
readonly CompletedFocusButton: {};
|
|
121
|
+
readonly CompletedLockScroll: {};
|
|
122
|
+
readonly CompletedUnlockScroll: {};
|
|
123
|
+
readonly CompletedInertOthers: {};
|
|
124
|
+
readonly CompletedRestoreInert: {};
|
|
125
|
+
readonly IgnoredMouseClick: {};
|
|
126
|
+
readonly SuppressedSpaceScroll: {};
|
|
127
|
+
readonly CompletedAnchorPopover: {};
|
|
128
|
+
readonly CompletedPortalPopoverBackdrop: {};
|
|
129
|
+
readonly GotAnimationMessage: {
|
|
130
|
+
readonly message: import("foldkit/message").MessageUnion<{
|
|
131
|
+
readonly Showed: {};
|
|
132
|
+
readonly Hid: {};
|
|
133
|
+
readonly CompletedWaitForPaint: {};
|
|
134
|
+
readonly EndedAnimation: {};
|
|
135
|
+
}>;
|
|
136
|
+
};
|
|
137
|
+
}>;
|
|
138
|
+
};
|
|
139
|
+
readonly RequestedSelectDate: {
|
|
140
|
+
readonly date: S.Struct<{
|
|
90
141
|
readonly year: S.Int;
|
|
91
142
|
readonly month: S.Int;
|
|
92
143
|
readonly day: S.Int;
|
|
93
144
|
}>;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
message: S.Union<[import("foldkit/schema").CallableTaggedStruct<"RequestedOpen", {}>, import("foldkit/schema").CallableTaggedStruct<"RequestedClose", {}>, import("foldkit/schema").CallableTaggedStruct<"BlurredPanel", {}>, import("foldkit/schema").CallableTaggedStruct<"PressedPointerOnButton", {
|
|
99
|
-
pointerType: S.String;
|
|
100
|
-
button: S.Number;
|
|
101
|
-
}>, import("foldkit/schema").CallableTaggedStruct<"CompletedFocusPanel", {}>, import("foldkit/schema").CallableTaggedStruct<"CompletedFocusButton", {}>, import("foldkit/schema").CallableTaggedStruct<"CompletedLockScroll", {}>, import("foldkit/schema").CallableTaggedStruct<"CompletedUnlockScroll", {}>, import("foldkit/schema").CallableTaggedStruct<"CompletedInertOthers", {}>, import("foldkit/schema").CallableTaggedStruct<"CompletedRestoreInert", {}>, import("foldkit/schema").CallableTaggedStruct<"IgnoredMouseClick", {}>, import("foldkit/schema").CallableTaggedStruct<"SuppressedSpaceScroll", {}>, import("foldkit/schema").CallableTaggedStruct<"CompletedAnchorPopover", {}>, import("foldkit/schema").CallableTaggedStruct<"CompletedPortalPopoverBackdrop", {}>, import("foldkit/schema").CallableTaggedStruct<"GotAnimationMessage", {
|
|
102
|
-
message: S.Union<[import("foldkit/schema").CallableTaggedStruct<"Showed", {}>, import("foldkit/schema").CallableTaggedStruct<"Hid", {}>, import("foldkit/schema").CallableTaggedStruct<"CompletedWaitForPaint", {}>, import("foldkit/schema").CallableTaggedStruct<"EndedAnimation", {}>]>;
|
|
103
|
-
}>]>;
|
|
104
|
-
}>;
|
|
105
|
-
/** Sent when the user commits a date via click or keyboard. Updates the
|
|
106
|
-
* selected date, syncs the calendar, and closes the popover. */
|
|
107
|
-
export declare const RequestedSelectDate: import("foldkit/schema").CallableTaggedStruct<"RequestedSelectDate", {
|
|
108
|
-
date: S.Struct<{
|
|
109
|
-
readonly year: S.Int;
|
|
110
|
-
readonly month: S.Int;
|
|
111
|
-
readonly day: S.Int;
|
|
112
|
-
}>;
|
|
145
|
+
};
|
|
146
|
+
readonly Cleared: {};
|
|
147
|
+
readonly Opened: {};
|
|
148
|
+
readonly Closed: {};
|
|
113
149
|
}>;
|
|
114
|
-
/** Sent when the user clears the selected date. Does not close the popover. */
|
|
115
|
-
export declare const Cleared: import("foldkit/schema").CallableTaggedStruct<"Cleared", {}>;
|
|
116
|
-
/** Sent when the popover should open. Triggers focus-grid on the embedded
|
|
117
|
-
* Calendar so keyboard focus lands inside the grid instead of the panel. */
|
|
118
|
-
export declare const Opened: import("foldkit/schema").CallableTaggedStruct<"Opened", {}>;
|
|
119
|
-
/** Sent when the popover should close. Delegates to Popover which returns
|
|
120
|
-
* focus to the trigger button. */
|
|
121
|
-
export declare const Closed: import("foldkit/schema").CallableTaggedStruct<"Closed", {}>;
|
|
122
|
-
/** Union of all messages the date picker component can produce. */
|
|
123
|
-
export declare const Message: S.Union<[
|
|
124
|
-
typeof GotCalendarMessage,
|
|
125
|
-
typeof GotPopoverMessage,
|
|
126
|
-
typeof RequestedSelectDate,
|
|
127
|
-
typeof Cleared,
|
|
128
|
-
typeof Opened,
|
|
129
|
-
typeof Closed
|
|
130
|
-
]>;
|
|
131
150
|
export type Message = typeof Message.Type;
|
|
132
|
-
/** Emitted when the visible month changes (propagated from the embedded
|
|
133
|
-
* Calendar). Useful for month-scoped data loading. */
|
|
134
|
-
export declare const ChangedViewMonth: import("foldkit/schema").CallableTaggedStruct<"ChangedViewMonth", {
|
|
135
|
-
year: S.Int;
|
|
136
|
-
month: S.Int;
|
|
137
|
-
}>;
|
|
138
|
-
/** Emitted when the user commits a date selection (propagated from the
|
|
139
|
-
* embedded Calendar). The popover has already closed; the parent stores the
|
|
140
|
-
* committed date and passes it back in as `maybeSelectedDate`. */
|
|
141
|
-
export declare const SelectedDate: import("foldkit/schema").CallableTaggedStruct<"SelectedDate", {
|
|
142
|
-
date: S.Struct<{
|
|
143
|
-
readonly year: S.Int;
|
|
144
|
-
readonly month: S.Int;
|
|
145
|
-
readonly day: S.Int;
|
|
146
|
-
}>;
|
|
147
|
-
}>;
|
|
148
|
-
/** Emitted when the user clears the selected date. The parent clears its own
|
|
149
|
-
* value field. */
|
|
150
|
-
export declare const ClearedDate: import("foldkit/schema").CallableTaggedStruct<"ClearedDate", {}>;
|
|
151
151
|
/** Union of out-messages the date picker can produce. */
|
|
152
|
-
export declare const OutMessage:
|
|
153
|
-
|
|
154
|
-
month: S.Int;
|
|
155
|
-
}>, import("foldkit/schema").CallableTaggedStruct<"SelectedDate", {
|
|
156
|
-
date: S.Struct<{
|
|
152
|
+
export declare const OutMessage: import("foldkit/message").MessageUnion<{
|
|
153
|
+
readonly ChangedViewMonth: {
|
|
157
154
|
readonly year: S.Int;
|
|
158
155
|
readonly month: S.Int;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
156
|
+
};
|
|
157
|
+
readonly SelectedDate: {
|
|
158
|
+
readonly date: S.Struct<{
|
|
159
|
+
readonly year: S.Int;
|
|
160
|
+
readonly month: S.Int;
|
|
161
|
+
readonly day: S.Int;
|
|
162
|
+
}>;
|
|
163
|
+
};
|
|
164
|
+
readonly ClearedDate: {};
|
|
165
|
+
}>;
|
|
162
166
|
export type OutMessage = typeof OutMessage.Type;
|
|
163
|
-
export type ChangedViewMonth = typeof ChangedViewMonth.Type;
|
|
164
|
-
export type SelectedDate = typeof SelectedDate.Type;
|
|
165
|
-
export type ClearedDate = typeof ClearedDate.Type;
|
|
167
|
+
export type ChangedViewMonth = typeof OutMessage.ChangedViewMonth.Type;
|
|
168
|
+
export type SelectedDate = typeof OutMessage.SelectedDate.Type;
|
|
169
|
+
export type ClearedDate = typeof OutMessage.ClearedDate.Type;
|
|
166
170
|
/** Configuration for creating a date picker model with `init`. */
|
|
167
171
|
export type InitConfig = Readonly<{
|
|
168
172
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/datePicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,MAAM,EAAa,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC7E,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAA;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,KAAK,EAAE,cAAc,EAA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qBACN,MAAM;sBACL,aAAa,CAAC,cAAc,CAAC;wBAC3B,MAAM;yBACL,aAAa,CAAC,cAAc,CAAC;GAoHnD,CAAA"}
|
package/dist/datePicker/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
|
|
|
2
2
|
import { Function, Match as M, Option, Predicate, Schema as S } from 'effect';
|
|
3
3
|
import * as Calendar from 'foldkit/calendar';
|
|
4
4
|
import * as Command from 'foldkit/command';
|
|
5
|
-
import {
|
|
5
|
+
import { defineMessageUnion } from 'foldkit/message';
|
|
6
6
|
import { evo } from 'foldkit/struct';
|
|
7
7
|
import { defineView } from 'foldkit/submodel';
|
|
8
8
|
import * as Update from 'foldkit/update';
|
|
@@ -21,54 +21,25 @@ export const Model = S.Struct({
|
|
|
21
21
|
popover: Popover.Model,
|
|
22
22
|
});
|
|
23
23
|
// MESSAGE
|
|
24
|
-
/** Wraps a Calendar submodel message for delegation. */
|
|
25
|
-
export const GotCalendarMessage = m('GotCalendarMessage', {
|
|
26
|
-
message: UiCalendar.Message,
|
|
27
|
-
});
|
|
28
|
-
/** Wraps a Popover submodel message for delegation. */
|
|
29
|
-
export const GotPopoverMessage = m('GotPopoverMessage', {
|
|
30
|
-
message: Popover.Message,
|
|
31
|
-
});
|
|
32
|
-
/** Sent when the user commits a date via click or keyboard. Updates the
|
|
33
|
-
* selected date, syncs the calendar, and closes the popover. */
|
|
34
|
-
export const RequestedSelectDate = m('RequestedSelectDate', {
|
|
35
|
-
date: Calendar.CalendarDate,
|
|
36
|
-
});
|
|
37
|
-
/** Sent when the user clears the selected date. Does not close the popover. */
|
|
38
|
-
export const Cleared = m('Cleared');
|
|
39
|
-
/** Sent when the popover should open. Triggers focus-grid on the embedded
|
|
40
|
-
* Calendar so keyboard focus lands inside the grid instead of the panel. */
|
|
41
|
-
export const Opened = m('Opened');
|
|
42
|
-
/** Sent when the popover should close. Delegates to Popover which returns
|
|
43
|
-
* focus to the trigger button. */
|
|
44
|
-
export const Closed = m('Closed');
|
|
45
24
|
/** Union of all messages the date picker component can produce. */
|
|
46
|
-
export const Message =
|
|
47
|
-
GotCalendarMessage,
|
|
48
|
-
GotPopoverMessage,
|
|
49
|
-
RequestedSelectDate,
|
|
50
|
-
Cleared,
|
|
51
|
-
Opened,
|
|
52
|
-
Closed,
|
|
53
|
-
]);
|
|
54
|
-
// OUT MESSAGE
|
|
55
|
-
/** Emitted when the visible month changes (propagated from the embedded
|
|
56
|
-
* Calendar). Useful for month-scoped data loading. */
|
|
57
|
-
export const ChangedViewMonth = m('ChangedViewMonth', {
|
|
58
|
-
year: S.Int,
|
|
59
|
-
month: S.Int,
|
|
25
|
+
export const Message = defineMessageUnion({
|
|
26
|
+
GotCalendarMessage: { message: UiCalendar.Message },
|
|
27
|
+
GotPopoverMessage: { message: Popover.Message },
|
|
28
|
+
RequestedSelectDate: { date: Calendar.CalendarDate },
|
|
29
|
+
Cleared: {},
|
|
30
|
+
Opened: {},
|
|
31
|
+
Closed: {},
|
|
60
32
|
});
|
|
61
|
-
|
|
62
|
-
* embedded Calendar). The popover has already closed; the parent stores the
|
|
63
|
-
* committed date and passes it back in as `maybeSelectedDate`. */
|
|
64
|
-
export const SelectedDate = m('SelectedDate', {
|
|
65
|
-
date: Calendar.CalendarDate,
|
|
66
|
-
});
|
|
67
|
-
/** Emitted when the user clears the selected date. The parent clears its own
|
|
68
|
-
* value field. */
|
|
69
|
-
export const ClearedDate = m('ClearedDate');
|
|
33
|
+
// OUT MESSAGE
|
|
70
34
|
/** Union of out-messages the date picker can produce. */
|
|
71
|
-
export const OutMessage =
|
|
35
|
+
export const OutMessage = defineMessageUnion({
|
|
36
|
+
ChangedViewMonth: {
|
|
37
|
+
year: S.Int,
|
|
38
|
+
month: S.Int,
|
|
39
|
+
},
|
|
40
|
+
SelectedDate: { date: Calendar.CalendarDate },
|
|
41
|
+
ClearedDate: {},
|
|
42
|
+
});
|
|
72
43
|
/** Creates an initial date picker model from a config. The selected date is
|
|
73
44
|
* owned by the parent; pass its current value as `initialViewDate` to open the
|
|
74
45
|
* calendar onto that month. The calendar and popover submodels are created
|
|
@@ -99,16 +70,15 @@ export const init = (config) => (__foldkitBrandViewResult(({
|
|
|
99
70
|
...(config.isAnimated !== undefined && { isAnimated: config.isAnimated }),
|
|
100
71
|
}),
|
|
101
72
|
}), "@foldkit/ui/datePicker/index.js#init"));
|
|
102
|
-
const
|
|
103
|
-
const
|
|
104
|
-
const mapPopoverCommands = (commands) => __foldkitBrandViewResult((Command.mapMessages(commands, message => __foldkitBrandViewResult((GotPopoverMessage({ message })), "@foldkit/ui/datePicker/index.js#anonymous~2"))), "@foldkit/ui/datePicker/index.js#mapPopoverCommands");
|
|
73
|
+
const mapCalendarCommands = (commands) => __foldkitBrandViewResult((Command.mapMessages(commands, message => __foldkitBrandViewResult((Message.GotCalendarMessage({ message })), "@foldkit/ui/datePicker/index.js#anonymous"))), "@foldkit/ui/datePicker/index.js#mapCalendarCommands");
|
|
74
|
+
const mapPopoverCommands = (commands) => __foldkitBrandViewResult((Command.mapMessages(commands, message => __foldkitBrandViewResult((Message.GotPopoverMessage({ message })), "@foldkit/ui/datePicker/index.js#anonymous~2"))), "@foldkit/ui/datePicker/index.js#mapPopoverCommands");
|
|
105
75
|
const dropCalendarToDays = model => __foldkitBrandViewResult(([
|
|
106
76
|
evo(model, { calendar: () => __foldkitBrandViewResult((UiCalendar.dropToDays(model.calendar)), "@foldkit/ui/datePicker/index.js#calendar") }),
|
|
107
77
|
[],
|
|
108
78
|
]), "@foldkit/ui/datePicker/index.js#dropCalendarToDays");
|
|
109
79
|
const readPopover = (model) => __foldkitBrandViewResult((Option.some(model.popover)), "@foldkit/ui/datePicker/index.js#readPopover");
|
|
110
80
|
const writePopover = (model, nextPopover) => __foldkitBrandViewResult((evo(model, { popover: () => __foldkitBrandViewResult((nextPopover), "@foldkit/ui/datePicker/index.js#popover") })), "@foldkit/ui/datePicker/index.js#writePopover");
|
|
111
|
-
const toGotPopoverMessage = (message) => __foldkitBrandViewResult((GotPopoverMessage({ message })), "@foldkit/ui/datePicker/index.js#toGotPopoverMessage");
|
|
81
|
+
const toGotPopoverMessage = (message) => __foldkitBrandViewResult((Message.GotPopoverMessage({ message })), "@foldkit/ui/datePicker/index.js#toGotPopoverMessage");
|
|
112
82
|
const foldPopoverOutMessage = M.type().pipe(M.withReturnType(), M.tagsExhaustive({
|
|
113
83
|
Opened: () => __foldkitBrandViewResult((dropCalendarToDays), "@foldkit/ui/datePicker/index.js#Opened"),
|
|
114
84
|
Closed: () => __foldkitBrandViewResult((dropCalendarToDays), "@foldkit/ui/datePicker/index.js#Closed"),
|
|
@@ -140,20 +110,20 @@ const foldCalendarOutMessage = M.type().pipe(M.withReturnType(), M.tagsExhaustiv
|
|
|
140
110
|
SelectedDate: () => __foldkitBrandViewResult((foldPopoverClose), "@foldkit/ui/datePicker/index.js#SelectedDate"),
|
|
141
111
|
}));
|
|
142
112
|
const toDatePickerOutMessage = M.type().pipe(M.withReturnType(), M.tagsExhaustive({
|
|
143
|
-
ChangedViewMonth: ({ year, month }) => __foldkitBrandViewResult((Option.some(ChangedViewMonth({ year, month }))), "@foldkit/ui/datePicker/index.js#ChangedViewMonth~2"),
|
|
144
|
-
SelectedDate: ({ date }) => __foldkitBrandViewResult((Option.some(SelectedDate({ date }))), "@foldkit/ui/datePicker/index.js#SelectedDate~2"),
|
|
113
|
+
ChangedViewMonth: ({ year, month }) => __foldkitBrandViewResult((Option.some(OutMessage.ChangedViewMonth({ year, month }))), "@foldkit/ui/datePicker/index.js#ChangedViewMonth~2"),
|
|
114
|
+
SelectedDate: ({ date }) => __foldkitBrandViewResult((Option.some(OutMessage.SelectedDate({ date }))), "@foldkit/ui/datePicker/index.js#SelectedDate~2"),
|
|
145
115
|
}));
|
|
146
116
|
const foldCalendar = Update.foldChild({
|
|
147
117
|
update: UiCalendar.update,
|
|
148
118
|
read: (model) => __foldkitBrandViewResult((Option.some(model.calendar)), "@foldkit/ui/datePicker/index.js#read"),
|
|
149
119
|
write: (model, nextCalendar) => __foldkitBrandViewResult((evo(model, { calendar: () => __foldkitBrandViewResult((nextCalendar), "@foldkit/ui/datePicker/index.js#calendar~2") })), "@foldkit/ui/datePicker/index.js#write"),
|
|
150
|
-
toParentMessage: message => __foldkitBrandViewResult((GotCalendarMessage({ message })), "@foldkit/ui/datePicker/index.js#toParentMessage"),
|
|
120
|
+
toParentMessage: message => __foldkitBrandViewResult((Message.GotCalendarMessage({ message })), "@foldkit/ui/datePicker/index.js#toParentMessage"),
|
|
151
121
|
toParentOutMessage: toDatePickerOutMessage,
|
|
152
122
|
foldOutMessage: foldCalendarOutMessage,
|
|
153
123
|
});
|
|
154
124
|
/** Processes a date picker message and returns the next model, commands, and
|
|
155
125
|
* optional OutMessage. */
|
|
156
|
-
export const update = (model, message) => __foldkitBrandViewResult((
|
|
126
|
+
export const update = (model, message) => __foldkitBrandViewResult((Message.match(message, {
|
|
157
127
|
GotCalendarMessage: ({ message: calendarMessage }) => __foldkitBrandViewResult((foldCalendar(model, calendarMessage)), "@foldkit/ui/datePicker/index.js#GotCalendarMessage"),
|
|
158
128
|
GotPopoverMessage: ({ message: popoverMessage }) => __foldkitBrandViewResult((foldPopover(model, popoverMessage)), "@foldkit/ui/datePicker/index.js#GotPopoverMessage"),
|
|
159
129
|
Opened: () => __foldkitBrandViewResult(([
|
|
@@ -176,20 +146,20 @@ export const update = (model, message) => __foldkitBrandViewResult((M.value(mess
|
|
|
176
146
|
...mapCalendarCommands(calendarCommands),
|
|
177
147
|
...mapPopoverCommands(popoverCommands),
|
|
178
148
|
],
|
|
179
|
-
Option.some(SelectedDate({ date })),
|
|
149
|
+
Option.some(OutMessage.SelectedDate({ date })),
|
|
180
150
|
]), "@foldkit/ui/datePicker/index.js#RequestedSelectDate");
|
|
181
151
|
},
|
|
182
|
-
Cleared: () => __foldkitBrandViewResult(([model, [], Option.some(ClearedDate())]), "@foldkit/ui/datePicker/index.js#Cleared"),
|
|
183
|
-
}))
|
|
152
|
+
Cleared: () => __foldkitBrandViewResult(([model, [], Option.some(OutMessage.ClearedDate())]), "@foldkit/ui/datePicker/index.js#Cleared"),
|
|
153
|
+
})), "@foldkit/ui/datePicker/index.js#update");
|
|
184
154
|
/** Programmatically opens the date picker, updating the model and returning
|
|
185
155
|
* focus and popover commands. Use this in domain-event handlers. */
|
|
186
|
-
export const open = (model) => __foldkitBrandViewResult((update(model, Opened())), "@foldkit/ui/datePicker/index.js#open");
|
|
156
|
+
export const open = (model) => __foldkitBrandViewResult((update(model, Message.Opened())), "@foldkit/ui/datePicker/index.js#open");
|
|
187
157
|
/** Programmatically closes the date picker. Use this in domain-event handlers. */
|
|
188
|
-
export const close = (model) => __foldkitBrandViewResult((update(model, Closed())), "@foldkit/ui/datePicker/index.js#close");
|
|
158
|
+
export const close = (model) => __foldkitBrandViewResult((update(model, Message.Closed())), "@foldkit/ui/datePicker/index.js#close");
|
|
189
159
|
/** Programmatically selects a date, committing it and closing the popover. Emits a `SelectedDate` OutMessage just like a user-initiated selection. */
|
|
190
|
-
export const selectDate = (model, date) => __foldkitBrandViewResult((update(model, RequestedSelectDate({ date }))), "@foldkit/ui/datePicker/index.js#selectDate");
|
|
160
|
+
export const selectDate = (model, date) => __foldkitBrandViewResult((update(model, Message.RequestedSelectDate({ date }))), "@foldkit/ui/datePicker/index.js#selectDate");
|
|
191
161
|
/** Programmatically clears the selected date. */
|
|
192
|
-
export const clear = (model) => __foldkitBrandViewResult((update(model, Cleared())), "@foldkit/ui/datePicker/index.js#clear");
|
|
162
|
+
export const clear = (model) => __foldkitBrandViewResult((update(model, Message.Cleared())), "@foldkit/ui/datePicker/index.js#clear");
|
|
193
163
|
/** Moves the embedded calendar's view and cursor to a date without changing
|
|
194
164
|
* the selection (which the parent owns). Use it to navigate the picker onto a
|
|
195
165
|
* known date, for example after the parent sets its value externally (a URL
|
|
@@ -260,7 +230,7 @@ export const view = defineView((model, viewInputs, h) => {
|
|
|
260
230
|
model: model.calendar,
|
|
261
231
|
view: UiCalendar.view,
|
|
262
232
|
viewInputs: { maybeSelectedDate, toView: toCalendarView },
|
|
263
|
-
toParentMessage: message => __foldkitBrandViewResult((GotCalendarMessage({ message })), "@foldkit/ui/datePicker/index.js#toParentMessage~2"),
|
|
233
|
+
toParentMessage: message => __foldkitBrandViewResult((Message.GotCalendarMessage({ message })), "@foldkit/ui/datePicker/index.js#toParentMessage~2"),
|
|
264
234
|
});
|
|
265
235
|
const popoverVNode = h.submodel({
|
|
266
236
|
slotId: model.popover.id,
|
|
@@ -299,7 +269,7 @@ export const view = defineView((model, viewInputs, h) => {
|
|
|
299
269
|
: []),
|
|
300
270
|
])), "@foldkit/ui/datePicker/index.js#toView"),
|
|
301
271
|
},
|
|
302
|
-
toParentMessage: message => __foldkitBrandViewResult((GotPopoverMessage({ message })), "@foldkit/ui/datePicker/index.js#toParentMessage~3"),
|
|
272
|
+
toParentMessage: message => __foldkitBrandViewResult((Message.GotPopoverMessage({ message })), "@foldkit/ui/datePicker/index.js#toParentMessage~3"),
|
|
303
273
|
});
|
|
304
274
|
const hiddenInputValue = Option.match(maybeSelectedDate, {
|
|
305
275
|
onNone: () => __foldkitBrandViewResult((''), "@foldkit/ui/datePicker/index.js#onNone"),
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { init, update, view, triggerId, open, close, selectDate, clear, focusDate, reflectMinDate, reflectMaxDate, reflectDisabledDates, reflectDisabledDaysOfWeek, Model, Message, OutMessage,
|
|
1
|
+
export { init, update, view, triggerId, open, close, selectDate, clear, focusDate, reflectMinDate, reflectMaxDate, reflectDisabledDates, reflectDisabledDaysOfWeek, Model, Message, OutMessage, type SelectedDate, type ClearedDate, type ChangedViewMonth, } from './index.js';
|
|
2
2
|
export type { InitConfig, ViewInputs } from './index.js';
|
|
3
3
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/datePicker/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,KAAK,EACL,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,KAAK,EACL,OAAO,EACP,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/datePicker/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,KAAK,EACL,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,KAAK,EACL,OAAO,EACP,UAAU,EACV,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,gBAAgB,GACtB,MAAM,YAAY,CAAA;AAEnB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { init, update, view, triggerId, open, close, selectDate, clear, focusDate, reflectMinDate, reflectMaxDate, reflectDisabledDates, reflectDisabledDaysOfWeek, Model, Message, OutMessage,
|
|
1
|
+
export { init, update, view, triggerId, open, close, selectDate, clear, focusDate, reflectMinDate, reflectMaxDate, reflectDisabledDates, reflectDisabledDaysOfWeek, Model, Message, OutMessage, } from './index.js';
|
package/dist/dialog/index.d.ts
CHANGED
|
@@ -14,58 +14,37 @@ export declare const Model: S.Struct<{
|
|
|
14
14
|
readonly maybeFocusSelector: S.Option<S.String>;
|
|
15
15
|
}>;
|
|
16
16
|
export type Model = typeof Model.Type;
|
|
17
|
-
/** Sent when the dialog should open. Triggers the ShowDialog command. */
|
|
18
|
-
export declare const RequestedOpen: import("foldkit/schema").CallableTaggedStruct<"RequestedOpen", {}>;
|
|
19
|
-
/** Sent when the dialog should close (Escape key, backdrop click, or programmatic). */
|
|
20
|
-
export declare const RequestedClose: import("foldkit/schema").CallableTaggedStruct<"RequestedClose", {}>;
|
|
21
|
-
/** Sent when the show-dialog command completes. */
|
|
22
|
-
export declare const CompletedShowDialog: import("foldkit/schema").CallableTaggedStruct<"CompletedShowDialog", {}>;
|
|
23
|
-
/** Sent when the close-dialog command completes. */
|
|
24
|
-
export declare const CompletedCloseDialog: import("foldkit/schema").CallableTaggedStruct<"CompletedCloseDialog", {}>;
|
|
25
|
-
/** Sent when the native `<dialog>` element is removed from the DOM, the classic
|
|
26
|
-
* case being navigation away from a route-keyed subtree that contains the
|
|
27
|
-
* dialog. When the dialog still holds framework resources, `update` triggers
|
|
28
|
-
* the hygiene-only `ReleaseDialogResources` command and resets the model to a
|
|
29
|
-
* clean closed state. Does not emit `Closed` or run any consumer close
|
|
30
|
-
* Commands: it is a backstop, not the purposeful close. */
|
|
31
|
-
export declare const Unmounted: import("foldkit/schema").CallableTaggedStruct<"Unmounted", {}>;
|
|
32
|
-
/** Sent when the release-dialog-resources command completes. */
|
|
33
|
-
export declare const CompletedReleaseDialogResources: import("foldkit/schema").CallableTaggedStruct<"CompletedReleaseDialogResources", {}>;
|
|
34
|
-
/** Wraps an Animation submodel message for delegation. */
|
|
35
|
-
export declare const GotAnimationMessage: import("foldkit/schema").CallableTaggedStruct<"GotAnimationMessage", {
|
|
36
|
-
message: S.Union<[import("foldkit/schema").CallableTaggedStruct<"Showed", {}>, import("foldkit/schema").CallableTaggedStruct<"Hid", {}>, import("foldkit/schema").CallableTaggedStruct<"CompletedWaitForPaint", {}>, import("foldkit/schema").CallableTaggedStruct<"EndedAnimation", {}>]>;
|
|
37
|
-
}>;
|
|
38
17
|
/** Union of all messages the dialog component can produce. */
|
|
39
|
-
export declare const Message:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
18
|
+
export declare const Message: import("foldkit/message").MessageUnion<{
|
|
19
|
+
readonly RequestedOpen: {};
|
|
20
|
+
readonly RequestedClose: {};
|
|
21
|
+
readonly CompletedShowDialog: {};
|
|
22
|
+
readonly CompletedCloseDialog: {};
|
|
23
|
+
readonly Unmounted: {};
|
|
24
|
+
readonly CompletedReleaseDialogResources: {};
|
|
25
|
+
readonly GotAnimationMessage: {
|
|
26
|
+
readonly message: import("foldkit/message").MessageUnion<{
|
|
27
|
+
readonly Showed: {};
|
|
28
|
+
readonly Hid: {};
|
|
29
|
+
readonly CompletedWaitForPaint: {};
|
|
30
|
+
readonly EndedAnimation: {};
|
|
31
|
+
}>;
|
|
32
|
+
};
|
|
33
|
+
}>;
|
|
34
|
+
export type RequestedOpen = typeof Message.RequestedOpen.Type;
|
|
35
|
+
export type RequestedClose = typeof Message.RequestedClose.Type;
|
|
36
|
+
export type CompletedShowDialog = typeof Message.CompletedShowDialog.Type;
|
|
37
|
+
export type CompletedCloseDialog = typeof Message.CompletedCloseDialog.Type;
|
|
38
|
+
export type Unmounted = typeof Message.Unmounted.Type;
|
|
39
|
+
export type CompletedReleaseDialogResources = typeof Message.CompletedReleaseDialogResources.Type;
|
|
54
40
|
export type Message = typeof Message.Type;
|
|
55
|
-
/** Sent once the dialog has transitioned to open. Fires after `update`
|
|
56
|
-
* has processed `RequestedOpen` and `isOpen` reflects the new state.
|
|
57
|
-
* Programmatic `Dialog.open` on an already-open model is a no-op that
|
|
58
|
-
* does not re-emit. */
|
|
59
|
-
export declare const Opened: import("foldkit/schema").CallableTaggedStruct<"Opened", {}>;
|
|
60
|
-
/** Sent once the dialog has transitioned to closed. Programmatic
|
|
61
|
-
* `Dialog.close` on an already-closed model is a no-op that does not
|
|
62
|
-
* re-emit; calling close while a leave animation is in progress is
|
|
63
|
-
* also a no-op. */
|
|
64
|
-
export declare const Closed: import("foldkit/schema").CallableTaggedStruct<"Closed", {}>;
|
|
65
41
|
/** Union of out-messages the dialog component can produce. */
|
|
66
|
-
export declare const OutMessage:
|
|
67
|
-
|
|
68
|
-
|
|
42
|
+
export declare const OutMessage: import("foldkit/message").MessageUnion<{
|
|
43
|
+
readonly Opened: {};
|
|
44
|
+
readonly Closed: {};
|
|
45
|
+
}>;
|
|
46
|
+
export type Opened = typeof OutMessage.Opened.Type;
|
|
47
|
+
export type Closed = typeof OutMessage.Closed.Type;
|
|
69
48
|
export type OutMessage = typeof OutMessage.Type;
|
|
70
49
|
/** Configuration for creating a dialog model with `init`. The `id` must be
|
|
71
50
|
* non-empty and unique within the document: it keys the dialog element, its
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAc,MAAM,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAChE,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAE1C,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,IAAI,EAAmB,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAc,MAAM,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAChE,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAE1C,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,IAAI,EAAmB,MAAM,cAAc,CAAA;AAuB9E,6IAA6I;AAC7I,eAAO,MAAM,KAAK;;;;;;;;;;EAMhB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,8DAA8D;AAC9D,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;EAQlB,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,OAAO,OAAO,CAAC,aAAa,CAAC,IAAI,CAAA;AA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