@trops/dash-core 0.1.94 → 0.1.96

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.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import * as DashReact from '@trops/dash-react';
3
- import { isObject, ThemeContext, deepCopy, MainSection, getUUID, getStylesForItem, themeObjects, Heading, SubHeading3, InputText, Button, FontAwesomeIcon, Tag, SearchInput, ButtonIcon, Modal, Panel, Stepper, Paragraph, Heading3, MenuItem3, FormLabel, SelectMenu, CodeEditorInline, Sidebar, SettingsModal, SubHeading2, tailwindHeightFractions, Menu3, Panel3, DropdownPanel, MenuItem2, ButtonIcon2, DragComponent, ConfirmationModal, DropComponent, getStyleName, capitalizeFirstLetter, colorTypes, getCSSStyleForClassname, Panel2, Heading2, SubHeading, Paragraph2, Paragraph3, Button2, Button3, MenuItem, Tag2, Tag3, ButtonIcon3, DashPanel, colorNames, shades, themeVariants, Tabs3, DataList, Checkbox, Switch, StatCard, Card, Tabs, Accordion, Alert, Toast, ProgressBar, Toggle, Breadcrumbs, Card2, Tabs2, Accordion2, Alert2, Toast2, ProgressBar2, Toggle2, Breadcrumbs2, Card3, Accordion3, Alert3, Toast3, ProgressBar3, Toggle3, Breadcrumbs3, SelectInput, Icon2, AlgoliaSearchBox, CommandPalette, EmptyState, Navbar, withRouter, Menu as Menu$1 } from '@trops/dash-react';
3
+ import { isObject, ThemeContext, deepCopy, MainSection, getUUID, getStylesForItem, themeObjects, Heading, SubHeading3, InputText, Button, FontAwesomeIcon, Tag, SearchInput, ButtonIcon, Modal, Panel, Stepper, Paragraph, Heading3, MenuItem3, FormLabel, SelectMenu, CodeEditorInline, Sidebar, SettingsModal, SubHeading2, tailwindHeightFractions, Menu3, Panel3, DropdownPanel, MenuItem2, ButtonIcon2, DragComponent, ConfirmationModal, DropComponent, getStyleName, capitalizeFirstLetter, colorTypes, getCSSStyleForClassname, Panel2, Heading2, SubHeading, Paragraph2, Paragraph3, Button2, Button3, MenuItem, Tag2, Tag3, ButtonIcon3, DashPanel, colorNames, shades, themeVariants, Tabs3, DataList, Checkbox, Switch, StatCard, Card, Tabs, Accordion, Alert, Toast, ProgressBar, Toggle, Breadcrumbs, Card2, Tabs2, Accordion2, Alert2, Toast2, ProgressBar2, Toggle2, Breadcrumbs2, Card3, Accordion3, Alert3, Toast3, ProgressBar3, Toggle3, Breadcrumbs3, TextArea, SelectInput, Icon2, AlgoliaSearchBox, CommandPalette, EmptyState, Navbar, withRouter, Menu as Menu$1 } from '@trops/dash-react';
4
4
  export * from '@trops/dash-react';
5
5
  export { ThemeContext } from '@trops/dash-react';
6
6
  import _typeof from '@babel/runtime/helpers/typeof';
@@ -3061,7 +3061,7 @@ var LayoutManagerPicker = function LayoutManagerPicker(_ref2) {
3061
3061
  });
3062
3062
  };
3063
3063
 
