react-admin-crud-manager 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -0
- package/package.json +55 -0
- package/src/App.jsx +5 -0
- package/src/components/Button/Button.jsx +85 -0
- package/src/components/Chip/Chip.jsx +71 -0
- package/src/components/CrudPage.jsx +532 -0
- package/src/components/Details/Details.jsx +134 -0
- package/src/components/Filter/FilterDrawer.jsx +99 -0
- package/src/components/Form/Form.jsx +51 -0
- package/src/components/Form/components/Checkbox.jsx +119 -0
- package/src/components/Form/components/ImagePicker.jsx +128 -0
- package/src/components/Form/components/Input.jsx +71 -0
- package/src/components/Form/components/InputLabel.jsx +12 -0
- package/src/components/Form/components/PhoneInput.jsx +221 -0
- package/src/components/Form/components/RenderFields.jsx +181 -0
- package/src/components/Form/components/Select.jsx +191 -0
- package/src/components/Form/components/Switch.jsx +64 -0
- package/src/components/Form/components/TextArea.jsx +31 -0
- package/src/components/Form/components/TinyEditor.jsx +113 -0
- package/src/components/Loader/Spinner.jsx +21 -0
- package/src/components/Modal/Modal.jsx +152 -0
- package/src/components/Table/Table.jsx +554 -0
- package/src/components/Table/components/ImagePreview.jsx +58 -0
- package/src/components/Table/components/TableSkeleton.jsx +39 -0
- package/src/data/countries.js +252 -0
- package/src/data/teams.js +130 -0
- package/src/index.css +170 -0
- package/src/lib/utils.js +74 -0
- package/src/main.jsx +11 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { X } from "lucide-react";
|
|
3
|
+
|
|
4
|
+
const ImagePreview = ({ src, alt = "preview", isOpen, setIsOpen }) => {
|
|
5
|
+
const closePreview = () => setIsOpen(false);
|
|
6
|
+
|
|
7
|
+
// Handle ESC key + prevent body scroll
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
const handleEsc = (e) => {
|
|
10
|
+
if (e.key === "Escape") closePreview();
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
if (isOpen) {
|
|
14
|
+
document.body.style.overflow = "hidden";
|
|
15
|
+
document.addEventListener("keydown", handleEsc);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return () => {
|
|
19
|
+
document.body.style.overflow = "";
|
|
20
|
+
document.removeEventListener("keydown", handleEsc);
|
|
21
|
+
};
|
|
22
|
+
}, [isOpen]);
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<>
|
|
26
|
+
{/* Fullscreen Preview */}
|
|
27
|
+
<div
|
|
28
|
+
className="fixed inset-0 z-50 flex items-center justify-center bg-black/70 dark:bg-black/80
|
|
29
|
+
backdrop-blur-sm animate-in fade-in duration-200"
|
|
30
|
+
onClick={closePreview}
|
|
31
|
+
>
|
|
32
|
+
{/* Close Button */}
|
|
33
|
+
<button
|
|
34
|
+
onClick={closePreview}
|
|
35
|
+
className="absolute top-4 right-4 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200
|
|
36
|
+
hover:bg-gray-100 dark:hover:bg-gray-700 rounded-full p-2 shadow-lg transition"
|
|
37
|
+
>
|
|
38
|
+
<X size={20} />
|
|
39
|
+
</button>
|
|
40
|
+
|
|
41
|
+
{/* Image Container */}
|
|
42
|
+
<div
|
|
43
|
+
className="max-w-5xl w-full px-4 transform transition-all duration-200 scale-95 animate-in zoom-in-95"
|
|
44
|
+
onClick={(e) => e.stopPropagation()}
|
|
45
|
+
>
|
|
46
|
+
{/* Large Image */}
|
|
47
|
+
<img
|
|
48
|
+
src={src}
|
|
49
|
+
alt={alt}
|
|
50
|
+
className="w-full max-h-[90vh] object-contain rounded-xl"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export default ImagePreview;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const TableSkeleton = ({ rows = 5, columns = 5 }) => {
|
|
2
|
+
return (
|
|
3
|
+
<>
|
|
4
|
+
<div className="w-full mb-6 inline-flex justify-end items-center">
|
|
5
|
+
<div className="h-8 w-80 bg-gray-300 dark:bg-gray-700 rounded animate-pulse" />
|
|
6
|
+
</div>
|
|
7
|
+
<div className="overflow-hidden rounded-md border border-gray-200 dark:border-gray-800">
|
|
8
|
+
<table className="w-full border-collapse">
|
|
9
|
+
<thead>
|
|
10
|
+
<tr className="bg-gray-50 dark:bg-gray-900">
|
|
11
|
+
{Array.from({ length: columns }).map((_, i) => (
|
|
12
|
+
<th key={i} className="px-4 py-3">
|
|
13
|
+
<div className="h-6 w-24 bg-gray-300 dark:bg-gray-700 rounded animate-pulse inline-flex justify-center items-center" />
|
|
14
|
+
</th>
|
|
15
|
+
))}
|
|
16
|
+
</tr>
|
|
17
|
+
</thead>
|
|
18
|
+
|
|
19
|
+
<tbody>
|
|
20
|
+
{Array.from({ length: rows }).map((_, rowIndex) => (
|
|
21
|
+
<tr
|
|
22
|
+
key={rowIndex}
|
|
23
|
+
className="border-t border-gray-200 dark:border-gray-800"
|
|
24
|
+
>
|
|
25
|
+
{Array.from({ length: columns }).map((_, colIndex) => (
|
|
26
|
+
<td key={colIndex} className="px-4 py-6">
|
|
27
|
+
<div className="h-6 w-full bg-gray-300 dark:bg-gray-700 rounded animate-pulse" />
|
|
28
|
+
</td>
|
|
29
|
+
))}
|
|
30
|
+
</tr>
|
|
31
|
+
))}
|
|
32
|
+
</tbody>
|
|
33
|
+
</table>
|
|
34
|
+
</div>
|
|
35
|
+
</>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default TableSkeleton;
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
export const countries = [
|
|
2
|
+
{ label: "Afghanistan", code: "AF", phone: "93" },
|
|
3
|
+
{ label: "Aland Islands", code: "AX", phone: "358" },
|
|
4
|
+
{ label: "Albania", code: "AL", phone: "355" },
|
|
5
|
+
{ label: "Algeria", code: "DZ", phone: "213" },
|
|
6
|
+
{ label: "American Samoa", code: "AS", phone: "1" },
|
|
7
|
+
{ label: "Andorra", code: "AD", phone: "376" },
|
|
8
|
+
{ label: "Angola", code: "AO", phone: "244" },
|
|
9
|
+
{ label: "Anguilla", code: "AI", phone: "1" },
|
|
10
|
+
{ label: "Antarctica", code: "AQ", phone: "672" },
|
|
11
|
+
{ label: "Antigua and Barbuda", code: "AG", phone: "1" },
|
|
12
|
+
{ label: "Argentina", code: "AR", phone: "54" },
|
|
13
|
+
{ label: "Armenia", code: "AM", phone: "374" },
|
|
14
|
+
{ label: "Aruba", code: "AW", phone: "297" },
|
|
15
|
+
{ label: "Australia", code: "AU", phone: "61" },
|
|
16
|
+
{ label: "Austria", code: "AT", phone: "43" },
|
|
17
|
+
{ label: "Azerbaijan", code: "AZ", phone: "994" },
|
|
18
|
+
{ label: "Bahrain", code: "BH", phone: "973" },
|
|
19
|
+
{ label: "Bangladesh", code: "BD", phone: "880" },
|
|
20
|
+
{ label: "Barbados", code: "BB", phone: "1" },
|
|
21
|
+
{ label: "Belarus", code: "BY", phone: "375" },
|
|
22
|
+
{ label: "Belgium", code: "BE", phone: "32" },
|
|
23
|
+
{ label: "Belize", code: "BZ", phone: "501" },
|
|
24
|
+
{ label: "Benin", code: "BJ", phone: "229" },
|
|
25
|
+
{ label: "Bermuda", code: "BM", phone: "1" },
|
|
26
|
+
{ label: "Bhutan", code: "BT", phone: "975" },
|
|
27
|
+
{ label: "Bolivia", code: "BO", phone: "591" },
|
|
28
|
+
{ label: "Bonaire, Sint Eustatius and Saba", code: "BQ", phone: "599" },
|
|
29
|
+
{ label: "Bosnia and Herzegovina", code: "BA", phone: "387" },
|
|
30
|
+
{ label: "Botswana", code: "BW", phone: "267" },
|
|
31
|
+
{ label: "Bouvet Island", code: "BV", phone: "0055" },
|
|
32
|
+
{ label: "Brazil", code: "BR", phone: "55" },
|
|
33
|
+
{ label: "British Indian Ocean Territory", code: "IO", phone: "246" },
|
|
34
|
+
{ label: "Brunei", code: "BN", phone: "673" },
|
|
35
|
+
{ label: "Bulgaria", code: "BG", phone: "359" },
|
|
36
|
+
{ label: "Burkina Faso", code: "BF", phone: "226" },
|
|
37
|
+
{ label: "Burundi", code: "BI", phone: "257" },
|
|
38
|
+
{ label: "Cambodia", code: "KH", phone: "855" },
|
|
39
|
+
{ label: "Cameroon", code: "CM", phone: "237" },
|
|
40
|
+
{ label: "Canada", code: "CA", phone: "1" },
|
|
41
|
+
{ label: "Cape Verde", code: "CV", phone: "238" },
|
|
42
|
+
{ label: "Cayman Islands", code: "KY", phone: "1" },
|
|
43
|
+
{ label: "Central African Republic", code: "CF", phone: "236" },
|
|
44
|
+
{ label: "Chad", code: "TD", phone: "235" },
|
|
45
|
+
{ label: "Chile", code: "CL", phone: "56" },
|
|
46
|
+
{ label: "China", code: "CN", phone: "86" },
|
|
47
|
+
{ label: "Christmas Island", code: "CX", phone: "61" },
|
|
48
|
+
{ label: "Cocos (Keeling) Islands", code: "CC", phone: "61" },
|
|
49
|
+
{ label: "Colombia", code: "CO", phone: "57" },
|
|
50
|
+
{ label: "Comoros", code: "KM", phone: "269" },
|
|
51
|
+
{ label: "Congo", code: "CG", phone: "242" },
|
|
52
|
+
{ label: "Cook Islands", code: "CK", phone: "682" },
|
|
53
|
+
{ label: "Costa Rica", code: "CR", phone: "506" },
|
|
54
|
+
{ label: "Croatia", code: "HR", phone: "385" },
|
|
55
|
+
{ label: "Cuba", code: "CU", phone: "53" },
|
|
56
|
+
{ label: "Curaçao", code: "CW", phone: "599" },
|
|
57
|
+
{ label: "Cyprus", code: "CY", phone: "357" },
|
|
58
|
+
{ label: "Czech Republic", code: "CZ", phone: "420" },
|
|
59
|
+
{ label: "Democratic Republic of the Congo", code: "CD", phone: "243" },
|
|
60
|
+
{ label: "Denmark", code: "DK", phone: "45" },
|
|
61
|
+
{ label: "Djibouti", code: "DJ", phone: "253" },
|
|
62
|
+
{ label: "Dominica", code: "DM", phone: "1" },
|
|
63
|
+
{ label: "Dominican Republic", code: "DO", phone: "1" },
|
|
64
|
+
{ label: "Ecuador", code: "EC", phone: "593" },
|
|
65
|
+
{ label: "Egypt", code: "EG", phone: "20" },
|
|
66
|
+
{ label: "El Salvador", code: "SV", phone: "503" },
|
|
67
|
+
{ label: "Equatorial Guinea", code: "GQ", phone: "240" },
|
|
68
|
+
{ label: "Eritrea", code: "ER", phone: "291" },
|
|
69
|
+
{ label: "Estonia", code: "EE", phone: "372" },
|
|
70
|
+
{ label: "Eswatini", code: "SZ", phone: "268" },
|
|
71
|
+
{ label: "Ethiopia", code: "ET", phone: "251" },
|
|
72
|
+
{ label: "Falkland Islands", code: "FK", phone: "500" },
|
|
73
|
+
{ label: "Faroe Islands", code: "FO", phone: "298" },
|
|
74
|
+
{ label: "Fiji Islands", code: "FJ", phone: "679" },
|
|
75
|
+
{ label: "Finland", code: "FI", phone: "358" },
|
|
76
|
+
{ label: "France", code: "FR", phone: "33" },
|
|
77
|
+
{ label: "French Guiana", code: "GF", phone: "594" },
|
|
78
|
+
{ label: "French Polynesia", code: "PF", phone: "689" },
|
|
79
|
+
{ label: "French Southern Territories", code: "TF", phone: "262" },
|
|
80
|
+
{ label: "Gabon", code: "GA", phone: "241" },
|
|
81
|
+
{ label: "Georgia", code: "GE", phone: "995" },
|
|
82
|
+
{ label: "Germany", code: "DE", phone: "49" },
|
|
83
|
+
{ label: "Ghana", code: "GH", phone: "233" },
|
|
84
|
+
{ label: "Gibraltar", code: "GI", phone: "350" },
|
|
85
|
+
{ label: "Greece", code: "GR", phone: "30" },
|
|
86
|
+
{ label: "Greenland", code: "GL", phone: "299" },
|
|
87
|
+
{ label: "Grenada", code: "GD", phone: "1" },
|
|
88
|
+
{ label: "Guadeloupe", code: "GP", phone: "590" },
|
|
89
|
+
{ label: "Guam", code: "GU", phone: "1" },
|
|
90
|
+
{ label: "Guatemala", code: "GT", phone: "502" },
|
|
91
|
+
{ label: "Guernsey", code: "GG", phone: "44" },
|
|
92
|
+
{ label: "Guinea", code: "GN", phone: "224" },
|
|
93
|
+
{ label: "Guinea-Bissau", code: "GW", phone: "245" },
|
|
94
|
+
{ label: "Guyana", code: "GY", phone: "592" },
|
|
95
|
+
{ label: "Haiti", code: "HT", phone: "509" },
|
|
96
|
+
{ label: "Heard Island and McDonald Islands", code: "HM", phone: "672" },
|
|
97
|
+
{ label: "Honduras", code: "HN", phone: "504" },
|
|
98
|
+
{ label: "Hong Kong S.A.R.", code: "HK", phone: "852" },
|
|
99
|
+
{ label: "Hungary", code: "HU", phone: "36" },
|
|
100
|
+
{ label: "Iceland", code: "IS", phone: "354" },
|
|
101
|
+
{ label: "India", code: "IN", phone: "91" },
|
|
102
|
+
{ label: "Indonesia", code: "ID", phone: "62" },
|
|
103
|
+
{ label: "Iran", code: "IR", phone: "98" },
|
|
104
|
+
{ label: "Iraq", code: "IQ", phone: "964" },
|
|
105
|
+
{ label: "Ireland", code: "IE", phone: "353" },
|
|
106
|
+
{ label: "Israel", code: "IL", phone: "972" },
|
|
107
|
+
{ label: "Italy", code: "IT", phone: "39" },
|
|
108
|
+
{ label: "Ivory Coast", code: "CI", phone: "225" },
|
|
109
|
+
{ label: "Jamaica", code: "JM", phone: "1" },
|
|
110
|
+
{ label: "Japan", code: "JP", phone: "81" },
|
|
111
|
+
{ label: "Jersey", code: "JE", phone: "44" },
|
|
112
|
+
{ label: "Jordan", code: "JO", phone: "962" },
|
|
113
|
+
{ label: "Kazakhstan", code: "KZ", phone: "7" },
|
|
114
|
+
{ label: "Kenya", code: "KE", phone: "254" },
|
|
115
|
+
{ label: "Kiribati", code: "KI", phone: "686" },
|
|
116
|
+
{ label: "Kosovo", code: "XK", phone: "383" },
|
|
117
|
+
{ label: "Kuwait", code: "KW", phone: "965" },
|
|
118
|
+
{ label: "Kyrgyzstan", code: "KG", phone: "996" },
|
|
119
|
+
{ label: "Laos", code: "LA", phone: "856" },
|
|
120
|
+
{ label: "Latvia", code: "LV", phone: "371" },
|
|
121
|
+
{ label: "Lebanon", code: "LB", phone: "961" },
|
|
122
|
+
{ label: "Lesotho", code: "LS", phone: "266" },
|
|
123
|
+
{ label: "Liberia", code: "LR", phone: "231" },
|
|
124
|
+
{ label: "Libya", code: "LY", phone: "218" },
|
|
125
|
+
{ label: "Liechtenstein", code: "LI", phone: "423" },
|
|
126
|
+
{ label: "Lithuania", code: "LT", phone: "370" },
|
|
127
|
+
{ label: "Luxembourg", code: "LU", phone: "352" },
|
|
128
|
+
{ label: "Macau S.A.R.", code: "MO", phone: "853" },
|
|
129
|
+
{ label: "Madagascar", code: "MG", phone: "261" },
|
|
130
|
+
{ label: "Malawi", code: "MW", phone: "265" },
|
|
131
|
+
{ label: "Malaysia", code: "MY", phone: "60" },
|
|
132
|
+
{ label: "Maldives", code: "MV", phone: "960" },
|
|
133
|
+
{ label: "Mali", code: "ML", phone: "223" },
|
|
134
|
+
{ label: "Malta", code: "MT", phone: "356" },
|
|
135
|
+
{ label: "Man (Isle of)", code: "IM", phone: "44" },
|
|
136
|
+
{ label: "Marshall Islands", code: "MH", phone: "692" },
|
|
137
|
+
{ label: "Martinique", code: "MQ", phone: "596" },
|
|
138
|
+
{ label: "Mauritania", code: "MR", phone: "222" },
|
|
139
|
+
{ label: "Mauritius", code: "MU", phone: "230" },
|
|
140
|
+
{ label: "Mayotte", code: "YT", phone: "262" },
|
|
141
|
+
{ label: "Mexico", code: "MX", phone: "52" },
|
|
142
|
+
{ label: "Micronesia", code: "FM", phone: "691" },
|
|
143
|
+
{ label: "Moldova", code: "MD", phone: "373" },
|
|
144
|
+
{ label: "Monaco", code: "MC", phone: "377" },
|
|
145
|
+
{ label: "Mongolia", code: "MN", phone: "976" },
|
|
146
|
+
{ label: "Montenegro", code: "ME", phone: "382" },
|
|
147
|
+
{ label: "Montserrat", code: "MS", phone: "1" },
|
|
148
|
+
{ label: "Morocco", code: "MA", phone: "212" },
|
|
149
|
+
{ label: "Mozambique", code: "MZ", phone: "258" },
|
|
150
|
+
{ label: "Myanmar", code: "MM", phone: "95" },
|
|
151
|
+
{ label: "Namibia", code: "NA", phone: "264" },
|
|
152
|
+
{ label: "Nauru", code: "NR", phone: "674" },
|
|
153
|
+
{ label: "Nepal", code: "NP", phone: "977" },
|
|
154
|
+
{ label: "Netherlands", code: "NL", phone: "31" },
|
|
155
|
+
{ label: "New Caledonia", code: "NC", phone: "687" },
|
|
156
|
+
{ label: "New Zealand", code: "NZ", phone: "64" },
|
|
157
|
+
{ label: "Nicaragua", code: "NI", phone: "505" },
|
|
158
|
+
{ label: "Niger", code: "NE", phone: "227" },
|
|
159
|
+
{ label: "Nigeria", code: "NG", phone: "234" },
|
|
160
|
+
{ label: "Niue", code: "NU", phone: "683" },
|
|
161
|
+
{ label: "Norfolk Island", code: "NF", phone: "672" },
|
|
162
|
+
{ label: "North Korea", code: "KP", phone: "850" },
|
|
163
|
+
{ label: "North Macedonia", code: "MK", phone: "389" },
|
|
164
|
+
{ label: "Northern Mariana Islands", code: "MP", phone: "1" },
|
|
165
|
+
{ label: "Norway", code: "NO", phone: "47" },
|
|
166
|
+
{ label: "Oman", code: "OM", phone: "968" },
|
|
167
|
+
{ label: "Pakistan", code: "PK", phone: "92" },
|
|
168
|
+
{ label: "Palau", code: "PW", phone: "680" },
|
|
169
|
+
{ label: "Palestinian Territory Occupied", code: "PS", phone: "970" },
|
|
170
|
+
{ label: "Panama", code: "PA", phone: "507" },
|
|
171
|
+
{ label: "Papua New Guinea", code: "PG", phone: "675" },
|
|
172
|
+
{ label: "Paraguay", code: "PY", phone: "595" },
|
|
173
|
+
{ label: "Peru", code: "PE", phone: "51" },
|
|
174
|
+
{ label: "Philippines", code: "PH", phone: "63" },
|
|
175
|
+
{ label: "Pitcairn Island", code: "PN", phone: "870" },
|
|
176
|
+
{ label: "Poland", code: "PL", phone: "48" },
|
|
177
|
+
{ label: "Portugal", code: "PT", phone: "351" },
|
|
178
|
+
{ label: "Puerto Rico", code: "PR", phone: "1" },
|
|
179
|
+
{ label: "Qatar", code: "QA", phone: "974" },
|
|
180
|
+
{ label: "Reunion", code: "RE", phone: "262" },
|
|
181
|
+
{ label: "Romania", code: "RO", phone: "40" },
|
|
182
|
+
{ label: "Russia", code: "RU", phone: "7" },
|
|
183
|
+
{ label: "Rwanda", code: "RW", phone: "250" },
|
|
184
|
+
{ label: "Saint Helena", code: "SH", phone: "290" },
|
|
185
|
+
{ label: "Saint Kitts and Nevis", code: "KN", phone: "1" },
|
|
186
|
+
{ label: "Saint Lucia", code: "LC", phone: "1" },
|
|
187
|
+
{ label: "Saint Pierre and Miquelon", code: "PM", phone: "508" },
|
|
188
|
+
{ label: "Saint Vincent and the Grenadines", code: "VC", phone: "1" },
|
|
189
|
+
{ label: "Saint-Barthelemy", code: "BL", phone: "590" },
|
|
190
|
+
{ label: "Saint-Martin (French part)", code: "MF", phone: "590" },
|
|
191
|
+
{ label: "Samoa", code: "WS", phone: "685" },
|
|
192
|
+
{ label: "San Marino", code: "SM", phone: "378" },
|
|
193
|
+
{ label: "Sao Tome and Principe", code: "ST", phone: "239" },
|
|
194
|
+
{ label: "Saudi Arabia", code: "SA", phone: "966" },
|
|
195
|
+
{ label: "Senegal", code: "SN", phone: "221" },
|
|
196
|
+
{ label: "Serbia", code: "RS", phone: "381" },
|
|
197
|
+
{ label: "Seychelles", code: "SC", phone: "248" },
|
|
198
|
+
{ label: "Sierra Leone", code: "SL", phone: "232" },
|
|
199
|
+
{ label: "Singapore", code: "SG", phone: "65" },
|
|
200
|
+
{ label: "Sint Maarten (Dutch part)", code: "SX", phone: "1721" },
|
|
201
|
+
{ label: "Slovakia", code: "SK", phone: "421" },
|
|
202
|
+
{ label: "Slovenia", code: "SI", phone: "386" },
|
|
203
|
+
{ label: "Solomon Islands", code: "SB", phone: "677" },
|
|
204
|
+
{ label: "Somalia", code: "SO", phone: "252" },
|
|
205
|
+
{ label: "South Africa", code: "ZA", phone: "27" },
|
|
206
|
+
{ label: "South Georgia", code: "GS", phone: "500" },
|
|
207
|
+
{ label: "South Korea", code: "KR", phone: "82" },
|
|
208
|
+
{ label: "South Sudan", code: "SS", phone: "211" },
|
|
209
|
+
{ label: "Spain", code: "ES", phone: "34" },
|
|
210
|
+
{ label: "Sri Lanka", code: "LK", phone: "94" },
|
|
211
|
+
{ label: "Sudan", code: "SD", phone: "249" },
|
|
212
|
+
{ label: "Suriname", code: "SR", phone: "597" },
|
|
213
|
+
{ label: "Svalbard and Jan Mayen Islands", code: "SJ", phone: "47" },
|
|
214
|
+
{ label: "Sweden", code: "SE", phone: "46" },
|
|
215
|
+
{ label: "Switzerland", code: "CH", phone: "41" },
|
|
216
|
+
{ label: "Syria", code: "SY", phone: "963" },
|
|
217
|
+
{ label: "Taiwan", code: "TW", phone: "886" },
|
|
218
|
+
{ label: "Tajikistan", code: "TJ", phone: "992" },
|
|
219
|
+
{ label: "Tanzania", code: "TZ", phone: "255" },
|
|
220
|
+
{ label: "Thailand", code: "TH", phone: "66" },
|
|
221
|
+
{ label: "The Bahamas", code: "BS", phone: "1" },
|
|
222
|
+
{ label: "The Gambia", code: "GM", phone: "220" },
|
|
223
|
+
{ label: "Timor-Leste", code: "TL", phone: "670" },
|
|
224
|
+
{ label: "Togo", code: "TG", phone: "228" },
|
|
225
|
+
{ label: "Tokelau", code: "TK", phone: "690" },
|
|
226
|
+
{ label: "Tonga", code: "TO", phone: "676" },
|
|
227
|
+
{ label: "Trinidad and Tobago", code: "TT", phone: "1" },
|
|
228
|
+
{ label: "Tunisia", code: "TN", phone: "216" },
|
|
229
|
+
{ label: "Turkey", code: "TR", phone: "90" },
|
|
230
|
+
{ label: "Turkmenistan", code: "TM", phone: "993" },
|
|
231
|
+
{ label: "Turks and Caicos Islands", code: "TC", phone: "1" },
|
|
232
|
+
{ label: "Tuvalu", code: "TV", phone: "688" },
|
|
233
|
+
{ label: "Uganda", code: "UG", phone: "256" },
|
|
234
|
+
{ label: "Ukraine", code: "UA", phone: "380" },
|
|
235
|
+
{ label: "United Arab Emirates", code: "AE", phone: "971" },
|
|
236
|
+
{ label: "United Kingdom", code: "GB", phone: "44" },
|
|
237
|
+
{ label: "United States", code: "US", phone: "1" },
|
|
238
|
+
{ label: "United States Minor Outlying Islands", code: "UM", phone: "1" },
|
|
239
|
+
{ label: "Uruguay", code: "UY", phone: "598" },
|
|
240
|
+
{ label: "Uzbekistan", code: "UZ", phone: "998" },
|
|
241
|
+
{ label: "Vanuatu", code: "VU", phone: "678" },
|
|
242
|
+
{ label: "Vatican City State (Holy See)", code: "VA", phone: "379" },
|
|
243
|
+
{ label: "Venezuela", code: "VE", phone: "58" },
|
|
244
|
+
{ label: "Vietnam", code: "VN", phone: "84" },
|
|
245
|
+
{ label: "Virgin Islands (British)", code: "VG", phone: "1" },
|
|
246
|
+
{ label: "Virgin Islands (US)", code: "VI", phone: "1" },
|
|
247
|
+
{ label: "Wallis and Futuna Islands", code: "WF", phone: "681" },
|
|
248
|
+
{ label: "Western Sahara", code: "EH", phone: "212" },
|
|
249
|
+
{ label: "Yemen", code: "YE", phone: "967" },
|
|
250
|
+
{ label: "Zambia", code: "ZM", phone: "260" },
|
|
251
|
+
{ label: "Zimbabwe", code: "ZW", phone: "263" },
|
|
252
|
+
];
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
export const mockData = {
|
|
2
|
+
data: [
|
|
3
|
+
{
|
|
4
|
+
id: 1,
|
|
5
|
+
first_name: "John",
|
|
6
|
+
last_name: "Doe",
|
|
7
|
+
email: "john@example.com",
|
|
8
|
+
status: true,
|
|
9
|
+
is_active: true,
|
|
10
|
+
role: "admin",
|
|
11
|
+
phone: "+12025550123", // 🇺🇸 USA
|
|
12
|
+
createdAt: "2024-01-01",
|
|
13
|
+
bio: "Senior administrator with full system access",
|
|
14
|
+
image: "https://i.pravatar.cc/150?img=11",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: 2,
|
|
18
|
+
first_name: "Jane",
|
|
19
|
+
last_name: "Smith",
|
|
20
|
+
email: "jane@example.com",
|
|
21
|
+
status: false,
|
|
22
|
+
is_active: false,
|
|
23
|
+
role: "moderator",
|
|
24
|
+
phone: "+447700900123", // 🇬🇧 UK
|
|
25
|
+
createdAt: "2024-01-02",
|
|
26
|
+
bio: "HR moderator with user management permissions",
|
|
27
|
+
image: "",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: 3,
|
|
31
|
+
first_name: "Bob",
|
|
32
|
+
last_name: "Johnson",
|
|
33
|
+
email: "bob@example.com",
|
|
34
|
+
status: false,
|
|
35
|
+
is_active: false,
|
|
36
|
+
role: "editor",
|
|
37
|
+
phone: "+61412345678", // 🇦🇺 Australia
|
|
38
|
+
createdAt: "2024-01-03",
|
|
39
|
+
bio: "Sales team editor with content management access",
|
|
40
|
+
image: "https://i.pravatar.cc/150?img=3",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 4,
|
|
44
|
+
first_name: "Alice",
|
|
45
|
+
last_name: "Williams",
|
|
46
|
+
email: "alice@example.com",
|
|
47
|
+
status: false,
|
|
48
|
+
is_active: false,
|
|
49
|
+
role: "admin",
|
|
50
|
+
phone: "+919876543210", // 🇮🇳 India
|
|
51
|
+
createdAt: "2024-01-04",
|
|
52
|
+
bio: "Senior administrator with full system access",
|
|
53
|
+
image: "",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 5,
|
|
57
|
+
first_name: "Charlie",
|
|
58
|
+
last_name: "Brown",
|
|
59
|
+
email: "charlie@example.com",
|
|
60
|
+
status: false,
|
|
61
|
+
is_active: false,
|
|
62
|
+
role: "moderator",
|
|
63
|
+
phone: "+819012345678", // 🇯🇵 Japan
|
|
64
|
+
createdAt: "2024-01-05",
|
|
65
|
+
bio: "HR moderator with user management permissions",
|
|
66
|
+
image: "https://i.pravatar.cc/150?img=5",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 6,
|
|
70
|
+
first_name: "Diana",
|
|
71
|
+
last_name: "Prince",
|
|
72
|
+
email: "diana@example.com",
|
|
73
|
+
status: false,
|
|
74
|
+
is_active: false,
|
|
75
|
+
role: "viewer",
|
|
76
|
+
phone: "+4915123456789", // 🇩🇪 Germany
|
|
77
|
+
createdAt: "2024-01-06",
|
|
78
|
+
bio: "Sales team viewer with read-only access",
|
|
79
|
+
image: "",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: 7,
|
|
83
|
+
first_name: "Ethan",
|
|
84
|
+
last_name: "Hunt",
|
|
85
|
+
email: "ethan@example.com",
|
|
86
|
+
status: false,
|
|
87
|
+
is_active: false,
|
|
88
|
+
role: "admin",
|
|
89
|
+
phone: "+33612345678", // 🇫🇷 France
|
|
90
|
+
createdAt: "2024-01-07",
|
|
91
|
+
bio: "Senior administrator with full system access",
|
|
92
|
+
image: "https://i.pravatar.cc/150?img=7",
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: 8,
|
|
96
|
+
first_name: "Fiona",
|
|
97
|
+
last_name: "Green",
|
|
98
|
+
email: "fiona@example.com",
|
|
99
|
+
status: true,
|
|
100
|
+
is_active: true,
|
|
101
|
+
role: "moderator",
|
|
102
|
+
phone: "+971501234567", // 🇦🇪 UAE
|
|
103
|
+
createdAt: "2024-01-08",
|
|
104
|
+
bio: "HR moderator with user management permissions",
|
|
105
|
+
image: "",
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: 9,
|
|
109
|
+
first_name: "George",
|
|
110
|
+
last_name: "Miller",
|
|
111
|
+
email: "george@example.com",
|
|
112
|
+
status: false,
|
|
113
|
+
is_active: false,
|
|
114
|
+
role: "viewer",
|
|
115
|
+
phone: "+923001234567", // 🇵🇰 Pakistan
|
|
116
|
+
createdAt: "2024-01-09",
|
|
117
|
+
bio: "Sales team viewer with read-only access",
|
|
118
|
+
image: "https://i.pravatar.cc/150?img=9",
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
|
|
122
|
+
pagination: {
|
|
123
|
+
current_page: 1,
|
|
124
|
+
has_next_page: true,
|
|
125
|
+
has_previous_page: false,
|
|
126
|
+
records_per_page: 50,
|
|
127
|
+
total_pages: 6,
|
|
128
|
+
total_records: 270,
|
|
129
|
+
},
|
|
130
|
+
};
|
package/src/index.css
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
|
|
2
|
+
|
|
3
|
+
/* --- Tailwind core layers (must come first) --- */
|
|
4
|
+
@tailwind base;
|
|
5
|
+
@tailwind components;
|
|
6
|
+
@tailwind utilities;
|
|
7
|
+
|
|
8
|
+
/* --- Primary Color System --- */
|
|
9
|
+
:root {
|
|
10
|
+
--primary-50: #eff6ff;
|
|
11
|
+
--primary-100: #dbeafe;
|
|
12
|
+
--primary-200: #bfdbfe;
|
|
13
|
+
--primary-300: #93c5fd;
|
|
14
|
+
--primary-400: #60a5fa;
|
|
15
|
+
--primary-500: #3b82f6;
|
|
16
|
+
--primary-600: #2563eb;
|
|
17
|
+
--primary-700: #1d4ed8;
|
|
18
|
+
--primary-800: #1e40af;
|
|
19
|
+
--primary-900: #1e3a8a;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.primary-bg {
|
|
23
|
+
background-color: var(--primary-500);
|
|
24
|
+
}
|
|
25
|
+
.primary-bg-light {
|
|
26
|
+
background-color: var(--primary-100);
|
|
27
|
+
}
|
|
28
|
+
.primary-bg-dark {
|
|
29
|
+
background-color: var(--primary-700);
|
|
30
|
+
}
|
|
31
|
+
.primary-text {
|
|
32
|
+
color: var(--primary-600);
|
|
33
|
+
}
|
|
34
|
+
.primary-border {
|
|
35
|
+
border-color: var(--primary-300);
|
|
36
|
+
}
|
|
37
|
+
.primary-hover:hover {
|
|
38
|
+
background-color: var(--primary-600);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* --- Custom CSS variables --- */
|
|
42
|
+
:root {
|
|
43
|
+
--foreground-rgb: 0, 0, 0;
|
|
44
|
+
--background-start-rgb: 214, 219, 220;
|
|
45
|
+
--background-end-rgb: 255, 255, 255;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (prefers-color-scheme: dark) {
|
|
49
|
+
:root {
|
|
50
|
+
--foreground-rgb: 255, 255, 255;
|
|
51
|
+
--background-start-rgb: 0, 0, 0;
|
|
52
|
+
--background-end-rgb: 0, 0, 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* --- Custom Tailwind base layer --- */
|
|
57
|
+
@layer base {
|
|
58
|
+
:root {
|
|
59
|
+
--background: 0 0% 100%;
|
|
60
|
+
--foreground: 0 0% 3.9%;
|
|
61
|
+
--card: 0 0% 100%;
|
|
62
|
+
--card-foreground: 0 0% 3.9%;
|
|
63
|
+
--popover: 0 0% 100%;
|
|
64
|
+
--popover-foreground: 0 0% 3.9%;
|
|
65
|
+
--primary: 0 0% 9%;
|
|
66
|
+
--primary-foreground: 0 0% 98%;
|
|
67
|
+
--secondary: 0 0% 96.1%;
|
|
68
|
+
--secondary-foreground: 0 0% 9%;
|
|
69
|
+
--muted: 0 0% 96.1%;
|
|
70
|
+
--muted-foreground: 0 0% 45.1%;
|
|
71
|
+
--accent: 0 0% 96.1%;
|
|
72
|
+
--accent-foreground: 0 0% 9%;
|
|
73
|
+
--destructive: 0 84.2% 60.2%;
|
|
74
|
+
--destructive-foreground: 0 0% 98%;
|
|
75
|
+
--border: 0 0% 89.8%;
|
|
76
|
+
--input: 0 0% 89.8%;
|
|
77
|
+
--ring: 0 0% 3.9%;
|
|
78
|
+
--chart-1: 12 76% 61%;
|
|
79
|
+
--chart-2: 173 58% 39%;
|
|
80
|
+
--chart-3: 197 37% 24%;
|
|
81
|
+
--chart-4: 43 74% 66%;
|
|
82
|
+
--chart-5: 27 87% 67%;
|
|
83
|
+
--radius: 0.5rem;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.dark {
|
|
87
|
+
--background: 0 0% 3.9%;
|
|
88
|
+
--foreground: 0 0% 98%;
|
|
89
|
+
--card: 220 25% 17%;
|
|
90
|
+
--card-foreground: 0 0% 98%;
|
|
91
|
+
--popover: 0 0% 3.9%;
|
|
92
|
+
--popover-foreground: 0 0% 98%;
|
|
93
|
+
--primary: 0 0% 98%;
|
|
94
|
+
--primary-foreground: 0 0% 9%;
|
|
95
|
+
--secondary: 0 0% 14.9%;
|
|
96
|
+
--secondary-foreground: 0 0% 98%;
|
|
97
|
+
--muted: 220 21% 23%;
|
|
98
|
+
--muted-foreground: 0 0% 63.9%;
|
|
99
|
+
--accent: 0 0% 14.9%;
|
|
100
|
+
--accent-foreground: 0 0% 98%;
|
|
101
|
+
--destructive: 0 62.8% 30.6%;
|
|
102
|
+
--destructive-foreground: 0 0% 98%;
|
|
103
|
+
--border: 0 0% 14.9%;
|
|
104
|
+
--input: 0 0% 14.9%;
|
|
105
|
+
--ring: 0 0% 83.1%;
|
|
106
|
+
--chart-1: 220 70% 50%;
|
|
107
|
+
--chart-2: 160 60% 45%;
|
|
108
|
+
--chart-3: 30 80% 55%;
|
|
109
|
+
--chart-4: 280 65% 60%;
|
|
110
|
+
--chart-5: 340 75% 55%;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
* {
|
|
114
|
+
@apply border-border;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
body {
|
|
118
|
+
@apply bg-background text-foreground;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* --- Global styles (safe outside Tailwind layers) --- */
|
|
123
|
+
html,
|
|
124
|
+
body {
|
|
125
|
+
height: 100%;
|
|
126
|
+
/* overflow: hidden; */
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.bg-login-gradient {
|
|
130
|
+
@apply min-h-screen bg-gradient-to-br from-purple-50 via-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Scrollbar styling */
|
|
134
|
+
:root {
|
|
135
|
+
--scrollbar-thumb: #d1d5db;
|
|
136
|
+
--scrollbar-thumb-hover: #9ca3af;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.dark {
|
|
140
|
+
--scrollbar-thumb: #4b5563;
|
|
141
|
+
--scrollbar-thumb-hover: #6b7280;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
* {
|
|
145
|
+
scrollbar-width: thin;
|
|
146
|
+
scrollbar-color: var(--scrollbar-thumb) transparent;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
*::-webkit-scrollbar {
|
|
150
|
+
width: 6px;
|
|
151
|
+
height: 6px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
*::-webkit-scrollbar-track {
|
|
155
|
+
background: transparent;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
*::-webkit-scrollbar-thumb {
|
|
159
|
+
background-color: var(--scrollbar-thumb);
|
|
160
|
+
border-radius: 3px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
*::-webkit-scrollbar-thumb:hover {
|
|
164
|
+
background-color: var(--scrollbar-thumb-hover);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.tox.tox-tinymce .tox-edit-area::before {
|
|
168
|
+
border: 0 !important;
|
|
169
|
+
box-shadow: none !important;
|
|
170
|
+
}
|