@trops/dash-react 1.0.37 → 1.0.39

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
@@ -1786,7 +1786,8 @@ function Heading(_ref) {
1786
1786
  _ref$className = _ref.className,
1787
1787
  className = _ref$className === void 0 ? "" : _ref$className,
1788
1788
  _ref$as = _ref.as,
1789
- as = _ref$as === void 0 ? null : _ref$as;
1789
+ as = _ref$as === void 0 ? null : _ref$as,
1790
+ children = _ref.children;
1790
1791
  var _useContext = useContext(ThemeContext),
1791
1792
  currentTheme = _useContext.currentTheme;
1792
1793
  var paddingStyles = padding === true ? "py-3 2xl:py-4" : "p-0";
@@ -1800,7 +1801,7 @@ function Heading(_ref) {
1800
1801
  return /*#__PURE__*/createElement(Tag, {
1801
1802
  className: "flex flex-row ".concat(className, " ").concat(paddingStyles, " ").concat(styles.textSize || "text-5xl", " ").concat(styles.fontWeight || "font-bold", " ").concat(styles.letterSpacing || "tracking-tight", " ").concat(styles.lineHeight || "leading-tight", " ").concat(styles.textColor || "", " ").concat(styles.backgroundColor || "", " ").concat(onClick !== null && "cursor-pointer"),
1802
1803
  onClick: onClick
1803
- }, title);
1804
+ }, children !== undefined ? children : title);
1804
1805
  }
1805
1806
  function Heading2(_ref2) {
1806
1807
  var title = _ref2.title,
@@ -1815,7 +1816,8 @@ function Heading2(_ref2) {
1815
1816
  _ref2$className = _ref2.className,
1816
1817
  className = _ref2$className === void 0 ? "" : _ref2$className,
1817
1818
  _ref2$as = _ref2.as,
1818
- as = _ref2$as === void 0 ? null : _ref2$as;
1819
+ as = _ref2$as === void 0 ? null : _ref2$as,
1820
+ children = _ref2.children;
1819
1821
  var _useContext2 = useContext(ThemeContext),
1820
1822
  currentTheme = _useContext2.currentTheme;
1821
1823
  var paddingStyles = padding === true ? "py-2.5 2xl:py-3" : "p-0";
@@ -1829,7 +1831,7 @@ function Heading2(_ref2) {
1829
1831
  return /*#__PURE__*/createElement(Tag, {
1830
1832
  className: "flex flex-row ".concat(className, " ").concat(paddingStyles, " ").concat(styles.textSize || "text-4xl", " ").concat(styles.fontWeight || "font-bold", " ").concat(styles.letterSpacing || "tracking-tight", " ").concat(styles.lineHeight || "leading-tight", " ").concat(styles.textColor || "", " ").concat(styles.backgroundColor || "", " ").concat(onClick !== null && "cursor-pointer"),
1831
1833
  onClick: onClick
1832
- }, title);
1834
+ }, children !== undefined ? children : title);
1833
1835
  }
1834
1836
  function Heading3(_ref3) {
1835
1837
  var title = _ref3.title,
@@ -1844,7 +1846,8 @@ function Heading3(_ref3) {
1844
1846
  _ref3$className = _ref3.className,
1845
1847
  className = _ref3$className === void 0 ? "" : _ref3$className,
1846
1848
  _ref3$as = _ref3.as,
1847
- as = _ref3$as === void 0 ? null : _ref3$as;
1849
+ as = _ref3$as === void 0 ? null : _ref3$as,
1850
+ children = _ref3.children;
1848
1851
  var _useContext3 = useContext(ThemeContext),
1849
1852
  currentTheme = _useContext3.currentTheme;
1850
1853
  var paddingStyles = padding === true ? "py-2 2xl:py-3" : "p-0";
@@ -1858,7 +1861,7 @@ function Heading3(_ref3) {
1858
1861
  return /*#__PURE__*/createElement(Tag, {
1859
1862
  className: "flex flex-row ".concat(className, " ").concat(paddingStyles, " ").concat(styles.textSize || "text-3xl", " ").concat(styles.fontWeight || "font-semibold", " ").concat(styles.letterSpacing || "tracking-tight", " ").concat(styles.lineHeight || "leading-tight", " ").concat(styles.textColor || "", " ").concat(styles.backgroundColor || "", " ").concat(onClick !== null && "cursor-pointer"),
1860
1863
  onClick: onClick
1861
- }, title);
1864
+ }, children !== undefined ? children : title);
1862
1865
  }
