@slotted/react 0.1.0-beta.24 → 0.1.0-beta.26
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/{action-bar-D-V2uWjA.js → action-bar-DckD0Sug.js} +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/{cascader-DO1HiJT6.js → cascader-47GYpojH.js} +1 -1
- package/dist/cascader.js +1 -1
- package/dist/{checkbox-Hq1PXk04.js → checkbox-Dw9R1CGR.js} +3 -3
- package/dist/{checkbox-group-Ckoh-2GJ.js → checkbox-group-DDlz-UF4.js} +2 -2
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{color-picker-BsDplfdK.js → color-picker-BbyW5ALf.js} +3 -3
- package/dist/color-picker.js +1 -1
- package/dist/{column-manager-Dm5ZLz6p.js → column-manager-Bz0bb4mq.js} +3 -3
- package/dist/column-manager.js +1 -1
- package/dist/{combobox-vE8dmv4K.js → combobox-BA2nvbnA.js} +1 -1
- package/dist/combobox.js +1 -1
- package/dist/{context-menu-BxbGq4bu.js → context-menu-CfEEqDKr.js} +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/{currency-field-ZvfrfM0z.js → currency-field-CTzBMH8g.js} +1 -1
- package/dist/currency-field.js +1 -1
- package/dist/{dashboard-grid-Bx4J-aC7.js → dashboard-grid-WinSY-q3.js} +1 -1
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-Dez5RojO.js → data-grid-BWWvixwB.js} +16 -16
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-B18kLC9Q.js → data-list-iw9K_oiz.js} +2 -2
- package/dist/data-list.js +1 -1
- package/dist/{date-field-EBPrQL6A.js → date-field-B2WG_m4C.js} +1 -1
- package/dist/date-field.js +1 -1
- package/dist/{date-picker-B5V8NZCT.js → date-picker-B2wqU3Mw.js} +2 -2
- package/dist/date-picker.js +1 -1
- package/dist/{date-range-picker-B89Q973N.js → date-range-picker-BhQwOKkE.js} +2 -2
- package/dist/date-range-picker.js +1 -1
- package/dist/{datetime-field-DavJbR0H.js → datetime-field-CvKPkvaE.js} +1 -1
- package/dist/datetime-field.js +1 -1
- package/dist/{datetime-picker-Cx6Z52Ka.js → datetime-picker-C-PwlBW5.js} +2 -2
- package/dist/datetime-picker.js +1 -1
- package/dist/{datetime-range-picker-DYshAlgq.js → datetime-range-picker-0xs12Cf1.js} +2 -2
- package/dist/datetime-range-picker.js +1 -1
- package/dist/docs/app-shell.json +1 -1
- package/dist/docs/app-shell.md +1 -1
- package/dist/docs/dialog.json +1 -1
- package/dist/docs/dialog.md +1 -1
- package/dist/docs/drawer.json +1 -1
- package/dist/docs/drawer.md +1 -1
- package/dist/docs/field.json +16 -1
- package/dist/docs/field.md +3 -1
- package/dist/docs/form.json +14 -3
- package/dist/docs/form.md +3 -2
- package/dist/docs/guidelines/forms.md +89 -1
- package/dist/docs/guidelines/index.md +7 -0
- package/dist/docs/menu.json +2 -2
- package/dist/docs/menu.md +1 -1
- package/dist/{entity-picker-DB1HeuvJ.js → entity-picker-WkBLvR2T.js} +2 -2
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-CEIyV-fW.js → event-calendar-BaPllnNk.js} +3 -3
- package/dist/event-calendar.js +1 -1
- package/dist/{field-CnSMUZw6.js → field-CSSHwGq_.js} +106 -105
- package/dist/{field-group-RACkEXPp.js → field-group-DeBTueJW.js} +1 -1
- package/dist/field-group.js +1 -1
- package/dist/field.js +1 -1
- package/dist/{filter-bar-CzuAJsSf.js → filter-bar-DRQEl4-J.js} +9 -9
- package/dist/filter-bar.js +1 -1
- package/dist/{form-DEcJ7tHf.js → form-Im9lGi45.js} +13 -3
- package/dist/form.js +2 -2
- package/dist/{import-export-center-tbHmRTGb.js → import-export-center-C1t2tkzg.js} +1 -1
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +82 -82
- package/dist/{listbox-DvwUa0yH.js → listbox-B9cBuitS.js} +1 -1
- package/dist/listbox.js +1 -1
- package/dist/{markdown-Bw6L0Ifo.js → markdown-DX-mBYVT.js} +1 -1
- package/dist/markdown.js +1 -1
- package/dist/menu-parts-7F8syoFE.js +815 -0
- package/dist/menu.js +1 -1
- package/dist/{menubar-hazvXRYd.js → menubar-DzVGFn_I.js} +1 -1
- package/dist/menubar.js +1 -1
- package/dist/{multi-select-C1GNk4e0.js → multi-select-DnOAXeuF.js} +1 -1
- package/dist/multi-select.js +1 -1
- package/dist/{number-field-BPYe9kLB.js → number-field-C20-8yda.js} +1 -1
- package/dist/number-field.js +1 -1
- package/dist/{otp-input-CYtF30Q-.js → otp-input-YI-Emc5k.js} +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/{prompt-composer-C57BzYrn.js → prompt-composer-DsnPcKa4.js} +1 -1
- package/dist/prompt-composer.js +1 -1
- package/dist/{radio-group-CLX8D2Ew.js → radio-group-DA8_LbEz.js} +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/{rating-BB2k-Fay.js → rating-DSSqi85N.js} +1 -1
- package/dist/rating.js +1 -1
- package/dist/{saved-views-B54F_Bk4.js → saved-views-CsVRZTwK.js} +3 -3
- package/dist/saved-views.js +1 -1
- package/dist/{segmented-control-B1U-s58C.js → segmented-control-Dae5wU9X.js} +2 -2
- package/dist/segmented-control.js +1 -1
- package/dist/{select-OUGNxyS5.js → select-De77allF.js} +311 -309
- package/dist/select.js +1 -1
- package/dist/{slider-Bp1QjJKu.js → slider-DNRphJot.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/{split-button-Dg67gBMP.js → split-button-DA1wcDJB.js} +1 -1
- package/dist/split-button.js +1 -1
- package/dist/styles/cascader.css +1 -1
- package/dist/styles/checkbox-group.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/color-picker.css +1 -1
- package/dist/styles/column-manager.css +1 -1
- package/dist/styles/combobox.css +1 -1
- package/dist/styles/currency-field.css +1 -1
- package/dist/styles/data-grid.css +1 -1
- package/dist/styles/data-list.css +1 -1
- package/dist/styles/date-field.css +1 -1
- package/dist/styles/date-picker.css +1 -1
- package/dist/styles/date-range-picker.css +1 -1
- package/dist/styles/datetime-field.css +1 -1
- package/dist/styles/datetime-picker.css +1 -1
- package/dist/styles/datetime-range-picker.css +1 -1
- package/dist/styles/entity-picker.css +1 -1
- package/dist/styles/event-calendar.css +1 -1
- package/dist/styles/field-group.css +1 -1
- package/dist/styles/field.css +1 -1
- package/dist/styles/filter-bar.css +1 -1
- package/dist/styles/form.css +1 -1
- package/dist/styles/import-export-center.css +1 -1
- package/dist/styles/index.css +2 -2
- package/dist/styles/listbox.css +1 -1
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/multi-select.css +1 -1
- package/dist/styles/number-field.css +1 -1
- package/dist/styles/otp-input.css +1 -1
- package/dist/styles/prompt-composer.css +1 -1
- package/dist/styles/radio-group.css +1 -1
- package/dist/styles/rating.css +1 -1
- package/dist/styles/saved-views.css +1 -1
- package/dist/styles/segmented-control.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/slider.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/table.css +1 -1
- package/dist/styles/tags-input.css +1 -1
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/textarea.css +1 -1
- package/dist/styles/time-field.css +1 -1
- package/dist/styles/time-picker.css +1 -1
- package/dist/styles/time-range-picker.css +1 -1
- package/dist/styles/toggle-group.css +1 -1
- package/dist/styles/transfer.css +1 -1
- package/dist/styles/upload.css +1 -1
- package/dist/styles/wizard.css +2 -2
- package/dist/styles.css +1 -1
- package/dist/{switch-DmLzDbTb.js → switch-gR_OvGG8.js} +1 -1
- package/dist/switch.js +1 -1
- package/dist/{table-Cz9YpgLT.js → table-C3cjkzps.js} +12 -12
- package/dist/table.js +1 -1
- package/dist/{tags-input-CAmXKSeZ.js → tags-input-DEhtpizX.js} +1 -1
- package/dist/tags-input.js +1 -1
- package/dist/{text-field-CHYoral_.js → text-field-RGXN7zNu.js} +1 -1
- package/dist/text-field.js +1 -1
- package/dist/{textarea-47JGOZKv.js → textarea-AhpUmnMk.js} +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{time-field-D1-rNBsB.js → time-field-xkxX8JF6.js} +1 -1
- package/dist/time-field.js +1 -1
- package/dist/{time-picker-mwCULYh7.js → time-picker-Da_UhP9X.js} +2 -2
- package/dist/time-picker.js +1 -1
- package/dist/{time-range-picker-BKgsEHmd.js → time-range-picker-CfVzD53N.js} +2 -2
- package/dist/time-range-picker.js +1 -1
- package/dist/{toggle-group-Bnig_MWl.js → toggle-group-DoxPLYJ3.js} +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/{toolbar-EdmEn_ph.js → toolbar-CtSZ88HI.js} +1 -1
- package/dist/toolbar.js +1 -1
- package/dist/{transfer-CEHIa2XD.js → transfer-BMRyopEw.js} +5 -5
- package/dist/transfer.js +1 -1
- package/dist/types/field/field.d.ts +1 -1
- package/dist/types/field/field.d.ts.map +1 -1
- package/dist/types/field/field.types.d.ts +10 -0
- package/dist/types/field/field.types.d.ts.map +1 -1
- package/dist/types/field/index.d.ts +1 -1
- package/dist/types/field/index.d.ts.map +1 -1
- package/dist/types/form/form-parts.d.ts +7 -1
- package/dist/types/form/form-parts.d.ts.map +1 -1
- package/dist/types/form/form.types.d.ts +3 -0
- package/dist/types/form/form.types.d.ts.map +1 -1
- package/dist/types/form/index.d.ts +2 -2
- package/dist/types/form/index.d.ts.map +1 -1
- package/dist/types/menu/menu-items.d.ts.map +1 -1
- package/dist/types/select/select-parts.d.ts +1 -1
- package/dist/types/select/select-parts.d.ts.map +1 -1
- package/dist/types/select/select.types.d.ts +5 -1
- package/dist/types/select/select.types.d.ts.map +1 -1
- package/dist/{upload-S3d3tUt-.js → upload-BqVBpYaZ.js} +1 -1
- package/dist/upload.js +1 -1
- package/dist/{wizard-gZyH8HIo.js → wizard-CpYwQGQ-.js} +1 -1
- package/dist/wizard.js +1 -1
- package/package.json +6 -6
- package/dist/menu-parts-BDdCTmko.js +0 -805
|
@@ -18,8 +18,26 @@ triggers:
|
|
|
18
18
|
read-only,
|
|
19
19
|
permission,
|
|
20
20
|
conflict,
|
|
21
|
+
layout,
|
|
22
|
+
section,
|
|
23
|
+
width,
|
|
24
|
+
]
|
|
25
|
+
families:
|
|
26
|
+
[
|
|
27
|
+
form,
|
|
28
|
+
field,
|
|
29
|
+
field-group,
|
|
30
|
+
text-field,
|
|
31
|
+
number-field,
|
|
32
|
+
select,
|
|
33
|
+
currency-field,
|
|
34
|
+
checkbox,
|
|
35
|
+
radio-group,
|
|
36
|
+
segmented-control,
|
|
37
|
+
section,
|
|
38
|
+
grid,
|
|
39
|
+
page-header,
|
|
21
40
|
]
|
|
22
|
-
families: [form, field, text-field, select, currency-field, checkbox, section, grid, page-header]
|
|
23
41
|
---
|
|
24
42
|
|
|
25
43
|
# Forms
|
|
@@ -200,3 +218,73 @@ Why: A form whose fields touch reads as one control, and a spacing written field
|
|
|
200
218
|
Do: Write one `field` after another inside the `form`; set `--slotted-form-field-gap` on the theme to change the step for every form.
|
|
201
219
|
Don't: Write a margin or a spacer element between two fields, or wrap each field in an element of the page's own that breaks the run of fields the form spaces.
|
|
202
220
|
Check: Two consecutive fields of a form stand apart by the form's step, and no field or wrapper between them carries its own margin.
|
|
221
|
+
|
|
222
|
+
### FM-18 · One column at a bounded measure
|
|
223
|
+
|
|
224
|
+
Level: SHOULD
|
|
225
|
+
Applies to: every form a page draws, on any page width
|
|
226
|
+
Rule: The fields of a form stand in one column no wider than `--slotted-form-measure` (40rem); a field never spans the page's whole measure, and the page's own width does not widen the column.
|
|
227
|
+
Why: A reader goes down one column without losing their place, and a field as wide as an 80rem page puts the label and the end of the answer a head turn apart (Baymard, "Avoid Multi-Column Forms"; CXL, "Form Field Usability").
|
|
228
|
+
Do: Write the fields as direct children of `form`, which holds them at the measure; let the page keep its own width for the header and the footer.
|
|
229
|
+
Don't: Set the page to `measure` to narrow the form, widen a field past the measure with a style of the page's own, or wrap the fields in a grid that fills the page.
|
|
230
|
+
Check: In a page 80rem wide, no control of the form is wider than 40rem.
|
|
231
|
+
|
|
232
|
+
### FM-19 · Two fields share a row only when they are one answer
|
|
233
|
+
|
|
234
|
+
Level: SHOULD
|
|
235
|
+
Applies to: a row of a form that holds more than one field
|
|
236
|
+
Rule: Two fields stand side by side only when together they answer one question — a start and an end, a frequency and its interval, an amount and its unit — in a `field-group` whose `orientation` is `horizontal`; unrelated fields never share a row to fill width.
|
|
237
|
+
Why: Two unrelated fields side by side make the reading order zig-zag, and a reader skips the field on the right (Baymard, "Avoid Multi-Column Forms").
|
|
238
|
+
Do: Write the pair in one horizontal `field-group` whose legend names the answer they make together; keep every other field on a row of its own.
|
|
239
|
+
Don't: Write a two-column `grid` of fields to fill the width, or pair a name with a date because both are short.
|
|
240
|
+
Check: Every row with two or more fields is one `field-group`, and its legend names one answer the fields make together.
|
|
241
|
+
|
|
242
|
+
### FM-20 · A field's width says what it expects
|
|
243
|
+
|
|
244
|
+
Level: SHOULD
|
|
245
|
+
Applies to: every field whose answer has a known length
|
|
246
|
+
Rule: A field's `width` follows its expected answer: `short` for an integer of up to four digits, `medium` for an amount, a code or a choice among short words, `full` (the default) for free text, a name or a picker of records.
|
|
247
|
+
Why: The width of a control is a cue to the length of its answer, and a two-digit field as wide as a description reads as a request for a sentence (Baymard, "Form Field Usability: Matching User Expectations").
|
|
248
|
+
Do: Set `width` to `short` on a day of the month or an interval, and to `medium` on an amount or a currency; change `--slotted-field-width-short` and `--slotted-field-width-medium` on the theme to change the steps for every form.
|
|
249
|
+
Don't: Write a class or a style that sizes one field, or leave a numeric field of two digits at full width.
|
|
250
|
+
Check: No field whose answer is an integer of up to four digits renders a control wider than `--slotted-field-width-short`.
|
|
251
|
+
|
|
252
|
+
### FM-21 · Sections group a topic
|
|
253
|
+
|
|
254
|
+
Level: SHOULD
|
|
255
|
+
Applies to: a form with more than six fields, or with two or more topics
|
|
256
|
+
Rule: The fields are split by topic into `field-group`s, each with a legend that names the topic; consecutive groups stand apart by `--slotted-form-section-gap`, a step larger than the gap between two fields.
|
|
257
|
+
Why: A long form whose fields all stand at one distance shows no structure, and a reader cannot tell where one topic ends.
|
|
258
|
+
Do: Write each topic as a `field-group` with a `legend`, the groups as direct children of `form`; set `--slotted-form-section-gap` on the theme to change the step.
|
|
259
|
+
Don't: Write a margin, a heading or a separator of the page's own between two groups, or hold seven fields in one run with no group.
|
|
260
|
+
Check: A form with more than six fields holds at least two `field-group`s, and two consecutive groups stand further apart than two fields of one group.
|
|
261
|
+
|
|
262
|
+
### FM-22 · Every set of choices is a question
|
|
263
|
+
|
|
264
|
+
Level: MUST
|
|
265
|
+
Applies to: a `segmented-control`, a `radio-group` or a set of checkboxes in a form
|
|
266
|
+
Rule: A set of choices is a `field-group` whose legend asks the question the choices answer.
|
|
267
|
+
Why: A set of options with no question above it is announced as a list of words, and a reader who sees it out of order cannot tell what is being chosen.
|
|
268
|
+
Do: Write the legend as the question — "How often does it run?" — and the options as its answers.
|
|
269
|
+
Don't: Leave a segmented control or a radio set with no legend, or put the question in a placeholder or a description under the options.
|
|
270
|
+
Check: Every segmented control, radio group and checkbox set of the form has a `field-group` legend as its accessible name.
|
|
271
|
+
|
|
272
|
+
### FM-23 · Necessity is said once, the same way
|
|
273
|
+
|
|
274
|
+
Level: SHOULD
|
|
275
|
+
Applies to: every application whose forms hold required and optional fields
|
|
276
|
+
Rule: One `necessity` holds for the whole application, set once through the field defaults provider; `optional` is preferred, which marks the fields a reader may skip and says nothing on the rest.
|
|
277
|
+
Why: A form that marks some fields with an asterisk and others with a word asks the reader to learn two conventions, and in a form where most fields are required the asterisk on every one says nothing (Adam Silver, "Don't mark required fields with an asterisk").
|
|
278
|
+
Do: Set `necessity` to `optional` on the field defaults provider at the application's root.
|
|
279
|
+
Don't: Set `necessity` field by field, or mix a mark and a word in one form.
|
|
280
|
+
Check: No field of the application sets `necessity` on itself, and every form renders one convention.
|
|
281
|
+
|
|
282
|
+
### FM-24 · Help sits where its question is
|
|
283
|
+
|
|
284
|
+
Level: SHOULD
|
|
285
|
+
Applies to: every text that helps a reader answer a form
|
|
286
|
+
Rule: A format or a consequence of one answer is a one-line `description` under its control; the definition of a term is the field's `help` beside the label; what the whole record will do is the form's `aside`, beside the fields on a wide form and after them on a narrow one.
|
|
287
|
+
Why: Help placed away from its question is read after the answer is given, or not at all, and a paragraph above the form is skipped.
|
|
288
|
+
Do: Write the format under the field it applies to, the definition behind the help control, and the summary of the record in the aside.
|
|
289
|
+
Don't: Write a paragraph of help above the form, a description of more than one line, or a summary of the record in a field's description.
|
|
290
|
+
Check: Every help text of the form is a description, a help hint or the aside, and no description runs past one line.
|
|
@@ -56,6 +56,13 @@ Every active rule, one line each. Load this first; load a topic file when the ta
|
|
|
56
56
|
| FM-15 | SHOULD | The action is written through the command whose record says the same thing, with a fixed prefix that names the document it is about, and the document reads its own entries back by that prefix; no endpoint is invented in the client. | `forms.md` |
|
|
57
57
|
| FM-16 | SHOULD | A date entered in a form is a `date-picker`, which keeps typing in its field and adds the calendar behind its trigger; a `date-field` alone is not used in a form. | `forms.md` |
|
|
58
58
|
| FM-17 | SHOULD | The fields of a form are written as its direct children, in a `field-group` or in a `grid` for fields that stand side by side; the form spaces consecutive fields by `--slotted-form-field-gap`, and no field carries a margin of its own. | `forms.md` |
|
|
59
|
+
| FM-18 | SHOULD | The fields of a form stand in one column no wider than `--slotted-form-measure` (40rem); a field never spans the page's whole measure, and the page's own width does not widen the column. | `forms.md` |
|
|
60
|
+
| FM-19 | SHOULD | Two fields stand side by side only when together they answer one question — a start and an end, a frequency and its interval, an amount and its unit — in a `field-group` whose `orientation` is `horizontal`; unrelated fields never share a row to fill width. | `forms.md` |
|
|
61
|
+
| FM-20 | SHOULD | A field's `width` follows its expected answer: `short` for an integer of up to four digits, `medium` for an amount, a code or a choice among short words, `full` (the default) for free text, a name or a picker of records. | `forms.md` |
|
|
62
|
+
| FM-21 | SHOULD | The fields are split by topic into `field-group`s, each with a legend that names the topic; consecutive groups stand apart by `--slotted-form-section-gap`, a step larger than the gap between two fields. | `forms.md` |
|
|
63
|
+
| FM-22 | MUST | A set of choices is a `field-group` whose legend asks the question the choices answer. | `forms.md` |
|
|
64
|
+
| FM-23 | SHOULD | One `necessity` holds for the whole application, set once through the field defaults provider; `optional` is preferred, which marks the fields a reader may skip and says nothing on the rest. | `forms.md` |
|
|
65
|
+
| FM-24 | SHOULD | A format or a consequence of one answer is a one-line `description` under its control; the definition of a term is the field's `help` beside the label; what the whole record will do is the form's `aside`, beside the fields on a wide form and after them on a narrow one. | `forms.md` |
|
|
59
66
|
| LA-01 | SHOULD | A pager under a paged region is aligned to the end of the line. | `layout-alignment.md` |
|
|
60
67
|
| LA-02 | MUST | A consumer's row in the navigation column's pinned parts is inset by `--slotted-app-shell-row-inset` and starts with a mark column `--slotted-app-shell-row-mark` wide, the avatar centred in it. | `layout-alignment.md` |
|
|
61
68
|
| LA-03 | SHOULD | Below the header's narrow step the header's actions occupy one row: one action beside a plain title becomes its icon-only form, and two or more stand in a `toolbar` that folds into its menu, each item with its counterpart and the primary one without, so it stays. Beside a plain title that row is the title's line; under a rich title (visual, marks, subheading) `page-header` gives the toolbar a full row of its own. | `layout-alignment.md` |
|
package/dist/docs/menu.json
CHANGED
|
@@ -500,8 +500,8 @@
|
|
|
500
500
|
"name": "description",
|
|
501
501
|
"type": "ReactNode",
|
|
502
502
|
"defaultValue": "—",
|
|
503
|
-
"appliesTo": "MenuItem",
|
|
504
|
-
"description": "The line under the label, referenced with aria-describedby."
|
|
503
|
+
"appliesTo": "MenuItem, MenuCheckboxItem, MenuRadioItem",
|
|
504
|
+
"description": "The line under the label, referenced with aria-describedby; the label alone names the item."
|
|
505
505
|
},
|
|
506
506
|
{
|
|
507
507
|
"name": "meta",
|
package/dist/docs/menu.md
CHANGED
|
@@ -100,7 +100,7 @@ export default function MenuBasic() {
|
|
|
100
100
|
| `submenuCloseDelay` | `number` | 300 | Menu | How long, in milliseconds, a submenu stays open while the pointer travels toward it without reaching it. |
|
|
101
101
|
| `typeaheadTimeout` | `number` | 500 | Menu | How long, in milliseconds, typed letters keep adding to one search. |
|
|
102
102
|
| `icon` | `ReactNode` | — | MenuItem, MenuTrigger | The icon in the first column of the item. |
|
|
103
|
-
| `description` | `ReactNode` | — | MenuItem | The line under the label, referenced with aria-describedby. |
|
|
103
|
+
| `description` | `ReactNode` | — | MenuItem, MenuCheckboxItem, MenuRadioItem | The line under the label, referenced with aria-describedby; the label alone names the item. |
|
|
104
104
|
| `meta` | `ReactNode` | — | MenuItem, MenuTrigger | A count, a status or the value a submenu holds, in its own column before the shortcut or the chevron. |
|
|
105
105
|
| `shortcut` | `string` | — | MenuItem | A shortcut written as Mod+K, printed for the platform and announced with aria-keyshortcuts. The menu does not bind the key. |
|
|
106
106
|
| `textValue` | `string` | — | MenuItem | The text typeahead matches, when the label does not start with the word a reader would type. |
|
|
@@ -4,10 +4,10 @@ import { n, t as r } from "./icon-D04-_QFA.js";
|
|
|
4
4
|
import { t as i } from "./spinner-ring-DyfaYloA.js";
|
|
5
5
|
import { t as a } from "./avatar-DLWElrgg.js";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import { b as o } from "./field-
|
|
7
|
+
import { b as o } from "./field-CSSHwGq_.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import { t as s } from "./highlight-9lRPIZ9O.js";
|
|
10
|
-
import { c, i as l, n as ee, o as u, s as te } from "./select-
|
|
10
|
+
import { c, i as l, n as ee, o as u, s as te } from "./select-De77allF.js";
|
|
11
11
|
import { keyedProps as d, selectorKeyProps as ne } from "@slotted/core/selector-key";
|
|
12
12
|
import { createArrowNavigation as re, createRemovalFocus as ie } from "@slotted/core/focus";
|
|
13
13
|
import { createControllable as f } from "@slotted/core/state";
|
package/dist/entity-picker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "./entity-picker-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "./entity-picker-WkBLvR2T.js";
|
|
2
2
|
export { u as CREATE_OPTION, d as ENTITY_PICKER_FALLBACK, a as EntityPicker, n as EntityPickerDefaultsProvider, e as EntityPickerOptionDescription, s as EntityPickerOptionLabel, l as EntityPickerOptionMedia, t as EntityPickerOptionMeta, o as RETRY_OPTION, c as localEntitySource, i as rememberRecent, r as useEntityPickerDefaults };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { n as e, r as t } from "./i18n-D7xXDd8-.js";
|
|
2
2
|
import { n, t as r } from "./icon-D04-_QFA.js";
|
|
3
|
-
import { _ as i, n as a, r as o, t as s } from "./menu-parts-
|
|
3
|
+
import { _ as i, n as a, r as o, t as s } from "./menu-parts-7F8syoFE.js";
|
|
4
4
|
import { c, d as l, i as u, l as d, n as f, o as p, r as m, s as h } from "./drawer-Du1aC1px.js";
|
|
5
5
|
import { n as g } from "./progress-indicator-D0acshNn.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import { a as _, c as v, f as ee, i as te, l as ne, o as re, p as ie, r as ae, u as oe } from "./popover-BfEn2wdZ.js";
|
|
8
|
-
import { n as se, r as y, t as ce } from "./context-menu-
|
|
9
|
-
import { a as le, t as ue } from "./segmented-control-
|
|
8
|
+
import { n as se, r as y, t as ce } from "./context-menu-CfEEqDKr.js";
|
|
9
|
+
import { a as le, t as ue } from "./segmented-control-Dae5wU9X.js";
|
|
10
10
|
import { keyedProps as de, selectorKeyProps as fe, withSelectorKey as pe } from "@slotted/core/selector-key";
|
|
11
11
|
import { createContext as me, createElement as he, useCallback as b, useContext as ge, useEffect as _e, useId as ve, useImperativeHandle as ye, useLayoutEffect as be, useMemo as xe, useRef as x, useState as S } from "react";
|
|
12
12
|
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
package/dist/event-calendar.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "./event-calendar-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./event-calendar-BaPllnNk.js";
|
|
2
2
|
export { t as EVENT_CALENDAR_FALLBACK, r as EventCalendar, n as EventCalendarDefaultsProvider, e as useEventCalendarDefaults };
|
|
@@ -4,15 +4,15 @@ import { n as t, t as n } from "./icon-D04-_QFA.js";
|
|
|
4
4
|
import { t as r } from "./inline-message-DgEAUjar.js";
|
|
5
5
|
import { a as i, i as a, n as o, o as s, r as c, t as l } from "./tooltip-DrFiRlH8.js";
|
|
6
6
|
import { keyedProps as u, withSelectorKey as d } from "@slotted/core/selector-key";
|
|
7
|
-
import { Children as f, createContext as p, isValidElement as m, useCallback as h, useContext as g, useEffect as _, useId as v, useMemo as y, useRef as
|
|
8
|
-
import { Fragment as
|
|
9
|
-
import { fieldMessages as
|
|
7
|
+
import { Children as f, createContext as p, isValidElement as m, useCallback as h, useContext as g, useEffect as _, useId as v, useMemo as y, useRef as ee, useState as b } from "react";
|
|
8
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
9
|
+
import { fieldMessages as w } from "@slotted/core/i18n";
|
|
10
10
|
//#region src/field/field-context.ts
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
return g(
|
|
11
|
+
var T = p(void 0);
|
|
12
|
+
function E() {
|
|
13
|
+
return g(T);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function te(e) {
|
|
16
16
|
return {
|
|
17
17
|
control: `${e}-control`,
|
|
18
18
|
counter: `${e}-counter`,
|
|
@@ -23,14 +23,14 @@ function ee(e) {
|
|
|
23
23
|
label: `${e}-label`
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
var
|
|
26
|
+
var ne = [
|
|
27
27
|
"indicator",
|
|
28
28
|
"help",
|
|
29
29
|
"description",
|
|
30
30
|
"counter",
|
|
31
31
|
"error"
|
|
32
32
|
];
|
|
33
|
-
function
|
|
33
|
+
function D(e, t, n) {
|
|
34
34
|
switch (e) {
|
|
35
35
|
case "mark": return t ? {
|
|
36
36
|
hidden: !0,
|
|
@@ -47,33 +47,33 @@ function k(e, t, n) {
|
|
|
47
47
|
case "none": return null;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function O(e) {
|
|
51
51
|
return e.max === void 0 ? String(e.length) : `${e.length}/${e.max}`;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function k(e) {
|
|
54
54
|
return e.max !== void 0 && e.length > e.max;
|
|
55
55
|
}
|
|
56
|
-
var
|
|
57
|
-
function
|
|
58
|
-
|
|
56
|
+
var A = (e) => e != null && e !== !1 && e !== "", j = /* @__PURE__ */ new WeakMap();
|
|
57
|
+
function M(e, t) {
|
|
58
|
+
j.set(e, t);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
return typeof e == "function" ?
|
|
60
|
+
function N(e) {
|
|
61
|
+
return typeof e == "function" ? j.get(e) : void 0;
|
|
62
62
|
}
|
|
63
63
|
//#endregion
|
|
64
64
|
//#region src/field/field-defaults.tsx
|
|
65
|
-
var
|
|
65
|
+
var P = p({
|
|
66
66
|
disabled: void 0,
|
|
67
67
|
labelPlacement: "top",
|
|
68
68
|
necessity: "mark",
|
|
69
69
|
readOnly: void 0,
|
|
70
70
|
size: "md"
|
|
71
71
|
});
|
|
72
|
-
function
|
|
73
|
-
return g(
|
|
72
|
+
function F() {
|
|
73
|
+
return g(P);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
let o =
|
|
75
|
+
function I({ children: e, disabled: t, labelPlacement: n, necessity: r, readOnly: i, size: a }) {
|
|
76
|
+
let o = F(), s = y(() => ({
|
|
77
77
|
disabled: t ?? o.disabled,
|
|
78
78
|
labelPlacement: n ?? o.labelPlacement,
|
|
79
79
|
necessity: r ?? o.necessity,
|
|
@@ -87,20 +87,20 @@ function R({ children: e, disabled: t, labelPlacement: n, necessity: r, readOnly
|
|
|
87
87
|
i,
|
|
88
88
|
a
|
|
89
89
|
]);
|
|
90
|
-
return /* @__PURE__ */
|
|
90
|
+
return /* @__PURE__ */ S(P.Provider, {
|
|
91
91
|
value: s,
|
|
92
92
|
children: e
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
//#endregion
|
|
96
96
|
//#region src/field/field-parts.tsx
|
|
97
|
-
function
|
|
97
|
+
function L(e, t) {
|
|
98
98
|
return (n) => {
|
|
99
99
|
e?.(n), n.defaultPrevented || t(n);
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
let n =
|
|
102
|
+
function R(e, t) {
|
|
103
|
+
let n = E()?.registerMessage;
|
|
104
104
|
_(() => {
|
|
105
105
|
if (n !== void 0) return n(e, t), () => n(e, !1);
|
|
106
106
|
}, [
|
|
@@ -109,10 +109,10 @@ function B(e, t) {
|
|
|
109
109
|
e
|
|
110
110
|
]);
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
let s =
|
|
112
|
+
function z({ children: t, htmlFor: n, id: r, ref: i, render: a, ...o }) {
|
|
113
|
+
let s = E(), c = e(w), l = D(s?.necessity ?? "mark", s?.required === !0, s?.t ?? c), f = u({
|
|
114
114
|
...o,
|
|
115
|
-
children: /* @__PURE__ */
|
|
115
|
+
children: /* @__PURE__ */ C(x, { children: [t, l === null ? null : /* @__PURE__ */ S("span", {
|
|
116
116
|
...d(l.hidden ? { "aria-hidden": !0 } : {}, "part", "mark"),
|
|
117
117
|
children: l.text
|
|
118
118
|
})] }),
|
|
@@ -120,13 +120,13 @@ function te({ children: t, htmlFor: n, id: r, ref: i, render: a, ...o }) {
|
|
|
120
120
|
htmlFor: n ?? s?.ids.control,
|
|
121
121
|
id: r ?? s?.ids.label
|
|
122
122
|
});
|
|
123
|
-
return a === void 0 ? /* @__PURE__ */
|
|
123
|
+
return a === void 0 ? /* @__PURE__ */ S("label", {
|
|
124
124
|
...f,
|
|
125
125
|
ref: i
|
|
126
126
|
}) : a(f);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
let l =
|
|
128
|
+
function B({ "aria-describedby": e, "aria-invalid": t, "aria-required": n, disabled: r, id: i, readOnly: a, ref: o, render: s, ...c }) {
|
|
129
|
+
let l = E(), d = l?.registerControl;
|
|
130
130
|
_(() => d?.(), [d]);
|
|
131
131
|
let f = [e, l?.describedBy].filter(Boolean).join(" ") || void 0, p = u({
|
|
132
132
|
...c,
|
|
@@ -138,14 +138,14 @@ function ne({ "aria-describedby": e, "aria-invalid": t, "aria-required": n, disa
|
|
|
138
138
|
id: i ?? l?.ids.control,
|
|
139
139
|
readOnly: a ?? l?.readOnly
|
|
140
140
|
});
|
|
141
|
-
return s === void 0 ? /* @__PURE__ */
|
|
141
|
+
return s === void 0 ? /* @__PURE__ */ S("input", {
|
|
142
142
|
...p,
|
|
143
143
|
ref: o
|
|
144
144
|
}) : s(p);
|
|
145
145
|
}
|
|
146
146
|
function V({ children: e, mark: t, tone: n, ...i }) {
|
|
147
|
-
let a =
|
|
148
|
-
return
|
|
147
|
+
let a = E();
|
|
148
|
+
return R("description", A(e)), /* @__PURE__ */ S(r, {
|
|
149
149
|
...i,
|
|
150
150
|
disabled: a?.disabled,
|
|
151
151
|
id: a?.ids.description,
|
|
@@ -156,8 +156,8 @@ function V({ children: e, mark: t, tone: n, ...i }) {
|
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
function H({ children: e, mark: t, tone: n, ...i }) {
|
|
159
|
-
let a =
|
|
160
|
-
return
|
|
159
|
+
let a = E();
|
|
160
|
+
return R("error", A(e)), /* @__PURE__ */ S(r, {
|
|
161
161
|
...i,
|
|
162
162
|
disabled: a?.disabled,
|
|
163
163
|
id: a?.ids.error,
|
|
@@ -168,53 +168,53 @@ function H({ children: e, mark: t, tone: n, ...i }) {
|
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
function U({ children: e, invalid: t, ref: n, render: r, ...i }) {
|
|
171
|
-
let a =
|
|
171
|
+
let a = E(), o = a?.registerCounter, s = a?.count;
|
|
172
172
|
_(() => {
|
|
173
173
|
if (o !== void 0) return o(!0), () => o(!1);
|
|
174
174
|
}, [o]);
|
|
175
|
-
let c = e === void 0 && s !== void 0, l = t ?? (c && s !== void 0 ?
|
|
175
|
+
let c = e === void 0 && s !== void 0, l = t ?? (c && s !== void 0 ? k(s) : !1), d = u({
|
|
176
176
|
...i,
|
|
177
|
-
children: c && s !== void 0 ?
|
|
177
|
+
children: c && s !== void 0 ? O(s) : e,
|
|
178
178
|
...l ? { "data-invalid": "" } : {},
|
|
179
179
|
"data-part": "counter",
|
|
180
180
|
id: i.id ?? a?.ids.counter
|
|
181
181
|
});
|
|
182
|
-
return r === void 0 ? /* @__PURE__ */
|
|
182
|
+
return r === void 0 ? /* @__PURE__ */ S("span", {
|
|
183
183
|
...d,
|
|
184
184
|
ref: n
|
|
185
185
|
}) : r(d);
|
|
186
186
|
}
|
|
187
187
|
function W({ children: e, ref: t, render: n, ...r }) {
|
|
188
|
-
let i =
|
|
188
|
+
let i = E(), a = i?.registerHeader;
|
|
189
189
|
_(() => {
|
|
190
190
|
if (a !== void 0) return a(!0), () => a(!1);
|
|
191
191
|
}, [a]);
|
|
192
|
-
let o = i?.count, s = o === void 0 || i?.hasCounter === !0 ? null : /* @__PURE__ */
|
|
193
|
-
...
|
|
192
|
+
let o = i?.count, s = o === void 0 || i?.hasCounter === !0 ? null : /* @__PURE__ */ S("span", {
|
|
193
|
+
...k(o) ? { "data-invalid": "" } : {},
|
|
194
194
|
"data-part": "counter",
|
|
195
195
|
"data-part-counter": "",
|
|
196
196
|
id: i?.ids.counter,
|
|
197
|
-
children:
|
|
197
|
+
children: O(o)
|
|
198
198
|
}), c = u({
|
|
199
199
|
...r,
|
|
200
|
-
children: /* @__PURE__ */
|
|
200
|
+
children: /* @__PURE__ */ C(x, { children: [e, s] }),
|
|
201
201
|
"data-part": "header"
|
|
202
202
|
});
|
|
203
|
-
return n === void 0 ? /* @__PURE__ */
|
|
203
|
+
return n === void 0 ? /* @__PURE__ */ S("div", {
|
|
204
204
|
...c,
|
|
205
205
|
ref: t
|
|
206
206
|
}) : n(c);
|
|
207
207
|
}
|
|
208
208
|
function G({ children: e, id: t, ref: n, render: r, ...i }) {
|
|
209
|
-
let a =
|
|
210
|
-
|
|
209
|
+
let a = E();
|
|
210
|
+
R("indicator", A(e));
|
|
211
211
|
let o = u({
|
|
212
212
|
...i,
|
|
213
213
|
children: e,
|
|
214
214
|
"data-part": "indicator",
|
|
215
215
|
id: t ?? a?.ids.indicator
|
|
216
216
|
});
|
|
217
|
-
return r === void 0 ? /* @__PURE__ */
|
|
217
|
+
return r === void 0 ? /* @__PURE__ */ S("span", {
|
|
218
218
|
...o,
|
|
219
219
|
ref: n
|
|
220
220
|
}) : r(o);
|
|
@@ -224,15 +224,15 @@ function K({ ref: e, render: t, type: n, ...r }) {
|
|
|
224
224
|
...r,
|
|
225
225
|
"data-part": "action"
|
|
226
226
|
});
|
|
227
|
-
return t === void 0 ? /* @__PURE__ */
|
|
227
|
+
return t === void 0 ? /* @__PURE__ */ S("button", {
|
|
228
228
|
...i,
|
|
229
229
|
ref: e,
|
|
230
230
|
type: n ?? "button"
|
|
231
231
|
}) : t(i);
|
|
232
232
|
}
|
|
233
233
|
function q({ children: t, defaultOpen: n, onOpenChange: r, open: a, side: s, ...u }) {
|
|
234
|
-
let d =
|
|
235
|
-
return
|
|
234
|
+
let d = E(), f = e(w), p = v(), m = d?.ids.help ?? `slotted-field-help-${p}`;
|
|
235
|
+
return R("help", A(t)), /* @__PURE__ */ S(x, { children: /* @__PURE__ */ C(i, {
|
|
236
236
|
closeOnPress: !1,
|
|
237
237
|
defaultOpen: n,
|
|
238
238
|
describes: "none",
|
|
@@ -240,22 +240,22 @@ function q({ children: t, defaultOpen: n, onOpenChange: r, open: a, side: s, ...
|
|
|
240
240
|
open: a,
|
|
241
241
|
openOn: "manual",
|
|
242
242
|
side: s,
|
|
243
|
-
children: [/* @__PURE__ */
|
|
243
|
+
children: [/* @__PURE__ */ S(J, {
|
|
244
244
|
...u,
|
|
245
245
|
"aria-describedby": u["aria-describedby"] ?? m,
|
|
246
246
|
"aria-label": u["aria-label"] ?? (d?.t ?? f)("help"),
|
|
247
|
-
children: /* @__PURE__ */
|
|
247
|
+
children: /* @__PURE__ */ S("span", {
|
|
248
248
|
"data-part": "help-text",
|
|
249
249
|
"data-part-help-text": "",
|
|
250
250
|
hidden: !0,
|
|
251
251
|
id: m,
|
|
252
252
|
children: t
|
|
253
253
|
})
|
|
254
|
-
}), /* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ C(c, { children: [/* @__PURE__ */ S(o, { children: t }), /* @__PURE__ */ S(l, {})] })]
|
|
255
255
|
}) });
|
|
256
256
|
}
|
|
257
257
|
function J({ children: e, onBlur: r, onClick: i, onFocus: o, onPointerEnter: c, onPointerLeave: l, ref: u, ...f }) {
|
|
258
|
-
let p = s(), m =
|
|
258
|
+
let p = s(), m = ee(!1);
|
|
259
259
|
_(() => {
|
|
260
260
|
p.open || (m.current = !1);
|
|
261
261
|
}, [p.open]);
|
|
@@ -267,7 +267,7 @@ function J({ children: e, onBlur: r, onClick: i, onFocus: o, onPointerEnter: c,
|
|
|
267
267
|
e.target.matches(":focus-visible") && p.toggle(!0, "keyboard", e.nativeEvent);
|
|
268
268
|
}, y = (e) => {
|
|
269
269
|
p.toggle(!1, "blur", e.nativeEvent);
|
|
270
|
-
},
|
|
270
|
+
}, b = (e) => {
|
|
271
271
|
let t = e.detail === 0 ? "keyboard" : "pointer";
|
|
272
272
|
if (p.open && m.current) {
|
|
273
273
|
m.current = !1, p.toggle(!1, t, e.nativeEvent);
|
|
@@ -275,15 +275,15 @@ function J({ children: e, onBlur: r, onClick: i, onFocus: o, onPointerEnter: c,
|
|
|
275
275
|
}
|
|
276
276
|
m.current = !0, p.toggle(!0, t, e.nativeEvent);
|
|
277
277
|
};
|
|
278
|
-
return /* @__PURE__ */
|
|
278
|
+
return /* @__PURE__ */ C(a, {
|
|
279
279
|
...d(f, "part", "help"),
|
|
280
|
-
onBlur:
|
|
281
|
-
onClick:
|
|
282
|
-
onFocus:
|
|
283
|
-
onPointerEnter:
|
|
284
|
-
onPointerLeave:
|
|
280
|
+
onBlur: L(r, y),
|
|
281
|
+
onClick: L(i, b),
|
|
282
|
+
onFocus: L(o, v),
|
|
283
|
+
onPointerEnter: L(c, h),
|
|
284
|
+
onPointerLeave: L(l, g),
|
|
285
285
|
ref: u,
|
|
286
|
-
children: [/* @__PURE__ */
|
|
286
|
+
children: [/* @__PURE__ */ S(n, { children: /* @__PURE__ */ S(t, { name: "circle-question" }) }), e]
|
|
287
287
|
});
|
|
288
288
|
}
|
|
289
289
|
//#endregion
|
|
@@ -301,67 +301,68 @@ function X(e, t) {
|
|
|
301
301
|
}
|
|
302
302
|
if (!m(e) || e.type === Z) return t;
|
|
303
303
|
let { props: n, type: r } = e, i = Y.get(r);
|
|
304
|
-
return i !== void 0 &&
|
|
304
|
+
return i !== void 0 && A(n.children) && t.messages.push(i), r === U && (t.hasCounter = !0), r === W && (t.hasHeader = !0), t.count ??= N(r)?.(n), X(n.children, t);
|
|
305
305
|
}
|
|
306
|
-
function Z({ children: t, disabled: n, id: r, invalid: i, labelPlacement: a, messages: o, necessity: s, readOnly: c, ref: l, render: d, required: p, size: g, ...D }) {
|
|
307
|
-
let
|
|
308
|
-
_(() =>
|
|
309
|
-
let
|
|
306
|
+
function Z({ children: t, disabled: n, id: r, invalid: i, labelPlacement: a, messages: o, necessity: s, readOnly: c, ref: l, render: d, required: p, size: g, width: E = "full", ...D }) {
|
|
307
|
+
let A = F(), j = e(w, o), M = v(), N = y(() => te(r ?? `slotted-field-${M}`), [M, r]), [P, I] = b([]), [L, R] = b(void 0), [B, V] = b(!1), [H, U] = b(!1), [W, G] = b(!1), K = ee(!1);
|
|
308
|
+
_(() => G(!0), []);
|
|
309
|
+
let q = W ? void 0 : X(t, {
|
|
310
310
|
count: void 0,
|
|
311
311
|
hasCounter: !1,
|
|
312
312
|
hasHeader: !1,
|
|
313
313
|
messages: []
|
|
314
|
-
}),
|
|
314
|
+
}), J = q?.messages ?? P, Y = q === void 0 ? L : q.count, Z = q?.hasCounter ?? B, re = q?.hasHeader ?? H, ie = h((e, t) => {
|
|
315
315
|
I((n) => t === n.includes(e) ? n : t ? [...n, e] : n.filter((t) => t !== e));
|
|
316
|
-
}, []),
|
|
317
|
-
|
|
318
|
-
}, []),
|
|
316
|
+
}, []), ae = h(() => {
|
|
317
|
+
K.current = !0;
|
|
318
|
+
}, []), oe = h((e) => V(e), []), se = h((e) => U(e), []);
|
|
319
319
|
_(() => {}, []);
|
|
320
|
-
let
|
|
321
|
-
count:
|
|
322
|
-
describedBy:
|
|
323
|
-
disabled:
|
|
324
|
-
hasCounter:
|
|
325
|
-
hasHeader:
|
|
326
|
-
ids:
|
|
320
|
+
let ce = Z || Y !== void 0, le = ne.filter((e) => e === "counter" ? ce : J.includes(e)).map((e) => N[e]).join(" ") || void 0, Q = g ?? A.size, ue = n ?? A.disabled, de = c ?? A.readOnly, fe = s ?? A.necessity, pe = {
|
|
321
|
+
count: Y,
|
|
322
|
+
describedBy: le,
|
|
323
|
+
disabled: ue,
|
|
324
|
+
hasCounter: Z,
|
|
325
|
+
hasHeader: re,
|
|
326
|
+
ids: N,
|
|
327
327
|
invalid: i,
|
|
328
328
|
messageSize: Q === "lg" ? "md" : "sm",
|
|
329
|
-
necessity:
|
|
330
|
-
readOnly:
|
|
331
|
-
registerControl:
|
|
332
|
-
registerCounter:
|
|
333
|
-
registerHeader:
|
|
334
|
-
registerMessage:
|
|
329
|
+
necessity: fe,
|
|
330
|
+
readOnly: de,
|
|
331
|
+
registerControl: ae,
|
|
332
|
+
registerCounter: oe,
|
|
333
|
+
registerHeader: se,
|
|
334
|
+
registerMessage: ie,
|
|
335
335
|
required: p,
|
|
336
|
-
setCount:
|
|
336
|
+
setCount: R,
|
|
337
337
|
size: Q,
|
|
338
|
-
t:
|
|
339
|
-
},
|
|
340
|
-
...
|
|
338
|
+
t: j
|
|
339
|
+
}, me = Y === void 0 || Z || re ? null : /* @__PURE__ */ S("span", {
|
|
340
|
+
...k(Y) ? { "data-invalid": "" } : {},
|
|
341
341
|
"data-part": "counter",
|
|
342
342
|
"data-part-counter": "",
|
|
343
|
-
id:
|
|
344
|
-
children:
|
|
345
|
-
}), $ = !1,
|
|
343
|
+
id: N.counter,
|
|
344
|
+
children: O(Y)
|
|
345
|
+
}), $ = !1, he = f.map(t, (e) => $ || !m(e) || e.type !== z ? e : ($ = !0, /* @__PURE__ */ C(x, { children: [e, me] }))), ge = u({
|
|
346
346
|
...D,
|
|
347
|
-
children: /* @__PURE__ */
|
|
348
|
-
...
|
|
347
|
+
children: /* @__PURE__ */ C(x, { children: [he, $ ? null : me] }),
|
|
348
|
+
...ue === !0 ? { "data-disabled": "" } : {},
|
|
349
349
|
...i === !0 ? { "data-invalid": "" } : {},
|
|
350
|
-
...
|
|
350
|
+
...de === !0 ? { "data-readonly": "" } : {},
|
|
351
351
|
...p === !0 ? { "data-required": "" } : {},
|
|
352
|
-
"data-label-placement": a ??
|
|
353
|
-
"data-necessity":
|
|
352
|
+
"data-label-placement": a ?? A.labelPlacement,
|
|
353
|
+
"data-necessity": fe,
|
|
354
354
|
"data-part": "root",
|
|
355
355
|
"data-size": Q,
|
|
356
|
-
"data-ui": "field"
|
|
356
|
+
"data-ui": "field",
|
|
357
|
+
"data-width": E
|
|
357
358
|
});
|
|
358
|
-
return /* @__PURE__ */
|
|
359
|
-
value:
|
|
360
|
-
children: d === void 0 ? /* @__PURE__ */
|
|
361
|
-
...
|
|
359
|
+
return /* @__PURE__ */ S(T.Provider, {
|
|
360
|
+
value: pe,
|
|
361
|
+
children: d === void 0 ? /* @__PURE__ */ S("div", {
|
|
362
|
+
...ge,
|
|
362
363
|
ref: l
|
|
363
|
-
}) : d(
|
|
364
|
+
}) : d(ge)
|
|
364
365
|
});
|
|
365
366
|
}
|
|
366
367
|
//#endregion
|
|
367
|
-
export {
|
|
368
|
+
export { O as _, V as a, E as b, q as c, I as d, F as f, te as g, M as h, U as i, G as l, T as m, K as n, H as o, ne as p, B as r, W as s, Z as t, z as u, k as v, D as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as e } from "./i18n-D7xXDd8-.js";
|
|
2
|
-
import { d as t, f as n, y as r } from "./field-
|
|
2
|
+
import { d as t, f as n, y as r } from "./field-CSSHwGq_.js";
|
|
3
3
|
import { t as i } from "./inline-message-DgEAUjar.js";
|
|
4
4
|
import { keyedProps as a, withSelectorKey as o } from "@slotted/core/selector-key";
|
|
5
5
|
import { createContext as s, isValidElement as c, useCallback as l, useContext as u, useEffect as d, useId as f, useMemo as p, useState as m } from "react";
|
package/dist/field-group.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./field-group-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./field-group-DeBTueJW.js";
|
|
2
2
|
export { o as FieldGroup, t as FieldGroupContent, e as FieldGroupDescription, r as FieldGroupError, a as FieldGroupLegend, n as deriveFieldGroupIds, i as useFieldGroup };
|
package/dist/field.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, i as s, l as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h, v as g, y as _ } from "./field-
|
|
1
|
+
import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, i as s, l as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h, v as g, y as _ } from "./field-CSSHwGq_.js";
|
|
2
2
|
export { d as FIELD_DESCRIBED_ORDER, m as Field, l as FieldAction, f as FieldControl, s as FieldCounter, i as FieldDefaultsProvider, t as FieldDescription, u as FieldError, p as FieldHeader, r as FieldHelp, c as FieldIndicator, h as FieldLabel, o as deriveFieldIds, e as formatFieldCount, g as isFieldCountOver, _ as necessityMark, n as useField, a as useFieldDefaults };
|