foldkit 0.60.0 → 0.62.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.
Files changed (52) hide show
  1. package/dist/calendar/arithmetic.d.ts +140 -0
  2. package/dist/calendar/arithmetic.d.ts.map +1 -0
  3. package/dist/calendar/arithmetic.js +169 -0
  4. package/dist/calendar/calendarDate.d.ts +162 -0
  5. package/dist/calendar/calendarDate.d.ts.map +1 -0
  6. package/dist/calendar/calendarDate.js +196 -0
  7. package/dist/calendar/comparison.d.ts +163 -0
  8. package/dist/calendar/comparison.d.ts.map +1 -0
  9. package/dist/calendar/comparison.js +134 -0
  10. package/dist/calendar/index.d.ts +7 -0
  11. package/dist/calendar/index.d.ts.map +1 -0
  12. package/dist/calendar/index.js +6 -0
  13. package/dist/calendar/info.d.ts +76 -0
  14. package/dist/calendar/info.d.ts.map +1 -0
  15. package/dist/calendar/info.js +125 -0
  16. package/dist/calendar/locale.d.ts +71 -0
  17. package/dist/calendar/locale.d.ts.map +1 -0
  18. package/dist/calendar/locale.js +171 -0
  19. package/dist/calendar/public.d.ts +2 -0
  20. package/dist/calendar/public.d.ts.map +1 -0
  21. package/dist/calendar/public.js +1 -0
  22. package/dist/calendar/today.d.ts +41 -0
  23. package/dist/calendar/today.d.ts.map +1 -0
  24. package/dist/calendar/today.js +33 -0
  25. package/dist/index.d.ts +1 -0
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +1 -0
  28. package/dist/ui/anchor.d.ts +2 -1
  29. package/dist/ui/anchor.d.ts.map +1 -1
  30. package/dist/ui/anchor.js +24 -3
  31. package/dist/ui/calendar/index.d.ts +242 -0
  32. package/dist/ui/calendar/index.d.ts.map +1 -0
  33. package/dist/ui/calendar/index.js +516 -0
  34. package/dist/ui/calendar/public.d.ts +3 -0
  35. package/dist/ui/calendar/public.d.ts.map +1 -0
  36. package/dist/ui/calendar/public.js +1 -0
  37. package/dist/ui/datePicker/index.d.ts +226 -0
  38. package/dist/ui/datePicker/index.d.ts.map +1 -0
  39. package/dist/ui/datePicker/index.js +231 -0
  40. package/dist/ui/datePicker/public.d.ts +3 -0
  41. package/dist/ui/datePicker/public.d.ts.map +1 -0
  42. package/dist/ui/datePicker/public.js +1 -0
  43. package/dist/ui/dragAndDrop/index.d.ts +1 -1
  44. package/dist/ui/index.d.ts +2 -0
  45. package/dist/ui/index.d.ts.map +1 -1
  46. package/dist/ui/index.js +2 -0
  47. package/dist/ui/menu/index.d.ts.map +1 -1
  48. package/dist/ui/menu/index.js +1 -5
  49. package/dist/ui/popover/index.d.ts +4 -1
  50. package/dist/ui/popover/index.d.ts.map +1 -1
  51. package/dist/ui/popover/index.js +8 -9
  52. package/package.json +9 -1