1863
1866
  function SubHeading(_ref4) {
1864
1867
  var title = _ref4.title,
@@ -1873,7 +1876,8 @@ function SubHeading(_ref4) {
1873
1876
  _ref4$className = _ref4.className,
1874
1877
  className = _ref4$className === void 0 ? "" : _ref4$className,
1875
1878
  _ref4$as = _ref4.as,
1876
- as = _ref4$as === void 0 ? null : _ref4$as;
1879
+ as = _ref4$as === void 0 ? null : _ref4$as,
1880
+ children = _ref4.children;
1877
1881
  var _useContext4 = useContext(ThemeContext),
1878
1882
  currentTheme = _useContext4.currentTheme;
1879
1883
  var paddingStyles = padding === true ? "py-2 2xl:py-3" : "p-0";
@@ -1887,7 +1891,7 @@ function SubHeading(_ref4) {
1887
1891
  return /*#__PURE__*/createElement(Tag, {
1888
1892
  className: "flex flex-row w-full ".concat(className, " ").concat(paddingStyles, " ").concat(styles.textSize || "text-2xl", " ").concat(styles.fontWeight || "font-semibold", " ").concat(styles.letterSpacing || "tracking-tight", " ").concat(styles.lineHeight || "leading-snug", " ").concat(styles.textColor || "", " ").concat(styles.backgroundColor || "", " ").concat(onClick !== null && "cursor-pointer"),
1889
1893
  onClick: onClick
1890
- }, title);
1894
+ }, children !== undefined ? children : title);
1891
1895
  }
1892
1896
  function SubHeading2(_ref5) {
1893
1897
  var title = _ref5.title,
@@ -1902,7 +1906,8 @@ function SubHeading2(_ref5) {
1902
1906
  _ref5$className = _ref5.className,
1903
1907
  className = _ref5$className === void 0 ? "" : _ref5$className,
1904
1908
  _ref5$as = _ref5.as,
1905
- as = _ref5$as === void 0 ? null : _ref5$as;
1909
+ as = _ref5$as === void 0 ? null : _ref5$as,
1910
+ children = _ref5.children;
1906
1911
  var _useContext5 = useContext(ThemeContext),
1907
1912
  currentTheme = _useContext5.currentTheme;
1908
1913
  var paddingStyles = padding === true ? "py-1.5 2xl:py-2" : "p-0";
@@ -1916,7 +1921,7 @@ function SubHeading2(_ref5) {
1916
1921
  return /*#__PURE__*/createElement(Tag, {
1917
1922
  className: "flex flex-row w-full ".concat(className, " ").concat(paddingStyles, " ").concat(styles.textSize || "text-xl", " ").concat(styles.fontWeight || "font-medium", " ").concat(styles.letterSpacing || "tracking-tight", " ").concat(styles.lineHeight || "leading-snug", " ").concat(styles.textColor || "", " ").concat(styles.backgroundColor || "", " ").concat(onClick !== null && "cursor-pointer"),
1918
1923
  onClick: onClick
1919
- }, title);
1924
+ }, children !== undefined ? children : title);
1920
1925
  }
1921
1926
  function SubHeading3(_ref6) {
1922
1927
  var title = _ref6.title,
@@ -1931,7 +1936,8 @@ function SubHeading3(_ref6) {
1931
1936
  _ref6$className = _ref6.className,
1932
1937
  className = _ref6$className === void 0 ? "" : _ref6$className,
1933
1938
  _ref6$as = _ref6.as,
1934
- as = _ref6$as === void 0 ? null : _ref6$as;
1939
+ as = _ref6$as === void 0 ? null : _ref6$as,
1940
+ children = _ref6.children;
1935
1941
  var _useContext6 = useContext(ThemeContext),
1936
1942
  currentTheme = _useContext6.currentTheme;
1937
1943
  var paddingStyles = padding === true ? "py-1 2xl:py-2" : "p-0";
@@ -1945,13 +1951,13 @@ function SubHeading3(_ref6) {
1945
1951
  return /*#__PURE__*/createElement(Tag, {
1946
1952
  className: "flex flex-row w-full ".concat(className, " ").concat(paddingStyles, " ").concat(styles.textSize || "text-lg", " ").concat(styles.fontWeight || "font-medium", " ").concat(styles.letterSpacing || "tracking-normal", " ").concat(styles.lineHeight || "leading-snug", " ").concat(styles.textColor || "", " ").concat(styles.backgroundColor || "", " ").concat(onClick !== null && "cursor-pointer"),
1947
1953
  onClick: onClick
1948
- }, title);
1954
+ }, children !== undefined ? children : title);
1949
1955
  }
