foldkit-mixins-form 0.8.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,12 +15,14 @@ what else it does.
15
15
  | Classes, inline style, extra attributes and events | your `Style` / `Behavior` attachments |
16
16
  | The options of a relation picker, the submit button's words | the application, as view inputs |
17
17
 
18
- The optional `foldkit-mixins-form/ui` entry draws Text and Multiline fields
19
- through `foldkit-mixins-ui`'s Input and Textarea adapters. The main entry keeps
20
- the plain-HTML path and does not import that integration.
18
+ The optional `foldkit-mixins-form/ui` entry draws every control through
19
+ `foldkit-mixins-ui`'s components. The main entry keeps the plain-HTML path and
20
+ does not import that integration.
21
21
 
22
22
  It holds no state and adds no Messages. Every event it installs dispatches one
23
- of the form's own Messages (`Changed`, `Blurred`, `Submitted`).
23
+ of the form's own Messages: `Changed`, `Toggled` (a press on a flag or a choice,
24
+ applied to the draft as it lands), `Blurred`, `Searched`, `Submitted`, the row
25
+ Messages, `FollowedIssue` and `AskedForMore`.
24
26
 
25
27
  ## Mental model
26
28
 
@@ -69,12 +71,75 @@ Messages to its reducer; submitting a valid form sends its decoded value to
69
71
 
70
72
  The next example replaces this unstyled `Drawn` with field and form styles.
71
73
 
72
- ## UI-backed fields with a custom layout
74
+ ## A look for the field and the form
75
+
76
+ The views draw unstyled Slots. `foldkit-mixins-form/recipes` gives both a look
77
+ over the theme's tokens, as `foldkit-mixins-ui`'s `Recipes` do for its
78
+ components (it needs `foldkit-mixins-ui` installed, as `/ui` does):
79
+
80
+ ```ts
81
+ import { Style } from 'foldkit-mixins'
82
+ import { FieldSlots, FormSlots, FormView } from 'foldkit-mixins-form'
83
+ import { Field, Form } from 'foldkit-mixins-form/recipes'
84
+
85
+ const Looked = FormView.define(Edit, {
86
+ field: FormView.field(Edit).pipe(Style.attach(Style.forSlots(FieldSlots)(Field({})))),
87
+ }).pipe(Style.attach(Style.forSlots(FormSlots)(Form({}))))
88
+ ```
89
+
90
+ - `Field({})` puts the label over the control and what the field says under it,
91
+ in a grid: a control with no width of its own stretches, a checkbox keeps its
92
+ box. Text, number, a select and a picker's search box take
93
+ `foldkit-mixins-ui`'s field looks, so a form drawn with `UiForm.renderers`
94
+ below looks the same. A failure reads in the error's ink.
95
+ - `Form({})` sets the fields in a column, the list of fields to fix in the
96
+ error's colours, and the submit as the primary button, as wide as its words.
97
+
98
+ Adjust one with `.extend`, never a fork, as `foldkit-mixins-crud/recipes` are.
99
+
100
+ ## A form drawn through `foldkit-mixins-ui`
73
101
 
74
102
  Install `foldkit-mixins-ui` and its `@foldkit/ui` peer to use the optional
75
103
  `foldkit-mixins-form/ui` entry. Import it as `UiForm`.
76
104
 
