@sparkstudio/common-ui 1.0.24 → 1.0.26

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/index.cjs CHANGED
@@ -40,6 +40,7 @@ __export(index_exports, {
40
40
  Notifications: () => Notifications,
41
41
  NotificationsProvider: () => NotificationsProvider,
42
42
  NpmBadge: () => NpmBadge,
43
+ ThemeToggleButton: () => ThemeToggleButton,
43
44
  UseModal: () => UseModal,
44
45
  UseNotifications: () => UseNotifications
45
46
  });
@@ -220,20 +221,52 @@ function NpmBadge({ packageName, packageLabel, packageUrl, color = "black", heig
220
221
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("a", { href: npmUrl, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("img", { src: badgeUrl, alt: `${packageName} version`, style: { height } }) });
221
222
  }
222
223
 
223
- // src/components/navigation/Navigation.tsx
224
+ // src/components/ThemeToggleButton.tsx
225
+ var import_react2 = require("react");
224
226
  var import_jsx_runtime10 = require("react/jsx-runtime");
227
+ var STORAGE_KEY = "bootstrap-theme";
228
+ function applyTheme(theme) {
229
+ document.documentElement.setAttribute("data-bs-theme", theme);
230
+ }
231
+ function ThemeToggleButton() {
232
+ const [theme, setTheme] = (0, import_react2.useState)("light");
233
+ (0, import_react2.useEffect)(() => {
234
+ const stored = localStorage.getItem(STORAGE_KEY);
235
+ if (stored === "light" || stored === "dark") {
236
+ setTheme(stored);
237
+ applyTheme(stored);
238
+ return;
239
+ }
240
+ const prefersDark = window.matchMedia?.("(prefers-color-scheme: dark)").matches ?? false;
241
+ const initialTheme = prefersDark ? "dark" : "light";
242
+ setTheme(initialTheme);
243
+ applyTheme(initialTheme);
244
+ }, []);
245
+ const handleToggle = () => {
246
+ const next = theme === "light" ? "dark" : "light";
247
+ setTheme(next);
248
+ applyTheme(next);
249
+ localStorage.setItem(STORAGE_KEY, next);
250
+ };
251
+ const variant = theme === "light" ? "dark" : "light";
252
+ const label = theme === "light" ? "\u{1F319} Dark mode" : "\u{1F31E} Light mode";
253
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button, { variant, onClick: handleToggle, children: label });
254
+ }
255
+
256
+ // src/components/navigation/Navigation.tsx
257
+ var import_jsx_runtime11 = require("react/jsx-runtime");
225
258
  function Navigation({
226
259
  title = "Navigation",
227
260
  children,
228
261
  isOpen,
229
262
  onClose
230
263
  }) {
231
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
232
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("nav", { className: "col-auto p-3 h-100 d-none d-md-flex flex-column", children: [
233
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h6", { className: "text-muted text-uppercase", children: title }),
234
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("ul", { className: "nav nav-pills flex-column gap-2 mt-3", children })
264
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
265
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("nav", { className: "col-auto p-3 h-100 d-none d-md-flex flex-column", children: [
266
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h6", { className: "text-muted text-uppercase", children: title }),
267
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("ul", { className: "nav nav-pills flex-column gap-2 mt-3", children })
235
268
  ] }),
236
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
269
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
237
270
  "div",
238
271
  {
239
272
  className: `offcanvas offcanvas-start d-md-none ${isOpen ? "show" : ""}`,
@@ -241,15 +274,15 @@ function Navigation({
241
274
  tabIndex: -1,
242
275
  "aria-hidden": isOpen ? "false" : "true",
243
276
  children: [
244
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "offcanvas-header", children: [
245
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h5", { className: "offcanvas-title", children: title }),
246
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { className: "btn-close", onClick: onClose })
277
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "offcanvas-header", children: [
278
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h5", { className: "offcanvas-title", children: title }),
279
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { className: "btn-close", onClick: onClose })
247
280
  ] }),
248
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "offcanvas-body", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("ul", { className: "nav nav-pills flex-column gap-2 mt-2", children }) })
281
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "offcanvas-body", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("ul", { className: "nav nav-pills flex-column gap-2 mt-2", children }) })
249
282
  ]
250
283
  }
251
284
  ),
252
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
285
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
253
286
  "div",
