@antadesign/anta 0.3.19 → 0.3.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/README.md +1 -1
  2. package/dist/anta_helpers.d.ts +11 -2
  3. package/dist/anta_helpers.js +9 -0
  4. package/dist/components/Banner.d.ts +3 -3
  5. package/dist/components/Button.d.ts +1 -1
  6. package/dist/components/Calendar.d.ts +11 -12
  7. package/dist/components/Card.d.ts +1 -1
  8. package/dist/components/Card.js +1 -1
  9. package/dist/components/Checkbox.d.ts +8 -9
  10. package/dist/components/Dialog.d.ts +1 -1
  11. package/dist/components/Expander.d.ts +5 -6
  12. package/dist/components/Input.d.ts +2 -2
  13. package/dist/components/Input.js +1 -1
  14. package/dist/components/InputAutocomplete.d.ts +8 -8
  15. package/dist/components/InputAutocomplete.js +24 -18
  16. package/dist/components/InputTime.d.ts +3 -3
  17. package/dist/components/InputTime.js +1 -1
  18. package/dist/components/Menu.d.ts +2 -2
  19. package/dist/components/MenuItem.d.ts +1 -1
  20. package/dist/components/MenuItem.js +1 -1
  21. package/dist/components/Progress.d.ts +1 -1
  22. package/dist/components/RadioGroup.d.ts +14 -15
  23. package/dist/components/RadioGroup.js +5 -2
  24. package/dist/components/Select.d.ts +33 -40
  25. package/dist/components/Select.js +6 -2
  26. package/dist/components/SelectFaceted.d.ts +27 -33
  27. package/dist/components/SelectFaceted.js +5 -1
  28. package/dist/components/Slider.d.ts +5 -5
  29. package/dist/components/Switch.d.ts +4 -4
  30. package/dist/components/TabPanel.d.ts +1 -2
  31. package/dist/components/TabPanel.js +0 -1
  32. package/dist/components/Tabs.d.ts +9 -9
  33. package/dist/components/Tabs.js +5 -2
  34. package/dist/components/Text.d.ts +5 -3
  35. package/dist/components/Text.js +7 -3
  36. package/dist/components/Title.d.ts +1 -1
  37. package/dist/components/Toaster.d.ts +1 -1
  38. package/dist/components/Tooltip.d.ts +1 -1
  39. package/dist/elements/a-card.css +1 -1
  40. package/dist/elements/a-dialog.css +1 -1
  41. package/dist/elements/a-expander.css +1 -1
  42. package/dist/elements/a-expander.d.ts +1 -0
  43. package/dist/elements/a-expander.js +12 -2
  44. package/dist/elements/a-menu.d.ts +1 -8
  45. package/dist/elements/a-menu.js +1 -40
  46. package/dist/elements/a-progress.css +1 -1
  47. package/dist/elements/a-text.d.ts +4 -0
  48. package/dist/elements/a-text.js +10 -3
  49. package/dist/elements/a-tooltip.css +1 -1
  50. package/dist/elements/a-tooltip.d.ts +8 -1
  51. package/dist/elements/a-tooltip.js +88 -15
  52. package/dist/elements/index.d.ts +1 -1
  53. package/dist/general_types.d.ts +33 -22
  54. package/dist/index.d.ts +3 -3
  55. package/dist/theme-anta.css +1 -1
  56. package/docs/accessibility.md +4 -4
  57. package/docs/changelog.md +40 -13
  58. package/docs/comparison.md +1 -1
  59. package/docs/components/banner.md +17 -17
  60. package/docs/components/button.md +6 -6
  61. package/docs/components/card.md +5 -6
  62. package/docs/components/checkbox.md +17 -18
  63. package/docs/components/dialog.md +2 -2
  64. package/docs/components/expander.md +27 -30
  65. package/docs/components/icon.md +1 -1
  66. package/docs/components/input-autocomplete.md +15 -16
  67. package/docs/components/input-date.md +54 -59
  68. package/docs/components/input-time.md +7 -7
  69. package/docs/components/input.md +14 -14
  70. package/docs/components/menu.md +72 -8
  71. package/docs/components/progress.md +2 -2
  72. package/docs/components/radio.md +28 -25
  73. package/docs/components/select-faceted.md +95 -100
  74. package/docs/components/select.md +113 -115
  75. package/docs/components/slider.md +15 -10
  76. package/docs/components/switch.md +13 -13
  77. package/docs/components/tabs.md +23 -23
  78. package/docs/components/tag.md +5 -5
  79. package/docs/components/text.md +31 -7
  80. package/docs/components/title.md +1 -1
  81. package/docs/components/toaster.md +4 -4
  82. package/docs/components/tooltip.md +2 -2
  83. package/docs/credits.md +0 -4
  84. package/docs/index.md +1 -1
  85. package/docs/install-config.md +12 -7
  86. package/docs/normalization.md +6 -9
  87. package/docs/overview.md +1 -1
  88. package/docs/packages/stickers.md +1 -1
  89. package/docs/theming.md +15 -0
  90. package/package.json +3 -8
