foldkit 0.62.0 → 0.63.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/ui/calendar/index.d.ts +17 -0
- package/dist/ui/calendar/index.d.ts.map +1 -1
- package/dist/ui/calendar/index.js +17 -0
- package/dist/ui/calendar/public.d.ts +1 -1
- package/dist/ui/calendar/public.d.ts.map +1 -1
- package/dist/ui/calendar/public.js +1 -1
- package/dist/ui/combobox/multi.d.ts +17 -11
- package/dist/ui/combobox/multi.d.ts.map +1 -1
- package/dist/ui/combobox/multi.js +8 -2
- package/dist/ui/combobox/multiPublic.d.ts +1 -1
- package/dist/ui/combobox/multiPublic.d.ts.map +1 -1
- package/dist/ui/combobox/multiPublic.js +1 -1
- package/dist/ui/combobox/public.d.ts +1 -1
- package/dist/ui/combobox/public.d.ts.map +1 -1
- package/dist/ui/combobox/public.js +1 -1
- package/dist/ui/combobox/single.d.ts +8 -2
- package/dist/ui/combobox/single.d.ts.map +1 -1
- package/dist/ui/combobox/single.js +7 -1
- package/dist/ui/datePicker/index.d.ts +20 -0
- package/dist/ui/datePicker/index.d.ts.map +1 -1
- package/dist/ui/datePicker/index.js +28 -0
- package/dist/ui/datePicker/public.d.ts +1 -1
- package/dist/ui/datePicker/public.d.ts.map +1 -1
- package/dist/ui/datePicker/public.js +1 -1
- package/dist/ui/dialog/index.d.ts +3 -0
- package/dist/ui/dialog/index.d.ts.map +1 -1
- package/dist/ui/dialog/index.js +3 -0
- package/dist/ui/dialog/public.d.ts +1 -1
- package/dist/ui/dialog/public.d.ts.map +1 -1
- package/dist/ui/dialog/public.js +1 -1
- package/dist/ui/disclosure/index.d.ts +3 -0
- package/dist/ui/disclosure/index.d.ts.map +1 -1
- package/dist/ui/disclosure/index.js +3 -0
- package/dist/ui/disclosure/public.d.ts +1 -1
- package/dist/ui/disclosure/public.d.ts.map +1 -1
- package/dist/ui/disclosure/public.js +1 -1
- package/dist/ui/listbox/multi.d.ts +8 -2
- package/dist/ui/listbox/multi.d.ts.map +1 -1
- package/dist/ui/listbox/multi.js +7 -1
- package/dist/ui/listbox/multiPublic.d.ts +1 -1
- package/dist/ui/listbox/multiPublic.d.ts.map +1 -1
- package/dist/ui/listbox/multiPublic.js +1 -1
- package/dist/ui/listbox/public.d.ts +1 -1
- package/dist/ui/listbox/public.d.ts.map +1 -1
- package/dist/ui/listbox/public.js +1 -1
- package/dist/ui/listbox/single.d.ts +8 -2
- package/dist/ui/listbox/single.d.ts.map +1 -1
- package/dist/ui/listbox/single.js +7 -1
- package/dist/ui/menu/index.d.ts +6 -0
- package/dist/ui/menu/index.d.ts.map +1 -1
- package/dist/ui/menu/index.js +6 -0
- package/dist/ui/menu/public.d.ts +1 -1
- package/dist/ui/menu/public.d.ts.map +1 -1
- package/dist/ui/menu/public.js +1 -1
- package/package.json +1 -1
|
@@ -166,6 +166,23 @@ export declare const focusGrid: (modelId: string) => Command.Command<Message>;
|
|
|
166
166
|
*
|
|
167
167
|
* Equivalent to dispatching `ClickedDay({ date })` through `update`. */
|
|
168
168
|
export declare const selectDate: (model: Model, date: CalendarDate) => UpdateReturn;
|
|
169
|
+
/** Sets the minimum selectable date. Pass `Option.none()` to remove the
|
|
170
|
+
* minimum. Use this when the minimum derives from other Model state (e.g. a
|
|
171
|
+
* start date field whose current selection constrains an end date picker).
|
|
172
|
+
*
|
|
173
|
+
* Does NOT reconcile the current selection — if a previously-selected date
|
|
174
|
+
* is now below the new minimum, it remains selected. Callers should clear or
|
|
175
|
+
* reassign the selection explicitly if their domain requires it. */
|
|
176
|
+
export declare const setMinDate: (model: Model, maybeMinDate: Option.Option<CalendarDate>) => Model;
|
|
177
|
+
/** Sets the maximum selectable date. Pass `Option.none()` to remove the
|
|
178
|
+
* maximum. Does NOT reconcile the current selection. */
|
|
179
|
+
export declare const setMaxDate: (model: Model, maybeMaxDate: Option.Option<CalendarDate>) => Model;
|
|
180
|
+
/** Sets the list of individually-disabled dates. Pass an empty array to
|
|
181
|
+
* clear. Does NOT reconcile the current selection. */
|
|
182
|
+
export declare const setDisabledDates: (model: Model, disabledDates: ReadonlyArray<CalendarDate>) => Model;
|
|
183
|
+
/** Sets the days of the week that are disabled (e.g. weekends). Pass an
|
|
184
|
+
* empty array to clear. Does NOT reconcile the current selection. */
|
|
185
|
+
export declare const setDisabledDaysOfWeek: (model: Model, disabledDaysOfWeek: ReadonlyArray<Calendar.DayOfWeek>) => Model;
|
|
169
186
|
/** Processes a calendar message and returns the next model, commands, and
|
|
170
187
|
* optional OutMessage. */
|
|
171
188
|
export declare const update: (model: Model, message: Message) => UpdateReturn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/calendar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,MAAM,EAAE,MAAM,IAAI,CAAC,EAAQ,MAAM,QAAQ,CAAA;AAE7E,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,OAAO,MAAM,eAAe,CAAA;AAExC,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAoB,MAAM,YAAY,CAAA;AAOxE;;0DAE0D;AAC1D,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAahB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,wDAAwD;AACxD,eAAO,MAAM,UAAU;;;;;;EAAmD,CAAA;AAC1E;kDACkD;AAClD,eAAO,MAAM,gBAAgB;;;EAG3B,CAAA;AACF,sEAAsE;AACtE,eAAO,MAAM,0BAA0B,+EAAkC,CAAA;AACzE,kEAAkE;AAClE,eAAO,MAAM,sBAAsB,2EAA8B,CAAA;AACjE,gEAAgE;AAChE,eAAO,MAAM,yBAAyB;;EAEpC,CAAA;AACF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AAC,CAAA;IACzD,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAA;CAC1C,CAAC,CAAA;AAEF,0DAA0D;AAC1D,MAAM,MAAM,UAAU,CAAC,aAAa,IAAI,QAAQ,CAAC;IAC/C,KAAK,EAAE,KAAK,CAAA;IACZ,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,aAAa,CAAA;IACpD,MAAM,EAAE,CAAC,UAAU,EAAE,kBAAkB,CAAC,aAAa,CAAC,KAAK,IAAI,CAAA;IAC/D;;;;;0DAKsD;IACtD,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,aAAa,CAAA;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAC,CAAA;AAeF;;iDAEiD;AACjD,eAAO,MAAM,IAAI,GAAI,aAAa,EAChC,QAAQ,UAAU,CAAC,aAAa,CAAC,KAChC,IAiPF,CAAA;AAED;mFACmF;AACnF,eAAO,MAAM,IAAI,GAAI,aAAa,EAChC,cAAc,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAC,KACzE,CAAC,CACF,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,iBAAiB,CAAC,KAC1D,IAAI,CAgBR,CAAA"}
|
|
@@ -109,6 +109,23 @@ export const focusGrid = (modelId) => FocusGrid(Task.focus(gridSelector(modelId)
|
|
|
109
109
|
*
|
|
110
110
|
* Equivalent to dispatching `ClickedDay({ date })` through `update`. */
|
|
111
111
|
export const selectDate = (model, date) => update(model, ClickedDay({ date }));
|
|
112
|
+
/** Sets the minimum selectable date. Pass `Option.none()` to remove the
|
|
113
|
+
* minimum. Use this when the minimum derives from other Model state (e.g. a
|
|
114
|
+
* start date field whose current selection constrains an end date picker).
|
|
115
|
+
*
|
|
116
|
+
* Does NOT reconcile the current selection — if a previously-selected date
|
|
117
|
+
* is now below the new minimum, it remains selected. Callers should clear or
|
|
118
|
+
* reassign the selection explicitly if their domain requires it. */
|
|
119
|
+
export const setMinDate = (model, maybeMinDate) => evo(model, { maybeMinDate: () => maybeMinDate });
|
|
120
|
+
/** Sets the maximum selectable date. Pass `Option.none()` to remove the
|
|
121
|
+
* maximum. Does NOT reconcile the current selection. */
|
|
122
|
+
export const setMaxDate = (model, maybeMaxDate) => evo(model, { maybeMaxDate: () => maybeMaxDate });
|
|
123
|
+
/** Sets the list of individually-disabled dates. Pass an empty array to
|
|
124
|
+
* clear. Does NOT reconcile the current selection. */
|
|
125
|
+
export const setDisabledDates = (model, disabledDates) => evo(model, { disabledDates: () => disabledDates });
|
|
126
|
+
/** Sets the days of the week that are disabled (e.g. weekends). Pass an
|
|
127
|
+
* empty array to clear. Does NOT reconcile the current selection. */
|
|
128
|
+
export const setDisabledDaysOfWeek = (model, disabledDaysOfWeek) => evo(model, { disabledDaysOfWeek: () => disabledDaysOfWeek });
|
|
112
129
|
const DAY_SKIP_CAP = 31;
|
|
113
130
|
const MONTH_SKIP_CAP = 12;
|
|
114
131
|
const isDateDisabled = (model, date) => {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { init, update, view, lazy, focusGrid, selectDate, Model, Message, OutMessage, ChangedViewMonth, ClickedDay, PressedKeyOnGrid, ClickedPreviousMonthButton, ClickedNextMonthButton, SelectedMonthFromDropdown, SelectedYearFromDropdown, FocusedGrid, BlurredGrid, RefreshedToday, CompletedFocusGrid, FocusGrid, } from './index';
|
|
1
|
+
export { init, update, view, lazy, focusGrid, selectDate, setMinDate, setMaxDate, setDisabledDates, setDisabledDaysOfWeek, Model, Message, OutMessage, ChangedViewMonth, ClickedDay, PressedKeyOnGrid, ClickedPreviousMonthButton, ClickedNextMonthButton, SelectedMonthFromDropdown, SelectedYearFromDropdown, FocusedGrid, BlurredGrid, RefreshedToday, CompletedFocusGrid, FocusGrid, } from './index';
|
|
2
2
|
export type { InitConfig, ViewConfig, CalendarAttributes, DayCell, ColumnHeader, Week, } from './index';
|
|
3
3
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/calendar/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,UAAU,EACV,KAAK,EACL,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,WAAW,EACX,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,SAAS,GACV,MAAM,SAAS,CAAA;AAEhB,YAAY,EACV,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,OAAO,EACP,YAAY,EACZ,IAAI,GACL,MAAM,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/calendar/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,EACL,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,WAAW,EACX,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,SAAS,GACV,MAAM,SAAS,CAAA;AAEhB,YAAY,EACV,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,OAAO,EACP,YAAY,EACZ,IAAI,GACL,MAAM,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { init, update, view, lazy, focusGrid, selectDate, Model, Message, OutMessage, ChangedViewMonth, ClickedDay, PressedKeyOnGrid, ClickedPreviousMonthButton, ClickedNextMonthButton, SelectedMonthFromDropdown, SelectedYearFromDropdown, FocusedGrid, BlurredGrid, RefreshedToday, CompletedFocusGrid, FocusGrid, } from './index';
|
|
1
|
+
export { init, update, view, lazy, focusGrid, selectDate, setMinDate, setMaxDate, setDisabledDates, setDisabledDaysOfWeek, Model, Message, OutMessage, ChangedViewMonth, ClickedDay, PressedKeyOnGrid, ClickedPreviousMonthButton, ClickedNextMonthButton, SelectedMonthFromDropdown, SelectedYearFromDropdown, FocusedGrid, BlurredGrid, RefreshedToday, CompletedFocusGrid, FocusGrid, } from './index';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Schema as S } from 'effect';
|
|
1
|
+
import { Option, Schema as S } from 'effect';
|
|
2
2
|
import type * as Command from '../../command';
|
|
3
3
|
import { type Html } from '../../html';
|
|
4
|
-
import { type BaseInitConfig, type BaseViewConfig, type Message, SelectedItem } from './shared';
|
|
4
|
+
import { type BaseInitConfig, type BaseViewConfig, Closed, type Message, Opened, SelectedItem } from './shared';
|
|
5
5
|
/** Schema for the multi-select combobox component's state, tracking open/closed status, active item, input value, and selected items. */
|
|
6
6
|
export declare const Model: S.extend<S.Struct<{
|
|
7
7
|
id: typeof S.String;
|
|
@@ -44,9 +44,9 @@ export declare const update: (model: {
|
|
|
44
44
|
readonly isShowing: boolean;
|
|
45
45
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
46
46
|
};
|
|
47
|
-
readonly maybeActiveItemIndex:
|
|
47
|
+
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
48
48
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
49
|
-
readonly maybeLastPointerPosition:
|
|
49
|
+
readonly maybeLastPointerPosition: Option.Option<{
|
|
50
50
|
readonly screenX: number;
|
|
51
51
|
readonly screenY: number;
|
|
52
52
|
}>;
|
|
@@ -66,9 +66,9 @@ export declare const update: (model: {
|
|
|
66
66
|
readonly isShowing: boolean;
|
|
67
67
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
68
68
|
};
|
|
69
|
-
readonly maybeActiveItemIndex:
|
|
69
|
+
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
70
70
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
71
|
-
readonly maybeLastPointerPosition:
|
|
71
|
+
readonly maybeLastPointerPosition: Option.Option<{
|
|
72
72
|
readonly screenX: number;
|
|
73
73
|
readonly screenY: number;
|
|
74
74
|
}>;
|
|
@@ -100,12 +100,12 @@ export declare const update: (model: {
|
|
|
100
100
|
readonly _tag: "CompletedClickItem";
|
|
101
101
|
} | {
|
|
102
102
|
readonly _tag: "Opened";
|
|
103
|
-
readonly maybeActiveItemIndex:
|
|
103
|
+
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
104
104
|
} | {
|
|
105
105
|
readonly _tag: "ActivatedItem";
|
|
106
106
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
107
107
|
readonly index: number;
|
|
108
|
-
readonly maybeImmediateSelection:
|
|
108
|
+
readonly maybeImmediateSelection: Option.Option<{
|
|
109
109
|
readonly item: string;
|
|
110
110
|
readonly displayText: string;
|
|
111
111
|
}>;
|
|
@@ -141,6 +141,12 @@ export declare const update: (model: {
|
|
|
141
141
|
readonly _tag: "PressedToggleButton";
|
|
142
142
|
}, never, never>;
|
|
143
143
|
}>[]];
|
|
144
|
+
/** Programmatically opens the combobox, updating the model and returning
|
|
145
|
+
* focus and modal commands. Use this in domain-event handlers to open the combobox. */
|
|
146
|
+
export declare const open: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
147
|
+
/** Programmatically closes the combobox, updating the model and returning
|
|
148
|
+
* focus and modal commands. Use this in domain-event handlers to close the combobox. */
|
|
149
|
+
export declare const close: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
144
150
|
/** Programmatically toggles an item in the multi-select combobox. Use this in domain-event handlers when the combobox uses `onSelectedItem`. */
|
|
145
151
|
export declare const selectItem: (model: Model, item: string) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
146
152
|
/** Configuration for rendering a multi-select combobox with `view`. */
|
|
@@ -157,9 +163,9 @@ export declare const view: <Message, Item extends string>(config: Readonly<{
|
|
|
157
163
|
readonly isShowing: boolean;
|
|
158
164
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
159
165
|
};
|
|
160
|
-
readonly maybeActiveItemIndex:
|
|
166
|
+
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
161
167
|
readonly activationTrigger: "Pointer" | "Keyboard";
|
|
162
|
-
readonly maybeLastPointerPosition:
|
|
168
|
+
readonly maybeLastPointerPosition: Option.Option<{
|
|
163
169
|
readonly screenX: number;
|
|
164
170
|
readonly screenY: number;
|
|
165
171
|
}>;
|
|
@@ -170,7 +176,7 @@ export declare const view: <Message, Item extends string>(config: Readonly<{
|
|
|
170
176
|
} & {
|
|
171
177
|
readonly selectedItems: readonly string[];
|
|
172
178
|
};
|
|
173
|
-
toParentMessage: (message:
|
|
179
|
+
toParentMessage: (message: Opened | Closed | import("./shared").ClosedByTab | import("./shared").ActivatedItem | import("./shared").DeactivatedItem | SelectedItem | import("./shared").MovedPointerOverItem | import("./shared").RequestedItemClick | import("./shared").UpdatedInputValue | import("./shared").PressedToggleButton) => Message;
|
|
174
180
|
onSelectedItem?: (value: string) => Message;
|
|
175
181
|
items: readonly Item[];
|
|
176
182
|
itemToConfig: (item: Item, context: Readonly<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi.d.ts","sourceRoot":"","sources":["../../../src/ui/combobox/multi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,IAAI,CAAC,EAAE,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AAC,CAClC,CAAA;AAEzB,gJAAgJ;AAChJ,eAAO,MAAM,UAAU,GACrB,OAAO,KAAK,EACZ,MAAM,MAAM,KACX,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CACD,CAAA;AAI1D,uEAAuE;AACvE,MAAM,MAAM,UAAU,CAAC,OAAO,EAAE,IAAI,SAAS,MAAM,IAAI,cAAc,CACnE,OAAO,EACP,IAAI,EACJ,KAAK,CACN,CAAA;AAED,yIAAyI;AACzI,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAIf,CAAA;AAEF;mFACmF;AACnF,eAAO,MAAM,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,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,iBAAiB,CAAC,KACrE,IAAI,CAoBR,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Array, Schema as S } from 'effect';
|
|
1
|
+
import { Array, Option, Schema as S } from 'effect';
|
|
2
2
|
import { createLazy } from '../../html';
|
|
3
3
|
import { evo } from '../../struct';
|
|
4
|
-
import { BaseModel, SelectedItem, baseInit, closedBaseModel, makeUpdate, makeView, } from './shared';
|
|
4
|
+
import { BaseModel, Closed, Opened, SelectedItem, baseInit, closedBaseModel, makeUpdate, makeView, } from './shared';
|
|
5
5
|
// MODEL
|
|
6
6
|
/** Schema for the multi-select combobox component's state, tracking open/closed status, active item, input value, and selected items. */
|
|
7
7
|
export const Model = BaseModel.pipe(S.extend(S.Struct({ selectedItems: S.Array(S.String) })));
|
|
@@ -36,6 +36,12 @@ export const update = makeUpdate({
|
|
|
36
36
|
selectedItems: () => toggleItem(model.selectedItems, item),
|
|
37
37
|
}),
|
|
38
38
|
});
|
|
39
|
+
/** Programmatically opens the combobox, updating the model and returning
|
|
40
|
+
* focus and modal commands. Use this in domain-event handlers to open the combobox. */
|
|
41
|
+
export const open = (model) => update(model, Opened({ maybeActiveItemIndex: Option.none() }));
|
|
42
|
+
/** Programmatically closes the combobox, updating the model and returning
|
|
43
|
+
* focus and modal commands. Use this in domain-event handlers to close the combobox. */
|
|
44
|
+
export const close = (model) => update(model, Closed());
|
|
39
45
|
/** Programmatically toggles an item in the multi-select combobox. Use this in domain-event handlers when the combobox uses `onSelectedItem`. */
|
|
40
46
|
export const selectItem = (model, item) => update(model, SelectedItem({ item, displayText: item }));
|
|
41
47
|
/** Renders a headless multi-select combobox with keyboard navigation, selection tracking, and aria-activedescendant focus management. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiPublic.d.ts","sourceRoot":"","sources":["../../../src/ui/combobox/multiPublic.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"multiPublic.d.ts","sourceRoot":"","sources":["../../../src/ui/combobox/multiPublic.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,KAAK,GACN,MAAM,SAAS,CAAA;AAChB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { init, update, selectItem, view, lazy, Model } from './multi';
|
|
1
|
+
export { init, update, open, close, selectItem, view, lazy, Model, } from './multi';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { init, update, selectItem, view, lazy, Model } from './single';
|
|
1
|
+
export { init, update, open, close, selectItem, view, lazy, Model, } from './single';
|
|
2
2
|
export { Message, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusInput, CompletedScrollIntoView, CompletedClickItem, GotTransitionMessage, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusInput, ScrollIntoView, ClickItem, DetectMovementOrTransitionEnd, } from './shared';
|
|
3
3
|
export type { ActivationTrigger, Opened, Closed, ClosedByTab, ActivatedItem, DeactivatedItem, MovedPointerOverItem, RequestedItemClick, UpdatedInputValue, PressedToggleButton, ItemConfig, GroupHeading, } from './shared';
|
|
4
4
|
export type { InitConfig, ViewConfig } from './single';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/combobox/public.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/combobox/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,KAAK,GACN,MAAM,UAAU,CAAA;AAEjB,OAAO,EACL,OAAO,EACP,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EACT,6BAA6B,GAC9B,MAAM,UAAU,CAAA;AAEjB,YAAY,EACV,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,WAAW,EACX,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,YAAY,GACb,MAAM,UAAU,CAAA;AAEjB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAEtD,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { init, update, selectItem, view, lazy, Model } from './single';
|
|
1
|
+
export { init, update, open, close, selectItem, view, lazy, Model, } from './single';
|
|
2
2
|
export { Message, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusInput, CompletedScrollIntoView, CompletedClickItem, GotTransitionMessage, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusInput, ScrollIntoView, ClickItem, DetectMovementOrTransitionEnd, } from './shared';
|
|
3
3
|
export * as Multi from './multiPublic';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Option, Schema as S } from 'effect';
|
|
2
2
|
import type * as Command from '../../command';
|
|
3
3
|
import { type Html } from '../../html';
|
|
4
|
-
import { type BaseInitConfig, type BaseViewConfig, type Message, SelectedItem } from './shared';
|
|
4
|
+
import { type BaseInitConfig, type BaseViewConfig, Closed, type Message, Opened, SelectedItem } from './shared';
|
|
5
5
|
/** Schema for the single-select combobox component's state, tracking open/closed status, active item, input value, selected item, and display text. */
|
|
6
6
|
export declare const Model: S.extend<S.Struct<{
|
|
7
7
|
id: typeof S.String;
|
|
@@ -145,6 +145,12 @@ export declare const update: (model: {
|
|
|
145
145
|
readonly _tag: "PressedToggleButton";
|
|
146
146
|
}, never, never>;
|
|
147
147
|
}>[]];
|
|
148
|
+
/** Programmatically opens the combobox, updating the model and returning
|
|
149
|
+
* focus and modal commands. Use this in domain-event handlers to open the combobox. */
|
|
150
|
+
export declare const open: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
151
|
+
/** Programmatically closes the combobox, updating the model and returning
|
|
152
|
+
* focus and modal commands. Use this in domain-event handlers to close the combobox. */
|
|
153
|
+
export declare const close: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
148
154
|
/** Programmatically selects an item in the single-select combobox, closing the combobox and returning
|
|
149
155
|
* focus commands. Use this in domain-event handlers when the combobox uses `onSelectedItem`. */
|
|
150
156
|
export declare const selectItem: (model: Model, item: string, displayText: string) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
@@ -176,7 +182,7 @@ export declare const view: <Message, Item extends string>(config: Readonly<{
|
|
|
176
182
|
readonly maybeSelectedItem: Option.Option<string>;
|
|
177
183
|
readonly maybeSelectedDisplayText: Option.Option<string>;
|
|
178
184
|
};
|
|
179
|
-
toParentMessage: (message:
|
|
185
|
+
toParentMessage: (message: Opened | Closed | import("./shared").ClosedByTab | import("./shared").ActivatedItem | import("./shared").DeactivatedItem | SelectedItem | import("./shared").MovedPointerOverItem | import("./shared").RequestedItemClick | import("./shared").UpdatedInputValue | import("./shared").PressedToggleButton) => Message;
|
|
180
186
|
onSelectedItem?: (value: string) => Message;
|
|
181
187
|
items: readonly Item[];
|
|
182
188
|
itemToConfig: (item: Item, context: Readonly<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single.d.ts","sourceRoot":"","sources":["../../../src/ui/combobox/single.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,IAAI,CAAC,EAAQ,MAAM,QAAQ,CAAA;AAEzD,OAAO,KAAK,KAAK,OAAO,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,YAAY,CAAA;AAElD,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,YAAY,EAKb,MAAM,UAAU,CAAA;AAIjB,uJAAuJ;AACvJ,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;GAOjB,CAAA;AAED,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,8RAA8R;AAC9R,MAAM,MAAM,UAAU,GAAG,cAAc,GACrC,QAAQ,CAAC;IACP,YAAY,CAAC,EAAE,MAA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AClB,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CACP,CAAA;AAIpD,wEAAwE;AACxE,MAAM,MAAM,UAAU,CAAC,OAAO,EAAE,IAAI,SAAS,MAAM,IAAI,cAAc,CACnE,OAAO,EACP,IAAI,EACJ,KAAK,CACN,CAAA;AAED,0IAA0I;AAC1I,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAOf,CAAA;AAEF;mFACmF;AACnF,eAAO,MAAM,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,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,iBAAiB,CAAC,KACrE,IAAI,CAoBR,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Array, Option, Schema as S, pipe } from 'effect';
|
|
2
2
|
import { createLazy } from '../../html';
|
|
3
3
|
import { evo } from '../../struct';
|
|
4
|
-
import { BaseModel, SelectedItem, baseInit, closedBaseModel, makeUpdate, makeView, } from './shared';
|
|
4
|
+
import { BaseModel, Closed, Opened, SelectedItem, baseInit, closedBaseModel, makeUpdate, makeView, } from './shared';
|
|
5
5
|
// MODEL
|
|
6
6
|
/** Schema for the single-select combobox component's state, tracking open/closed status, active item, input value, selected item, and display text. */
|
|
7
7
|
export const Model = BaseModel.pipe(S.extend(S.Struct({
|
|
@@ -52,6 +52,12 @@ export const update = makeUpdate({
|
|
|
52
52
|
maybeSelectedDisplayText: () => Option.some(displayText),
|
|
53
53
|
}),
|
|
54
54
|
});
|
|
55
|
+
/** Programmatically opens the combobox, updating the model and returning
|
|
56
|
+
* focus and modal commands. Use this in domain-event handlers to open the combobox. */
|
|
57
|
+
export const open = (model) => update(model, Opened({ maybeActiveItemIndex: Option.none() }));
|
|
58
|
+
/** Programmatically closes the combobox, updating the model and returning
|
|
59
|
+
* focus and modal commands. Use this in domain-event handlers to close the combobox. */
|
|
60
|
+
export const close = (model) => update(model, Closed());
|
|
55
61
|
/** Programmatically selects an item in the single-select combobox, closing the combobox and returning
|
|
56
62
|
* focus commands. Use this in domain-event handlers when the combobox uses `onSelectedItem`. */
|
|
57
63
|
export const selectItem = (model, item, displayText) => update(model, SelectedItem({ item, displayText }));
|
|
@@ -181,6 +181,26 @@ export declare const close: (model: Model) => readonly [Model, ReadonlyArray<Com
|
|
|
181
181
|
export declare const selectDate: (model: Model, date: CalendarDate) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
182
182
|
/** Programmatically clears the selected date. */
|
|
183
183
|
export declare const clear: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
184
|
+
/** Sets the minimum selectable date on the embedded calendar. Pass
|
|
185
|
+
* `Option.none()` to remove the minimum. Use this when the minimum derives
|
|
186
|
+
* from other Model state (e.g. a start date field whose current selection
|
|
187
|
+
* constrains an end date picker).
|
|
188
|
+
*
|
|
189
|
+
* Does NOT reconcile the current selection — if a previously-selected date
|
|
190
|
+
* is now below the new minimum, it remains selected. Callers should `clear`
|
|
191
|
+
* or reassign the selection explicitly if their domain requires it. */
|
|
192
|
+
export declare const setMinDate: (model: Model, maybeMinDate: Option.Option<CalendarDate>) => Model;
|
|
193
|
+
/** Sets the maximum selectable date on the embedded calendar. Pass
|
|
194
|
+
* `Option.none()` to remove the maximum. Does NOT reconcile the current
|
|
195
|
+
* selection. */
|
|
196
|
+
export declare const setMaxDate: (model: Model, maybeMaxDate: Option.Option<CalendarDate>) => Model;
|
|
197
|
+
/** Sets the list of individually-disabled dates on the embedded calendar.
|
|
198
|
+
* Pass an empty array to clear. Does NOT reconcile the current selection. */
|
|
199
|
+
export declare const setDisabledDates: (model: Model, disabledDates: ReadonlyArray<CalendarDate>) => Model;
|
|
200
|
+
/** Sets the days of the week that are disabled on the embedded calendar
|
|
201
|
+
* (e.g. weekends). Pass an empty array to clear. Does NOT reconcile the
|
|
202
|
+
* current selection. */
|
|
203
|
+
export declare const setDisabledDaysOfWeek: (model: Model, disabledDaysOfWeek: ReadonlyArray<Calendar.DayOfWeek>) => Model;
|
|
184
204
|
/** Configuration for rendering a date picker with `view`. */
|
|
185
205
|
export type ViewConfig<ParentMessage> = Readonly<{
|
|
186
206
|
model: Model;
|
|
@@ -1 +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,CAAC,IAAI,CAAA;AAIrC,wDAAwD;AACxD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;EAE7B,CAAA;AACF,uDAAuD;AACvD,eAAO,MAAM,iBAAiB;;;;;;;EAE5B,CAAA;AACF;gEACgE;AAChE,eAAO,MAA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AAa,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAA;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAA;IACzD,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,kBAAkB,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAA;CAC7D,CAAC,CAAA;AAEF;;;;gEAIgE;AAChE,eAAO,MAAM,IAAI,GAAI,aAAa,EAChC,QAAQ,UAAU,CAAC,aAAa,CAAC,KAChC,IAuEF,CAAA;AAED;mFACmF;AACnF,eAAO,MAAM,IAAI,GAAI,aAAa,EAChC,cAAc,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAC,KACzE,CAAC,CACF,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,iBAAiB,CAAC,KAC1D,IAAI,CAgBR,CAAA"}
|
|
@@ -164,6 +164,34 @@ export const clear = (model) => {
|
|
|
164
164
|
const [nextModel, commands] = toModelAndCommands(update(model, Cleared()));
|
|
165
165
|
return [nextModel, commands];
|
|
166
166
|
};
|
|
167
|
+
/** Sets the minimum selectable date on the embedded calendar. Pass
|
|
168
|
+
* `Option.none()` to remove the minimum. Use this when the minimum derives
|
|
169
|
+
* from other Model state (e.g. a start date field whose current selection
|
|
170
|
+
* constrains an end date picker).
|
|
171
|
+
*
|
|
172
|
+
* Does NOT reconcile the current selection — if a previously-selected date
|
|
173
|
+
* is now below the new minimum, it remains selected. Callers should `clear`
|
|
174
|
+
* or reassign the selection explicitly if their domain requires it. */
|
|
175
|
+
export const setMinDate = (model, maybeMinDate) => evo(model, {
|
|
176
|
+
calendar: () => UiCalendar.setMinDate(model.calendar, maybeMinDate),
|
|
177
|
+
});
|
|
178
|
+
/** Sets the maximum selectable date on the embedded calendar. Pass
|
|
179
|
+
* `Option.none()` to remove the maximum. Does NOT reconcile the current
|
|
180
|
+
* selection. */
|
|
181
|
+
export const setMaxDate = (model, maybeMaxDate) => evo(model, {
|
|
182
|
+
calendar: () => UiCalendar.setMaxDate(model.calendar, maybeMaxDate),
|
|
183
|
+
});
|
|
184
|
+
/** Sets the list of individually-disabled dates on the embedded calendar.
|
|
185
|
+
* Pass an empty array to clear. Does NOT reconcile the current selection. */
|
|
186
|
+
export const setDisabledDates = (model, disabledDates) => evo(model, {
|
|
187
|
+
calendar: () => UiCalendar.setDisabledDates(model.calendar, disabledDates),
|
|
188
|
+
});
|
|
189
|
+
/** Sets the days of the week that are disabled on the embedded calendar
|
|
190
|
+
* (e.g. weekends). Pass an empty array to clear. Does NOT reconcile the
|
|
191
|
+
* current selection. */
|
|
192
|
+
export const setDisabledDaysOfWeek = (model, disabledDaysOfWeek) => evo(model, {
|
|
193
|
+
calendar: () => UiCalendar.setDisabledDaysOfWeek(model.calendar, disabledDaysOfWeek),
|
|
194
|
+
});
|
|
167
195
|
const toModelAndCommands = (result) => {
|
|
168
196
|
const [nextModel, commands] = result;
|
|
169
197
|
return [nextModel, commands];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { init, update, view, lazy, open, close, selectDate, clear, Model, Message, OutMessage, GotCalendarMessage, GotPopoverMessage, SelectedDate, Cleared, Opened, Closed, ChangedViewMonth, } from './index';
|
|
1
|
+
export { init, update, view, lazy, open, close, selectDate, clear, setMinDate, setMaxDate, setDisabledDates, setDisabledDaysOfWeek, Model, Message, OutMessage, GotCalendarMessage, GotPopoverMessage, SelectedDate, Cleared, Opened, Closed, ChangedViewMonth, } from './index';
|
|
2
2
|
export type { InitConfig, ViewConfig } from './index';
|
|
3
3
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/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"}
|
|
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,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { init, update, view, lazy, open, close, selectDate, clear, Model, Message, OutMessage, GotCalendarMessage, GotPopoverMessage, SelectedDate, Cleared, Opened, Closed, ChangedViewMonth, } from './index';
|
|
1
|
+
export { init, update, view, lazy, open, close, selectDate, clear, setMinDate, setMaxDate, setDisabledDates, setDisabledDaysOfWeek, Model, Message, OutMessage, GotCalendarMessage, GotPopoverMessage, SelectedDate, Cleared, Opened, Closed, ChangedViewMonth, } from './index';
|
|
@@ -76,6 +76,9 @@ export type ViewConfig<Message> = Readonly<{
|
|
|
76
76
|
className?: string;
|
|
77
77
|
attributes?: ReadonlyArray<Attribute<Message>>;
|
|
78
78
|
}>;
|
|
79
|
+
/** Programmatically opens the dialog, updating the model and returning
|
|
80
|
+
* show commands. Use this in domain-event handlers to open the dialog. */
|
|
81
|
+
export declare const open: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
79
82
|
/** Programmatically closes the dialog, updating the model and returning
|
|
80
83
|
* close commands. Use this in domain-event handlers when the dialog uses `onClosed`. */
|
|
81
84
|
export declare const close: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAEhE,OAAO,KAAK,OAAO,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAoB,MAAM,YAAY,CAAA;AAsBxE,oIAAoI;AACpI,eAAO,MAAM,KAAK;;;;;;;;;;EAMhB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,wEAAwE;AACxE,eAAO,MAAM,MAAM,2DAAc,CAAA;AACjC,wHAAwH;AACxH,eAAO,MAAM,MAAM,2DAAc,CAAA;AACjC,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,wEAA2B,CAAA;AAC3D,iFAAiF;AACjF,eAAO,MAAM,oBAAoB,yEAA4B,CAAA;AAC7D,0DAA0D;AAC1D,eAAO,MAAM,oBAAoB;;EAE/B,CAAA;AAEF,8DAA8D;AAC9D,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,KAAK,CAC3B;IACE,OAAO,MAAM;IACb,OAAO,MAAM;IACb,OAAO,mBAAmB;IAC1B,OAAO,oBAAoB;IAC3B,OAAO,oBAAoB;CAC5B,CAOF,CAAA;AAED,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAA;AACvC,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAA;AACvC,MAAM,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O,CAAC,OAAO,CAAC,CAAC,CAClC,CAAA;AAEzB,sGAAsG;AACtG,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,QAAQ,UAAU,CAAC,OAAO,CAAC,KAAG,IA8G3D,CAAA;AAED;;;;oDAIoD;AACpD,eAAO,MAAM,IAAI,GAAI,OAAO,EAC1B,cAAc,IAAI,CAChB,UAAU,CAAC,OAAO,CAAC,EACnB,OAAO,GAAG,iBAAiB,GAAG,UAAU,GAAG,cAAc,CAC1D,KACA,CAAC,CACF,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,iBAAiB,CAAC,EACvD,YAAY,EAAE,IAAI,KACf,IAAI,CAkBR,CAAA"}
|
package/dist/ui/dialog/index.js
CHANGED
|
@@ -110,6 +110,9 @@ export const update = (model, message) => M.value(message).pipe(withUpdateReturn
|
|
|
110
110
|
export const titleId = (model) => `${model.id}-title`;
|
|
111
111
|
/** Returns the ID used for `aria-describedby` on the dialog. Apply this to your description element. */
|
|
112
112
|
export const descriptionId = (model) => `${model.id}-description`;
|
|
113
|
+
/** Programmatically opens the dialog, updating the model and returning
|
|
114
|
+
* show commands. Use this in domain-event handlers to open the dialog. */
|
|
115
|
+
export const open = (model) => update(model, Opened());
|
|
113
116
|
/** Programmatically closes the dialog, updating the model and returning
|
|
114
117
|
* close commands. Use this in domain-event handlers when the dialog uses `onClosed`. */
|
|
115
118
|
export const close = (model) => update(model, Closed());
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { init, update, close, view, lazy, titleId, descriptionId, Model, Message, Opened, Closed, CompletedShowDialog, CompletedCloseDialog, GotTransitionMessage, ShowDialog, CloseDialog, } from './index';
|
|
1
|
+
export { init, update, open, close, view, lazy, titleId, descriptionId, Model, Message, Opened, Closed, CompletedShowDialog, CompletedCloseDialog, GotTransitionMessage, ShowDialog, CloseDialog, } from './index';
|
|
2
2
|
export type { InitConfig, ViewConfig } from './index';
|
|
3
3
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/dialog/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,aAAa,EACb,KAAK,EACL,OAAO,EACP,MAAM,EACN,MAAM,EACN,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,UAAU,EACV,WAAW,GACZ,MAAM,SAAS,CAAA;AAEhB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/dialog/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,aAAa,EACb,KAAK,EACL,OAAO,EACP,MAAM,EACN,MAAM,EACN,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,UAAU,EACV,WAAW,GACZ,MAAM,SAAS,CAAA;AAEhB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
|
package/dist/ui/dialog/public.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { init, update, close, view, lazy, titleId, descriptionId, Model, Message, Opened, Closed, CompletedShowDialog, CompletedCloseDialog, GotTransitionMessage, ShowDialog, CloseDialog, } from './index';
|
|
1
|
+
export { init, update, open, close, view, lazy, titleId, descriptionId, Model, Message, Opened, Closed, CompletedShowDialog, CompletedCloseDialog, GotTransitionMessage, ShowDialog, CloseDialog, } from './index';
|
|
@@ -57,6 +57,9 @@ export type ViewConfig<Message> = Readonly<{
|
|
|
57
57
|
/** Programmatically toggles the disclosure, updating the model and returning
|
|
58
58
|
* focus commands. Use this in domain-event handlers when the disclosure uses `onToggled`. */
|
|
59
59
|
export declare const toggle: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
60
|
+
/** Programmatically closes the disclosure, updating the model and returning
|
|
61
|
+
* focus commands. Use this in domain-event handlers to close the disclosure. */
|
|
62
|
+
export declare const close: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
60
63
|
/** Renders a headless disclosure component with accessible ARIA attributes and keyboard support. */
|
|
61
64
|
export declare const view: <Message>(config: ViewConfig<Message>) => Html;
|
|
62
65
|
/** Creates a memoized disclosure view. Static config is captured in a closure;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/disclosure/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAEhE,OAAO,KAAK,OAAO,MAAM,eAAe,CAAA;AACxC,OAAO,EACL,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,OAAO,EAGb,MAAM,YAAY,CAAA;AAOnB,kGAAkG;AAClG,eAAO,MAAM,KAAK;;;EAGhB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,iFAAiF;AACjF,eAAO,MAAM,OAAO,4DAAe,CAAA;AACnC,gFAAgF;AAChF,eAAO,MAAM,MAAM,2DAAc,CAAA;AACjC,kEAAkE;AAClE,eAAO,MAAM,oBAAoB,yEAA4B,CAAA;AAE7D,kEAAkE;AAClE,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,KAAK,CAC3B;IAAC,OAAO,OAAO;IAAE,OAAO,MAAM;IAAE,OAAO,oBAAoB;CAAC,CACZ,CAAA;AAElD,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AACzC,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAA;AACvC,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,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C,CAAC,CAAA;IACnD,YAAY,EAAE,IAAI,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;CAC/C,CAAC,CAAA;AAEF;8FAC8F;AAC9F,eAAO,MAAM,MAAM,GACjB,OAAO,KAAK,KACX,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CACjC,CAAA;AAE1B;iFACiF;AACjF,eAAO,MAAM,KAAK,GAChB,OAAO,KAAK,KACX,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAClC,CAAA;AAEzB,oGAAoG;AACpG,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,QAAQ,UAAU,CAAC,OAAO,CAAC,KAAG,IAoG3D,CAAA;AAED;mFACmF;AACnF,eAAO,MAAM,IAAI,GAAI,OAAO,EAC1B,cAAc,IAAI,CAChB,UAAU,CAAC,OAAO,CAAC,EACnB,OAAO,GAAG,iBAAiB,GAAG,WAAW,CAC1C,KACA,CAAC,CACF,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,iBAAiB,CAAC,KACpD,IAAI,CAgBR,CAAA"}
|
|
@@ -48,6 +48,9 @@ export const update = (model, message) => M.value(message).pipe(M.withReturnType
|
|
|
48
48
|
/** Programmatically toggles the disclosure, updating the model and returning
|
|
49
49
|
* focus commands. Use this in domain-event handlers when the disclosure uses `onToggled`. */
|
|
50
50
|
export const toggle = (model) => update(model, Toggled());
|
|
51
|
+
/** Programmatically closes the disclosure, updating the model and returning
|
|
52
|
+
* focus commands. Use this in domain-event handlers to close the disclosure. */
|
|
53
|
+
export const close = (model) => update(model, Closed());
|
|
51
54
|
/** Renders a headless disclosure component with accessible ARIA attributes and keyboard support. */
|
|
52
55
|
export const view = (config) => {
|
|
53
56
|
const { div, empty, AriaControls, AriaDisabled, AriaExpanded, Class, DataAttribute, Disabled, Hidden, Id, OnClick, OnKeyDownPreventDefault, Tabindex, Type, keyed, } = html();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { init, update, toggle, view, lazy, Model, Message, Toggled, Closed, CompletedFocusButton, FocusButton, } from './index';
|
|
1
|
+
export { init, update, toggle, close, view, lazy, Model, Message, Toggled, Closed, CompletedFocusButton, FocusButton, } from './index';
|
|
2
2
|
export type { InitConfig, ViewConfig } from './index';
|
|
3
3
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/disclosure/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,oBAAoB,EACpB,WAAW,GACZ,MAAM,SAAS,CAAA;AAEhB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/disclosure/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,MAAM,EACN,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,oBAAoB,EACpB,WAAW,GACZ,MAAM,SAAS,CAAA;AAEhB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { init, update, toggle, view, lazy, Model, Message, Toggled, Closed, CompletedFocusButton, FocusButton, } from './index';
|
|
1
|
+
export { init, update, toggle, close, view, lazy, Model, Message, Toggled, Closed, CompletedFocusButton, FocusButton, } from './index';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Option, Schema as S } from 'effect';
|
|
2
2
|
import type * as Command from '../../command';
|
|
3
3
|
import { type Html } from '../../html';
|
|
4
|
-
import { type BaseInitConfig, type BaseViewConfig, type Message, SelectedItem } from './shared';
|
|
4
|
+
import { type BaseInitConfig, type BaseViewConfig, Closed, type Message, Opened, SelectedItem } from './shared';
|
|
5
5
|
/** Schema for the multi-select listbox component's state, tracking open/closed status, active item, selected items, activation trigger, and typeahead search. */
|
|
6
6
|
export declare const Model: S.extend<S.Struct<{
|
|
7
7
|
id: typeof S.String;
|
|
@@ -148,6 +148,12 @@ export declare const update: (model: {
|
|
|
148
148
|
readonly pointerType: string;
|
|
149
149
|
}, never, never>;
|
|
150
150
|
}>[]];
|
|
151
|
+
/** Programmatically opens the listbox, updating the model and returning
|
|
152
|
+
* focus and modal commands. Use this in domain-event handlers to open the listbox. */
|
|
153
|
+
export declare const open: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
154
|
+
/** Programmatically closes the listbox, updating the model and returning
|
|
155
|
+
* focus and modal commands. Use this in domain-event handlers to close the listbox. */
|
|
156
|
+
export declare const close: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
151
157
|
/** Programmatically toggles an item in the multi-select listbox. Use this in domain-event handlers when the listbox uses `onSelectedItem`. */
|
|
152
158
|
export declare const selectItem: (model: Model, item: string) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
153
159
|
/** Configuration for rendering a multi-select listbox with `view`. */
|
|
@@ -177,7 +183,7 @@ export declare const view: <Message, Item>(config: Readonly<{
|
|
|
177
183
|
} & {
|
|
178
184
|
readonly selectedItems: readonly string[];
|
|
179
185
|
};
|
|
180
|
-
toParentMessage: (message:
|
|
186
|
+
toParentMessage: (message: Opened | Closed | import("./shared").ClosedByTab | import("./shared").ActivatedItem | import("./shared").DeactivatedItem | SelectedItem | import("./shared").MovedPointerOverItem | import("./shared").RequestedItemClick | import("./shared").Searched | import("./shared").PressedPointerOnButton | import("./shared").IgnoredMouseClick | import("./shared").SuppressedSpaceScroll) => Message;
|
|
181
187
|
onSelectedItem?: (value: string) => Message;
|
|
182
188
|
items: readonly Item[];
|
|
183
189
|
itemToConfig: (item: Item, context: Readonly<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/multi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,IAAI,CAAC,EAAQ,MAAM,QAAQ,CAAA;AAEzD,OAAO,KAAK,KAAK,OAAO,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,YAAY,CAAA;AAElD,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,YAAY,EAIb,MAAM,UAAU,CAAA;AAIjB,iKAAiK;AACjK,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;GAEjB,CAAA;AAED,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,6RAA6R;AAC7R,MAAM,MAAM,UAAU,GAAG,cAAc,GACrC,QAAQ,CAAC;IACP,aAAa,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CACtC,CAAC,CAAA;AAEJ,4HAA4H;AAC5H,eAAO,MAAM,IAAI,GAAI,QAAQ,UAAU,KAAG,KAGxC,CAAA;AAIF,wJAAwJ;AACxJ,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAMjB,C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,OAAO,EAAE,IAAI,EAChC,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,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,iBAAiB,CAAC,KACrE,IAAI,CAoBR,CAAA"}
|
package/dist/ui/listbox/multi.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Array, Option, Schema as S, pipe } from 'effect';
|
|
2
2
|
import { createLazy } from '../../html';
|
|
3
3
|
import { evo } from '../../struct';
|
|
4
|
-
import { BaseModel, SelectedItem, baseInit, makeUpdate, makeView, } from './shared';
|
|
4
|
+
import { BaseModel, Closed, Opened, SelectedItem, baseInit, makeUpdate, makeView, } from './shared';
|
|
5
5
|
// MODEL
|
|
6
6
|
/** Schema for the multi-select listbox component's state, tracking open/closed status, active item, selected items, activation trigger, and typeahead search. */
|
|
7
7
|
export const Model = BaseModel.pipe(S.extend(S.Struct({ selectedItems: S.Array(S.String) })));
|
|
@@ -18,6 +18,12 @@ export const update = makeUpdate((model, item) => {
|
|
|
18
18
|
: Array.append(model.selectedItems, item);
|
|
19
19
|
return [evo(model, { selectedItems: () => nextSelectedItems }), []];
|
|
20
20
|
});
|
|
21
|
+
/** Programmatically opens the listbox, updating the model and returning
|
|
22
|
+
* focus and modal commands. Use this in domain-event handlers to open the listbox. */
|
|
23
|
+
export const open = (model) => update(model, Opened({ maybeActiveItemIndex: Option.none() }));
|
|
24
|
+
/** Programmatically closes the listbox, updating the model and returning
|
|
25
|
+
* focus and modal commands. Use this in domain-event handlers to close the listbox. */
|
|
26
|
+
export const close = (model) => update(model, Closed());
|
|
21
27
|
/** Programmatically toggles an item in the multi-select listbox. Use this in domain-event handlers when the listbox uses `onSelectedItem`. */
|
|
22
28
|
export const selectItem = (model, item) => update(model, SelectedItem({ item }));
|
|
23
29
|
/** Renders a headless multi-select listbox with typeahead search, keyboard navigation, selection tracking, and aria-activedescendant focus management. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiPublic.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/multiPublic.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"multiPublic.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/multiPublic.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,KAAK,GACN,MAAM,SAAS,CAAA;AAChB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { init, update, selectItem, view, lazy, Model } from './multi';
|
|
1
|
+
export { init, update, open, close, selectItem, view, lazy, Model, } from './multi';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { init, update, selectItem, view, lazy, Model } from './single';
|
|
1
|
+
export { init, update, open, close, selectItem, view, lazy, Model, } from './single';
|
|
2
2
|
export { Message, Orientation, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusButton, CompletedFocusItems, CompletedScrollIntoView, CompletedClickItem, ClearedSearch, GotTransitionMessage, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusButton, FocusItems, ScrollIntoView, ClickItem, DelayClearSearch, DetectMovementOrTransitionEnd, } from './shared';
|
|
3
3
|
export type { ActivationTrigger, Opened, Closed, ClosedByTab, ActivatedItem, DeactivatedItem, MovedPointerOverItem, RequestedItemClick, Searched, PressedPointerOnButton, IgnoredMouseClick, SuppressedSpaceScroll, ItemConfig, GroupHeading, } from './shared';
|
|
4
4
|
export type { InitConfig, ViewConfig } from './single';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/public.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,KAAK,GACN,MAAM,UAAU,CAAA;AAEjB,OAAO,EACL,OAAO,EACP,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAW,EACX,UAAU,EACV,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,6BAA6B,GAC9B,MAAM,UAAU,CAAA;AAEjB,YAAY,EACV,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,WAAW,EACX,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EACR,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,YAAY,GACb,MAAM,UAAU,CAAA;AAEjB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAEtD,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { init, update, selectItem, view, lazy, Model } from './single';
|
|
1
|
+
export { init, update, open, close, selectItem, view, lazy, Model, } from './single';
|
|
2
2
|
export { Message, Orientation, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusButton, CompletedFocusItems, CompletedScrollIntoView, CompletedClickItem, ClearedSearch, GotTransitionMessage, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusButton, FocusItems, ScrollIntoView, ClickItem, DelayClearSearch, DetectMovementOrTransitionEnd, } from './shared';
|
|
3
3
|
export * as Multi from './multiPublic';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Option, Schema as S } from 'effect';
|
|
2
2
|
import type * as Command from '../../command';
|
|
3
3
|
import { type Html } from '../../html';
|
|
4
|
-
import { type BaseInitConfig, type BaseViewConfig, type Message, SelectedItem } from './shared';
|
|
4
|
+
import { type BaseInitConfig, type BaseViewConfig, Closed, type Message, Opened, SelectedItem } from './shared';
|
|
5
5
|
/** Schema for the listbox component's state, tracking open/closed status, active item, selected item, activation trigger, and typeahead search. */
|
|
6
6
|
export declare const Model: S.extend<S.Struct<{
|
|
7
7
|
id: typeof S.String;
|
|
@@ -148,6 +148,12 @@ export declare const update: (model: {
|
|
|
148
148
|
readonly pointerType: string;
|
|
149
149
|
}, never, never>;
|
|
150
150
|
}>[]];
|
|
151
|
+
/** Programmatically opens the listbox, updating the model and returning
|
|
152
|
+
* focus and modal commands. Use this in domain-event handlers to open the listbox. */
|
|
153
|
+
export declare const open: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
154
|
+
/** Programmatically closes the listbox, updating the model and returning
|
|
155
|
+
* focus and modal commands. Use this in domain-event handlers to close the listbox. */
|
|
156
|
+
export declare const close: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
151
157
|
/** Programmatically selects an item in the single-select listbox, closing the listbox and returning
|
|
152
158
|
* focus commands. Use this in domain-event handlers when the listbox uses `onSelectedItem`. */
|
|
153
159
|
export declare const selectItem: (model: Model, item: string) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
@@ -178,7 +184,7 @@ export declare const view: <Message, Item>(config: Readonly<{
|
|
|
178
184
|
} & {
|
|
179
185
|
readonly maybeSelectedItem: Option.Option<string>;
|
|
180
186
|
};
|
|
181
|
-
toParentMessage: (message:
|
|
187
|
+
toParentMessage: (message: Opened | Closed | import("./shared").ClosedByTab | import("./shared").ActivatedItem | import("./shared").DeactivatedItem | SelectedItem | import("./shared").MovedPointerOverItem | import("./shared").RequestedItemClick | import("./shared").Searched | import("./shared").PressedPointerOnButton | import("./shared").IgnoredMouseClick | import("./shared").SuppressedSpaceScroll) => Message;
|
|
182
188
|
onSelectedItem?: (value: string) => Message;
|
|
183
189
|
items: readonly Item[];
|
|
184
190
|
itemToConfig: (item: Item, context: Readonly<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/single.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAEnD,OAAO,KAAK,KAAK,OAAO,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,YAAY,CAAA;AAElD,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,YAAY,EAIb,MAAM,UAAU,CAAA;AAIjB,mJAAmJ;AACnJ,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;GAEjB,CAAA;AAED,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,6RAA6R;AAC7R,MAAM,MAAM,UAAU,GAAG,cAAc,GACrC,QAAQ,CAAC;IACP,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAC,CAAA;AAEJ,6HAA6H;AAC7H,eAAO,MAAM,IAAI,GAAI,QAAQ,UAAU,KAAG,KAGxC,CAAA;AAIF,qIAAqI;AACrI,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAMjB,CAAA;AAEF;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CAChB,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,EACzB,OAAO,GAAG,iBAAiB,GAAG,gBAAgB,CAC/C,KACA,CAAC,CACF,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,iBAAiB,CAAC,KACrE,IAAI,CAoBR,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Array, Option, Schema as S } from 'effect';
|
|
2
2
|
import { createLazy } from '../../html';
|
|
3
3
|
import { evo } from '../../struct';
|
|
4
|
-
import { BaseModel, SelectedItem, baseInit, makeUpdate, makeView, } from './shared';
|
|
4
|
+
import { BaseModel, Closed, Opened, SelectedItem, baseInit, makeUpdate, makeView, } from './shared';
|
|
5
5
|
// MODEL
|
|
6
6
|
/** Schema for the listbox component's state, tracking open/closed status, active item, selected item, activation trigger, and typeahead search. */
|
|
7
7
|
export const Model = BaseModel.pipe(S.extend(S.Struct({ maybeSelectedItem: S.OptionFromSelf(S.String) })));
|
|
@@ -19,6 +19,12 @@ export const update = makeUpdate((model, item, context) => {
|
|
|
19
19
|
commands,
|
|
20
20
|
];
|
|
21
21
|
});
|
|
22
|
+
/** Programmatically opens the listbox, updating the model and returning
|
|
23
|
+
* focus and modal commands. Use this in domain-event handlers to open the listbox. */
|
|
24
|
+
export const open = (model) => update(model, Opened({ maybeActiveItemIndex: Option.none() }));
|
|
25
|
+
/** Programmatically closes the listbox, updating the model and returning
|
|
26
|
+
* focus and modal commands. Use this in domain-event handlers to close the listbox. */
|
|
27
|
+
export const close = (model) => update(model, Closed());
|
|
22
28
|
/** Programmatically selects an item in the single-select listbox, closing the listbox and returning
|
|
23
29
|
* focus commands. Use this in domain-event handlers when the listbox uses `onSelectedItem`. */
|
|
24
30
|
export const selectItem = (model, item) => update(model, SelectedItem({ item }));
|
package/dist/ui/menu/index.d.ts
CHANGED
|
@@ -215,6 +215,12 @@ export declare const DetectMovementOrTransitionEnd: Command.CommandDefinition<"D
|
|
|
215
215
|
}>;
|
|
216
216
|
/** Processes a menu message and returns the next model and commands. */
|
|
217
217
|
export declare const update: (model: Model, message: Message) => UpdateReturn;
|
|
218
|
+
/** Programmatically opens the menu, updating the model and returning
|
|
219
|
+
* focus and modal commands. Use this in domain-event handlers to open the menu. */
|
|
220
|
+
export declare const open: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
221
|
+
/** Programmatically closes the menu, updating the model and returning
|
|
222
|
+
* focus and modal commands. Use this in domain-event handlers to close the menu. */
|
|
223
|
+
export declare const close: (model: Model) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
218
224
|
/** Programmatically selects a menu item at the given index, closing the menu and returning
|
|
219
225
|
* focus commands. Use this in domain-event handlers when the menu uses `onSelectedItem`. */
|
|
220
226
|
export declare const selectItem: (model: Model, index: number) => readonly [Model, ReadonlyArray<Command.Command<Message>>];
|
|
@@ -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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AA;IACpD,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS,CAAA;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;IACnD,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,mBAAmB,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;IACvD,MAAM,CAAC,EAAE,YAAY,CAAA;CACtB,CAAC,CAAA;AAEF,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,CAAA;AAIjD,sHAAsH;AACtH,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,IAAI,SAAS,MAAM,EAC/C,QAAQ,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,KAChC,IAseF,CAAA;AAED;mFACmF;AACnF,eAAO,MAAM,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"}
|
package/dist/ui/menu/index.js
CHANGED
|
@@ -362,6 +362,12 @@ export const update = (model, message) => {
|
|
|
362
362
|
SuppressedSpaceScroll: () => [model, []],
|
|
363
363
|
}));
|
|
364
364
|
};
|
|
365
|
+
/** Programmatically opens the menu, updating the model and returning
|
|
366
|
+
* focus and modal commands. Use this in domain-event handlers to open the menu. */
|
|
367
|
+
export const open = (model) => update(model, Opened({ maybeActiveItemIndex: Option.none() }));
|
|
368
|
+
/** Programmatically closes the menu, updating the model and returning
|
|
369
|
+
* focus and modal commands. Use this in domain-event handlers to close the menu. */
|
|
370
|
+
export const close = (model) => update(model, Closed());
|
|
365
371
|
/** Programmatically selects a menu item at the given index, closing the menu and returning
|
|
366
372
|
* focus commands. Use this in domain-event handlers when the menu uses `onSelectedItem`. */
|
|
367
373
|
export const selectItem = (model, index) => update(model, SelectedItem({ index }));
|
package/dist/ui/menu/public.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { init, update, selectItem, view, lazy, Model, Message, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusItems, CompletedFocusButton, CompletedScrollIntoView, CompletedClickItem, ClearedSearch, GotTransitionMessage, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusItems, FocusButton, ScrollIntoView, ClickItem, DelayClearSearch, DetectMovementOrTransitionEnd, } from './index';
|
|
1
|
+
export { init, update, open, close, selectItem, view, lazy, Model, Message, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusItems, CompletedFocusButton, CompletedScrollIntoView, CompletedClickItem, ClearedSearch, GotTransitionMessage, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusItems, FocusButton, ScrollIntoView, ClickItem, DelayClearSearch, DetectMovementOrTransitionEnd, } from './index';
|
|
2
2
|
export type { ActivationTrigger, Opened, Closed, ClosedByTab, ActivatedItem, DeactivatedItem, MovedPointerOverItem, RequestedItemClick, Searched, PressedPointerOnButton, ReleasedPointerOnItems, IgnoredMouseClick, SuppressedSpaceScroll, InitConfig, ViewConfig, ItemConfig, GroupHeading, } from './index';
|
|
3
3
|
export type { AnchorConfig } from '../anchor';
|
|
4
4
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/menu/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,OAAO,EACP,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,UAAU,EACV,WAAW,EACX,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,6BAA6B,GAC9B,MAAM,SAAS,CAAA;AAEhB,YAAY,EACV,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,WAAW,EACX,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EACR,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,GACb,MAAM,SAAS,CAAA;AAEhB,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/menu/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,OAAO,EACP,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,UAAU,EACV,WAAW,EACX,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,6BAA6B,GAC9B,MAAM,SAAS,CAAA;AAEhB,YAAY,EACV,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,WAAW,EACX,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EACR,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,GACb,MAAM,SAAS,CAAA;AAEhB,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA"}
|
package/dist/ui/menu/public.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { init, update, selectItem, view, lazy, Model, Message, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusItems, CompletedFocusButton, CompletedScrollIntoView, CompletedClickItem, ClearedSearch, GotTransitionMessage, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusItems, FocusButton, ScrollIntoView, ClickItem, DelayClearSearch, DetectMovementOrTransitionEnd, } from './index';
|
|
1
|
+
export { init, update, open, close, selectItem, view, lazy, Model, Message, SelectedItem, CompletedLockScroll, CompletedUnlockScroll, CompletedSetupInert, CompletedTeardownInert, CompletedFocusItems, CompletedFocusButton, CompletedScrollIntoView, CompletedClickItem, ClearedSearch, GotTransitionMessage, LockScroll, UnlockScroll, InertOthers, RestoreInert, FocusItems, FocusButton, ScrollIntoView, ClickItem, DelayClearSearch, DetectMovementOrTransitionEnd, } from './index';
|