1950
1956
 
1951
1957
  function _typeof$D(o) { "@babel/helpers - typeof"; return _typeof$D = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$D(o); }
1952
- var _excluded$w = ["title", "onClick", "disabled", "padding", "textSize", "block", "size", "className"],
1953
- _excluded2$a = ["title", "onClick", "disabled", "textSize", "padding", "block", "size", "className"],
1954
- _excluded3$a = ["title", "onClick", "disabled", "textSize", "padding", "block", "size", "className"];
1958
+ var _excluded$w = ["title", "onClick", "disabled", "padding", "textSize", "block", "size", "className", "children"],
1959
+ _excluded2$a = ["title", "onClick", "disabled", "textSize", "padding", "block", "size", "className", "children"],
1960
+ _excluded3$a = ["title", "onClick", "disabled", "textSize", "padding", "block", "size", "className", "children"];
1955
1961
  function ownKeys$y(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1956
1962
  function _objectSpread$y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$y(Object(t), !0).forEach(function (r) { _defineProperty$z(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1957
1963
  function _defineProperty$z(e, r, t) { return (r = _toPropertyKey$D(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -1974,6 +1980,7 @@ var Button = function Button(_ref) {
1974
1980
  size = _ref$size === void 0 ? "md" : _ref$size,
1975
1981
  _ref$className = _ref.className,
1976
1982
  className = _ref$className === void 0 ? "" : _ref$className,
1983
+ children = _ref.children,
1977
1984
  props = _objectWithoutProperties$w(_ref, _excluded$w);
1978
1985
  var _useContext = useContext(ThemeContext),
1979
1986
  currentTheme = _useContext.currentTheme;
@@ -1990,7 +1997,7 @@ var Button = function Button(_ref) {
1990
1997
  onClick: onClick,
1991
1998
  disabled: disabled,
1992
1999
  className: "flex flex-nowrap whitespace-nowrap flex-row justify-center items-center ".concat(styles.string, " ").concat(width, " focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 ").concat(styles.focusRingColor || "", " ").concat(className),
1993
- children: title
2000
+ children: children !== undefined ? children : title
1994
2001
  });
1995
2002
  };
1996
2003
  var Button2 = function Button2(_ref2) {
@@ -2008,6 +2015,7 @@ var Button2 = function Button2(_ref2) {
2008
2015
  size = _ref2$size === void 0 ? "md" : _ref2$size,
2009
2016
  _ref2$className = _ref2.className,
2010
2017
  className = _ref2$className === void 0 ? "" : _ref2$className,
2018
+ children = _ref2.children,
2011
2019
  props = _objectWithoutProperties$w(_ref2, _excluded2$a);
2012
2020
  var _useContext2 = useContext(ThemeContext),
2013
2021
  currentTheme = _useContext2.currentTheme;
@@ -2023,7 +2031,7 @@ var Button2 = function Button2(_ref2) {
2023
2031
  onClick: onClick,
2024
2032
  disabled: disabled,
2025
2033
  className: "flex flex-row flex-shrink justify-center items-center ".concat(styles.string, " ").concat(width, " focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 ").concat(className),
2026
- children: title
2034
+ children: children !== undefined ? children : title
2027
2035
  });
2028
2036
  };
2029
2037
  var Button3 = function Button3(_ref3) {
@@ -2041,6 +2049,7 @@ var Button3 = function Button3(_ref3) {
2041
2049
  size = _ref3$size === void 0 ? "md" : _ref3$size,
2042
2050
  _ref3$className = _ref3.className,
2043
2051
  className = _ref3$className === void 0 ? "" : _ref3$className,
2052
+ children = _ref3.children,
2044
2053
  props = _objectWithoutProperties$w(_ref3, _excluded3$a);
2045
2054
  var _useContext3 = useContext(ThemeContext),
2046
2055
  currentTheme = _useContext3.currentTheme;
@@ -2055,14 +2064,14 @@ var Button3 = function Button3(_ref3) {
2055
2064
  onClick: onClick,
2056
2065
  disabled: disabled,
2057
2066
  className: "flex flex-row justify-center items-center ".concat(styles.string, " ").concat(width, " focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 ").concat(className),
2058
- children: title
2067
+ children: children !== undefined ? children : title
2059
2068
  });
2060
2069
  };
2061
2070
 
2062
2071
  function _typeof$C(o) { "@babel/helpers - typeof"; return _typeof$C = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$C(o); }
2063
- var _excluded$v = ["onClick", "icon", "text", "block", "textSize", "textColor", "iconSize", "backgroundColor", "selected", "selectedBackgroundColor", "selectedTextColor", "disabled", "className", "size", "ariaLabel"],
2064
- _excluded2$9 = ["onClick", "icon", "text", "block", "textSize", "iconSize", "backgroundColor", "selected", "selectedBackgroundColor", "selectedTextColor", "disabled", "className", "size", "ariaLabel"],
2065
- _excluded3$9 = ["onClick", "icon", "text", "block", "textSize", "iconSize", "backgroundColor", "selected", "selectedBackgroundColor", "selectedTextColor", "disabled", "className", "size", "ariaLabel"];
2072
+ var _excluded$v = ["onClick", "icon", "text", "block", "textSize", "textColor", "iconSize", "backgroundColor", "selected", "selectedBackgroundColor", "selectedTextColor", "disabled", "className", "size", "ariaLabel", "children"],
2073
+ _excluded2$9 = ["onClick", "icon", "text", "block", "textSize", "iconSize", "backgroundColor", "selected", "selectedBackgroundColor", "selectedTextColor", "disabled", "className", "size", "ariaLabel", "children"],
2074
+ _excluded3$9 = ["onClick", "icon", "text", "block", "textSize", "iconSize", "backgroundColor", "selected", "selectedBackgroundColor", "selectedTextColor", "disabled", "className", "size", "ariaLabel", "children"];
2066
2075
  function ownKeys$x(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2067
2076
  function _objectSpread$x(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$x(Object(t), !0).forEach(function (r) { _defineProperty$y(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$x(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2068
2077
  function _defineProperty$y(e, r, t) { return (r = _toPropertyKey$C(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -2100,6 +2109,7 @@ var ButtonIcon = function ButtonIcon(_ref) {
2100
2109
  size = _ref$size === void 0 ? "md" : _ref$size,
2101
2110
  _ref$ariaLabel = _ref.ariaLabel,
2102
2111
  ariaLabel = _ref$ariaLabel === void 0 ? null : _ref$ariaLabel,
2112
+ children = _ref.children,
2103
2113
  props = _objectWithoutProperties$v(_ref, _excluded$v);
2104
2114
  var _useContext = useContext(ThemeContext),
2105
2115
  currentTheme = _useContext.currentTheme;
@@ -2114,7 +2124,10 @@ var ButtonIcon = function ButtonIcon(_ref) {
2114
2124
  var uuid = getUUID$1("", "button-icon");
2115
2125
  var computedIconSize = iconSize || styles.iconSize || "h-5 w-5";
2116
2126
  var hasIcon = icon !== "";
2117
- var hasText = text !== "" && text !== null;
2127
+ // Accept the button label via `text` prop (canonical) OR children
2128
+ // (LLM-friendly shorthand). Prop wins when both are provided.
2129
+ var effectiveText = text !== "" && text !== null ? text : children;
2130
+ var hasText = effectiveText !== undefined && effectiveText !== null && effectiveText !== "";
2118
2131
  var bgColor = selected ? styles.selectedBackgroundColor || styles.backgroundColor || "" : styles.backgroundColor || "";
2119
2132
  var txtColor = selected ? styles.selectedTextColor || styles.textColor || "" : styles.textColor || "";
2120
2133
  return /*#__PURE__*/jsxs("button", {
@@ -2128,7 +2141,7 @@ var ButtonIcon = function ButtonIcon(_ref) {
2128
2141
  icon: icon,
2129
2142
  className: computedIconSize
2130
2143
  }), hasText && /*#__PURE__*/jsx("span", {
2131
- children: text
2144
+ children: effectiveText
2132
2145
  })]
2133
2146
  });
2134
2147
  };
@@ -2160,6 +2173,7 @@ var ButtonIcon2 = function ButtonIcon2(_ref2) {
2160
2173
  size = _ref2$size === void 0 ? "md" : _ref2$size,
2161
2174
  _ref2$ariaLabel = _ref2.ariaLabel,
2162
2175
  ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
2176
+ children = _ref2.children,
2163
2177
  props = _objectWithoutProperties$v(_ref2, _excluded2$9);
2164
2178
  var _useContext2 = useContext(ThemeContext),
2165
2179
  currentTheme = _useContext2.currentTheme;
@@ -2173,7 +2187,10 @@ var ButtonIcon2 = function ButtonIcon2(_ref2) {
2173
2187
  var uuid = getUUID$1("", "button-icon-2");
2174
2188
  var computedIconSize = iconSize || styles.iconSize || "h-4 w-4";
2175
2189
  var hasIcon = icon !== "";
2176
- var hasText = text !== "" && text !== null;
2190
+ // Accept the button label via `text` prop (canonical) OR children
2191
+ // (LLM-friendly shorthand). Prop wins when both are provided.
2192
+ var effectiveText = text !== "" && text !== null ? text : children;
2193
+ var hasText = effectiveText !== undefined && effectiveText !== null && effectiveText !== "";
2177
2194
  var bgColor = selected ? styles.selectedBackgroundColor || styles.backgroundColor || "" : styles.backgroundColor || "";
2178
2195
  var txtColor = selected ? styles.selectedTextColor || styles.textColor || "" : styles.textColor || "";
2179
2196
  return /*#__PURE__*/jsxs("button", {
@@ -2187,7 +2204,7 @@ var ButtonIcon2 = function ButtonIcon2(_ref2) {
2187
2204
  icon: icon,
2188
2205
  className: computedIconSize
2189
2206
  }), hasText && /*#__PURE__*/jsx("span", {
2190
- children: text
2207
+ children: effectiveText
2191
2208
  })]
2192
2209
  });
2193
2210
  };
@@ -2219,6 +2236,7 @@ var ButtonIcon3 = function ButtonIcon3(_ref3) {
2219
2236
  size = _ref3$size === void 0 ? "md" : _ref3$size,
2220
2237
  _ref3$ariaLabel = _ref3.ariaLabel,
2221
2238
  ariaLabel = _ref3$ariaLabel === void 0 ? null : _ref3$ariaLabel,
2239
+ children = _ref3.children,
2222
2240
  props = _objectWithoutProperties$v(_ref3, _excluded3$9);
2223
2241
  var _useContext3 = useContext(ThemeContext),
2224
2242
  currentTheme = _useContext3.currentTheme;
@@ -2232,7 +2250,10 @@ var ButtonIcon3 = function ButtonIcon3(_ref3) {
2232
2250
  var uuid = getUUID$1("", "button-icon-3");
2233
2251
  var computedIconSize = iconSize || styles.iconSize || "h-3 w-3";
2234
2252
  var hasIcon = icon !== "";
2235
- var hasText = text !== "" && text !== null;
2253
+ // Accept the button label via `text` prop (canonical) OR children
2254
+ // (LLM-friendly shorthand). Prop wins when both are provided.
2255
+ var effectiveText = text !== "" && text !== null ? text : children;
2256
+ var hasText = effectiveText !== undefined && effectiveText !== null && effectiveText !== "";
2236
2257
  var bgColor = selected ? styles.selectedBackgroundColor || styles.backgroundColor || "" : styles.backgroundColor || "";
2237
2258
  var txtColor = selected ? styles.selectedTextColor || styles.textColor || "" : styles.textColor || "";
2238
2259
  return /*#__PURE__*/jsxs("button", {
@@ -2246,7 +2267,7 @@ var ButtonIcon3 = function ButtonIcon3(_ref3) {
2246
2267
  icon: icon,
2247
2268
  className: computedIconSize
2248
2269
  }), hasText && /*#__PURE__*/jsx("span", {
2249
- children: text
2270
+ children: effectiveText
2250
2271
  })]
2251
2272
  });
2252
2273
  };
@@ -3160,6 +3181,39 @@ var WidgetChrome = function WidgetChrome(_ref) {
3160
3181
  });
3161
3182
  };
3162
3183
 
3184
+ /**
3185
+ * Dispatch an onChange callback in a way that supports both signatures:
3186
+ *
3187
+ * - dash-style: (value, event) => ...
3188
+ * - React-idiomatic: (event) => event.target.value
3189
+ *
3190
+ * The dash inputs (InputText / TextArea / SearchInput) historically passed
3191
+ * the unwrapped string value as the first arg. AI-generated widget code,
3192
+ * trained on plain React, almost always writes `(e) => e.target.value`
3193
+ * instead — which throws "Cannot read properties of undefined (reading
3194
+ * 'value')" because `e` is the string and `e.target` is undefined.
3195
+ *
3196
+ * To support both without a breaking change we inspect the handler's
3197
+ * source once per call: if it accesses `.target`, route the raw event
3198
+ * (React-idiomatic); otherwise pass `(value, event)` (legacy dash style).
3199
+ * Property names survive minification, so the check works on bundled
3200
+ * code too.
3201
+ */
3202
+ function dispatchInputChange(handler, event) {
3203
+ if (typeof handler !== "function") return;
3204
+ var source = "";
3205
+ try {
3206
+ source = handler.toString();
3207
+ } catch (_unused) {
3208
+ // Bound or native functions throw — fall through as value-style.
3209
+ }
3210
+ if (/\.target\b/.test(source)) {
3211
+ handler(event);
3212
+ } else {
3213
+ handler(event.target.value, event);
3214
+ }
3215
+ }
3216
+
3163
3217
  function _typeof$u(o) { "@babel/helpers - typeof"; return _typeof$u = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$u(o); }
3164
3218
  var _excluded$n = ["label", "value", "onChange", "placeholder", "type", "id", "className", "inputClassName", "autoFocus", "disabled", "backgroundColor", "textColor", "borderColor", "placeholderTextColor", "focusRingColor", "focusBorderColor"];
3165
3219
  function ownKeys$p(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -3232,7 +3286,7 @@ var InputText = function InputText(_ref) {
3232
3286
  type: type,
3233
3287
  value: value,
3234
3288
  onChange: function onChange(event) {
3235
- return _onChange(event.target.value, event);
3289
+ return dispatchInputChange(_onChange, event);
3236
3290
  },
3237
3291
  placeholder: placeholder,
3238
3292
  disabled: disabled,
@@ -3312,7 +3366,7 @@ var TextArea = function TextArea(_ref) {
3312
3366
  rows: rows,
3313
3367
  value: value,
3314
3368
  onChange: function onChange(event) {
3315
- return _onChange(event.target.value, event);
3369
+ return dispatchInputChange(_onChange, event);
3316
3370
  },
3317
3371
  placeholder: placeholder,
3318
3372
  disabled: disabled,
@@ -3801,7 +3855,7 @@ var SearchInput = function SearchInput(_ref) {
3801
3855
  type: "search",
3802
3856
  value: value,
3803
3857
  onChange: function onChange(event) {
3804
- return _onChange(event.target.value, event);
3858
+ return dispatchInputChange(_onChange, event);
3805
3859
  },
3806
3860
  placeholder: placeholder,
3807
3861
  disabled: disabled,
@@ -3812,9 +3866,9 @@ var SearchInput = function SearchInput(_ref) {
3812
3866
  };
3813
3867
 
3814
3868
  function _typeof$m(o) { "@babel/helpers - typeof"; return _typeof$m = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$m(o); }
3815
- var _excluded$f = ["text", "enabled", "setEnabled", "disabled", "className"],
3816
- _excluded2$7 = ["text", "enabled", "setEnabled", "disabled", "className"],
3817
- _excluded3$7 = ["text", "enabled", "setEnabled", "disabled", "className"];
3869
+ var _excluded$f = ["text", "enabled", "setEnabled", "disabled", "className", "children"],
3870
+ _excluded2$7 = ["text", "enabled", "setEnabled", "disabled", "className", "children"],
3871
+ _excluded3$7 = ["text", "enabled", "setEnabled", "disabled", "className", "children"];
3818
3872
  function ownKeys$h(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3819
3873
  function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$h(Object(t), !0).forEach(function (r) { _defineProperty$i(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3820
3874
  function _defineProperty$i(e, r, t) { return (r = _toPropertyKey$m(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -3833,6 +3887,7 @@ function Toggle(_ref) {
3833
3887
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
3834
3888
  _ref$className = _ref.className,
3835
3889
  className = _ref$className === void 0 ? "" : _ref$className,
3890
+ children = _ref.children,
3836
3891
  props = _objectWithoutProperties$f(_ref, _excluded$f);
3837
3892
  var _useContext = useContext(ThemeContext),
3838
3893
  currentTheme = _useContext.currentTheme;
@@ -3857,10 +3912,10 @@ function Toggle(_ref) {
3857
3912
  style: (_styles$inlineStyle3 = styles.inlineStyle) === null || _styles$inlineStyle3 === void 0 ? void 0 : _styles$inlineStyle3.activeBackgroundColor,
3858
3913
  className: "".concat(enabled ? "translate-x-5" : "translate-x-0", " pointer-events-none inline-block h-5 w-5 transform rounded-full ").concat((_styles$inlineStyle4 = styles.inlineStyle) !== null && _styles$inlineStyle4 !== void 0 && _styles$inlineStyle4.activeBackgroundColor ? "" : styles.activeBackgroundColor || "bg-white", " shadow-lg ring-0 transition duration-200 ease-in-out")
3859
3914
  })
3860
- }), text && /*#__PURE__*/jsx("span", {
3915
+ }), (text || children !== undefined) && /*#__PURE__*/jsx("span", {
3861
3916
  style: (_styles$inlineStyle5 = styles.inlineStyle) === null || _styles$inlineStyle5 === void 0 ? void 0 : _styles$inlineStyle5.textColor,
3862
3917
  className: "text-sm ".concat(styles.textColor || ""),
3863
- children: text
3918
+ children: children !== undefined ? children : text
3864
3919
  })]
3865
3920
  });
3866
3921
  }
@@ -3875,6 +3930,7 @@ function Toggle2(_ref2) {
3875
3930
  disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
3876
3931
  _ref2$className = _ref2.className,
3877
3932
  className = _ref2$className === void 0 ? "" : _ref2$className,
3933
+ children = _ref2.children,
3878
3934
  props = _objectWithoutProperties$f(_ref2, _excluded2$7);
3879
3935
  var _useContext2 = useContext(ThemeContext),
3880
3936
  currentTheme = _useContext2.currentTheme;
@@ -3899,10 +3955,10 @@ function Toggle2(_ref2) {
3899
3955
  style: (_styles$inlineStyle8 = styles.inlineStyle) === null || _styles$inlineStyle8 === void 0 ? void 0 : _styles$inlineStyle8.activeBackgroundColor,
3900
3956
  className: "".concat(enabled ? "translate-x-4" : "translate-x-0", " pointer-events-none inline-block h-4 w-4 transform rounded-full ").concat((_styles$inlineStyle9 = styles.inlineStyle) !== null && _styles$inlineStyle9 !== void 0 && _styles$inlineStyle9.activeBackgroundColor ? "" : styles.activeBackgroundColor || "bg-white", " shadow-lg ring-0 transition duration-200 ease-in-out")
3901
3957
  })
3902
- }), text && /*#__PURE__*/jsx("span", {
3958
+ }), (text || children !== undefined) && /*#__PURE__*/jsx("span", {
3903
3959
  style: (_styles$inlineStyle0 = styles.inlineStyle) === null || _styles$inlineStyle0 === void 0 ? void 0 : _styles$inlineStyle0.textColor,
3904
3960
  className: "text-sm ".concat(styles.textColor || ""),
3905
- children: text
3961
+ children: children !== undefined ? children : text
3906
3962
  })]
3907
3963
  });
3908
3964
  }
@@ -3917,6 +3973,7 @@ function Toggle3(_ref3) {
3917
3973
  disabled = _ref3$disabled === void 0 ? false : _ref3$disabled,
3918
3974
  _ref3$className = _ref3.className,
3919
3975
  className = _ref3$className === void 0 ? "" : _ref3$className,
3976
+ children = _ref3.children,
3920
3977
  props = _objectWithoutProperties$f(_ref3, _excluded3$7);
3921
3978
  var _useContext3 = useContext(ThemeContext),
3922
3979
  currentTheme = _useContext3.currentTheme;
@@ -3941,10 +3998,10 @@ function Toggle3(_ref3) {
3941
3998
  style: (_styles$inlineStyle11 = styles.inlineStyle) === null || _styles$inlineStyle11 === void 0 ? void 0 : _styles$inlineStyle11.activeBackgroundColor,
3942
3999
  className: "".concat(enabled ? "translate-x-3" : "translate-x-0", " pointer-events-none inline-block h-3 w-3 transform rounded-full ").concat((_styles$inlineStyle12 = styles.inlineStyle) !== null && _styles$inlineStyle12 !== void 0 && _styles$inlineStyle12.activeBackgroundColor ? "" : styles.activeBackgroundColor || "bg-white", " shadow-lg ring-0 transition duration-200 ease-in-out")
3943
4000
  })
3944
- }), text && /*#__PURE__*/jsx("span", {
4001
+ }), (text || children !== undefined) && /*#__PURE__*/jsx("span", {
3945
4002
  style: (_styles$inlineStyle13 = styles.inlineStyle) === null || _styles$inlineStyle13 === void 0 ? void 0 : _styles$inlineStyle13.textColor,
3946
4003
  className: "text-xs ".concat(styles.textColor || ""),
3947
- children: text
4004
+ children: children !== undefined ? children : text
3948
4005
  })]
3949
4006
  });
3950
4007
  }
@@ -4562,9 +4619,9 @@ var CodeRenderer = function CodeRenderer(_ref) {
4562
4619
  };
4563
4620
 
4564
4621
  function _typeof$h(o) { "@babel/helpers - typeof"; return _typeof$h = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$h(o); }
4565
- var _excluded$b = ["text", "textSize", "onClick", "className"],
4566
- _excluded2$5 = ["text", "textSize", "onClick", "className", "active"],
4567
- _excluded3$5 = ["text", "textSize", "onClick", "className"];
4622
+ var _excluded$b = ["text", "textSize", "onClick", "className", "children"],
4623
+ _excluded2$5 = ["text", "textSize", "onClick", "className", "active", "children"],
4624
+ _excluded3$5 = ["text", "textSize", "onClick", "className", "children"];
4568
4625
  function ownKeys$d(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4569
4626
  function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty$e(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4570
4627
  function _defineProperty$e(e, r, t) { return (r = _toPropertyKey$h(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -4580,6 +4637,7 @@ var Tag = function Tag(_ref) {
4580
4637
  onClick = _ref$onClick === void 0 ? null : _ref$onClick,
4581
4638
  _ref$className = _ref.className,
4582
4639
  className = _ref$className === void 0 ? "" : _ref$className,
4640
+ children = _ref.children,
4583
4641
  props = _objectWithoutProperties$b(_ref, _excluded$b);
4584
4642
  var _useContext = useContext(ThemeContext),
4585
4643
  currentTheme = _useContext.currentTheme;
@@ -4592,7 +4650,7 @@ var Tag = function Tag(_ref) {
4592
4650
  id: uuid,
4593
4651
  onClick: onClick,
4594
4652
  className: "flex flex-row w-fit ".concat(stylesCalculated, " px-3 py-1.5 whitespace-nowrap items-center justify-center transition-colors duration-150"),
4595
- children: text
4653
+ children: children !== undefined ? children : text
4596
4654
  });
4597
4655
  };
4598
4656
  var Tag2 = function Tag2(_ref2) {
@@ -4605,6 +4663,7 @@ var Tag2 = function Tag2(_ref2) {
4605
4663
  className = _ref2$className === void 0 ? "" : _ref2$className,
4606
4664
  _ref2$active = _ref2.active,
4607
4665
  active = _ref2$active === void 0 ? false : _ref2$active,
4666
+ children = _ref2.children,
4608
4667
  props = _objectWithoutProperties$b(_ref2, _excluded2$5);
4609
4668
  var _useContext2 = useContext(ThemeContext),
4610
4669
  currentTheme = _useContext2.currentTheme;
@@ -4618,7 +4677,7 @@ var Tag2 = function Tag2(_ref2) {
4618
4677
  id: uuid,
4619
4678
  onClick: onClick,
4620
4679
  className: "flex flex-row w-fit ".concat(stylesCalculated, " px-2 py-1 whitespace-nowrap items-center justify-center transition-colors duration-150"),
4621
- children: text
4680
+ children: children !== undefined ? children : text
4622
4681
  });
4623
4682
  };
4624
4683
  var Tag3 = function Tag3(_ref3) {
@@ -4629,6 +4688,7 @@ var Tag3 = function Tag3(_ref3) {
4629
4688
  onClick = _ref3$onClick === void 0 ? null : _ref3$onClick,
4630
4689
  _ref3$className = _ref3.className,
4631
4690
  className = _ref3$className === void 0 ? "" : _ref3$className,
4691
+ children = _ref3.children,
4632
4692
  props = _objectWithoutProperties$b(_ref3, _excluded3$5);
4633
4693
  var _useContext3 = useContext(ThemeContext),
4634
4694
  currentTheme = _useContext3.currentTheme;
@@ -4641,7 +4701,7 @@ var Tag3 = function Tag3(_ref3) {
4641
4701
  id: uuid,
4642
4702
  onClick: onClick,
4643
4703
  className: "flex flex-row w-fit ".concat(stylesCalculated, " px-1.5 py-0.5 whitespace-nowrap items-center justify-center transition-colors duration-150"),
4644
- children: text
4704
+ children: children !== undefined ? children : text
4645
4705
  });
4646
4706
  };
4647
4707