@@ -1,17 +1,18 @@
1
1
  # SelectFaceted
2
2
 
3
- A faceted filter: one trigger opens a menu of **facets** (dimensions), each a
4
- submenu flyout with its own editor. The value is a `Record<facetKey, value>`, so
5
- the same option value under two facets — assignee "Alice" and owner "Alice" —
6
- stays distinct. Each facet declares a `kind`: `single`, `multiple` (with a
7
- Select all row by default; `selectAll: false` drops it), `text` (free-form
8
- substring, applied on Enter / blur), or `custom` (bring your own editor and
9
- value, including an object).
10
-
11
- It's a **composed component** built from [Menu](./menu.md), [Select](./select.md)'s
12
- option model, [Input](./input.md), and [Tag](./tag.md) — no new element. Controlled via
13
- `value`, uncontrolled via `defaultValue`; changes arrive through one
14
- **`onValueChange`**.
3
+ A faceted filter lets people filter a result set by several categories. Anta
4
+ calls each category a **facet**. The trigger opens a menu of facets, and each
5
+ facet opens a control for choosing its value.
6
+
7
+ The value is a `Record<facetKey, value>`. This keeps values separate when two
8
+ facets use the same option. For example, `assignee` and `owner` below are
9
+ application-defined facet keys, not Anta terms. Each facet has one of four
10
+ `kind` values: `single`, `multiple`, `text`, or `custom`.
11
+
12
+ `SelectFaceted` uses [Menu](./menu.md), [Select](./select.md)'s option model,
13
+ [Input](./input.md), and [Tag](./tag.md). It does not create a custom element.
14
+ Use `value` with `onValueChange` to control it, or use `defaultValue` for an
15
+ uncontrolled filter.
15
16
 
16
17
  Pass `placement` to control where the root facet menu opens relative to its
17
18
  trigger. It uses the same values as `Menu` and still flips or clamps when space
