@gravitee/graphene-core 3.38.0 → 3.39.0

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/USAGE_GUIDE.md CHANGED
@@ -1071,18 +1071,30 @@ The platform e2e suite selects elements by `data-testid` only. These are the rul
1071
1071
 
1072
1072
  The components that derive ids from yours. A part exists only when you pass an id and its element is rendered.
1073
1073
 
1074
- | Component | Part | Element |
1075
- | ----------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------- |
1076
- | `FileUploadInput` | `${id}-input` | Hidden file input |
1077
- | `FileUploadInput` | `${id}-trigger` | Trigger button, when `triggerLabel` renders one |
1078
- | `Calendar` | `${id}-previous` | Previous month button |
1079
- | `Calendar` | `${id}-next` | Next month button |
1080
- | `Calendar` | `${id}-day-<yyyy-MM-dd>` | Day button, with `mode` or `onDayClick`; an outside day too, unless another displayed month shows its date |
1081
- | `Calendar` | `${id}-month-<n>` | Month dropdown of the displayed month at position `n` (from 0), with a dropdown `captionLayout` |
1082
- | `Calendar` | `${id}-year-<n>` | Year dropdown of the displayed month at position `n` (from 0), with a dropdown `captionLayout` |
1083
- | `DialogContent` | `${id}-close` | Built-in close button, with `showCloseButton` (the default) |
1084
- | `DialogFooter` | `${id}-close` | Built-in close button, with `showCloseButton` |
1085
- | `SheetContent` | `${id}-close` | Built-in close button, with `showCloseButton` (the default) |
1074
+ | Component | Part | Element |
1075
+ | --------------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------- |
1076
+ | `FileUploadInput` | `${id}-input` | Hidden file input |
1077
+ | `FileUploadInput` | `${id}-trigger` | Trigger button, when `triggerLabel` renders one |
1078
+ | `Calendar` | `${id}-previous` | Previous month button |
1079
+ | `Calendar` | `${id}-next` | Next month button |
1080
+ | `Calendar` | `${id}-day-<yyyy-MM-dd>` | Day button, with `mode` or `onDayClick`; an outside day too, unless another displayed month shows its date |
1081
+ | `Calendar` | `${id}-month-<n>` | Month dropdown of the displayed month at position `n` (from 0), with a dropdown `captionLayout` |
1082
+ | `Calendar` | `${id}-year-<n>` | Year dropdown of the displayed month at position `n` (from 0), with a dropdown `captionLayout` |
1083
+ | `DialogContent` | `${id}-close` | Built-in close button, with `showCloseButton` (the default) |
1084
+ | `DialogFooter` | `${id}-close` | Built-in close button, with `showCloseButton` |
1085
+ | `SheetContent` | `${id}-close` | Built-in close button, with `showCloseButton` (the default) |
1086
+ | `PageHeader` | `${id}-title` | Title |
1087
+ | `PageHeader` | `${id}-description` | Description, with `description` |
1088
+ | `DataTableEmptyState` | `${id}-title` | Title, when `title` is not blank |
1089
+ | `DataTableEmptyState` | `${id}-description` | Description, when `description` is not blank |
1090
+ | `PasswordInput` | `${id}-toggle` | Visibility toggle, unless `hideToggle` |
1091
+ | `SearchField` | `${id}-clear` | Clear button, while the field has text |
1092
+ | `CopyableText` | `${id}-value` | Displayed value |
1093
+ | `CopyableText` | `${id}-tooltip` | Tooltip content, while the tooltip is open |
1094
+ | `ElCheatSheetTrigger` | `${id}-content` | Popover content, while the popover is open |
1095
+ | `ElCheatSheetTrigger` | `${id}-copy-<key>` | Copy button of an example: `plan-level`, `path-prefix` or `attribute-lookup` |
1096
+ | `CodeEditor` | `${id}-loading` | Skeleton, while Monaco loads |
1097
+ | `CodeEditor` | `${id}-fallback` | Plain textarea, when Monaco fails to load |
1086
1098
 
1087
1099
  The `Calendar` day keys are dates as react-day-picker formats them: they assume react-day-picker's default `numerals` (`latn`) and no `dateLib` override (Gregorian calendar); the `locale` doesn't change them. The dropdown keys are positions: navigating or picking a month doesn't change them. A `Calendar` part you replace through `components` gets no id. Replacing `MonthCaption` also drops the `month` and `year` ids, even though the dropdowns still render.
1088
1100
 
@@ -185,53 +185,58 @@ function g() {
185
185
  }), () => e.disconnect();
186
186
  }, []), e;
187
187
  }