@@ -0,0 +1,226 @@
1
+ import { Option, Schema as S } from 'effect';
2
+ import * as Calendar from '../../calendar';
3
+ import type { CalendarDate } from '../../calendar';
4
+ import * as Command from '../../command';
5
+ import { type Attribute, type Html } from '../../html';
6
+ import type { AnchorConfig } from '../anchor';
7
+ import * as UiCalendar from '../calendar';
8
+ /** Schema for the date picker component's state. Holds the selected date,
9
+ * the embedded Calendar submodel (the visible grid), and the embedded Popover
10
+ * submodel (the open/close + transition layer). */
11
+ export declare const Model: S.Struct<{
12
+ id: typeof S.String;
13
+ maybeSelectedDate: S.OptionFromSelf<S.filter<S.Struct<{
14
+ year: typeof S.Int;
15
+ month: S.filter<typeof S.Int>;
16
+ day: S.filter<typeof S.Int>;
17
+ }>>>;
18
+ calendar: S.Struct<{
19
+ id: typeof S.String;
20
+ today: S.filter<S.Struct<{
21
+ year: typeof S.Int;
22
+ month: S.filter<typeof S.Int>;
23
+ day: S.filter<typeof S.Int>;
24
+ }>>;
25
+ viewYear: typeof S.Int;
26
+ viewMonth: S.filter<typeof S.Int>;
27
+ maybeFocusedDate: S.OptionFromSelf<S.filter<S.Struct<{
28
+ year: typeof S.Int;
29
+ month: S.filter<typeof S.Int>;
30
+ day: S.filter<typeof S.Int>;
31
+ }>>>;
32
+ maybeSelectedDate: S.OptionFromSelf<S.filter<S.Struct<{
33
+ year: typeof S.Int;
34
+ month: S.filter<typeof S.Int>;
35
+ day: S.filter<typeof S.Int>;
36
+ }>>>;
37
+ isGridFocused: typeof S.Boolean;
38
+ locale: S.Struct<{
39
+ firstDayOfWeek: S.Literal<["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]>;
40
+ monthNames: S.Tuple<[typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String]>;
41
+ shortMonthNames: S.Tuple<[typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String]>;
42
+ dayNames: S.Tuple<[typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String]>;
43
+ shortDayNames: S.Tuple<[typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String, typeof S.String]>;
44
+ }>;
45
+ maybeMinDate: S.OptionFromSelf<S.filter<S.Struct<{
46
+ year: typeof S.Int;
47
+ month: S.filter<typeof S.Int>;
48
+ day: S.filter<typeof S.Int>;
49
+ }>>>;
50
+ maybeMaxDate: S.OptionFromSelf<S.filter<S.Struct<{
51
+ year: typeof S.Int;
52
+ month: S.filter<typeof S.Int>;
53
+ day: S.filter<typeof S.Int>;
54
+ }>>>;
55
+ disabledDaysOfWeek: S.Array$<S.Literal<["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]>>;
56
+ disabledDates: S.Array$<S.filter<S.Struct<{
57
+ year: typeof S.Int;
58
+ month: S.filter<typeof S.Int>;
59
+ day: S.filter<typeof S.Int>;
60
+ }>>>;
61
+ }>;
62
+ popover: S.Struct<{
63
+ id: typeof S.String;
64
+ isOpen: typeof S.Boolean;
65
+ isAnimated: typeof S.Boolean;
66
+ isModal: typeof S.Boolean;
67
+ contentFocus: typeof S.Boolean;
68
+ transition: S.Struct<{
69
+ id: typeof S.String;
70
+ isShowing: typeof S.Boolean;
71
+ transitionState: S.Literal<["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
72
+ }>;
73
+ maybeLastButtonPointerType: S.OptionFromSelf<typeof S.String>;
74
+ }>;
75
+ }>;
76
+ export type Model = typeof Model.Type;
77
+ /** Wraps a Calendar submodel message for delegation. */
78
+ export declare const GotCalendarMessage: import("../../schema").CallableTaggedStruct<"GotCalendarMessage", {
79
+ message: S.Union<[import("../../schema").CallableTaggedStruct<"ClickedDay", {
80
+ date: S.filter<S.Struct<{
81
+ year: typeof S.Int;
82
+ month: S.filter<typeof S.Int>;
83
+ day: S.filter<typeof S.Int>;
84
+ }>>;
85
+ }>, import("../../schema").CallableTaggedStruct<"PressedKeyOnGrid", {
86
+ key: typeof S.String;
87
+ isShift: typeof S.Boolean;
88
+ }>, import("../../schema").CallableTaggedStruct<"ClickedPreviousMonthButton", {}>, import("../../schema").CallableTaggedStruct<"ClickedNextMonthButton", {}>, import("../../schema").CallableTaggedStruct<"SelectedMonthFromDropdown", {
89
+ month: typeof S.Int;
90
+ }>, import("../../schema").CallableTaggedStruct<"SelectedYearFromDropdown", {
91
+ year: typeof S.Int;
92
+ }>, import("../../schema").CallableTaggedStruct<"FocusedGrid", {}>, import("../../schema").CallableTaggedStruct<"BlurredGrid", {}>, import("../../schema").CallableTaggedStruct<"RefreshedToday", {
93
+ today: S.filter<S.Struct<{
94
+ year: typeof S.Int;
95
+ month: S.filter<typeof S.Int>;
96
+ day: S.filter<typeof S.Int>;
97
+ }>>;
98
+ }>, import("../../schema").CallableTaggedStruct<"CompletedFocusGrid", {}>]>;
99
+ }>;
100
+ /** Wraps a Popover submodel message for delegation. */
101
+ export declare const GotPopoverMessage: import("../../schema").CallableTaggedStruct<"GotPopoverMessage", {
102
+ message: S.Union<[import("../../schema").CallableTaggedStruct<"Opened", {}>, import("../../schema").CallableTaggedStruct<"Closed", {}>, import("../../schema").CallableTaggedStruct<"ClosedByTab", {}>, import("../../schema").CallableTaggedStruct<"PressedPointerOnButton", {
103
+ pointerType: typeof S.String;
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<"GotTransitionMessage", {
106
+ message: S.Union<[import("../../schema").CallableTaggedStruct<"Showed", {}>, import("../../schema").CallableTaggedStruct<"Hid", {}>, import("../../schema").CallableTaggedStruct<"AdvancedTransitionFrame", {}>, import("../../schema").CallableTaggedStruct<"EndedTransition", {}>]>;
107
+ }>]>;
108
+ }>;
109
+ /** Sent when the user commits a date via click or keyboard. Updates the
110
+ * selected date, syncs the calendar, and closes the popover. */
111
+ export declare const SelectedDate: import("../../schema").CallableTaggedStruct<"SelectedDate", {
112
+ date: S.filter<S.Struct<{
113
+ year: typeof S.Int;
114
+ month: S.filter<typeof S.Int>;
115
+ day: S.filter<typeof S.Int>;
116
+ }>>;
117
+ }>;
118
+ /** Sent when the user clears the selected date. Does not close the popover. */
119
+ export declare const Cleared: import("../../schema").CallableTaggedStruct<"Cleared", {}>;
120
+ /** Sent when the popover should open. Triggers focus-grid on the embedded
121
+ * Calendar so keyboard focus lands inside the grid instead of the panel. */
122
+ export declare const Opened: import("../../schema").CallableTaggedStruct<"Opened", {}>;
123
+ /** Sent when the popover should close. Delegates to Popover which returns
124
+ * focus to the trigger button. */
125
+ export declare const Closed: import("../../schema").CallableTaggedStruct<"Closed", {}>;
126
+ /** Union of all messages the date picker component can produce. */
127
+ export declare const Message: S.Union<[
128
+ typeof GotCalendarMessage,
129
+ typeof GotPopoverMessage,
130
+ typeof SelectedDate,
131
+ typeof Cleared,
132
+ typeof Opened,
133
+ typeof Closed
134
+ ]>;
135
+ export type Message = typeof Message.Type;
136
+ /** Emitted when the visible month changes (propagated from the embedded
137
+ * Calendar). Useful for month-scoped data loading. */
138
+ export declare const ChangedViewMonth: import("../../schema").CallableTaggedStruct<"ChangedViewMonth", {
139
+ year: typeof S.Int;
140
+ month: typeof S.Int;
141
+ }>;
142
+ /** The date picker's OutMessage. Matches Calendar — only `ChangedViewMonth`.
143
+ * Date selection goes through the `onSelectedDate` ViewConfig callback, not
144
+ * OutMessage. */
145
+ export declare const OutMessage: import("../../schema").CallableTaggedStruct<"ChangedViewMonth", {
146
+ year: typeof S.Int;
147
+ month: typeof S.Int;
148
+ }>;
149
+ export type OutMessage = typeof OutMessage.Type;
150
+ /** Configuration for creating a date picker model with `init`. */
151
+ export type InitConfig = Readonly<{
152
+ id: string;
153
+ today: CalendarDate;
154
+ initialSelectedDate?: CalendarDate;
155
+ isAnimated?: boolean;
156
+ locale?: Calendar.LocaleConfig;
157
+ minDate?: CalendarDate;
158
+ maxDate?: CalendarDate;
159
+ disabledDaysOfWeek?: ReadonlyArray<Calendar.DayOfWeek>;
160
+ disabledDates?: ReadonlyArray<CalendarDate>;
161
+ }>;
162
+ /** Creates an initial date picker model from a config. The calendar and
163
+ * popover submodels are created with derived ids so their DOM elements stay
164
+ * addressable. The popover is opened in `contentFocus` mode so focus lands on
165
+ * the calendar grid instead of the panel. */
166
+ export declare const init: (config: InitConfig) => Model;
167
+ type UpdateReturn = readonly [
168
+ Model,
169
+ ReadonlyArray<Command.Command<Message>>,
170
+ Option.Option<OutMessage>
171
+ ];
172
+ /** Processes a date picker message and returns the next model, commands, and
173
+ * optional OutMessage. */
174
+ export declare const update: (model: Model, message: Message) => UpdateReturn;
175
+ /** Programmatically opens the date picker, updating the model and returning
176
+ * focus and popover commands. Use this in domain-event handlers. */
177
+ export declare const open: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
178
+ /** Programmatically closes the date picker. Use this in domain-event handlers. */
179
+ export declare const close: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
180
+ /** Programmatically selects a date, committing it and closing the popover. */
181
+ export declare const selectDate: (model: Model, date: CalendarDate) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
182
+ /** Programmatically clears the selected date. */
183
+ export declare const clear: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
184
+ /** Configuration for rendering a date picker with `view`. */
185
+ export type ViewConfig<ParentMessage> = Readonly<{
186
+ model: Model;
187
+ toParentMessage: (message: Message) => ParentMessage;
188
+ /** Optional controlled-mode callback invoked when the user commits a date.
189
+ * When provided, the view dispatches this directly (parent owns the event).
190
+ * When omitted, DatePicker manages its own selection state. In controlled
191
+ * mode, use `DatePicker.selectDate(model, date)` to write the selection
192
+ * back into the date picker's internal state. */
193
+ onSelectedDate?: (date: CalendarDate) => ParentMessage;
194
+ anchor: AnchorConfig;
195
+ /** Renders the trigger button's content (typically the formatted selected
196
+ * date or a placeholder). Receives the current selection. */
197
+ triggerContent: (maybeDate: Option.Option<CalendarDate>) => Html;
198
+ /** Renders the calendar grid layout inside the popover panel. Mirrors
199
+ * `Calendar.ViewConfig['toView']` — the consumer lays out the attribute
200
+ * groups exactly as they would for an inline calendar. */
201
+ toCalendarView: (attributes: UiCalendar.CalendarAttributes<ParentMessage>) => Html;
202
+ isDisabled?: boolean;
203
+ /** Name for the hidden form input. When provided, a hidden `<input>` is
204
+ * rendered alongside the trigger so native form submission captures the
205
+ * selected date as an ISO string (`YYYY-MM-DD`). */
206
+ name?: string;
207
+ className?: string;
208
+ attributes?: ReadonlyArray<Attribute<ParentMessage>>;
209
+ triggerClassName?: string;
210
+ triggerAttributes?: ReadonlyArray<Attribute<ParentMessage>>;
211
+ panelClassName?: string;
212
+ panelAttributes?: ReadonlyArray<Attribute<ParentMessage>>;
213
+ backdropClassName?: string;
214
+ backdropAttributes?: ReadonlyArray<Attribute<ParentMessage>>;
215
+ }>;
216
+ /** Renders an accessible date picker: a trigger button that opens a popover
217
+ * containing an accessible calendar grid. The date picker assembles the
218
+ * embedded Calendar and Popover components into one flat API — consumers
219
+ * provide the trigger face and the calendar grid layout, DatePicker handles
220
+ * focus choreography, open/close state, and form submission. */
221
+ export declare const view: <ParentMessage>(config: ViewConfig<ParentMessage>) => Html;
222
+ /** Creates a memoized date picker view. Static config is captured in a closure;
223
+ * only `model` and `toParentMessage` are compared per render via `createLazy`. */
224
+ export declare const lazy: <ParentMessage>(staticConfig: Omit<ViewConfig<ParentMessage>, "model" | "toParentMessage">) => ((model: Model, toParentMessage: ViewConfig<ParentMessage>["toParentMessage"]) => Html);
225
+ export {};
226
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/datePicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,MAAM,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAEhE,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,OAAO,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAoB,MAAM,YAAY,CAAA;AAGxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,KAAK,UAAU,MAAM,aAAa,CAAA;AAKzC;;mDAEmD;AACnD,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKhB,CAAA;AACF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK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endar from '../../calendar';
3
+ import * as Command from '../../command';
4
+ import { createLazy, html } from '../../html';
5
+ import { m } from '../../message';
6
+ import { evo } from '../../struct';
7
+ import * as UiCalendar from '../calendar';
8
+ import * as Popover from '../popover';
9
+ // MODEL
10
+ /** Schema for the date picker component's state. Holds the selected date,
11
+ * the embedded Calendar submodel (the visible grid), and the embedded Popover
12
+ * submodel (the open/close + transition layer). */
13
+ export const Model = S.Struct({
14
+ id: S.String,
15
+ maybeSelectedDate: S.OptionFromSelf(Calendar.CalendarDate),
16
+ calendar: UiCalendar.Model,
17
+ popover: Popover.Model,
18
+ });
19
+ // MESSAGE
20
+ /** Wraps a Calendar submodel message for delegation. */
21
+ export const GotCalendarMessage = m('GotCalendarMessage', {
22
+ message: UiCalendar.Message,
23
+ });
24
+ /** Wraps a Popover submodel message for delegation. */
25
+ export const GotPopoverMessage = m('GotPopoverMessage', {
26
+ message: Popover.Message,
27
+ });
28
+ /** Sent when the user commits a date via click or keyboard. Updates the
29
+ * selected date, syncs the calendar, and closes the popover. */
30
+ export const SelectedDate = m('SelectedDate', { date: Calendar.CalendarDate });
31
+ /** Sent when the user clears the selected date. Does not close the popover. */
32
+ export const Cleared = m('Cleared');
33
+ /** Sent when the popover should open. Triggers focus-grid on the embedded
34
+ * Calendar so keyboard focus lands inside the grid instead of the panel. */
35
+ export const Opened = m('Opened');
36
+ /** Sent when the popover should close. Delegates to Popover which returns
37
+ * focus to the trigger button. */
38
+ export const Closed = m('Closed');
39
+ /** Union of all messages the date picker component can produce. */
40
+ export const Message = S.Union(GotCalendarMessage, GotPopoverMessage, SelectedDate, Cleared, Opened, Closed);
41
+ // OUT MESSAGE
42
+ /** Emitted when the visible month changes (propagated from the embedded
43
+ * Calendar). Useful for month-scoped data loading. */
44
+ export const ChangedViewMonth = m('ChangedViewMonth', {
45
+ year: S.Int,
46
+ month: S.Int,
47
+ });
48
+ /** The date picker's OutMessage. Matches Calendar — only `ChangedViewMonth`.
49
+ * Date selection goes through the `onSelectedDate` ViewConfig callback, not
50
+ * OutMessage. */
51
+ export const OutMessage = ChangedViewMonth;
52
+ /** Creates an initial date picker model from a config. The calendar and
53
+ * popover submodels are created with derived ids so their DOM elements stay
54
+ * addressable. The popover is opened in `contentFocus` mode so focus lands on
55
+ * the calendar grid instead of the panel. */
56
+ export const init = (config) => ({
57
+ id: config.id,
58
+ maybeSelectedDate: Option.fromNullable(config.initialSelectedDate),
59
+ calendar: UiCalendar.init({
60
+ id: `${config.id}-calendar`,
61
+ today: config.today,
62
+ ...(config.initialSelectedDate !== undefined && {
63
+ initialSelectedDate: config.initialSelectedDate,
64
+ }),
65
+ ...(config.locale !== undefined && { locale: config.locale }),
66
+ ...(config.minDate !== undefined && { minDate: config.minDate }),
67
+ ...(config.maxDate !== undefined && { maxDate: config.maxDate }),
68
+ ...(config.disabledDaysOfWeek !== undefined && {
69
+ disabledDaysOfWeek: config.disabledDaysOfWeek,
70
+ }),
71
+ ...(config.disabledDates !== undefined && {
72
+ disabledDates: config.disabledDates,
73
+ }),
74
+ }),
75
+ popover: Popover.init({
76
+ id: `${config.id}-popover`,
77
+ contentFocus: true,
78
+ ...(config.isAnimated !== undefined && { isAnimated: config.isAnimated }),
79
+ }),
80
+ });
81
+ const withUpdateReturn = M.withReturnType();
82
+ const mapCalendarCommands = (commands) => commands.map(Command.mapEffect(Effect.map(message => GotCalendarMessage({ message }))));
83
+ const mapPopoverCommands = (commands) => commands.map(Command.mapEffect(Effect.map(message => GotPopoverMessage({ message }))));
84
+ const mapCalendarOutMessage = (maybeOutMessage) => Option.map(maybeOutMessage, M.type().pipe(M.tagsExhaustive({
85
+ ChangedViewMonth: ({ year, month }) => ChangedViewMonth({ year, month }),
86
+ })));
87
+ const delegateToCalendar = (model, calendarMessage) => {
88
+ const [nextCalendar, calendarCommands, maybeCalendarOutMessage] = UiCalendar.update(model.calendar, calendarMessage);
89
+ return [
90
+ evo(model, { calendar: () => nextCalendar }),
91
+ mapCalendarCommands(calendarCommands),
92
+ mapCalendarOutMessage(maybeCalendarOutMessage),
93
+ ];
94
+ };
95
+ const delegateToPopover = (model, popoverMessage) => {
96
+ const [nextPopover, popoverCommands] = Popover.update(model.popover, popoverMessage);
97
+ return [
98
+ evo(model, { popover: () => nextPopover }),
99
+ mapPopoverCommands(popoverCommands),
100
+ Option.none(),
101
+ ];
102
+ };
103
+ /** Processes a date picker message and returns the next model, commands, and
104
+ * optional OutMessage. */
105
+ export const update = (model, message) => M.value(message).pipe(withUpdateReturn, M.tagsExhaustive({
106
+ GotCalendarMessage: ({ message: calendarMessage }) => delegateToCalendar(model, calendarMessage),
107
+ GotPopoverMessage: ({ message: popoverMessage }) => delegateToPopover(model, popoverMessage),
108
+ Opened: () => {
109
+ const [nextPopover, popoverCommands] = Popover.open(model.popover);
110
+ return [
111
+ evo(model, { popover: () => nextPopover }),
112
+ mapPopoverCommands(popoverCommands),
113
+ Option.none(),
114
+ ];
115
+ },
116
+ Closed: () => {
117
+ const [nextPopover, popoverCommands] = Popover.close(model.popover);
118
+ return [
119
+ evo(model, { popover: () => nextPopover }),
120
+ mapPopoverCommands(popoverCommands),
121
+ Option.none(),
122
+ ];
123
+ },
124
+ SelectedDate: ({ date }) => {
125
+ const [nextCalendar, calendarCommands] = UiCalendar.selectDate(model.calendar, date);
126
+ const [nextPopover, popoverCommands] = Popover.close(model.popover);
127
+ return [
128
+ evo(model, {
129
+ maybeSelectedDate: () => Option.some(date),
130
+ calendar: () => nextCalendar,
131
+ popover: () => nextPopover,
132
+ }),
133
+ [
134
+ ...mapCalendarCommands(calendarCommands),
135
+ ...mapPopoverCommands(popoverCommands),
136
+ ],
137
+ Option.none(),
138
+ ];
139
+ },
140
+ Cleared: () => [
141
+ evo(model, { maybeSelectedDate: () => Option.none() }),
142
+ [],
143
+ Option.none(),
144
+ ],
145
+ }));
146
+ /** Programmatically opens the date picker, updating the model and returning
147
+ * focus and popover commands. Use this in domain-event handlers. */
148
+ export const open = (model) => {
149
+ const [nextModel, commands] = toModelAndCommands(update(model, Opened()));
150
+ return [nextModel, commands];
151
+ };
152
+ /** Programmatically closes the date picker. Use this in domain-event handlers. */
153
+ export const close = (model) => {
154
+ const [nextModel, commands] = toModelAndCommands(update(model, Closed()));
155
+ return [nextModel, commands];
156
+ };
157
+ /** Programmatically selects a date, committing it and closing the popover. */
158
+ export const selectDate = (model, date) => {
159
+ const [nextModel, commands] = toModelAndCommands(update(model, SelectedDate({ date })));
160
+ return [nextModel, commands];
161
+ };
162
+ /** Programmatically clears the selected date. */
163
+ export const clear = (model) => {
164
+ const [nextModel, commands] = toModelAndCommands(update(model, Cleared()));
165
+ return [nextModel, commands];
166
+ };
167
+ const toModelAndCommands = (result) => {
168
+ const [nextModel, commands] = result;
169
+ return [nextModel, commands];
170
+ };
171
+ // VIEW
172
+ const encodeIsoDate = S.encodeSync(Calendar.CalendarDateFromIsoString);
173
+ /** Renders an accessible date picker: a trigger button that opens a popover
174
+ * containing an accessible calendar grid. The date picker assembles the
175
+ * embedded Calendar and Popover components into one flat API — consumers
176
+ * provide the trigger face and the calendar grid layout, DatePicker handles
177
+ * focus choreography, open/close state, and form submission. */
178
+ export const view = (config) => {
179
+ const { Class, Name, Type, Value, div, input } = html();
180
+ const { model, toParentMessage, onSelectedDate, anchor, triggerContent, toCalendarView, isDisabled, name, className, attributes = [], triggerClassName, triggerAttributes = [], panelClassName, panelAttributes = [], backdropClassName, backdropAttributes = [], } = config;
181
+ const dispatchSelectedDate = (date) => onSelectedDate !== undefined
182
+ ? onSelectedDate(date)
183
+ : toParentMessage(SelectedDate({ date }));
184
+ const calendarVNode = UiCalendar.view({
185
+ model: model.calendar,
186
+ toParentMessage: message => toParentMessage(GotCalendarMessage({ message })),
187
+ onSelectedDate: dispatchSelectedDate,
188
+ toView: toCalendarView,
189
+ });
190
+ const popoverVNode = Popover.view({
191
+ model: model.popover,
192
+ toParentMessage: message => toParentMessage(GotPopoverMessage({ message })),
193
+ onOpened: () => toParentMessage(Opened()),
194
+ onClosed: () => toParentMessage(Closed()),
195
+ anchor,
196
+ buttonContent: triggerContent(model.maybeSelectedDate),
197
+ panelContent: calendarVNode,
198
+ focusSelector: `#${model.calendar.id}-grid`,
199
+ ...(isDisabled !== undefined && { isDisabled }),
200
+ ...(triggerClassName !== undefined && {
201
+ buttonClassName: triggerClassName,
202
+ }),
203
+ buttonAttributes: triggerAttributes,
204
+ ...(panelClassName !== undefined && { panelClassName }),
205
+ panelAttributes,
206
+ ...(backdropClassName !== undefined && { backdropClassName }),
207
+ backdropAttributes,
208
+ });
209
+ const hiddenInputValue = Option.match(model.maybeSelectedDate, {
210
+ onNone: () => '',
211
+ onSome: encodeIsoDate,
212
+ });
213
+ const maybeHiddenInput = name !== undefined
214
+ ? [input([Type('hidden'), Name(name), Value(hiddenInputValue)])]
215
+ : [];
216
+ const wrapperAttributes = [
217
+ ...(className !== undefined ? [Class(className)] : []),
218
+ ...attributes,
219
+ ];
220
+ return div(wrapperAttributes, [popoverVNode, ...maybeHiddenInput]);
221
+ };
222
+ /** Creates a memoized date picker view. Static config is captured in a closure;
223
+ * only `model` and `toParentMessage` are compared per render via `createLazy`. */
224
+ export const lazy = (staticConfig) => {
225
+ const lazyView = createLazy();
226
+ return (model, toParentMessage) => lazyView((currentModel, currentToMessage) => view({
227
+ ...staticConfig,
228
+ model: currentModel,
229
+ toParentMessage: currentToMessage,
230
+ }), [model, toParentMessage]);
231
+ };
@@ -0,0 +1,3 @@
1
+ export { init, update, view, lazy, open, close, selectDate, clear, Model, Message, OutMessage, GotCalendarMessage, GotPopoverMessage, SelectedDate, Cleared, Opened, Closed, ChangedViewMonth, } from './index';
2
+ export type { InitConfig, ViewConfig } from './index';
3
+ //# sourceMappingURL=public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/datePicker/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,UAAU,EACV,KAAK,EACL,KAAK,EACL,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,OAAO,EACP,MAAM,EACN,MAAM,EACN,gBAAgB,GACjB,MAAM,SAAS,CAAA;AAEhB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1 @@
1
+ export { init, update, view, lazy, open, close, selectDate, clear, Model, Message, OutMessage, GotCalendarMessage, GotPopoverMessage, SelectedDate, Cleared, Opened, Closed, ChangedViewMonth, } from './index';
@@ -236,7 +236,7 @@ export declare const subscriptions: import("../../runtime/subscription").Subscri
236
236
  readonly _tag: "ConfirmedKeyboardDrop";
237
237
  } | {
238
238
  readonly _tag: "PressedArrowKey";
239
- readonly direction: "Left" | "Right" | "Up" | "Down" | "NextContainer" | "PreviousContainer";
239
+ readonly direction: "Right" | "Left" | "Up" | "Down" | "NextContainer" | "PreviousContainer";
240
240
  } | {
241
241
  readonly _tag: "CompletedAutoScroll";
242
242
  } | {
@@ -1,4 +1,6 @@
1
1
  export * as Button from './button/public';
2
+ export * as Calendar from './calendar/public';
3
+ export * as DatePicker from './datePicker/public';
2
4
  export * as Checkbox from './checkbox/public';
3
5
  export * as Combobox from './combobox/public';
4
6
  export * as Dialog from './dialog/public';
@@ -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,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,KAA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AO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,IAAI,MAAM,eAAe,CAAA;AACrC,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAA"}
package/dist/ui/index.js CHANGED
@@ -1,4 +1,6 @@
1
1
  export * as Button from './button/public';
2
+ export * as Calendar from './calendar/public';
3
+ export * as DatePicker from './datePicker/public';
2
4
  export * as Checkbox from './checkbox/public';
3
5
  export * as Combobox from './combobox/public';
4
6
  export * as Dialog from './dialog/public';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,eAAe,CAAA;AAExC,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAoB,MAAM,YAAY,CAAA;AAKxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAe1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAIpD,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,oCAAmC,CAAA;AACjE,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAA;AAQ7D,iIAAiI;AACjI,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;EAehB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,mJAAmJ;AACnJ,eAAO,MAAM,MAAM;;EAEjB,CAAA;AACF,kEAAkE;AAClE,eAAO,MAAM,MAAM,2DAAc,CAAA;AACjC,2EAA2E;AAC3E,eAAO,MAAM,WAAW,gEAAmB,CAAA;AAC3C,mGAAmG;AACnG,eAAO,MAAM,aAAa;;;EAGxB,CAAA;AACF,kDAAkD;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AAM,IAAI,GAAI,OAAO,EAAE,IAAI,SAAS,MAAM,EAC/C,cAAc,IAAI,CAChB,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,EACzB,OAAO,GAAG,iBAAiB,GAAG,gBAAgB,CAC/C,KACA,CAAC,CACF,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,iBAAiB,CAAC,KAC1D,IAAI,CAgBR,CAAA"}
@@ -198,12 +198,8 @@ export const update = (model, message) => {
198
198
  itemsSelector(model.id),
199
199
  ]).pipe(Effect.as(CompletedSetupInert()))));
200
200
  const maybeRestoreInert = OptionExt.when(model.isModal, RestoreInert(Task.restoreInert(model.id).pipe(Effect.as(CompletedTeardownInert()))));
201
- const focusItems = FocusItems(Task.focus(itemsSelector(model.id)).pipe(Effect.ignore, Effect.as(CompletedFocusItems())));
202
201
  const focusButton = FocusButton(Task.focus(buttonSelector(model.id)).pipe(Effect.ignore, Effect.as(CompletedFocusButton())));
203
- const openCommands = [
204
- focusItems,
205
- ...Array.getSomes([maybeLockScroll, maybeInertOthers]),
206
- ];
202
+ const openCommands = Array.getSomes([maybeLockScroll, maybeInertOthers]);
207
203
  const closeWithFocusCommands = [
208
204
  focusButton,
209
205
  ...Array.getSomes([maybeUnlockScroll, maybeRestoreInert]),
@@ -8,6 +8,7 @@ export declare const Model: S.Struct<{
8
8
  isOpen: typeof S.Boolean;
9
9
  isAnimated: typeof S.Boolean;
10
10
  isModal: typeof S.Boolean;
11
+ contentFocus: typeof S.Boolean;
11
12
  transition: S.Struct<{
12
13
  id: typeof S.String;
13
14
  isShowing: typeof S.Boolean;
@@ -70,11 +71,12 @@ export type PressedPointerOnButton = typeof PressedPointerOnButton.Type;
70
71
  export type IgnoredMouseClick = typeof IgnoredMouseClick.Type;
71
72
  export type SuppressedSpaceScroll = typeof SuppressedSpaceScroll.Type;
72
73
  export type Message = typeof Message.Type;
73
- /** Configuration for creating a popover model with `init`. `isAnimated` enables CSS transition coordination (default `false`). `isModal` locks page scroll and inerts other elements when open (default `false`). */
74
+ /** Configuration for creating a popover model with `init`. `isAnimated` enables CSS transition coordination (default `false`). `isModal` locks page scroll and inerts other elements when open (default `false`). `contentFocus` hands focus ownership to the consumer — the panel is not focusable and does not close on blur, so the consumer must focus a descendant on open and close the popover on its own blur rules (default `false`). */
74
75
  export type InitConfig = Readonly<{
75
76
  id: string;
76
77
  isAnimated?: boolean;
77
78
  isModal?: boolean;
79
+ contentFocus?: boolean;
78
80
  }>;
79
81
  /** Creates an initial popover model from a config. Defaults to closed. */
80
82
  export declare const init: (config: InitConfig) => Model;
@@ -140,6 +142,7 @@ export type ViewConfig<Message> = Readonly<{
140
142
  backdropClassName?: string;
141
143
  backdropAttributes?: ReadonlyArray<Attribute<Message>>;
142
144
  isDisabled?: boolean;
145
+ focusSelector?: string;
143
146
  className?: string;
144
147
  attributes?: ReadonlyArray<Attribute<Message>>;
145
148
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/popover/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE9E,OAAO,KAAK,OAAO,MAAM,eAAe,CAAA;AAExC,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAoB,MAAM,YAAY,CAAA;AAKxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAiB7C,sGAAsG;AACtG,eAAO,MAAM,KAAK;;;;;;;;;;;EAOhB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,2EAA2E;AAC3E,eAAO,MAAM,MAAM,2DAAc,CAAA;AACjC,kGAAkG;AAClG,eAAO,MAAM,MAAM,2DAAc,CAAA;AACjC,iGAAiG;AACjG,eAAO,MAAM,WAAW,gEAAmB,CAAA;AAC3C,qHAAqH;AACrH,eAAO,M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