@asgardeo/react 0.6.3 → 0.6.4

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/dist/index.js CHANGED
@@ -7015,7 +7015,7 @@ var getInputLabel = (name, type, t) => {
7015
7015
  const i18nKey = `elements.fields.${name}`;
7016
7016
  const label = t(i18nKey);
7017
7017
  if (label === i18nKey || !label) {
7018
- return name.charAt(0).toUpperCase() + name.slice(1);
7018
+ return name.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
7019
7019
  }
7020
7020
  return label;
7021
7021
  };
@@ -7032,9 +7032,9 @@ var convertSimpleInputToComponent = (input, t) => {
7032
7032
  if (input.name.toLowerCase().includes("password") && input.type.toLowerCase() === "string") {
7033
7033
  fieldType = "password";
7034
7034
  }
7035
- const variant = getInputVariant(input.type, input.name);
7036
- const label = getInputLabel(input.name, input.type, t);
7037
- const placeholder = getInputPlaceholder(input.name, input.type, t);
7035
+ const variant = getInputVariant(fieldType, input.name);
7036
+ const label = getInputLabel(input.name, fieldType, t);
7037
+ const placeholder = getInputPlaceholder(input.name, fieldType, t);
7038
7038
  return {
7039
7039
  id: generateId("input"),
7040
7040
  type: EmbeddedFlowComponentType2.Input,