mod-arch-shared 1.16.1 → 1.18.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.
@@ -4,6 +4,8 @@ type ThemeAwareFormGroupWrapperProps = {
4
4
  label?: string;
5
5
  fieldId: string;
6
6
  isRequired?: boolean;
7
+ /** Always-visible description text rendered outside the fieldset (MUI) or before children (PF) */
8
+ descriptionTextNode?: React.ReactNode;
7
9
  helperTextNode?: React.ReactNode;
8
10
  hasError?: boolean;
9
11
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeAwareFormGroupWrapper.d.ts","sourceRoot":"","sources":["../../components/ThemeAwareFormGroupWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,KAAK,+BAA+B,GAAG;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,CAgDzE,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
1
+ {"version":3,"file":"ThemeAwareFormGroupWrapper.d.ts","sourceRoot":"","sources":["../../components/ThemeAwareFormGroupWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,KAAK,+BAA+B,GAAG;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kGAAkG;IAClG,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACtC,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,CAmDzE,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { FormGroup } from '@patternfly/react-core';
3
3
  import { useThemeContext } from 'mod-arch-kubeflow';
4
4
  import FormFieldset from './FormFieldset';
5
- const ThemeAwareFormGroupWrapper = ({ children, label, fieldId, isRequired, helperTextNode, hasError = false, className, role, isInline, skipFieldset = false, labelHelp, 'data-testid': dataTestId, }) => {
5
+ const ThemeAwareFormGroupWrapper = ({ children, label, fieldId, isRequired, descriptionTextNode, helperTextNode, hasError = false, className, role, isInline, skipFieldset = false, labelHelp, 'data-testid': dataTestId, }) => {
6
6
  const { isMUITheme } = useThemeContext();
7
7
  const errorClass = `${className || ''} ${hasError ? 'pf-m-error' : ''}`.trim();
8
8
  const formGroupProps = {
@@ -17,11 +17,13 @@ const ThemeAwareFormGroupWrapper = ({ children, label, fieldId, isRequired, help
17
17
  };
18
18
  if (isMUITheme) {
19
19
  return (React.createElement(React.Fragment, null,
20
+ descriptionTextNode,
20
21
  React.createElement(FormGroup, { ...formGroupProps }, skipFieldset ? children : React.createElement(FormFieldset, { component: children, field: label })),
21
22
  helperTextNode));
22
23
  }
23
24
  return (React.createElement(React.Fragment, null,
24
25
  React.createElement(FormGroup, { ...formGroupProps },
26
+ descriptionTextNode,
25
27
  children,
26
28
  helperTextNode)));
27
29
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeAwareFormGroupWrapper.js","sourceRoot":"","sources":["../../components/ThemeAwareFormGroupWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAkB1C,MAAM,0BAA0B,GAA8C,CAAC,EAC7E,QAAQ,EACR,KAAK,EACL,OAAO,EACP,UAAU,EACV,cAAc,EACd,QAAQ,GAAG,KAAK,EAChB,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,YAAY,GAAG,KAAK,EACpB,SAAS,EACT,aAAa,EAAE,UAAU,GAC1B,EAAE,EAAE;IACH,MAAM,EAAE,UAAU,EAAE,GAAG,eAAe,EAAE,CAAC;IAEzC,MAAM,UAAU,GAAG,GAAG,SAAS,IAAI,EAAE,IAAI,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;IAE/E,MAAM,cAAc,GAAG;QACrB,SAAS,EAAE,UAAU;QACrB,KAAK;QACL,UAAU;QACV,OAAO;QACP,IAAI;QACJ,QAAQ;QACR,SAAS;QACT,aAAa,EAAE,UAAU;KAC1B,CAAC;IAEF,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,CACL;YACE,oBAAC,SAAS,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,OAAO,CACL;YACG,mBAAmB;YACpB,oBAAC,SAAS,OAAK,cAAc,IAC1B,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,oBAAC,YAAY,IAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,GAAI,CACpE;YACX,cAAc,CACd,CACJ,CAAC;IACJ,CAAC;IAED,OAAO,CACL;QACE,oBAAC,SAAS,OAAK,cAAc;YAC1B,mBAAmB;YACnB,QAAQ;YACR,cAAc,CACL,CACX,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-arch-shared",
3
- "version": "1.16.1",
3
+ "version": "1.18.0",
4
4
  "description": "Shared UI components and utilities for modular architecture micro-frontend projects",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -50,8 +50,8 @@
50
50
  "access": "public"
51
51
  },
52
52
  "peerDependencies": {
53
- "mod-arch-core": ">=1.16.1",
54
- "mod-arch-kubeflow": ">=1.16.1",
53
+ "mod-arch-core": ">=1.18.0",
54
+ "mod-arch-kubeflow": ">=1.18.0",
55
55
  "react": ">=16.8.0",
56
56
  "react-dom": ">=16.8.0",
57
57
  "react-router-dom": ">=6.4.0"
@@ -86,14 +86,14 @@
86
86
  "ts-jest": "^29.2.6",
87
87
  "tsc-alias": "^1.8.15",
88
88
  "typescript": "^5.0.4",
89
- "mod-arch-core": "1.16.1",
90
- "mod-arch-kubeflow": "1.16.1"
89
+ "mod-arch-core": "1.18.0",
90
+ "mod-arch-kubeflow": "1.18.0"
91
91
  },
92
92
  "dependencies": {
93
93
  "@patternfly/patternfly": "^6.4.0",
94
94
  "@patternfly/react-drag-drop": "^6.4.0",
95
95
  "classnames": "^2.2.6",
96
- "dompurify": "^3.3.2",
96
+ "dompurify": "^3.4.0",
97
97
  "lodash-es": "^4.18.1",
98
98
  "showdown": "^2.1.0"
99
99
  },