254
287
  {
255
288
  className: "offcanvas-backdrop fade show d-md-none",
@@ -260,9 +293,9 @@ function Navigation({
260
293
  }
261
294
 
262
295
  // src/components/navigation/NavigationItem.tsx
263
- var import_jsx_runtime11 = require("react/jsx-runtime");
296
+ var import_jsx_runtime12 = require("react/jsx-runtime");
264
297
  function NavigationItem({ icon, title, type, active, onClick }) {
265
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { className: "nav-item", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
298
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { className: "nav-item", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
266
299
  "button",
267
300
  {
268
301
  type: "button",
@@ -278,12 +311,12 @@ function NavigationItem({ icon, title, type, active, onClick }) {
278
311
  }
279
312
 
280
313
  // src/components/navigation/NavToggleButton.tsx
281
- var import_jsx_runtime12 = require("react/jsx-runtime");
314
+ var import_jsx_runtime13 = require("react/jsx-runtime");
282
315
  var NavToggleButton = ({
283
316
  onClick,
284
317
  color = "dark"
285
318
  }) => {
286
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "ms-auto pe-2 d-md-none", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
319
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ms-auto pe-2 d-md-none", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
287
320
  Button,
288
321
  {
289
322
  variant: color,
@@ -295,29 +328,29 @@ var NavToggleButton = ({
295
328
  };
296
329
 
297
330
  // src/components/notifications/Notifications.tsx
298
- var import_react2 = require("react");
299
- var import_jsx_runtime13 = require("react/jsx-runtime");
331
+ var import_react3 = require("react");
332
+ var import_jsx_runtime14 = require("react/jsx-runtime");
300
333
  function Notifications({ notifications, onClose }) {
301
- (0, import_react2.useEffect)(() => {
334
+ (0, import_react3.useEffect)(() => {
302
335
  notifications.forEach((n) => {
303
336
  if (!n.autoCloseMs) return;
304
337
  const timer = setTimeout(() => onClose(n.id), n.autoCloseMs);
305
338
  return () => clearTimeout(timer);
306
339
  });
307
340
  }, [notifications, onClose]);
308
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
341
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
309
342
  "div",
310
343
  {
311
344
  className: "position-fixed top-0 end-0",
312
345
  style: { zIndex: 1080, width: 340 },
313
- children: notifications.map((n) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
346
+ children: notifications.map((n) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
314
347
  "div",
315
348
  {
316
349
  className: `alert alert-${n.type ?? "info"} alert-dismissible fade show shadow-sm mb-2`,
317
350
  role: "alert",
318
351
  children: [
319
352
  n.message,
320
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
353
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
321
354
  "button",
322
355
  {
323
356
  type: "button",
@@ -335,14 +368,14 @@ function Notifications({ notifications, onClose }) {
335
368
  }
336
369
 
337
370
  // src/components/notifications/NotificationsProvider.tsx
338
- var import_react3 = require("react");
339
- var import_jsx_runtime14 = require("react/jsx-runtime");
340
- var NotificationsContext = (0, import_react3.createContext)(
371
+ var import_react4 = require("react");
372
+ var import_jsx_runtime15 = require("react/jsx-runtime");
373
+ var NotificationsContext = (0, import_react4.createContext)(
341
374
  void 0
342
375
  );
343
376
  function NotificationsProvider({ children }) {
344
- const [notifications, setNotifications] = (0, import_react3.useState)([]);
345
- const push = (0, import_react3.useCallback)(
377
+ const [notifications, setNotifications] = (0, import_react4.useState)([]);
378
+ const push = (0, import_react4.useCallback)(
346
379
  (message, type = "info", autoCloseMs = 4e3) => {
347
380
  setNotifications((prev) => [
348
381
  ...prev,
@@ -356,10 +389,10 @@ function NotificationsProvider({ children }) {
356
389
  },
357
390
  []
358
391
  );
359
- const close = (0, import_react3.useCallback)((id) => {
392
+ const close = (0, import_react4.useCallback)((id) => {
360
393
  setNotifications((list) => list.filter((n) => n.id !== id));
361
394
  }, []);
362
- (0, import_react3.useEffect)(() => {
395
+ (0, import_react4.useEffect)(() => {
363
396
  const timers = notifications.map((n) => {
364
397
  if (!n.autoCloseMs) return null;
365
398
  return setTimeout(() => close(n.id), n.autoCloseMs);
@@ -368,20 +401,20 @@ function NotificationsProvider({ children }) {
368
401
  timers.forEach((t) => t && clearTimeout(t));
369
402
  };
370
403
  }, [notifications, close]);
371
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(NotificationsContext.Provider, { value: { push }, children: [
372
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
404
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(NotificationsContext.Provider, { value: { push }, children: [
405
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
373
406
  "div",
374
407
  {
375
408
  className: "position-fixed top-0 end-0",
376
409
  style: { zIndex: 1080, width: 340 },
377
- children: notifications.map((n) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
410
+ children: notifications.map((n) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
378
411
  "div",
379
412
  {
380
413
  className: `alert alert-${n.type ?? "info"} alert-dismissible fade show shadow-sm mb-2`,
381
414
  role: "alert",
382
415
  children: [
383
416
  n.message,
384
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
417
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
385
418
  "button",
386
419
  {
387
420
  type: "button",
@@ -400,7 +433,7 @@ function NotificationsProvider({ children }) {
400
433
  ] });
401
434
  }
402
435
  function UseNotifications() {
403
- const ctx = (0, import_react3.useContext)(NotificationsContext);
436
+ const ctx = (0, import_react4.useContext)(NotificationsContext);
404
437
  if (!ctx) {
405
438
  throw new Error("useNotifications must be used within a NotificationsProvider");
406
439
  }
@@ -408,34 +441,34 @@ function UseNotifications() {
408
441
  }
409
442
 
410
443
  // src/components/views/AppsView.tsx
411
- var import_jsx_runtime15 = require("react/jsx-runtime");
444
+ var import_jsx_runtime16 = require("react/jsx-runtime");
412
445
  var AppsView = ({ apps, title, onAppClick }) => {
413
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
414
- title && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h5", { className: "mb-3", children: title }),
415
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "row justify-content-center justify-content-md-start", children: apps.map((app) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AppTile, { app, onClick: onAppClick }, app.id)) })
446
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
447
+ title && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h5", { className: "mb-3", children: title }),
448
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "row justify-content-center justify-content-md-start", children: apps.map((app) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AppTile, { app, onClick: onAppClick }, app.id)) })
416
449
  ] });
417
450
  };
418
451
 
419
452
  // src/components/wrappers/ContentContainer.tsx
420
- var import_jsx_runtime16 = require("react/jsx-runtime");
453
+ var import_jsx_runtime17 = require("react/jsx-runtime");
421
454
  function ContentContainer({ children }) {
422
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "container-fluid flex-grow-1", children });
455
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "container-fluid flex-grow-1 container-lg", children });
423
456
  }
424
457
 
425
458
  // src/components/wrappers/ContentRow.tsx
426
- var import_jsx_runtime17 = require("react/jsx-runtime");
459
+ var import_jsx_runtime18 = require("react/jsx-runtime");
427
460
  function ContentRow({ children }) {
428
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "row h-100 flex-nowrap", children });
461
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "row h-100 flex-nowrap", children });
429
462
  }
430
463
 
431
464
  // src/components/wrappers/LayoutWrapper.tsx
432
- var import_jsx_runtime18 = require("react/jsx-runtime");
465
+ var import_jsx_runtime19 = require("react/jsx-runtime");
433
466
  function LayoutWrapper({ children }) {
434
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "d-flex flex-column min-vh-100", children });
467
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "d-flex flex-column min-vh-100", children });
435
468
  }
436
469
 
437
470
  // src/modal/Modal.tsx
438
- var import_jsx_runtime19 = require("react/jsx-runtime");
471
+ var import_jsx_runtime20 = require("react/jsx-runtime");
439
472
  var Modal = ({
440
473
  title,
441
474
  isOpen,
@@ -458,8 +491,8 @@ var Modal = ({
458
491
  e.stopPropagation();
459
492
  };
460
493
  const hasFooterButtons = (showCloseButton || onConfirm && showConfirmButton) && !disableAllButtons;
461
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
462
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
494
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
495
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
463
496
  "div",
464
497
  {
465
498
  className: "modal-backdrop fade show",
@@ -467,7 +500,7 @@ var Modal = ({
467
500
  onClick: handleBackdropClick
468
501
  }
469
502
  ),
470
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
503
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
471
504
  "div",
472
505
  {
473
506
  className: "modal fade show d-block",
@@ -475,16 +508,16 @@ var Modal = ({
475
508
  role: "dialog",
476
509
  style: { zIndex: 1050 },
477
510
  onClick: handleBackdropClick,
478
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
511
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
479
512
  "div",
480
513
  {
481
514
  className: "modal-dialog modal-dialog-centered",
482
515
  role: "document",
483
516
  onClick: handleContentClick,
484
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "modal-content shadow", children: [
485
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "modal-header", children: [
486
- title && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h5", { className: "modal-title", children: title }),
487
- showHeaderClose && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
517
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "modal-content shadow", children: [
518
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "modal-header", children: [
519
+ title && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h5", { className: "modal-title", children: title }),
520
+ showHeaderClose && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
488
521
  "button",
489
522
  {
490
523
  type: "button",
@@ -495,9 +528,9 @@ var Modal = ({
495
528
  }
496
529
  )
497
530
  ] }),
498
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "modal-body", children }),
499
- hasFooterButtons && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "modal-footer", children: [
500
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
531
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "modal-body", children }),
532
+ hasFooterButtons && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "modal-footer", children: [
533
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
501
534
  "button",
502
535
  {
503
536
  type: "button",
@@ -507,7 +540,7 @@ var Modal = ({
507
540
  children: "Close"
508
541
  }
509
542
  ),
510
- onConfirm && showConfirmButton && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
543
+ onConfirm && showConfirmButton && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
511
544
  "button",
512
545
  {
513
546
  type: "button",
@@ -527,24 +560,24 @@ var Modal = ({
527
560
  };
528
561
 
529
562
  // src/modal/ModalProvider.tsx
530
- var import_react4 = require("react");
531
- var import_jsx_runtime20 = require("react/jsx-runtime");
532
- var ModalContext = (0, import_react4.createContext)(void 0);
563
+ var import_react5 = require("react");
564
+ var import_jsx_runtime21 = require("react/jsx-runtime");
565
+ var ModalContext = (0, import_react5.createContext)(void 0);
533
566
  function ModalProvider({ children }) {
534
- const [isOpen, setIsOpen] = (0, import_react4.useState)(false);
535
- const [content, setContent] = (0, import_react4.useState)(null);
536
- const [options, setOptions] = (0, import_react4.useState)({});
537
- const openModal = (0, import_react4.useCallback)((content2, options2) => {
567
+ const [isOpen, setIsOpen] = (0, import_react5.useState)(false);
568
+ const [content, setContent] = (0, import_react5.useState)(null);
569
+ const [options, setOptions] = (0, import_react5.useState)({});
570
+ const openModal = (0, import_react5.useCallback)((content2, options2) => {
538
571
  setContent(content2);
539
572
  setOptions(options2 ?? {});
540
573
  setIsOpen(true);
541
574
  }, []);
542
- const closeModal = (0, import_react4.useCallback)(() => {
575
+ const closeModal = (0, import_react5.useCallback)(() => {
543
576
  setIsOpen(false);
544
577
  }, []);
545
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(ModalContext.Provider, { value: { openModal, closeModal }, children: [
578
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(ModalContext.Provider, { value: { openModal, closeModal }, children: [
546
579
  children,
547
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
580
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
548
581
  Modal,
549
582
  {
550
583
  isOpen,
@@ -563,7 +596,7 @@ function ModalProvider({ children }) {
563
596
  ] });
564
597
  }
565
598
  function UseModal() {
566
- const ctx = (0, import_react4.useContext)(ModalContext);
599
+ const ctx = (0, import_react5.useContext)(ModalContext);
567
600
  if (!ctx) throw new Error("UseModal must be used within ModalProvider");
568
601
  return ctx;
569
602
  }
@@ -589,6 +622,7 @@ function UseModal() {
589
622
  Notifications,
590
623
  NotificationsProvider,
591
624
  NpmBadge,
625
+ ThemeToggleButton,
592
626
  UseModal,
593
627
  UseNotifications
594
628
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/components/Alert.tsx","../src/components/AppTile.tsx","../src/components/Body.tsx","../src/components/Button.tsx","../src/components/Footer.tsx","../src/components/Header.tsx","../src/components/HeaderText.tsx","../src/components/Icon.tsx","../src/components/NpmBadge.tsx","../src/components/navigation/Navigation.tsx","../src/components/navigation/NavigationItem.tsx","../src/components/navigation/NavToggleButton.tsx","../src/components/notifications/Notifications.tsx","../src/components/notifications/NotificationsProvider.tsx","../src/components/views/AppsView.tsx","../src/components/wrappers/ContentContainer.tsx","../src/components/wrappers/ContentRow.tsx","../src/components/wrappers/LayoutWrapper.tsx","../src/modal/Modal.tsx","../src/modal/ModalProvider.tsx"],"sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./components/Alert\";\nexport * from \"./components/AppTile\";\nexport * from \"./components/Body\";\nexport * from \"./components/Button\";\nexport * from \"./components/Footer\";\nexport * from \"./components/Header\";\nexport * from \"./components/HeaderText\";\nexport * from \"./components/Icon\";\nexport * from \"./components/NpmBadge\";\nexport * from \"./components/navigation/Navigation\";\nexport * from \"./components/navigation/NavigationItem\";\nexport * from \"./components/navigation/NavToggleButton\";\nexport * from \"./components/notifications/Notifications\";\nexport * from \"./components/notifications/NotificationsProvider\";\nexport * from \"./components/views/AppsView\";\nexport * from \"./components/wrappers/ContentContainer\";\nexport * from \"./components/wrappers/ContentRow\";\nexport * from \"./components/wrappers/LayoutWrapper\";\nexport * from \"./modal/Modal\";\nexport * from \"./modal/ModalProvider\";\nexport * from \"./models/AppItem\";\n","// components/Alert.tsx\r\nimport React from \"react\";\r\n\r\nexport type AlertVariant =\r\n | \"primary\"\r\n | \"secondary\"\r\n | \"success\"\r\n | \"danger\"\r\n | \"warning\"\r\n | \"info\"\r\n | \"light\"\r\n | \"dark\";\r\n\r\ninterface AlertProps {\r\n variant?: AlertVariant;\r\n title?: string;\r\n dismissible?: boolean;\r\n className?: string;\r\n children: React.ReactNode;\r\n onClose?: () => void;\r\n}\r\n\r\nexport const Alert: React.FC<AlertProps> = ({\r\n variant = \"info\",\r\n title,\r\n dismissible = false,\r\n className = \"\",\r\n children,\r\n onClose,\r\n}) => {\r\n const classes = [\r\n \"alert\",\r\n `alert-${variant}`,\r\n dismissible ? \"alert-dismissible fade show\" : \"\",\r\n className,\r\n ]\r\n .filter(Boolean)\r\n .join(\" \");\r\n\r\n return (\r\n <div role=\"alert\" className={classes}>\r\n {title && <strong className=\"d-block mb-1\">{title}</strong>}\r\n {children}\r\n\r\n {dismissible && (\r\n <button\r\n type=\"button\"\r\n className=\"btn-close\"\r\n aria-label=\"Close\"\r\n onClick={onClose}\r\n />\r\n )}\r\n </div>\r\n );\r\n};\r\n","import React from \"react\";\r\nimport type { AppItem } from \"../models/AppItem\";\r\n\r\ninterface AppTileProps {\r\n app: AppItem;\r\n onClick?: (app: AppItem) => void;\r\n}\r\n\r\nexport const AppTile: React.FC<AppTileProps> = ({ app, onClick }) => {\r\n return (\r\n <div className=\"col-auto\">\r\n <button\r\n type=\"button\"\r\n className=\"btn p-2 d-flex flex-column align-items-center border-0 bg-transparent app-icon-btn\"\r\n onClick={() => onClick?.(app)}\r\n >\r\n <div className=\"app-icon-tile d-flex align-items-center justify-content-center mb-1\">\r\n <span style={{fontSize:\"32px\"}}>{app.icon}</span>\r\n </div>\r\n\r\n <span className=\"w-100 small text-truncate\">\r\n {app.name}\r\n {app.version && <small className=\"text-muted ms-1\">v{app.version}</small>}\r\n </span>\r\n </button>\r\n </div>\r\n );\r\n};\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface BodyProps {\r\n icon: ReactNode;\r\n title: ReactNode;\r\n description?: ReactNode;\r\n children?: ReactNode;\r\n}\r\n\r\nexport function Body({ icon, title, description, children }: BodyProps) {\r\n return (\r\n\r\n <main className=\"col p-4\">\r\n <h2>{icon} {title}</h2>\r\n\r\n {description && <p>{description}</p>}\r\n {children}\r\n </main>\r\n );\r\n}\r\n","import { useState, type ReactNode, type MouseEvent } from \"react\";\r\n\r\nexport type ButtonVariant =\r\n | \"primary\"\r\n | \"secondary\"\r\n | \"success\"\r\n | \"danger\"\r\n | \"warning\"\r\n | \"info\"\r\n | \"light\"\r\n | \"dark\"\r\n | \"link\";\r\n\r\nexport interface ButtonProps {\r\n buttonClassName?: string;\r\n type?: \"button\" | \"submit\" | \"reset\";\r\n disabled?: boolean;\r\n\r\n variant?: ButtonVariant; // 👈 NEW — Bootstrap color support\r\n\r\n onAction?: () => Promise<unknown>;\r\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void;\r\n onDone?: (result: unknown) => void;\r\n onError?: (error: unknown) => void;\r\n onFinally?: () => void;\r\n\r\n children?: ReactNode;\r\n loadingChildren?: ReactNode;\r\n\r\n renderContent?: () => ReactNode;\r\n renderLoading?: () => ReactNode;\r\n\r\n loadingText?: string;\r\n showSpinner?: boolean;\r\n}\r\n\r\nexport function Button({\r\n buttonClassName = \"btn btn-primary\",\r\n type = \"button\",\r\n disabled = false,\r\n\r\n variant,\r\n\r\n onAction,\r\n onClick,\r\n onDone,\r\n onError,\r\n onFinally,\r\n\r\n children = \"Click me\",\r\n\r\n loadingChildren,\r\n renderContent,\r\n renderLoading,\r\n\r\n loadingText = \"Loading...\",\r\n showSpinner = true,\r\n}: ButtonProps) {\r\n const [loading, setLoading] = useState(false);\r\n\r\n const handleClick = async (event: MouseEvent<HTMLButtonElement>) => {\r\n if (loading) return;\r\n\r\n onClick?.(event);\r\n if (event.defaultPrevented) return;\r\n if (!onAction) return;\r\n\r\n try {\r\n setLoading(true);\r\n const result = await onAction();\r\n onDone?.(result);\r\n } catch (error) {\r\n onError?.(error);\r\n } finally {\r\n setLoading(false);\r\n onFinally?.();\r\n }\r\n };\r\n\r\n // 👇 Decide which CSS to use:\r\n // - if variant is provided, use Bootstrap \"btn btn-X\"\r\n // - otherwise fall back to user-supplied buttonClassName\r\n const baseClass = variant\r\n ? `btn btn-${variant}`\r\n : buttonClassName;\r\n\r\n return (\r\n <button\r\n type={type}\r\n className={`${baseClass} ${loading ? \"async-btn--loading\" : \"\"}`}\r\n onClick={handleClick}\r\n disabled={disabled || loading}\r\n >\r\n {loading ? (\r\n renderLoading?.() ??\r\n loadingChildren ?? (\r\n <>\r\n {showSpinner && (\r\n <span\r\n className=\"spinner-border spinner-border-sm me-2 async-btn__spinner\"\r\n role=\"status\"\r\n aria-hidden=\"true\"\r\n />\r\n )}\r\n {loadingText}\r\n </>\r\n )\r\n ) : (\r\n renderContent?.() ?? children\r\n )}\r\n </button>\r\n );\r\n}\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface FooterProps {\r\n children?: ReactNode;\r\n}\r\n\r\nexport function Footer({ children }: FooterProps) {\r\n return (\r\n <footer className=\"bg-dark text-white text-center py-2 mt-auto\">\r\n {children ?? \"© 2025 Your Site — All rights reserved\"}\r\n </footer>\r\n );\r\n}\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface HeaderProps {\r\n children?: ReactNode;\r\n}\r\n\r\nexport function Header({ children }: HeaderProps) {\r\n return (\r\n <nav className=\"navbar navbar-dark bg-dark px-3 sticky-top\">\r\n {children ?? (\r\n <span className=\"navbar-brand mb-0 h4\">My Website</span>\r\n )}\r\n </nav>\r\n );\r\n}\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface HeaderBrandProps {\r\n children: ReactNode;\r\n}\r\n\r\nexport function HeaderText({ children }: HeaderBrandProps) {\r\n return (\r\n <span className=\"navbar-brand mb-0 h4\">\r\n {children}\r\n </span>\r\n );\r\n}\r\n","// ImageCard.tsx\r\nimport React from \"react\";\r\n\r\ninterface ImageCardProps {\r\n src: string;\r\n alt: string;\r\n width?: string | number;\r\n height?: string | number;\r\n}\r\n\r\nexport const ImageCard: React.FC<ImageCardProps> = ({\r\n src,\r\n alt,\r\n}) => {\r\n return (\r\n <img\r\n src={src}\r\n alt={alt}\r\n className={\"w-100\"}\r\n style={{\r\n display: \"block\",\r\n objectFit: \"cover\",\r\n }}\r\n />\r\n );\r\n};\r\n","// components/NpmBadge.tsx\r\ninterface NpmBadgeProps {\r\n packageLabel: string;\r\n packageName: string;\r\n packageUrl: string; // e.g. \"@sparkstudio/authentication-ui\"\r\n color?: string; // optional (default black)\r\n height?: number; // optional (default 22)\r\n}\r\n\r\nexport function NpmBadge({ packageName, packageLabel, packageUrl, color = \"black\", height = 22 }: NpmBadgeProps) {\r\n const encodedLabel = encodeURIComponent(packageLabel);\r\n const badgeUrl = `https://img.shields.io/npm/v/${packageName}?logo=npm&label=${encodedLabel}&color=${color}`;\r\n const npmUrl = packageUrl;\r\n\r\n return (\r\n <a href={npmUrl} target=\"_blank\" rel=\"noopener noreferrer\">\r\n <img src={badgeUrl} alt={`${packageName} version`} style={{ height }} />\r\n </a>\r\n );\r\n}\r\n","// components/Navigation.tsx\r\nimport type { ReactNode } from \"react\";\r\n\r\ninterface NavigationProps {\r\n title?: ReactNode;\r\n children: ReactNode;\r\n isOpen: boolean;\r\n onClose: () => void;\r\n}\r\n\r\nexport function Navigation({\r\n title = \"Navigation\",\r\n children,\r\n isOpen,\r\n onClose,\r\n}: NavigationProps) {\r\n return (\r\n <>\r\n {/* Desktop sidebar */}\r\n <nav className=\"col-auto p-3 h-100 d-none d-md-flex flex-column\">\r\n <h6 className=\"text-muted text-uppercase\">{title}</h6>\r\n\r\n <ul className=\"nav nav-pills flex-column gap-2 mt-3\">\r\n {children}\r\n </ul>\r\n </nav>\r\n\r\n {/* Mobile drawer */}\r\n <div\r\n className={`offcanvas offcanvas-start d-md-none ${isOpen ? \"show\" : \"\"}`}\r\n style={{ visibility: isOpen ? \"visible\" : \"hidden\" }}\r\n tabIndex={-1}\r\n aria-hidden={isOpen ? \"false\" : \"true\"}\r\n >\r\n <div className=\"offcanvas-header\">\r\n <h5 className=\"offcanvas-title\">{title}</h5>\r\n <button className=\"btn-close\" onClick={onClose} />\r\n </div>\r\n\r\n <div className=\"offcanvas-body\">\r\n <ul className=\"nav nav-pills flex-column gap-2 mt-2\">\r\n {children}\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n {/* Backdrop */}\r\n {isOpen && (\r\n <div\r\n className=\"offcanvas-backdrop fade show d-md-none\"\r\n onClick={onClose}\r\n />\r\n )}\r\n </>\r\n );\r\n}\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface NavigationItemProps {\r\n icon: ReactNode;\r\n title: ReactNode;\r\n type: string;\r\n active?: boolean;\r\n onClick?: (type: string) => void;\r\n}\r\n\r\nexport function NavigationItem({icon, title, type, active, onClick }: NavigationItemProps) {\r\n return (\r\n <li className=\"nav-item\">\r\n <button\r\n type=\"button\"\r\n className={`nav-link text-start w-100 ${active ? \"active\" : \"\"}`}\r\n onClick={() => onClick?.(type)}\r\n >\r\n {icon} {title}\r\n </button>\r\n </li>\r\n );\r\n}\r\n","// components/NavToggleButton.tsx\r\nimport React from \"react\";\r\nimport { Button } from \"../Button\";\r\n\r\ninterface NavToggleButtonProps {\r\n onClick: () => void;\r\n label?: string;\r\n color?: \"primary\" | \"secondary\" | \"success\" | \"danger\" | \"warning\" | \"info\" | \"light\" | \"dark\";\r\n}\r\n\r\nexport const NavToggleButton: React.FC<NavToggleButtonProps> = ({\r\n onClick,\r\n color = \"dark\",\r\n}) => {\r\n return (\r\n <div className=\"ms-auto pe-2 d-md-none\">\r\n <Button\r\n variant={color}\r\n buttonClassName=\"btn btn-secondary\"\r\n onClick={() => onClick()}\r\n >\r\n ☰\r\n </Button>\r\n </div>\r\n );\r\n};\r\n","import { useEffect } from \"react\";\r\n\r\nexport type NotificationType = \"success\" | \"info\" | \"warning\" | \"danger\";\r\n\r\nexport interface Notification {\r\n id: string;\r\n message: string;\r\n type?: NotificationType;\r\n autoCloseMs?: number;\r\n}\r\n\r\ninterface NotificationsProps {\r\n notifications: Notification[];\r\n onClose: (id: string) => void;\r\n}\r\n\r\nexport function Notifications({ notifications, onClose }: NotificationsProps) {\r\n useEffect(() => {\r\n notifications.forEach((n) => {\r\n if (!n.autoCloseMs) return;\r\n\r\n const timer = setTimeout(() => onClose(n.id), n.autoCloseMs);\r\n return () => clearTimeout(timer);\r\n });\r\n }, [notifications, onClose]);\r\n\r\n return (\r\n <div\r\n className=\"position-fixed top-0 end-0\"\r\n style={{ zIndex: 1080, width: 340 }}\r\n >\r\n {notifications.map((n) => (\r\n <div\r\n key={n.id}\r\n className={`alert alert-${n.type ?? \"info\"} alert-dismissible fade show shadow-sm mb-2`}\r\n role=\"alert\"\r\n >\r\n {n.message}\r\n\r\n <button\r\n type=\"button\"\r\n className=\"btn-close\"\r\n aria-label=\"Close\"\r\n onClick={() => onClose(n.id)}\r\n />\r\n </div>\r\n ))}\r\n </div>\r\n );\r\n}\r\n","import {\r\n createContext,\r\n useCallback,\r\n useContext,\r\n useEffect,\r\n useState,\r\n type ReactNode,\r\n} from \"react\";\r\nimport type { NotificationType } from \"./Notifications\";\r\n\r\n// Rename to avoid conflict with browser Notification type\r\nexport interface AppNotification {\r\n id: string;\r\n message: string;\r\n type?: NotificationType;\r\n autoCloseMs?: number;\r\n}\r\n\r\ninterface NotificationsContextValue {\r\n push: (message: string, type?: NotificationType, autoCloseMs?: number) => void;\r\n}\r\n\r\nconst NotificationsContext = createContext<NotificationsContextValue | undefined>(\r\n undefined\r\n);\r\n\r\ninterface NotificationsProviderProps {\r\n children: ReactNode;\r\n}\r\n\r\nexport function NotificationsProvider({ children }: NotificationsProviderProps) {\r\n const [notifications, setNotifications] = useState<AppNotification[]>([]);\r\n\r\n const push = useCallback(\r\n (message: string, type: NotificationType = \"info\", autoCloseMs = 4000) => {\r\n setNotifications((prev) => [\r\n ...prev,\r\n {\r\n id: crypto.randomUUID(),\r\n message,\r\n type,\r\n autoCloseMs,\r\n },\r\n ]);\r\n },\r\n []\r\n );\r\n\r\n const close = useCallback((id: string) => {\r\n setNotifications((list) => list.filter((n) => n.id !== id));\r\n }, []);\r\n\r\n // Handle auto close timers\r\n useEffect(() => {\r\n const timers = notifications.map((n) => {\r\n if (!n.autoCloseMs) return null;\r\n return setTimeout(() => close(n.id), n.autoCloseMs);\r\n });\r\n\r\n return () => {\r\n timers.forEach((t) => t && clearTimeout(t));\r\n };\r\n }, [notifications, close]);\r\n\r\n return (\r\n <NotificationsContext.Provider value={{ push }}>\r\n {/* overlay renderer */}\r\n <div\r\n className=\"position-fixed top-0 end-0\"\r\n style={{ zIndex: 1080, width: 340 }}\r\n >\r\n {notifications.map((n) => (\r\n <div\r\n key={n.id}\r\n className={`alert alert-${n.type ?? \"info\"} alert-dismissible fade show shadow-sm mb-2`}\r\n role=\"alert\"\r\n >\r\n {n.message}\r\n <button\r\n type=\"button\"\r\n className=\"btn-close\"\r\n aria-label=\"Close\"\r\n onClick={() => close(n.id)}\r\n />\r\n </div>\r\n ))}\r\n </div>\r\n\r\n {children}\r\n </NotificationsContext.Provider>\r\n );\r\n}\r\n\r\nexport function UseNotifications(): NotificationsContextValue {\r\n const ctx = useContext(NotificationsContext);\r\n if (!ctx) {\r\n throw new Error(\"useNotifications must be used within a NotificationsProvider\");\r\n }\r\n return ctx;\r\n}\r\n","// ./views/AppsView.tsx (or ./components/AppsView.tsx)\r\nimport React from \"react\";\r\nimport type { AppItem } from \"../../models/AppItem\";\r\nimport { AppTile } from \"../AppTile\";\r\n\r\ninterface AppsViewProps {\r\n apps: AppItem[];\r\n title?: string;\r\n onAppClick?: (app: AppItem) => void;\r\n}\r\n\r\nexport const AppsView: React.FC<AppsViewProps> = ({ apps, title, onAppClick }) => {\r\n return (\r\n <>\r\n {title && <h5 className=\"mb-3\">{title}</h5>}\r\n\r\n <div className=\"row justify-content-center justify-content-md-start\">\r\n {apps.map((app) => (\r\n <AppTile key={app.id} app={app} onClick={onAppClick} />\r\n ))}\r\n </div>\r\n </>\r\n );\r\n};\r\n","export function ContentContainer({ children }: React.PropsWithChildren) {\r\n return <div className=\"container-fluid flex-grow-1\">{children}</div>;\r\n}\r\n","export function ContentRow({ children }: React.PropsWithChildren) {\r\n return <div className=\"row h-100 flex-nowrap\">{children}</div>;\r\n}\r\n","\r\nexport function LayoutWrapper({ children }: React.PropsWithChildren) {\r\n return (\r\n\r\n <div className=\"d-flex flex-column min-vh-100\">{children}</div>\r\n );\r\n}\r\n","// components/Modal.tsx\r\nimport React from \"react\";\r\n\r\nexport interface ModalProps {\r\n title?: string;\r\n isOpen: boolean;\r\n onClose: () => void;\r\n onConfirm?: () => void;\r\n confirmText?: string;\r\n\r\n disableBackdropClose?: boolean;\r\n disableAllButtons?: boolean;\r\n\r\n showHeaderClose?: boolean;\r\n showCloseButton?: boolean;\r\n showConfirmButton?: boolean;\r\n\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport const Modal: React.FC<ModalProps> = ({\r\n title,\r\n isOpen,\r\n onClose,\r\n onConfirm,\r\n confirmText = \"OK\",\r\n\r\n disableBackdropClose = false,\r\n disableAllButtons = false,\r\n\r\n showHeaderClose = true,\r\n showCloseButton = true,\r\n showConfirmButton = true,\r\n\r\n children,\r\n}) => {\r\n if (!isOpen) return null;\r\n\r\n const handleBackdropClick = () => {\r\n if (disableBackdropClose || disableAllButtons) return;\r\n onClose();\r\n };\r\n\r\n const handleContentClick: React.MouseEventHandler<HTMLDivElement> = (e) => {\r\n e.stopPropagation();\r\n };\r\n\r\n // 👇 NEW: decide if footer should exist at all\r\n const hasFooterButtons =\r\n (showCloseButton || (onConfirm && showConfirmButton)) &&\r\n !disableAllButtons;\r\n\r\n return (\r\n <>\r\n <div\r\n className=\"modal-backdrop fade show\"\r\n style={{ zIndex: 1040 }}\r\n onClick={handleBackdropClick}\r\n />\r\n\r\n <div\r\n className=\"modal fade show d-block\"\r\n tabIndex={-1}\r\n role=\"dialog\"\r\n style={{ zIndex: 1050 }}\r\n onClick={handleBackdropClick}\r\n >\r\n <div\r\n className=\"modal-dialog modal-dialog-centered\"\r\n role=\"document\"\r\n onClick={handleContentClick}\r\n >\r\n <div className=\"modal-content shadow\">\r\n {/* Header */}\r\n <div className=\"modal-header\">\r\n {title && <h5 className=\"modal-title\">{title}</h5>}\r\n\r\n {showHeaderClose && (\r\n <button\r\n type=\"button\"\r\n className=\"btn-close\"\r\n aria-label=\"Close\"\r\n onClick={onClose}\r\n disabled={disableAllButtons}\r\n />\r\n )}\r\n </div>\r\n\r\n {/* Body */}\r\n <div className=\"modal-body\">{children}</div>\r\n\r\n {/* Footer — only if buttons are visible */}\r\n {hasFooterButtons && (\r\n <div className=\"modal-footer\">\r\n {showCloseButton && (\r\n <button\r\n type=\"button\"\r\n className=\"btn btn-secondary\"\r\n onClick={onClose}\r\n disabled={disableAllButtons}\r\n >\r\n Close\r\n </button>\r\n )}\r\n\r\n {onConfirm && showConfirmButton && (\r\n <button\r\n type=\"button\"\r\n className=\"btn btn-primary\"\r\n onClick={onConfirm}\r\n disabled={disableAllButtons}\r\n >\r\n {confirmText}\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n </>\r\n );\r\n};\r\n","import {\r\n createContext,\r\n useCallback,\r\n useContext,\r\n useState,\r\n type ReactNode,\r\n} from \"react\";\r\nimport { Modal } from \"./Modal\";\r\n\r\nexport interface ModalOptions {\r\n title?: string;\r\n confirmText?: string;\r\n disableBackdropClose?: boolean;\r\n onConfirm?: () => void;\r\n\r\n /** extra control flags matching Modal.tsx */\r\n disableAllButtons?: boolean;\r\n showHeaderClose?: boolean;\r\n showCloseButton?: boolean;\r\n showConfirmButton?: boolean;\r\n}\r\n\r\ninterface ModalContextValue {\r\n openModal: (content: ReactNode, options?: ModalOptions) => void;\r\n closeModal: () => void;\r\n}\r\n\r\nconst ModalContext = createContext<ModalContextValue | undefined>(undefined);\r\n\r\nexport function ModalProvider({ children }: { children: ReactNode }) {\r\n const [isOpen, setIsOpen] = useState(false);\r\n const [content, setContent] = useState<ReactNode>(null);\r\n const [options, setOptions] = useState<ModalOptions>({});\r\n\r\n const openModal = useCallback((content: ReactNode, options?: ModalOptions) => {\r\n setContent(content);\r\n setOptions(options ?? {});\r\n setIsOpen(true);\r\n }, []);\r\n\r\n const closeModal = useCallback(() => {\r\n setIsOpen(false);\r\n }, []);\r\n\r\n return (\r\n <ModalContext.Provider value={{ openModal, closeModal }}>\r\n {children}\r\n\r\n <Modal\r\n isOpen={isOpen}\r\n title={options.title}\r\n confirmText={options.confirmText}\r\n disableBackdropClose={options.disableBackdropClose}\r\n disableAllButtons={options.disableAllButtons}\r\n showHeaderClose={options.showHeaderClose}\r\n showCloseButton={options.showCloseButton}\r\n showConfirmButton={options.showConfirmButton}\r\n onClose={closeModal}\r\n onConfirm={options.onConfirm}\r\n >\r\n {content}\r\n </Modal>\r\n </ModalContext.Provider>\r\n );\r\n}\r\n\r\nexport function UseModal() {\r\n const ctx = useContext(ModalContext);\r\n if (!ctx) throw new Error(\"UseModal must be used within ModalProvider\");\r\n return ctx;\r\n}\r\n"],"m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ACnD;AAAA;AAAA,IAED;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,OAAO,QAAQ;AAAA,QACf,aAAa,QAAQ;AAAA,QACrB,sBAAsB,QAAQ;AAAA,QAC9B,mBAAmB,QAAQ;AAAA,QAC3B,iBAAiB,QAAQ;AAAA,QACzB,iBAAiB,QAAQ;AAAA,QACzB,mBAAmB,QAAQ;AAAA,QAC3B,SAAS;AAAA,QACT,WAAW,QAAQ;AAAA,QAElB;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;AAEO,SAAS,WAAW;AACzB,QAAM,UAAM,0BAAW,YAAY;AACnC,MAAI,CAAC,IAAK,OAAM,IAAI,MAAM,4CAA4C;AACtE,SAAO;AACT;","names":["import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_react","import_jsx_runtime","import_react","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_react","import_jsx_runtime","content","options"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/components/Alert.tsx","../src/components/AppTile.tsx","../src/components/Body.tsx","../src/components/Button.tsx","../src/components/Footer.tsx","../src/components/Header.tsx","../src/components/HeaderText.tsx","../src/components/Icon.tsx","../src/components/NpmBadge.tsx","../src/components/ThemeToggleButton.tsx","../src/components/navigation/Navigation.tsx","../src/components/navigation/NavigationItem.tsx","../src/components/navigation/NavToggleButton.tsx","../src/components/notifications/Notifications.tsx","../src/components/notifications/NotificationsProvider.tsx","../src/components/views/AppsView.tsx","../src/components/wrappers/ContentContainer.tsx","../src/components/wrappers/ContentRow.tsx","../src/components/wrappers/LayoutWrapper.tsx","../src/modal/Modal.tsx","../src/modal/ModalProvider.tsx"],"sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./components/Alert\";\nexport * from \"./components/AppTile\";\nexport * from \"./components/Body\";\nexport * from \"./components/Button\";\nexport * from \"./components/Footer\";\nexport * from \"./components/Header\";\nexport * from \"./components/HeaderText\";\nexport * from \"./components/Icon\";\nexport * from \"./components/NpmBadge\";\nexport * from \"./components/ThemeToggleButton\";\nexport * from \"./components/navigation/Navigation\";\nexport * from \"./components/navigation/NavigationItem\";\nexport * from \"./components/navigation/NavToggleButton\";\nexport * from \"./components/notifications/Notifications\";\nexport * from \"./components/notifications/NotificationsProvider\";\nexport * from \"./components/views/AppsView\";\nexport * from \"./components/wrappers/ContentContainer\";\nexport * from \"./components/wrappers/ContentRow\";\nexport * from \"./components/wrappers/LayoutWrapper\";\nexport * from \"./modal/Modal\";\nexport * from \"./modal/ModalProvider\";\nexport * from \"./models/AppItem\";\n","// components/Alert.tsx\r\nimport React from \"react\";\r\n\r\nexport type AlertVariant =\r\n | \"primary\"\r\n | \"secondary\"\r\n | \"success\"\r\n | \"danger\"\r\n | \"warning\"\r\n | \"info\"\r\n | \"light\"\r\n | \"dark\";\r\n\r\ninterface AlertProps {\r\n variant?: AlertVariant;\r\n title?: string;\r\n dismissible?: boolean;\r\n className?: string;\r\n children: React.ReactNode;\r\n onClose?: () => void;\r\n}\r\n\r\nexport const Alert: React.FC<AlertProps> = ({\r\n variant = \"info\",\r\n title,\r\n dismissible = false,\r\n className = \"\",\r\n children,\r\n onClose,\r\n}) => {\r\n const classes = [\r\n \"alert\",\r\n `alert-${variant}`,\r\n dismissible ? \"alert-dismissible fade show\" : \"\",\r\n className,\r\n ]\r\n .filter(Boolean)\r\n .join(\" \");\r\n\r\n return (\r\n <div role=\"alert\" className={classes}>\r\n {title && <strong className=\"d-block mb-1\">{title}</strong>}\r\n {children}\r\n\r\n {dismissible && (\r\n <button\r\n type=\"button\"\r\n className=\"btn-close\"\r\n aria-label=\"Close\"\r\n onClick={onClose}\r\n />\r\n )}\r\n </div>\r\n );\r\n};\r\n","import React from \"react\";\r\nimport type { AppItem } from \"../models/AppItem\";\r\n\r\ninterface AppTileProps {\r\n app: AppItem;\r\n onClick?: (app: AppItem) => void;\r\n}\r\n\r\nexport const AppTile: React.FC<AppTileProps> = ({ app, onClick }) => {\r\n return (\r\n <div className=\"col-auto\">\r\n <button\r\n type=\"button\"\r\n className=\"btn p-2 d-flex flex-column align-items-center border-0 bg-transparent app-icon-btn\"\r\n onClick={() => onClick?.(app)}\r\n >\r\n <div className=\"app-icon-tile d-flex align-items-center justify-content-center mb-1\">\r\n <span style={{fontSize:\"32px\"}}>{app.icon}</span>\r\n </div>\r\n\r\n <span className=\"w-100 small text-truncate\">\r\n {app.name}\r\n {app.version && <small className=\"text-muted ms-1\">v{app.version}</small>}\r\n </span>\r\n </button>\r\n </div>\r\n );\r\n};\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface BodyProps {\r\n icon: ReactNode;\r\n title: ReactNode;\r\n description?: ReactNode;\r\n children?: ReactNode;\r\n}\r\n\r\nexport function Body({ icon, title, description, children }: BodyProps) {\r\n return (\r\n\r\n <main className=\"col p-4\">\r\n <h2>{icon} {title}</h2>\r\n\r\n {description && <p>{description}</p>}\r\n {children}\r\n </main>\r\n );\r\n}\r\n","import { useState, type ReactNode, type MouseEvent } from \"react\";\r\n\r\nexport type ButtonVariant =\r\n | \"primary\"\r\n | \"secondary\"\r\n | \"success\"\r\n | \"danger\"\r\n | \"warning\"\r\n | \"info\"\r\n | \"light\"\r\n | \"dark\"\r\n | \"link\";\r\n\r\nexport interface ButtonProps {\r\n buttonClassName?: string;\r\n type?: \"button\" | \"submit\" | \"reset\";\r\n disabled?: boolean;\r\n\r\n variant?: ButtonVariant; // 👈 NEW — Bootstrap color support\r\n\r\n onAction?: () => Promise<unknown>;\r\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void;\r\n onDone?: (result: unknown) => void;\r\n onError?: (error: unknown) => void;\r\n onFinally?: () => void;\r\n\r\n children?: ReactNode;\r\n loadingChildren?: ReactNode;\r\n\r\n renderContent?: () => ReactNode;\r\n renderLoading?: () => ReactNode;\r\n\r\n loadingText?: string;\r\n showSpinner?: boolean;\r\n}\r\n\r\nexport function Button({\r\n buttonClassName = \"btn btn-primary\",\r\n type = \"button\",\r\n disabled = false,\r\n\r\n variant,\r\n\r\n onAction,\r\n onClick,\r\n onDone,\r\n onError,\r\n onFinally,\r\n\r\n children = \"Click me\",\r\n\r\n loadingChildren,\r\n renderContent,\r\n renderLoading,\r\n\r\n loadingText = \"Loading...\",\r\n showSpinner = true,\r\n}: ButtonProps) {\r\n const [loading, setLoading] = useState(false);\r\n\r\n const handleClick = async (event: MouseEvent<HTMLButtonElement>) => {\r\n if (loading) return;\r\n\r\n onClick?.(event);\r\n if (event.defaultPrevented) return;\r\n if (!onAction) return;\r\n\r\n try {\r\n setLoading(true);\r\n const result = await onAction();\r\n onDone?.(result);\r\n } catch (error) {\r\n onError?.(error);\r\n } finally {\r\n setLoading(false);\r\n onFinally?.();\r\n }\r\n };\r\n\r\n // 👇 Decide which CSS to use:\r\n // - if variant is provided, use Bootstrap \"btn btn-X\"\r\n // - otherwise fall back to user-supplied buttonClassName\r\n const baseClass = variant\r\n ? `btn btn-${variant}`\r\n : buttonClassName;\r\n\r\n return (\r\n <button\r\n type={type}\r\n className={`${baseClass} ${loading ? \"async-btn--loading\" : \"\"}`}\r\n onClick={handleClick}\r\n disabled={disabled || loading}\r\n >\r\n {loading ? (\r\n renderLoading?.() ??\r\n loadingChildren ?? (\r\n <>\r\n {showSpinner && (\r\n <span\r\n className=\"spinner-border spinner-border-sm me-2 async-btn__spinner\"\r\n role=\"status\"\r\n aria-hidden=\"true\"\r\n />\r\n )}\r\n {loadingText}\r\n </>\r\n )\r\n ) : (\r\n renderContent?.() ?? children\r\n )}\r\n </button>\r\n );\r\n}\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface FooterProps {\r\n children?: ReactNode;\r\n}\r\n\r\nexport function Footer({ children }: FooterProps) {\r\n return (\r\n <footer className=\"bg-dark text-white text-center py-2 mt-auto\">\r\n {children ?? \"© 2025 Your Site — All rights reserved\"}\r\n </footer>\r\n );\r\n}\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface HeaderProps {\r\n children?: ReactNode;\r\n}\r\n\r\nexport function Header({ children }: HeaderProps) {\r\n return (\r\n <nav className=\"navbar navbar-dark bg-dark px-3 sticky-top\">\r\n {children ?? (\r\n <span className=\"navbar-brand mb-0 h4\">My Website</span>\r\n )}\r\n </nav>\r\n );\r\n}\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface HeaderBrandProps {\r\n children: ReactNode;\r\n}\r\n\r\nexport function HeaderText({ children }: HeaderBrandProps) {\r\n return (\r\n <span className=\"navbar-brand mb-0 h4\">\r\n {children}\r\n </span>\r\n );\r\n}\r\n","// ImageCard.tsx\r\nimport React from \"react\";\r\n\r\ninterface ImageCardProps {\r\n src: string;\r\n alt: string;\r\n width?: string | number;\r\n height?: string | number;\r\n}\r\n\r\nexport const ImageCard: React.FC<ImageCardProps> = ({\r\n src,\r\n alt,\r\n}) => {\r\n return (\r\n <img\r\n src={src}\r\n alt={alt}\r\n className={\"w-100\"}\r\n style={{\r\n display: \"block\",\r\n objectFit: \"cover\",\r\n }}\r\n />\r\n );\r\n};\r\n","// components/NpmBadge.tsx\r\ninterface NpmBadgeProps {\r\n packageLabel: string;\r\n packageName: string;\r\n packageUrl: string; // e.g. \"@sparkstudio/authentication-ui\"\r\n color?: string; // optional (default black)\r\n height?: number; // optional (default 22)\r\n}\r\n\r\nexport function NpmBadge({ packageName, packageLabel, packageUrl, color = \"black\", height = 22 }: NpmBadgeProps) {\r\n const encodedLabel = encodeURIComponent(packageLabel);\r\n const badgeUrl = `https://img.shields.io/npm/v/${packageName}?logo=npm&label=${encodedLabel}&color=${color}`;\r\n const npmUrl = packageUrl;\r\n\r\n return (\r\n <a href={npmUrl} target=\"_blank\" rel=\"noopener noreferrer\">\r\n <img src={badgeUrl} alt={`${packageName} version`} style={{ height }} />\r\n </a>\r\n );\r\n}\r\n","// ThemeToggleButton.tsx\r\nimport { useEffect, useState } from \"react\";\r\nimport { Button, type ButtonVariant } from \"./Button\";\r\n\r\ntype Theme = \"light\" | \"dark\";\r\n\r\nconst STORAGE_KEY = \"bootstrap-theme\";\r\n\r\nfunction applyTheme(theme: Theme) {\r\n // You can also target document.body instead if you prefer:\r\n // document.body.setAttribute(\"data-bs-theme\", theme);\r\n document.documentElement.setAttribute(\"data-bs-theme\", theme);\r\n}\r\n\r\nexport function ThemeToggleButton() {\r\n const [theme, setTheme] = useState<Theme>(\"light\");\r\n\r\n // On mount: load saved theme or fall back to system preference\r\n useEffect(() => {\r\n const stored = localStorage.getItem(STORAGE_KEY) as Theme | null;\r\n\r\n if (stored === \"light\" || stored === \"dark\") {\r\n setTheme(stored);\r\n applyTheme(stored);\r\n return;\r\n }\r\n\r\n // If nothing saved, use system preferred color scheme\r\n const prefersDark = window.matchMedia?.(\"(prefers-color-scheme: dark)\").matches ?? false;\r\n\r\n const initialTheme: Theme = prefersDark ? \"dark\" : \"light\";\r\n setTheme(initialTheme);\r\n applyTheme(initialTheme);\r\n }, []);\r\n\r\n const handleToggle = () => {\r\n const next: Theme = theme === \"light\" ? \"dark\" : \"light\";\r\n setTheme(next);\r\n applyTheme(next);\r\n localStorage.setItem(STORAGE_KEY, next);\r\n };\r\n\r\n // Choose button style + text based on current theme\r\n const variant: ButtonVariant = theme === \"light\" ? \"dark\" : \"light\";\r\n const label = theme === \"light\" ? \"🌙 Dark mode\" : \"🌞 Light mode\";\r\n\r\n return (\r\n <Button variant={variant} onClick={handleToggle}>\r\n {label}\r\n </Button>\r\n );\r\n}\r\n","// components/Navigation.tsx\r\nimport type { ReactNode } from \"react\";\r\n\r\ninterface NavigationProps {\r\n title?: ReactNode;\r\n children: ReactNode;\r\n isOpen: boolean;\r\n onClose: () => void;\r\n}\r\n\r\nexport function Navigation({\r\n title = \"Navigation\",\r\n children,\r\n isOpen,\r\n onClose,\r\n}: NavigationProps) {\r\n return (\r\n <>\r\n {/* Desktop sidebar */}\r\n <nav className=\"col-auto p-3 h-100 d-none d-md-flex flex-column\">\r\n <h6 className=\"text-muted text-uppercase\">{title}</h6>\r\n\r\n <ul className=\"nav nav-pills flex-column gap-2 mt-3\">\r\n {children}\r\n </ul>\r\n </nav>\r\n\r\n {/* Mobile drawer */}\r\n <div\r\n className={`offcanvas offcanvas-start d-md-none ${isOpen ? \"show\" : \"\"}`}\r\n style={{ visibility: isOpen ? \"visible\" : \"hidden\" }}\r\n tabIndex={-1}\r\n aria-hidden={isOpen ? \"false\" : \"true\"}\r\n >\r\n <div className=\"offcanvas-header\">\r\n <h5 className=\"offcanvas-title\">{title}</h5>\r\n <button className=\"btn-close\" onClick={onClose} />\r\n </div>\r\n\r\n <div className=\"offcanvas-body\">\r\n <ul className=\"nav nav-pills flex-column gap-2 mt-2\">\r\n {children}\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n {/* Backdrop */}\r\n {isOpen && (\r\n <div\r\n className=\"offcanvas-backdrop fade show d-md-none\"\r\n onClick={onClose}\r\n />\r\n )}\r\n </>\r\n );\r\n}\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface NavigationItemProps {\r\n icon: ReactNode;\r\n title: ReactNode;\r\n type: string;\r\n active?: boolean;\r\n onClick?: (type: string) => void;\r\n}\r\n\r\nexport function NavigationItem({icon, title, type, active, onClick }: NavigationItemProps) {\r\n return (\r\n <li className=\"nav-item\">\r\n <button\r\n type=\"button\"\r\n className={`nav-link text-start w-100 ${active ? \"active\" : \"\"}`}\r\n onClick={() => onClick?.(type)}\r\n >\r\n {icon} {title}\r\n </button>\r\n </li>\r\n );\r\n}\r\n","// components/NavToggleButton.tsx\r\nimport React from \"react\";\r\nimport { Button } from \"../Button\";\r\n\r\ninterface NavToggleButtonProps {\r\n onClick: () => void;\r\n label?: string;\r\n color?: \"primary\" | \"secondary\" | \"success\" | \"danger\" | \"warning\" | \"info\" | \"light\" | \"dark\";\r\n}\r\n\r\nexport const NavToggleButton: React.FC<NavToggleButtonProps> = ({\r\n onClick,\r\n color = \"dark\",\r\n}) => {\r\n return (\r\n <div className=\"ms-auto pe-2 d-md-none\">\r\n <Button\r\n variant={color}\r\n buttonClassName=\"btn btn-secondary\"\r\n onClick={() => onClick()}\r\n >\r\n ☰\r\n </Button>\r\n </div>\r\n );\r\n};\r\n","import { useEffect } from \"react\";\r\n\r\nexport type NotificationType = \"success\" | \"info\" | \"warning\" | \"danger\";\r\n\r\nexport interface Notification {\r\n id: string;\r\n message: string;\r\n type?: NotificationType;\r\n autoCloseMs?: number;\r\n}\r\n\r\ninterface NotificationsProps {\r\n notifications: Notification[];\r\n onClose: (id: string) => void;\r\n}\r\n\r\nexport function Notifications({ notifications, onClose }: NotificationsProps) {\r\n useEffect(() => {\r\n notifications.forEach((n) => {\r\n if (!n.autoCloseMs) return;\r\n\r\n const timer = setTimeout(() => onClose(n.id), n.autoCloseMs);\r\n return () => clearTimeout(timer);\r\n });\r\n }, [notifications, onClose]);\r\n\r\n return (\r\n <div\r\n className=\"position-fixed top-0 end-0\"\r\n style={{ zIndex: 1080, width: 340 }}\r\n >\r\n {notifications.map((n) => (\r\n <div\r\n key={n.id}\r\n className={`alert alert-${n.type ?? \"info\"} alert-dismissible fade show shadow-sm mb-2`}\r\n role=\"alert\"\r\n >\r\n {n.message}\r\n\r\n <button\r\n type=\"button\"\r\n className=\"btn-close\"\r\n aria-label=\"Close\"\r\n onClick={() => onClose(n.id)}\r\n />\r\n </div>\r\n ))}\r\n </div>\r\n );\r\n}\r\n","import {\r\n createContext,\r\n useCallback,\r\n useContext,\r\n useEffect,\r\n useState,\r\n type ReactNode,\r\n} from \"react\";\r\nimport type { NotificationType } from \"./Notifications\";\r\n\r\n// Rename to avoid conflict with browser Notification type\r\nexport interface AppNotification {\r\n id: string;\r\n message: string;\r\n type?: NotificationType;\r\n autoCloseMs?: number;\r\n}\r\n\r\ninterface NotificationsContextValue {\r\n push: (message: string, type?: NotificationType, autoCloseMs?: number) => void;\r\n}\r\n\r\nconst NotificationsContext = createContext<NotificationsContextValue | undefined>(\r\n undefined\r\n);\r\n\r\ninterface NotificationsProviderProps {\r\n children: ReactNode;\r\n}\r\n\r\nexport function NotificationsProvider({ children }: NotificationsProviderProps) {\r\n const [notifications, setNotifications] = useState<AppNotification[]>([]);\r\n\r\n const push = useCallback(\r\n (message: string, type: NotificationType = \"info\", autoCloseMs = 4000) => {\r\n setNotifications((prev) => [\r\n ...prev,\r\n {\r\n id: crypto.randomUUID(),\r\n message,\r\n type,\r\n autoCloseMs,\r\n },\r\n ]);\r\n },\r\n []\r\n );\r\n\r\n const close = useCallback((id: string) => {\r\n setNotifications((list) => list.filter((n) => n.id !== id));\r\n }, []);\r\n\r\n // Handle auto close timers\r\n useEffect(() => {\r\n const timers = notifications.map((n) => {\r\n if (!n.autoCloseMs) return null;\r\n return setTimeout(() => close(n.id), n.autoCloseMs);\r\n });\r\n\r\n return () => {\r\n timers.forEach((t) => t && clearTimeout(t));\r\n };\r\n }, [notifications, close]);\r\n\r\n return (\r\n <NotificationsContext.Provider value={{ push }}>\r\n {/* overlay renderer */}\r\n <div\r\n className=\"position-fixed top-0 end-0\"\r\n style={{ zIndex: 1080, width: 340 }}\r\n >\r\n {notifications.map((n) => (\r\n <div\r\n key={n.id}\r\n className={`alert alert-${n.type ?? \"info\"} alert-dismissible fade show shadow-sm mb-2`}\r\n role=\"alert\"\r\n >\r\n {n.message}\r\n <button\r\n type=\"button\"\r\n className=\"btn-close\"\r\n aria-label=\"Close\"\r\n onClick={() => close(n.id)}\r\n />\r\n </div>\r\n ))}\r\n </div>\r\n\r\n {children}\r\n </NotificationsContext.Provider>\r\n );\r\n}\r\n\r\nexport function UseNotifications(): NotificationsContextValue {\r\n const ctx = useContext(NotificationsContext);\r\n if (!ctx) {\r\n throw new Error(\"useNotifications must be used within a NotificationsProvider\");\r\n }\r\n return ctx;\r\n}\r\n","// ./views/AppsView.tsx (or ./components/AppsView.tsx)\r\nimport React from \"react\";\r\nimport type { AppItem } from \"../../models/AppItem\";\r\nimport { AppTile } from \"../AppTile\";\r\n\r\ninterface AppsViewProps {\r\n apps: AppItem[];\r\n title?: string;\r\n onAppClick?: (app: AppItem) => void;\r\n}\r\n\r\nexport const AppsView: React.FC<AppsViewProps> = ({ apps, title, onAppClick }) => {\r\n return (\r\n <>\r\n {title && <h5 className=\"mb-3\">{title}</h5>}\r\n\r\n <div className=\"row justify-content-center justify-content-md-start\">\r\n {apps.map((app) => (\r\n <AppTile key={app.id} app={app} onClick={onAppClick} />\r\n ))}\r\n </div>\r\n </>\r\n );\r\n};\r\n","export function ContentContainer({ children }: React.PropsWithChildren) {\r\n return <div className=\"container-fluid flex-grow-1 container-lg\">{children}</div>;\r\n}\r\n","export function ContentRow({ children }: React.PropsWithChildren) {\r\n return <div className=\"row h-100 flex-nowrap\">{children}</div>;\r\n}\r\n","\r\nexport function LayoutWrapper({ children }: React.PropsWithChildren) {\r\n return (\r\n\r\n <div className=\"d-flex flex-column min-vh-100\">{children}</div>\r\n );\r\n}\r\n","// components/Modal.tsx\r\nimport React from \"react\";\r\n\r\nexport interface ModalProps {\r\n title?: string;\r\n isOpen: boolean;\r\n onClose: () => void;\r\n onConfirm?: () => void;\r\n confirmText?: string;\r\n\r\n disableBackdropClose?: boolean;\r\n disableAllButtons?: boolean;\r\n\r\n showHeaderClose?: boolean;\r\n showCloseButton?: boolean;\r\n showConfirmButton?: boolean;\r\n\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport const Modal: React.FC<ModalProps> = ({\r\n title,\r\n isOpen,\r\n onClose,\r\n onConfirm,\r\n confirmText = \"OK\",\r\n\r\n disableBackdropClose = false,\r\n disableAllButtons = false,\r\n\r\n showHeaderClose = true,\r\n showCloseButton = true,\r\n showConfirmButton = true,\r\n\r\n children,\r\n}) => {\r\n if (!isOpen) return null;\r\n\r\n const handleBackdropClick = () => {\r\n if (disableBackdropClose || disableAllButtons) return;\r\n onClose();\r\n };\r\n\r\n const handleContentClick: React.MouseEventHandler<HTMLDivElement> = (e) => {\r\n e.stopPropagation();\r\n };\r\n\r\n // 👇 NEW: decide if footer should exist at all\r\n const hasFooterButtons =\r\n (showCloseButton || (onConfirm && showConfirmButton)) &&\r\n !disableAllButtons;\r\n\r\n return (\r\n <>\r\n <div\r\n className=\"modal-backdrop fade show\"\r\n style={{ zIndex: 1040 }}\r\n onClick={handleBackdropClick}\r\n />\r\n\r\n <div\r\n className=\"modal fade show d-block\"\r\n tabIndex={-1}\r\n role=\"dialog\"\r\n style={{ zIndex: 1050 }}\r\n onClick={handleBackdropClick}\r\n >\r\n <div\r\n className=\"modal-dialog modal-dialog-centered\"\r\n role=\"document\"\r\n onClick={handleContentClick}\r\n >\r\n <div className=\"modal-content shadow\">\r\n {/* Header */}\r\n <div className=\"modal-header\">\r\n {title && <h5 className=\"modal-title\">{title}</h5>}\r\n\r\n {showHeaderClose && (\r\n <button\r\n type=\"button\"\r\n className=\"btn-close\"\r\n aria-label=\"Close\"\r\n onClick={onClose}\r\n disabled={disableAllButtons}\r\n />\r\n )}\r\n </div>\r\n\r\n {/* Body */}\r\n <div className=\"modal-body\">{children}</div>\r\n\r\n {/* Footer — only if buttons are visible */}\r\n {hasFooterButtons && (\r\n <div className=\"modal-footer\">\r\n {showCloseButton && (\r\n <button\r\n type=\"button\"\r\n className=\"btn btn-secondary\"\r\n onClick={onClose}\r\n disabled={disableAllButtons}\r\n >\r\n Close\r\n </button>\r\n )}\r\n\r\n {onConfirm && showConfirmButton && (\r\n <button\r\n type=\"button\"\r\n className=\"btn btn-primary\"\r\n onClick={onConfirm}\r\n disabled={disableAllButtons}\r\n >\r\n {confirmText}\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n </>\r\n );\r\n};\r\n","import {\r\n createContext,\r\n useCallback,\r\n useContext,\r\n useState,\r\n type ReactNode,\r\n} from \"react\";\r\nimport { Modal } from \"./Modal\";\r\n\r\nexport interface ModalOptions {\r\n title?: string;\r\n confirmText?: string;\r\n disableBackdropClose?: boolean;\r\n onConfirm?: () => void;\r\n\r\n /** extra control flags matching Modal.tsx */\r\n disableAllButtons?: boolean;\r\n showHeaderClose?: boolean;\r\n showCloseButton?: boolean;\r\n showConfirmButton?: boolean;\r\n}\r\n\r\ninterface ModalContextValue {\r\n openModal: (content: ReactNode, options?: ModalOptions) => void;\r\n closeModal: () => void;\r\n}\r\n\r\nconst ModalContext = createContext<ModalContextValue | undefined>(undefined);\r\n\r\nexport function ModalProvider({ children }: { children: ReactNode }) {\r\n const [isOpen, setIsOpen] = useState(false);\r\n const [content, setContent] = useState<ReactNode>(null);\r\n const [options, setOptions] = useState<ModalOptions>({});\r\n\r\n const openModal = useCallback((content: ReactNode, options?: ModalOptions) => {\r\n setContent(content);\r\n setOptions(options ?? {});\r\n setIsOpen(true);\r\n }, []);\r\n\r\n const closeModal = useCallback(() => {\r\n setIsOpen(false);\r\n }, []);\r\n\r\n return (\r\n <ModalContext.Provider value={{ openModal, closeModal }}>\r\n {children}\r\n\r\n <Modal\r\n isOpen={isOpen}\r\n title={options.title}\r\n confirmText={options.confirmText}\r\n disableBackdropClose={options.disableBackdropClose}\r\n disableAllButtons={options.disableAllButtons}\r\n showHeaderClose={options.showHeaderClose}\r\n showCloseButton={options.showCloseButton}\r\n showConfirmButton={options.showConfirmButton}\r\n onClose={closeModal}\r\n onConfirm={options.onConfirm}\r\n >\r\n {content}\r\n </Modal>\r\n </ModalContext.Provider>\r\n );\r\n}\r\n\r\nexport function UseModal() {\r\n const ctx = useContext(ModalContext);\r\n if (!ctx) throw new Error(\"UseModal must be used within ModalProvider\");\r\n return ctx;\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACwCI;AAlBG,IAAM,QAA8B,CAAC;AAAA,EAC1C,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gBAMO;AAuCH,IAAAC,uBAAA;AAlBJ,IAAM,mBAAe,6BAA6C,MAAS;AAEpE,SAAS,cAAc,EAAE,SAAS,GAA4B;AACnE,QAAM,CAAC,QAAQ,SAAS,QAAI,wBAAS,KAAK;AAC1C,QAAM,CAAC,SAAS,UAAU,QAAI,wBAAoB,IAAI;AACtD,QAAM,CAAC,SAAS,UAAU,QAAI,wBAAuB,CAAC,CAAC;AAEvD,QAAM,gBAAY,2BAAY,CAACC,UAAoBC,aAA2B;AAC5E,eAAWD,QAAO;AAClB,eAAWC,YAAW,CAAC,CAAC;AACxB,cAAU,IAAI;AAAA,EAChB,GAAG,CAAC,CAAC;AAEL,QAAM,iBAAa,2BAAY,MAAM;AACnC,cAAU,KAAK;AAAA,EACjB,GAAG,CAAC,CAAC;AAEL,SACE,+CAAC,aAAa,UAAb,EAAsB,OAAO,EAAE,WAAW,WAAW,GACnD;AAAA;AAAA,IAED;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,OAAO,QAAQ;AAAA,QACf,aAAa,QAAQ;AAAA,QACrB,sBAAsB,QAAQ;AAAA,QAC9B,mBAAmB,QAAQ;AAAA,QAC3B,iBAAiB,QAAQ;AAAA,QACzB,iBAAiB,QAAQ;AAAA,QACzB,mBAAmB,QAAQ;AAAA,QAC3B,SAAS;AAAA,QACT,WAAW,QAAQ;AAAA,QAElB;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;AAEO,SAAS,WAAW;AACzB,QAAM,UAAM,0BAAW,YAAY;AACnC,MAAI,CAAC,IAAK,OAAM,IAAI,MAAM,4CAA4C;AACtE,SAAO;AACT;","names":["import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_react","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_react","import_jsx_runtime","import_react","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_react","import_jsx_runtime","content","options"]}
package/dist/index.d.cts CHANGED
@@ -86,6 +86,8 @@ interface NpmBadgeProps {
86
86
  }
87
87
  declare function NpmBadge({ packageName, packageLabel, packageUrl, color, height }: NpmBadgeProps): react_jsx_runtime.JSX.Element;
88
88
 
89
+ declare function ThemeToggleButton(): react_jsx_runtime.JSX.Element;
90
+
89
91
  interface NavigationProps {
90
92
  title?: ReactNode;
91
93
  children: ReactNode;
@@ -186,4 +188,4 @@ declare function ModalProvider({ children }: {
186
188
  }): react_jsx_runtime.JSX.Element;
187
189
  declare function UseModal(): ModalContextValue;
188
190
 
189
- export { Alert, type AlertVariant, type AppItem, type AppNotification, AppTile, AppsView, Body, Button, type ButtonProps, type ButtonVariant, ContentContainer, ContentRow, Footer, Header, HeaderText, ImageCard, LayoutWrapper, Modal, type ModalOptions, type ModalProps, ModalProvider, NavToggleButton, Navigation, NavigationItem, type Notification, type NotificationType, Notifications, NotificationsProvider, NpmBadge, UseModal, UseNotifications };
191
+ export { Alert, type AlertVariant, type AppItem, type AppNotification, AppTile, AppsView, Body, Button, type ButtonProps, type ButtonVariant, ContentContainer, ContentRow, Footer, Header, HeaderText, ImageCard, LayoutWrapper, Modal, type ModalOptions, type ModalProps, ModalProvider, NavToggleButton, Navigation, NavigationItem, type Notification, type NotificationType, Notifications, NotificationsProvider, NpmBadge, ThemeToggleButton, UseModal, UseNotifications };
package/dist/index.d.ts CHANGED
@@ -86,6 +86,8 @@ interface NpmBadgeProps {
86
86
  }
87
87
  declare function NpmBadge({ packageName, packageLabel, packageUrl, color, height }: NpmBadgeProps): react_jsx_runtime.JSX.Element;
88
88
 
89
+ declare function ThemeToggleButton(): react_jsx_runtime.JSX.Element;
90
+
89
91
  interface NavigationProps {
90
92
  title?: ReactNode;
91
93
  children: ReactNode;
@@ -186,4 +188,4 @@ declare function ModalProvider({ children }: {
186
188
  }): react_jsx_runtime.JSX.Element;
187
189
  declare function UseModal(): ModalContextValue;
188
190
 
189
- export { Alert, type AlertVariant, type AppItem, type AppNotification, AppTile, AppsView, Body, Button, type ButtonProps, type ButtonVariant, ContentContainer, ContentRow, Footer, Header, HeaderText, ImageCard, LayoutWrapper, Modal, type ModalOptions, type ModalProps, ModalProvider, NavToggleButton, Navigation, NavigationItem, type Notification, type NotificationType, Notifications, NotificationsProvider, NpmBadge, UseModal, UseNotifications };
191
+ export { Alert, type AlertVariant, type AppItem, type AppNotification, AppTile, AppsView, Body, Button, type ButtonProps, type ButtonVariant, ContentContainer, ContentRow, Footer, Header, HeaderText, ImageCard, LayoutWrapper, Modal, type ModalOptions, type ModalProps, ModalProvider, NavToggleButton, Navigation, NavigationItem, type Notification, type NotificationType, Notifications, NotificationsProvider, NpmBadge, ThemeToggleButton, UseModal, UseNotifications };
package/dist/index.js CHANGED
@@ -173,8 +173,40 @@ function NpmBadge({ packageName, packageLabel, packageUrl, color = "black", heig
173
173
  return /* @__PURE__ */ jsx9("a", { href: npmUrl, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsx9("img", { src: badgeUrl, alt: `${packageName} version`, style: { height } }) });
174
174
  }
175
175
 
176
+ // src/components/ThemeToggleButton.tsx
177
+ import { useEffect, useState as useState2 } from "react";
178
+ import { jsx as jsx10 } from "react/jsx-runtime";
179
+ var STORAGE_KEY = "bootstrap-theme";
180
+ function applyTheme(theme) {
181
+ document.documentElement.setAttribute("data-bs-theme", theme);
182
+ }
183
+ function ThemeToggleButton() {
184
+ const [theme, setTheme] = useState2("light");
185
+ useEffect(() => {
186
+ const stored = localStorage.getItem(STORAGE_KEY);
187
+ if (stored === "light" || stored === "dark") {
188
+ setTheme(stored);
189
+ applyTheme(stored);
190
+ return;
191
+ }
192
+ const prefersDark = window.matchMedia?.("(prefers-color-scheme: dark)").matches ?? false;
193
+ const initialTheme = prefersDark ? "dark" : "light";
194
+ setTheme(initialTheme);
195
+ applyTheme(initialTheme);
196
+ }, []);
197
+ const handleToggle = () => {
198
+ const next = theme === "light" ? "dark" : "light";
199
+ setTheme(next);
200
+ applyTheme(next);
201
+ localStorage.setItem(STORAGE_KEY, next);
202
+ };
203
+ const variant = theme === "light" ? "dark" : "light";
204
+ const label = theme === "light" ? "\u{1F319} Dark mode" : "\u{1F31E} Light mode";
205
+ return /* @__PURE__ */ jsx10(Button, { variant, onClick: handleToggle, children: label });
206
+ }
207
+
176
208
  // src/components/navigation/Navigation.tsx
177
- import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
209
+ import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
178
210
  function Navigation({
179
211
  title = "Navigation",
180
212
  children,
@@ -183,8 +215,8 @@ function Navigation({
183
215
  }) {
184
216
  return /* @__PURE__ */ jsxs5(Fragment2, { children: [
185
217
  /* @__PURE__ */ jsxs5("nav", { className: "col-auto p-3 h-100 d-none d-md-flex flex-column", children: [
186
- /* @__PURE__ */ jsx10("h6", { className: "text-muted text-uppercase", children: title }),
187
- /* @__PURE__ */ jsx10("ul", { className: "nav nav-pills flex-column gap-2 mt-3", children })
218
+ /* @__PURE__ */ jsx11("h6", { className: "text-muted text-uppercase", children: title }),
219
+ /* @__PURE__ */ jsx11("ul", { className: "nav nav-pills flex-column gap-2 mt-3", children })
188
220
  ] }),
189
221
  /* @__PURE__ */ jsxs5(
190
222
  "div",
@@ -195,14 +227,14 @@ function Navigation({
195
227
  "aria-hidden": isOpen ? "false" : "true",
196
228
  children: [
197
229
  /* @__PURE__ */ jsxs5("div", { className: "offcanvas-header", children: [
198
- /* @__PURE__ */ jsx10("h5", { className: "offcanvas-title", children: title }),
199
- /* @__PURE__ */ jsx10("button", { className: "btn-close", onClick: onClose })
230
+ /* @__PURE__ */ jsx11("h5", { className: "offcanvas-title", children: title }),
231
+ /* @__PURE__ */ jsx11("button", { className: "btn-close", onClick: onClose })
200
232
  ] }),
201
- /* @__PURE__ */ jsx10("div", { className: "offcanvas-body", children: /* @__PURE__ */ jsx10("ul", { className: "nav nav-pills flex-column gap-2 mt-2", children }) })
233
+ /* @__PURE__ */ jsx11("div", { className: "offcanvas-body", children: /* @__PURE__ */ jsx11("ul", { className: "nav nav-pills flex-column gap-2 mt-2", children }) })
202
234
  ]
203
235
  }
204
236
  ),
205
- isOpen && /* @__PURE__ */ jsx10(
237
+ isOpen && /* @__PURE__ */ jsx11(
206
238
  "div",
207
239
  {
208
240
  className: "offcanvas-backdrop fade show d-md-none",
@@ -213,9 +245,9 @@ function Navigation({
213
245
  }
214
246
 
215
247
  // src/components/navigation/NavigationItem.tsx
216
- import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
248
+ import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
217
249
  function NavigationItem({ icon, title, type, active, onClick }) {
218
- return /* @__PURE__ */ jsx11("li", { className: "nav-item", children: /* @__PURE__ */ jsxs6(
250
+ return /* @__PURE__ */ jsx12("li", { className: "nav-item", children: /* @__PURE__ */ jsxs6(
219
251
  "button",
220
252
  {
221
253
  type: "button",
@@ -231,12 +263,12 @@ function NavigationItem({ icon, title, type, active, onClick }) {
231
263
  }
232
264
 
233
265
  // src/components/navigation/NavToggleButton.tsx
234
- import { jsx as jsx12 } from "react/jsx-runtime";
266
+ import { jsx as jsx13 } from "react/jsx-runtime";
235
267
  var NavToggleButton = ({
236
268
  onClick,
237
269
  color = "dark"
238
270
  }) => {
239
- return /* @__PURE__ */ jsx12("div", { className: "ms-auto pe-2 d-md-none", children: /* @__PURE__ */ jsx12(
271
+ return /* @__PURE__ */ jsx13("div", { className: "ms-auto pe-2 d-md-none", children: /* @__PURE__ */ jsx13(
240
272
  Button,
241
273
  {
242
274
  variant: color,
@@ -248,17 +280,17 @@ var NavToggleButton = ({
248
280
  };
249
281
 
250
282
  // src/components/notifications/Notifications.tsx
251
- import { useEffect } from "react";
252
- import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
283
+ import { useEffect as useEffect2 } from "react";
284
+ import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
253
285
  function Notifications({ notifications, onClose }) {
254
- useEffect(() => {
286
+ useEffect2(() => {
255
287
  notifications.forEach((n) => {
256
288
  if (!n.autoCloseMs) return;
257
289
  const timer = setTimeout(() => onClose(n.id), n.autoCloseMs);
258
290
  return () => clearTimeout(timer);
259
291
  });
260
292
  }, [notifications, onClose]);
261
- return /* @__PURE__ */ jsx13(
293
+ return /* @__PURE__ */ jsx14(
262
294
  "div",
263
295
  {
264
296
  className: "position-fixed top-0 end-0",
@@ -270,7 +302,7 @@ function Notifications({ notifications, onClose }) {
270
302
  role: "alert",
271
303
  children: [
272
304
  n.message,
273
- /* @__PURE__ */ jsx13(
305
+ /* @__PURE__ */ jsx14(
274
306
  "button",
275
307
  {
276
308
  type: "button",
@@ -292,15 +324,15 @@ import {
292
324
  createContext,
293
325
  useCallback,
294
326
  useContext,
295
- useEffect as useEffect2,
296
- useState as useState2
327
+ useEffect as useEffect3,
328
+ useState as useState3
297
329
  } from "react";
298
- import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
330
+ import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
299
331
  var NotificationsContext = createContext(
300
332
  void 0
301
333
  );
302
334
  function NotificationsProvider({ children }) {
303
- const [notifications, setNotifications] = useState2([]);
335
+ const [notifications, setNotifications] = useState3([]);
304
336
  const push = useCallback(
305
337
  (message, type = "info", autoCloseMs = 4e3) => {
306
338
  setNotifications((prev) => [
@@ -318,7 +350,7 @@ function NotificationsProvider({ children }) {
318
350
  const close = useCallback((id) => {
319
351
  setNotifications((list) => list.filter((n) => n.id !== id));
320
352
  }, []);
321
- useEffect2(() => {
353
+ useEffect3(() => {
322
354
  const timers = notifications.map((n) => {
323
355
  if (!n.autoCloseMs) return null;
324
356
  return setTimeout(() => close(n.id), n.autoCloseMs);
@@ -328,7 +360,7 @@ function NotificationsProvider({ children }) {
328
360
  };
329
361
  }, [notifications, close]);
330
362
  return /* @__PURE__ */ jsxs8(NotificationsContext.Provider, { value: { push }, children: [
331
- /* @__PURE__ */ jsx14(
363
+ /* @__PURE__ */ jsx15(
332
364
  "div",
333
365
  {
334
366
  className: "position-fixed top-0 end-0",
@@ -340,7 +372,7 @@ function NotificationsProvider({ children }) {
340
372
  role: "alert",
341
373
  children: [
342
374
  n.message,
343
- /* @__PURE__ */ jsx14(
375
+ /* @__PURE__ */ jsx15(
344
376
  "button",
345
377
  {
346
378
  type: "button",
@@ -367,34 +399,34 @@ function UseNotifications() {
367
399
  }
368
400
 
369
401
  // src/components/views/AppsView.tsx
370
- import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
402
+ import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
371
403
  var AppsView = ({ apps, title, onAppClick }) => {
372
404
  return /* @__PURE__ */ jsxs9(Fragment3, { children: [
373
- title && /* @__PURE__ */ jsx15("h5", { className: "mb-3", children: title }),
374
- /* @__PURE__ */ jsx15("div", { className: "row justify-content-center justify-content-md-start", children: apps.map((app) => /* @__PURE__ */ jsx15(AppTile, { app, onClick: onAppClick }, app.id)) })
405
+ title && /* @__PURE__ */ jsx16("h5", { className: "mb-3", children: title }),
406
+ /* @__PURE__ */ jsx16("div", { className: "row justify-content-center justify-content-md-start", children: apps.map((app) => /* @__PURE__ */ jsx16(AppTile, { app, onClick: onAppClick }, app.id)) })
375
407
  ] });
376
408
  };
377
409
 
378
410
  // src/components/wrappers/ContentContainer.tsx
379
- import { jsx as jsx16 } from "react/jsx-runtime";
411
+ import { jsx as jsx17 } from "react/jsx-runtime";
380
412
  function ContentContainer({ children }) {
381
- return /* @__PURE__ */ jsx16("div", { className: "container-fluid flex-grow-1", children });
413
+ return /* @__PURE__ */ jsx17("div", { className: "container-fluid flex-grow-1 container-lg", children });
382
414
  }
383
415
 
384
416
  // src/components/wrappers/ContentRow.tsx
385
- import { jsx as jsx17 } from "react/jsx-runtime";
417
+ import { jsx as jsx18 } from "react/jsx-runtime";
386
418
  function ContentRow({ children }) {
387
- return /* @__PURE__ */ jsx17("div", { className: "row h-100 flex-nowrap", children });
419
+ return /* @__PURE__ */ jsx18("div", { className: "row h-100 flex-nowrap", children });
388
420
  }
389
421
 
390
422
  // src/components/wrappers/LayoutWrapper.tsx
391
- import { jsx as jsx18 } from "react/jsx-runtime";
423
+ import { jsx as jsx19 } from "react/jsx-runtime";
392
424
  function LayoutWrapper({ children }) {
393
- return /* @__PURE__ */ jsx18("div", { className: "d-flex flex-column min-vh-100", children });
425
+ return /* @__PURE__ */ jsx19("div", { className: "d-flex flex-column min-vh-100", children });
394
426
  }
395
427
 
396
428
  // src/modal/Modal.tsx
397
- import { Fragment as Fragment4, jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
429
+ import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
398
430
  var Modal = ({
399
431
  title,
400
432
  isOpen,
@@ -418,7 +450,7 @@ var Modal = ({
418
450
  };
419
451
  const hasFooterButtons = (showCloseButton || onConfirm && showConfirmButton) && !disableAllButtons;
420
452
  return /* @__PURE__ */ jsxs10(Fragment4, { children: [
421
- /* @__PURE__ */ jsx19(
453
+ /* @__PURE__ */ jsx20(
422
454
  "div",
423
455
  {
424
456
  className: "modal-backdrop fade show",
@@ -426,7 +458,7 @@ var Modal = ({
426
458
  onClick: handleBackdropClick
427
459
  }
428
460
  ),
429
- /* @__PURE__ */ jsx19(
461
+ /* @__PURE__ */ jsx20(
430
462
  "div",
431
463
  {
432
464
  className: "modal fade show d-block",
@@ -434,7 +466,7 @@ var Modal = ({
434
466
  role: "dialog",
435
467
  style: { zIndex: 1050 },
436
468
  onClick: handleBackdropClick,
437
- children: /* @__PURE__ */ jsx19(
469
+ children: /* @__PURE__ */ jsx20(
438
470
  "div",
439
471
  {
440
472
  className: "modal-dialog modal-dialog-centered",
@@ -442,8 +474,8 @@ var Modal = ({
442
474
  onClick: handleContentClick,
443
475
  children: /* @__PURE__ */ jsxs10("div", { className: "modal-content shadow", children: [
444
476
  /* @__PURE__ */ jsxs10("div", { className: "modal-header", children: [
445
- title && /* @__PURE__ */ jsx19("h5", { className: "modal-title", children: title }),
446
- showHeaderClose && /* @__PURE__ */ jsx19(
477
+ title && /* @__PURE__ */ jsx20("h5", { className: "modal-title", children: title }),
478
+ showHeaderClose && /* @__PURE__ */ jsx20(
447
479
  "button",
448
480
  {
449
481
  type: "button",
@@ -454,9 +486,9 @@ var Modal = ({
454
486
  }
455
487
  )
456
488
  ] }),
457
- /* @__PURE__ */ jsx19("div", { className: "modal-body", children }),
489
+ /* @__PURE__ */ jsx20("div", { className: "modal-body", children }),
458
490
  hasFooterButtons && /* @__PURE__ */ jsxs10("div", { className: "modal-footer", children: [
459
- showCloseButton && /* @__PURE__ */ jsx19(
491
+ showCloseButton && /* @__PURE__ */ jsx20(
460
492
  "button",
461
493
  {
462
494
  type: "button",
@@ -466,7 +498,7 @@ var Modal = ({
466
498
  children: "Close"
467
499
  }
468
500
  ),
469
- onConfirm && showConfirmButton && /* @__PURE__ */ jsx19(
501
+ onConfirm && showConfirmButton && /* @__PURE__ */ jsx20(
470
502
  "button",
471
503
  {
472
504
  type: "button",
@@ -490,14 +522,14 @@ import {
490
522
  createContext as createContext2,
491
523
  useCallback as useCallback2,
492
524
  useContext as useContext2,
493
- useState as useState3
525
+ useState as useState4
494
526
  } from "react";
495
- import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
527
+ import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
496
528
  var ModalContext = createContext2(void 0);
497
529
  function ModalProvider({ children }) {
498
- const [isOpen, setIsOpen] = useState3(false);
499
- const [content, setContent] = useState3(null);
500
- const [options, setOptions] = useState3({});
530
+ const [isOpen, setIsOpen] = useState4(false);
531
+ const [content, setContent] = useState4(null);
532
+ const [options, setOptions] = useState4({});
501
533
  const openModal = useCallback2((content2, options2) => {
502
534
  setContent(content2);
503
535
  setOptions(options2 ?? {});
@@ -508,7 +540,7 @@ function ModalProvider({ children }) {
508
540
  }, []);
509
541
  return /* @__PURE__ */ jsxs11(ModalContext.Provider, { value: { openModal, closeModal }, children: [
510
542
  children,
511
- /* @__PURE__ */ jsx20(
543
+ /* @__PURE__ */ jsx21(
512
544
  Modal,
513
545
  {
514
546
  isOpen,
@@ -552,6 +584,7 @@ export {
552
584
  Notifications,
553
585
  NotificationsProvider,
554
586
  NpmBadge,
587
+ ThemeToggleButton,
555
588
  UseModal,
556
589
  UseNotifications
557
590
  };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Alert.tsx","../src/components/AppTile.tsx","../src/components/Body.tsx","../src/components/Button.tsx","../src/components/Footer.tsx","../src/components/Header.tsx","../src/components/HeaderText.tsx","../src/components/Icon.tsx","../src/components/NpmBadge.tsx","../src/components/navigation/Navigation.tsx","../src/components/navigation/NavigationItem.tsx","../src/components/navigation/NavToggleButton.tsx","../src/components/notifications/Notifications.tsx","../src/components/notifications/NotificationsProvider.tsx","../src/components/views/AppsView.tsx","../src/components/wrappers/ContentContainer.tsx","../src/components/wrappers/ContentRow.tsx","../src/components/wrappers/LayoutWrapper.tsx","../src/modal/Modal.tsx","../src/modal/ModalProvider.tsx"],"sourcesContent":["// components/Alert.tsx\r\nimport React from \"react\";\r\n\r\nexport type AlertVariant =\r\n | \"primary\"\r\n | \"secondary\"\r\n | \"success\"\r\n | \"danger\"\r\n | \"warning\"\r\n | \"info\"\r\n | \"light\"\r\n | \"dark\";\r\n\r\ninterface AlertProps {\r\n variant?: AlertVariant;\r\n title?: string;\r\n dismissible?: boolean;\r\n className?: string;\r\n children: React.ReactNode;\r\n onClose?: () => void;\r\n}\r\n\r\nexport const Alert: React.FC<AlertProps> = ({\r\n variant = \"info\",\r\n title,\r\n dismissible = false,\r\n className = \"\",\r\n children,\r\n onClose,\r\n}) => {\r\n const classes = [\r\n \"alert\",\r\n `alert-${variant}`,\r\n dismissible ? \"alert-dismissible fade show\" : \"\",\r\n className,\r\n ]\r\n .filter(Boolean)\r\n .join(\" \");\r\n\r\n return (\r\n <div role=\"alert\" className={classes}>\r\n {title && <strong className=\"d-block mb-1\">{title}</strong>}\r\n {children}\r\n\r\n {dismissible && (\r\n <button\r\n type=\"button\"\r\n className=\"btn-close\"\r\n aria-label=\"Close\"\r\n onClick={onClose}\r\n />\r\n )}\r\n </div>\r\n );\r\n};\r\n","import React from \"react\";\r\nimport type { AppItem } from \"../models/AppItem\";\r\n\r\ninterface AppTileProps {\r\n app: AppItem;\r\n onClick?: (app: AppItem) => void;\r\n}\r\n\r\nexport const AppTile: React.FC<AppTileProps> = ({ app, onClick }) => {\r\n return (\r\n <div className=\"col-auto\">\r\n <button\r\n type=\"button\"\r\n className=\"btn p-2 d-flex flex-column align-items-center border-0 bg-transparent app-icon-btn\"\r\n onClick={() => onClick?.(app)}\r\n >\r\n <div className=\"app-icon-tile d-flex align-items-center justify-content-center mb-1\">\r\n <span style={{fontSize:\"32px\"}}>{app.icon}</span>\r\n </div>\r\n\r\n <span className=\"w-100 small text-truncate\">\r\n {app.name}\r\n {app.version && <small className=\"text-muted ms-1\">v{app.version}</small>}\r\n </span>\r\n </button>\r\n </div>\r\n );\r\n};\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface BodyProps {\r\n icon: ReactNode;\r\n title: ReactNode;\r\n description?: ReactNode;\r\n children?: ReactNode;\r\n}\r\n\r\nexport function Body({ icon, title, description, children }: BodyProps) {\r\n return (\r\n\r\n <main className=\"col p-4\">\r\n <h2>{icon} {title}</h2>\r\n\r\n {description && <p>{description}</p>}\r\n {children}\r\n </main>\r\n );\r\n}\r\n","import { useState, type ReactNode, type MouseEvent } from \"react\";\r\n\r\nexport type ButtonVariant =\r\n | \"primary\"\r\n | \"secondary\"\r\n | \"success\"\r\n | \"danger\"\r\n | \"warning\"\r\n | \"info\"\r\n | \"light\"\r\n | \"dark\"\r\n | \"link\";\r\n\r\nexport interface ButtonProps {\r\n buttonClassName?: string;\r\n type?: \"button\" | \"submit\" | \"reset\";\r\n disabled?: boolean;\r\n\r\n variant?: ButtonVariant; // 👈 NEW — Bootstrap color support\r\n\r\n onAction?: () => Promise<unknown>;\r\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void;\r\n onDone?: (result: unknown) => void;\r\n onError?: (error: unknown) => void;\r\n onFinally?: () => void;\r\n\r\n children?: ReactNode;\r\n loadingChildren?: ReactNode;\r\n\r\n renderContent?: () => ReactNode;\r\n renderLoading?: () => ReactNode;\r\n\r\n loadingText?: string;\r\n showSpinner?: boolean;\r\n}\r\n\r\nexport function Button({\r\n buttonClassName = \"btn btn-primary\",\r\n type = \"button\",\r\n disabled = false,\r\n\r\n variant,\r\n\r\n onAction,\r\n onClick,\r\n onDone,\r\n onError,\r\n onFinally,\r\n\r\n children = \"Click me\",\r\n\r\n loadingChildren,\r\n renderContent,\r\n renderLoading,\r\n\r\n loadingText = \"Loading...\",\r\n showSpinner = true,\r\n}: ButtonProps) {\r\n const [loading, setLoading] = useState(false);\r\n\r\n const handleClick = async (event: MouseEvent<HTMLButtonElement>) => {\r\n if (loading) return;\r\n\r\n onClick?.(event);\r\n if (event.defaultPrevented) return;\r\n if (!onAction) return;\r\n\r\n try {\r\n setLoading(true);\r\n const result = await onAction();\r\n onDone?.(result);\r\n } catch (error) {\r\n onError?.(error);\r\n } finally {\r\n setLoading(false);\r\n onFinally?.();\r\n }\r\n };\r\n\r\n // 👇 Decide which CSS to use:\r\n // - if variant is provided, use Bootstrap \"btn btn-X\"\r\n // - otherwise fall back to user-supplied buttonClassName\r\n const baseClass = variant\r\n ? `btn btn-${variant}`\r\n : buttonClassName;\r\n\r\n return (\r\n <button\r\n type={type}\r\n className={`${baseClass} ${loading ? \"async-btn--loading\" : \"\"}`}\r\n onClick={handleClick}\r\n disabled={disabled || loading}\r\n >\r\n {loading ? (\r\n renderLoading?.() ??\r\n loadingChildren ?? (\r\n <>\r\n {showSpinner && (\r\n <span\r\n className=\"spinner-border spinner-border-sm me-2 async-btn__spinner\"\r\n role=\"status\"\r\n aria-hidden=\"true\"\r\n />\r\n )}\r\n {loadingText}\r\n </>\r\n )\r\n ) : (\r\n renderContent?.() ?? children\r\n )}\r\n </button>\r\n );\r\n}\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface FooterProps {\r\n children?: ReactNode;\r\n}\r\n\r\nexport function Footer({ children }: FooterProps) {\r\n return (\r\n <footer className=\"bg-dark text-white text-center py-2 mt-auto\">\r\n {children ?? \"© 2025 Your Site — All rights reserved\"}\r\n </footer>\r\n );\r\n}\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface HeaderProps {\r\n children?: ReactNode;\r\n}\r\n\r\nexport function Header({ children }: HeaderProps) {\r\n return (\r\n <nav className=\"navbar navbar-dark bg-dark px-3 sticky-top\">\r\n {children ?? (\r\n <span className=\"navbar-brand mb-0 h4\">My Website</span>\r\n )}\r\n </nav>\r\n );\r\n}\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface HeaderBrandProps {\r\n children: ReactNode;\r\n}\r\n\r\nexport function HeaderText({ children }: HeaderBrandProps) {\r\n return (\r\n <span className=\"navbar-brand mb-0 h4\">\r\n {children}\r\n </span>\r\n );\r\n}\r\n","// ImageCard.tsx\r\nimport React from \"react\";\r\n\r\ninterface ImageCardProps {\r\n src: string;\r\n alt: string;\r\n width?: string | number;\r\n height?: string | number;\r\n}\r\n\r\nexport const ImageCard: React.FC<ImageCardProps> = ({\r\n src,\r\n alt,\r\n}) => {\r\n return (\r\n <img\r\n src={src}\r\n alt={alt}\r\n className={\"w-100\"}\r\n style={{\r\n display: \"block\",\r\n objectFit: \"cover\",\r\n }}\r\n />\r\n );\r\n};\r\n","// components/NpmBadge.tsx\r\ninterface NpmBadgeProps {\r\n packageLabel: string;\r\n packageName: string;\r\n packageUrl: string; // e.g. \"@sparkstudio/authentication-ui\"\r\n color?: string; // optional (default black)\r\n height?: number; // optional (default 22)\r\n}\r\n\r\nexport function NpmBadge({ packageName, packageLabel, packageUrl, color = \"black\", height = 22 }: NpmBadgeProps) {\r\n const encodedLabel = encodeURIComponent(packageLabel);\r\n const badgeUrl = `https://img.shields.io/npm/v/${packageName}?logo=npm&label=${encodedLabel}&color=${color}`;\r\n const npmUrl = packageUrl;\r\n\r\n return (\r\n <a href={npmUrl} target=\"_blank\" rel=\"noopener noreferrer\">\r\n <img src={badgeUrl} alt={`${packageName} version`} style={{ height }} />\r\n </a>\r\n );\r\n}\r\n","// components/Navigation.tsx\r\nimport type { ReactNode } from \"react\";\r\n\r\ninterface NavigationProps {\r\n title?: ReactNode;\r\n children: ReactNode;\r\n isOpen: boolean;\r\n onClose: () => void;\r\n}\r\n\r\nexport function Navigation({\r\n title = \"Navigation\",\r\n children,\r\n isOpen,\r\n onClose,\r\n}: NavigationProps) {\r\n return (\r\n <>\r\n {/* Desktop sidebar */}\r\n <nav className=\"col-auto p-3 h-100 d-none d-md-flex flex-column\">\r\n <h6 className=\"text-muted text-uppercase\">{title}</h6>\r\n\r\n <ul className=\"nav nav-pills flex-column gap-2 mt-3\">\r\n {children}\r\n </ul>\r\n </nav>\r\n\r\n {/* Mobile drawer */}\r\n <div\r\n className={`offcanvas offcanvas-start d-md-none ${isOpen ? \"show\" : \"\"}`}\r\n style={{ visibility: isOpen ? \"visible\" : \"hidden\" }}\r\n tabIndex={-1}\r\n aria-hidden={isOpen ? \"false\" : \"true\"}\r\n >\r\n <div className=\"offcanvas-header\">\r\n <h5 className=\"offcanvas-title\">{title}</h5>\r\n <button className=\"btn-close\" onClick={onClose} />\r\n </div>\r\n\r\n <div className=\"offcanvas-body\">\r\n <ul className=\"nav nav-pills flex-column gap-2 mt-2\">\r\n {children}\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n {/* Backdrop */}\r\n {isOpen && (\r\n <div\r\n className=\"offcanvas-backdrop fade show d-md-none\"\r\n onClick={onClose}\r\n />\r\n )}\r\n </>\r\n );\r\n}\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface NavigationItemProps {\r\n icon: ReactNode;\r\n title: ReactNode;\r\n type: string;\r\n active?: boolean;\r\n onClick?: (type: string) => void;\r\n}\r\n\r\nexport function NavigationItem({icon, title, type, active, onClick }: NavigationItemProps) {\r\n return (\r\n <li className=\"nav-item\">\r\n <button\r\n type=\"button\"\r\n className={`nav-link text-start w-100 ${active ? \"active\" : \"\"}`}\r\n onClick={() => onClick?.(type)}\r\n >\r\n {icon} {title}\r\n </button>\r\n </li>\r\n );\r\n}\r\n","// components/NavToggleButton.tsx\r\nimport React from \"react\";\r\nimport { Button } from \"../Button\";\r\n\r\ninterface NavToggleButtonProps {\r\n onClick: () => void;\r\n label?: string;\r\n color?: \"primary\" | \"secondary\" | \"success\" | \"danger\" | \"warning\" | \"info\" | \"light\" | \"dark\";\r\n}\r\n\r\nexport const NavToggleButton: React.FC<NavToggleButtonProps> = ({\r\n onClick,\r\n color = \"dark\",\r\n}) => {\r\n return (\r\n <div className=\"ms-auto pe-2 d-md-none\">\r\n <Button\r\n variant={color}\r\n buttonClassName=\"btn btn-secondary\"\r\n onClick={() => onClick()}\r\n >\r\n ☰\r\n </Button>\r\n </div>\r\n );\r\n};\r\n","import { useEffect } from \"react\";\r\n\r\nexport type NotificationType = \"success\" | \"info\" | \"warning\" | \"danger\";\r\n\r\nexport interface Notification {\r\n id: string;\r\n message: string;\r\n type?: NotificationType;\r\n autoCloseMs?: number;\r\n}\r\n\r\ninterface NotificationsProps {\r\n notifications: Notification[];\r\n onClose: (id: string) => void;\r\n}\r\n\r\nexport function Notifications({ notifications, onClose }: NotificationsProps) {\r\n useEffect(() => {\r\n notifications.forEach((n) => {\r\n if (!n.autoCloseMs) return;\r\n\r\n const timer = setTimeout(() => onClose(n.id), n.autoCloseMs);\r\n return () => clearTimeout(timer);\r\n });\r\n }, [notifications, onClose]);\r\n\r\n return (\r\n <div\r\n className=\"position-fixed top-0 end-0\"\r\n style={{ zIndex: 1080, width: 340 }}\r\n >\r\n {notifications.map((n) => (\r\n <div\r\n key={n.id}\r\n className={`alert alert-${n.type ?? \"info\"} alert-dismissible fade show shadow-sm mb-2`}\r\n role=\"alert\"\r\n >\r\n {n.message}\r\n\r\n <button\r\n type=\"button\"\r\n className=\"btn-close\"\r\n aria-label=\"Close\"\r\n onClick={() => onClose(n.id)}\r\n />\r\n </div>\r\n ))}\r\n </div>\r\n );\r\n}\r\n","import {\r\n createContext,\r\n useCallback,\r\n useContext,\r\n useEffect,\r\n useState,\r\n type ReactNode,\r\n} from \"react\";\r\nimport type { NotificationType } from \"./Notifications\";\r\n\r\n// Rename to avoid conflict with browser Notification type\r\nexport interface AppNotification {\r\n id: string;\r\n message: string;\r\n type?: NotificationType;\r\n autoCloseMs?: number;\r\n}\r\n\r\ninterface NotificationsContextValue {\r\n push: (message: string, type?: NotificationType, autoCloseMs?: number) => void;\r\n}\r\n\r\nconst NotificationsContext = createContext<NotificationsContextValue | undefined>(\r\n undefined\r\n);\r\n\r\ninterface NotificationsProviderProps {\r\n children: ReactNode;\r\n}\r\n\r\nexport function NotificationsProvider({ children }: NotificationsProviderProps) {\r\n const [notifications, setNotifications] = useState<AppNotification[]>([]);\r\n\r\n const push = useCallback(\r\n (message: string, type: NotificationType = \"info\", autoCloseMs = 4000) => {\r\n setNotifications((prev) => [\r\n ...prev,\r\n {\r\n id: crypto.randomUUID(),\r\n message,\r\n type,\r\n autoCloseMs,\r\n },\r\n ]);\r\n },\r\n []\r\n );\r\n\r\n const close = useCallback((id: string) => {\r\n setNotifications((list) => list.filter((n) => n.id !== id));\r\n }, []);\r\n\r\n // Handle auto close timers\r\n useEffect(() => {\r\n const timers = notifications.map((n) => {\r\n if (!n.autoCloseMs) return null;\r\n return setTimeout(() => close(n.id), n.autoCloseMs);\r\n });\r\n\r\n return () => {\r\n timers.forEach((t) => t && clearTimeout(t));\r\n };\r\n }, [notifications, close]);\r\n\r\n return (\r\n <NotificationsContext.Provider value={{ push }}>\r\n {/* overlay renderer */}\r\n <div\r\n className=\"position-fixed top-0 end-0\"\r\n style={{ zIndex: 1080, width: 340 }}\r\n >\r\n {notifications.map((n) => (\r\n <div\r\n key={n.id}\r\n className={`alert alert-${n.type ?? \"info\"} alert-dismissible fade show shadow-sm mb-2`}\r\n role=\"alert\"\r\n >\r\n {n.message}\r\n <button\r\n type=\"button\"\r\n className=\"btn-close\"\r\n aria-label=\"Close\"\r\n onClick={() => close(n.id)}\r\n />\r\n </div>\r\n ))}\r\n </div>\r\n\r\n {children}\r\n </NotificationsContext.Provider>\r\n );\r\n}\r\n\r\nexport function UseNotifications(): NotificationsContextValue {\r\n const ctx = useContext(NotificationsContext);\r\n if (!ctx) {\r\n throw new Error(\"useNotifications must be used within a NotificationsProvider\");\r\n }\r\n return ctx;\r\n}\r\n","// ./views/AppsView.tsx (or ./components/AppsView.tsx)\r\nimport React from \"react\";\r\nimport type { AppItem } from \"../../models/AppItem\";\r\nimport { AppTile } from \"../AppTile\";\r\n\r\ninterface AppsViewProps {\r\n apps: AppItem[];\r\n title?: string;\r\n onAppClick?: (app: AppItem) => void;\r\n}\r\n\r\nexport const AppsView: React.FC<AppsViewProps> = ({ apps, title, onAppClick }) => {\r\n return (\r\n <>\r\n {title && <h5 className=\"mb-3\">{title}</h5>}\r\n\r\n <div className=\"row justify-content-center justify-content-md-start\">\r\n {apps.map((app) => (\r\n <AppTile key={app.id} app={app} onClick={onAppClick} />\r\n ))}\r\n </div>\r\n </>\r\n );\r\n};\r\n","export function ContentContainer({ children }: React.PropsWithChildren) {\r\n return <div className=\"container-fluid flex-grow-1\">{children}</div>;\r\n}\r\n","export function ContentRow({ children }: React.PropsWithChildren) {\r\n return <div className=\"row h-100 flex-nowrap\">{children}</div>;\r\n}\r\n","\r\nexport function LayoutWrapper({ children }: React.PropsWithChildren) {\r\n return (\r\n\r\n <div className=\"d-flex flex-column min-vh-100\">{children}</div>\r\n );\r\n}\r\n","// components/Modal.tsx\r\nimport React from \"react\";\r\n\r\nexport interface ModalProps {\r\n title?: string;\r\n isOpen: boolean;\r\n onClose: () => void;\r\n onConfirm?: () => void;\r\n confirmText?: string;\r\n\r\n disableBackdropClose?: boolean;\r\n disableAllButtons?: boolean;\r\n\r\n showHeaderClose?: boolean;\r\n showCloseButton?: boolean;\r\n showConfirmButton?: boolean;\r\n\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport const Modal: React.FC<ModalProps> = ({\r\n title,\r\n isOpen,\r\n onClose,\r\n onConfirm,\r\n confirmText = \"OK\",\r\n\r\n disableBackdropClose = false,\r\n disableAllButtons = false,\r\n\r\n showHeaderClose = true,\r\n showCloseButton = true,\r\n showConfirmButton = true,\r\n\r\n children,\r\n}) => {\r\n if (!isOpen) return null;\r\n\r\n const handleBackdropClick = () => {\r\n if (disableBackdropClose || disableAllButtons) return;\r\n onClose();\r\n };\r\n\r\n const handleContentClick: React.MouseEventHandler<HTMLDivElement> = (e) => {\r\n e.stopPropagation();\r\n };\r\n\r\n // 👇 NEW: decide if footer should exist at all\r\n const hasFooterButtons =\r\n (showCloseButton || (onConfirm && showConfirmButton)) &&\r\n !disableAllButtons;\r\n\r\n return (\r\n <>\r\n <div\r\n className=\"modal-backdrop fade show\"\r\n style={{ zIndex: 1040 }}\r\n onClick={handleBackdropClick}\r\n />\r\n\r\n <div\r\n className=\"modal fade show d-block\"\r\n tabIndex={-1}\r\n role=\"dialog\"\r\n style={{ zIndex: 1050 }}\r\n onClick={handleBackdropClick}\r\n >\r\n <div\r\n className=\"modal-dialog modal-dialog-centered\"\r\n role=\"document\"\r\n onClick={handleContentClick}\r\n >\r\n <div className=\"modal-content shadow\">\r\n {/* Header */}\r\n <div className=\"modal-header\">\r\n {title && <h5 className=\"modal-title\">{title}</h5>}\r\n\r\n {showHeaderClose && (\r\n <button\r\n type=\"button\"\r\n className=\"btn-close\"\r\n aria-label=\"Close\"\r\n onClick={onClose}\r\n disabled={disableAllButtons}\r\n />\r\n )}\r\n </div>\r\n\r\n {/* Body */}\r\n <div className=\"modal-body\">{children}</div>\r\n\r\n {/* Footer — only if buttons are visible */}\r\n {hasFooterButtons && (\r\n <div className=\"modal-footer\">\r\n {showCloseButton && (\r\n <button\r\n type=\"button\"\r\n className=\"btn btn-secondary\"\r\n onClick={onClose}\r\n disabled={disableAllButtons}\r\n >\r\n Close\r\n </button>\r\n )}\r\n\r\n {onConfirm && showConfirmButton && (\r\n <button\r\n type=\"button\"\r\n className=\"btn btn-primary\"\r\n onClick={onConfirm}\r\n disabled={disableAllButtons}\r\n >\r\n {confirmText}\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n </>\r\n );\r\n};\r\n","import {\r\n createContext,\r\n useCallback,\r\n useContext,\r\n useState,\r\n type ReactNode,\r\n} from \"react\";\r\nimport { Modal } from \"./Modal\";\r\n\r\nexport interface ModalOptions {\r\n title?: string;\r\n confirmText?: string;\r\n disableBackdropClose?: boolean;\r\n onConfirm?: () => void;\r\n\r\n /** extra control flags matching Modal.tsx */\r\n disableAllButtons?: boolean;\r\n showHeaderClose?: boolean;\r\n showCloseButton?: boolean;\r\n showConfirmButton?: boolean;\r\n}\r\n\r\ninterface ModalContextValue {\r\n openModal: (content: ReactNode, options?: ModalOptions) => void;\r\n closeModal: () => void;\r\n}\r\n\r\nconst ModalContext = createContext<ModalContextValue | undefined>(undefined);\r\n\r\nexport function ModalProvider({ children }: { children: ReactNode }) {\r\n const [isOpen, setIsOpen] = useState(false);\r\n const [content, setContent] = useState<ReactNode>(null);\r\n const [options, setOptions] = useState<ModalOptions>({});\r\n\r\n const openModal = useCallback((content: ReactNode, options?: ModalOptions) => {\r\n setContent(content);\r\n setOptions(options ?? {});\r\n setIsOpen(true);\r\n }, []);\r\n\r\n const closeModal = useCallback(() => {\r\n setIsOpen(false);\r\n }, []);\r\n\r\n return (\r\n <ModalContext.Provider value={{ openModal, closeModal }}>\r\n {children}\r\n\r\n <Modal\r\n isOpen={isOpen}\r\n title={options.title}\r\n confirmText={options.confirmText}\r\n disableBackdropClose={options.disableBackdropClose}\r\n disableAllButtons={options.disableAllButtons}\r\n showHeaderClose={options.showHeaderClose}\r\n showCloseButton={options.showCloseButton}\r\n showConfirmButton={options.showConfirmButton}\r\n onClose={closeModal}\r\n onConfirm={options.onConfirm}\r\n >\r\n {content}\r\n </Modal>\r\n </ModalContext.Provider>\r\n );\r\n}\r\n\r\nexport function UseModal() {\r\n const ctx = useContext(ModalContext);\r\n if (!ctx) throw new Error(\"UseModal must be used within ModalProvider\");\r\n return ctx;\r\n}\r\n"],"mappings":";AAwCI,SACY,KADZ;AAlBG,IAAM,QAA8B,CAAC;AAAA,EAC1C,UAAU;AAAA,EACV;AAAA,EACA,cAAc;AAAA,EACd,YAAY;AAAA,EACZ;AAAA,EACA;AACF,MAAM;AACJ,QAAM,UAAU;AAAA,IACd;AAAA,IACA,SAAS,OAAO;AAAA,IAChB,cAAc,gCAAgC;AAAA,IAC9C;AAAA,EACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,qBAAC,SAAI,MAAK,SAAQ,WAAW,SAC1B;AAAA,aAAS,oBAAC,YAAO,WAAU,gBAAgB,iBAAM;AAAA,IACjD;AAAA,IAEA,eACC;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,WAAU;AAAA,QACV,cAAW;AAAA,QACX,SAAS;AAAA;AAAA,IACX;AAAA,KAEJ;AAEJ;;;ACrCU,gBAAAA,MAKgB,QAAAC,aALhB;AATH,IAAM,UAAkC,CAAC,EAAE,KAAK,QAAQ,MAAM;AACnE,SACE,gBAAAD,KAAC,SAAI,WAAU,YACb,0BAAAC;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,WAAU;AAAA,MACV,SAAS,MAAM,UAAU,GAAG;AAAA,MAE5B;AAAA,wBAAAD,KAAC,SAAI,WAAU,uEACb,0BAAAA,KAAC,UAAK,OAAO,EAAC,UAAS,OAAM,GAAI,cAAI,MAAK,GAC5C;AAAA,QAEA,gBAAAC,MAAC,UAAK,WAAU,6BACb;AAAA,cAAI;AA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AS;AAAA,QACT,WAAW,QAAQ;AAAA,QAElB;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;AAEO,SAAS,WAAW;AACzB,QAAM,MAAMO,YAAW,YAAY;AACnC,MAAI,CAAC,IAAK,OAAM,IAAI,MAAM,4CAA4C;AACtE,SAAO;AACT;","names":["jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsx","jsx","jsx","jsx","Fragment","jsx","jsxs","jsx","jsxs","jsx","jsx","jsxs","useEffect","useState","jsx","jsxs","Fragment","jsx","jsxs","jsx","jsx","jsx","Fragment","jsx","jsxs","createContext","useCallback","useContext","useState","jsx","jsxs","createContext","useState","useCallback","content","options","useContext"]}
1
+ {"version":3,"sources":["../src/components/Alert.tsx","../src/components/AppTile.tsx","../src/components/Body.tsx","../src/components/Button.tsx","../src/components/Footer.tsx","../src/components/Header.tsx","../src/components/HeaderText.tsx","../src/components/Icon.tsx","../src/components/NpmBadge.tsx","../src/components/ThemeToggleButton.tsx","../src/components/navigation/Navigation.tsx","../src/components/navigation/NavigationItem.tsx","../src/components/navigation/NavToggleButton.tsx","../src/components/notifications/Notifications.tsx","../src/components/notifications/NotificationsProvider.tsx","../src/components/views/AppsView.tsx","../src/components/wrappers/ContentContainer.tsx","../src/components/wrappers/ContentRow.tsx","../src/components/wrappers/LayoutWrapper.tsx","../src/modal/Modal.tsx","../src/modal/ModalProvider.tsx"],"sourcesContent":["// components/Alert.tsx\r\nimport React from \"react\";\r\n\r\nexport type AlertVariant =\r\n | \"primary\"\r\n | \"secondary\"\r\n | \"success\"\r\n | \"danger\"\r\n | \"warning\"\r\n | \"info\"\r\n | \"light\"\r\n | \"dark\";\r\n\r\ninterface AlertProps {\r\n variant?: AlertVariant;\r\n title?: string;\r\n dismissible?: boolean;\r\n className?: string;\r\n children: React.ReactNode;\r\n onClose?: () => void;\r\n}\r\n\r\nexport const Alert: React.FC<AlertProps> = ({\r\n variant = \"info\",\r\n title,\r\n dismissible = false,\r\n className = \"\",\r\n children,\r\n onClose,\r\n}) => {\r\n const classes = [\r\n \"alert\",\r\n `alert-${variant}`,\r\n dismissible ? \"alert-dismissible fade show\" : \"\",\r\n className,\r\n ]\r\n .filter(Boolean)\r\n .join(\" \");\r\n\r\n return (\r\n <div role=\"alert\" className={classes}>\r\n {title && <strong className=\"d-block mb-1\">{title}</strong>}\r\n {children}\r\n\r\n {dismissible && (\r\n <button\r\n type=\"button\"\r\n className=\"btn-close\"\r\n aria-label=\"Close\"\r\n onClick={onClose}\r\n />\r\n )}\r\n </div>\r\n );\r\n};\r\n","import React from \"react\";\r\nimport type { AppItem } from \"../models/AppItem\";\r\n\r\ninterface AppTileProps {\r\n app: AppItem;\r\n onClick?: (app: AppItem) => void;\r\n}\r\n\r\nexport const AppTile: React.FC<AppTileProps> = ({ app, onClick }) => {\r\n return (\r\n <div className=\"col-auto\">\r\n <button\r\n type=\"button\"\r\n className=\"btn p-2 d-flex flex-column align-items-center border-0 bg-transparent app-icon-btn\"\r\n onClick={() => onClick?.(app)}\r\n >\r\n <div className=\"app-icon-tile d-flex align-items-center justify-content-center mb-1\">\r\n <span style={{fontSize:\"32px\"}}>{app.icon}</span>\r\n </div>\r\n\r\n <span className=\"w-100 small text-truncate\">\r\n {app.name}\r\n {app.version && <small className=\"text-muted ms-1\">v{app.version}</small>}\r\n </span>\r\n </button>\r\n </div>\r\n );\r\n};\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface BodyProps {\r\n icon: ReactNode;\r\n title: ReactNode;\r\n description?: ReactNode;\r\n children?: ReactNode;\r\n}\r\n\r\nexport function Body({ icon, title, description, children }: BodyProps) {\r\n return (\r\n\r\n <main className=\"col p-4\">\r\n <h2>{icon} {title}</h2>\r\n\r\n {description && <p>{description}</p>}\r\n {children}\r\n </main>\r\n );\r\n}\r\n","import { useState, type ReactNode, type MouseEvent } from \"react\";\r\n\r\nexport type ButtonVariant =\r\n | \"primary\"\r\n | \"secondary\"\r\n | \"success\"\r\n | \"danger\"\r\n | \"warning\"\r\n | \"info\"\r\n | \"light\"\r\n | \"dark\"\r\n | \"link\";\r\n\r\nexport interface ButtonProps {\r\n buttonClassName?: string;\r\n type?: \"button\" | \"submit\" | \"reset\";\r\n disabled?: boolean;\r\n\r\n variant?: ButtonVariant; // 👈 NEW — Bootstrap color support\r\n\r\n onAction?: () => Promise<unknown>;\r\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void;\r\n onDone?: (result: unknown) => void;\r\n onError?: (error: unknown) => void;\r\n onFinally?: () => void;\r\n\r\n children?: ReactNode;\r\n loadingChildren?: ReactNode;\r\n\r\n renderContent?: () => ReactNode;\r\n renderLoading?: () => ReactNode;\r\n\r\n loadingText?: string;\r\n showSpinner?: boolean;\r\n}\r\n\r\nexport function Button({\r\n buttonClassName = \"btn btn-primary\",\r\n type = \"button\",\r\n disabled = false,\r\n\r\n variant,\r\n\r\n onAction,\r\n onClick,\r\n onDone,\r\n onError,\r\n onFinally,\r\n\r\n children = \"Click me\",\r\n\r\n loadingChildren,\r\n renderContent,\r\n renderLoading,\r\n\r\n loadingText = \"Loading...\",\r\n showSpinner = true,\r\n}: ButtonProps) {\r\n const [loading, setLoading] = useState(false);\r\n\r\n const handleClick = async (event: MouseEvent<HTMLButtonElement>) => {\r\n if (loading) return;\r\n\r\n onClick?.(event);\r\n if (event.defaultPrevented) return;\r\n if (!onAction) return;\r\n\r\n try {\r\n setLoading(true);\r\n const result = await onAction();\r\n onDone?.(result);\r\n } catch (error) {\r\n onError?.(error);\r\n } finally {\r\n setLoading(false);\r\n onFinally?.();\r\n }\r\n };\r\n\r\n // 👇 Decide which CSS to use:\r\n // - if variant is provided, use Bootstrap \"btn btn-X\"\r\n // - otherwise fall back to user-supplied buttonClassName\r\n const baseClass = variant\r\n ? `btn btn-${variant}`\r\n : buttonClassName;\r\n\r\n return (\r\n <button\r\n type={type}\r\n className={`${baseClass} ${loading ? \"async-btn--loading\" : \"\"}`}\r\n onClick={handleClick}\r\n disabled={disabled || loading}\r\n >\r\n {loading ? (\r\n renderLoading?.() ??\r\n loadingChildren ?? (\r\n <>\r\n {showSpinner && (\r\n <span\r\n className=\"spinner-border spinner-border-sm me-2 async-btn__spinner\"\r\n role=\"status\"\r\n aria-hidden=\"true\"\r\n />\r\n )}\r\n {loadingText}\r\n </>\r\n )\r\n ) : (\r\n renderContent?.() ?? children\r\n )}\r\n </button>\r\n );\r\n}\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface FooterProps {\r\n children?: ReactNode;\r\n}\r\n\r\nexport function Footer({ children }: FooterProps) {\r\n return (\r\n <footer className=\"bg-dark text-white text-center py-2 mt-auto\">\r\n {children ?? \"© 2025 Your Site — All rights reserved\"}\r\n </footer>\r\n );\r\n}\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface HeaderProps {\r\n children?: ReactNode;\r\n}\r\n\r\nexport function Header({ children }: HeaderProps) {\r\n return (\r\n <nav className=\"navbar navbar-dark bg-dark px-3 sticky-top\">\r\n {children ?? (\r\n <span className=\"navbar-brand mb-0 h4\">My Website</span>\r\n )}\r\n </nav>\r\n );\r\n}\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface HeaderBrandProps {\r\n children: ReactNode;\r\n}\r\n\r\nexport function HeaderText({ children }: HeaderBrandProps) {\r\n return (\r\n <span className=\"navbar-brand mb-0 h4\">\r\n {children}\r\n </span>\r\n );\r\n}\r\n","// ImageCard.tsx\r\nimport React from \"react\";\r\n\r\ninterface ImageCardProps {\r\n src: string;\r\n alt: string;\r\n width?: string | number;\r\n height?: string | number;\r\n}\r\n\r\nexport const ImageCard: React.FC<ImageCardProps> = ({\r\n src,\r\n alt,\r\n}) => {\r\n return (\r\n <img\r\n src={src}\r\n alt={alt}\r\n className={\"w-100\"}\r\n style={{\r\n display: \"block\",\r\n objectFit: \"cover\",\r\n }}\r\n />\r\n );\r\n};\r\n","// components/NpmBadge.tsx\r\ninterface NpmBadgeProps {\r\n packageLabel: string;\r\n packageName: string;\r\n packageUrl: string; // e.g. \"@sparkstudio/authentication-ui\"\r\n color?: string; // optional (default black)\r\n height?: number; // optional (default 22)\r\n}\r\n\r\nexport function NpmBadge({ packageName, packageLabel, packageUrl, color = \"black\", height = 22 }: NpmBadgeProps) {\r\n const encodedLabel = encodeURIComponent(packageLabel);\r\n const badgeUrl = `https://img.shields.io/npm/v/${packageName}?logo=npm&label=${encodedLabel}&color=${color}`;\r\n const npmUrl = packageUrl;\r\n\r\n return (\r\n <a href={npmUrl} target=\"_blank\" rel=\"noopener noreferrer\">\r\n <img src={badgeUrl} alt={`${packageName} version`} style={{ height }} />\r\n </a>\r\n );\r\n}\r\n","// ThemeToggleButton.tsx\r\nimport { useEffect, useState } from \"react\";\r\nimport { Button, type ButtonVariant } from \"./Button\";\r\n\r\ntype Theme = \"light\" | \"dark\";\r\n\r\nconst STORAGE_KEY = \"bootstrap-theme\";\r\n\r\nfunction applyTheme(theme: Theme) {\r\n // You can also target document.body instead if you prefer:\r\n // document.body.setAttribute(\"data-bs-theme\", theme);\r\n document.documentElement.setAttribute(\"data-bs-theme\", theme);\r\n}\r\n\r\nexport function ThemeToggleButton() {\r\n const [theme, setTheme] = useState<Theme>(\"light\");\r\n\r\n // On mount: load saved theme or fall back to system preference\r\n useEffect(() => {\r\n const stored = localStorage.getItem(STORAGE_KEY) as Theme | null;\r\n\r\n if (stored === \"light\" || stored === \"dark\") {\r\n setTheme(stored);\r\n applyTheme(stored);\r\n return;\r\n }\r\n\r\n // If nothing saved, use system preferred color scheme\r\n const prefersDark = window.matchMedia?.(\"(prefers-color-scheme: dark)\").matches ?? false;\r\n\r\n const initialTheme: Theme = prefersDark ? \"dark\" : \"light\";\r\n setTheme(initialTheme);\r\n applyTheme(initialTheme);\r\n }, []);\r\n\r\n const handleToggle = () => {\r\n const next: Theme = theme === \"light\" ? \"dark\" : \"light\";\r\n setTheme(next);\r\n applyTheme(next);\r\n localStorage.setItem(STORAGE_KEY, next);\r\n };\r\n\r\n // Choose button style + text based on current theme\r\n const variant: ButtonVariant = theme === \"light\" ? \"dark\" : \"light\";\r\n const label = theme === \"light\" ? \"🌙 Dark mode\" : \"🌞 Light mode\";\r\n\r\n return (\r\n <Button variant={variant} onClick={handleToggle}>\r\n {label}\r\n </Button>\r\n );\r\n}\r\n","// components/Navigation.tsx\r\nimport type { ReactNode } from \"react\";\r\n\r\ninterface NavigationProps {\r\n title?: ReactNode;\r\n children: ReactNode;\r\n isOpen: boolean;\r\n onClose: () => void;\r\n}\r\n\r\nexport function Navigation({\r\n title = \"Navigation\",\r\n children,\r\n isOpen,\r\n onClose,\r\n}: NavigationProps) {\r\n return (\r\n <>\r\n {/* Desktop sidebar */}\r\n <nav className=\"col-auto p-3 h-100 d-none d-md-flex flex-column\">\r\n <h6 className=\"text-muted text-uppercase\">{title}</h6>\r\n\r\n <ul className=\"nav nav-pills flex-column gap-2 mt-3\">\r\n {children}\r\n </ul>\r\n </nav>\r\n\r\n {/* Mobile drawer */}\r\n <div\r\n className={`offcanvas offcanvas-start d-md-none ${isOpen ? \"show\" : \"\"}`}\r\n style={{ visibility: isOpen ? \"visible\" : \"hidden\" }}\r\n tabIndex={-1}\r\n aria-hidden={isOpen ? \"false\" : \"true\"}\r\n >\r\n <div className=\"offcanvas-header\">\r\n <h5 className=\"offcanvas-title\">{title}</h5>\r\n <button className=\"btn-close\" onClick={onClose} />\r\n </div>\r\n\r\n <div className=\"offcanvas-body\">\r\n <ul className=\"nav nav-pills flex-column gap-2 mt-2\">\r\n {children}\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n {/* Backdrop */}\r\n {isOpen && (\r\n <div\r\n className=\"offcanvas-backdrop fade show d-md-none\"\r\n onClick={onClose}\r\n />\r\n )}\r\n </>\r\n );\r\n}\r\n","import type { ReactNode } from \"react\";\r\n\r\ninterface NavigationItemProps {\r\n icon: ReactNode;\r\n title: ReactNode;\r\n type: string;\r\n active?: boolean;\r\n onClick?: (type: string) => void;\r\n}\r\n\r\nexport function NavigationItem({icon, title, type, active, onClick }: NavigationItemProps) {\r\n return (\r\n <li className=\"nav-item\">\r\n <button\r\n type=\"button\"\r\n className={`nav-link text-start w-100 ${active ? \"active\" : \"\"}`}\r\n onClick={() => onClick?.(type)}\r\n >\r\n {icon} {title}\r\n </button>\r\n </li>\r\n );\r\n}\r\n","// components/NavToggleButton.tsx\r\nimport React from \"react\";\r\nimport { Button } from \"../Button\";\r\n\r\ninterface NavToggleButtonProps {\r\n onClick: () => void;\r\n label?: string;\r\n color?: \"primary\" | \"secondary\" | \"success\" | \"danger\" | \"warning\" | \"info\" | \"light\" | \"dark\";\r\n}\r\n\r\nexport const NavToggleButton: React.FC<NavToggleButtonProps> = ({\r\n onClick,\r\n color = \"dark\",\r\n}) => {\r\n return (\r\n <div className=\"ms-auto pe-2 d-md-none\">\r\n <Button\r\n variant={color}\r\n buttonClassName=\"btn btn-secondary\"\r\n onClick={() => onClick()}\r\n >\r\n ☰\r\n </Button>\r\n </div>\r\n );\r\n};\r\n","import { useEffect } from \"react\";\r\n\r\nexport type NotificationType = \"success\" | \"info\" | \"warning\" | \"danger\";\r\n\r\nexport interface Notification {\r\n id: string;\r\n message: string;\r\n type?: NotificationType;\r\n autoCloseMs?: number;\r\n}\r\n\r\ninterface NotificationsProps {\r\n notifications: Notification[];\r\n onClose: (id: string) => void;\r\n}\r\n\r\nexport function Notifications({ notifications, onClose }: NotificationsProps) {\r\n useEffect(() => {\r\n notifications.forEach((n) => {\r\n if (!n.autoCloseMs) return;\r\n\r\n const timer = setTimeout(() => onClose(n.id), n.autoCloseMs);\r\n return () => clearTimeout(timer);\r\n });\r\n }, [notifications, onClose]);\r\n\r\n return (\r\n <div\r\n className=\"position-fixed top-0 end-0\"\r\n style={{ zIndex: 1080, width: 340 }}\r\n >\r\n {notifications.map((n) => (\r\n <div\r\n key={n.id}\r\n className={`alert alert-${n.type ?? \"info\"} alert-dismissible fade show shadow-sm mb-2`}\r\n role=\"alert\"\r\n >\r\n {n.message}\r\n\r\n <button\r\n type=\"button\"\r\n className=\"btn-close\"\r\n aria-label=\"Close\"\r\n onClick={() => onClose(n.id)}\r\n />\r\n </div>\r\n ))}\r\n </div>\r\n );\r\n}\r\n","import {\r\n createContext,\r\n useCallback,\r\n useContext,\r\n useEffect,\r\n useState,\r\n type ReactNode,\r\n} from \"react\";\r\nimport type { NotificationType } from \"./Notifications\";\r\n\r\n// Rename to avoid conflict with browser Notification type\r\nexport interface AppNotification {\r\n id: string;\r\n message: string;\r\n type?: NotificationType;\r\n autoCloseMs?: number;\r\n}\r\n\r\ninterface NotificationsContextValue {\r\n push: (message: string, type?: NotificationType, autoCloseMs?: number) => void;\r\n}\r\n\r\nconst NotificationsContext = createContext<NotificationsContextValue | undefined>(\r\n undefined\r\n);\r\n\r\ninterface NotificationsProviderProps {\r\n children: ReactNode;\r\n}\r\n\r\nexport function NotificationsProvider({ children }: NotificationsProviderProps) {\r\n const [notifications, setNotifications] = useState<AppNotification[]>([]);\r\n\r\n const push = useCallback(\r\n (message: string, type: NotificationType = \"info\", autoCloseMs = 4000) => {\r\n setNotifications((prev) => [\r\n ...prev,\r\n {\r\n id: crypto.randomUUID(),\r\n message,\r\n type,\r\n autoCloseMs,\r\n },\r\n ]);\r\n },\r\n []\r\n );\r\n\r\n const close = useCallback((id: string) => {\r\n setNotifications((list) => list.filter((n) => n.id !== id));\r\n }, []);\r\n\r\n // Handle auto close timers\r\n useEffect(() => {\r\n const timers = notifications.map((n) => {\r\n if (!n.autoCloseMs) return null;\r\n return setTimeout(() => close(n.id), n.autoCloseMs);\r\n });\r\n\r\n return () => {\r\n timers.forEach((t) => t && clearTimeout(t));\r\n };\r\n }, [notifications, close]);\r\n\r\n return (\r\n <NotificationsContext.Provider value={{ push }}>\r\n {/* overlay renderer */}\r\n <div\r\n className=\"position-fixed top-0 end-0\"\r\n style={{ zIndex: 1080, width: 340 }}\r\n >\r\n {notifications.map((n) => (\r\n <div\r\n key={n.id}\r\n className={`alert alert-${n.type ?? \"info\"} alert-dismissible fade show shadow-sm mb-2`}\r\n role=\"alert\"\r\n >\r\n {n.message}\r\n <button\r\n type=\"button\"\r\n className=\"btn-close\"\r\n aria-label=\"Close\"\r\n onClick={() => close(n.id)}\r\n />\r\n </div>\r\n ))}\r\n </div>\r\n\r\n {children}\r\n </NotificationsContext.Provider>\r\n );\r\n}\r\n\r\nexport function UseNotifications(): NotificationsContextValue {\r\n const ctx = useContext(NotificationsContext);\r\n if (!ctx) {\r\n throw new Error(\"useNotifications must be used within a NotificationsProvider\");\r\n }\r\n return ctx;\r\n}\r\n","// ./views/AppsView.tsx (or ./components/AppsView.tsx)\r\nimport React from \"react\";\r\nimport type { AppItem } from \"../../models/AppItem\";\r\nimport { AppTile } from \"../AppTile\";\r\n\r\ninterface AppsViewProps {\r\n apps: AppItem[];\r\n title?: string;\r\n onAppClick?: (app: AppItem) => void;\r\n}\r\n\r\nexport const AppsView: React.FC<AppsViewProps> = ({ apps, title, onAppClick }) => {\r\n return (\r\n <>\r\n {title && <h5 className=\"mb-3\">{title}</h5>}\r\n\r\n <div className=\"row justify-content-center justify-content-md-start\">\r\n {apps.map((app) => (\r\n <AppTile key={app.id} app={app} onClick={onAppClick} />\r\n ))}\r\n </div>\r\n </>\r\n );\r\n};\r\n","export function ContentContainer({ children }: React.PropsWithChildren) {\r\n return <div className=\"container-fluid flex-grow-1 container-lg\">{children}</div>;\r\n}\r\n","export function ContentRow({ children }: React.PropsWithChildren) {\r\n return <div className=\"row h-100 flex-nowrap\">{children}</div>;\r\n}\r\n","\r\nexport function LayoutWrapper({ children }: React.PropsWithChildren) {\r\n return (\r\n\r\n <div className=\"d-flex flex-column min-vh-100\">{children}</div>\r\n );\r\n}\r\n","// components/Modal.tsx\r\nimport React from \"react\";\r\n\r\nexport interface ModalProps {\r\n title?: string;\r\n isOpen: boolean;\r\n onClose: () => void;\r\n onConfirm?: () => void;\r\n confirmText?: string;\r\n\r\n disableBackdropClose?: boolean;\r\n disableAllButtons?: boolean;\r\n\r\n showHeaderClose?: boolean;\r\n showCloseButton?: boolean;\r\n showConfirmButton?: boolean;\r\n\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport const Modal: React.FC<ModalProps> = ({\r\n title,\r\n isOpen,\r\n onClose,\r\n onConfirm,\r\n confirmText = \"OK\",\r\n\r\n disableBackdropClose = false,\r\n disableAllButtons = false,\r\n\r\n showHeaderClose = true,\r\n showCloseButton = true,\r\n showConfirmButton = true,\r\n\r\n children,\r\n}) => {\r\n if (!isOpen) return null;\r\n\r\n const handleBackdropClick = () => {\r\n if (disableBackdropClose || disableAllButtons) return;\r\n onClose();\r\n };\r\n\r\n const handleContentClick: React.MouseEventHandler<HTMLDivElement> = (e) => {\r\n e.stopPropagation();\r\n };\r\n\r\n // 👇 NEW: decide if footer should exist at all\r\n const hasFooterButtons =\r\n (showCloseButton || (onConfirm && showConfirmButton)) &&\r\n !disableAllButtons;\r\n\r\n return (\r\n <>\r\n <div\r\n className=\"modal-backdrop fade show\"\r\n style={{ zIndex: 1040 }}\r\n onClick={handleBackdropClick}\r\n />\r\n\r\n <div\r\n className=\"modal fade show d-block\"\r\n tabIndex={-1}\r\n role=\"dialog\"\r\n style={{ zIndex: 1050 }}\r\n onClick={handleBackdropClick}\r\n >\r\n <div\r\n className=\"modal-dialog modal-dialog-centered\"\r\n role=\"document\"\r\n onClick={handleContentClick}\r\n >\r\n <div className=\"modal-content shadow\">\r\n {/* Header */}\r\n <div className=\"modal-header\">\r\n {title && <h5 className=\"modal-title\">{title}</h5>}\r\n\r\n {showHeaderClose && (\r\n <button\r\n type=\"button\"\r\n className=\"btn-close\"\r\n aria-label=\"Close\"\r\n onClick={onClose}\r\n disabled={disableAllButtons}\r\n />\r\n )}\r\n </div>\r\n\r\n {/* Body */}\r\n <div className=\"modal-body\">{children}</div>\r\n\r\n {/* Footer — only if buttons are visible */}\r\n {hasFooterButtons && (\r\n <div className=\"modal-footer\">\r\n {showCloseButton && (\r\n <button\r\n type=\"button\"\r\n className=\"btn btn-secondary\"\r\n onClick={onClose}\r\n disabled={disableAllButtons}\r\n >\r\n Close\r\n </button>\r\n )}\r\n\r\n {onConfirm && showConfirmButton && (\r\n <button\r\n type=\"button\"\r\n className=\"btn btn-primary\"\r\n onClick={onConfirm}\r\n disabled={disableAllButtons}\r\n >\r\n {confirmText}\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n </>\r\n );\r\n};\r\n","import {\r\n createContext,\r\n useCallback,\r\n useContext,\r\n useState,\r\n type ReactNode,\r\n} from \"react\";\r\nimport { Modal } from \"./Modal\";\r\n\r\nexport interface ModalOptions {\r\n title?: string;\r\n confirmText?: string;\r\n disableBackdropClose?: boolean;\r\n onConfirm?: () => void;\r\n\r\n /** extra control flags matching Modal.tsx */\r\n disableAllButtons?: boolean;\r\n showHeaderClose?: boolean;\r\n showCloseButton?: boolean;\r\n showConfirmButton?: boolean;\r\n}\r\n\r\ninterface ModalContextValue {\r\n openModal: (content: ReactNode, options?: ModalOptions) => void;\r\n closeModal: () => void;\r\n}\r\n\r\nconst ModalContext = createContext<ModalContextValue | undefined>(undefined);\r\n\r\nexport function ModalProvider({ children }: { children: ReactNode }) {\r\n const [isOpen, setIsOpen] = useState(false);\r\n const [content, setContent] = useState<ReactNode>(null);\r\n const [options, setOptions] = useState<ModalOptions>({});\r\n\r\n const openModal = useCallback((content: ReactNode, options?: ModalOptions) => {\r\n setContent(content);\r\n setOptions(options ?? {});\r\n setIsOpen(true);\r\n }, []);\r\n\r\n const closeModal = useCallback(() => {\r\n setIsOpen(false);\r\n }, []);\r\n\r\n return (\r\n <ModalContext.Provider value={{ openModal, closeModal }}>\r\n {children}\r\n\r\n <Modal\r\n isOpen={isOpen}\r\n title={options.title}\r\n confirmText={options.confirmText}\r\n disableBackdropClose={options.disableBackdropClose}\r\n disableAllButtons={options.disableAllButtons}\r\n showHeaderClose={options.showHeaderClose}\r\n showCloseButton={options.showCloseButton}\r\n showConfirmButton={options.showConfirmButton}\r\n onClose={closeModal}\r\n onConfirm={options.onConfirm}\r\n >\r\n {content}\r\n </Modal>\r\n </ModalContext.Provider>\r\n );\r\n}\r\n\r\nexport function UseModal() {\r\n const ctx = useContext(ModalContext);\r\n if (!ctx) throw new Error(\"UseModal must be used within ModalProvider\");\r\n return ctx;\r\n}\r\n"],"mappings":";AAwCI,SACY,KADZ;AAlBG,IAAM,QAA8B,CAAC;AAAA,EAC1C,UAAU;AAAA,EACV;AAAA,EACA,cAAc;AAAA,EACd,YAAY;AAAA,EACZ;AAAA,EACA;AACF,MAAM;AACJ,QAAM,UAAU;AAAA,IACd;AAAA,IACA,SAAS,OAAO;AAAA,IAChB,cAAc,gCAAgC;AAAA,IAC9C;AAAA,EACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,qBAAC,SAAI,MAAK,SAAQ,WAAW,SAC1B;AAAA,aAAS,oBAAC,YAAO,WAAU,gBAAgB,iBAAM;AAAA,IACjD;AAAA,IAEA,eACC;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,WAAU;AAAA,QACV,cAAW;AAAA,QACX,SAAS;AAAA;AAAA,IACX;AAAA,KAEJ;AAEJ;;;ACrCU,gBAAAA,MAKgB,QAAAC,aALhB;AATH,IAAM,UAAkC,CAAC,EAAE,KAAK,QAAQ,MAAM;AACnE,SACE,gBAAAD,KAAC,SAAI,WAAU,YACb,0BAAAC;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,WAAU;AAAA,MACV,SAAS,MAAM,UAAU,GAAG;AAAA,MAE5B;AAAA,wBAAAD,KAAC,SAAI,WAAU,uEACb,0BAAAA,KAAC,UAAK,OAAO,EAAC,UAAS,OAAM,GAAI,cAAI,MAAK,GAC5C;AAAA,QAEA,gBAAAC,MAAC,UAAK,WAAU,6BACb;AAAA,cAAI;AAAA,UACJ,IAAI,WAAW,gBAAAA,MAAC,WAAM,WAAU,mBAAkB;AAAA;AAAA,YAAE,IAAI;AAAA,aAAQ;AAAA,WACnE;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;;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AS,KAAK;AAC1C,QAAM,CAAC,SAAS,UAAU,IAAIA,UAAoB,IAAI;AACtD,QAAM,CAAC,SAAS,UAAU,IAAIA,UAAuB,CAAC,CAAC;AAEvD,QAAM,YAAYC,aAAY,CAACC,UAAoBC,aAA2B;AAC5E,eAAWD,QAAO;AAClB,eAAWC,YAAW,CAAC,CAAC;AACxB,cAAU,IAAI;AAAA,EAChB,GAAG,CAAC,CAAC;AAEL,QAAM,aAAaF,aAAY,MAAM;AACnC,cAAU,KAAK;AAAA,EACjB,GAAG,CAAC,CAAC;AAEL,SACE,gBAAAH,OAAC,aAAa,UAAb,EAAsB,OAAO,EAAE,WAAW,WAAW,GACnD;AAAA;AAAA,IAED,gBAAAD;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,OAAO,QAAQ;AAAA,QACf,aAAa,QAAQ;AAAA,QACrB,sBAAsB,QAAQ;AAAA,QAC9B,mBAAmB,QAAQ;AAAA,QAC3B,iBAAiB,QAAQ;AAAA,QACzB,iBAAiB,QAAQ;AAAA,QACzB,mBAAmB,QAAQ;AAAA,QAC3B,SAAS;AAAA,QACT,WAAW,QAAQ;AAAA,QAElB;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;AAEO,SAAS,WAAW;AACzB,QAAM,MAAMO,YAAW,YAAY;AACnC,MAAI,CAAC,IAAK,OAAM,IAAI,MAAM,4CAA4C;AACtE,SAAO;AACT;","names":["jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsx","jsx","jsx","jsx","useState","jsx","useState","Fragment","jsx","jsxs","jsx","jsxs","jsx","useEffect","jsx","jsxs","useEffect","useState","jsx","jsxs","Fragment","jsx","jsxs","jsx","jsx","jsx","Fragment","jsx","jsxs","createContext","useCallback","useContext","useState","jsx","jsxs","createContext","useState","useCallback","content","options","useContext"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sparkstudio/common-ui",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",