@rufous/ui 0.1.63 → 0.1.64

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 (154) hide show
  1. package/README.md +4 -0
  2. package/dist/Buttons/addButton.js +1 -0
  3. package/dist/Buttons/cancelButton.js +1 -0
  4. package/dist/Buttons/index.cjs +2 -2
  5. package/dist/Buttons/index.js +3 -2
  6. package/dist/Buttons/stdButton.js +1 -0
  7. package/dist/Buttons/submitButton.cjs +2 -2
  8. package/dist/Buttons/submitButton.js +3 -2
  9. package/dist/CheckBoxes/CheckBox.cjs +1 -1
  10. package/dist/CheckBoxes/CheckBox.js +4 -25
  11. package/dist/Contexts/rufousThemeProvider.cjs +146 -81
  12. package/dist/Contexts/rufousThemeProvider.js +3 -2
  13. package/dist/DataGrid/DataGrid.cjs +418 -0
  14. package/dist/DataGrid/DataGrid.d.cts +8 -0
  15. package/dist/DataGrid/DataGrid.d.ts +8 -0
  16. package/dist/DataGrid/DataGrid.js +9 -0
  17. package/dist/DataGrid/index.cjs +418 -0
  18. package/dist/DataGrid/index.d.cts +3 -0
  19. package/dist/DataGrid/index.d.ts +3 -0
  20. package/dist/DataGrid/index.js +8 -0
  21. package/dist/{TextFields/FloatingInput.d.cjs → DataGrid/types.cjs} +3 -3
  22. package/dist/DataGrid/types.d.cts +31 -0
  23. package/dist/DataGrid/types.d.ts +31 -0
  24. package/dist/Dialogs/BaseDialog.cjs +18 -10
  25. package/dist/Dialogs/BaseDialog.css +8355 -162
  26. package/dist/Dialogs/BaseDialog.d.cts +1 -0
  27. package/dist/Dialogs/BaseDialog.d.ts +1 -0
  28. package/dist/Dialogs/BaseDialog.js +33 -25
  29. package/dist/Dialogs/index.cjs +18 -10
  30. package/dist/Dialogs/index.css +8355 -162
  31. package/dist/Dialogs/index.js +33 -25
  32. package/dist/Editors/RichTextEditor.cjs +29477 -0
  33. package/dist/Editors/RichTextEditor.css +7179 -0
  34. package/dist/Editors/RichTextEditor.d.cts +57 -0
  35. package/dist/Editors/RichTextEditor.d.ts +57 -0
  36. package/dist/Editors/RichTextEditor.js +9 -0
  37. package/dist/Editors/index.cjs +29477 -0
  38. package/dist/Editors/index.css +7179 -0
  39. package/dist/Editors/index.d.cts +2 -0
  40. package/dist/Editors/index.d.ts +2 -0
  41. package/dist/Editors/index.js +8 -0
  42. package/dist/Progress/circularProgress.cjs +2 -2
  43. package/dist/Progress/circularProgress.d.cts +3 -3
  44. package/dist/Progress/circularProgress.d.ts +3 -3
  45. package/dist/Progress/circularProgress.js +2 -1
  46. package/dist/TextFields/AddressLookup.cjs +390 -0
  47. package/dist/TextFields/AddressLookup.d.cts +49 -0
  48. package/dist/TextFields/AddressLookup.d.ts +49 -0
  49. package/dist/TextFields/AddressLookup.js +11 -0
  50. package/dist/TextFields/FloatingInput.cjs +6 -4
  51. package/dist/TextFields/FloatingInput.d.cts +13 -19
  52. package/dist/TextFields/FloatingInput.d.ts +13 -19
  53. package/dist/TextFields/FloatingInput.js +4 -28
  54. package/dist/chunk-66HHM7VI.js +468 -0
  55. package/dist/chunk-7KRG7VNW.js +0 -0
  56. package/dist/chunk-CSQGNUVU.js +62 -0
  57. package/dist/{chunk-YRFUVQDN.js → chunk-CTBYVXFP.js} +2 -2
  58. package/dist/chunk-GJGRMMAQ.js +0 -0
  59. package/dist/chunk-J6E3UO2W.js +402 -0
  60. package/dist/chunk-LI4N7JWK.js +39 -0
  61. package/dist/chunk-MGFGSPHM.js +303 -0
  62. package/dist/{chunk-AQXTOTWY.js → chunk-P3I6CP2I.js} +19 -11
  63. package/dist/chunk-S7BNFVQO.js +156 -0
  64. package/dist/chunk-UPCMMCPQ.js +34 -0
  65. package/dist/chunk-X357WQOT.js +29 -0
  66. package/dist/{chunk-7YKG3WYS.js → chunk-YRLN3TBF.js} +1 -1
  67. package/dist/esm-5T53WHPT.js +27362 -0
  68. package/dist/icons/activateUserIcon.js +1 -0
  69. package/dist/icons/archivedIcon.js +1 -0
  70. package/dist/icons/assignGroupIcon.js +1 -0
  71. package/dist/icons/closeIcon.js +1 -0
  72. package/dist/icons/copyIcon.js +1 -0
  73. package/dist/icons/difficultyAllIcon.js +1 -0
  74. package/dist/icons/difficultyEasyIcon.js +1 -0
  75. package/dist/icons/difficultyHardIcon.js +1 -0
  76. package/dist/icons/difficultyMediumIcon.js +1 -0
  77. package/dist/icons/dollarIcon.js +1 -0
  78. package/dist/icons/downloadIcon.js +1 -0
  79. package/dist/icons/downloadPdfIcon.js +1 -0
  80. package/dist/icons/editChatIcon.js +1 -0
  81. package/dist/icons/editIcon.js +1 -0
  82. package/dist/icons/engagementIcon.js +1 -0
  83. package/dist/icons/functionIcon.js +1 -0
  84. package/dist/icons/helpOutlinedIcon.js +1 -0
  85. package/dist/icons/hierarchyIcon.js +1 -0
  86. package/dist/icons/inactiveGroupIcon.js +1 -0
  87. package/dist/icons/index.js +48 -47
  88. package/dist/icons/industryIcon.js +1 -0
  89. package/dist/icons/invoiceIcon.js +1 -0
  90. package/dist/icons/locationPinIcon.js +1 -0
  91. package/dist/icons/logsIcon.js +1 -0
  92. package/dist/icons/minExperienceIcon.js +1 -0
  93. package/dist/icons/nineDotMenuIcon.js +1 -0
  94. package/dist/icons/notificationIcon.js +1 -0
  95. package/dist/icons/projectIcon.js +1 -0
  96. package/dist/icons/qualificationsIcon.js +1 -0
  97. package/dist/icons/questionStatusAllIcon.js +1 -0
  98. package/dist/icons/questionStatusPrivateIcon.js +1 -0
  99. package/dist/icons/questionStatusPublicIcon.js +1 -0
  100. package/dist/icons/questionTypeAllIcon.js +1 -0
  101. package/dist/icons/questionTypeCodingIcon.js +1 -0
  102. package/dist/icons/questionTypeDescriptiveIcon.js +1 -0
  103. package/dist/icons/questionTypeMultipleIcon.js +1 -0
  104. package/dist/icons/questionTypeSingleIcon.js +1 -0
  105. package/dist/icons/refreshIcon.js +1 -0
  106. package/dist/icons/resendInviteIcon.js +1 -0
  107. package/dist/icons/rolesIcon.js +1 -0
  108. package/dist/icons/rufousAiIcon.js +1 -0
  109. package/dist/icons/rufousBirdIcon.js +1 -0
  110. package/dist/icons/rufousLauncherBird.js +1 -0
  111. package/dist/icons/sidebarIcon.js +1 -0
  112. package/dist/icons/softSkillsIcon.js +1 -0
  113. package/dist/icons/subscribeIcon.js +1 -0
  114. package/dist/icons/suspendUserIcon.js +1 -0
  115. package/dist/icons/technicalSkillsIcon.js +1 -0
  116. package/dist/icons/tickIcon.js +1 -0
  117. package/dist/icons/timerIcon.js +1 -0
  118. package/dist/icons/trashIcon.js +1 -0
  119. package/dist/icons/unArchivedIcon.js +1 -0
  120. package/dist/icons/unsubscribeIcon.js +1 -0
  121. package/dist/icons/uploadIcon.js +1 -0
  122. package/dist/icons/userAssignIcon.js +1 -0
  123. package/dist/icons/viewIcon.js +1 -0
  124. package/dist/icons/workItemIcon.js +1 -0
  125. package/dist/main.cjs +30452 -201
  126. package/dist/main.css +8355 -162
  127. package/dist/main.d.cts +7 -0
  128. package/dist/main.d.ts +7 -0
  129. package/dist/main.js +78 -52
  130. package/dist/style.css +1068 -163
  131. package/dist/styles/address-lookup.css +107 -0
  132. package/dist/styles/address-lookup.d.cts +2 -0
  133. package/dist/styles/address-lookup.d.ts +2 -0
  134. package/dist/styles/button.css +82 -110
  135. package/dist/styles/checkbox.css +60 -0
  136. package/dist/styles/checkbox.d.cts +2 -0
  137. package/dist/styles/checkbox.d.ts +2 -0
  138. package/dist/styles/datagrid.css +531 -0
  139. package/dist/styles/datagrid.d.cts +2 -0
  140. package/dist/styles/datagrid.d.ts +2 -0
  141. package/dist/styles/dialog.css +78 -51
  142. package/dist/styles/editor.css +211 -0
  143. package/dist/styles/editor.d.cts +2 -0
  144. package/dist/styles/editor.d.ts +2 -0
  145. package/dist/utils/constants.cjs +115 -42
  146. package/dist/utils/constants.d.cts +60 -37
  147. package/dist/utils/constants.d.ts +60 -37
  148. package/dist/utils/constants.js +2 -1
  149. package/package.json +13 -2
  150. package/dist/TextFields/FloatingInput.d.d.cts +0 -23
  151. package/dist/TextFields/FloatingInput.d.d.ts +0 -23
  152. package/dist/chunk-2FHTGYR4.js +0 -83
  153. package/dist/chunk-BCGCLMKA.js +0 -71
  154. /package/dist/{TextFields/FloatingInput.d.js → DataGrid/types.js} +0 -0
