@ai-matrx/design-system 0.86.330 → 0.86.331

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +8295 -1
  2. package/dist/carousel.cjs.map +1 -1
  3. package/dist/carousel.js +4 -4
  4. package/dist/{chunk-PQVFE3G6.js → chunk-2WL2SGKL.js} +2 -2
  5. package/dist/{chunk-6P7E4SI5.js → chunk-5IKQ6RU4.js} +39 -14
  6. package/dist/chunk-5IKQ6RU4.js.map +1 -0
  7. package/dist/{chunk-QQ7Y3N6I.js → chunk-5LT34PFX.js} +2 -2
  8. package/dist/{chunk-LUOO4DWY.js → chunk-CJCUD62M.js} +2 -2
  9. package/dist/{chunk-WSRAFZ4T.js → chunk-FD6V6JBN.js} +2 -2
  10. package/dist/{chunk-Z24A3H3K.js → chunk-MVGMI6UZ.js} +4 -4
  11. package/dist/{chunk-LFUBONXE.js → chunk-OFJ5LGBU.js} +3 -3
  12. package/dist/{chunk-HQMMOSTX.js → chunk-PPB52S7F.js} +2 -2
  13. package/dist/{chunk-LZWULPW5.js → chunk-TBDMTCRW.js} +2 -2
  14. package/dist/{chunk-RUKQPOMT.js → chunk-W3QSRJ3O.js} +2 -2
  15. package/dist/clipboard-fallback-dialog.cjs.map +1 -1
  16. package/dist/clipboard-fallback-dialog.js +1 -1
  17. package/dist/controls.cjs +42 -17
  18. package/dist/controls.cjs.map +1 -1
  19. package/dist/controls.d.cts +8 -1
  20. package/dist/controls.d.ts +8 -1
  21. package/dist/controls.js +4 -4
  22. package/dist/data-table/data-row-inspector.cjs.map +1 -1
  23. package/dist/data-table/data-row-inspector.js +4 -4
  24. package/dist/data-table/data-row-window.cjs.map +1 -1
  25. package/dist/data-table/data-row-window.js +5 -5
  26. package/dist/data-table/index.cjs +38 -13
  27. package/dist/data-table/index.cjs.map +1 -1
  28. package/dist/data-table/index.js +7 -7
  29. package/dist/data-table/pagination.cjs +38 -13
  30. package/dist/data-table/pagination.cjs.map +1 -1
  31. package/dist/data-table/pagination.js +2 -2
  32. package/dist/data-table/uuid-cell.cjs.map +1 -1
  33. package/dist/data-table/uuid-cell.js +2 -2
  34. package/dist/desktop.cjs.map +1 -1
  35. package/dist/desktop.js +3 -3
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.js +6 -6
  38. package/dist/item.cjs.map +1 -1
  39. package/dist/item.js +2 -2
  40. package/dist/lite-table.cjs.map +1 -1
  41. package/dist/lite-table.js +1 -1
  42. package/dist/record-list.cjs.map +1 -1
  43. package/dist/record-list.js +2 -2
  44. package/dist/settings.cjs.map +1 -1
  45. package/dist/settings.js +2 -2
  46. package/dist/writing-field.cjs.map +1 -1
  47. package/dist/writing-field.js +2 -2
  48. package/package.json +2 -2
  49. package/dist/chunk-6P7E4SI5.js.map +0 -1
  50. /package/dist/{chunk-PQVFE3G6.js.map → chunk-2WL2SGKL.js.map} +0 -0
  51. /package/dist/{chunk-QQ7Y3N6I.js.map → chunk-5LT34PFX.js.map} +0 -0
  52. /package/dist/{chunk-LUOO4DWY.js.map → chunk-CJCUD62M.js.map} +0 -0
  53. /package/dist/{chunk-WSRAFZ4T.js.map → chunk-FD6V6JBN.js.map} +0 -0
  54. /package/dist/{chunk-Z24A3H3K.js.map → chunk-MVGMI6UZ.js.map} +0 -0
  55. /package/dist/{chunk-LFUBONXE.js.map → chunk-OFJ5LGBU.js.map} +0 -0
  56. /package/dist/{chunk-HQMMOSTX.js.map → chunk-PPB52S7F.js.map} +0 -0
  57. /package/dist/{chunk-LZWULPW5.js.map → chunk-TBDMTCRW.js.map} +0 -0
  58. /package/dist/{chunk-RUKQPOMT.js.map → chunk-W3QSRJ3O.js.map} +0 -0
@@ -15,7 +15,7 @@ import "./chunk-NDTDBBMM.js";
15
15
  import "./chunk-LEPD6TV7.js";
16
16
  import {
17
17
  Textarea
18
- } from "./chunk-6P7E4SI5.js";
18
+ } from "./chunk-5IKQ6RU4.js";
19
19
  import "./chunk-BKCJUFD3.js";
20
20
  import "./chunk-BD77DHUO.js";
21
21
  import "./chunk-MOZRIHJF.js";
