@stackone/malachite 2.139.0 → 2.141.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/COMPONENTS.md CHANGED
@@ -83,7 +83,7 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
83
83
  - **`DateRangePicker`** — `DatePicker`'s range form, with the same props and a `{ start, end }` value. The second click completes a day range; a click before the start restarts it. The end always covers the whole of its last unit (`23:59:59.999` for a picked day, the last millisecond of the picked minute or second), so a filter on the range keeps its final minutes. In a `formControl` field a cleared range writes `null`. With a time precision a Start/End switch picks which end the time columns edit, end times before the start are not offered, and Apply waits for both ends. `presets` list beside the calendar and apply at once; pass a function (`value: () => ({ start, end })`) for a relative preset such as "Past 1 hour", so it is measured when clicked rather than when the page loaded. A preset with `disabled: true` stays visible and focusable but cannot resolve or commit a value, for plan-locked ranges; `disabledReason` explains why in a tooltip and as its accessible description. _Key props:_ `value` / `defaultValue` (`{ start, end }`), `onChange`, `presets` (`DateRangePreset[]`), plus every `DatePicker` prop.
84
84
  - **`MultiSelect`** — Multi-select dropdown. `width` fixes the trigger, as `Dropdown` and `Search` take it, so a toolbar can put its controls on one width — and, as with those two, a container narrower than the value still wins; the menu fills the trigger and left-aligns under it, so that one prop sizes both; `minWidth` raises the 160px floor a narrow trigger falls back to. An option label too long for the menu ellipsises, and hovering it shows the full label — above the description in `hover` mode — as `Dropdown` does for its options. `requiredIndicator` follows the same three-way convention the single-select controls do, so a form choosing asterisks does not get "(Optional)" on one of its fields. _Key props:_ `MultiSelectOption[]`, `MultiSelectSize`, `width`, `minWidth`, `label`, `searchable`, `inlineSearch`, `chips`, `chipsRemovable`, `required`, `requiredIndicator`, `aria-label`, `aria-labelledby`, `id`.
85
85
  - **`FilterSearch`** — One search field that filters across several categories. Clicking lists the filters, each with its description and an example; picking one lists its values behind a `Filters > Name` breadcrumb, and typing before picking searches the values of every filter at once, tagging each match with the filter it belongs to. Select All / Deselect All act on whatever the query matches. Each filter becomes a segmented chip, its name then its values (`Connector | Notion, Attio +2`), that reopens its values when clicked; an item `icon` is drawn in its menu row and in the chip, and `chipLabel: false` on a filter drops its name from the chip (`Configured only`); Backspace in an empty field removes the last one. `onQueryChange` reports the text in the field, for analytics or a server-side search. With `textFilter` (`{ value, label }`, under a `value` no filter uses) the typed text is itself the first row while searching (`Search "acme"`); committing it adds a `Search: acme` chip whose selection is `{ filter: textFilter.value, items: [text] }`, replacing any earlier text, so a free-text search can sit in the URL beside the filters, and clicking that chip puts the text back in the field. Controlled: `onChange` gets the next selection and the `changes` that produced it, an empty `items` meaning the filter was removed, so a URL-backed selection writes back only what moved. Chips keep the order filters were added in even when `value` comes back reordered, and keep their labels while `filters` reloads. `filtersButton` puts a Filters button, with the applied count, at the right end of the bar that opens a Filters panel beneath it: every filter at once, each drawn by its `control` (`list`, the default, a checkbox per value with an optional `count` badge and a search box past 8 values; `toggle`, a switch for the filter's one value; `segmented`, All plus one segment per value), applied as they change and mirrored as chips in the bar, with Clear all leaving the typed text alone. The button and the filter chips are then the only way to filters: the field is a plain search box (`role="searchbox"`) that never opens a menu, reports what is typed through `onQueryChange`, keeps it on blur and while the panel is open, and pins it as the `textFilter` chip on Enter. _Key props:_ `filters` (`control`, item `count`), `value`, `onChange`, `onClear`, `onActiveFilterChange`, `onQueryChange`, `textFilter`, `filtersButton`, `placeholder`, `size`, `width`, `loading`, `disabled`, `clearable`, `maxVisibleChips`, `aria-label`, `aria-labelledby`, `id`.
86
- - **`QueryInput`** — A textbox with inline syntax colouring and a suggestion menu anchored to the caret. It carries no grammar of its own: the consumer parses the value, hands back `tokens` to colour and `suggestions` to offer, so the vocabulary lives in the consuming app rather than here. _Key props:_ `value`, `onChange`, `tokens`, `suggestions`, `activeRange`, `onAccept`, `onQueryContextChange`, `onSubmit`, `placeholder`, `size`, `disabled`, `loading`, `emptyMessage`, `className`, `style`, `aria-label`, `aria-labelledby`.
86
+ - **`QueryInput`** — A textbox with inline syntax colouring and a suggestion menu anchored to the caret. It carries no grammar of its own: the consumer parses the value, hands back `tokens` to colour and `suggestions` to offer, so the vocabulary lives in the consuming app rather than here. Committed clauses can sit in the bar as removable chips before the text (a logs filter bar), with a leading search icon and a Clear All; the bar wraps and grows to hold them. _Key props:_ `value`, `onChange`, `tokens`, `suggestions` (`{id, label, description?, detail?, insertText?}`), `activeRange`, `onAccept`, `onQueryContextChange`, `onSubmit`, `chips` (`{id, label, operator, value, tone?: include | exclude | invalid, tooltip?}`), `onChipRemove` (also Backspace in an empty field), `onClear`, `searchIcon`, `menuTitle`, `menuHints` (`{keys, label}[]`), `placeholder`, `size`, `disabled`, `loading`, `emptyMessage`, `className`, `style`, `aria-label`, `aria-labelledby`.
87
87
  - **`DividerToggle`** — A line divider with a toggle pill in the middle to expand/collapse an optional section below it. _Key props:_ `label`, `expandedLabel`, `expanded`, `onToggle`, `aria-controls`, `className`.
88
88
  - **`FormSteps`** — A vertical list of steps. Renders each step as a list item with its title, optional action, and children below. Offers `form` (lettered markers, descriptions) and `review` (numbered steps, compact lists) variants. _Key props:_ `items` (`key`, `title`, `description`, `action`, `children`), `variant` (`review` | `form`), `marker`, `className`, `aria-label`, `aria-labelledby`.
89
89
  - **`SettingRow`** — One setting: a labelled row with its control on the trailing edge, and the sentence that explains it underneath. `control` may be a render prop receiving the label’s id, so a control that no `<label htmlFor>` can reach — `Toggle` renders a `<button role="switch">` — still names itself via `aria-labelledby`. _Key props:_ `label`, `badge`, `description`, `control`, `className`.