@@ -0,0 +1,303 @@
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-CSQGNUVU.js";
10
+
11
+ // lib/TextFields/AddressLookup.tsx
12
+ import React, { useState, useRef, useEffect } from "react";
13
+ import Axios from "axios";
14
+ import { Country, State, City } from "country-state-city";
15
+ var AddressLookup = ({
16
+ value = {},
17
+ onChange = () => {
18
+ },
19
+ label = "Address",
20
+ error = {},
21
+ size = "medium",
22
+ sx = {},
23
+ layout = "stack",
24
+ required = false,
25
+ token = ""
26
+ }) => {
27
+ const { theme } = useRufousTheme();
28
+ const [suggestions, setSuggestions] = useState([]);
29
+ const [loading, setLoading] = useState(false);
30
+ const [showSuggestions, setShowSuggestions] = useState(false);
31
+ const [googleFields, setGoogleFields] = useState({
32
+ country: false,
33
+ state: false,
34
+ city: false,
35
+ pincode: false
36
+ });
37
+ const debounceTimeout = useRef(null);
38
+ const containerRef = useRef(null);
39
+ const apiKey = token || "";
40
+ const countries = Country.getAllCountries();
41
+ const [states, setStates] = useState([]);
42
+ const [cities, setCities] = useState([]);
43
+ useEffect(() => {
44
+ const handleClickOutside = (event) => {
45
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
46
+ setShowSuggestions(false);
47
+ }
48
+ };
49
+ document.addEventListener("mousedown", handleClickOutside);
50
+ return () => document.removeEventListener("mousedown", handleClickOutside);
51
+ }, []);
52
+ useEffect(() => {
53
+ if (value.country || value.state || value.city || value.pincode) {
54
+ setGoogleFields({
55
+ country: !!value.country,
56
+ state: !!value.state,
57
+ city: !!value.city,
58
+ pincode: !!value.pincode
59
+ });
60
+ }
61
+ }, []);
62
+ useEffect(() => {
63
+ if (value.country) {
64
+ const country = countries.find((c) => c.name === value.country);
65
+ if (country) {
66
+ const stateList = State.getStatesOfCountry(country.isoCode);
67
+ setStates(stateList);
68
+ } else {
69
+ setStates([]);
70
+ }
71
+ } else {
72
+ setStates([]);
73
+ }
74
+ }, [value.country]);
75
+ useEffect(() => {
76
+ if (value.state && value.country) {
77
+ const country = countries.find((c) => c.name === value.country);
78
+ if (country) {
79
+ const state = State.getStatesOfCountry(country.isoCode).find((s) => s.name === value.state);
80
+ if (state) {
81
+ const cityList = City.getCitiesOfState(country.isoCode, state.isoCode);
82
+ setCities(cityList);
83
+ } else {
84
+ setCities([]);
85
+ }
86
+ } else {
87
+ setCities([]);
88
+ }
89
+ } else {
90
+ setCities([]);
91
+ }
92
+ }, [value.state, value.country]);
93
+ const handleChange = (field, newVal) => {
94
+ onChange({
95
+ ...value,
96
+ [field]: newVal
97
+ });
98
+ };
99
+ const fetchPlaceDetails = async (placeId, mainText = "") => {
100
+ if (!apiKey) {
101
+ console.warn("Google Places API Key (token) is missing.");
102
+ return;
103
+ }
104
+ setLoading(true);
105
+ try {
106
+ const res = await Axios.get(
107
+ `https://places.googleapis.com/v1/places/${placeId}`,
108
+ {
109
+ headers: {
110
+ "Content-Type": "application/json",
111
+ "X-Goog-Api-Key": apiKey,
112
+ "X-Goog-FieldMask": "addressComponents,formattedAddress"
113
+ }
114
+ }
115
+ );
116
+ const comps = res.data.addressComponents || [];
117
+ const findComp = (type) => comps.find((c) => c.types.includes(type))?.longText || "";
118
+ const city = findComp("locality") || findComp("sublocality_level_1");
119
+ const state = findComp("administrative_area_level_1");
120
+ const country = findComp("country");
121
+ const pincode = findComp("postal_code");
122
+ setGoogleFields({
123
+ country: !!country,
124
+ state: !!state,
125
+ city: !!city,
126
+ pincode: !!pincode
127
+ });
128
+ const updatedData = {
129
+ ...value,
130
+ addressLine1: mainText || value.addressLine1,
131
+ addressLine2: res.data.formattedAddress || value.addressLine2,
132
+ city,
133
+ state,
134
+ country,
135
+ pincode
136
+ };
137
+ onChange(updatedData);
138
+ setShowSuggestions(false);
139
+ } catch (err) {
140
+ console.error("Error fetching place details:", err);
141
+ } finally {
142
+ setLoading(false);
143
+ }
144
+ };
145
+ const handleQuerySuggestions = async (query) => {
146
+ if (!apiKey || !query || query.length < 3) {
147
+ setSuggestions([]);
148
+ setShowSuggestions(false);
149
+ return;
150
+ }
151
+ setLoading(true);
152
+ try {
153
+ const res = await Axios.post(
154
+ `https://places.googleapis.com/v1/places:autocomplete`,
155
+ { input: query },
156
+ {
157
+ headers: {
158
+ "Content-Type": "application/json",
159
+ "X-Goog-Api-Key": apiKey
160
+ }
161
+ }
162
+ );
163
+ setSuggestions(res.data.suggestions || []);
164
+ setShowSuggestions(true);
165
+ } catch (err) {
166
+ console.error("Autocomplete Error:", err);
167
+ } finally {
168
+ setLoading(false);
169
+ }
170
+ };
171
+ const handleCountryChange = (newCountry) => {
172
+ onChange({
173
+ ...value,
174
+ country: newCountry,
175
+ state: "",
176
+ city: ""
177
+ });
178
+ setGoogleFields({ ...googleFields, country: false, state: false, city: false });
179
+ };
180
+ const handleStateChange = (newState) => {
181
+ onChange({
182
+ ...value,
183
+ state: newState,
184
+ city: ""
185
+ });
186
+ };
187
+ 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(
188
+ FloatingInput,
189
+ {
190
+ label,
191
+ name: "addressLine1",
192
+ value: value.addressLine1 || "",
193
+ required,
194
+ autoComplete: "off",
195
+ onChange: (e) => {
196
+ const val = e.target.value;
197
+ handleChange("addressLine1", val);
198
+ if (!val) {
199
+ onChange({
200
+ ...value,
201
+ addressLine1: "",
202
+ city: "",
203
+ state: "",
204
+ country: "",
205
+ pincode: ""
206
+ });
207
+ setSuggestions([]);
208
+ setShowSuggestions(false);
209
+ setGoogleFields({ country: false, state: false, city: false, pincode: false });
210
+ } else {
211
+ if (debounceTimeout.current) clearTimeout(debounceTimeout.current);
212
+ debounceTimeout.current = setTimeout(() => {
213
+ handleQuerySuggestions(val);
214
+ }, 500);
215
+ }
216
+ },
217
+ onFocus: () => suggestions.length > 0 && setShowSuggestions(true)
218
+ }
219
+ ), 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(
220
+ "div",
221
+ {
222
+ key: idx,
223
+ className: "autocomplete-option",
224
+ onClick: () => {
225
+ const mainText = option?.placePrediction?.structuredFormat?.mainText?.text || "";
226
+ handleChange("addressLine1", mainText);
227
+ fetchPlaceDetails(option.placePrediction.placeId, mainText);
228
+ }
229
+ },
230
+ /* @__PURE__ */ React.createElement("div", { className: "autocomplete-main-text" }, option?.placePrediction?.structuredFormat?.mainText?.text),
231
+ /* @__PURE__ */ React.createElement("div", { className: "autocomplete-secondary-text" }, option?.placePrediction?.structuredFormat?.secondaryText?.text)
232
+ ))), 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(
233
+ FloatingInput,
234
+ {
235
+ label: "Address Line 2",
236
+ name: "addressLine2",
237
+ value: value.addressLine2 || "",
238
+ onChange: (e) => handleChange("addressLine2", e.target.value)
239
+ }
240
+ )), layout !== "compact" && /* @__PURE__ */ React.createElement("div", { className: "address-lookup-grid-item col-l2" }, /* @__PURE__ */ React.createElement(
241
+ FloatingInput,
242
+ {
243
+ label: "Address Line 2",
244
+ name: "addressLine2",
245
+ value: value.addressLine2 || "",
246
+ onChange: (e) => handleChange("addressLine2", e.target.value)
247
+ }
248
+ )), /* @__PURE__ */ React.createElement("div", { className: "address-lookup-grid-item col-country" }, /* @__PURE__ */ React.createElement(
249
+ FloatingInput,
250
+ {
251
+ label: "Country",
252
+ name: "country",
253
+ value: value.country || "",
254
+ required,
255
+ className: googleFields.country && value.country ? "field-disabled" : "",
256
+ readOnly: googleFields.country && !!value.country,
257
+ onChange: (e) => handleCountryChange(e.target.value),
258
+ list: "countries-list"
259
+ }
260
+ ), /* @__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(
261
+ FloatingInput,
262
+ {
263
+ label: "State",
264
+ name: "state",
265
+ value: value.state || "",
266
+ required,
267
+ disabled: !value.country,
268
+ className: googleFields.state && value.state ? "field-disabled" : "",
269
+ readOnly: googleFields.state && !!value.state,
270
+ onChange: (e) => handleStateChange(e.target.value),
271
+ list: "states-list"
272
+ }
273
+ ), /* @__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(
274
+ FloatingInput,
275
+ {
276
+ label: "City",
277
+ name: "city",
278
+ value: value.city || "",
279
+ required,
280
+ disabled: !value.state,
281
+ className: googleFields.city && value.city ? "field-disabled" : "",
282
+ readOnly: googleFields.city && !!value.city,
283
+ onChange: (e) => handleChange("city", e.target.value),
284
+ list: "cities-list"
285
+ }
286
+ ), /* @__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(
287
+ FloatingInput,
288
+ {
289
+ label: "Pincode",
290
+ name: "pincode",
291
+ value: value.pincode || "",
292
+ required,
293
+ className: googleFields.pincode && value.pincode ? "field-disabled" : "",
294
+ readOnly: googleFields.pincode && !!value.pincode,
295
+ onChange: (e) => handleChange("pincode", e.target.value)
296
+ }
297
+ ), error.pincode && /* @__PURE__ */ React.createElement("div", { className: "field-error-text" }, error.pincode))));
298
+ };
299
+ var AddressLookup_default = AddressLookup;
300
+
301
+ export {
302
+ AddressLookup_default
303
+ };
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-Q5XKCUE3.js";
4
4
  import {
5
5
  useRufousTheme
6
- } from "./chunk-BCGCLMKA.js";
6
+ } from "./chunk-CSQGNUVU.js";
7
7
 
