@react-typed-forms/schemas-html 4.1.0 → 4.2.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/lib/index.js CHANGED
@@ -545,12 +545,13 @@ function DefaultDisplayOnly({
545
545
  style,
546
546
  renderer,
547
547
  textClass,
548
- inline
548
+ inline,
549
+ state
549
550
  }) {
550
551
  var _effect = useComponentTracking();
551
552
  try {
552
553
  var _ref;
553
- const text = (_ref = schemaInterface.isEmptyValue(dataNode.schema.field, dataNode.control.value) ? emptyText : schemaInterface.textValueForData(dataNode)) != null ? _ref : "";
554
+ const text = state.display != null ? state.display : (_ref = schemaInterface.isEmptyValue(dataNode.schema.field, dataNode.control.value) ? emptyText : schemaInterface.textValueForData(dataNode)) != null ? _ref : "";
554
555
  const {
555
556
  Div
556
557
  } = renderer.html;
@@ -898,7 +899,8 @@ function renderWizard(props, isChildVisible) {
898
899
  const defaultDialogOptions = {
899
900
  classes: {
900
901
  className: "",
901
- titleClass: "text-2xl font-bold"
902
+ titleClass: "text-2xl font-bold",
903
+ containerClass: "relative m-4 p-4 min-w-[400px] max-w-[80%] rounded-lg bg-white shadow-sm"
902
904
  }
903
905
  };
904
906
  function createDialogRenderer(options) {
@@ -922,7 +924,8 @@ function DefaultDialogRenderer({
922
924
  const {
923
925
  classes: {
924
926
  titleClass,
925
- className
927
+ className,
928
+ containerClass
926
929
  }
927
930
  } = deepMerge(options, defaultDialogOptions);
928
931
  const open = useControl(false);
@@ -950,6 +953,7 @@ function DefaultDialogRenderer({
950
953
  })), props.designMode ? designContent() : open.value && /*#__PURE__*/jsx(Modal, {
951
954
  state: overlayState,
952
955
  isDismissable: true,
956
+ containerClass: containerClass,
953
957
  children: dialogContent
954
958
  })]
955
959
  });
@@ -1903,7 +1907,7 @@ function createButtonActionRenderer(actionId, options = {}) {
1903
1907
  const iconElement = icon && /*#__PURE__*/jsx(I, {
1904
1908
  iconName: icon.name,
1905
1909
  iconLibrary: icon.library,
1906
- className: iconPlacement == IconPlacement.BeforeText ? options.iconBeforeClass : options.iconAfterClass
1910
+ className: rendererClass(textClass, iconPlacement == IconPlacement.BeforeText ? options.iconBeforeClass : options.iconAfterClass)
1907
1911
  });
1908
1912
  const textClassNames = rendererClass(textClass, isLink ? options.linkTextClass : rendererClass(options.textClass, actionStyle == ActionStyle.Secondary ? options.secondaryTextClass : options.primaryTextClass));
1909
1913
  const textElement = actionContent != null ? actionContent : actionText && /*#__PURE__*/jsx(Span, {
@@ -1989,6 +1993,7 @@ function createDefaultDataRenderer(options = {}) {
1989
1993
  className: "@ " + rendererClass(p.className, displayOnlyClass),
1990
1994
  children: /*#__PURE__*/jsx(DefaultDisplayOnly, {
1991
1995
  dataNode: props.dataNode,
1996
+ state: props.state,
1992
1997
  schemaInterface: props.dataContext.schemaInterface,
1993
1998
  className: props.className,
1994
1999
  textClass: props.textClass,
@@ -2270,8 +2275,11 @@ function DefaultHtmlIconRenderer({
2270
2275
  switch (iconLibrary) {
2271
2276
  case IconLibrary.FontAwesome:
2272
2277
  return "fa fa-" + iconName;
2273
- default:
2278
+ case IconLibrary.Material:
2279
+ case IconLibrary.CssClass:
2274
2280
  return iconName;
2281
+ default:
2282
+ return iconLibrary + " fa-" + iconName;
2275
2283
  }
2276
2284
  }
2277
2285
  } finally {