@blerp/design 1.3.16 → 1.4.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.
Files changed (128) hide show
  1. package/dist/cjs/Blerp/BlerpImageRow.js +176 -57
  2. package/dist/cjs/Blerp/BlerpSavePopup.js +44 -40
  3. package/dist/cjs/Blerp/BlerpTitleRow.js +36 -19
  4. package/dist/cjs/Blerp/BlerpTopRow.js +110 -44
  5. package/dist/cjs/Blerp.js +9 -16
  6. package/dist/cjs/BlerpAudioContextProvider.js +2 -2
  7. package/dist/cjs/BlerpListView.js +318 -168
  8. package/dist/cjs/BlerpListViewPremium.js +155 -130
  9. package/dist/cjs/BlerpListViewSkeleton.js +60 -13
  10. package/dist/cjs/BlerpSkeleton.js +32 -9
  11. package/dist/cjs/CollectionCard.js +139 -60
  12. package/dist/cjs/CollectionListViewPremium.js +368 -297
  13. package/dist/cjs/CollectionSkeleton.js +74 -13
  14. package/dist/cjs/Dropdown.js +272 -172
  15. package/dist/cjs/EllipsisLoader.js +66 -21
  16. package/dist/cjs/GroupCard.js +64 -57
  17. package/dist/cjs/Icons/Icons.js +288 -426
  18. package/dist/cjs/ImageEditor.js +247 -0
  19. package/dist/cjs/ImageUpload.js +226 -0
  20. package/dist/cjs/NewBlerp.js +354 -160
  21. package/dist/cjs/NewBlerpTest.js +10 -792
  22. package/dist/cjs/NewCollectionModal.js +294 -310
  23. package/dist/cjs/PremiumCollectionCard.js +191 -454
  24. package/dist/cjs/PurchaseModals/CheckoutModal.js +1 -1
  25. package/dist/cjs/PurchaseModals/PremiumBlerpCheckoutModal.js +1 -1
  26. package/dist/cjs/PurchaseModals/PremiumCollectionCheckoutModal.js +1 -1
  27. package/dist/cjs/PurchaseModals/PremiumSubscriptionCheckoutModal.js +1 -1
  28. package/dist/cjs/ReactionButtons.js +26 -13
  29. package/dist/cjs/SnackbarContextProvider.js +200 -116
  30. package/dist/cjs/Theme.js +217 -90
  31. package/dist/cjs/Toggle.js +86 -32
  32. package/dist/cjs/UserCard.js +13 -32
  33. package/dist/cjs/UserPage/LibraryControls.js +180 -93
  34. package/dist/cjs/UserPage/UserLibraryHeader.js +23 -14
  35. package/dist/cjs/UserPage/UserProfileHeader.js +120 -105
  36. package/dist/cjs/UsernameWithPopout.js +12 -8
  37. package/dist/cjs/colors.js +15 -8
  38. package/dist/cjs/helpers.js +131 -0
  39. package/dist/cjs/index.js +98 -52
  40. package/dist/cjs/neo-components/Autocomplete.js +280 -0
  41. package/dist/cjs/neo-components/BottomNavigation.js +120 -0
  42. package/dist/cjs/neo-components/Box.js +48 -0
  43. package/dist/cjs/neo-components/Button.js +206 -0
  44. package/dist/cjs/neo-components/CircularProgress.js +92 -0
  45. package/dist/cjs/neo-components/Container.js +75 -0
  46. package/dist/cjs/neo-components/Dialog.js +441 -0
  47. package/dist/cjs/neo-components/Fab.js +237 -0
  48. package/dist/cjs/neo-components/FormControls.js +1057 -0
  49. package/dist/cjs/neo-components/Grid.js +256 -0
  50. package/dist/cjs/neo-components/IconButton.js +111 -0
  51. package/dist/cjs/neo-components/Input.js +493 -0
  52. package/dist/cjs/neo-components/Layout.js +1213 -0
  53. package/dist/cjs/neo-components/Misc.js +858 -0
  54. package/dist/cjs/neo-components/Navigation.js +1578 -0
  55. package/dist/cjs/neo-components/Paper.js +256 -0
  56. package/dist/cjs/neo-components/Stack.js +194 -0
  57. package/dist/cjs/neo-components/Stepper.js +291 -0
  58. package/dist/cjs/neo-components/Text.js +290 -0
  59. package/dist/cjs/neo-components/ThemeProvider.js +731 -0
  60. package/dist/cjs/neo-components/ToggleButton.js +223 -0
  61. package/dist/cjs/neo-components/createTheme.js +306 -0
  62. package/dist/cjs/neo-components/withSx.js +164 -0
  63. package/dist/cjs/neo-utils/sxToStyle.js +508 -0
  64. package/dist/esm/Blerp/BlerpImageRow.js +166 -46
  65. package/dist/esm/Blerp/BlerpSavePopup.js +35 -27
  66. package/dist/esm/Blerp/BlerpTitleRow.js +32 -13
  67. package/dist/esm/Blerp/BlerpTopRow.js +85 -16
  68. package/dist/esm/Blerp.js +4 -12
  69. package/dist/esm/BlerpAudioContextProvider.js +1 -2
  70. package/dist/esm/BlerpListView.js +313 -160
  71. package/dist/esm/BlerpListViewPremium.js +135 -109
  72. package/dist/esm/BlerpListViewSkeleton.js +60 -11
  73. package/dist/esm/BlerpSkeleton.js +32 -7
  74. package/dist/esm/CollectionCard.js +118 -38
  75. package/dist/esm/CollectionListViewPremium.js +367 -294
  76. package/dist/esm/CollectionSkeleton.js +73 -11
  77. package/dist/esm/Dropdown.js +260 -161
  78. package/dist/esm/EllipsisLoader.js +63 -18
  79. package/dist/esm/GroupCard.js +54 -46
  80. package/dist/esm/Icons/Icons.js +226 -367
  81. package/dist/esm/ImageEditor.js +240 -0
  82. package/dist/esm/ImageUpload.js +217 -0
  83. package/dist/esm/NewBlerp.js +282 -79
  84. package/dist/esm/NewBlerpTest.js +11 -781
  85. package/dist/esm/NewCollectionModal.js +289 -304
  86. package/dist/esm/PremiumCollectionCard.js +192 -451
  87. package/dist/esm/PurchaseModals/CheckoutModal.js +1 -1
  88. package/dist/esm/PurchaseModals/PremiumBlerpCheckoutModal.js +1 -1
  89. package/dist/esm/PurchaseModals/PremiumCollectionCheckoutModal.js +1 -1
  90. package/dist/esm/PurchaseModals/PremiumSubscriptionCheckoutModal.js +1 -1
  91. package/dist/esm/ReactionButtons.js +23 -8
  92. package/dist/esm/SnackbarContextProvider.js +196 -110
  93. package/dist/esm/Theme.js +187 -66
  94. package/dist/esm/Toggle.js +84 -29
  95. package/dist/esm/UserCard.js +1 -20
  96. package/dist/esm/UserPage/LibraryControls.js +159 -65
  97. package/dist/esm/UserPage/UserLibraryHeader.js +18 -10
  98. package/dist/esm/UserPage/UserProfileHeader.js +100 -79
  99. package/dist/esm/UsernameWithPopout.js +7 -4
  100. package/dist/esm/colors.js +11 -9
  101. package/dist/esm/helpers.js +122 -0
  102. package/dist/esm/icons.js +1 -1
  103. package/dist/esm/index.js +39 -3
  104. package/dist/esm/neo-components/Autocomplete.js +269 -0
  105. package/dist/esm/neo-components/BottomNavigation.js +109 -0
  106. package/dist/esm/neo-components/Box.js +36 -0
  107. package/dist/esm/neo-components/Button.js +194 -0
  108. package/dist/esm/neo-components/CircularProgress.js +81 -0
  109. package/dist/esm/neo-components/Container.js +63 -0
  110. package/dist/esm/neo-components/Dialog.js +423 -0
  111. package/dist/esm/neo-components/Fab.js +225 -0
  112. package/dist/esm/neo-components/FormControls.js +1041 -0
  113. package/dist/esm/neo-components/Grid.js +244 -0
  114. package/dist/esm/neo-components/IconButton.js +99 -0
  115. package/dist/esm/neo-components/Input.js +478 -0
  116. package/dist/esm/neo-components/Layout.js +1179 -0
  117. package/dist/esm/neo-components/Misc.js +840 -0
  118. package/dist/esm/neo-components/Navigation.js +1556 -0
  119. package/dist/esm/neo-components/Paper.js +243 -0
  120. package/dist/esm/neo-components/Stack.js +182 -0
  121. package/dist/esm/neo-components/Stepper.js +278 -0
  122. package/dist/esm/neo-components/Text.js +277 -0
  123. package/dist/esm/neo-components/ThemeProvider.js +718 -0
  124. package/dist/esm/neo-components/ToggleButton.js +214 -0
  125. package/dist/esm/neo-components/createTheme.js +297 -0
  126. package/dist/esm/neo-components/withSx.js +153 -0
  127. package/dist/esm/neo-utils/sxToStyle.js +502 -0
  128. package/package.json +19 -15