8
8
  // lib/Dialogs/BaseDialog.tsx
9
9
  import * as React from "react";
@@ -17,8 +17,8 @@ var BaseDialog = ({
17
17
  minWidth,
18
18
  minHeight,
19
19
  customButtons,
20
- cancelText = "Cancel",
21
- confirmText = "Ok",
20
+ cancelText = "CANCEL",
21
+ confirmText = "SUBMIT",
22
22
  submitText = "Submit",
23
23
  title = "",
24
24
  isLoading = false,
@@ -31,9 +31,10 @@ var BaseDialog = ({
31
31
  formatTitle = true,
32
32
  fullWidth = false,
33
33
  className,
34
- dialogBodyStyle = {}
34
+ dialogBodyStyle = {},
35
+ size
35
36
  }) => {
36
- const { theme } = useRufousTheme();
37
+ const { themeConfig } = useRufousTheme();
37
38
  const successBtnRef = useRef(null);
38
39
  if (!open) return null;
39
40
  const renderButtons = () => /* @__PURE__ */ React.createElement("div", { className: "dialog-footer", style: { justifyContent: buttonAlign } }, showCancelButton && /* @__PURE__ */ React.createElement(
@@ -58,17 +59,23 @@ var BaseDialog = ({
58
59
  },
59
60
  loading ? /* @__PURE__ */ React.createElement("span", { className: "spinner" }) : /* @__PURE__ */ React.createElement("span", null, confirmText)
60
61
  ));
61
- return /* @__PURE__ */ React.createElement("div", { className: `dialog-overlay ${fullScreen ? "fullscreen" : ""}` }, /* @__PURE__ */ React.createElement(
62
+ return /* @__PURE__ */ React.createElement("div", { className: `dialog-overlay ${size === "fullScreen" ? "overlay-fullscreen" : ""}` }, /* @__PURE__ */ React.createElement(
62
63
  "div",
63
64
  {
64
- className: `dialog-container ${className || ""}`,
65
+ className: `dialog-container ${size ? `size-${size}` : ""} ${className || ""}`,
65
66
  style: {
66
- minWidth: minWidth || (fullScreen ? "100%" : "685px"),
67
- minHeight,
68
- width: fullWidth ? "100%" : "auto"
67
+ minWidth,
68
+ minHeight
69
69
  }
70
70
  },
71
- /* @__PURE__ */ React.createElement("div", { className: "dialog-title" }, /* @__PURE__ */ React.createElement("h2", null, formatTitle ? title?.charAt(0).toUpperCase() + title?.slice(1).toLowerCase() : title), showCloseButton && /* @__PURE__ */ React.createElement("button", { className: "btn-close", onClick: onClose }, /* @__PURE__ */ React.createElement(closeIcon_default, { color: theme?.customStyles?.iconColor || "#707070" }))),
71
+ /* @__PURE__ */ React.createElement("div", { className: "dialog-title" }, /* @__PURE__ */ React.createElement("h2", null, formatTitle ? title?.charAt(0).toUpperCase() + title?.slice(1) : title), showCloseButton && /* @__PURE__ */ React.createElement("button", { className: "btn-close", onClick: onClose }, /* @__PURE__ */ React.createElement(
72
+ closeIcon_default,
73
+ {
74
+ width: 20,
75
+ height: 20,
76
+ color: themeConfig?.icon || "#666666"
77
+ }
78
+ ))),
72
79
  /* @__PURE__ */ React.createElement("div", { className: "dialog-divider" }),
73
80
  /* @__PURE__ */ React.createElement(
74
81
  "div",
@@ -81,6 +88,7 @@ var BaseDialog = ({
81
88
  },
82
89
  children
83
90
  ),
91
+ /* @__PURE__ */ React.createElement("div", { className: "dialog-divider" }),
84
92
  customButtons || renderButtons()
85
93
  ));
86
94
  };
@@ -0,0 +1,156 @@
1
+ // lib/utils/constants.ts
2
+ var APP_THEMES = {
3
+ default: {
4
+ name: "Default",
5
+ light: {
6
+ primary: "#707070",
7
+ secondary: "#e0e0e0",
8
+ background: "#f5f5f5",
9
+ surface: "#ffffff",
10
+ text: "#2d2d2d",
11
+ textSecondary: "#6f6f6f",
12
+ border: "#dcdcdc",
13
+ hover: "#d4d4d4",
14
+ selection: "#5a5a5a",
15
+ icon: "#707070",
16
+ get customStyles() {
17
+ return {
18
+ iconColor: this.icon,
19
+ primaryColor: this.primary,
20
+ secondaryColor: this.secondary
21
+ };
22
+ }
23
+ },
24
+ dark: {
25
+ primary: "#94a3b8",
26
+ secondary: "#475569",
27
+ background: "#0f172a",
28
+ surface: "#1e293b",
29
+ text: "#f1f5f9",
30
+ textSecondary: "#94a3b8",
31
+ border: "#334155",
32
+ hover: "#1e293b",
33
+ selection: "#334155",
34
+ icon: "#94a3b8",
35
+ get customStyles() {
36
+ return {
37
+ iconColor: this.icon,
38
+ primaryColor: this.primary,
39
+ secondaryColor: this.secondary
40
+ };
41
+ }
42
+ },
43
+ // Keep user's extra properties if they were intended for specific components
44
+ button: {
45
+ background: "#707070",
46
+ text: "#ffffff",
47
+ hoverBackground: "#5f5f5f",
48
+ disabledBackground: "#cfcfcf"
49
+ },
50
+ input: {
51
+ background: "#ffffff",
52
+ text: "#2d2d2d",
53
+ border: "#ccc",
54
+ placeholder: "#999",
55
+ focusBorder: "#707070"
56
+ },
57
+ card: {
58
+ background: "#ffffff",
59
+ shadow: "0 1px 3px rgba(0,0,0,0.1)"
60
+ },
61
+ sidebar: {
62
+ background: "#e8e8e8",
63
+ text: "#2d2d2d",
64
+ hover: "#dcdcdc"
65
+ },
66
+ success: "#4CAF50",
67
+ warning: "#FFC107",
68
+ error: "#F44336"
69
+ },
70
+ rufous: {
71
+ name: "Rufous",
72
+ light: {
73
+ primary: "#a41b06",
74
+ secondary: "#8b1605",
75
+ background: "#ffffff",
76
+ surface: "#ffffff",
77
+ text: "#2d2d2d",
78
+ textSecondary: "#666666",
79
+ border: "#e0e0e0",
80
+ hover: "#fff5f5",
81
+ selection: "#fce4ec",
82
+ icon: "#a41b06",
83
+ get customStyles() {
84
+ return {
85
+ iconColor: this.icon,
86
+ primaryColor: this.primary,
87
+ secondaryColor: this.secondary
88
+ };
89
+ }
90
+ },
91
+ dark: {
92
+ primary: "#dc2626",
93
+ secondary: "#a41b06",
94
+ background: "#121212",
95
+ surface: "#1e1e1e",
96
+ text: "#f5f5f5",
97
+ textSecondary: "#b0b0b0",
98
+ border: "#333333",
99
+ hover: "#2d1a1a",
100
+ selection: "#4a1212",
101
+ icon: "#dc2626",
102
+ get customStyles() {
103
+ return {
104
+ iconColor: this.icon,
105
+ primaryColor: this.primary,
106
+ secondaryColor: this.secondary
107
+ };
108
+ }
109
+ }
110
+ }
111
+ // slate: {
112
+ // name: "Slate",
113
+ // light: {
114
+ // primary: "#334155",
115
+ // secondary: "#475569",
116
+ // background: "#f8fafc",
117
+ // surface: "#ffffff",
118
+ // text: "#0f172a",
119
+ // textSecondary: "#64748b",
120
+ // border: "#e2e8f0",
121
+ // hover: "#f1f5f9",
122
+ // selection: "#e0f2fe",
123
+ // icon: "#334155",
124
+ // get customStyles() {
125
+ // return {
126
+ // iconColor: this.icon,
127
+ // primaryColor: this.primary,
128
+ // secondaryColor: this.secondary,
129
+ // };
130
+ // },
131
+ // },
132
+ // dark: {
133
+ // primary: "#94a3b8",
134
+ // secondary: "#64748b",
135
+ // background: "#0f172a",
136
+ // surface: "#1e293b",
137
+ // text: "#f1f5f9",
138
+ // textSecondary: "#94a3b8",
139
+ // border: "#334155",
140
+ // hover: "#1e293b",
141
+ // selection: "#0c4a6e",
142
+ // icon: "#94a3b8",
143
+ // get customStyles() {
144
+ // return {
145
+ // iconColor: this.icon,
146
+ // primaryColor: this.primary,
147
+ // secondaryColor: this.secondary,
148
+ // };
149
+ // },
150
+ // },
151
+ // },
152
+ };
153
+
154
+ export {
155
+ APP_THEMES
156
+ };
@@ -0,0 +1,34 @@
1
+ // lib/TextFields/FloatingInput.tsx
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
+ style,
14
+ ...props
15
+ }) => {
16
+ return /* @__PURE__ */ React.createElement("div", { className: `form__group field ${className}`, style }, /* @__PURE__ */ React.createElement(
17
+ "input",
18
+ {
19
+ type,
20
+ className: "form__field",
21
+ placeholder: " ",
22
+ name,
23
+ id: id || name,
24
+ value,
25
+ onChange,
26
+ required,
27
+ ...props
28
+ }
29
+ ), /* @__PURE__ */ React.createElement("label", { htmlFor: id || name, className: "form__label" }, label));
30
+ };
31
+
32
+ export {
33
+ FloatingInput
34
+ };
@@ -0,0 +1,29 @@
1
+ // lib/CheckBoxes/CheckBox.jsx
2
+ import React from "react";
3
+ var Checkbox = ({
4
+ id,
5
+ label,
6
+ checked,
7
+ onChange,
8
+ disabled = false,
9
+ className = "",
10
+ style
11
+ }) => {
12
+ const handleChange = (e) => {
13
+ if (onChange) onChange(e.target.checked);
14
+ };
15
+ return /* @__PURE__ */ React.createElement("div", { className: "checkbox-wrapper-13" }, /* @__PURE__ */ React.createElement("label", { className: `${className}`, style }, /* @__PURE__ */ React.createElement(
16
+ "input",
17
+ {
18
+ id,
19
+ type: "checkbox",
20
+ checked,
21
+ onChange: handleChange,
22
+ disabled
23
+ }
24
+ ), label && /* @__PURE__ */ React.createElement("span", { className: "checkbox-label" }, label)));
25
+ };
26
+
27
+ export {
28
+ Checkbox
29
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  circularProgress_default
3
- } from "./chunk-YRFUVQDN.js";
3
+ } from "./chunk-CTBYVXFP.js";
4
4
 
5
5
  // lib/Buttons/submitButton.tsx
6
6
  import * as React from "react";