@rufous/ui 0.1.63 → 0.2.0-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.
Files changed (149) hide show
  1. package/dist/Buttons/addButton.js +1 -0
  2. package/dist/Buttons/cancelButton.js +1 -0
  3. package/dist/Buttons/index.cjs +2 -2
  4. package/dist/Buttons/index.js +3 -2
  5. package/dist/Buttons/stdButton.js +1 -0
  6. package/dist/Buttons/submitButton.cjs +2 -2
  7. package/dist/Buttons/submitButton.js +3 -2
  8. package/dist/CheckBoxes/CheckBox.cjs +1 -1
  9. package/dist/CheckBoxes/CheckBox.js +4 -25
  10. package/dist/Contexts/rufousThemeProvider.cjs +81 -101
  11. package/dist/Contexts/rufousThemeProvider.js +3 -2
  12. package/dist/DataGrid/DataGrid.cjs +418 -0
  13. package/dist/DataGrid/DataGrid.d.cts +8 -0
  14. package/dist/DataGrid/DataGrid.d.ts +8 -0
  15. package/dist/DataGrid/DataGrid.js +9 -0
  16. package/dist/DataGrid/index.cjs +418 -0
  17. package/dist/DataGrid/index.d.cts +3 -0
  18. package/dist/DataGrid/index.d.ts +3 -0
  19. package/dist/DataGrid/index.js +8 -0
  20. package/dist/{TextFields/FloatingInput.d.cjs → DataGrid/types.cjs} +3 -3
  21. package/dist/DataGrid/types.d.cts +31 -0
  22. package/dist/DataGrid/types.d.ts +31 -0
  23. package/dist/Dialogs/BaseDialog.cjs +18 -10
  24. package/dist/Dialogs/BaseDialog.css +8247 -162
  25. package/dist/Dialogs/BaseDialog.d.cts +1 -0
  26. package/dist/Dialogs/BaseDialog.d.ts +1 -0
  27. package/dist/Dialogs/BaseDialog.js +39 -32
  28. package/dist/Dialogs/index.cjs +18 -10
  29. package/dist/Dialogs/index.css +8247 -162
  30. package/dist/Dialogs/index.js +39 -32
  31. package/dist/Editors/RichTextEditor.cjs +29477 -0
  32. package/dist/Editors/RichTextEditor.css +7179 -0
  33. package/dist/Editors/RichTextEditor.d.cts +57 -0
  34. package/dist/Editors/RichTextEditor.d.ts +57 -0
  35. package/dist/Editors/RichTextEditor.js +9 -0
  36. package/dist/Editors/index.cjs +29477 -0
  37. package/dist/Editors/index.css +7179 -0
  38. package/dist/Editors/index.d.cts +2 -0
  39. package/dist/Editors/index.d.ts +2 -0
  40. package/dist/Editors/index.js +8 -0
  41. package/dist/Progress/circularProgress.cjs +2 -2
  42. package/dist/Progress/circularProgress.d.cts +3 -3
  43. package/dist/Progress/circularProgress.d.ts +3 -3
  44. package/dist/Progress/circularProgress.js +2 -1
  45. package/dist/TextFields/AddressLookup.cjs +390 -0
  46. package/dist/TextFields/AddressLookup.d.cts +49 -0
  47. package/dist/TextFields/AddressLookup.d.ts +49 -0
  48. package/dist/TextFields/AddressLookup.js +304 -0
  49. package/dist/TextFields/FloatingInput.cjs +6 -4
  50. package/dist/TextFields/FloatingInput.d.cts +13 -19
  51. package/dist/TextFields/FloatingInput.d.ts +13 -19
  52. package/dist/TextFields/FloatingInput.js +4 -28
  53. package/dist/chunk-66HHM7VI.js +468 -0
  54. package/dist/chunk-7KRG7VNW.js +0 -0
  55. package/dist/{chunk-YRFUVQDN.js → chunk-CTBYVXFP.js} +2 -2
  56. package/dist/chunk-GJGRMMAQ.js +0 -0
  57. package/dist/chunk-J6E3UO2W.js +402 -0
  58. package/dist/chunk-LI4N7JWK.js +39 -0
  59. package/dist/chunk-QGXXOQJF.js +61 -0
  60. package/dist/{chunk-AQXTOTWY.js → chunk-TYTZEAV5.js} +19 -11
  61. package/dist/chunk-UPCMMCPQ.js +34 -0
  62. package/dist/chunk-WNZLBFLQ.js +73 -0
  63. package/dist/chunk-X357WQOT.js +29 -0
  64. package/dist/{chunk-7YKG3WYS.js → chunk-YRLN3TBF.js} +1 -1
  65. package/dist/esm-5T53WHPT.js +27362 -0
  66. package/dist/icons/activateUserIcon.js +1 -0
  67. package/dist/icons/archivedIcon.js +1 -0
  68. package/dist/icons/assignGroupIcon.js +1 -0
  69. package/dist/icons/closeIcon.js +1 -0
  70. package/dist/icons/copyIcon.js +1 -0
  71. package/dist/icons/difficultyAllIcon.js +1 -0
  72. package/dist/icons/difficultyEasyIcon.js +1 -0
  73. package/dist/icons/difficultyHardIcon.js +1 -0
  74. package/dist/icons/difficultyMediumIcon.js +1 -0
  75. package/dist/icons/dollarIcon.js +1 -0
  76. package/dist/icons/downloadIcon.js +1 -0
  77. package/dist/icons/downloadPdfIcon.js +1 -0
  78. package/dist/icons/editChatIcon.js +1 -0
  79. package/dist/icons/editIcon.js +1 -0
  80. package/dist/icons/engagementIcon.js +1 -0
  81. package/dist/icons/functionIcon.js +1 -0
  82. package/dist/icons/helpOutlinedIcon.js +1 -0
  83. package/dist/icons/hierarchyIcon.js +1 -0
  84. package/dist/icons/inactiveGroupIcon.js +1 -0
  85. package/dist/icons/index.js +64 -63
  86. package/dist/icons/industryIcon.js +1 -0
  87. package/dist/icons/invoiceIcon.js +1 -0
  88. package/dist/icons/locationPinIcon.js +1 -0
  89. package/dist/icons/logsIcon.js +1 -0
  90. package/dist/icons/minExperienceIcon.js +1 -0
  91. package/dist/icons/nineDotMenuIcon.js +1 -0
  92. package/dist/icons/notificationIcon.js +1 -0
  93. package/dist/icons/projectIcon.js +1 -0
  94. package/dist/icons/qualificationsIcon.js +1 -0
  95. package/dist/icons/questionStatusAllIcon.js +1 -0
  96. package/dist/icons/questionStatusPrivateIcon.js +1 -0
  97. package/dist/icons/questionStatusPublicIcon.js +1 -0
  98. package/dist/icons/questionTypeAllIcon.js +1 -0
  99. package/dist/icons/questionTypeCodingIcon.js +1 -0
  100. package/dist/icons/questionTypeDescriptiveIcon.js +1 -0
  101. package/dist/icons/questionTypeMultipleIcon.js +1 -0
  102. package/dist/icons/questionTypeSingleIcon.js +1 -0
  103. package/dist/icons/refreshIcon.js +1 -0
  104. package/dist/icons/resendInviteIcon.js +1 -0
  105. package/dist/icons/rolesIcon.js +1 -0
  106. package/dist/icons/rufousAiIcon.js +1 -0
  107. package/dist/icons/rufousBirdIcon.js +1 -0
  108. package/dist/icons/rufousLauncherBird.js +1 -0
  109. package/dist/icons/sidebarIcon.js +1 -0
  110. package/dist/icons/softSkillsIcon.js +1 -0
  111. package/dist/icons/subscribeIcon.js +1 -0
  112. package/dist/icons/suspendUserIcon.js +1 -0
  113. package/dist/icons/technicalSkillsIcon.js +1 -0
  114. package/dist/icons/tickIcon.js +1 -0
  115. package/dist/icons/timerIcon.js +1 -0
  116. package/dist/icons/trashIcon.js +1 -0
  117. package/dist/icons/unArchivedIcon.js +1 -0
  118. package/dist/icons/unsubscribeIcon.js +1 -0
  119. package/dist/icons/uploadIcon.js +1 -0
  120. package/dist/icons/userAssignIcon.js +1 -0
  121. package/dist/icons/viewIcon.js +1 -0
  122. package/dist/icons/workItemIcon.js +1 -0
  123. package/dist/main.cjs +30097 -223
  124. package/dist/main.css +8247 -162
  125. package/dist/main.d.cts +6 -0
  126. package/dist/main.d.ts +6 -0
  127. package/dist/main.js +89 -67
  128. package/dist/style.css +1068 -163
  129. package/dist/styles/button.css +82 -110
  130. package/dist/styles/checkbox.css +60 -0
  131. package/dist/styles/checkbox.d.cts +2 -0
  132. package/dist/styles/checkbox.d.ts +2 -0
  133. package/dist/styles/datagrid.css +531 -0
  134. package/dist/styles/datagrid.d.cts +2 -0
  135. package/dist/styles/datagrid.d.ts +2 -0
  136. package/dist/styles/dialog.css +78 -51
  137. package/dist/styles/editor.css +211 -0
  138. package/dist/styles/editor.d.cts +2 -0
  139. package/dist/styles/editor.d.ts +2 -0
  140. package/dist/utils/constants.cjs +47 -69
  141. package/dist/utils/constants.d.cts +34 -56
  142. package/dist/utils/constants.d.ts +34 -56
  143. package/dist/utils/constants.js +2 -1
  144. package/package.json +13 -2
  145. package/dist/TextFields/FloatingInput.d.d.cts +0 -23
  146. package/dist/TextFields/FloatingInput.d.d.ts +0 -23
  147. package/dist/chunk-2FHTGYR4.js +0 -83
  148. package/dist/chunk-BCGCLMKA.js +0 -71
  149. /package/dist/{TextFields/FloatingInput.d.js → DataGrid/types.js} +0 -0