package/dist/controls.cjs CHANGED
@@ -1391,10 +1391,15 @@ function Select2({
1391
1391
  className,
1392
1392
  style,
1393
1393
  "aria-label": ariaLabel,
1394
- variant = "field"
1394
+ variant = "field",
1395
+ searchAt
1395
1396
  }) {
1396
1397
  const current = options.find((o) => o.value === value);
1397
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(DropdownMenu, { children: [
1398
+ const [query, setQuery] = React10.useState("");
1399
+ const searchable = searchAt !== void 0 && options.length >= searchAt;
1400
+ const q = searchable ? query.trim().toLowerCase() : "";
1401
+ const shown = q ? options.filter((o) => [o.label, o.hint, o.group].some((t) => t?.toLowerCase().includes(q))) : options;
1402
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(DropdownMenu, { onOpenChange: (open) => !open && setQuery(""), children: [
1398
1403
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DropdownMenuTrigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1399
1404
  "button",
1400
1405
  {
@@ -1408,22 +1413,42 @@ function Select2({
1408
1413
  children: [
1409
1414
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "matrx-control-select-value", children: [
1410
1415
  icon,
1411
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: current?.label ?? value })
1416
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: current?.label ?? value }),
1417
+ current?.hint ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-muted-foreground", children: current.hint }) : null
1412
1418
  ] }),
1413
1419
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectChevron, {})
1414
1420
  ]
1415
1421
  }
1416
1422
  ) }),
1417
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DropdownMenuContent, { align, className: "max-h-80 w-max min-w-[max(10rem,var(--radix-dropdown-menu-trigger-width))] max-w-[min(24rem,var(--radix-dropdown-menu-content-available-width))] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DropdownMenuRadioGroup, { value, onValueChange: (v) => onValueChange(v), children: options.map((o, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(React10.Fragment, { children: [
1418
- o.group && o.group !== options[i - 1]?.group ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1419
- i > 0 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DropdownMenuSeparator, {}) : null,
1420
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DropdownMenuLabel, { children: o.group })
1421
- ] }) : null,
1422
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(DropdownMenuRadioItem, { value: o.value, disabled: o.disabled === true, className: "text-[0.8125rem]", children: [
1423
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "flex-1 truncate", children: o.label }),
1424
- o.meta ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "ml-3 text-[0.6875rem] text-muted-foreground", children: o.meta }) : null
1425
- ] })
1426
- ] }, o.value)) }) })
1423
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(DropdownMenuContent, { align, className: "max-h-80 w-max min-w-[max(10rem,var(--radix-dropdown-menu-trigger-width))] max-w-[min(24rem,var(--radix-dropdown-menu-content-available-width))] overflow-y-auto", children: [
1424
+ searchable ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "sticky top-0 z-10 bg-popover p-1", "data-select-search": "", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1425
+ SearchField,
1426
+ {
1427
+ className: "w-full",
1428
+ value: query,
1429
+ autoFocus: true,
1430
+ "aria-label": `Search ${ariaLabel}`,
1431
+ onChange: (e) => setQuery(e.target.value),
1432
+ onKeyDown: (e) => {
1433
+ if (e.key !== "ArrowDown" && e.key !== "ArrowUp" && e.key !== "Escape" && e.key !== "Tab") e.stopPropagation();
1434
+ }
1435
+ }
1436
+ ) }) : null,
1437
+ searchable && shown.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "px-2 py-1.5 text-[0.8125rem] text-muted-foreground", role: "status", children: "No match" }) : null,
1438
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DropdownMenuRadioGroup, { value, onValueChange: (v) => onValueChange(v), children: shown.map((o, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(React10.Fragment, { children: [
1439
+ o.group && o.group !== shown[i - 1]?.group ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1440
+ i > 0 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DropdownMenuSeparator, {}) : null,
1441
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DropdownMenuLabel, { children: o.group })
1442
+ ] }) : null,
1443
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(DropdownMenuRadioItem, { value: o.value, disabled: o.disabled === true, className: "text-[0.8125rem]", children: [
1444
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "flex-1 truncate", children: [
1445
+ o.label,
1446
+ o.hint ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "ml-1.5 text-muted-foreground", children: o.hint }) : null
1447
+ ] }),
1448
+ o.meta ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "ml-3 text-[0.6875rem] text-muted-foreground", children: o.meta }) : null
1449
+ ] })
1450
+ ] }, o.value)) })
1451
+ ] })
1427
1452
  ] });
1428
1453
  }
1429
1454
  function SegmentItems({
@@ -6141,7 +6166,7 @@ var import_notify = require("@ai-matrx/kit/notify");
6141
6166
  var React30 = __toESM(require("react"), 1);
6142
6167
  var import_react_dom = require("react-dom");
6143
6168
  var import_jsx_runtime47 = require("react/jsx-runtime");
6144
- var { useState: useState16, useLayoutEffect: useLayoutEffect4, useRef: useRef12 } = React30;
6169
+ var { useState: useState17, useLayoutEffect: useLayoutEffect4, useRef: useRef12 } = React30;
6145
6170
  function HelpIcon({
6146
6171
  text,
6147
6172
  content,
@@ -6150,9 +6175,9 @@ function HelpIcon({
6150
6175
  required = false,
6151
6176
  onAiAssistance
6152
6177
  }) {
6153
- const [copied, setCopied] = useState16(false);
6154
- const [isVisible, setIsVisible] = useState16(false);
6155
- const [position, setPosition] = useState16({ top: 0, left: 0 });
6178
+ const [copied, setCopied] = useState17(false);
6179
+ const [isVisible, setIsVisible] = useState17(false);
6180
+ const [position, setPosition] = useState17({ top: 0, left: 0 });
6156
6181
  const iconRef = useRef12(null);
6157
6182
  const tooltipRef = useRef12(null);
6158
6183
  const hideTimeoutRef = useRef12(null);