@@ -55,7 +56,8 @@ function Demo() {
55
56
 
56
57
  {active.length > 0 && (
57
58
  <div style={{ display: 'flex', flexDirection: 'row', flexWrap: 'wrap', gap: 8, alignItems: 'center' }}>
58
- {/* Each active facet's result is its own control, the key piped into `leading`. */}
59
+ {/* Show one editable control for each active facet. Its label becomes
60
+ the control's `leading` prefix. */}
59
61
  {active.map((facet) => {
60
62
  // Options facets → an editable Select (single shows the trailing check;
61
63
  // both are filterable + have a clearable footer).
@@ -114,18 +116,18 @@ function Demo() {
114
116
  }
115
117
  ```
116
118
 
117
- The trigger opens the facet menu; each **active** facet's result renders below as its
118
- own [Select](./select.md) — editable in place, with the facet key piped into the trigger's
119
- `leading` slot as a prefix.
119
+ The trigger opens the facet menu. The example renders one editable
120
+ [Select](./select.md) below it for each active facet. Each Select receives the
121
+ facet label through `leading`, which displays it as a prefix.
120
122
 
121
- ### Value & changes
123
+ ### Value and changes
122
124
 
123
- The value is a **record keyed by facet key** — `{ [facetKey]: value }` — so each facet's
124
- selection lives under its own `key`. The shape per facet follows its `kind`: an option
125
- value for `single`, an array for `multiple`, a string for `text`, your own `V` for
126
- `custom`. A **cleared** facet is absent from the record (not `undefined`), and the
127
- trigger's badge counts the present keys. Control it with `value` (+ `onValueChange`) or
128
- seed `defaultValue` for the uncontrolled case.
125
+ The value is a record keyed by facet key: `{ [facetKey]: value }`. Its shape
126
+ depends on `kind`: an option value for `single`, an array for `multiple`, a
127
+ string for `text`, and a value of type `V` for `custom`. A cleared facet is
128
+ absent from the record, rather than set to `undefined`. The trigger badge counts
129
+ the keys that remain. Use `value` with `onValueChange` to control the filter, or
130
+ use `defaultValue` for the uncontrolled case.
129
131
 
130
132
  Because one control mixes facets that hold different value types, the record is typed
131
133
  `Record<string, unknown>`; narrow per facet when you read it.
@@ -151,36 +153,34 @@ Because one control mixes facets that hold different value types, the record is
151
153
 
152
154
  ### Value types
153
155
 
154
- A `single` / `multiple` facet's option values follow [Select](./select.md#value--changes):
155
- `string`, `number`, or `boolean` (the `OptionValue` type), compared with `===` and
156
- returned through the value record unchanged. For a value that isn't a primitive, give the
157
- option `value` a **stable primitive key** (a date's ISO string, a record's id) and read
158
- the full value back by that key. When the whole facet is object-shaped (a date range, a
159
- numeric comparator), use a **`custom`** facet: it owns its editor and value type `V`, so
160
- it holds any shape and reports it back untouched.
156
+ `single` and `multiple` facets use [Select](./select.md#value-and-changes) option
157
+ values: `string`, `number`, or `boolean` (`OptionValue`). Anta compares them
158
+ with `===` and returns them unchanged. For a non-primitive value, use a stable
159
+ primitive key such as a date's ISO string or a record ID. Look up the full value
160
+ with that key. Use a `custom` facet when the facet value is an object, such as a
161
+ date range or numeric comparison. Its editor can return any value of type `V`.
161
162
 
162
163
  ### Custom facet
163
164
 
164
- A `custom` facet has **no option list**: you draw the editor and choose the value it
165
- holds — a number, a date, a range, any object. Beyond the base `key` / `label` / `icon`,
166
- provide two functions:
165
+ A `custom` facet has no option list. Provide its editor and choose the value it
166
+ returns: a number, date, range, or any other object. In addition to `key`,
167
+ `label`, and `icon`, provide two functions:
167
168
 
168
- - **`render(ctx)`** — your editor, and the **only** place the value is produced.
169
- `ctx.value` is the current value, `ctx.onChange(next)` sets it (`undefined` clears the
170
- facet), `ctx.close()` dismisses the menu. Whatever you pass to `onChange` lands in
171
- `value[key]` unchanged and comes back as `ctx.value` next render.
172
- - **`summary(value)`** — the chip on the facet's row while a value is set. It's
173
- **display-only** and decoupled from the value: the value round-trips through
174
- `onChange` / `ctx.value`, so `summary` can return any node (or `null`) without changing
175
- what you read from `value[key]`. The chip caps its width and ellipsizes a long
176
- summary so it can't stretch the menu.
169
+ - **`render(ctx)`** renders the editor. `ctx.value` is the current value.
170
+ `ctx.onChange(next)` sets it, and `undefined` clears the facet. `ctx.close()`
171
+ closes the menu. Anta stores the value passed to `onChange` at `value[key]`
172
+ without changing it.
173
+ - **`summary(value)`** renders the chip on the facet row when a value is set.
174
+ It does not change the stored value. It can return any node or `null`. Long
175
+ summaries are truncated so that they do not widen the menu.
177
176
 
178
- Nothing is compared or filtered inside the component; it stores the value and reports it
179
- via `onValueChange`, and applying it to your rows is your code. Type the facet
180
- `SelectFacetCustom<V>` so `ctx.value` and `summary` are typed.
177
+ `SelectFaceted` does not filter application data. It stores the facet values and
178
+ reports them through `onValueChange`. Filter the application's rows from that
179
+ value. Type the facet as `SelectFacetCustom<V>` so `ctx.value` and `summary`
180
+ use the same value type.
181
181
 
182
- A number, "min duration": the editor is one `Input`, which has no popup of its own, so it
183
- sits directly in the flyout.
182
+ For a minimum-duration filter, the editor is one `Input`. Because that Input
183
+ does not open a popup, it appears directly in the facet menu.
184
184
 
185
185
  ```tsx
186
186
  import type { SelectFacetCustom } from '@antadesign/anta'
@@ -211,10 +211,9 @@ const duration: SelectFacetCustom<string> = {
211
211
  rows.filter((r) => value.duration == null || r.seconds >= Number(value.duration))
212
212
  ```
213
213
 
214
- A date, cast through a helper. Editors with **their own popup** (the inline `Calendar`,
215
- `InputDate`, `Select`) work in the flyout too: each opens its menu stacked on top while
216
- the flyout stays open. This one uses the inline `Calendar` grid; two helpers bridge its
217
- ISO strings and the `Date` you store.
214
+ For dates, the example converts between the Calendar's ISO strings and a stored
215
+ `Date`. Editors that open a menu, including `InputDate` and `Select`, also work
216
+ inside a custom facet. Their menu opens above the facet menu, which remains open.
218
217
 
219
218
  ```tsx
220
219
  import type { SelectFacetCustom } from '@antadesign/anta'
@@ -246,17 +245,16 @@ const since: SelectFacetCustom<Date> = {
246
245
  rows.filter((r) => value.since == null || r.createdAt >= value.since)
247
246
  ```
248
247
 
249
- A `custom` facet holds the value whole, so a `Date` works here: it isn't compared by
250
- `===` like a `single` / `multiple` option value, so there's no identity pitfall.
248
+ A custom facet stores a `Date` directly. Unlike the value of a `single` or
249
+ `multiple` facet, it is not compared with `===` to find an option.
251
250
 
252
251
  #### A recency filter: presets plus a range
253
252
 
254
- A compound editor in one flyout: a `RadioGroup` of presets (Today, Yesterday, Last
255
- 14 / 30 days) and a **Custom range** that reveals two `InputDate` fields. The facet
256
- value is either `{ preset }` or `{ from, to }`, and a `resolveRange` helper turns
257
- whichever one into the concrete `{ from, to }` you filter rows with (shown in the
258
- readout under the trigger). Each `InputDate` opens its calendar stacked on top of the
259
- flyout, which stays open throughout.
253
+ This editor combines a `RadioGroup` of presets with a **Custom range** option
254
+ that reveals two `InputDate` fields. Its value is either `{ preset }` or
255
+ `{ from, to }`. The `resolveRange` helper converts either shape into the date
256
+ range used to filter the result set. Each InputDate calendar opens above the
257
+ facet menu without closing it.
260
258
 
261
259
  ```tsx
262
260
  type Recency = { preset: 'today' | 'yesterday' | 'last14' | 'last30' } | { from: string; to: string }
@@ -313,11 +311,11 @@ const recency: SelectFacetCustom<Recency> = {
313
311
 
314
312
  #### Menu-item presets, calendar on the right
315
313
 
316
- The same filter with the presets as `MenuItem` rows (a check marks the active one) and
317
- a single **Custom day** that reveals one `InputDate`, its calendar opening to the
318
- **right** via `placement="right-start"`. That helps when the trigger sits on the left of
319
- a wide layout. `placement` (and `offset`) forward to the calendar's `Menu`; `right` /
320
- `left` are new alongside the existing `top` / `bottom`.
314
+ This version renders the presets as `MenuItem` rows and marks the selected row
315
+ with a check. **Custom day** reveals one `InputDate`. Its calendar opens to the
316
+ right with `placement="right-start"`, which is useful when the trigger is on the
317
+ left side of a wide layout. `placement` and `offset` are passed to the
318
+ calendar's Menu.
321
319
 
322
320
  ```tsx
323
321
  type Recency = { preset: 'today' | 'yesterday' | 'last14' | 'last30' } | { day: string }
@@ -364,10 +362,10 @@ const recency: SelectFacetCustom<Recency> = {
364
362
 
365
363
  | Prop | Type | Default | Description |
366
364
  |------|------|---------|-------------|
367
- | `facets` | SelectFacet[] | — | The facets (dimensions) to filter across, each with its own editor kind. |
365
+ | `facets` | SelectFacet[] | — | Categories to filter by. Each facet has a `kind` that determines its editor. |
368
366
  | `clearable?` | boolean | true | Show the per-facet "Clear" row and the "Clear all" row. |
369
367
  | `clearAllLabel?` | string | Clear all | Label for the "Clear all" row. |
370
- | `defaultValue?` | SelectFacetedValue | — | Initial value for the uncontrolled case (the wrapper then owns it). |
368
+ | `defaultValue?` | SelectFacetedValue | — | Initial value for uncontrolled use. |
371
369
  | `disabled?` | boolean | — | Disable the whole control. |
372
370
  | `icon?` | IconShape | filter | Default trigger's leading icon. |
373
371
  | `label?` | string | Filter | Default trigger's button label. |
@@ -379,47 +377,44 @@ const recency: SelectFacetCustom<Recency> = {
379
377
  | `placement?` | 'left' \| 'right' \| 'bottom' \| 'top' \| 'bottom-start' \| 'bottom-end' \| 'top-start' \| 'top-end' \| 'right-start' \| 'right-end' \| 'left-start' \| 'left-end' | bottom-start | Preferred placement of the root filter menu relative to its trigger. The
380
378
  menu auto-flips vertically and clamps horizontally when needed. |
381
379
  | `priority?` | 'primary' \| 'secondary' | secondary | Default trigger's button priority. |
382
- | `renderTrigger?` | (state) => ReactNode | — | Render your own trigger in place of the default `Button`. Receives a
383
- `SelectFacetedTriggerState`; **return exactly one focusable element** (the
384
- menu anchors to it as its previous sibling and opens it on click). Give it
385
- `aria-haspopup="menu"` plus `aria-expanded={state.open}`. The custom trigger
386
- owns its own styling — `className` / `style` / other props apply to the
387
- *default* trigger only, so put your own on the element you return. |
388
- | `searchable?` | boolean | — | Add a single search field to the top of the root menu that flattens every
389
- `single` / `multiple` facet's options into one list and searches across them
390
- — typing "alice" surfaces it under both an Assignee and an Owner facet, each
391
- selectable in place. `text` / `custom` facets are reachable when the search is
392
- empty. Matching uses each facet's `filter` function if it has one, else the
393
- built-in substring match. |
380
+ | `renderTrigger?` | (state) => ReactNode | — | Replaces the default `Button` with a trigger returned from this function.
381
+ Receives a `SelectFacetedTriggerState`. Return exactly one focusable element:
382
+ the menu is positioned relative to that element and opens when it is clicked.
383
+ Add `aria-haspopup="menu"` and `aria-expanded={state.open}` to the returned
384
+ element. `className`, `style`, and other trigger props apply only to the
385
+ default Button, so add styling and attributes to the returned element. |
386
+ | `searchable?` | boolean | — | Adds a search field at the top of the root menu. It searches the options of
387
+ every `single` and `multiple` facet in one list. For example, "alice" can
388
+ appear under application-defined Assignee and Owner facets. `text` and
389
+ `custom` facets remain available when the search is empty. Each facet uses
390
+ its `filter` function when supplied, or the built-in substring match. |
394
391
  | `searchPlaceholder?` | string | Filter… | Placeholder for the global search field. |
395
392
  | `size?` | 'small' \| 'medium' \| 'large' | medium | Default trigger's button size. |
396
393
  | `toneSelected?` | 'neutral' \| 'brand' \| 'info' \| 'success' \| 'warning' \| 'critical' \| (string & {}) | — | Tone applied to a selected option row in the facet flyouts (label, selected
397
394
  tint, and the check / checkbox indicator). A named tone or a custom CSS
398
- colour, matching `Select`'s `toneSelected`. Defaults to a neutral selection. |
399
- | `value?` | SelectFacetedValue | — | Controlled value — the facet-keyed record. When provided, the consumer
400
- owns state: a pick only *requests* a change via `onValueChange` (reject by
401
- not updating). Leave undefined for uncontrolled. |
395
+ color, matching `Select`'s `toneSelected`. Defaults to a neutral selection. |
396
+ | `value?` | SelectFacetedValue | — | Controlled value record, keyed by facet. When provided, update it through
397
+ `onValueChange`. Leave it undefined for uncontrolled use. |
402
398
 
403
399
  ### The `SelectFacet` type
404
400
 
405
- `facets` takes a `SelectFacet[]`. Each facet is discriminated by **`kind`** and shares a
406
- base of `key` / `label` / `icon`:
401
+ `facets` takes a `SelectFacet[]`. Every facet has a `key`, `label`, and optional
402
+ `icon`. The `kind` field selects one of the shapes below.
407
403
 
408
- A `single` / `multiple` facet is [Select](./select.md)'s option model under a `key` — the same
409
- `options` (`SelectItem[]`), `filter`, and `selectAll` you'd pass to a `Select`, with `kind`
410
- where Select has `selection`. Know `Select` and you know these two facets; `text` and
411
- `custom` are the kinds with no `Select` counterpart. The value each facet stores follows
412
- the same rule: a `single`/`multiple` facet reports the chosen option's `value` (or an array
413
- of them), exactly as [Select](./select.md#value--changes) does under its own key.
404
+ `single` and `multiple` facets use the same `options`, `filter`, and `selectAll`
405
+ properties as [Select](./select.md). They use `kind` in place of Select's
406
+ `selection`. `text` and `custom` do not use Select options. A `single` facet
407
+ returns one option value; a `multiple` facet returns an array of option values.
414
408
 
415
409
  | Field | Type | Description |
416
410
  |---|---|---|
417
- | `key` | `string` | The facet's namespace — the key its value is stored under in the record, and what `attrs.facet` reports. Unique across `facets`. |
411
+ | `key` | `string` | The key for this facet's value in the record. `attrs.facet` returns it. It must be unique in `facets`. |
418
412
  | `label` | `string` | The facet's row label in the menu. |
419
413
  | `icon` | `IconShape` | Leading icon on the facet's row. |
420
414
 
421
- **`single`** (`SelectFacetSingle`) — pick one. Value: the chosen option's `value`, or
422
- absent when cleared (re-picking the selected option clears it).
415
+ **`single`** (`SelectFacetSingle`) selects one option. Its value is the selected
416
+ option's `value`, or is absent when cleared. Selecting the current option again
417
+ clears it.
423
418
 
424
419
  | Field | Type | Description |
425
420
  |---|---|---|
@@ -427,8 +422,8 @@ absent when cleared (re-picking the selected option clears it).
427
422
  | `options` | `SelectItem[]` | The choices — bare strings or `SelectOption`s (groups / submenus flatten to their leaves). Option `value`s may be `string` / `number` / `boolean`. |
428
423
  | `filter` | `FacetFilter` | Search field over this facet's options: `true` for the built-in substring match, or `(option, query) => boolean`. |
429
424
 
430
- **`multiple`** (`SelectFacetMultiple`) — pick any number. Value: an array of the chosen
431
- `value`s (empty array clears it).
425
+ **`multiple`** (`SelectFacetMultiple`) selects any number of options. Its value
426
+ is an array of the selected option values. An empty array clears it.
432
427
 
433
428
  | Field | Type | Description |
434
429
  |---|---|---|
@@ -438,19 +433,19 @@ absent when cleared (re-picking the selected option clears it).
438
433
  | `selectAll` | `boolean` | A "Select all" row toggling every visible option. Default `true`. |
439
434
  | `selectAllLabel` | `string` | Label for that row. Default `Select all`. |
440
435
 
441
- **`text`** (`SelectFacetText`) — free-form substring. Value: the typed string, applied on
442
- Enter / blur (absent when empty).
436
+ **`text`** (`SelectFacetText`) accepts a free-form string. It applies on Enter or
437
+ blur and is absent when empty.
443
438
 
444
439
  | Field | Type | Description |
445
440
  |---|---|---|
446
441
  | `kind` | `'text'` | Discriminant. |
447
442
  | `placeholder` | `string` | Placeholder for the text field. |
448
443
 
449
- **`custom`** (`SelectFacetCustom<V>`) — bring your own editor and value type `V`, including
450
- object-shaped values (a date range, a numeric comparator).
444
+ **`custom`** (`SelectFacetCustom<V>`) renders the editor supplied by `render`.
445
+ It can store a value of type `V`, including an object such as a date range.
451
446
 
452
447
  | Field | Type | Description |
453
448
  |---|---|---|
454
449
  | `kind` | `'custom'` | Discriminant. |
455
- | `render` | `(ctx) => ReactNode` | Your editor. `ctx.value` is the current `V`, `ctx.onChange(next)` sets it (`undefined` clears the facet), `ctx.close()` dismisses the menu. |
450
+ | `render` | `(ctx) => ReactNode` | Renders the editor. `ctx.value` is the current `V`; `ctx.onChange(next)` sets it, and `undefined` clears the facet. `ctx.close()` closes the menu. |
456
451
  | `summary` | `(value: V) => ReactNode` | The chip on the facet's row while a value is set. |