@@ -0,0 +1,304 @@
1
+ import {
2
+ FloatingInput
3
+ } from "../chunk-UPCMMCPQ.js";
4
+ import {
5
+ circularProgress_default
6
+ } from "../chunk-CTBYVXFP.js";
7
+ import {
8
+ useRufousTheme
9
+ } from "../chunk-WNZLBFLQ.js";
10
+ import "../chunk-QGXXOQJF.js";
11
+ import "../chunk-LI4N7JWK.js";
12
+
13
+ // lib/TextFields/AddressLookup.tsx
14
+ import React, { useState, useRef, useEffect } from "react";
15
+ import Axios from "axios";
16
+ import { Country, State, City } from "country-state-city";
17
+ var AddressLookup = ({
18
+ value = {},
19
+ onChange = () => {
20
+ },
21
+ label = "Address",
22
+ error = {},
23
+ size = "medium",
24
+ sx = {},
25
+ layout = "stack",
26
+ required = false,
27
+ token = ""
28
+ }) => {
29
+ const { theme } = useRufousTheme();
30
+ const [suggestions, setSuggestions] = useState([]);
31
+ const [loading, setLoading] = useState(false);
32
+ const [showSuggestions, setShowSuggestions] = useState(false);
33
+ const [googleFields, setGoogleFields] = useState({
34
+ country: false,
35
+ state: false,
36
+ city: false,
37
+ pincode: false
38
+ });
39
+ const debounceTimeout = useRef(null);
40
+ const containerRef = useRef(null);
41
+ const apiKey = token || "";
42
+ const countries = Country.getAllCountries();
43
+ const [states, setStates] = useState([]);
44
+ const [cities, setCities] = useState([]);
45
+ useEffect(() => {
46
+ const handleClickOutside = (event) => {
47
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
48
+ setShowSuggestions(false);
49
+ }
50
+ };
51
+ document.addEventListener("mousedown", handleClickOutside);
52
+ return () => document.removeEventListener("mousedown", handleClickOutside);
53
+ }, []);
54
+ useEffect(() => {
55
+ if (value.country || value.state || value.city || value.pincode) {
56
+ setGoogleFields({
57
+ country: !!value.country,
58
+ state: !!value.state,
59
+ city: !!value.city,
60
+ pincode: !!value.pincode
61
+ });
62
+ }
63
+ }, []);
64
+ useEffect(() => {
65
+ if (value.country) {
66
+ const country = countries.find((c) => c.name === value.country);
67
+ if (country) {
68
+ const stateList = State.getStatesOfCountry(country.isoCode);
69
+ setStates(stateList);
70
+ } else {
71
+ setStates([]);
72
+ }
73
+ } else {
74
+ setStates([]);
75
+ }
76
+ }, [value.country]);
77
+ useEffect(() => {
78
+ if (value.state && value.country) {
79
+ const country = countries.find((c) => c.name === value.country);
80
+ if (country) {
81
+ const state = State.getStatesOfCountry(country.isoCode).find((s) => s.name === value.state);
82
+ if (state) {
83
+ const cityList = City.getCitiesOfState(country.isoCode, state.isoCode);
84
+ setCities(cityList);
85
+ } else {
86
+ setCities([]);
87
+ }
88
+ } else {
89
+ setCities([]);
90
+ }
91
+ } else {
92
+ setCities([]);
93
+ }
94
+ }, [value.state, value.country]);
95
+ const handleChange = (field, newVal) => {
96
+ onChange({
97
+ ...value,
98
+ [field]: newVal
99
+ });
100
+ };
101
+ const fetchPlaceDetails = async (placeId, mainText = "") => {
102
+ if (!apiKey) {
103
+ console.warn("Google Places API Key (token) is missing.");
104
+ return;
105
+ }
106
+ setLoading(true);
107
+ try {
108
+ const res = await Axios.get(
109
+ `https://places.googleapis.com/v1/places/${placeId}`,
110
+ {
111
+ headers: {
112
+ "Content-Type": "application/json",
113
+ "X-Goog-Api-Key": apiKey,
114
+ "X-Goog-FieldMask": "addressComponents,formattedAddress"
115
+ }
116
+ }
117
+ );
118
+ const comps = res.data.addressComponents || [];
119
+ const findComp = (type) => comps.find((c) => c.types.includes(type))?.longText || "";
120
+ const city = findComp("locality") || findComp("sublocality_level_1");
121
+ const state = findComp("administrative_area_level_1");
122
+ const country = findComp("country");
123
+ const pincode = findComp("postal_code");
124
+ setGoogleFields({
125
+ country: !!country,
126
+ state: !!state,
127
+ city: !!city,
128
+ pincode: !!pincode
129
+ });
130
+ const updatedData = {
131
+ ...value,
132
+ addressLine1: mainText || value.addressLine1,
133
+ addressLine2: res.data.formattedAddress || value.addressLine2,
134
+ city,
135
+ state,
136
+ country,
137
+ pincode
138
+ };
139
+ onChange(updatedData);
140
+ setShowSuggestions(false);
141
+ } catch (err) {
142
+ console.error("Error fetching place details:", err);
143
+ } finally {
144
+ setLoading(false);
145
+ }
146
+ };
147
+ const handleQuerySuggestions = async (query) => {
148
+ if (!apiKey || !query || query.length < 3) {
149
+ setSuggestions([]);
150
+ setShowSuggestions(false);
151
+ return;
152
+ }
153
+ setLoading(true);
154
+ try {
155
+ const res = await Axios.post(
156
+ `https://places.googleapis.com/v1/places:autocomplete`,
157
+ { input: query },
158
+ {
159
+ headers: {
160
+ "Content-Type": "application/json",
161
+ "X-Goog-Api-Key": apiKey
162
+ }
163
+ }
164
+ );
165
+ setSuggestions(res.data.suggestions || []);
166
+ setShowSuggestions(true);
167
+ } catch (err) {
168
+ console.error("Autocomplete Error:", err);
169
+ } finally {
170
+ setLoading(false);
171
+ }
172
+ };
173
+ const handleCountryChange = (newCountry) => {
174
+ onChange({
175
+ ...value,
176
+ country: newCountry,
177
+ state: "",
178
+ city: ""
179
+ });
180
+ setGoogleFields({ ...googleFields, country: false, state: false, city: false });
181
+ };
182
+ const handleStateChange = (newState) => {
183
+ onChange({
184
+ ...value,
185
+ state: newState,
186
+ city: ""
187
+ });
188
+ };
189
+ return /* @__PURE__ */ React.createElement("div", { className: "address-lookup-container", style: sx, ref: containerRef }, /* @__PURE__ */ React.createElement("div", { className: `address-lookup-grid address-lookup-grid-${layout}` }, /* @__PURE__ */ React.createElement("div", { className: "address-lookup-grid-item col-l1" }, /* @__PURE__ */ React.createElement(
190
+ FloatingInput,
191
+ {
192
+ label,
193
+ name: "addressLine1",
194
+ value: value.addressLine1 || "",
195
+ required,
196
+ autoComplete: "off",
197
+ onChange: (e) => {
198
+ const val = e.target.value;
199
+ handleChange("addressLine1", val);
200
+ if (!val) {
201
+ onChange({
202
+ ...value,
203
+ addressLine1: "",
204
+ city: "",
205
+ state: "",
206
+ country: "",
207
+ pincode: ""
208
+ });
209
+ setSuggestions([]);
210
+ setShowSuggestions(false);
211
+ setGoogleFields({ country: false, state: false, city: false, pincode: false });
212
+ } else {
213
+ if (debounceTimeout.current) clearTimeout(debounceTimeout.current);
214
+ debounceTimeout.current = setTimeout(() => {
215
+ handleQuerySuggestions(val);
216
+ }, 500);
217
+ }
218
+ },
219
+ onFocus: () => suggestions.length > 0 && setShowSuggestions(true)
220
+ }
221
+ ), loading && /* @__PURE__ */ React.createElement("div", { className: "loading-indicator" }, /* @__PURE__ */ React.createElement(circularProgress_default, { size: 20 })), showSuggestions && suggestions.length > 0 && /* @__PURE__ */ React.createElement("div", { className: "autocomplete-dropdown" }, suggestions.map((option, idx) => /* @__PURE__ */ React.createElement(
222
+ "div",
223
+ {
224
+ key: idx,
225
+ className: "autocomplete-option",
226
+ onClick: () => {
227
+ const mainText = option?.placePrediction?.structuredFormat?.mainText?.text || "";
228
+ handleChange("addressLine1", mainText);
229
+ fetchPlaceDetails(option.placePrediction.placeId, mainText);
230
+ }
231
+ },
232
+ /* @__PURE__ */ React.createElement("div", { className: "autocomplete-main-text" }, option?.placePrediction?.structuredFormat?.mainText?.text),
233
+ /* @__PURE__ */ React.createElement("div", { className: "autocomplete-secondary-text" }, option?.placePrediction?.structuredFormat?.secondaryText?.text)
234
+ ))), error.addressLine1 && /* @__PURE__ */ React.createElement("div", { className: "field-error-text" }, error.addressLine1)), layout === "compact" && /* @__PURE__ */ React.createElement("div", { className: "address-lookup-grid-item col-l2" }, /* @__PURE__ */ React.createElement(
235
+ FloatingInput,
236
+ {
237
+ label: "Address Line 2",
238
+ name: "addressLine2",
239
+ value: value.addressLine2 || "",
240
+ onChange: (e) => handleChange("addressLine2", e.target.value)
241
+ }
242
+ )), layout !== "compact" && /* @__PURE__ */ React.createElement("div", { className: "address-lookup-grid-item col-l2" }, /* @__PURE__ */ React.createElement(
243
+ FloatingInput,
244
+ {
245
+ label: "Address Line 2",
246
+ name: "addressLine2",
247
+ value: value.addressLine2 || "",
248
+ onChange: (e) => handleChange("addressLine2", e.target.value)
249
+ }
250
+ )), /* @__PURE__ */ React.createElement("div", { className: "address-lookup-grid-item col-country" }, /* @__PURE__ */ React.createElement(
251
+ FloatingInput,
252
+ {
253
+ label: "Country",
254
+ name: "country",
255
+ value: value.country || "",
256
+ required,
257
+ className: googleFields.country && value.country ? "field-disabled" : "",
258
+ readOnly: googleFields.country && !!value.country,
259
+ onChange: (e) => handleCountryChange(e.target.value),
260
+ list: "countries-list"
261
+ }
262
+ ), /* @__PURE__ */ React.createElement("datalist", { id: "countries-list" }, countries.map((c) => /* @__PURE__ */ React.createElement("option", { key: c.isoCode, value: c.name }))), error.country && /* @__PURE__ */ React.createElement("div", { className: "field-error-text" }, error.country)), /* @__PURE__ */ React.createElement("div", { className: "address-lookup-grid-item col-state" }, /* @__PURE__ */ React.createElement(
263
+ FloatingInput,
264
+ {
265
+ label: "State",
266
+ name: "state",
267
+ value: value.state || "",
268
+ required,
269
+ disabled: !value.country,
270
+ className: googleFields.state && value.state ? "field-disabled" : "",
271
+ readOnly: googleFields.state && !!value.state,
272
+ onChange: (e) => handleStateChange(e.target.value),
273
+ list: "states-list"
274
+ }
275
+ ), /* @__PURE__ */ React.createElement("datalist", { id: "states-list" }, states.map((s) => /* @__PURE__ */ React.createElement("option", { key: s.isoCode, value: s.name }))), error.state && /* @__PURE__ */ React.createElement("div", { className: "field-error-text" }, error.state)), /* @__PURE__ */ React.createElement("div", { className: "address-lookup-grid-item col-city" }, /* @__PURE__ */ React.createElement(
276
+ FloatingInput,
277
+ {
278
+ label: "City",
279
+ name: "city",
280
+ value: value.city || "",
281
+ required,
282
+ disabled: !value.state,
283
+ className: googleFields.city && value.city ? "field-disabled" : "",
284
+ readOnly: googleFields.city && !!value.city,
285
+ onChange: (e) => handleChange("city", e.target.value),
286
+ list: "cities-list"
287
+ }
288
+ ), /* @__PURE__ */ React.createElement("datalist", { id: "cities-list" }, cities.map((c, i) => /* @__PURE__ */ React.createElement("option", { key: i, value: c.name }))), error.city && /* @__PURE__ */ React.createElement("div", { className: "field-error-text" }, error.city)), /* @__PURE__ */ React.createElement("div", { className: "address-lookup-grid-item col-pin" }, /* @__PURE__ */ React.createElement(
289
+ FloatingInput,
290
+ {
291
+ label: "Pincode",
292
+ name: "pincode",
293
+ value: value.pincode || "",
294
+ required,
295
+ className: googleFields.pincode && value.pincode ? "field-disabled" : "",
296
+ readOnly: googleFields.pincode && !!value.pincode,
297
+ onChange: (e) => handleChange("pincode", e.target.value)
298
+ }
299
+ ), error.pincode && /* @__PURE__ */ React.createElement("div", { className: "field-error-text" }, error.pincode))));
300
+ };
301
+ var AddressLookup_default = AddressLookup;
302
+ export {
303
+ AddressLookup_default as default
304
+ };
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  ));
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
 
