@genesislcap/foundation-react-utils 14.427.2-alpha-e0ffaad.0 → 14.428.1-GENC-1247.1

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.
@@ -24,7 +24,7 @@
24
24
  {
25
25
  "name": "options",
26
26
  "type": {
27
- "text": "{\n /**\n * The custom element tag name to register. Must be unique and contain a hyphen.\n * e.g. 'my-price-renderer'\n */\n name: string;\n /**\n * RankedTester from @jsonforms/core — determines when this renderer applies.\n * Use rankWith(rank, tester) — rank 5+ recommended to override built-ins.\n */\n tester: RankedTester;\n /**\n * Custom mapper if you need to transform state differently.\n * Defaults to mapStateToControlProps from @jsonforms/core.\n */\n mapper?: (state: JsonFormsState, ownProps: OwnPropsOfControl) => StatePropsOfControl;\n /**\n * Whether to wrap the React component in the platform's control-wrapper template,\n * which provides consistent label rendering, error display, and accessibility.\n * Defaults to true. Set to false if your React component handles its own labels/errors.\n *\n * Note: if your component has layout conflicts with the wrapper's internal flex styles\n * (e.g. a block-level combobox that shrinks to content width), you can target the\n * wrapper's inner element directly in light DOM:\n *\n * .foundation-control-wrapper { display: block; }\n */\n wrapWithControlWrapper?: boolean;\n }"
27
+ "text": "{\n /**\n * The custom element tag name to register. Must be unique and contain a hyphen.\n * e.g. 'my-price-renderer'\n */\n name: string;\n /**\n * RankedTester from @jsonforms/core — determines when this renderer applies.\n * Use rankWith(rank, tester) — rank 5+ recommended to override built-ins.\n */\n tester: RankedTester;\n /**\n * Custom mapper if you need to transform state differently.\n * Defaults to mapStateToControlProps from @jsonforms/core.\n */\n mapper?: (state: JsonFormsState, ownProps: OwnPropsOfControl) => StatePropsOfControl;\n /**\n * Whether to wrap the React component in the platform's <control-wrapper>,\n * which provides consistent label rendering, error display, and accessibility.\n * Defaults to true. Set to false if your React component handles its own labels/errors.\n *\n * Note: if your component has layout conflicts with control-wrapper's internal flex styles\n * (e.g. a block-level combobox that shrinks to content width), prefer keeping this true\n * and overriding via the exposed CSS part instead:\n *\n * control-wrapper::part(wrapper) { display: block; }\n *\n * This avoids losing built-in label/error/accessibility while still allowing external styling.\n * The `part=\"wrapper\"` is exposed on the inner slot-hosting div of <control-wrapper>.\n */\n wrapWithControlWrapper?: boolean;\n }"
28
28
  }
29
29
  }
30
30
  ],
@@ -1,4 +1,4 @@
1
- import { type RendererControlProps, type RendererEntry } from '@genesislcap/foundation-forms';
1
+ import type { RendererControlProps, RendererEntry } from '@genesislcap/foundation-forms';
2
2
  import { type JsonFormsState, type OwnPropsOfControl, type RankedTester, type StatePropsOfControl } from '@jsonforms/core';
3
3
  import type { ComponentType } from 'react';
4
4
  /**
@@ -66,15 +66,18 @@ export declare function createReactRenderer(Component: ComponentType<RendererCon
66
66
  */
67
67
  mapper?: (state: JsonFormsState, ownProps: OwnPropsOfControl) => StatePropsOfControl;
68
68
  /**
69
- * Whether to wrap the React component in the platform's control-wrapper template,
69
+ * Whether to wrap the React component in the platform's <control-wrapper>,
70
70
  * which provides consistent label rendering, error display, and accessibility.
71
71
  * Defaults to true. Set to false if your React component handles its own labels/errors.
72
72
  *
73
- * Note: if your component has layout conflicts with the wrapper's internal flex styles
74
- * (e.g. a block-level combobox that shrinks to content width), you can target the
75
- * wrapper's inner element directly in light DOM:
73
+ * Note: if your component has layout conflicts with control-wrapper's internal flex styles
74
+ * (e.g. a block-level combobox that shrinks to content width), prefer keeping this true
75
+ * and overriding via the exposed CSS part instead:
76
76
  *
77
- * .foundation-control-wrapper { display: block; }
77
+ * control-wrapper::part(wrapper) { display: block; }
78
+ *
79
+ * This avoids losing built-in label/error/accessibility while still allowing external styling.
80
+ * The `part="wrapper"` is exposed on the inner slot-hosting div of <control-wrapper>.
78
81
  */
