@imfusion/web-ui 0.11.1-dev.71.g25428988 → 0.11.1-dev.73.g65836a33

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/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  ### Added
6
6
 
7
+ - `Input` takes `shortcut` to show a key such as `/` or `Ctrl K` at its end and set `aria-keyshortcuts`. The key hides before the
8
+ text or placeholder reaches it, and while a search input shows its clear button. With a shortcut, `className` also reaches
9
+ a wrapping element. `shortcut=""` keeps that wrapper with no key shown, so a hint that switches on with state does not
10
+ remount the input. [Input](src/components/input/input.mdx) — Nikolaus Brunner <brunner@imfusion.com>
7
11
  - `Table.SelectCell` and `Table.SelectAllCell` put a row checkbox and a counted select-all checkbox in action columns,
8
12
  `Table.Row` takes `disabled` to lock a row (its checkbox, `Table.RowLink` and `Table.RowButton` stop responding), and
9
13
  `Table.EmptyRow` spans one muted cell across all columns. Selection state and the counter stay the app's.
@@ -14,7 +14,7 @@ interface Props extends VariantProps<typeof button>, React.ComponentProps<typeof
14
14
  /** Trailing slot, typically an icon. */
15
15
  endIcon?: React.ReactNode;
16
16
  /**
17
- * Key hint shown in the top corner at the end of the line, such as `"S"` or `"Ctrl Z"`. It also sets
17
+ * Key hint shown after the label, before an end icon, such as `"S"` or `"Ctrl Z"`. It also sets
18
18
  * `aria-keyshortcuts` in its notation (`Control+Z`), which an explicit
19
19
  * `aria-keyshortcuts` prop overrides. Display only: bind the key in the app, for example with `useHotkey` from TanStack Hotkeys.
20
20
  */
@@ -8,6 +8,14 @@ type UpstreamInput = React.ComponentProps<typeof InputPrimitive>;
8
8
  interface Props extends Omit<UpstreamInput, "size">, VariantProps<typeof input> {
9
9
  /** Called when the search input's clear button is pressed. */
10
10
  onClear?: () => void;
11
+ /**
12
+ * Key hint shown at the end of the input, such as `"/"` or `"Ctrl K"`. It hides before the text or placeholder reaches
13
+ * it, and while a search input shows its clear button. It also sets `aria-keyshortcuts` in its notation
14
+ * (`Control+K`), which an explicit `aria-keyshortcuts` prop overrides. Display only: bind the key in the app. With a
15
+ * shortcut, `className` also reaches a wrapping element, as it does for a search input. Pass `""` when no key applies
16
+ * right now but one may later: the input keeps its wrapper, so switching the hint on does not remount it and drop focus.
17
+ */
18
+ shortcut?: string;
11
19
  }
12
20
  /**
13
21
  * Single-line text input. Also called a text field or input field.
@@ -17,5 +25,5 @@ interface Props extends Omit<UpstreamInput, "size">, VariantProps<typeof input>
17
25
  * @see https://base-ui.com/react/components/input
18
26
  * @llm https://base-ui.com/react/components/input.md
19
27
  */
20
- export declare function Input({ variant, size, type, value, defaultValue, onValueChange, onClear, disabled, className, ...props }: Props): import("react/jsx-runtime").JSX.Element;
28
+ export declare function Input({ variant, size, type, value, defaultValue, onValueChange, onClear, shortcut, disabled, className, ...props }: Props): import("react/jsx-runtime").JSX.Element;
21
29
  export {};