188
- function _({ value: o, defaultValue: s, onChange: c, language: f = "plaintext", readOnly: p = !1, disabled: _ = !1, height: v, className: y, options: b, onMount: x }) {
189
- let [S, C] = r.useState(() => u() ? { status: "ready" } : { status: "loading" });
188
+ function _({ value: o, defaultValue: s, onChange: c, language: f = "plaintext", readOnly: p = !1, disabled: _ = !1, height: v, className: y, options: b, onMount: x, "data-testid": S }) {
189
+ let [C, w] = r.useState(() => u() ? { status: "ready" } : { status: "loading" });
190
190
  r.useEffect(() => {
191
- if (S.status !== "loading") return;
191
+ if (C.status !== "loading") return;
192
192
  let e = !1;
193
193
  return l().then(() => {
194
- e || C({ status: "ready" });
194
+ e || w({ status: "ready" });
195
195
  }, (t) => {
196
196
  if (e) return;
197
197
  let n = t instanceof Error ? t.message : "Unknown error";
198
- console.error("[CodeEditor] Failed to configure Monaco loader:", t), C({
198
+ console.error("[CodeEditor] Failed to configure Monaco loader:", t), w({
199
199
  status: "error",
200
200
  message: n
201
201
  });
202
202
  }), () => {
203
203
  e = !0;
204
204
  };
205
- }, [S.status]);
206
- let w = g(), T = r.useRef(null), E = r.useRef(null);
205
+ }, [C.status]);
206
+ let T = g(), E = r.useRef(null), D = r.useRef(null);
207
207
  r.useEffect(() => {
208
- T.current && m(T.current);
209
- }, [w]);
210
- let D = r.useCallback((e, t) => {
211
- T.current = t, E.current = e, x?.(e, t);
212
- }, [x]), O = typeof v == "number" ? `${v}px` : v ?? "300px", k = /* @__PURE__ */ i(n, { className: "size-full" });
208
+ E.current && m(E.current);
209
+ }, [T]);
210
+ let O = r.useCallback((e, t) => {
211
+ E.current = t, D.current = e, x?.(e, t);
212
+ }, [x]), k = typeof v == "number" ? `${v}px` : v ?? "300px", A = /* @__PURE__ */ i(n, {
213
+ className: "size-full",
214
+ "data-testid": S ? `${S}-loading` : void 0
215
+ });
213
216
  return /* @__PURE__ */ i("div", {
214
217
  "data-slot": "code-editor",
218
+ "data-testid": S,
215
219
  "data-disabled": _ ? "" : void 0,
216
220
  "data-readonly": p && !_ ? "" : void 0,
217
221
  className: t("overflow-hidden rounded-lg border border-input bg-background", "data-disabled:pointer-events-none data-disabled:opacity-50", "data-readonly:bg-muted/30", y),
218
- style: { height: O },
219
- children: S.status === "error" ? /* @__PURE__ */ i(e, {
222
+ style: { height: k },
223
+ children: C.status === "error" ? /* @__PURE__ */ i(e, {
220
224
  value: o ?? "",
221
225
  onChange: (e) => c?.(e.target.value),
222
226
  readOnly: p || _,
223
227
  spellCheck: !1,
228
+ "data-testid": S ? `${S}-fallback` : void 0,
224
229
  className: "size-full resize-none rounded-none border-0 p-3 font-mono text-xs focus-visible:ring-0"
225
- }) : S.status === "ready" ? /* @__PURE__ */ i(a, {
230
+ }) : C.status === "ready" ? /* @__PURE__ */ i(a, {
226
231
  height: "100%",
227
232
  language: f,
228
233
  value: o,
229
234
  defaultValue: s,
230
235
  theme: d,
231
236
  onChange: c,
232
- onMount: D,
237
+ onMount: O,
233
238
  beforeMount: h,
234
- loading: k,
239
+ loading: A,
235
240
  options: {
236
241
  readOnly: p || _,
237
242
  minimap: { enabled: !1 },
@@ -254,7 +259,7 @@ function _({ value: o, defaultValue: s, onChange: c, language: f = "plaintext",
254
259
  fixedOverflowWidgets: !0,
255
260
  ...b
256
261
  }
257
- }) : k
262
+ }) : A
258
263
  });
259
264
  }
260
265
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { a as e, g as t, h as n, l as r, p as i, r as a, s as o, t as s, v as c } from "./SchemaBanner-B4C-TVbq.js";
2
- import { t as l } from "./CodeEditor-W9JPCQhc.js";
2
+ import { t as l } from "./CodeEditor-C44Pe2i6.js";
3
3
  import { useEffect as u, useRef as d, useState as f } from "react";
4
4
  import { jsx as p, jsxs as m } from "react/jsx-runtime";
5
5
  //#region src/composed/JsonSchemaForm/fields/code-editor/CodeEditorField.tsx
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "../CodeEditor-W9JPCQhc.js";
1
+ import { n as e, t } from "../CodeEditor-C44Pe2i6.js";
2
2
  export { t as CodeEditor, e as setupCodeEditor };
@@ -21,9 +21,14 @@ export interface CodeEditorProps {
21
21
  className?: string;
22
22
  /** Advanced escape hatch — passes through to Monaco's construction options. */
23
23
  options?: EditorProps['options'];
24
+ /**
25
+ * Test id of the container. `${id}-loading` is on the skeleton while Monaco loads and
26
+ * `${id}-fallback` on the plain textarea shown when it fails. Monaco's own textarea is not tagged.
27
+ */
28
+ 'data-testid'?: string;
24
29
  /** Advanced escape hatch — Monaco editor + namespace once mounted. */
25
30
  onMount?: EditorProps['onMount'];
26
31
  }
27
- declare function CodeEditor({ value, defaultValue, onChange, language, readOnly, disabled, height, className, options, onMount, }: CodeEditorProps): React.JSX.Element;
32
+ declare function CodeEditor({ value, defaultValue, onChange, language, readOnly, disabled, height, className, options, onMount, 'data-testid': testId, }: CodeEditorProps): React.JSX.Element;
28
33
  export { CodeEditor };
29
34
  //# sourceMappingURL=CodeEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CodeEditor.d.ts","sourceRoot":"","sources":["../../../src/composed/CodeEditor/CodeEditor.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,WAAW,EAAU,MAAM,sBAAsB,CAAC;AAC7E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,kBAAkB,EAAoB,MAAM,UAAU,CAAC;AAIrE,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACjC,sEAAsE;IACtE,OAA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ChB,MAAM,EACN,SAAS,EACT,OAAO,EACP,OAAO,EACP,aAAa,EAAE,MAAM,GACtB,EAAE,eAAe,qBA8GjB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -12,8 +12,10 @@ interface CopyableTextProps {
12
12
  * Clipboard API is unavailable. Without it, failures are silent.
13
13
  */
14
14
  readonly onCopyError?: (error: unknown) => void;
15
+ /** Test id of the copy button; `${id}-value` and `${id}-tooltip` derive from it. */
16
+ readonly 'data-testid'?: string;
15
17
  }
