@almadar/ui 5.1.2 → 5.1.4

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.
@@ -849,53 +849,57 @@ function warnFallback(name, family) {
849
849
  );
850
850
  }
851
851
  }
852
- function makeLucideAdapter(name) {
852
+ function makeLucideAdapter(name, isFallback = false) {
853
853
  const LucideComp = resolveLucide(name);
854
- const Adapter = (props) => /* @__PURE__ */ jsx(
855
- LucideComp,
856
- {
857
- className: props.className,
858
- strokeWidth: props.strokeWidth,
859
- style: props.style,
860
- size: props.size
861
- }
862
- );
863
- Adapter.displayName = `Lucide.${name}`;
854
+ const Adapter = (props) => {
855
+ const stroke = props.strokeWidth ?? (isFallback ? 2 : void 0);
856
+ const style = isFallback ? { ...props.style ?? {}, strokeWidth: stroke ?? 2 } : props.style;
857
+ return /* @__PURE__ */ jsx(
858
+ LucideComp,
859
+ {
860
+ className: props.className,
861
+ strokeWidth: stroke,
862
+ style,
863
+ size: props.size
864
+ }
865
+ );
866
+ };
867
+ Adapter.displayName = `Lucide.${name}${isFallback ? ".fallback" : ""}`;
864
868
  return Adapter;
865
869
  }
866
870
  function resolveIconForFamily(name, family) {
867
871
  switch (family) {
868
872
  case "lucide":
869
- return makeLucideAdapter(name);
873
+ return makeLucideAdapter(name, false);
870
874
  case "phosphor-outline": {
871
875
  const p2 = resolvePhosphor(name, "regular");
872
876
  if (p2) return p2;
873
877
  warnFallback(name, family);
874
- return makeLucideAdapter(name);
878
+ return makeLucideAdapter(name, true);
875
879
  }
876
880
  case "phosphor-fill": {
877
881
  const p2 = resolvePhosphor(name, "fill");
878
882
  if (p2) return p2;
879
883
  warnFallback(name, family);
880
- return makeLucideAdapter(name);
884
+ return makeLucideAdapter(name, true);
881
885
  }
882
886
  case "phosphor-duotone": {
883
887
  const p2 = resolvePhosphor(name, "duotone");
884
888
  if (p2) return p2;
885
889
  warnFallback(name, family);
886
- return makeLucideAdapter(name);
890
+ return makeLucideAdapter(name, true);
887
891
  }
888
892
  case "tabler": {
889
893
  const t = resolveTabler(name);
890
894
  if (t) return t;
891
895
  warnFallback(name, family);
892
- return makeLucideAdapter(name);
896
+ return makeLucideAdapter(name, true);
893
897
  }
894
898
  case "fa-solid": {
895
899
  const f3 = resolveFa(name);
896
900
  if (f3) return f3;
897
901
  warnFallback(name, family);
898
- return makeLucideAdapter(name);
902
+ return makeLucideAdapter(name, true);
899
903
  }
900
904
  }
901
905
  }
@@ -1033,7 +1037,11 @@ var init_iconFamily = __esm({
1033
1037
  info: "InfoCircle"
1034
1038
  };
1035
1039
  faAliases = {
1036
- // lucide name → fa-solid suffix (after the `Fa` prefix)
1040
+ // lucide name → fa-solid suffix (after the `Fa` prefix).
1041
+ // react-icons/fa ships FontAwesome 5 — names like `FaFileText` don't exist
1042
+ // (FA renamed to `FaFileAlt`). When you see a console.warn from
1043
+ // [iconFamily] about an unmapped lucide name in this family, add the
1044
+ // closest FA5 sibling here so the fallback stays in-family.
1037
1045
  search: "Search",
1038
1046
  close: "Times",
1039
1047
  x: "Times",
@@ -1085,7 +1093,93 @@ var init_iconFamily = __esm({
1085
1093
  more: "EllipsisH",
1086
1094
  "more-vertical": "EllipsisV",
1087
1095
  info: "InfoCircle",
1088
- warning: "ExclamationTriangle"
1096
+ warning: "ExclamationTriangle",
1097
+ // Files (FA renamed FileText → FileAlt)
1098
+ file: "File",
1099
+ "file-text": "FileAlt",
1100
+ "file-plus": "FileMedical",
1101
+ "file-minus": "FileExcel",
1102
+ "file-check": "FileSignature",
1103
+ document: "FileAlt",
1104
+ // Charts (lucide BarChart2 / BarChart3 → FA ChartBar)
1105
+ "bar-chart": "ChartBar",
1106
+ "bar-chart-2": "ChartBar",
1107
+ "bar-chart-3": "ChartBar",
1108
+ "line-chart": "ChartLine",
1109
+ "pie-chart": "ChartPie",
1110
+ activity: "ChartLine",
1111
+ "trending-up": "ChartLine",
1112
+ "trending-down": "ChartLine",
1113
+ // Messages (lucide MessageCircle/MessageSquare → FA CommentDots/CommentAlt)
1114
+ message: "Comment",
1115
+ "message-circle": "CommentDots",
1116
+ "message-square": "CommentAlt",
1117
+ "messages-square": "Comments",
1118
+ comment: "Comment",
1119
+ comments: "Comments",
1120
+ inbox: "Inbox",
1121
+ // Support / help
1122
+ "life-buoy": "LifeRing",
1123
+ lifebuoy: "LifeRing",
1124
+ // Project / kanban (FA has no kanban; closest semantic is Tasks/Columns)
1125
+ kanban: "Tasks",
1126
+ columns: "Columns",
1127
+ rows: "Bars",
1128
+ layout: "ThLarge",
1129
+ grid: "Th",
1130
+ list: "List",
1131
+ table: "Table",
1132
+ // Storage / folders
1133
+ folder: "Folder",
1134
+ "folder-open": "FolderOpen",
1135
+ archive: "Archive",
1136
+ bookmark: "Bookmark",
1137
+ briefcase: "Briefcase",
1138
+ package: "Box",
1139
+ box: "Box",
1140
+ // Map / location
1141
+ map: "Map",
1142
+ "map-pin": "MapMarkerAlt",
1143
+ navigation: "LocationArrow",
1144
+ compass: "Compass",
1145
+ globe: "Globe",
1146
+ target: "Bullseye",
1147
+ // Media
1148
+ image: "Image",
1149
+ video: "Video",
1150
+ film: "Film",
1151
+ camera: "Camera",
1152
+ music: "Music",
1153
+ play: "Play",
1154
+ pause: "Pause",
1155
+ "skip-forward": "Forward",
1156
+ "skip-back": "Backward",
1157
+ volume: "VolumeUp",
1158
+ "volume-2": "VolumeUp",
1159
+ "volume-x": "VolumeMute",
1160
+ mic: "Microphone",
1161
+ "mic-off": "MicrophoneSlash",
1162
+ phone: "Phone",
1163
+ // Code / data
1164
+ code: "Code",
1165
+ terminal: "Terminal",
1166
+ database: "Database",
1167
+ server: "Server",
1168
+ cloud: "Cloud",
1169
+ wifi: "Wifi",
1170
+ // Security
1171
+ shield: "ShieldAlt",
1172
+ key: "Key",
1173
+ // Misc actions
1174
+ printer: "Print",
1175
+ save: "Save",
1176
+ link: "Link",
1177
+ unlink: "Unlink",
1178
+ paperclip: "Paperclip",
1179
+ flag: "Flag",
1180
+ tag: "Tag",
1181
+ tags: "Tags",
1182
+ zap: "Bolt"
1089
1183
  };
1090
1184
  warned = /* @__PURE__ */ new Set();
1091
1185
  }
@@ -1151,53 +1151,57 @@ function warnFallback(name, family) {
1151
1151
  );
1152
1152
  }
1153
1153
  }
1154
- function makeLucideAdapter(name) {
1154
+ function makeLucideAdapter(name, isFallback = false) {
1155
1155
  const LucideComp = resolveLucide(name);
1156
- const Adapter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
1157
- LucideComp,
1158
- {
1159
- className: props.className,
1160
- strokeWidth: props.strokeWidth,
1161
- style: props.style,
1162
- size: props.size
1163
- }
1164
- );
1165
- Adapter.displayName = `Lucide.${name}`;
1156
+ const Adapter = (props) => {
1157
+ const stroke = props.strokeWidth ?? (isFallback ? 2 : void 0);
1158
+ const style = isFallback ? { ...props.style ?? {}, strokeWidth: stroke ?? 2 } : props.style;
1159
+ return /* @__PURE__ */ jsxRuntime.jsx(
1160
+ LucideComp,
1161
+ {
1162
+ className: props.className,
1163
+ strokeWidth: stroke,
1164
+ style,
1165
+ size: props.size
1166
+ }
1167
+ );
1168
+ };
1169
+ Adapter.displayName = `Lucide.${name}${isFallback ? ".fallback" : ""}`;
1166
1170
  return Adapter;
1167
1171
  }
1168
1172
  function resolveIconForFamily(name, family) {
1169
1173
  switch (family) {
1170
1174
  case "lucide":
1171
- return makeLucideAdapter(name);
1175
+ return makeLucideAdapter(name, false);
1172
1176
  case "phosphor-outline": {
1173
1177
  const p2 = resolvePhosphor(name, "regular");
1174
1178
  if (p2) return p2;
1175
1179
  warnFallback(name, family);
1176
- return makeLucideAdapter(name);
1180
+ return makeLucideAdapter(name, true);
1177
1181
  }
1178
1182
  case "phosphor-fill": {
1179
1183
  const p2 = resolvePhosphor(name, "fill");
1180
1184
  if (p2) return p2;
1181
1185
  warnFallback(name, family);
1182
- return makeLucideAdapter(name);
1186
+ return makeLucideAdapter(name, true);
1183
1187
  }
1184
1188
  case "phosphor-duotone": {
1185
1189
  const p2 = resolvePhosphor(name, "duotone");
1186
1190
  if (p2) return p2;
1187
1191
  warnFallback(name, family);
1188
- return makeLucideAdapter(name);
1192
+ return makeLucideAdapter(name, true);
1189
1193
  }
1190
1194
  case "tabler": {
1191
1195
  const t = resolveTabler(name);
1192
1196
  if (t) return t;
1193
1197
  warnFallback(name, family);
1194
- return makeLucideAdapter(name);
1198
+ return makeLucideAdapter(name, true);
1195
1199
  }
1196
1200
  case "fa-solid": {
1197
1201
  const f3 = resolveFa(name);
1198
1202
  if (f3) return f3;
1199
1203
  warnFallback(name, family);
1200
- return makeLucideAdapter(name);
1204
+ return makeLucideAdapter(name, true);
1201
1205
  }
1202
1206
  }
1203
1207
  }
@@ -1335,7 +1339,11 @@ var init_iconFamily = __esm({
1335
1339
  info: "InfoCircle"
1336
1340
  };
1337
1341
  faAliases = {
1338
- // lucide name → fa-solid suffix (after the `Fa` prefix)
1342
+ // lucide name → fa-solid suffix (after the `Fa` prefix).
1343
+ // react-icons/fa ships FontAwesome 5 — names like `FaFileText` don't exist
1344
+ // (FA renamed to `FaFileAlt`). When you see a console.warn from
1345
+ // [iconFamily] about an unmapped lucide name in this family, add the
1346
+ // closest FA5 sibling here so the fallback stays in-family.
1339
1347
  search: "Search",
1340
1348
  close: "Times",
1341
1349
  x: "Times",
@@ -1387,7 +1395,93 @@ var init_iconFamily = __esm({
1387
1395
  more: "EllipsisH",
1388
1396
  "more-vertical": "EllipsisV",
1389
1397
  info: "InfoCircle",
1390
- warning: "ExclamationTriangle"
1398
+ warning: "ExclamationTriangle",
1399
+ // Files (FA renamed FileText → FileAlt)
1400
+ file: "File",
1401
+ "file-text": "FileAlt",
1402
+ "file-plus": "FileMedical",
1403
+ "file-minus": "FileExcel",
1404
+ "file-check": "FileSignature",
1405
+ document: "FileAlt",
1406
+ // Charts (lucide BarChart2 / BarChart3 → FA ChartBar)
1407
+ "bar-chart": "ChartBar",
1408
+ "bar-chart-2": "ChartBar",
1409
+ "bar-chart-3": "ChartBar",
1410
+ "line-chart": "ChartLine",
1411
+ "pie-chart": "ChartPie",
1412
+ activity: "ChartLine",
1413
+ "trending-up": "ChartLine",
1414
+ "trending-down": "ChartLine",
1415
+ // Messages (lucide MessageCircle/MessageSquare → FA CommentDots/CommentAlt)
1416
+ message: "Comment",
1417
+ "message-circle": "CommentDots",
1418
+ "message-square": "CommentAlt",
1419
+ "messages-square": "Comments",
1420
+ comment: "Comment",
1421
+ comments: "Comments",
1422
+ inbox: "Inbox",
1423
+ // Support / help
1424
+ "life-buoy": "LifeRing",
1425
+ lifebuoy: "LifeRing",
1426
+ // Project / kanban (FA has no kanban; closest semantic is Tasks/Columns)
1427
+ kanban: "Tasks",
1428
+ columns: "Columns",
1429
+ rows: "Bars",
1430
+ layout: "ThLarge",
1431
+ grid: "Th",
1432
+ list: "List",
1433
+ table: "Table",
1434
+ // Storage / folders
1435
+ folder: "Folder",
1436
+ "folder-open": "FolderOpen",
1437
+ archive: "Archive",
1438
+ bookmark: "Bookmark",
1439
+ briefcase: "Briefcase",
1440
+ package: "Box",
1441
+ box: "Box",
1442
+ // Map / location
1443
+ map: "Map",
1444
+ "map-pin": "MapMarkerAlt",
1445
+ navigation: "LocationArrow",
1446
+ compass: "Compass",
1447
+ globe: "Globe",
1448
+ target: "Bullseye",
1449
+ // Media
1450
+ image: "Image",
1451
+ video: "Video",
1452
+ film: "Film",
1453
+ camera: "Camera",
1454
+ music: "Music",
1455
+ play: "Play",
1456
+ pause: "Pause",
1457
+ "skip-forward": "Forward",
1458
+ "skip-back": "Backward",
1459
+ volume: "VolumeUp",
1460
+ "volume-2": "VolumeUp",
1461
+ "volume-x": "VolumeMute",
1462
+ mic: "Microphone",
1463
+ "mic-off": "MicrophoneSlash",
1464
+ phone: "Phone",
1465
+ // Code / data
1466
+ code: "Code",
1467
+ terminal: "Terminal",
1468
+ database: "Database",
1469
+ server: "Server",
1470
+ cloud: "Cloud",
1471
+ wifi: "Wifi",
1472
+ // Security
1473
+ shield: "ShieldAlt",
1474
+ key: "Key",
1475
+ // Misc actions
1476
+ printer: "Print",
1477
+ save: "Save",
1478
+ link: "Link",
1479
+ unlink: "Unlink",
1480
+ paperclip: "Paperclip",
1481
+ flag: "Flag",
1482
+ tag: "Tag",
1483
+ tags: "Tags",
1484
+ zap: "Bolt"
1391
1485
  };
1392
1486
  warned = /* @__PURE__ */ new Set();
1393
1487
  }
@@ -1102,53 +1102,57 @@ function warnFallback(name, family) {
1102
1102
  );
1103
1103
  }
1104
1104
  }
1105
- function makeLucideAdapter(name) {
1105
+ function makeLucideAdapter(name, isFallback = false) {
1106
1106
  const LucideComp = resolveLucide(name);
1107
- const Adapter = (props) => /* @__PURE__ */ jsx(
1108
- LucideComp,
1109
- {
1110
- className: props.className,
1111
- strokeWidth: props.strokeWidth,
1112
- style: props.style,
1113
- size: props.size
1114
- }
1115
- );
1116
- Adapter.displayName = `Lucide.${name}`;
1107
+ const Adapter = (props) => {
1108
+ const stroke = props.strokeWidth ?? (isFallback ? 2 : void 0);
1109
+ const style = isFallback ? { ...props.style ?? {}, strokeWidth: stroke ?? 2 } : props.style;
1110
+ return /* @__PURE__ */ jsx(
1111
+ LucideComp,
1112
+ {
1113
+ className: props.className,
1114
+ strokeWidth: stroke,
1115
+ style,
1116
+ size: props.size
1117
+ }
1118
+ );
1119
+ };
1120
+ Adapter.displayName = `Lucide.${name}${isFallback ? ".fallback" : ""}`;
1117
1121
  return Adapter;
1118
1122
  }
1119
1123
  function resolveIconForFamily(name, family) {
1120
1124
  switch (family) {
1121
1125
  case "lucide":
1122
- return makeLucideAdapter(name);
1126
+ return makeLucideAdapter(name, false);
1123
1127
  case "phosphor-outline": {
1124
1128
  const p2 = resolvePhosphor(name, "regular");
1125
1129
  if (p2) return p2;
1126
1130
  warnFallback(name, family);
1127
- return makeLucideAdapter(name);
1131
+ return makeLucideAdapter(name, true);
1128
1132
  }
1129
1133
  case "phosphor-fill": {
1130
1134
  const p2 = resolvePhosphor(name, "fill");
1131
1135
  if (p2) return p2;
1132
1136
  warnFallback(name, family);
1133
- return makeLucideAdapter(name);
1137
+ return makeLucideAdapter(name, true);
1134
1138
  }
1135
1139
  case "phosphor-duotone": {
1136
1140
  const p2 = resolvePhosphor(name, "duotone");
1137
1141
  if (p2) return p2;
1138
1142
  warnFallback(name, family);
1139
- return makeLucideAdapter(name);
1143
+ return makeLucideAdapter(name, true);
1140
1144
  }
1141
1145
  case "tabler": {
1142
1146
  const t = resolveTabler(name);
1143
1147
  if (t) return t;
1144
1148
  warnFallback(name, family);
1145
- return makeLucideAdapter(name);
1149
+ return makeLucideAdapter(name, true);
1146
1150
  }
1147
1151
  case "fa-solid": {
1148
1152
  const f3 = resolveFa(name);
1149
1153
  if (f3) return f3;
1150
1154
  warnFallback(name, family);
1151
- return makeLucideAdapter(name);
1155
+ return makeLucideAdapter(name, true);
1152
1156
  }
1153
1157
  }
1154
1158
  }
@@ -1286,7 +1290,11 @@ var init_iconFamily = __esm({
1286
1290
  info: "InfoCircle"
1287
1291
  };
1288
1292
  faAliases = {
1289
- // lucide name → fa-solid suffix (after the `Fa` prefix)
1293
+ // lucide name → fa-solid suffix (after the `Fa` prefix).
1294
+ // react-icons/fa ships FontAwesome 5 — names like `FaFileText` don't exist
1295
+ // (FA renamed to `FaFileAlt`). When you see a console.warn from
1296
+ // [iconFamily] about an unmapped lucide name in this family, add the
1297
+ // closest FA5 sibling here so the fallback stays in-family.
1290
1298
  search: "Search",
1291
1299
  close: "Times",
1292
1300
  x: "Times",
@@ -1338,7 +1346,93 @@ var init_iconFamily = __esm({
1338
1346
  more: "EllipsisH",
1339
1347
  "more-vertical": "EllipsisV",
1340
1348
  info: "InfoCircle",
1341
- warning: "ExclamationTriangle"
1349
+ warning: "ExclamationTriangle",
1350
+ // Files (FA renamed FileText → FileAlt)
1351
+ file: "File",
1352
+ "file-text": "FileAlt",
1353
+ "file-plus": "FileMedical",
1354
+ "file-minus": "FileExcel",
1355
+ "file-check": "FileSignature",
1356
+ document: "FileAlt",
1357
+ // Charts (lucide BarChart2 / BarChart3 → FA ChartBar)
1358
+ "bar-chart": "ChartBar",
1359
+ "bar-chart-2": "ChartBar",
1360
+ "bar-chart-3": "ChartBar",
1361
+ "line-chart": "ChartLine",
1362
+ "pie-chart": "ChartPie",
1363
+ activity: "ChartLine",
1364
+ "trending-up": "ChartLine",
1365
+ "trending-down": "ChartLine",
1366
+ // Messages (lucide MessageCircle/MessageSquare → FA CommentDots/CommentAlt)
1367
+ message: "Comment",
1368
+ "message-circle": "CommentDots",
1369
+ "message-square": "CommentAlt",
1370
+ "messages-square": "Comments",
1371
+ comment: "Comment",
1372
+ comments: "Comments",
1373
+ inbox: "Inbox",
1374
+ // Support / help
1375
+ "life-buoy": "LifeRing",
1376
+ lifebuoy: "LifeRing",
1377
+ // Project / kanban (FA has no kanban; closest semantic is Tasks/Columns)
1378
+ kanban: "Tasks",
1379
+ columns: "Columns",
1380
+ rows: "Bars",
1381
+ layout: "ThLarge",
1382
+ grid: "Th",
1383
+ list: "List",
1384
+ table: "Table",
1385
+ // Storage / folders
1386
+ folder: "Folder",
1387
+ "folder-open": "FolderOpen",
1388
+ archive: "Archive",
1389
+ bookmark: "Bookmark",
1390
+ briefcase: "Briefcase",
1391
+ package: "Box",
1392
+ box: "Box",
1393
+ // Map / location
1394
+ map: "Map",
1395
+ "map-pin": "MapMarkerAlt",
1396
+ navigation: "LocationArrow",
1397
+ compass: "Compass",
1398
+ globe: "Globe",
1399
+ target: "Bullseye",
1400
+ // Media
1401
+ image: "Image",
1402
+ video: "Video",
1403
+ film: "Film",
1404
+ camera: "Camera",
1405
+ music: "Music",
1406
+ play: "Play",
1407
+ pause: "Pause",
1408
+ "skip-forward": "Forward",
1409
+ "skip-back": "Backward",
1410
+ volume: "VolumeUp",
1411
+ "volume-2": "VolumeUp",
1412
+ "volume-x": "VolumeMute",
1413
+ mic: "Microphone",
1414
+ "mic-off": "MicrophoneSlash",
1415
+ phone: "Phone",
1416
+ // Code / data
1417
+ code: "Code",
1418
+ terminal: "Terminal",
1419
+ database: "Database",
1420
+ server: "Server",
1421
+ cloud: "Cloud",
1422
+ wifi: "Wifi",
1423
+ // Security
1424
+ shield: "ShieldAlt",
1425
+ key: "Key",
1426
+ // Misc actions
1427
+ printer: "Print",
1428
+ save: "Save",
1429
+ link: "Link",
1430
+ unlink: "Unlink",
1431
+ paperclip: "Paperclip",
1432
+ flag: "Flag",
1433
+ tag: "Tag",
1434
+ tags: "Tags",
1435
+ zap: "Bolt"
1342
1436
  };
1343
1437
  warned = /* @__PURE__ */ new Set();
1344
1438
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "5.1.2",
3
+ "version": "5.1.4",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "sideEffects": [