77
- `UiForm.field({ toMessage, inputStyle, textareaStyle?, draw? })` returns a
105
+ `UiForm.renderers(styles?)` is a renderer for every kind `foldkit-form` ships,
106
+ given to the whole-form view like any other renderers:
107
+
108
+ ```ts
109
+ import { Style } from 'foldkit-mixins'
110
+ import { FormView } from 'foldkit-mixins-form'
111
+ import * as UiForm from 'foldkit-mixins-form/ui'
112
+ import { InputSlots, Recipes, SelectSlots } from 'foldkit-mixins-ui'
113
+
114
+ const UiView = FormView.define(Edit, {
115
+ renderers: UiForm.renderers({
116
+ input: Style.forSlots(InputSlots)(Recipes.Input()),
117
+ select: Style.forSlots(SelectSlots)(Recipes.Select()),
118
+ }),
119
+ })
120
+ ```
121
+
122
+ Each style is optional and names its component: `input` (Text and Number),
123
+ `textarea`, `select` (Select and RelationOne), `checkbox` (Toggle) and
124
+ `checkboxGroup` (Choices and RelationMany). A table with no styles still draws a
125
+ complete form, unstyled.
126
+
127
+ What the table changes is the control, not the field. The label, description,
128
+ checking line and error stay the form view's, and each control keeps the plain
129
+ one's name, id, `aria-invalid`, `aria-required` and `aria-describedby`, so the
130
+ same interaction sends the same Messages either way. Text, Number, Multiline and
131
+ the selects are the plain elements under the component's Slot; a `FieldSlots`
132
+ style for `text`, `number`, `multiline` or `select` no longer reaches them, since
133
+ an element keeps one Slot's class. Toggle, Choices and RelationMany are the
134
+ Checkbox's `role="checkbox"` buttons, which Space presses and their label names;
135
+ a button posts nothing, so each checked one holds a hidden input with the key's
136
+ name, and a form posted without scripts still carries the value it was drawn
137
+ with; unlike the plain checkboxes, those buttons cannot be changed until a script
138
+ runs.
139
+
140
+ ## UI-backed fields with a custom layout
141
+
142
+ `UiForm.field({ toMessage, inputStyle, textareaStyle?, draw?, words? })` returns a
78
143
  `FormView.fields` override for Text and Multiline keys. `toMessage` wraps the
79
144
  form's Changed/Blurred Messages in the caller's Message universe (use an
80
145
  identity function for a whole-form view). Styles target `InputSlots` and
@@ -169,9 +234,16 @@ A `RelationOne` or `RelationMany` that searches (`Input.search()`) gets an
169
234
  `input type="search"` above it, in the `search` slot, labelled `Search <label>`
170
235
  and naming the picker it controls with `aria-controls`. `words.search` in the
171
236
  view inputs replaces the word. The blank choice of a `select` has no words