79
82
  wrapWithControlWrapper?: boolean;
80
83
  }): RendererEntry;
@@ -1 +1 @@
1
- {"version":3,"file":"create-react-renderer.d.ts","sourceRoot":"","sources":["../../src/create-react-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EACzB,K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,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,iBAAiB,KAAK,mBAAmB,CAAC;IACrF;;;;;;;;;;;;;OAaG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,GACA,aAAa,CAmDf"}
@@ -1,4 +1,3 @@
1
- import { controlWrapperTemplate, } from '@genesislcap/foundation-forms';
2
1
  import { html } from '@genesislcap/web-core';
3
2
  import { mapStateToControlProps, } from '@jsonforms/core';
4
3
  import r2wc from '@r2wc/react-to-web-component';
@@ -84,10 +83,9 @@ export function createReactRenderer(Component, options) {
84
83
  const template = useWrapper
85
84
  ? html `
86
85
  <template>
87
- ${controlWrapperTemplate({
88
- prefix: 'zero',
89
- innerTemplate: innerTemplate(name),
90
- })}
86
+ <control-wrapper :control=${(x) => x.control} :json-forms=${(x) => x.jsonforms}>
87
+ ${innerTemplate(name)}
88
+ </control-wrapper>
91
89
  </template>
92
90
  `
93
91
  : html `
@@ -5,7 +5,7 @@ import { OwnPropsOfControl } from '@jsonforms/core';
5
5
  import { RankedTester } from '@jsonforms/core';
6
6
  import * as React_2 from 'react';
7
7
  import { RendererControlProps } from '@genesislcap/foundation-forms';
8
- import { RendererEntry } from '@genesislcap/foundation-forms';
8
+ import type { RendererEntry } from '@genesislcap/foundation-forms';
9
9
  import { StatePropsOfControl } from '@jsonforms/core';
10
10
 
11
11
  /**
@@ -73,15 +73,18 @@ export declare function createReactRenderer(Component: ComponentType<RendererCon
73
73
  */
74
74
  mapper?: (state: JsonFormsState, ownProps: OwnPropsOfControl) => StatePropsOfControl;
75
75
  /**
76
- * Whether to wrap the React component in the platform's control-wrapper template,
76
+ * Whether to wrap the React component in the platform's <control-wrapper>,
77
77
  * which provides consistent label rendering, error display, and accessibility.
78
78
  * Defaults to true. Set to false if your React component handles its own labels/errors.
79
79
  *
80
- * Note: if your component has layout conflicts with the wrapper's internal flex styles
81
- * (e.g. a block-level combobox that shrinks to content width), you can target the
82
- * wrapper's inner element directly in light DOM:
80
+ * Note: if your component has layout conflicts with control-wrapper's internal flex styles
81
+ * (e.g. a block-level combobox that shrinks to content width), prefer keeping this true
82
+ * and overriding via the exposed CSS part instead:
83
83
  *
84
- * .foundation-control-wrapper { display: block; }
84
+ * control-wrapper::part(wrapper) { display: block; }
85
+ *
86
+ * This avoids losing built-in label/error/accessibility while still allowing external styling.
87
+ * The `part="wrapper"` is exposed on the inner slot-hosting div of <control-wrapper>.
85
88
  */
86
89
  wrapWithControlWrapper?: boolean;
87
90
  }): RendererEntry;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-react-utils",
3
3
  "description": "Genesis Foundation React Utils",
4
- "version": "14.427.2-alpha-e0ffaad.0",
4
+ "version": "14.428.1-GENC-1247.1",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -29,23 +29,23 @@
29
29
  }
30
30
  },
31
31
  "devDependencies": {
32
- "@genesislcap/foundation-testing": "14.427.2-alpha-e0ffaad.0",
33
- "@genesislcap/genx": "14.427.2-alpha-e0ffaad.0",
34
- "@genesislcap/rollup-builder": "14.427.2-alpha-e0ffaad.0",
35
- "@genesislcap/ts-builder": "14.427.2-alpha-e0ffaad.0",
36
- "@genesislcap/uvu-playwright-builder": "14.427.2-alpha-e0ffaad.0",
37
- "@genesislcap/vite-builder": "14.427.2-alpha-e0ffaad.0",
38
- "@genesislcap/webpack-builder": "14.427.2-alpha-e0ffaad.0"
32
+ "@genesislcap/foundation-testing": "14.428.1-GENC-1247.1",
33
+ "@genesislcap/genx": "14.428.1-GENC-1247.1",
34
+ "@genesislcap/rollup-builder": "14.428.1-GENC-1247.1",
35
+ "@genesislcap/ts-builder": "14.428.1-GENC-1247.1",
36
+ "@genesislcap/uvu-playwright-builder": "14.428.1-GENC-1247.1",
37
+ "@genesislcap/vite-builder": "14.428.1-GENC-1247.1",
38
+ "@genesislcap/webpack-builder": "14.428.1-GENC-1247.1"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": "^19.0.0",
42
42
  "react-dom": "^19.0.0"
43
43
  },
44
44
  "dependencies": {
45
- "@genesislcap/foundation-forms": "14.427.2-alpha-e0ffaad.0",
46
- "@genesislcap/foundation-layout": "14.427.2-alpha-e0ffaad.0",
47
- "@genesislcap/foundation-logger": "14.427.2-alpha-e0ffaad.0",
48
- "@genesislcap/web-core": "14.427.2-alpha-e0ffaad.0",
45
+ "@genesislcap/foundation-forms": "14.428.1-GENC-1247.1",
46
+ "@genesislcap/foundation-layout": "14.428.1-GENC-1247.1",
47
+ "@genesislcap/foundation-logger": "14.428.1-GENC-1247.1",
48
+ "@genesislcap/web-core": "14.428.1-GENC-1247.1",
49
49
  "@jsonforms/core": "^3.2.1",
50
50
  "@r2wc/react-to-web-component": "^2.0.2"
51
51
  },
@@ -58,5 +58,5 @@
58
58
  "access": "public"
59
59
  },
60
60
  "customElements": "dist/custom-elements.json",
61
- "gitHead": "189e38590abb21df6ac6c641d58b758f5eba8eca"
61
+ "gitHead": "d2d211b558ad53c005906df9ff7be6969fa35b98"
62
62
  }
@@ -1,8 +1,4 @@
1
- import {
2
- controlWrapperTemplate,
3
- type RendererControlProps,
4
- type RendererEntry,
5
- } from '@genesislcap/foundation-forms';
1
+ import type { RendererControlProps, RendererEntry } from '@genesislcap/foundation-forms';
6
2
  import { html } from '@genesislcap/web-core';
7
3
  import {
8
4
  mapStateToControlProps,
@@ -81,15 +77,18 @@ export function createReactRenderer(
81
77
  */
82
78
  mapper?: (state: JsonFormsState, ownProps: OwnPropsOfControl) => StatePropsOfControl;
83
79
  /**
84
- * Whether to wrap the React component in the platform's control-wrapper template,
80
+ * Whether to wrap the React component in the platform's <control-wrapper>,
85
81
  * which provides consistent label rendering, error display, and accessibility.
86
82
  * Defaults to true. Set to false if your React component handles its own labels/errors.
87
83
  *
88
- * Note: if your component has layout conflicts with the wrapper's internal flex styles
89
- * (e.g. a block-level combobox that shrinks to content width), you can target the
90
- * wrapper's inner element directly in light DOM:
84
+ * Note: if your component has layout conflicts with control-wrapper's internal flex styles
85
+ * (e.g. a block-level combobox that shrinks to content width), prefer keeping this true
86
+ * and overriding via the exposed CSS part instead:
87
+ *
88
+ * control-wrapper::part(wrapper) { display: block; }
91
89
  *
92
- * .foundation-control-wrapper { display: block; }
90
+ * This avoids losing built-in label/error/accessibility while still allowing external styling.
91
+ * The `part="wrapper"` is exposed on the inner slot-hosting div of <control-wrapper>.
93
92
  */
94
93
  wrapWithControlWrapper?: boolean;
95
94
  },
@@ -130,10 +129,9 @@ export function createReactRenderer(
130
129
  const template = useWrapper
131
130
  ? html`
132
131
  <template>
133
- ${controlWrapperTemplate({
134
- prefix: 'zero',
135
- innerTemplate: innerTemplate(name) as any,
136
- })}
132
+ <control-wrapper :control=${(x: any) => x.control} :json-forms=${(x: any) => x.jsonforms}>
133
+ ${innerTemplate(name)}
134
+ </control-wrapper>
137
135
  </template>
138
136
  `
139
137
  : html`