@nurix/ui-component-library 1.1.4-stage.125 → 1.1.4-stage.127

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/dist/index.d.mts CHANGED
@@ -3075,6 +3075,16 @@ interface KeyValueEditorProps {
3075
3075
  * matches the Figma reference.
3076
3076
  */
3077
3077
  valueLeadingIcon?: React$1.ReactNode;
3078
+ /**
3079
+ * Override the header label for the key column. Defaults to "Key".
3080
+ * Use for domain-specific tables (e.g. `keyHeader="Restricted Term"`).
3081
+ */
3082
+ keyHeader?: string;
3083
+ /**
3084
+ * Override the header label for the value column. Defaults to "Value".
3085
+ * Use for domain-specific tables (e.g. `valueHeader="Preferred Term"`).
3086
+ */
3087
+ valueHeader?: string;
3078
3088
  /**
3079
3089
  * Render an extra cell at the end of every row, between the value field
3080
3090
  * and the delete button. Use it for per-row controls that don't fit the
package/dist/index.d.ts CHANGED
@@ -3075,6 +3075,16 @@ interface KeyValueEditorProps {
3075
3075
  * matches the Figma reference.
3076
3076
  */
3077
3077
  valueLeadingIcon?: React$1.ReactNode;
3078
+ /**
3079
+ * Override the header label for the key column. Defaults to "Key".
3080
+ * Use for domain-specific tables (e.g. `keyHeader="Restricted Term"`).
3081
+ */
3082
+ keyHeader?: string;
3083
+ /**
3084
+ * Override the header label for the value column. Defaults to "Value".
3085
+ * Use for domain-specific tables (e.g. `valueHeader="Preferred Term"`).
3086
+ */
3087
+ valueHeader?: string;
3078
3088
  /**
3079
3089
  * Render an extra cell at the end of every row, between the value field
3080
3090
  * and the delete button. Use it for per-row controls that don't fit the
package/dist/index.js CHANGED
@@ -10180,15 +10180,25 @@ var SelectContent = React21.forwardRef(
10180
10180
  const handleSearchBlur = React21.useCallback(
10181
10181
  (e) => {
10182
10182
  const next = e.relatedTarget;
10183
- if ((next == null ? void 0 : next.getAttribute("role")) === "option") {
10184
- requestAnimationFrame(() => {
10185
- var _a5;
10186
- (_a5 = searchInputRef.current) == null ? void 0 : _a5.focus({ preventScroll: true });
10187
- });
10188
- }
10183
+ const isSelectItem = (next == null ? void 0 : next.getAttribute("role")) === "option";
10184
+ if (!isSelectItem && next !== null) return;
10185
+ requestAnimationFrame(() => {
10186
+ var _a5;
10187
+ (_a5 = searchInputRef.current) == null ? void 0 : _a5.focus({ preventScroll: true });
10188
+ });
10189
10189
  },
10190
10190
  []
10191
10191
  );
10192
+ React21.useEffect(() => {
10193
+ if (!searchInputRef.current) return;
10194
+ const id = requestAnimationFrame(() => {
10195
+ var _a5;
10196
+ if (document.activeElement !== searchInputRef.current) {
10197
+ (_a5 = searchInputRef.current) == null ? void 0 : _a5.focus({ preventScroll: true });
10198
+ }
10199
+ });
10200
+ return () => cancelAnimationFrame(id);
10201
+ }, [searchQuery]);
10192
10202
  const content = items ? isSectionArray(items) ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children: filteredItems.map(
10193
10203
  (section, sectionIdx) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(SelectGroup, { children: [
10194
10204
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SelectLabel, { children: section.sectionLabel }),
@@ -16390,6 +16400,8 @@ var KeyValueEditor = React43.forwardRef(
16390
16400
  hideHeader = false,
16391
16401
  allowDeleteRow = true,
16392
16402
  valueLeadingIcon,
16403
+ keyHeader = "Key",
16404
+ valueHeader = "Value",
16393
16405
  renderRowTrailing,
16394
16406
  trailingHeader,
16395
16407
  className,
@@ -16429,8 +16441,8 @@ var KeyValueEditor = React43.forwardRef(
16429
16441
  "data-testid": dataTestId != null ? dataTestId : "input",
16430
16442
  children: [
16431
16443
  !hideHeader && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: KEY_VALUE_EDITOR_TOKENS.header, children: [
16432
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCell, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: KEY_VALUE_EDITOR_TOKENS.headerLabel, children: "Key" }) }),
16433
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCell, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: KEY_VALUE_EDITOR_TOKENS.headerLabel, children: "Value" }) }),
16444
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCell, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: KEY_VALUE_EDITOR_TOKENS.headerLabel, children: keyHeader }) }),
16445
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCell, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: KEY_VALUE_EDITOR_TOKENS.headerLabel, children: valueHeader }) }),
16434
16446
  renderRowTrailing && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCellTrailing, children: trailingHeader && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: KEY_VALUE_EDITOR_TOKENS.headerLabel, children: trailingHeader }) }),
16435
16447
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCellActions, children: toolbar && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.iconGroup, children: toolbar }) })
16436
16448
  ] }),
package/dist/index.mjs CHANGED
@@ -10072,15 +10072,25 @@ var SelectContent = React21.forwardRef(
10072
10072
  const handleSearchBlur = React21.useCallback(
10073
10073
  (e) => {
10074
10074
  const next = e.relatedTarget;
10075
- if ((next == null ? void 0 : next.getAttribute("role")) === "option") {
10076
- requestAnimationFrame(() => {
10077
- var _a5;
10078
- (_a5 = searchInputRef.current) == null ? void 0 : _a5.focus({ preventScroll: true });
10079
- });
10080
- }
10075
+ const isSelectItem = (next == null ? void 0 : next.getAttribute("role")) === "option";
10076
+ if (!isSelectItem && next !== null) return;
10077
+ requestAnimationFrame(() => {
10078
+ var _a5;
10079
+ (_a5 = searchInputRef.current) == null ? void 0 : _a5.focus({ preventScroll: true });
10080
+ });
10081
10081
  },
10082
10082
  []
10083
10083
  );
10084
+ React21.useEffect(() => {
10085
+ if (!searchInputRef.current) return;
10086
+ const id = requestAnimationFrame(() => {
10087
+ var _a5;
10088
+ if (document.activeElement !== searchInputRef.current) {
10089
+ (_a5 = searchInputRef.current) == null ? void 0 : _a5.focus({ preventScroll: true });
10090
+ }
10091
+ });
10092
+ return () => cancelAnimationFrame(id);
10093
+ }, [searchQuery]);
10084
10094
  const content = items ? isSectionArray(items) ? /* @__PURE__ */ jsx19(Fragment5, { children: filteredItems.map(
10085
10095
  (section, sectionIdx) => /* @__PURE__ */ jsxs14(SelectGroup, { children: [
10086
10096
  /* @__PURE__ */ jsx19(SelectLabel, { children: section.sectionLabel }),
@@ -16298,6 +16308,8 @@ var KeyValueEditor = React43.forwardRef(
16298
16308
  hideHeader = false,
16299
16309
  allowDeleteRow = true,
16300
16310
  valueLeadingIcon,
16311
+ keyHeader = "Key",
16312
+ valueHeader = "Value",
16301
16313
  renderRowTrailing,
16302
16314
  trailingHeader,
16303
16315
  className,
@@ -16337,8 +16349,8 @@ var KeyValueEditor = React43.forwardRef(
16337
16349
  "data-testid": dataTestId != null ? dataTestId : "input",
16338
16350
  children: [
16339
16351
  !hideHeader && /* @__PURE__ */ jsxs29("div", { className: KEY_VALUE_EDITOR_TOKENS.header, children: [
16340
- /* @__PURE__ */ jsx39("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCell, children: /* @__PURE__ */ jsx39("span", { className: KEY_VALUE_EDITOR_TOKENS.headerLabel, children: "Key" }) }),
16341
- /* @__PURE__ */ jsx39("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCell, children: /* @__PURE__ */ jsx39("span", { className: KEY_VALUE_EDITOR_TOKENS.headerLabel, children: "Value" }) }),
16352
+ /* @__PURE__ */ jsx39("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCell, children: /* @__PURE__ */ jsx39("span", { className: KEY_VALUE_EDITOR_TOKENS.headerLabel, children: keyHeader }) }),
16353
+ /* @__PURE__ */ jsx39("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCell, children: /* @__PURE__ */ jsx39("span", { className: KEY_VALUE_EDITOR_TOKENS.headerLabel, children: valueHeader }) }),
16342
16354
  renderRowTrailing && /* @__PURE__ */ jsx39("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCellTrailing, children: trailingHeader && /* @__PURE__ */ jsx39("span", { className: KEY_VALUE_EDITOR_TOKENS.headerLabel, children: trailingHeader }) }),
16343
16355
  /* @__PURE__ */ jsx39("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCellActions, children: toolbar && /* @__PURE__ */ jsx39("div", { className: KEY_VALUE_EDITOR_TOKENS.iconGroup, children: toolbar }) })
16344
16356
  ] }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nurix/ui-component-library",
3
- "version": "1.1.4-stage.125",
3
+ "version": "1.1.4-stage.127",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",