@glimstone/react 4.5.6 → 4.5.7

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.
@@ -20,7 +20,9 @@ export interface PickerWindowProps {
20
20
  actions?: WindowAction[];
21
21
  /** Back from the form to the tiles, with the search as it was. */
22
22
  onBack?: () => void;
23
+ /** A quiet line at the start of the foot, such as the verdict of a test. */
24
+ start?: ReactNode;
23
25
  /** Called for every way out: the foot, Escape and, while the tiles show, a press beside the window. */
24
26
  onClose: () => void;
25
27
  }
26
- export declare function PickerWindow({ title, hint, items, groups, text, onPick, children, actions, onBack, onClose }: PickerWindowProps): import("react").JSX.Element;
28
+ export declare function PickerWindow({ title, hint, items, groups, text, onPick, children, actions, onBack, start, onClose }: PickerWindowProps): import("react").JSX.Element;
@@ -7,7 +7,7 @@ import { IconButton } from "./IconButton.js";
7
7
  import { InfoBubble } from "./InfoBubble.js";
8
8
  import { BrandMark, ReadmeButton } from "./ReadmeButton.js";
9
9
  import { Window } from "./Window.js";
10
- export function PickerWindow({ title, hint, items, groups = [], text, onPick, children, actions = [], onBack, onClose }) {
10
+ export function PickerWindow({ title, hint, items, groups = [], text, onPick, children, actions = [], onBack, start, onClose }) {
11
11
  const [query, setQuery] = useState("");
12
12
  const [hue] = useState(pickerHue);
13
13
  const card = useRef(null);
@@ -37,7 +37,7 @@ export function PickerWindow({ title, hint, items, groups = [], text, onPick, ch
37
37
  e.preventDefault();
38
38
  e.stopPropagation();
39
39
  };
40
- return (_jsx(Window, { "data-glim": "PickerWindow", title: title, drawn: hint ? (_jsxs(_Fragment, { children: [title, _jsx(InfoBubble, { tip: hint, onAccent: true })] })) : undefined, ref: card, className: ["glim-pick-window", form && "glim-pick-window--form", hue && "glim-hue"].filter(Boolean).join(" "), style: hue ?? undefined, text: { cancel: text.cancel, close: text.close }, actions: form ? [back, ...actions] : [{ label: text.close, labelKey: "common.close", glyph: _jsx(IconClose, {}), wayOut: true }],
40
+ return (_jsx(Window, { "data-glim": "PickerWindow", title: title, drawn: hint ? (_jsxs(_Fragment, { children: [title, _jsx(InfoBubble, { tip: hint, onAccent: true })] })) : undefined, ref: card, className: ["glim-pick-window", form && "glim-pick-window--form", hue && "glim-hue"].filter(Boolean).join(" "), style: hue ?? undefined, text: { cancel: text.cancel, close: text.close }, start: start, actions: form ? [back, ...actions] : [{ label: text.close, labelKey: "common.close", glyph: _jsx(IconClose, {}), wayOut: true }],
41
41
  // A stray press beside the window would throw away what was typed into the form.
42
42
  closeOnBackdrop: !form, onClose: onClose, children: form ? (children) : (_jsxs(_Fragment, { children: [_jsx(GlyphField, { ref: search, className: "glim-pick-search", glyph: _jsx(IconSearch, {}), type: "search", label: text.search, placeholder: text.search, spellCheck: false, autoComplete: "off", value: query, onChange: (e) => setQuery(e.target.value), onKeyDown: (e) => used(e, pickSearchKey(e.key, query, scroll.current, () => setQuery(""))), after: query && (_jsx(IconButton, { tip: text.clear, glyph: _jsx(IconClose, {}), onClick: () => {
43
43
  setQuery("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glimstone/react",
3
- "version": "4.5.6",
3
+ "version": "4.5.7",
4
4
  "description": "GlimStone's components for React",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": { "type": "git", "url": "git+https://github.com/junkerderprovinz/glimstone.git", "directory": "packages/react" },
@@ -16,7 +16,7 @@
16
16
  "build": "tsc -p tsconfig.build.json"
17
17
  },
18
18
  "dependencies": {
19
- "@glimstone/core": "4.5.6"
19
+ "@glimstone/core": "4.5.7"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "@internationalized/date": "^3.12.4",