@@ -0,0 +1,493 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _extends = require('@babel/runtime/helpers/extends');
6
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
7
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
8
+ var React = require('react');
9
+ var withSx = require('./withSx.js');
10
+ var ThemeProvider = require('./ThemeProvider.js');
11
+
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
15
+ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
16
+ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
17
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
18
+
19
+ const _excluded = ["variant", "label", "placeholder", "helperText", "error", "disabled", "required", "fullWidth", "multiline", "rows", "maxRows", "minRows", "type", "value", "defaultValue", "onChange", "onFocus", "onBlur", "onClick", "onKeyDown", "InputProps", "inputProps", "InputLabelProps", "FormHelperTextProps", "size", "color", "darkMode", "autoFocus", "autoComplete", "name", "id", "inputRef", "startAdornment", "endAdornment", "style", "sx"],
20
+ _excluded2 = ["position", "children", "disablePointerEvents", "style"],
21
+ _excluded3 = ["children", "error", "disabled", "style"];
22
+
23
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
24
+
25
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
26
+
27
+ const resolveStyleValue = (value, colors) => {
28
+ if (typeof value === "string" && value.includes(".main")) {
29
+ const colorKey = value.replace(".main", "");
30
+ const color = colors === null || colors === void 0 ? void 0 : colors[colorKey];
31
+ if (color) return typeof color === "object" ? color.main : color;
32
+ }
33
+
34
+ return value;
35
+ };
36
+
37
+ const resolveStyles = (styleObj, colors) => {
38
+ if (!styleObj) return {};
39
+ const resolved = {};
40
+
41
+ for (const [key, value] of Object.entries(styleObj)) {
42
+ if (typeof value === "object" && value !== null && !Array.isArray(value)) {
43
+ // Skip pseudo-selectors and nested objects for inline styles
44
+ if (key.startsWith("&") || key.startsWith(":")) continue;
45
+ resolved[key] = resolveStyles(value, colors);
46
+ } else {
47
+ resolved[key] = resolveStyleValue(value, colors);
48
+ }
49
+ }
50
+
51
+ return resolved;
52
+ };
53
+ /**
54
+ * Input/TextField - Form input component (replaces MUI TextField)
55
+ * Supports variants: outlined, filled, standard
56
+ *
57
+ * DEFAULTS TO DARK MODE (white text/borders) since most Blerp UI is on dark backgrounds.
58
+ * Pass darkMode={false} to use light mode styling.
59
+ */
60
+
61
+
62
+ const BaseInput = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
63
+ let {
64
+ variant = "outlined",
65
+ label,
66
+ placeholder,
67
+ helperText,
68
+ error = false,
69
+ disabled = false,
70
+ required = false,
71
+ fullWidth = false,
72
+ multiline = false,
73
+ rows,
74
+ maxRows,
75
+ minRows,
76
+ type = "text",
77
+ value,
78
+ defaultValue,
79
+ onChange,
80
+ onFocus,
81
+ onBlur,
82
+ onClick,
83
+ onKeyDown,
84
+ InputProps = {},
85
+ inputProps = {},
86
+ InputLabelProps = {},
87
+ FormHelperTextProps = {},
88
+ size = "medium",
89
+ color = "primary",
90
+ darkMode: forceDarkMode,
91
+ autoFocus,
92
+ autoComplete,
93
+ name,
94
+ id: providedId,
95
+ inputRef,
96
+ startAdornment,
97
+ endAdornment,
98
+ style,
99
+ sx
100
+ } = _ref,
101
+ props = _objectWithoutProperties__default["default"](_ref, _excluded);
102
+
103
+ const {
104
+ colors,
105
+ mode
106
+ } = ThemeProvider.useTheme();
107
+ const generatedId = React.useId();
108
+ const id = providedId || generatedId;
109
+ const [focused, setFocused] = React.useState(false);
110
+ const [internalValue, setInternalValue] = React.useState(defaultValue || ""); // Track actual value for label shrink detection
111
+
112
+ const currentValue = value !== undefined ? value : internalValue; // Helper to resolve theme colors
113
+
114
+ const getColor = (colorKey, fallback) => {
115
+ const c = colors === null || colors === void 0 ? void 0 : colors[colorKey];
116
+ if (!c) return fallback;
117
+ return typeof c === "object" ? c.main : c;
118
+ };
119
+
120
+ const colorValue = (colors === null || colors === void 0 ? void 0 : colors[color]) || (colors === null || colors === void 0 ? void 0 : colors.primary);
121
+ const mainColor = typeof colorValue === "object" ? colorValue.main : colorValue || "#21A5A2";
122
+ const errorColor = getColor("error", "#d32f2f"); // FORCE dark mode styling by default - most Blerp UI is on dark backgrounds
123
+ // Can be overridden with darkMode={false} prop if needed on light backgrounds
124
+
125
+ const isDark = forceDarkMode !== undefined ? forceDarkMode : true; // Colors - defaulting to white/light for dark backgrounds
126
+
127
+ const textColor = isDark ? "#FFFFFF" : "#21000C";
128
+ const labelColor = isDark ? "rgba(255, 255, 255, 0.7)" : "rgba(0, 0, 0, 0.6)";
129
+ const focusedLabelColor = isDark ? "#FFFFFF" : mainColor;
130
+ const borderColor = isDark ? "rgba(255, 255, 255, 0.5)" : "rgba(0, 0, 0, 0.23)";
131
+ const focusedBorderColor = isDark ? "#FFFFFF" : mainColor;
132
+ const bgColor = isDark ? "rgba(255, 255, 255, 0.08)" : "rgba(0, 0, 0, 0.04)";
133
+ const hoverBgColor = isDark ? "rgba(255, 255, 255, 0.12)" : "rgba(0, 0, 0, 0.06)";
134
+ const placeholderColor = isDark ? "rgba(255, 255, 255, 0.35)" : "rgba(0, 0, 0, 0.35)";
135
+ const labelBgColor = isDark ? "#212121" : "#FFFFFF";
136
+ const hasValue = currentValue !== undefined && currentValue !== null && currentValue !== "";
137
+ const hasPlaceholder = Boolean(placeholder); // Label should shrink if: focused, has value, OR has a placeholder (so they don't overlap)
138
+
139
+ const isLabelShrunk = focused || hasValue || hasPlaceholder; // Resolve InputProps.sx styles to actual style values
140
+
141
+ const inputPropsSx = resolveStyles(InputProps.sx || {}, colors); // Container styles
142
+
143
+ const containerStyle = _objectSpread(_objectSpread({
144
+ display: "inline-flex",
145
+ flexDirection: "column",
146
+ position: "relative",
147
+ minWidth: 0,
148
+ padding: 0,
149
+ margin: 0,
150
+ border: 0,
151
+ verticalAlign: "top"
152
+ }, fullWidth && {
153
+ width: "100%"
154
+ }), style); // Determine current border color based on state
155
+
156
+
157
+ const getCurrentBorderColor = () => {
158
+ if (error) return errorColor;
159
+ if (focused) return focusedBorderColor;
160
+ return borderColor;
161
+ }; // Input wrapper styles (the bordered box)
162
+
163
+
164
+ const getWrapperStyles = () => {
165
+ const activeBorderColor = getCurrentBorderColor(); // Check if InputProps.sx overrides border-related styles
166
+
167
+ const hasBorderOverride = inputPropsSx.border !== undefined || inputPropsSx.borderColor !== undefined;
168
+ const hasRadiusOverride = inputPropsSx.borderRadius !== undefined;
169
+ const hasBgOverride = inputPropsSx.backgroundColor !== undefined || inputPropsSx.background !== undefined;
170
+ const hasHeightOverride = inputPropsSx.height !== undefined;
171
+ const hasPaddingOverride = inputPropsSx.padding !== undefined;
172
+ const base = {
173
+ display: "flex",
174
+ alignItems: "center",
175
+ position: "relative",
176
+ borderRadius: hasRadiusOverride ? inputPropsSx.borderRadius : "6px",
177
+ transition: "border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease",
178
+ cursor: disabled ? "default" : "text",
179
+ backgroundColor: hasBgOverride ? inputPropsSx.backgroundColor || inputPropsSx.background : "transparent",
180
+ minHeight: hasHeightOverride ? undefined : size === "small" ? "32px" : "40px",
181
+ height: hasHeightOverride ? inputPropsSx.height : undefined,
182
+ boxSizing: inputPropsSx.boxSizing || "border-box"
183
+ }; // If there's a complete style override from InputProps.sx, use minimal base styling
184
+
185
+ if (hasBorderOverride || inputPropsSx.border === "none") {
186
+ return _objectSpread(_objectSpread({}, base), {}, {
187
+ border: inputPropsSx.border !== undefined ? inputPropsSx.border : "none",
188
+ borderColor: inputPropsSx.borderColor,
189
+ padding: hasPaddingOverride ? inputPropsSx.padding : undefined
190
+ }, inputPropsSx);
191
+ }
192
+
193
+ switch (variant) {
194
+ case "filled":
195
+ return _objectSpread(_objectSpread({}, base), {}, {
196
+ backgroundColor: hasBgOverride ? inputPropsSx.backgroundColor || inputPropsSx.background : focused ? hoverBgColor : bgColor,
197
+ borderBottom: "2px solid ".concat(activeBorderColor),
198
+ borderRadius: hasRadiusOverride ? inputPropsSx.borderRadius : "8px 8px 0 0",
199
+ paddingTop: label ? "20px" : "0"
200
+ }, inputPropsSx);
201
+
202
+ case "standard":
203
+ return _objectSpread(_objectSpread({}, base), {}, {
204
+ borderBottom: "".concat(focused ? "2px" : "1px", " solid ").concat(activeBorderColor),
205
+ borderRadius: 0,
206
+ paddingTop: label ? "16px" : "0",
207
+ paddingBottom: focused ? "0px" : "1px"
208
+ }, inputPropsSx);
209
+
210
+ case "outlined":
211
+ default:
212
+ return _objectSpread(_objectSpread({}, base), {}, {
213
+ border: "".concat(focused ? "2px" : "1px", " solid ").concat(activeBorderColor),
214
+ padding: focused ? "0px" : "1px",
215
+ boxShadow: focused ? "0 0 0 3px ".concat(isDark ? "rgba(255,255,255,0.1)" : "".concat(mainColor, "20")) : "none"
216
+ }, inputPropsSx);
217
+ }
218
+ }; // Input element styles
219
+
220
+
221
+ const getInputStyles = () => {
222
+ // Check for font/text overrides
223
+ const fontSize = inputPropsSx.fontSize || (size === "small" ? "14px" : "16px");
224
+ const caretColor = inputPropsSx.caretColor;
225
+ return _objectSpread(_objectSpread({
226
+ fontFamily: "inherit",
227
+ fontSize: fontSize,
228
+ fontWeight: 400,
229
+ letterSpacing: "0.01em",
230
+ lineHeight: 1.5,
231
+ color: textColor,
232
+ // Always use theme text color (white for dark mode)
233
+ border: 0,
234
+ boxSizing: "border-box",
235
+ background: "none",
236
+ margin: 0,
237
+ display: "block",
238
+ minWidth: 0,
239
+ width: "100%",
240
+ outline: "none",
241
+ padding: "4px 8px",
242
+ resize: multiline ? "vertical" : "none",
243
+ WebkitTextFillColor: textColor
244
+ }, caretColor && {
245
+ caretColor
246
+ }), disabled && {
247
+ opacity: 0.5,
248
+ cursor: "not-allowed"
249
+ });
250
+ }; // Label styles
251
+
252
+
253
+ const getLabelStyles = () => {
254
+ const leftPos = variant === "outlined" ? "11px" : variant === "filled" ? "11px" : "0";
255
+
256
+ const getTransform = () => {
257
+ if (isLabelShrunk) {
258
+ switch (variant) {
259
+ case "outlined":
260
+ return "translate(0, -50%) scale(0.75)";
261
+
262
+ case "filled":
263
+ return "translate(0, -100%) scale(0.75)";
264
+
265
+ case "standard":
266
+ return "translate(0, -100%) scale(0.75)";
267
+
268
+ default:
269
+ return "translate(0, -50%) scale(0.75)";
270
+ }
271
+ }
272
+
273
+ return "translate(0, -50%) scale(1)";
274
+ };
275
+
276
+ const getTop = () => {
277
+ if (variant === "outlined") {
278
+ return isLabelShrunk ? "0" : "50%";
279
+ }
280
+
281
+ if (variant === "filled") {
282
+ return isLabelShrunk ? "8px" : "50%";
283
+ }
284
+
285
+ return isLabelShrunk ? "0" : "50%";
286
+ };
287
+
288
+ return _objectSpread({
289
+ position: "absolute",
290
+ left: leftPos,
291
+ top: getTop(),
292
+ transform: getTransform(),
293
+ transformOrigin: "top left",
294
+ transition: "transform 200ms cubic-bezier(0.4, 0, 0.2, 1), color 200ms cubic-bezier(0.4, 0, 0.2, 1), top 200ms cubic-bezier(0.4, 0, 0.2, 1)",
295
+ color: error ? errorColor : focused ? focusedLabelColor : labelColor,
296
+ pointerEvents: "none",
297
+ backgroundColor: variant === "outlined" && isLabelShrunk ? labelBgColor : "transparent",
298
+ padding: variant === "outlined" && isLabelShrunk ? "0 6px" : "4px",
299
+ marginLeft: variant === "outlined" && isLabelShrunk ? "-4px" : 0,
300
+ fontSize: "11px",
301
+ fontWeight: 400,
302
+ lineHeight: 1.4,
303
+ whiteSpace: "nowrap",
304
+ overflow: "hidden",
305
+ textOverflow: "ellipsis",
306
+ maxWidth: isLabelShrunk ? "133%" : "calc(100% - 32px)",
307
+ zIndex: 1
308
+ }, InputLabelProps.style);
309
+ }; // Helper text styles
310
+
311
+
312
+ const helperTextStyle = _objectSpread({
313
+ fontSize: "12px",
314
+ fontWeight: 400,
315
+ lineHeight: 1.4,
316
+ marginTop: "6px",
317
+ marginLeft: variant === "standard" ? "0" : "14px",
318
+ marginRight: "14px",
319
+ color: error ? errorColor : labelColor
320
+ }, FormHelperTextProps.style);
321
+
322
+ const handleFocus = e => {
323
+ setFocused(true);
324
+ onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
325
+ };
326
+
327
+ const handleBlur = e => {
328
+ setFocused(false);
329
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
330
+ };
331
+
332
+ const handleChange = e => {
333
+ if (value === undefined) {
334
+ setInternalValue(e.target.value);
335
+ }
336
+
337
+ onChange === null || onChange === void 0 ? void 0 : onChange(e);
338
+ };
339
+
340
+ const handleClick = e => {
341
+ onClick === null || onClick === void 0 ? void 0 : onClick(e);
342
+
343
+ if (!disabled) {
344
+ const input = document.getElementById(id);
345
+ input === null || input === void 0 ? void 0 : input.focus();
346
+ }
347
+ };
348
+
349
+ const InputComponent = multiline ? "textarea" : "input"; // Create a safe CSS ID for the style block
350
+
351
+ const safeId = id.replace(/:/g, "\\:"); // Text color is always based on dark/light mode, not InputProps.sx.color
352
+ // (InputProps.sx.color in MUI is typically for border/accent, not text)
353
+
354
+ const resolvedTextColor = textColor; // Combine refs
355
+
356
+ const setRefs = el => {
357
+ if (typeof ref === "function") ref(el);else if (ref) ref.current = el;
358
+ if (typeof inputRef === "function") inputRef(el);else if (inputRef) inputRef.current = el;
359
+ };
360
+
361
+ return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
362
+ style: containerStyle
363
+ }, props), /*#__PURE__*/React__default["default"].createElement("style", null, "\n #".concat(safeId, "::placeholder {\n color: ").concat(placeholderColor, " !important;\n opacity: 1 !important;\n font-style: italic !important;\n font-weight: 300 !important;\n }\n #").concat(safeId, "::-webkit-input-placeholder {\n color: ").concat(placeholderColor, " !important;\n font-style: italic !important;\n font-weight: 300 !important;\n }\n #").concat(safeId, "::-moz-placeholder {\n color: ").concat(placeholderColor, " !important;\n font-style: italic !important;\n font-weight: 300 !important;\n }\n #").concat(safeId, " {\n color: ").concat(resolvedTextColor, " !important;\n -webkit-text-fill-color: ").concat(resolvedTextColor, " !important;\n }\n ")), /*#__PURE__*/React__default["default"].createElement("div", {
364
+ style: getWrapperStyles(),
365
+ onClick: handleClick
366
+ }, label && /*#__PURE__*/React__default["default"].createElement("label", _extends__default["default"]({
367
+ htmlFor: id,
368
+ style: getLabelStyles()
369
+ }, InputLabelProps), label, required && /*#__PURE__*/React__default["default"].createElement("span", {
370
+ style: {
371
+ color: errorColor,
372
+ marginLeft: "2px"
373
+ }
374
+ }, "*")), (startAdornment || InputProps.startAdornment) && /*#__PURE__*/React__default["default"].createElement("div", {
375
+ style: {
376
+ display: "flex",
377
+ alignItems: "center",
378
+ paddingLeft: "4px",
379
+ color: labelColor,
380
+ flexShrink: 0
381
+ }
382
+ }, startAdornment || InputProps.startAdornment), /*#__PURE__*/React__default["default"].createElement(InputComponent, _extends__default["default"]({
383
+ ref: setRefs,
384
+ id: id,
385
+ type: type,
386
+ style: getInputStyles(),
387
+ placeholder: placeholder,
388
+ disabled: disabled,
389
+ required: required,
390
+ value: value,
391
+ defaultValue: defaultValue,
392
+ onChange: handleChange,
393
+ onFocus: handleFocus,
394
+ onBlur: handleBlur,
395
+ onKeyDown: onKeyDown,
396
+ autoFocus: autoFocus,
397
+ autoComplete: autoComplete,
398
+ name: name,
399
+ rows: multiline ? rows || minRows || 3 : undefined,
400
+ "aria-invalid": error,
401
+ "aria-describedby": helperText ? "".concat(id, "-helper-text") : undefined
402
+ }, inputProps, InputProps.inputProps)), (endAdornment || InputProps.endAdornment) && /*#__PURE__*/React__default["default"].createElement("div", {
403
+ style: {
404
+ display: "flex",
405
+ alignItems: "center",
406
+ paddingRight: "4px",
407
+ color: labelColor,
408
+ flexShrink: 0
409
+ }
410
+ }, endAdornment || InputProps.endAdornment)), helperText && /*#__PURE__*/React__default["default"].createElement("p", _extends__default["default"]({
411
+ id: "".concat(id, "-helper-text"),
412
+ style: helperTextStyle
413
+ }, FormHelperTextProps), helperText));
414
+ });
415
+ BaseInput.displayName = "BaseInput";
416
+ const Input = withSx.withSx(BaseInput);
417
+ const TextField = Input; // Alias for MUI compatibility
418
+
419
+ /**
420
+ * InputAdornment - For adding icons/text to inputs
421
+ */
422
+
423
+ const InputAdornment = /*#__PURE__*/React__default["default"].forwardRef((_ref2, ref) => {
424
+ let {
425
+ position = "start",
426
+ children,
427
+ disablePointerEvents = false,
428
+ style
429
+ } = _ref2,
430
+ props = _objectWithoutProperties__default["default"](_ref2, _excluded2);
431
+
432
+ const adornmentStyle = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
433
+ display: "flex",
434
+ alignItems: "center",
435
+ justifyContent: "center",
436
+ height: "100%",
437
+ color: "rgba(255, 255, 255, 0.7)",
438
+ whiteSpace: "nowrap"
439
+ }, position === "start" && {
440
+ marginRight: "4px"
441
+ }), position === "end" && {
442
+ marginLeft: "4px"
443
+ }), disablePointerEvents && {
444
+ pointerEvents: "none"
445
+ }), style);
446
+
447
+ return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
448
+ ref: ref,
449
+ style: adornmentStyle
450
+ }, props), children);
451
+ });
452
+ InputAdornment.displayName = "InputAdornment";
453
+ /**
454
+ * FormHelperText - Standalone helper text component
455
+ */
456
+
457
+ const FormHelperText = /*#__PURE__*/React__default["default"].forwardRef((_ref3, ref) => {
458
+ var _colors$error;
459
+
460
+ let {
461
+ children,
462
+ error = false,
463
+ disabled = false,
464
+ style
465
+ } = _ref3,
466
+ props = _objectWithoutProperties__default["default"](_ref3, _excluded3);
467
+
468
+ const {
469
+ colors
470
+ } = ThemeProvider.useTheme();
471
+ const errorColor = (colors === null || colors === void 0 ? void 0 : (_colors$error = colors.error) === null || _colors$error === void 0 ? void 0 : _colors$error.main) || "#d32f2f";
472
+
473
+ const helperStyle = _objectSpread({
474
+ fontSize: "12px",
475
+ fontWeight: 400,
476
+ lineHeight: 1.4,
477
+ margin: "6px 14px 0",
478
+ color: error ? errorColor : "rgba(255, 255, 255, 0.7)",
479
+ opacity: disabled ? 0.6 : 1
480
+ }, style);
481
+
482
+ return /*#__PURE__*/React__default["default"].createElement("p", _extends__default["default"]({
483
+ ref: ref,
484
+ style: helperStyle
485
+ }, props), children);
486
+ });
487
+ FormHelperText.displayName = "FormHelperText";
488
+
489
+ exports.FormHelperText = FormHelperText;
490
+ exports.Input = Input;
491
+ exports.InputAdornment = InputAdornment;
492
+ exports.TextField = TextField;
493
+ exports["default"] = Input;