172
- unless `words.none` gives it some ("none"). All of the view's words (`submit`,
173
- `submitting`, `checking`, `search`, `none`, `add`, `remove`) are text, with `{label}` and `{position}` as
174
- blanks; see [words in one place](../form/README.md#words-as-text-in-one-place).
237
+ unless `words.none` gives it some ("none"). A picker of the form itself that
238
+ the view inputs' `more` names (`more: { authorId: true }`, which
239
+ `foldkit-crud`'s `Crud.options` gives as `pickers.more(model)`) gets a
240
+ `button type="button"` under it, in the `more` slot, worded by `words.more`
241
+ (default `Show more`) and naming the picker with `aria-controls`; a press sends
242
+ the form's `AskedForMore({ key })`, for the page that owns the list to answer.
243
+ All of the view's words (`submit`,
244
+ `submitting`, `checking`, `search`, `none`, `add`, `remove`, `more`, `summary`,
245
+ `issue`, `inRow`) are text: `add` fills `{label}`, `remove` `{label}` and `{position}`,
246
+ `issue` `{label}` and `{error}`, and `inRow` `{row}` and `{label}`; the others are said as written. See [words in one place](../form/README.md#words-as-text-in-one-place).
175
247
 
176
248
  A chosen value its choices lack stays in sight: after the choices comes
177
249
  `? value`, chosen, in a `select` and in a `RelationMany`'s checkboxes. It is a
@@ -240,7 +312,7 @@ Fields.field(control, formModel, control.key, h, (input, draw) =>
240
312
  ```
241
313
 
242
314
  A override receives the control, its field, id, validity, errors, element
243
- attrs, and the `changed`/`blurred` Messages, so a custom layout reconstructs
315
+ attrs, and the `changed`/`blurred`/`toggled` Messages, so a custom layout reconstructs
244
316
  no form plumbing. A renderer reads the attrs that fit its element — `type` and
245
317
  `placeholder` on a text input, `placeholder` and `rows` on a textarea, and on
246
318
  both, and a number, `autocomplete`, `inputMode`, `enterKeyHint`,
@@ -267,7 +339,23 @@ Around each control, `FieldSlots` also publishes `root`, `label`, `description`,
267
339
  `checking`, `error`, `control` (around a Bundle's own view), and `group` and `affix`, for a
268
340
  renderer that draws text beside its control (a prefix, a unit) with the two
269
341
  together. `FormSlots` publishes `root` (the `form`), `errors` (failures that
270
- belong to no one field), `submit`, and the five slots of a nested key.
342
+ belong to no one field), `summary`, `summaryTitle`, `issues`, `issue` and
343
+ `issueLink` (the fields to fix, below),
344
+ `submit`, and the five slots of a nested key.
345
+
346
+ While any field is invalid, the form draws the fields to fix above its submit
347
+ button, beside `errors`: `words.summary` (default `Check these fields:`), then a
348
+ link to each invalid field in the order the fields are drawn, rows' too, each
349
+ worded by `words.issue` (default `{label}: {error}`); a field of a row is named
350
+ with its row by `words.inRow` (default `{row}, {label}`: `comments 2, body`),
351
+ so two rows' links differ; a row inside a row is named through both
352
+ (`shelves 1, books 2, title`). It sits low in the form,
353
+ so a field turning invalid never moves the fields above it, and it is no live
354
+ region: each field's own error already is. A link's `href` is the control's
355
+ `#id`, so with scripts off it goes there; with them on, a press focuses the
356
+ control itself (a choice group's first box) and goes nowhere, since an
357
+ application takes a link press as a navigation. The press sends the form's
358
+ `FollowedIssue({ id })`, which changes nothing.
271
359
 
272
360
  A Bundle's own view that takes inputs gets them from the view input
273
361
  `controls`, by key: `placed.view(model, h, { controls: { document: inputs } })`.
@@ -287,7 +375,9 @@ same for every row), and `words.add` / `words.remove` word the buttons (defaults
287
375
  A form's own check ([`checks`](../form/README.md)) leaves its key `Validating`
288
376
  until it answers. Meanwhile the control carries `aria-busy`, and under it a line
289
377
  in the `checking` slot, `role="status"`, says so (`words.checking`, default
290
- `Checking…`); the control names that line in `aria-describedby`. Each field's
378
+ `Checking…`); the control names that line in `aria-describedby`. A Bundle
379
+ control's own work (an upload) marks it `aria-busy` with no such line: the
380
+ control says what it is doing itself. Each field's
291
381
  `root` carries `data-validation`, the field's state by Foldkit's own tag
292
382
  (`NotValidated`, `Validating`, `Valid` or `Invalid`), so a stylesheet can mark it
293
383
  without a Style: `[data-validation='Valid'] label::after { content: ' ✓' }`. A
package/dist/index.d.mts CHANGED
@@ -3,7 +3,6 @@ import { Attr, Capability, Event, NamedStyle, Slot, SlotBuilders, SlotView, Slot
3
3
  import * as FieldValidation from "foldkit/fieldValidation";
4
4
  import * as Submodel from "foldkit/submodel";
5
5
  import { Attribute, Html, HtmlBuilder } from "foldkit/html";
6
- //#region src/index.d.ts
7
6
  /** One thing a select or a relation picker offers. */
8
7
  export interface Option {
9
8
  readonly value: string;
@@ -31,6 +30,18 @@ export interface FormViewWords {
31
30
  readonly checking?: string | undefined;
32
31
  /** On the submit button while the form is submitting. Default `Submitting…`. */
33
32
  readonly submitting?: string | undefined;
33
+ /** Above the list of fields to fix. Default `Check these fields:`. */
34
+ readonly summary?: string | undefined;
35
+ /** One field to fix, a link to it. Default `{label}: {error}`. */
36
+ readonly issue?: string | undefined;
37
+ /**
38
+ * A field of a row as the fields to fix name it, so two rows' links differ:
39
+ * `{row}` is the nested key's label, with the row's position when it holds
40
+ * many. Default `{row}, {label}`.
41
+ */
42
+ readonly inRow?: string | undefined;
43
+ /** On the button under a picker whose list has more rows than it shows. Default `Show more`. */
44
+ readonly more?: string | undefined;
34
45
  }
35
46
  /**
36
47
  * What the view needs that the form does not own: the choices of each relation
@@ -38,6 +49,13 @@ export interface FormViewWords {
38
49
  */
39
50
  export interface FormViewInputs<Key extends string = string> {
40
51
  readonly options?: { readonly [K in Key]?: ReadonlyArray<Option>; } | undefined;
52
+ /**
53
+ * The pickers whose list has more rows than `options` holds (`Crud.options`'
54
+ * `more`): each draws a button that sends the form's `AskedForMore`, for the
55
+ * page that owns the list to answer. Relation pickers of the form itself
56
+ * only, and none while locked.
57
+ */
58
+ readonly more?: { readonly [K in Key]?: boolean; } | undefined;
41
59
  /**
42
60
  * The choices of a picker inside a nested key, by its path, the same for every
43
61
  * row: `'author.country'`.
@@ -87,6 +105,10 @@ export interface FieldInput<Key extends string = string> {
87
105
  readonly noneWord?: string | undefined;
88
106
  /** What is said while the key's check runs: the view's `words.checking`. */
89
107
  readonly checkingWord?: string | undefined;
108
+ /** The Message a press of the picker's "more" button sends; none draws no button. */
109
+ readonly more?: unknown;
110
+ /** On that button: the view's `words.more`. */
111
+ readonly moreWord?: string | undefined;
90
112
  /**
91
113
  * Set for a field in a row of a nested key: its Messages, wrapped for the row.
92
114
  * A field of the form itself sends the form's own.
@@ -95,6 +117,7 @@ export interface FieldInput<Key extends string = string> {
95
117
  readonly changed: (value: Draft) => unknown;
96
118
  readonly blurred: unknown;
97
119
  readonly searched: (text: string) => unknown;
120
+ readonly toggled: (choice?: string) => unknown;
98
121
  } | undefined;
99
122
  /**
100
123
  * Set for a key edited by a control backed by a Bundle (`Input.bundle`): the
@@ -159,12 +182,25 @@ export declare const FieldSlots: Slots.Contract<{
159
182
  readonly choiceLabel: Slot.UnnamedSlot<Capability.Capability<"Base", readonly []>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
160
183
  /** Over a relation picker that searches: where the user types to find a choice. */
161
184
  readonly search: Slot.UnnamedSlot<Capability.Capability<"TextInput", readonly [Capability.Capability<"Focusable", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>]>, readonly [Event.EventToken<"input">], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
185
+ /** Under a relation picker whose list has more rows: asks for them. */
186
+ readonly more: Slot.UnnamedSlot<Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>, readonly [Event.EventToken<"click">], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
162
187
  }>;
163
188
  /** The form around its fields. */
164
189
  export declare const FormSlots: Slots.Contract<{
165
190
  readonly root: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly [Event.EventToken<"submit">], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
166
191
  /** Failures that belong to no one field: a rule that spans keys. */
167
192
  readonly errors: Slot.UnnamedSlot<Capability.Capability<"Base", readonly []>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
193
+ /**
194
+ * The fields to fix, while any is invalid: its words (`summaryTitle`), then a
195
+ * list (`issues`) of `issue`s, each holding an `issueLink` to one field's
196
+ * control. Beside `errors`, above the submit button.
197
+ */
198
+ readonly summary: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
199
+ readonly summaryTitle: Slot.UnnamedSlot<Capability.Capability<"Base", readonly []>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
200
+ readonly issues: Slot.UnnamedSlot<Capability.Capability<"Collection", readonly [Capability.Capability<"Base", readonly []>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
201
+ readonly issue: Slot.UnnamedSlot<Capability.Capability<"Base", readonly []>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
202
+ /** A link to one field's control, which a press focuses. */
203
+ readonly issueLink: Slot.UnnamedSlot<Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>, readonly [Event.EventToken<"click">], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
168
204
  readonly submit: Slot.UnnamedSlot<Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>, readonly [Event.EventToken<"click">], readonly [Attr.AttrToken<"disabled">], readonly Slot.RequirementName[], boolean>;
169
205
  /** A nested key: the group around its rows, its name, each row, and the buttons that add and remove one. */
170
206
  readonly group: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
@@ -201,7 +237,17 @@ interface FormLike<Key extends string, Model, Message> {
201
237
  readonly key: Key;
202
238
  readonly text: string;
203
239
  }) => NoInfer<Message>;
240
+ readonly Toggled: (payload: {
241
+ readonly key: Key;
242
+ readonly choice?: string;
243
+ }) => NoInfer<Message>;
204
244
  readonly Submitted: () => NoInfer<Message>;
245
+ readonly FollowedIssue: (payload: {
246
+ readonly id: string;
247
+ }) => NoInfer<Message>;
248
+ readonly AskedForMore: (payload: {
249
+ readonly key: Key;
250
+ }) => NoInfer<Message>;
205
251
  readonly Control: (payload: {
206
252
  readonly key: never;
207
253
  readonly message: unknown;
@@ -228,6 +274,13 @@ export interface RenderContext<Message> {
228
274
  readonly control: Control;
229
275
  readonly draft: Draft;
230
276
  readonly change: (value: Draft) => Message;
277
+ /**
278
+ * A press on a flag (no `choice`) or on one choice of a list, applied to the
279
+ * draft as it stands when it lands: send it for a press, rather than a
280
+ * `change` built from the draft as drawn, which a second press before the
281
+ * next draw would undo.
282
+ */
283
+ readonly toggled: (choice?: string) => Message;
231
284
  readonly blurred: Message;
232
285
  /**
233
286
  * For a control backed by a Bundle: its Model, and the Message carrying one of
@@ -262,6 +315,11 @@ export interface FieldOverrideInput<Key extends string = string, Changed = unkno
262
315
  readonly invalid: boolean;
263
316
  readonly errors: ReadonlyArray<string>;
264
317
  readonly changed: (value: Draft) => Changed;
318
+ /**
319
+ * A press on a flag (no `choice`) or one choice, applied to the draft as it
320
+ * lands: send it for a press, so two before the next draw both count.
321
+ */
322
+ readonly toggled: (choice?: string) => Changed;
265
323
  readonly blurred: Changed;
266
324
  /** What the key's element takes beyond the base field view. */
267
325
  readonly attrs: FieldAttrs;
@@ -405,6 +463,5 @@ export declare const FormView: {
405
463
  readonly canSubmit?: (model: Model) => boolean;
406
464
  }) => Submodel.View<Model, Message, FormViewInputs<Key>>;
407
465
  };
408
- //#endregion
409
466
  export {};
410
467
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;iBAiCiB;WACN;WACA;;;;;;;;;iBAUM;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;;;;;iBAOM,eAAe;WACrB,sBAAsB,KAAK,OAAO,cAAc;;;;;WAKhD,gBAAgB,SAAS,eAAe,cAAc;;;;;;;;WAQtD,WAAW,SAAS;;WAEpB,QAAQ;;;;;;WAMR;;;;;;;WAOA,SAAS,cAAc;;;;;WAKvB;;;iBAIM,WAAW;WACjB,SAAS,YAAY;WACrB,OAAO,gBAAgB,MAAM;WAC7B;WACA,QAAQ;WACR,SAAS,cAAc;;WAEvB;;WAEA;;WAEA;;WAEA;;;;;WAKA;aAEM,UAAU,OAAO;aACjB;aACA,WAAW;;;;;;;WAQjB,SAAS;;WAET;;WAEA;;;;;WAKA;;;iBAIM;WACN;WACA,OAAO;;WAEP;;;iBAIM,UAAU,OAAO,qCAAqC,eAAe;WAC3E,OAAO;WACP,QAAQ;WACR;;;;;WAKA;;;qBAUE,YAAU,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAuCV,WAAS,MAAA;;;;;;;;;;;;;UAkBZ,SAAS,oBAAoB,OAAO;;WAEnC,UAAU,cAAc;WACxB,QAAQ,OAAO,OAAO,KAAK,QAAQ,gBAAgB,MAAM;;WAEzD,UAAU;aACR,QAAQ,OAAO,UAAU,gB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