29
- // lib/TextFields/FloatingInput.jsx
29
+ // lib/TextFields/FloatingInput.tsx
30
30
  var FloatingInput_exports = {};
31
31
  __export(FloatingInput_exports, {
32
32
  FloatingInput: () => FloatingInput
@@ -43,19 +43,21 @@ var FloatingInput = ({
43
43
  required = false,
44
44
  placeholder,
45
45
  className = "",
46
+ style,
46
47
  ...props
47
48
  }) => {
48
- return /* @__PURE__ */ import_react.default.createElement("div", { className: `form__group field ${className}`, ...props }, /* @__PURE__ */ import_react.default.createElement(
49
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: `form__group field ${className}`, style }, /* @__PURE__ */ import_react.default.createElement(
49
50
  "input",
50
51
  {
51
52
  type,
52
53
  className: "form__field",
53
- placeholder: placeholder || label,
54
+ placeholder: " ",
54
55
  name,
55
56
  id: id || name,
56
57
  value,
57
58
  onChange,
58
- required
59
+ required,
60
+ ...props
59
61
  }
60
62
  ), /* @__PURE__ */ import_react.default.createElement("label", { htmlFor: id || name, className: "form__label" }, label));
61
63
  };
@@ -1,23 +1,17 @@
1
- import * as React from 'react';
1
+ import React__default, { InputHTMLAttributes, CSSProperties } from 'react';
2
2
 
3
- interface FloatingInputProps
4
- extends React.InputHTMLAttributes<HTMLInputElement> {
5
- /** Label text shown above the input */
6
- label: string;
7
-
8
- /** Name attribute for the input (used for forms) */
9
- name: string;
10
-
11
- /** ID for the input and label (defaults to `name` if not provided) */
12
- id?: string;
13
-
14
- /** Placeholder text (defaults to label if not provided) */
15
- placeholder?: string;
16
-
17
- /** Optional class name to apply to the outer wrapper */
18
- className?: string;
3
+ interface FloatingInputProps extends InputHTMLAttributes<HTMLInputElement> {
4
+ /** Label text shown above the input */
5
+ label: string;
6
+ /** Name attribute for the input (used for forms) */
7
+ name: string;
8
+ /** ID for the input and label (defaults to `name` if not provided) */
9
+ id?: string;
10
+ /** Optional class name to apply to the outer wrapper */
11
+ className?: string;
12
+ /** Inline style overrides for the wrapper */
13
+ style?: CSSProperties;
19
14
  }
20
-
21
- declare const FloatingInput: React.FC<FloatingInputProps>;
15
+ declare const FloatingInput: React__default.FC<FloatingInputProps>;
22
16
 
23
17
  export { FloatingInput, type FloatingInputProps };
@@ -1,23 +1,17 @@
1
- import * as React from 'react';
1
+ import React__default, { InputHTMLAttributes, CSSProperties } from 'react';
2
2
 
3
- interface FloatingInputProps
4
- extends React.InputHTMLAttributes<HTMLInputElement> {
5
- /** Label text shown above the input */
6
- label: string;
7
-
8
- /** Name attribute for the input (used for forms) */
9
- name: string;
10
-
11
- /** ID for the input and label (defaults to `name` if not provided) */
12
- id?: string;
13
-
14
- /** Placeholder text (defaults to label if not provided) */
15
- placeholder?: string;
16
-
17
- /** Optional class name to apply to the outer wrapper */
18
- className?: string;
3
+ interface FloatingInputProps extends InputHTMLAttributes<HTMLInputElement> {
4
+ /** Label text shown above the input */
5
+ label: string;
6
+ /** Name attribute for the input (used for forms) */
7
+ name: string;
8
+ /** ID for the input and label (defaults to `name` if not provided) */
9
+ id?: string;
10
+ /** Optional class name to apply to the outer wrapper */
11
+ className?: string;
12
+ /** Inline style overrides for the wrapper */
13
+ style?: CSSProperties;
19
14
  }
20
-
21
- declare const FloatingInput: React.FC<FloatingInputProps>;
15
+ declare const FloatingInput: React__default.FC<FloatingInputProps>;
22
16
 
23
17
  export { FloatingInput, type FloatingInputProps };
@@ -1,31 +1,7 @@
1
- // lib/TextFields/FloatingInput.jsx
2
- import React from "react";
3
- var FloatingInput = ({
4
- label,
5
- name,
6
- id,
7
- type = "text",
8
- value,
9
- onChange,
10
- required = false,
11
- placeholder,
12
- className = "",
13
- ...props
14
- }) => {
15
- return /* @__PURE__ */ React.createElement("div", { className: `form__group field ${className}`, ...props }, /* @__PURE__ */ React.createElement(
16
- "input",
17
- {
18
- type,
19
- className: "form__field",
20
- placeholder: placeholder || label,
21
- name,
22
- id: id || name,
23
- value,
24
- onChange,
25
- required
26
- }
27
- ), /* @__PURE__ */ React.createElement("label", { htmlFor: id || name, className: "form__label" }, label));
28
- };
1
+ import {
2
+ FloatingInput
3
+ } from "../chunk-UPCMMCPQ.js";
4
+ import "../chunk-LI4N7JWK.js";
29
5
  export {
30
6
  FloatingInput
31
7
  };