@ews-admin/global-design-system 1.1.2 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/SearchAutocomplete/SearchAutocomplete.d.ts +1 -1
- package/dist/components/SearchAutocomplete/SearchAutocomplete.d.ts.map +1 -1
- package/dist/icons/DoctorIcon.d.ts +4 -0
- package/dist/icons/DoctorIcon.d.ts.map +1 -0
- package/dist/icons/Icon.d.ts +18 -0
- package/dist/icons/Icon.d.ts.map +1 -1
- package/dist/icons/PatientIcon.d.ts +4 -0
- package/dist/icons/PatientIcon.d.ts.map +1 -0
- package/dist/icons/UserIcon.d.ts +4 -0
- package/dist/icons/UserIcon.d.ts.map +1 -0
- package/dist/icons/index.d.ts +4 -1
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/index.css +3 -2
- package/dist/index.d.ts +27 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.css +3 -2
- package/dist/index.esm.js +69 -22
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +71 -21
- package/dist/index.js.map +1 -1
- package/dist/theme/ThemeProvider.d.ts.map +1 -1
- package/package.json +7 -3
- package/src/components/SearchAutocomplete/SearchAutocomplete.tsx +9 -9
- package/src/icons/DoctorIcon.tsx +14 -0
- package/src/icons/Icon.tsx +20 -0
- package/src/icons/PatientIcon.tsx +12 -0
- package/src/icons/UserIcon.tsx +12 -0
- package/src/icons/index.ts +6 -1
- package/src/index.ts +10 -2
- package/src/styles/index.css +162 -8
- package/src/styles/theme-variables.css +47 -0
- package/src/theme/ThemeProvider.tsx +4 -2
- package/tailwind.preset.js +166 -0
package/dist/index.js
CHANGED
|
@@ -207,11 +207,11 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
207
207
|
*/
|
|
208
208
|
|
|
209
209
|
|
|
210
|
-
const __iconNode$
|
|
210
|
+
const __iconNode$b = [
|
|
211
211
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
212
212
|
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
213
213
|
];
|
|
214
|
-
const ArrowRight = createLucideIcon("arrow-right", __iconNode$
|
|
214
|
+
const ArrowRight = createLucideIcon("arrow-right", __iconNode$b);
|
|
215
215
|
|
|
216
216
|
/**
|
|
217
217
|
* @license lucide-react v0.544.0 - ISC
|
|
@@ -221,8 +221,8 @@ const ArrowRight = createLucideIcon("arrow-right", __iconNode$9);
|
|
|
221
221
|
*/
|
|
222
222
|
|
|
223
223
|
|
|
224
|
-
const __iconNode$
|
|
225
|
-
const Check = createLucideIcon("check", __iconNode$
|
|
224
|
+
const __iconNode$a = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
225
|
+
const Check = createLucideIcon("check", __iconNode$a);
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
228
|
* @license lucide-react v0.544.0 - ISC
|
|
@@ -232,12 +232,12 @@ const Check = createLucideIcon("check", __iconNode$8);
|
|
|
232
232
|
*/
|
|
233
233
|
|
|
234
234
|
|
|
235
|
-
const __iconNode$
|
|
235
|
+
const __iconNode$9 = [
|
|
236
236
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
237
237
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
238
238
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
239
239
|
];
|
|
240
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$
|
|
240
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$9);
|
|
241
241
|
|
|
242
242
|
/**
|
|
243
243
|
* @license lucide-react v0.544.0 - ISC
|
|
@@ -247,11 +247,11 @@ const CircleAlert = createLucideIcon("circle-alert", __iconNode$7);
|
|
|
247
247
|
*/
|
|
248
248
|
|
|
249
249
|
|
|
250
|
-
const __iconNode$
|
|
250
|
+
const __iconNode$8 = [
|
|
251
251
|
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
252
252
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
253
253
|
];
|
|
254
|
-
const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$
|
|
254
|
+
const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$8);
|
|
255
255
|
|
|
256
256
|
/**
|
|
257
257
|
* @license lucide-react v0.544.0 - ISC
|
|
@@ -261,7 +261,7 @@ const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$6);
|
|
|
261
261
|
*/
|
|
262
262
|
|
|
263
263
|
|
|
264
|
-
const __iconNode$
|
|
264
|
+
const __iconNode$7 = [
|
|
265
265
|
[
|
|
266
266
|
"path",
|
|
267
267
|
{
|
|
@@ -279,7 +279,7 @@ const __iconNode$5 = [
|
|
|
279
279
|
],
|
|
280
280
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
281
281
|
];
|
|
282
|
-
const EyeOff = createLucideIcon("eye-off", __iconNode$
|
|
282
|
+
const EyeOff = createLucideIcon("eye-off", __iconNode$7);
|
|
283
283
|
|
|
284
284
|
/**
|
|
285
285
|
* @license lucide-react v0.544.0 - ISC
|
|
@@ -289,7 +289,7 @@ const EyeOff = createLucideIcon("eye-off", __iconNode$5);
|
|
|
289
289
|
*/
|
|
290
290
|
|
|
291
291
|
|
|
292
|
-
const __iconNode$
|
|
292
|
+
const __iconNode$6 = [
|
|
293
293
|
[
|
|
294
294
|
"path",
|
|
295
295
|
{
|
|
@@ -299,7 +299,7 @@ const __iconNode$4 = [
|
|
|
299
299
|
],
|
|
300
300
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
301
301
|
];
|
|
302
|
-
const Eye = createLucideIcon("eye", __iconNode$
|
|
302
|
+
const Eye = createLucideIcon("eye", __iconNode$6);
|
|
303
303
|
|
|
304
304
|
/**
|
|
305
305
|
* @license lucide-react v0.544.0 - ISC
|
|
@@ -309,11 +309,30 @@ const Eye = createLucideIcon("eye", __iconNode$4);
|
|
|
309
309
|
*/
|
|
310
310
|
|
|
311
311
|
|
|
312
|
-
const __iconNode$
|
|
312
|
+
const __iconNode$5 = [
|
|
313
|
+
[
|
|
314
|
+
"path",
|
|
315
|
+
{
|
|
316
|
+
d: "M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",
|
|
317
|
+
key: "mvr1a0"
|
|
318
|
+
}
|
|
319
|
+
]
|
|
320
|
+
];
|
|
321
|
+
const Heart = createLucideIcon("heart", __iconNode$5);
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* @license lucide-react v0.544.0 - ISC
|
|
325
|
+
*
|
|
326
|
+
* This source code is licensed under the ISC license.
|
|
327
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
328
|
+
*/
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
const __iconNode$4 = [
|
|
313
332
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
314
333
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
315
334
|
];
|
|
316
|
-
const Search = createLucideIcon("search", __iconNode$
|
|
335
|
+
const Search = createLucideIcon("search", __iconNode$4);
|
|
317
336
|
|
|
318
337
|
/**
|
|
319
338
|
* @license lucide-react v0.544.0 - ISC
|
|
@@ -323,14 +342,14 @@ const Search = createLucideIcon("search", __iconNode$3);
|
|
|
323
342
|
*/
|
|
324
343
|
|
|
325
344
|
|
|
326
|
-
const __iconNode$
|
|
345
|
+
const __iconNode$3 = [
|
|
327
346
|
["path", { d: "M11 2v2", key: "1539x4" }],
|
|
328
347
|
["path", { d: "M5 2v2", key: "1yf1q8" }],
|
|
329
348
|
["path", { d: "M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1", key: "rb5t3r" }],
|
|
330
349
|
["path", { d: "M8 15a6 6 0 0 0 12 0v-3", key: "x18d4x" }],
|
|
331
350
|
["circle", { cx: "20", cy: "10", r: "2", key: "ts1r5v" }]
|
|
332
351
|
];
|
|
333
|
-
const Stethoscope = createLucideIcon("stethoscope", __iconNode$
|
|
352
|
+
const Stethoscope = createLucideIcon("stethoscope", __iconNode$3);
|
|
334
353
|
|
|
335
354
|
/**
|
|
336
355
|
* @license lucide-react v0.544.0 - ISC
|
|
@@ -340,7 +359,7 @@ const Stethoscope = createLucideIcon("stethoscope", __iconNode$2);
|
|
|
340
359
|
*/
|
|
341
360
|
|
|
342
361
|
|
|
343
|
-
const __iconNode$
|
|
362
|
+
const __iconNode$2 = [
|
|
344
363
|
[
|
|
345
364
|
"path",
|
|
346
365
|
{
|
|
@@ -351,7 +370,21 @@ const __iconNode$1 = [
|
|
|
351
370
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
352
371
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
353
372
|
];
|
|
354
|
-
const TriangleAlert = createLucideIcon("triangle-alert", __iconNode$
|
|
373
|
+
const TriangleAlert = createLucideIcon("triangle-alert", __iconNode$2);
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* @license lucide-react v0.544.0 - ISC
|
|
377
|
+
*
|
|
378
|
+
* This source code is licensed under the ISC license.
|
|
379
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
+
*/
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
const __iconNode$1 = [
|
|
384
|
+
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
385
|
+
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
386
|
+
];
|
|
387
|
+
const User = createLucideIcon("user", __iconNode$1);
|
|
355
388
|
|
|
356
389
|
/**
|
|
357
390
|
* @license lucide-react v0.544.0 - ISC
|
|
@@ -379,6 +412,18 @@ const Icon = React.forwardRef(({ size = "md", icon: IconComponent, className, ..
|
|
|
379
412
|
});
|
|
380
413
|
Icon.displayName = "Icon";
|
|
381
414
|
|
|
415
|
+
const DoctorIcon = ({ size = 24, color = "currentColor", className = "", ...props }) => {
|
|
416
|
+
return (jsxRuntime.jsx(Stethoscope, { size: size, color: color, className: className, ...props }));
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
const PatientIcon = ({ size = 24, color = "currentColor", className = "", ...props }) => {
|
|
420
|
+
return jsxRuntime.jsx(Heart, { size: size, color: color, className: className, ...props });
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
const UserIcon = ({ size = 24, color = "currentColor", className = "", ...props }) => {
|
|
424
|
+
return jsxRuntime.jsx(User, { size: size, color: color, className: className, ...props });
|
|
425
|
+
};
|
|
426
|
+
|
|
382
427
|
const Input = React.forwardRef(({ className, variant = "default", size = "md", label, helperText, error, leftIcon, rightIcon, fullWidth = false, showPasswordToggle = false, id, type = "text", ...props }, ref) => {
|
|
383
428
|
const inputId = id || `input-${Math.random().toString(36).substr(2, 9)}`;
|
|
384
429
|
const hasError = Boolean(error);
|
|
@@ -575,14 +620,14 @@ function SearchAutocomplete({ onSelect, selectedId, searchFunction, getEntityByI
|
|
|
575
620
|
className: "w-10 h-10 text-neutral-400 mr-3",
|
|
576
621
|
})), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { className: "font-medium text-neutral-900", children: getDisplayValue(selectedEntity) }), getSecondaryText && getSecondaryText(selectedEntity) && (jsxRuntime.jsx("div", { className: "text-sm text-neutral-500", children: getSecondaryText(selectedEntity) }))] })] }), jsxRuntime.jsx("button", { type: "button", onClick: handleClearSelection, className: "transition-colors text-neutral-400 hover:text-neutral-600", disabled: disabled, children: jsxRuntime.jsx(X, { className: "w-4 h-4" }) })] }) })), showDropdown && entities?.length > 0 && (jsxRuntime.jsx("div", { className: "overflow-auto absolute z-10 mt-1 w-full max-h-60 bg-white rounded-md shadow-lg", children: jsxRuntime.jsx("ul", { className: "py-1", children: entities.map((entity) => (jsxRuntime.jsx("li", { className: "px-4 py-2 cursor-pointer hover:bg-gray-100", onClick: () => handleEntitySelect(entity), children: jsxRuntime.jsxs("div", { className: "flex items-center", children: [React.createElement(icon, {
|
|
577
622
|
className: "w-4 h-4 text-gray-400",
|
|
578
|
-
}), jsxRuntime.jsxs("div", { className: "ml-2", children: [jsxRuntime.jsx("div", { className: "font-medium", children: getDisplayValue(entity) }), getSecondaryText && getSecondaryText(entity) && (jsxRuntime.jsx("div", { className: "text-xs text-gray-500", children: getSecondaryText(entity) }))] })] }) }, entity.id))) }) })), showDropdown && searchError && (jsxRuntime.jsx("div", { className: "absolute z-10 p-4 mt-1 w-full text-center text-red-600 bg-white rounded-md
|
|
623
|
+
}), jsxRuntime.jsxs("div", { className: "ml-2", children: [jsxRuntime.jsx("div", { className: "font-medium", children: getDisplayValue(entity) }), getSecondaryText && getSecondaryText(entity) && (jsxRuntime.jsx("div", { className: "text-xs text-gray-500", children: getSecondaryText(entity) }))] })] }) }, entity.id))) }) })), showDropdown && searchError && (jsxRuntime.jsx("div", { className: "absolute z-10 p-4 mt-1 w-full text-center text-red-600 bg-white rounded-md border border-red-200 shadow-lg", children: jsxRuntime.jsxs("div", { className: "flex justify-center items-center", children: [jsxRuntime.jsx(X, { className: "mr-2 w-4 h-4" }), "Error: ", searchError] }) })), showDropdown && error && !searchError && (jsxRuntime.jsx("div", { className: "absolute z-10 p-4 mt-1 w-full text-center text-red-600 bg-white rounded-md border border-red-200 shadow-lg", children: jsxRuntime.jsxs("div", { className: "flex justify-center items-center", children: [jsxRuntime.jsx(X, { className: "mr-2 w-4 h-4" }), error] }) })), showDropdown &&
|
|
579
624
|
debouncedSearchTerm &&
|
|
580
625
|
entities?.length === 0 &&
|
|
581
626
|
!isLoading &&
|
|
582
627
|
!searchError &&
|
|
583
628
|
!error && (jsxRuntime.jsx("div", { className: "absolute z-10 p-4 mt-1 w-full text-center text-gray-500 bg-white rounded-md shadow-lg", children: debouncedSearchTerm.length < minSearchLength
|
|
584
629
|
? `Type at least ${minSearchLength} characters to search`
|
|
585
|
-
: "No results found. Try a different search term." })), isLoading && showDropdown && (jsxRuntime.jsx("div", { className: "absolute z-10 p-4 mt-1 w-full text-center text-gray-500 bg-white rounded-md shadow-lg", children: jsxRuntime.jsxs("div", { className: "flex
|
|
630
|
+
: "No results found. Try a different search term." })), isLoading && showDropdown && (jsxRuntime.jsx("div", { className: "absolute z-10 p-4 mt-1 w-full text-center text-gray-500 bg-white rounded-md shadow-lg", children: jsxRuntime.jsxs("div", { className: "flex justify-center items-center", children: [jsxRuntime.jsx("div", { className: "mr-2 w-4 h-4 rounded-full border-b-2 animate-spin border-ews-primary" }), "Loading..."] }) }))] }));
|
|
586
631
|
}
|
|
587
632
|
|
|
588
633
|
function MultiSearchAutocomplete({ items, selectedItems, onSelectionChange, onSearch, getEntityById, getPrimaryText, getSecondaryText, placeholder, disabled = false, loading = false, multiple = true, className, renderSelectedItem, renderListItem, keepOpenOnSelect = true, error, minSearchLength = 2, debounceTime = 300, }) {
|
|
@@ -841,8 +886,10 @@ const ThemeProvider = ({ children, defaultTheme = "PROMED", }) => {
|
|
|
841
886
|
// Update theme config when theme changes
|
|
842
887
|
React.useEffect(() => {
|
|
843
888
|
setThemeConfig(THEMES[theme]);
|
|
844
|
-
// Update CSS
|
|
889
|
+
// Update data-theme attribute for CSS variable switching
|
|
845
890
|
const root = document.documentElement;
|
|
891
|
+
root.setAttribute("data-theme", theme);
|
|
892
|
+
// Also update CSS custom properties for backward compatibility
|
|
846
893
|
const colors = THEMES[theme].colors;
|
|
847
894
|
root.style.setProperty("--ews-primary", colors.primary);
|
|
848
895
|
root.style.setProperty("--ews-primary-hover", colors.primaryHover);
|
|
@@ -948,16 +995,19 @@ const SpecialtySearchAutocomplete = ({ selectedSpecialties = [], onSpecialtiesCh
|
|
|
948
995
|
exports.ArrowRight = ArrowRight;
|
|
949
996
|
exports.Button = Button;
|
|
950
997
|
exports.Check = Check;
|
|
998
|
+
exports.DoctorIcon = DoctorIcon;
|
|
951
999
|
exports.Icon = Icon;
|
|
952
1000
|
exports.Input = Input;
|
|
953
1001
|
exports.Logo = Logo;
|
|
954
1002
|
exports.Modal = Modal;
|
|
955
1003
|
exports.MultiSearchAutocomplete = MultiSearchAutocomplete;
|
|
1004
|
+
exports.PatientIcon = PatientIcon;
|
|
956
1005
|
exports.Search = Search;
|
|
957
1006
|
exports.SearchAutocomplete = SearchAutocomplete;
|
|
958
1007
|
exports.SpecialtySearchAutocomplete = SpecialtySearchAutocomplete;
|
|
959
1008
|
exports.ThemeProvider = ThemeProvider;
|
|
960
1009
|
exports.ThemeToggle = ThemeToggle;
|
|
1010
|
+
exports.UserIcon = UserIcon;
|
|
961
1011
|
exports.cn = cn;
|
|
962
1012
|
exports.debounce = debounce;
|
|
963
1013
|
exports.formatCurrency = formatCurrency;
|