16
- declare function CopyableText({ value, className, copyLabel, copiedLabel, resetDelayMs, onCopyError, }: CopyableTextProps): import("react").JSX.Element;
18
+ declare function CopyableText({ value, className, copyLabel, copiedLabel, resetDelayMs, onCopyError, 'data-testid': testId, }: CopyableTextProps): import("react").JSX.Element;
17
19
  declare namespace CopyableText {
18
20
  var displayName: string;
19
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CopyableText.d.ts","sourceRoot":"","sources":["../../../src/composed/CopyableText/CopyableText.tsx"],"names":[],"mappings":"AAMA,UAAU,iBAAiB;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,mEAAmE;IACnE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,iEAAiE;IACjE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACjD;AAED,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,SAAS,EACT,SAA2B,EAC3B,WAAuB,EACvB,YAAmB,EACnB,WAAW,GACZ,EAAE,iBAAiB,+BAkDnB;kBAzDQ,YAAY;;;AA6DrB,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"CopyableText.d.ts","sourceRoot":"","sources":["../../../src/composed/CopyableText/CopyableText.tsx"],"names":[],"mappings":"AAMA,UAAU,iBAAiB;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,mEAAmE;IACnE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,iEAAiE;IACjE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,oFAAoF;IACpF,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,SAAS,EACT,SAA2B,EAC3B,WAAuB,EACvB,YAAmB,EACnB,WAAW,EACX,aAAa,EAAE,MAAM,GACtB,EAAE,iBAAiB,+BAuDnB;kBA/DQ,YAAY;;;AAmErB,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
@@ -5,6 +5,8 @@ interface DataTableEmptyStateBaseProps {
5
5
  readonly title: string;
6
6
  readonly description: string;
7
7
  readonly className?: string;
8
+ /** Test id of the root; the parts it renders derive from it (`${id}-<part>`). */
9
+ readonly 'data-testid'?: string;
8
10
  }
9
11
  interface DataTableEmptyStateFirstUseProps extends DataTableEmptyStateBaseProps {
10
12
  readonly variant: 'first-use';
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableEmptyState.d.ts","sourceRoot":"","sources":["../../../src/composed/DataTableEmptyState/DataTableEmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAA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5E,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,iFAAiF;IACjF,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,UAAU,gCAAiC,SAAQ,4BAA4B;IAC7E,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,8CAA8C;IAC9C,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC;IACnC,2DAA2D;IAC3D,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC;IACrC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED,UAAU,iCAAkC,SAAQ,4BAA4B;IAC9E,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,qDAAqD;IACrD,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;IAC1B,QAAQ,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC;IAC/B,QAAQ,CAAC,eAAe,CAAC,EAAE,KAAK,CAAC;CAClC;AAED,KAAK,wBAAwB,GAAG,gCAAgC,GAAG,iCAAiC,CAAC;AAErG,iBAAS,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,+BA0D3D;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,YAAY,EAAE,wBAAwB,EAAE,CAAC"}
@@ -1,3 +1,8 @@
1
- declare function ElCheatSheetTrigger(): import("react").JSX.Element;
1
+ interface ElCheatSheetTriggerProps {
2
+ /** Test id of the trigger button; `${id}-content` and `${id}-copy-<key>` derive from it. */
3
+ readonly 'data-testid'?: string;
4
+ }
5
+ declare function ElCheatSheetTrigger({ 'data-testid': testId }?: ElCheatSheetTriggerProps): import("react").JSX.Element;
2
6
  export { ElCheatSheetTrigger };
7
+ export type { ElCheatSheetTriggerProps };
3
8
  //# sourceMappingURL=ElCheatSheetTrigger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ElCheatSheetTrigger.d.ts","sourceRoot":"","sources":["../../../src/composed/ElCheatSheetTrigger/ElCheatSheetTrigger.tsx"],"names":[],"mappings":"AAsBA,iBAAS,mBAAmB,gCAmD3B;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"ElCheatSheetTrigger.d.ts","sourceRoot":"","sources":["../../../src/composed/ElCheatSheetTrigger/ElCheatSheetTrigger.tsx"],"names":[],"mappings":"AAwBA,UAAU,wBAAwB;IAChC,4FAA4F;IAC5F,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,iBAAS,mBAAmB,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,GAAE,wBAA6B,+BAoDpF;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,YAAY,EAAE,wBAAwB,EAAE,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export { ElCheatSheetTrigger } from './ElCheatSheetTrigger';
2
+ export type { ElCheatSheetTriggerProps } from './ElCheatSheetTrigger';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composed/ElCheatSheetTrigger/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composed/ElCheatSheetTrigger/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -3,6 +3,8 @@ interface PageFocusedProps {
3
3
  /** Focused content (stepper, creation wizard, onboarding flow). */
4
4
  readonly children: ReactNode;
5
5
  readonly className?: string;
6
+ /** Test id of the root `<div>`. */
7
+ readonly 'data-testid'?: string;
6
8
  }
7
9
  /**
8
10
  * Constrains and centers page content for focused flows.
@@ -11,6 +13,8 @@ interface PageFocusedProps {
11
13
  * any task where the user is working through a focused linear flow.
12
14
  * The centering signals "you are in a sub-task" and draws the eye inward.
13
15
  *
16
+ * Test id lands on the `<div>`.
17
+ *
14
18
  * @example
15
19
  * ```tsx
16
20
  * export function CreateApiWizardPage() {
@@ -23,7 +27,7 @@ interface PageFocusedProps {
23
27
  * }
24
28
  * ```
25
29
  */
26
- declare function PageFocused({ children, className }: PageFocusedProps): import("react").JSX.Element;
30
+ declare function PageFocused({ children, className, 'data-testid': testId }: PageFocusedProps): import("react").JSX.Element;
27
31
  declare namespace PageFocused {
28
32
  var displayName: string;
29
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PageFocused.d.ts","sourceRoot":"","sources":["../../../src/composed/PageFocused/PageFocused.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,gBAAgB;IACxB,mEAAmE;IACnE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,gBAAgB,+BAE7D;kBAFQ,WAAW;;;AAMpB,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"PageFocused.d.ts","sourceRoot":"","sources":["../../../src/composed/PageFocused/PageFocused.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,gBAAgB;IACxB,mEAAmE;IACnE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,mCAAmC;IACnC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,iBAAS,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,gBAAgB,+BAMpF;kBANQ,WAAW;;;AAUpB,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
@@ -13,6 +13,8 @@ interface PageHeaderProps {
13
13
  /** Full-width row under the title and description, for badges, metadata or tabs. */
14
14
  readonly children?: ReactNode;
15
15
  readonly className?: string;
16
+ /** Test id of the root; the parts it renders derive from it (`${id}-<part>`). */
17
+ readonly 'data-testid'?: string;
16
18
  }
17
19
  /**
18
20
  * The header of a routed page: its title, an optional description, the page's actions and an
@@ -49,7 +51,7 @@ interface PageHeaderProps {
49
51
  * }
50
52
  * ```
51
53
  */
52
- declare function PageHeader({ title, description, actions, children, className }: PageHeaderProps): import("react").JSX.Element;
54
+ declare function PageHeader({ title, description, actions, children, className, 'data-testid': testId }: PageHeaderProps): import("react").JSX.Element;
53
55
  declare namespace PageHeader {
54
56
  var displayName: string;
55
57
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../src/composed/PageHeader/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,eAAe;IACvB,qGAAqG;IACrG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,iFAAiF;IACjF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IA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ps extends Omit<React.ComponentProps<'input'>, 'type'>
8
8
  readonly hideLabel?: string;
9
9
  /** Renders a plain password field without the reveal toggle. */
10
10
  readonly hideToggle?: boolean;
11
+ /** Test id of the `<input>`; the visibility toggle gets `${id}-toggle`. */
12
+ readonly 'data-testid'?: string;
11
13
  }
12
- declare function PasswordInput({ groupClassName, showLabel, hideLabel, hideToggle, className, disabled, ...props }: PasswordInputProps): React.JSX.Element;
14
+ declare function PasswordInput({ groupClassName, showLabel, hideLabel, hideToggle, className, disabled, 'data-testid': testId, ...props }: PasswordInputProps): React.JSX.Element;
13
15
  declare namespace PasswordInput {
14
16
  var displayName: string;
15
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordInput.d.ts","sourceRoot":"","sources":["../../../src/composed/PasswordInput/PasswordInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,UAAU,kBAAmB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC9E,sFAAsF;IACtF,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,iGAAiG;IACjG,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,kGAAkG;IAClG,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,gEAAgE;IAChE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,iBAAS,aAAa,CAAC,EACrB,cAAc,EACd,SAA2B,EAC3B,SAA2B,EAC3B,UAAkB,EAClB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,qBA+BpB;kBAvCQ,aAAa;;;AA2CtB,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"PasswordInput.d.ts","sourceRoot":"","sources":["../../../src/composed/PasswordInput/PasswordInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,UAAU,kBAAmB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC9E,sFAAsF;IACtF,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,iGAAiG;IACjG,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,kGAAkG;IAClG,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,gEAAgE;IAChE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,2EAA2E;IAC3E,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,iBAAS,aAAa,CAAC,EACrB,cAAc,EACd,SAA2B,EAC3B,SAA2B,EAC3B,UAAkB,EAClB,SAAS,EACT,QAAQ,EACR,aAAa,EAAE,MAAM,EACrB,GAAG,KAAK,EACT,EAAE,kBAAkB,qBAiCpB;kBA1CQ,aAAa;;;AA8CtB,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EAAE,kBAAkB,EAAE,CAAC"}
@@ -21,6 +21,8 @@ interface SearchFieldProps extends Omit<React.ComponentProps<'input'>, 'value' |
21
21
  readonly debounceMs?: number;
22
22
  /** Merged on the root `InputGroup`. The field fills its container: set the width here (`w-64` in a table toolbar). */
23
23
  readonly className?: string;
24
+ /** Test id of the `<input>`; the clear button gets `${id}-clear`. */
25
+ readonly 'data-testid'?: string;
24
26
  }
25
27
  /**
26
28
  * The search field of a list: a 32px input with a leading search icon, a clear button while it has
@@ -46,7 +48,7 @@ interface SearchFieldProps extends Omit<React.ComponentProps<'input'>, 'value' |
46
48
  * />
47
49
  * ```
48
50
  */
49
- declare function SearchField({ ref, value, onValueChange, debounceMs, className, disabled, onKeyDown, ...props }: SearchFieldProps): React.JSX.Element;
51
+ declare function SearchField({ ref, value, onValueChange, debounceMs, className, disabled, onKeyDown, 'data-testid': testId, ...props }: SearchFieldProps): React.JSX.Element;
50
52
  declare namespace SearchField {
51
53
  var displayName: string;
52
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["../../../src/composed/SearchField/SearchField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,UAAU,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,cAAc,CAAC;IACpH;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,gHAAgH;IAChH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,sHAAsH;IACtH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,iBAAS,WAAW,CAAC,EACnB,GAAG,EACH,KAAU,EACV,aAAa,EACb,UAAgB,EAChB,SAAS,EACT,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,qBAiGlB;kBA1GQ,WAAW;;;AA8GpB,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["../../../src/composed/SearchField/SearchField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,UAAU,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,cAAc,CAAC;IACpH;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,gHAAgH;IAChH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,sHAAsH;IACtH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,iBAAS,WAAW,CAAC,EACnB,GAAG,EACH,KAAU,EACV,aAAa,EACb,UAAgB,EAChB,SAAS,EACT,QAAQ,EACR,SAAS,EACT,aAAa,EAAE,MAAM,EACrB,GAAG,KAAK,EACT,EAAE,gBAAgB,qBAmGlB;kBA7GQ,WAAW;;;AAiHpB,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -25433,18 +25433,18 @@ function eG({ className: e, breadcrumbs: n = [], leading: r, appContext: i, trai
25433
25433
  eG.displayName = "ContentHeader";
25434
25434
  //#endregion
25435
25435
  //#region src/composed/CopyableText/CopyableText.tsx
25436
- function tG({ value: e, className: n, copyLabel: r = "Click to copy", copiedLabel: i = "Copied!", resetDelayMs: a = 1500, onCopyError: o }) {
25437
- let [s, c] = Je(!1), l = qe(null);
25436
+ function tG({ value: e, className: n, copyLabel: r = "Click to copy", copiedLabel: i = "Copied!", resetDelayMs: a = 1500, onCopyError: o, "data-testid": s }) {
25437
+ let [c, l] = Je(!1), u = qe(null);
25438
25438
  Ve(() => () => {
25439
- l.current !== null && clearTimeout(l.current);
25439
+ u.current !== null && clearTimeout(u.current);
25440
25440
  }, []);
25441
- let u = Re(() => {
25441
+ let d = Re(() => {
25442
25442
  if (typeof navigator > "u" || !navigator.clipboard?.writeText) {
25443
25443
  o?.(/* @__PURE__ */ Error("Clipboard API is not available in this context"));
25444
25444
  return;
25445
25445
  }
25446
25446
  navigator.clipboard.writeText(e).then(() => {
25447
- c(!0), l.current !== null && clearTimeout(l.current), l.current = setTimeout(() => c(!1), a);
25447
+ l(!0), u.current !== null && clearTimeout(u.current), u.current = setTimeout(() => l(!1), a);
25448
25448
  }).catch((e) => {
25449
25449
  o?.(e);
25450
25450
  });
@@ -25457,15 +25457,17 @@ function tG({ value: e, className: n, copyLabel: r = "Click to copy", copiedLabe
25457
25457
  asChild: !0,
25458
25458
  children: /* @__PURE__ */ G(ry, {
25459
25459
  "data-slot": "copyable-text",
25460
+ "data-testid": s,
25460
25461
  variant: "ghost",
25461
25462
  size: "sm",
25462
25463
  className: t("inline-flex h-auto items-center gap-1 px-1 text-muted-foreground", n),
25463
- "aria-label": s ? i : `Copy ${e}`,
25464
- onClick: u,
25464
+ "aria-label": c ? i : `Copy ${e}`,
25465
+ onClick: d,
25465
25466
  children: [/* @__PURE__ */ W("span", {
25466
25467
  className: "min-w-0 truncate font-mono text-xs",
25468
+ "data-testid": s ? `${s}-value` : void 0,
25467
25469
  children: e
25468
- }), s ? /* @__PURE__ */ W(re, {
25470
+ }), c ? /* @__PURE__ */ W(re, {
25469
25471
  className: "size-3.5 text-primary",
25470
25472
  "aria-hidden": "true"
25471
25473
  }) : /* @__PURE__ */ W(oe, {
@@ -25473,7 +25475,10 @@ function tG({ value: e, className: n, copyLabel: r = "Click to copy", copiedLabe
25473
25475
  "aria-hidden": "true"
25474
25476
  })]
25475
25477
  })
25476
- }), /* @__PURE__ */ W(WH, { children: s ? i : r })] });
25478
+ }), /* @__PURE__ */ W(WH, {
25479
+ "data-testid": s ? `${s}-tooltip` : void 0,
25480
+ children: c ? i : r
25481
+ })] });
25477
25482
  }
25478
25483
  tG.displayName = "CopyableText";
25479
25484
  //#endregion
@@ -27601,10 +27606,11 @@ function nq({ value: e, className: n }) {
27601
27606
  //#endregion
27602
27607
  //#region src/composed/DataTableEmptyState/DataTableEmptyState.tsx
27603
27608
  function rq(e) {
27604
- let { variant: n, icon: r, title: i, description: a, className: o } = e, s = i.trim().length > 0, c = a.trim().length > 0;
27609
+ let { variant: n, icon: r, title: i, description: a, className: o, "data-testid": s } = e, c = s ? `${s}-title` : void 0, l = s ? `${s}-description` : void 0, u = i.trim().length > 0, d = a.trim().length > 0;
27605
27610
  return n === "no-results" ? /* @__PURE__ */ G(PL, {
27606
27611
  className: t("py-12 text-foreground", o),
27607
27612
  role: "status",
27613
+ "data-testid": s,
27608
27614
  children: [/* @__PURE__ */ G(FL, {
27609
27615
  className: "max-w-md",
27610
27616
  children: [
@@ -27612,12 +27618,14 @@ function rq(e) {
27612
27618
  variant: "icon",
27613
27619
  children: r
27614
27620
  }),
27615
- s && /* @__PURE__ */ W(RL, {
27621
+ u && /* @__PURE__ */ W(RL, {
27616
27622
  className: "[overflow-wrap:anywhere] text-foreground",
27623
+ "data-testid": c,
27617
27624
  children: i
27618
27625
  }),
27619
- c && /* @__PURE__ */ W(zL, {
27626
+ d && /* @__PURE__ */ W(zL, {
27620
27627
  className: "[overflow-wrap:anywhere]",
27628
+ "data-testid": l,
27621
27629
  children: a
27622
27630
  })
27623
27631
  ]
@@ -27625,6 +27633,7 @@ function rq(e) {
27625
27633
  }) : /* @__PURE__ */ G(PL, {
27626
27634
  className: t("py-16 text-foreground", o),
27627
27635
  role: "status",
27636
+ "data-testid": s,
27628
27637
  children: [
27629
27638
  /* @__PURE__ */ G(FL, {
27630
27639
  className: "max-w-md",
@@ -27633,12 +27642,14 @@ function rq(e) {
27633
27642
  variant: "icon",
27634
27643
  children: r
27635
27644
  }),
27636
- s && /* @__PURE__ */ W(RL, {
27645
+ u && /* @__PURE__ */ W(RL, {
27637
27646
  className: "text-base font-semibold [overflow-wrap:anywhere] text-foreground",
27647
+ "data-testid": c,
27638
27648
  children: i
27639
27649
  }),
27640
- c && /* @__PURE__ */ W(zL, {
27650
+ d && /* @__PURE__ */ W(zL, {
27641
27651
  className: "[overflow-wrap:anywhere]",
27652
+ "data-testid": l,
27642
27653
  children: a
27643
27654
  })
27644
27655
  ]
@@ -29056,22 +29067,25 @@ function yJ({ id: e, value: n, onChange: r, placeholder: i = "Pick a date and ti
29056
29067
  //#region src/composed/ElCheatSheetTrigger/ElCheatSheetTrigger.tsx
29057
29068
  var bJ = [
29058
29069
  {
29070
+ key: "plan-level",
29059
29071
  label: "Check Plan Level",
29060
29072
  expression: "{#request.headers['x-plan-level'] == 'gold'}"
29061
29073
  },
29062
29074
  {
29075
+ key: "path-prefix",
29063
29076
  label: "Match Path Prefix",
29064
29077
  expression: "{#request.pathInfo.startsWith('/admin')}"
29065
29078
  },
29066
29079
  {
29080
+ key: "attribute-lookup",
29067
29081
  label: "Attribute Lookup",
29068
29082
  expression: "{#context.attributes['user-role'] == 'owner'}"
29069
29083
  }
29070
29084
  ];
29071
- function xJ() {
29072
- let [e, t] = Je(null), n = qe(void 0), r = Re((e, r) => {
29073
- navigator.clipboard && navigator.clipboard.writeText(r).then(() => {
29074
- clearTimeout(n.current), t(e), n.current = setTimeout(() => t(null), 1500);
29085
+ function xJ({ "data-testid": e } = {}) {
29086
+ let [t, n] = Je(null), r = qe(void 0), i = Re((e, t) => {
29087
+ navigator.clipboard && navigator.clipboard.writeText(t).then(() => {
29088
+ clearTimeout(r.current), n(e), r.current = setTimeout(() => n(null), 1500);
29075
29089
  }, () => {});
29076
29090
  }, []);
29077
29091
  return /* @__PURE__ */ G(dB, { children: [/* @__PURE__ */ W(fB, {
@@ -29080,33 +29094,36 @@ function xJ() {
29080
29094
  variant: "ghost",
29081
29095
  size: "icon-sm",
29082
29096
  "aria-label": "Expression language help",
29097
+ "data-testid": e,
29083
29098
  children: /* @__PURE__ */ W(ie, { className: "size-3.5" })
29084
29099
  })
29085
29100
  }), /* @__PURE__ */ G(pB, {
29086
29101
  className: "w-96",
29087
29102
  align: "start",
29103
+ "data-testid": e ? `${e}-content` : void 0,
29088
29104
  children: [/* @__PURE__ */ W(hB, { children: /* @__PURE__ */ W(gB, { children: "Expression Language Quick Reference" }) }), /* @__PURE__ */ W("div", {
29089
29105
  className: "space-y-2",
29090
- children: bJ.map((t) => /* @__PURE__ */ G("div", {
29106
+ children: bJ.map((n) => /* @__PURE__ */ G("div", {
29091
29107
  className: "flex items-start gap-2 rounded-md bg-muted/60 p-2",
29092
29108
  children: [/* @__PURE__ */ G("div", {
29093
29109
  className: "min-w-0 flex-1",
29094
29110
  children: [/* @__PURE__ */ W("p", {
29095
29111
  className: "text-xs font-medium",
29096
- children: t.label
29112
+ children: n.label
29097
29113
  }), /* @__PURE__ */ W("code", {
29098
29114
  className: "mt-0.5 block font-mono text-xs break-all text-muted-foreground",
29099
- children: t.expression
29115
+ children: n.expression
29100
29116
  })]
29101
29117
  }), /* @__PURE__ */ W(ry, {
29102
29118
  variant: "ghost",
29103
29119
  size: "icon-sm",
29104
29120
  className: "shrink-0",
29105
- "aria-label": `Copy ${t.label} expression`,
29106
- onClick: () => r(t.label, t.expression),
29107
- children: e === t.label ? /* @__PURE__ */ W(re, { className: "size-3" }) : /* @__PURE__ */ W(oe, { className: "size-3" })
29121
+ "aria-label": `Copy ${n.label} expression`,
29122
+ "data-testid": e ? `${e}-copy-${n.key}` : void 0,
29123
+ onClick: () => i(n.label, n.expression),
29124
+ children: t === n.label ? /* @__PURE__ */ W(re, { className: "size-3" }) : /* @__PURE__ */ W(oe, { className: "size-3" })
29108
29125
  })]
29109
- }, t.label))
29126
+ }, n.label))
29110
29127
  })]
29111
29128
  })] });
29112
29129
  }
@@ -30316,25 +30333,27 @@ function HY({ node: e, name: n, depth: r, hiddenTitle: i }) {
30316
30333
  }
30317
30334
  //#endregion
30318
30335
  //#region src/composed/PasswordInput/PasswordInput.tsx
30319
- function UY({ groupClassName: e, showLabel: t = "Show password", hideLabel: n = "Hide password", hideToggle: r = !1, className: i, disabled: a, ...o }) {
30320
- let [s, c] = Je(!1);
30336
+ function UY({ groupClassName: e, showLabel: t = "Show password", hideLabel: n = "Hide password", hideToggle: r = !1, className: i, disabled: a, "data-testid": o, ...s }) {
30337
+ let [c, l] = Je(!1);
30321
30338
  return /* @__PURE__ */ G(QA, {
30322
30339
  className: e,
30323
30340
  children: [/* @__PURE__ */ W(ij, {
30324
- type: !r && s ? "text" : "password",
30341
+ type: !r && c ? "text" : "password",
30325
30342
  className: i,
30326
30343
  disabled: a,
30327
- ...o
30344
+ "data-testid": o,
30345
+ ...s
30328
30346
  }), !r && /* @__PURE__ */ W(ej, {
30329
30347
  align: "inline-end",
30330
30348
  children: /* @__PURE__ */ W(nj, {
30331
30349
  "data-slot": "password-toggle",
30350
+ "data-testid": o ? `${o}-toggle` : void 0,
30332
30351
  size: "icon-xs",
30333
- "aria-label": s ? n : t,
30334
- "aria-pressed": s,
30352
+ "aria-label": c ? n : t,
30353
+ "aria-pressed": c,
30335
30354
  disabled: a,
30336
- onClick: () => c((e) => !e),
30337
- children: W(s ? _e : te, {
30355
+ onClick: () => l((e) => !e),
30356
+ children: W(c ? _e : te, {
30338
30357
  className: "size-3.5",
30339
30358
  "aria-hidden": "true"
30340
30359
  })
@@ -30452,7 +30471,7 @@ function YY(e) {
30452
30471
  }
30453
30472
  //#endregion
30454
30473
  //#region src/composed/JsonSchemaForm/SchemaField.tsx
30455
- var XY = Le(() => import("./CodeEditorField-CIqdz3P2.js").then((e) => ({ default: e.CodeEditorField })));
30474
+ var XY = Le(() => import("./CodeEditorField-B5QDl5Zv.js").then((e) => ({ default: e.CodeEditorField })));
30456
30475
  function ZY({ node: e, name: t, depth: n = 0, hiddenTitle: r }) {
30457
30476
  let { basePath: i } = N(), { schema: a } = e, o = t ?? "", s = t ? i ? `${i}.${t}` : t : i, c = Ge(() => [s], [s]), l = Ge(() => e.displayIf ? PJ(e.displayIf, i) : void 0, [e.displayIf, i]), u = Ge(() => e.disableIf ? PJ(e.disableIf, i) : void 0, [e.disableIf, i]);
30458
30477
  if (a.deprecated === !0) return null;
@@ -35802,8 +35821,10 @@ function TQ(e, t = []) {
35802
35821
  }
35803
35822
  //#endregion
35804
35823
  //#region src/composed/PageFocused/PageFocused.tsx
35805
- function EQ({ children: e, className: n }) {
35824
+ function EQ({ children: e, className: n, "data-testid": r }) {
35806
35825
  return /* @__PURE__ */ W("div", {
35826
+ "data-slot": "page-focused",
35827
+ "data-testid": r,
35807
35828
  className: t("mx-auto w-full max-w-focused", n),
35808
35829
  children: e
35809
35830
  });
@@ -35811,9 +35832,10 @@ function EQ({ children: e, className: n }) {
35811
35832
  EQ.displayName = "PageFocused";
35812
35833
  //#endregion
35813
35834
  //#region src/composed/PageHeader/PageHeader.tsx
35814
- function DQ({ title: e, description: n, actions: r, children: i, className: a }) {
35835
+ function DQ({ title: e, description: n, actions: r, children: i, className: a, "data-testid": o }) {
35815
35836
  return /* @__PURE__ */ G("header", {
35816
35837
  "data-slot": "page-header",
35838
+ "data-testid": o,
35817
35839
  className: t("flex flex-col gap-3", a),
35818
35840
  children: [/* @__PURE__ */ G("div", {
35819
35841
  className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
@@ -35821,10 +35843,12 @@ function DQ({ title: e, description: n, actions: r, children: i, className: a })
35821
35843
  className: "min-w-0 space-y-1 wrap-anywhere",
35822
35844
  children: [/* @__PURE__ */ W("h1", {
35823
35845
  "data-slot": "page-header-title",
35846
+ "data-testid": o ? `${o}-title` : void 0,
35824
35847
  className: "text-balance",
35825
35848
  children: e
35826
35849
  }), n ? /* @__PURE__ */ W("p", {
35827
35850
  "data-slot": "page-header-description",
35851
+ "data-testid": o ? `${o}-description` : void 0,
35828
35852
  className: "max-w-prose text-sm text-muted-foreground",
35829
35853
  children: n
35830
35854
  }) : null]
@@ -35843,17 +35867,17 @@ function DQ({ title: e, description: n, actions: r, children: i, className: a })
35843
35867
  DQ.displayName = "PageHeader";
35844
35868
  //#endregion
35845
35869
  //#region src/composed/SearchField/SearchField.tsx
35846
- function OQ({ ref: e, value: t = "", onValueChange: n, debounceMs: r = 300, className: i, disabled: a, onKeyDown: o, ...s }) {
35847
- let [c, l] = Je(t), u = qe(null), d = qe(t), f = qe(void 0), p = qe(n);
35848
- Ue(e, () => u.current, []), Ve(() => {
35849
- p.current = n;
35870
+ function OQ({ ref: e, value: t = "", onValueChange: n, debounceMs: r = 300, className: i, disabled: a, onKeyDown: o, "data-testid": s, ...c }) {
35871
+ let [l, u] = Je(t), d = qe(null), f = qe(t), p = qe(void 0), m = qe(n);
35872
+ Ue(e, () => d.current, []), Ve(() => {
35873
+ m.current = n;
35850
35874
  }), Ve(() => {
35851
- t !== d.current && (clearTimeout(f.current), l(t), d.current = t);
35852
- }, [t]), Ve(() => () => clearTimeout(f.current), []);
35853
- let m = (e) => {
35854
- clearTimeout(f.current), e !== d.current && (d.current = e, p.current(e));
35855
- }, h = () => {
35856
- l(""), m("");
35875
+ t !== f.current && (clearTimeout(p.current), u(t), f.current = t);
35876
+ }, [t]), Ve(() => () => clearTimeout(p.current), []);
35877
+ let h = (e) => {
35878
+ clearTimeout(p.current), e !== f.current && (f.current = e, m.current(e));
35879
+ }, g = () => {
35880
+ u(""), h("");
35857
35881
  };
35858
35882
  return /* @__PURE__ */ G(QA, {
35859
35883
  "data-search-field": "",
@@ -35864,33 +35888,35 @@ function OQ({ ref: e, value: t = "", onValueChange: n, debounceMs: r = 300, clas
35864
35888
  children: /* @__PURE__ */ W(ge, { "aria-hidden": "true" })
35865
35889
  }),
35866
35890
  /* @__PURE__ */ W(ij, {
35867
- ref: u,
35891
+ ref: d,
35868
35892
  type: "search",
35869
- value: c,
35893
+ value: l,
35870
35894
  disabled: a,
35871
35895
  onChange: (e) => {
35872
35896
  let t = e.target.value;
35873
- l(t), t === "" || r <= 0 ? m(t) : (clearTimeout(f.current), f.current = setTimeout(() => m(t), r));
35897
+ u(t), t === "" || r <= 0 ? h(t) : (clearTimeout(p.current), p.current = setTimeout(() => h(t), r));
35874
35898
  },
35875
35899
  onKeyDown: (e) => {
35876
- o?.(e), !(e.defaultPrevented || e.nativeEvent.isComposing) && (e.key === "Enter" ? m(c) : e.key === "Escape" && c !== "" && h());
35900
+ o?.(e), !(e.defaultPrevented || e.nativeEvent.isComposing) && (e.key === "Enter" ? h(l) : e.key === "Escape" && l !== "" && g());
35877
35901
  },
35878
35902
  spellCheck: !1,
35879
35903
  autoCorrect: "off",
35880
35904
  autoCapitalize: "none",
35881
35905
  enterKeyHint: "search",
35906
+ "data-testid": s,
35882
35907
  className: "[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none",
35883
- ...s
35908
+ ...c
35884
35909
  }),
35885
- c !== "" && /* @__PURE__ */ W(ej, {
35910
+ l !== "" && /* @__PURE__ */ W(ej, {
35886
35911
  align: "inline-end",
35887
35912
  children: /* @__PURE__ */ W(nj, {
35888
35913
  "data-slot": "search-field-clear",
35914
+ "data-testid": s ? `${s}-clear` : void 0,
35889
35915
  size: "icon-xs",
35890
35916
  "aria-label": "Clear search",
35891
35917
  disabled: a,
35892
35918
  onClick: () => {
35893
- h(), u.current?.focus();
35919
+ g(), d.current?.focus();
35894
35920
  },
35895
35921
  children: /* @__PURE__ */ W(Se, {
35896
35922
  className: "size-3.5",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravitee/graphene-core",
3
- "version": "3.38.0",
3
+ "version": "3.39.0",
4
4
  "type": "module",
5
5
  "description": "Gravitee's Graphene design system: accessible React components, design tokens, icons, and shared ESLint/TypeScript configs. Built on shadcn/ui and Tailwind.",
6
6
  "keywords": [