@fgv/ts-app-shell 5.1.0-7 → 5.1.0-9

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.
@@ -33,18 +33,18 @@ import React from 'react';
33
33
  * Horizontal label + field layout for a single edit field.
34
34
  * @public
35
35
  */
36
- export function EditField({ label, children }) {
36
+ export function EditField({ label, tooltip, children }) {
37
37
  return (React.createElement("div", { className: "flex items-baseline gap-2 py-1" },
38
- React.createElement("label", { className: "text-xs text-muted w-32 shrink-0" }, label),
38
+ React.createElement("label", { className: "text-xs text-muted w-32 shrink-0", title: tooltip }, label),
39
39
  React.createElement("div", { className: "flex-1" }, children)));
40
40
  }
41
41
  /**
42
42
  * Titled section wrapper for grouping related edit fields.
43
43
  * @public
44
44
  */
45
- export function EditSection({ title, children }) {
45
+ export function EditSection({ title, tooltip, children }) {
46
46
  return (React.createElement("div", { className: "mb-4" },
47
- React.createElement("h4", { className: "text-xs font-medium text-muted uppercase tracking-wider mb-1.5" }, title),
47
+ React.createElement("h4", { className: "text-xs font-medium text-muted uppercase tracking-wider mb-1.5", title: tooltip }, title),
48
48
  children));
49
49
  }
50
50
  /**
@@ -15,6 +15,8 @@ import React from 'react';
15
15
  export interface IEditFieldProps {
16
16
  /** Label text displayed to the left of the field */
17
17
  readonly label: string;
18
+ /** Optional tooltip shown on hover over the label */
19
+ readonly tooltip?: string;
18
20
  /** The input control(s) to render */
19
21
  readonly children: React.ReactNode;
20
22
  }
@@ -22,7 +24,7 @@ export interface IEditFieldProps {
22
24
  * Horizontal label + field layout for a single edit field.
23
25
  * @public
24
26
  */
25
- export declare function EditField({ label, children }: IEditFieldProps): React.ReactElement;
27
+ export declare function EditField({ label, tooltip, children }: IEditFieldProps): React.ReactElement;
26
28
  /**
27
29
  * Props for the EditSection component.
28
30
  * @public
@@ -30,6 +32,8 @@ export declare function EditField({ label, children }: IEditFieldProps): React.R
30
32
  export interface IEditSectionProps {
31
33
  /** Section heading text */
32
34
  readonly title: string;
35
+ /** Optional tooltip shown on hover over the section heading */
36
+ readonly tooltip?: string;
33
37
  /** Section content (typically EditField components) */
34
38
  readonly children: React.ReactNode;
35
39
  }
@@ -37,7 +41,7 @@ export interface IEditSectionProps {
37
41
  * Titled section wrapper for grouping related edit fields.
38
42
  * @public
39
43
  */
40
- export declare function EditSection({ title, children }: IEditSectionProps): React.ReactElement;
44
+ export declare function EditSection({ title, tooltip, children }: IEditSectionProps): React.ReactElement;
41
45
  /**
42
46
  * Props for the TextInput component.
43
47
  * @public
@@ -47,18 +47,18 @@ const react_1 = __importDefault(require("react"));
47
47
  * Horizontal label + field layout for a single edit field.
48
48
  * @public
49
49
  */
50
- function EditField({ label, children }) {
50
+ function EditField({ label, tooltip, children }) {
51
51
  return (react_1.default.createElement("div", { className: "flex items-baseline gap-2 py-1" },
52
- react_1.default.createElement("label", { className: "text-xs text-muted w-32 shrink-0" }, label),
52
+ react_1.default.createElement("label", { className: "text-xs text-muted w-32 shrink-0", title: tooltip }, label),
53
53
  react_1.default.createElement("div", { className: "flex-1" }, children)));
54
54
  }
55
55
  /**
56
56
  * Titled section wrapper for grouping related edit fields.
57
57
  * @public
58
58
  */
59
- function EditSection({ title, children }) {
59
+ function EditSection({ title, tooltip, children }) {
60
60
  return (react_1.default.createElement("div", { className: "mb-4" },
61
- react_1.default.createElement("h4", { className: "text-xs font-medium text-muted uppercase tracking-wider mb-1.5" }, title),
61
+ react_1.default.createElement("h4", { className: "text-xs font-medium text-muted uppercase tracking-wider mb-1.5", title: tooltip }, title),
62
62
  children));
63
63
  }
64
64
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fgv/ts-app-shell",
3
- "version": "5.1.0-7",
3
+ "version": "5.1.0-9",
4
4
  "description": "Shared React UI primitives for application shells: column cascade, sidebar, toast/log messages, command palette, keybinding registry",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -17,8 +17,8 @@
17
17
  "dependencies": {
18
18
  "@heroicons/react": "~2.2.0",
19
19
  "tslib": "^2.8.1",
20
- "@fgv/ts-utils": "5.1.0-7",
21
- "@fgv/ts-extras": "5.1.0-7"
20
+ "@fgv/ts-utils": "5.1.0-9",
21
+ "@fgv/ts-extras": "5.1.0-9"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": ">=18.0.0",
@@ -51,8 +51,8 @@
51
51
  "@rushstack/heft-jest-plugin": "1.2.6",
52
52
  "@testing-library/dom": "^10.4.0",
53
53
  "@rushstack/heft-node-rig": "2.11.27",
54
- "@fgv/heft-dual-rig": "5.1.0-7",
55
- "@fgv/ts-utils-jest": "5.1.0-7"
54
+ "@fgv/ts-utils-jest": "5.1.0-9",
55
+ "@fgv/heft-dual-rig": "5.1.0-9"
56
56
  },
57
57
  "exports": {
58
58
  ".": {