@thecb/components 11.3.3 → 11.3.5-beta.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/dist/index.d.ts CHANGED
@@ -687,7 +687,7 @@ interface FormInputProps {
687
687
  showErrors?: boolean;
688
688
  type?: string;
689
689
  formatter?: string | null;
690
- decorator?: boolean;
690
+ decorator?: string;
691
691
  themeValues?: object;
692
692
  background?: string;
693
693
  customHeight?: string;
package/dist/index.esm.js CHANGED
@@ -1717,7 +1717,12 @@ var createIdFromString = function createIdFromString(text, postscript) {
1717
1717
  // "first name", undefined, false -> "first-name"
1718
1718
  // "email address", "error message", false -> "email-address-error-message"
1719
1719
  // "shopping cart", "order item", true -> "shopping-cart-order-item_2ahtlz608"
1720
- return "".concat(text === null || text === void 0 ? void 0 : text.replace(/\s+/g, "-")).concat(postscript ? "-".concat(postscript === null || postscript === void 0 ? void 0 : postscript.replace(/\s+/g, "-")) : "").concat(unique ? createUniqueId() : "");
1720
+ var formatIdString = function formatIdString(str) {
1721
+ return str && typeof str === "string" ? str.trim().replace(/\s+/g, "-") : "";
1722
+ };
1723
+ var textId = formatIdString(text === null || text === void 0 ? void 0 : text.toString());
1724
+ var postscriptId = formatIdString(postscript === null || postscript === void 0 ? void 0 : postscript.toString());
1725
+ return "".concat(textId).concat(postscriptId ? "-".concat(postscriptId) : "").concat(unique ? createUniqueId() : "");
1721
1726
  }
1722
1727
  };
1723
1728
  var safeChildren = function safeChildren(children) {