3064
- var FOLDER_ICONS = [
3064
+ var FOLDER_ICONS$1 = [
3065
3065
  // General / UI
3066
3066
  "home", "folder", "star", "heart", "bookmark", "tag", "flag", "bell", "circle", "square", "circle-check", "thumbs-up", "clone", "signal",
3067
3067
  // Communication
@@ -3084,7 +3084,7 @@ var FOLDER_ICONS = [
3084
3084
  "file", "file-code", "clipboard", "book", "pen", "pencil",
3085
3085
  // Misc
3086
3086
  "magnifying-glass", "eye", "lock", "key", "shield", "clock", "calendar", "link"];
3087
- var ALL_ICON_NAMES = Object.keys(DashReact).filter(function (key) {
3087
+ var ALL_ICON_NAMES$1 = Object.keys(DashReact).filter(function (key) {
3088
3088
  return key.startsWith("fa") && key !== "fas";
3089
3089
  }).map(function (key) {
3090
3090
  var _DashReact$key;
@@ -3092,8 +3092,8 @@ var ALL_ICON_NAMES = Object.keys(DashReact).filter(function (key) {
3092
3092
  }).filter(Boolean).filter(function (name, index, arr) {
3093
3093
  return arr.indexOf(name) === index;
3094
3094
  }).sort();
3095
- var CURATED_SET = new Set(FOLDER_ICONS);
3096
- var IconPicker = function IconPicker(_ref) {
3095
+ var CURATED_SET$1 = new Set(FOLDER_ICONS$1);
3096
+ var IconPicker$1 = function IconPicker(_ref) {
3097
3097
  var selectedIcon = _ref.selectedIcon,
3098
3098
  onSelectIcon = _ref.onSelectIcon;
3099
3099
  var _useState = useState(""),
@@ -3102,13 +3102,13 @@ var IconPicker = function IconPicker(_ref) {
3102
3102
  setSearch = _useState2[1];
3103
3103
  var query = search.trim().toLowerCase();
3104
3104
  var filteredCurated = useMemo(function () {
3105
- return query ? FOLDER_ICONS.filter(function (name) {
3105
+ return query ? FOLDER_ICONS$1.filter(function (name) {
3106
3106
  return name.includes(query);
3107
- }) : FOLDER_ICONS;
3107
+ }) : FOLDER_ICONS$1;
3108
3108
  }, [query]);
3109
3109
  var remainingIcons = useMemo(function () {
3110
- var all = ALL_ICON_NAMES.filter(function (name) {
3111
- return !CURATED_SET.has(name);
3110
+ var all = ALL_ICON_NAMES$1.filter(function (name) {
3111
+ return !CURATED_SET$1.has(name);
3112
3112
  });
3113
3113
  return query ? all.filter(function (name) {
3114
3114
  return name.includes(query);
@@ -3209,7 +3209,7 @@ var FolderDetail = function FolderDetail(_ref2) {
3209
3209
  children: [/*#__PURE__*/jsx("span", {
3210
3210
  className: "flex-shrink-0 text-sm font-medium opacity-70",
3211
3211
  children: "Icon"
3212
- }), /*#__PURE__*/jsx(IconPicker, {
3212
+ }), /*#__PURE__*/jsx(IconPicker$1, {
3213
3213
  selectedIcon: formIcon,
3214
3214
  onSelectIcon: setFormIcon
3215
3215
  })]
@@ -3500,7 +3500,7 @@ var LayoutManagerModal = function LayoutManagerModal(_ref) {
3500
3500
  placeholder: "Folder name"
3501
3501
  }), /*#__PURE__*/jsx("div", {
3502
3502
  className: "grid grid-cols-10 gap-2",
3503
- children: FOLDER_ICONS.map(function (icon) {
3503
+ children: FOLDER_ICONS$1.map(function (icon) {
3504
3504
  var isIconSelected = icon === newFolderIcon;
3505
3505
  return /*#__PURE__*/jsx("div", {
3506
3506
  className: "flex items-center justify-center p-2 rounded cursor-pointer transition-all ".concat(isIconSelected ? "bg-blue-600 ring-2 ring-blue-400 text-white" : "bg-gray-700 text-gray-400 hover:bg-gray-600 hover:text-gray-200"),
@@ -26461,6 +26461,121 @@ var StarRating = function StarRating(_ref) {
26461
26461
  });
26462
26462
  };
26463
26463
 
26464
+ var FOLDER_ICONS = [
26465
+ // General / UI
26466
+ "home", "folder", "star", "heart", "bookmark", "tag", "flag", "bell", "circle", "square", "circle-check", "thumbs-up", "clone", "signal",
26467
+ // Communication
26468
+ "phone", "envelope", "comment", "message", "paper-plane",
26469
+ // Media
26470
+ "image", "camera", "music", "video", "film", "headphones",
26471
+ // Tech
26472
+ "code", "terminal", "database", "server", "wifi", "plug", "robot", "microchip", "globe",
26473
+ // Nature
26474
+ "leaf", "seedling", "tree", "sun", "moon", "cloud", "bolt", "fire", "snowflake", "water",
26475
+ // Objects
26476
+ "hammer", "wrench", "gear", "briefcase", "cart-shopping", "truck", "car", "plane", "rocket",
26477
+ // People / Activity
26478
+ "user", "users", "trophy", "gamepad", "dumbbell", "graduation-cap", "baby", "baby-carriage",
26479
+ // Arrows / Navigation
26480
+ "arrow-up", "arrow-down", "arrow-left", "arrow-right", "arrows-up-down", "arrows-left-right", "minus",
26481
+ // Data / Charts
26482
+ "chart-bar", "chart-line", "chart-pie", "table", "list", "layer-group",
26483
+ // Files
26484
+ "file", "file-code", "clipboard", "book", "pen", "pencil",
26485
+ // Misc
26486
+ "magnifying-glass", "eye", "lock", "key", "shield", "clock", "calendar", "link"];
26487
+ var ALL_ICON_NAMES = Object.keys(DashReact).filter(function (key) {
26488
+ return key.startsWith("fa") && key !== "fas";
26489
+ }).map(function (key) {
26490
+ var _DashReact$key;
26491
+ return (_DashReact$key = DashReact[key]) === null || _DashReact$key === void 0 ? void 0 : _DashReact$key.iconName;
26492
+ }).filter(Boolean).filter(function (name, index, arr) {
26493
+ return arr.indexOf(name) === index;
26494
+ }).sort();
26495
+ var CURATED_SET = new Set(FOLDER_ICONS);
26496
+ var IconPicker = function IconPicker(_ref) {
26497
+ var selectedIcon = _ref.selectedIcon,
26498
+ onSelectIcon = _ref.onSelectIcon;
26499
+ var _useState = useState(""),
26500
+ _useState2 = _slicedToArray(_useState, 2),
26501
+ search = _useState2[0],
26502
+ setSearch = _useState2[1];
26503
+ var query = search.trim().toLowerCase();
26504
+ var filteredCurated = useMemo(function () {
26505
+ return query ? FOLDER_ICONS.filter(function (name) {
26506
+ return name.includes(query);
26507
+ }) : FOLDER_ICONS;
26508
+ }, [query]);
26509
+ var remainingIcons = useMemo(function () {
26510
+ var all = ALL_ICON_NAMES.filter(function (name) {
26511
+ return !CURATED_SET.has(name);
26512
+ });
26513
+ return query ? all.filter(function (name) {
26514
+ return name.includes(query);
26515
+ }) : all;
26516
+ }, [query]);
26517
+ var hasResults = filteredCurated.length > 0 || remainingIcons.length > 0;
26518
+ var renderIcon = function renderIcon(icon) {
26519
+ return /*#__PURE__*/jsx(ButtonIcon, {
26520
+ icon: icon,
26521
+ selected: icon === selectedIcon,
26522
+ onClick: function onClick() {
26523
+ return onSelectIcon(icon);
26524
+ },
26525
+ iconSize: "h-6 w-6",
26526
+ backgroundColor: "transparent",
26527
+ className: icon !== selectedIcon ? "opacity-50 hover:!opacity-80" : ""
26528
+ }, icon);
26529
+ };
26530
+ return /*#__PURE__*/jsxs("div", {
26531
+ className: "flex flex-col flex-1 min-h-0 space-y-3",
26532
+ children: [/*#__PURE__*/jsx("div", {
26533
+ className: "flex-shrink-0",
26534
+ children: /*#__PURE__*/jsx(SearchInput, {
26535
+ value: search,
26536
+ onChange: setSearch,
26537
+ placeholder: "Search icons..."
26538
+ })
26539
+ }), /*#__PURE__*/jsxs("div", {
26540
+ className: "flex-1 min-h-0 overflow-y-auto space-y-3",
26541
+ children: [!hasResults && /*#__PURE__*/jsxs("span", {
26542
+ className: "text-sm opacity-50 py-2",
26543
+ children: ["No icons match \"", search, "\""]
26544
+ }), filteredCurated.length > 0 && /*#__PURE__*/jsxs("div", {
26545
+ className: "flex flex-col space-y-1.5",
26546
+ children: [/*#__PURE__*/jsx("span", {
26547
+ className: "text-xs font-medium opacity-50",
26548
+ children: "Suggested"
26549
+ }), /*#__PURE__*/jsx("div", {
26550
+ className: "grid grid-cols-6 gap-2",
26551
+ children: filteredCurated.map(renderIcon)
26552
+ })]
26553
+ }), remainingIcons.length > 0 && /*#__PURE__*/jsxs("div", {
26554
+ className: "flex flex-col space-y-1.5",
26555
+ children: [/*#__PURE__*/jsx("span", {
26556
+ className: "text-xs font-medium opacity-50",
26557
+ children: "All Icons"
26558
+ }), /*#__PURE__*/jsx("div", {
26559
+ className: "grid grid-cols-6 gap-2",
26560
+ children: remainingIcons.map(renderIcon)
26561
+ })]
26562
+ })]
26563
+ })]
26564
+ });
26565
+ };
26566
+
26567
+ var DASHBOARD_TAGS = ["productivity", "monitoring", "analytics", "communication", "developer", "sales", "marketing", "finance", "project-management", "social", "news", "utilities"];
26568
+
26569
+ /**
26570
+ * PublishDashboardModal — multi-step stepper for preparing a dashboard
26571
+ * for registry publishing.
26572
+ *
26573
+ * Steps:
26574
+ * 1. Details — Author name (required) + description (textarea)
26575
+ * 2. Tags — Predefined tag selection with toggle-pill styling
26576
+ * 3. Icon — Full icon picker with search
26577
+ * 4. Publish — Review summary, publish action, result display
26578
+ */
26464
26579
  var PublishDashboardModal = function PublishDashboardModal(_ref) {
26465
26580
  var isOpen = _ref.isOpen,
26466
26581
  setIsOpen = _ref.setIsOpen,
@@ -26472,36 +26587,67 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
26472
26587
  var panelStyles = getStylesForItem(themeObjects.PANEL, currentTheme, {
26473
26588
  grow: false
26474
26589
  });
26475
- var _useState = useState(""),
26590
+ // Stepper state
26591
+ var _useState = useState(0),
26476
26592
  _useState2 = _slicedToArray(_useState, 2),
26477
- description = _useState2[0],
26478
- setDescription = _useState2[1];
26593
+ step = _useState2[0],
26594
+ setStep = _useState2[1];
26595
+
26596
+ // Step 1: Details
26479
26597
  var _useState3 = useState(""),
26480
26598
  _useState4 = _slicedToArray(_useState3, 2),
26481
- tags = _useState4[0],
26482
- setTags = _useState4[1];
26599
+ authorName = _useState4[0],
26600
+ setAuthorName = _useState4[1];
26483
26601
  var _useState5 = useState(""),
26484
26602
  _useState6 = _slicedToArray(_useState5, 2),
26485
- icon = _useState6[0],
26486
- setIcon = _useState6[1];
26487
- var _useState7 = useState(false),
26603
+ description = _useState6[0],
26604
+ setDescription = _useState6[1];
26605
+
26606
+ // Step 2: Tags
26607
+ var _useState7 = useState([]),
26488
26608
  _useState8 = _slicedToArray(_useState7, 2),
26489
- isPublishing = _useState8[0],
26490
- setIsPublishing = _useState8[1];
26491
- var _useState9 = useState(null),
26609
+ selectedTags = _useState8[0],
26610
+ setSelectedTags = _useState8[1];
26611
+
26612
+ // Step 3: Icon
26613
+ var _useState9 = useState("grip"),
26492
26614
  _useState0 = _slicedToArray(_useState9, 2),
26493
- result = _useState0[0],
26494
- setResult = _useState0[1];
26615
+ icon = _useState0[0],
26616
+ setIcon = _useState0[1];
26617
+
26618
+ // Step 4: Publish
26619
+ var _useState1 = useState(false),
26620
+ _useState10 = _slicedToArray(_useState1, 2),
26621
+ isPublishing = _useState10[0],
26622
+ setIsPublishing = _useState10[1];
26623
+ var _useState11 = useState(null),
26624
+ _useState12 = _slicedToArray(_useState11, 2),
26625
+ result = _useState12[0],
26626
+ setResult = _useState12[1];
26627
+ function resetState() {
26628
+ setStep(0);
26629
+ setAuthorName("");
26630
+ setDescription("");
26631
+ setSelectedTags([]);
26632
+ setIcon("grip");
26633
+ setIsPublishing(false);
26634
+ setResult(null);
26635
+ }
26495
26636
  function handleClose() {
26496
26637
  setIsOpen(false);
26497
- // Reset state after a brief delay to avoid flash
26498
- setTimeout(function () {
26499
- setDescription("");
26500
- setTags("");
26501
- setIcon("");
26502
- setIsPublishing(false);
26503
- setResult(null);
26504
- }, 200);
26638
+ setTimeout(resetState, 200);
26639
+ }
26640
+ function handleStepChange(nextStep) {
26641
+ if (step === 0 && nextStep > 0 && !authorName.trim()) return;
26642
+ if (step === 1 && nextStep > 1 && selectedTags.length === 0) return;
26643
+ setStep(nextStep);
26644
+ }
26645
+ function toggleTag(tag) {
26646
+ setSelectedTags(function (prev) {
26647
+ return prev.includes(tag) ? prev.filter(function (t) {
26648
+ return t !== tag;
26649
+ }) : [].concat(_toConsumableArray(prev), [tag]);
26650
+ });
26505
26651
  }
26506
26652
  function handlePublish() {
26507
26653
  return _handlePublish.apply(this, arguments);
@@ -26522,11 +26668,10 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
26522
26668
  setResult(null);
26523
26669
  _context.prev = 2;
26524
26670
  options = {
26671
+ authorName: authorName.trim(),
26525
26672
  description: description.trim() || undefined,
26526
- tags: tags.split(",").map(function (t) {
26527
- return t.trim();
26528
- }).filter(Boolean),
26529
- icon: icon.trim() || undefined
26673
+ tags: selectedTags,
26674
+ icon: icon || undefined
26530
26675
  };
26531
26676
  _context.next = 3;
26532
26677
  return window.mainApi.dashboardConfig.prepareDashboardForPublish(appId, workspaceId, options);
@@ -26554,64 +26699,226 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
26554
26699
  }));
26555
26700
  return _handlePublish.apply(this, arguments);
26556
26701
  }
26557
- return /*#__PURE__*/jsx(ConfirmationModal, {
26702
+ var isLastStep = step === 3;
26703
+ var canAdvance = step === 0 ? !!authorName.trim() : step === 1 ? selectedTags.length > 0 : true;
26704
+ return /*#__PURE__*/jsx(Modal, {
26558
26705
  isOpen: isOpen,
26559
26706
  setIsOpen: handleClose,
26560
- title: "Publish \"".concat(workspaceName || "Dashboard", "\""),
26561
- confirmLabel: isPublishing ? "Preparing..." : "Prepare for Publish",
26562
- onConfirm: result ? handleClose : handlePublish,
26563
- onCancel: handleClose,
26564
- disabled: isPublishing,
26565
- children: /*#__PURE__*/jsx("div", {
26566
- className: "space-y-4 ".concat(panelStyles.textColor || "text-gray-200"),
26567
- children: !result ? /*#__PURE__*/jsxs(Fragment, {
26568
- children: [/*#__PURE__*/jsx("p", {
26569
- className: "text-sm opacity-70",
26570
- children: "This will create a publish-ready ZIP file that can be submitted to the dashboard registry."
26571
- }), /*#__PURE__*/jsxs("div", {
26572
- className: "space-y-3",
26573
- children: [/*#__PURE__*/jsx(InputText, {
26574
- label: "Description",
26575
- value: description,
26576
- onChange: setDescription,
26577
- placeholder: "A brief description of this dashboard..."
26578
- }), /*#__PURE__*/jsx(InputText, {
26579
- label: "Tags (comma-separated)",
26580
- value: tags,
26581
- onChange: setTags,
26582
- placeholder: "productivity, slack, monitoring"
26583
- }), /*#__PURE__*/jsx(InputText, {
26584
- label: "Icon (FontAwesome name)",
26585
- value: icon,
26586
- onChange: setIcon,
26587
- placeholder: "chart-line"
26588
- })]
26707
+ width: "w-full max-w-2xl",
26708
+ height: "h-[70vh]",
26709
+ children: /*#__PURE__*/jsxs("div", {
26710
+ className: "flex flex-col h-full rounded-lg overflow-clip border ".concat(panelStyles.backgroundColor || "", " ").concat(panelStyles.borderColor || "", " ").concat(panelStyles.textColor || ""),
26711
+ children: [/*#__PURE__*/jsxs("div", {
26712
+ className: "flex-shrink-0 flex flex-row items-center justify-between p-4 border-b border-white/10",
26713
+ children: [/*#__PURE__*/jsxs("span", {
26714
+ className: "text-lg font-semibold",
26715
+ children: ["Publish \"", workspaceName || "Dashboard", "\""]
26716
+ }), /*#__PURE__*/jsx("button", {
26717
+ type: "button",
26718
+ onClick: handleClose,
26719
+ className: "opacity-50 hover:opacity-100 transition-opacity cursor-pointer",
26720
+ children: /*#__PURE__*/jsx(FontAwesomeIcon, {
26721
+ icon: "xmark",
26722
+ className: "h-5 w-5"
26723
+ })
26589
26724
  })]
26590
- }) : result.success ? /*#__PURE__*/jsxs("div", {
26591
- className: "space-y-3",
26592
- children: [/*#__PURE__*/jsxs("div", {
26593
- className: "flex items-center gap-2",
26594
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
26595
- icon: "circle-check",
26596
- className: "h-4 w-4 text-green-400"
26597
- }), /*#__PURE__*/jsx("span", {
26598
- className: "text-sm",
26599
- children: "Dashboard prepared for publishing."
26600
- })]
26601
- }), result.filePath && /*#__PURE__*/jsxs("div", {
26602
- className: "text-xs opacity-50 break-all",
26603
- children: ["Saved to: ", result.filePath]
26725
+ }), /*#__PURE__*/jsxs(Stepper, {
26726
+ activeStep: step,
26727
+ onStepChange: handleStepChange,
26728
+ showNavigation: false,
26729
+ className: "flex-1 min-h-0 flex flex-col px-6 pt-2",
26730
+ children: [/*#__PURE__*/jsx(Stepper.Step, {
26731
+ label: "Details",
26732
+ children: /*#__PURE__*/jsxs("div", {
26733
+ className: "flex-1 min-h-0 overflow-y-auto pb-4 space-y-5",
26734
+ children: [/*#__PURE__*/jsx("p", {
26735
+ className: "text-sm opacity-70",
26736
+ children: "Provide details about your dashboard for the registry listing."
26737
+ }), /*#__PURE__*/jsx(InputText, {
26738
+ label: "Author Name *",
26739
+ value: authorName,
26740
+ onChange: setAuthorName,
26741
+ placeholder: "Your name"
26742
+ }), /*#__PURE__*/jsx(TextArea, {
26743
+ label: "Description",
26744
+ value: description,
26745
+ onChange: setDescription,
26746
+ placeholder: "A brief description of this dashboard...",
26747
+ rows: 3
26748
+ })]
26749
+ })
26750
+ }), /*#__PURE__*/jsx(Stepper.Step, {
26751
+ label: "Tags",
26752
+ children: /*#__PURE__*/jsxs("div", {
26753
+ className: "flex-1 min-h-0 overflow-y-auto pb-4 space-y-5",
26754
+ children: [/*#__PURE__*/jsx("p", {
26755
+ className: "text-sm opacity-70",
26756
+ children: "Select at least one tag to categorize your dashboard."
26757
+ }), /*#__PURE__*/jsx("div", {
26758
+ className: "grid grid-cols-3 gap-2",
26759
+ children: DASHBOARD_TAGS.map(function (tag) {
26760
+ var isSelected = selectedTags.includes(tag);
26761
+ return /*#__PURE__*/jsx("button", {
26762
+ type: "button",
26763
+ onClick: function onClick() {
26764
+ return toggleTag(tag);
26765
+ },
26766
+ className: "px-3 py-1.5 rounded-full text-sm border transition-colors cursor-pointer ".concat(isSelected ? "bg-white/15 border-white/30 text-white" : "bg-transparent border-white/10 text-white/60 hover:border-white/20 hover:text-white/80"),
26767
+ children: tag
26768
+ }, tag);
26769
+ })
26770
+ })]
26771
+ })
26772
+ }), /*#__PURE__*/jsx(Stepper.Step, {
26773
+ label: "Icon",
26774
+ children: /*#__PURE__*/jsx("div", {
26775
+ className: "flex-1 min-h-0 flex flex-col pb-4",
26776
+ children: /*#__PURE__*/jsx(IconPicker, {
26777
+ selectedIcon: icon,
26778
+ onSelectIcon: setIcon
26779
+ })
26780
+ })
26781
+ }), /*#__PURE__*/jsx(Stepper.Step, {
26782
+ label: "Publish",
26783
+ children: /*#__PURE__*/jsx("div", {
26784
+ className: "flex-1 min-h-0 overflow-y-auto pb-4 space-y-4",
26785
+ children: !result ? /*#__PURE__*/jsxs(Fragment, {
26786
+ children: [/*#__PURE__*/jsx("p", {
26787
+ className: "text-sm opacity-70",
26788
+ children: "Review your dashboard details before publishing."
26789
+ }), /*#__PURE__*/jsxs("div", {
26790
+ className: "bg-white/5 border border-white/10 rounded-lg p-4 space-y-2 text-sm",
26791
+ children: [/*#__PURE__*/jsxs("div", {
26792
+ className: "flex gap-2",
26793
+ children: [/*#__PURE__*/jsx("span", {
26794
+ className: "opacity-50 w-20 flex-shrink-0",
26795
+ children: "Author"
26796
+ }), /*#__PURE__*/jsx("span", {
26797
+ children: authorName
26798
+ })]
26799
+ }), description.trim() && /*#__PURE__*/jsxs("div", {
26800
+ className: "flex gap-2",
26801
+ children: [/*#__PURE__*/jsx("span", {
26802
+ className: "opacity-50 w-20 flex-shrink-0",
26803
+ children: "Description"
26804
+ }), /*#__PURE__*/jsx("span", {
26805
+ children: description
26806
+ })]
26807
+ }), /*#__PURE__*/jsxs("div", {
26808
+ className: "flex gap-2",
26809
+ children: [/*#__PURE__*/jsx("span", {
26810
+ className: "opacity-50 w-20 flex-shrink-0",
26811
+ children: "Tags"
26812
+ }), /*#__PURE__*/jsx("span", {
26813
+ children: selectedTags.length > 0 ? selectedTags.join(", ") : "None"
26814
+ })]
26815
+ }), /*#__PURE__*/jsxs("div", {
26816
+ className: "flex gap-2 items-center",
26817
+ children: [/*#__PURE__*/jsx("span", {
26818
+ className: "opacity-50 w-20 flex-shrink-0",
26819
+ children: "Icon"
26820
+ }), /*#__PURE__*/jsx(FontAwesomeIcon, {
26821
+ icon: icon || "grip",
26822
+ className: "h-4 w-4"
26823
+ }), /*#__PURE__*/jsx("span", {
26824
+ className: "opacity-70",
26825
+ children: icon || "grip"
26826
+ })]
26827
+ })]
26828
+ })]
26829
+ }) : result.success ? /*#__PURE__*/jsxs("div", {
26830
+ className: "space-y-3",
26831
+ children: [/*#__PURE__*/jsxs("div", {
26832
+ className: "flex items-center gap-2",
26833
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
26834
+ icon: "circle-check",
26835
+ className: "h-4 w-4 text-green-400"
26836
+ }), /*#__PURE__*/jsx("span", {
26837
+ className: "text-sm",
26838
+ children: "Dashboard prepared for publishing."
26839
+ })]
26840
+ }), result.filePath && /*#__PURE__*/jsxs("div", {
26841
+ className: "text-xs opacity-50 break-all",
26842
+ children: ["Saved to: ", result.filePath]
26843
+ }), result.warnings && result.warnings.length > 0 && /*#__PURE__*/jsxs("div", {
26844
+ className: "bg-amber-500/10 border border-amber-500/20 rounded-lg p-3 space-y-2",
26845
+ children: [/*#__PURE__*/jsxs("div", {
26846
+ className: "flex items-start gap-2",
26847
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
26848
+ icon: "triangle-exclamation",
26849
+ className: "h-3.5 w-3.5 text-amber-400 mt-0.5 flex-shrink-0"
26850
+ }), /*#__PURE__*/jsx("span", {
26851
+ className: "text-xs text-amber-300/90",
26852
+ children: "The following widgets are not currently on the registry. This may be intentional if they are private. Dashboards referencing these widgets can only be installed by users who already have them."
26853
+ })]
26854
+ }), /*#__PURE__*/jsx("ul", {
26855
+ className: "text-xs opacity-60 pl-5 list-disc space-y-0.5",
26856
+ children: result.warnings.map(function (w) {
26857
+ return /*#__PURE__*/jsx("li", {
26858
+ children: w
26859
+ }, w);
26860
+ })
26861
+ })]
26862
+ }), result.registryCheckFailed && /*#__PURE__*/jsx("div", {
26863
+ className: "bg-amber-500/10 border border-amber-500/20 rounded-lg p-3",
26864
+ children: /*#__PURE__*/jsxs("div", {
26865
+ className: "flex items-start gap-2",
26866
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
26867
+ icon: "triangle-exclamation",
26868
+ className: "h-3.5 w-3.5 text-amber-400 mt-0.5 flex-shrink-0"
26869
+ }), /*#__PURE__*/jsx("span", {
26870
+ className: "text-xs text-amber-300/90",
26871
+ children: "Unable to reach the registry to verify widget availability. Your dashboard was still prepared successfully."
26872
+ })]
26873
+ })
26874
+ })]
26875
+ }) : /*#__PURE__*/jsxs("div", {
26876
+ className: "flex items-center gap-2",
26877
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
26878
+ icon: "circle-xmark",
26879
+ className: "h-4 w-4 text-red-400"
26880
+ }), /*#__PURE__*/jsx("span", {
26881
+ className: "text-sm text-red-400",
26882
+ children: result.error || "Publish preparation failed."
26883
+ })]
26884
+ })
26885
+ })
26604
26886
  })]
26605
- }) : /*#__PURE__*/jsxs("div", {
26606
- className: "flex items-center gap-2",
26607
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
26608
- icon: "circle-xmark",
26609
- className: "h-4 w-4 text-red-400"
26610
- }), /*#__PURE__*/jsx("span", {
26611
- className: "text-sm text-red-400",
26612
- children: result.error || "Publish preparation failed."
26887
+ }), /*#__PURE__*/jsxs("div", {
26888
+ className: "flex-shrink-0 flex flex-row items-center px-6 py-4 border-t border-white/10",
26889
+ children: [/*#__PURE__*/jsx("div", {
26890
+ className: "flex flex-row gap-2",
26891
+ children: /*#__PURE__*/jsx(Button3, {
26892
+ title: step === 0 ? "Cancel" : "Back",
26893
+ onClick: step === 0 ? handleClose : function () {
26894
+ return setStep(step - 1);
26895
+ },
26896
+ disabled: isPublishing
26897
+ })
26898
+ }), /*#__PURE__*/jsx("div", {
26899
+ className: "flex-1 text-center",
26900
+ children: /*#__PURE__*/jsxs("span", {
26901
+ className: "text-xs opacity-40",
26902
+ children: ["Step ", step + 1, " of 4"]
26903
+ })
26904
+ }), /*#__PURE__*/jsx("div", {
26905
+ className: "flex flex-row gap-2",
26906
+ children: result !== null && result !== void 0 && result.success ? /*#__PURE__*/jsx(Button2, {
26907
+ title: "Done",
26908
+ onClick: handleClose
26909
+ }) : isLastStep ? /*#__PURE__*/jsx(Button2, {
26910
+ title: isPublishing ? "Preparing..." : "Publish",
26911
+ onClick: handlePublish,
26912
+ disabled: isPublishing
26913
+ }) : /*#__PURE__*/jsx(Button2, {
26914
+ title: "Next",
26915
+ onClick: function onClick() {
26916
+ return handleStepChange(step + 1);
26917
+ },
26918
+ disabled: !canAdvance
26919
+ })
26613
26920
  })]
26614
- })
26921
+ })]
26615
26922
  })
26616
26923
  });
26617
26924
  };