@trops/dash-core 0.1.459 → 0.1.460

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.js CHANGED
@@ -6964,12 +6964,19 @@ var KNOWN_PROVIDERS = [{
6964
6964
  /**
6965
6965
  * WizardDiscoverStep
6966
6966
  *
6967
- * Step 0 of the Dashboard Wizard. Combines search, category/provider
6968
- * filter chips, and results (dashboards + widgets) in a single view.
6969
- * Replaces the old Intent, Providers, and Results steps.
6967
+ * Step 0 of the Dashboard Wizard. Two-column layout mirroring the
6968
+ * dash-registry homepage: a left filter sidebar (TYPE / CATEGORIES /
6969
+ * PROVIDERS as vertical lists) and a right content pane with the
6970
+ * search input + result grid.
6970
6971
  *
6971
- * - Selecting a dashboard sets path to "prebuilt" and clears widget selections.
6972
- * - Selecting widgets sets path to "custom" and clears dashboard selection.
6972
+ * - TYPE filter (single-select): All / Dashboards / Widgets. Replaces
6973
+ * the previous tab bar so the right pane is a single result surface.
6974
+ * - CATEGORIES + PROVIDERS (multi-select): preserves the existing
6975
+ * wizard filter shape (`filters.categories[]`, `filters.providers[]`).
6976
+ *
6977
+ * Selecting a dashboard sets path = "prebuilt" and clears widget
6978
+ * selections. Selecting widgets sets path = "custom" and clears the
6979
+ * dashboard selection.
6973
6980
  *
6974
6981
  * @param {Object} props
6975
6982
  * @param {Object} props.state - Wizard state from useWizardState
@@ -7052,7 +7059,7 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
7052
7059
  });
7053
7060
  }, [state.selectedWidgets]);
7054
7061
 
7055
- // --- Filter chip handlers ---
7062
+ // --- Filter handlers ---
7056
7063
  var handleToggleCategory = React.useCallback(function (cat) {
7057
7064
  return dispatch({
7058
7065
  type: "TOGGLE_FILTER_CATEGORY",
@@ -7066,13 +7073,26 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
7066
7073
  });
7067
7074
  }, [dispatch]);
7068
7075
 
7069
- // Tab state (DASH-185)
7076
+ // TYPE filter — replaces the old tab bar. Binary because the
7077
+ // wizard's data model is mutually exclusive: selecting a dashboard
7078
+ // clears widgets and sets path="prebuilt"; selecting a widget
7079
+ // clears the dashboard and sets path="custom". An "All" view would
7080
+ // imply you can browse both freely when in reality the first click
7081
+ // commits you to one of two paths. Defaulting to "dashboards" since
7082
+ // pre-built is the simpler, more common starting point.
7070
7083
  var _useState = React.useState("dashboards"),
7071
7084
  _useState2 = _slicedToArray(_useState, 2),
7072
- activeTab = _useState2[0],
7073
- setActiveTab = _useState2[1];
7085
+ typeFilter = _useState2[0],
7086
+ setTypeFilter = _useState2[1];
7087
+ var TYPE_OPTIONS = [{
7088
+ key: "dashboards",
7089
+ label: "Dashboards"
7090
+ }, {
7091
+ key: "widgets",
7092
+ label: "Widgets"
7093
+ }];
7074
7094
 
7075
- // Clear selection handler (DASH-186)
7095
+ // Clear-selection handler
7076
7096
  var hasSelection = state.selectedDashboard !== null || state.selectedWidgets.length > 0;
7077
7097
  var handleClearSelection = React.useCallback(function () {
7078
7098
  dispatch({
@@ -7088,236 +7108,240 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
7088
7108
  payload: null
7089
7109
  });
7090
7110
  }, [dispatch]);
7091
- var hasResults = filteredDashboards.length > 0 || filteredWidgets.length > 0;
7111
+ var showDashboards = typeFilter === "dashboards";
7112
+ var showWidgets = typeFilter === "widgets";
7113
+ var visibleDashboards = showDashboards ? filteredDashboards : [];
7114
+ var visibleWidgets = showWidgets ? filteredWidgets : [];
7115
+ var hasResults = visibleDashboards.length > 0 || visibleWidgets.length > 0;
7092
7116
  var hasActiveFilters = filters.categories.length > 0 || filters.providers.length > 0;
7117
+
7118
+ // Shared row class for sidebar list items.
7119
+ var rowClass = function rowClass(active) {
7120
+ return "text-sm py-1.5 px-3 rounded text-left transition-colors flex items-center justify-between ".concat(active ? "bg-blue-900 text-blue-200" : "text-gray-400 hover:bg-gray-800 hover:text-gray-200");
7121
+ };
7122
+ var sectionLabelClass = "text-xs font-semibold text-gray-400 uppercase tracking-wide px-3 mb-1";
7093
7123
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
7094
- className: "flex flex-col gap-4",
7095
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.InputText, {
7096
- value: searchQuery,
7097
- onChange: handleSearchChange,
7098
- placeholder: "Search registry..."
7099
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
7100
- className: "flex flex-col gap-3",
7124
+ className: "flex flex-row gap-4",
7125
+ children: [/*#__PURE__*/jsxRuntime.jsxs("aside", {
7126
+ className: "flex-shrink-0 w-56 flex flex-col gap-4 overflow-y-auto",
7101
7127
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
7102
- className: "flex flex-col gap-1.5",
7128
+ className: "flex flex-col",
7103
7129
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
7104
- className: "text-xs font-semibold text-gray-400 uppercase tracking-wide",
7105
- children: "Categories"
7106
- }), /*#__PURE__*/jsxRuntime.jsx("div", {
7107
- className: "flex flex-wrap gap-1.5",
7108
- children: DASHBOARD_TAGS$1.map(function (tag) {
7109
- return /*#__PURE__*/jsxRuntime.jsx(DashReact.Tag2, {
7110
- text: tag,
7111
- onClick: function onClick() {
7112
- return handleToggleCategory(tag);
7113
- },
7114
- active: filters.categories.includes(tag)
7115
- }, tag);
7116
- })
7130
+ className: sectionLabelClass,
7131
+ children: "TYPE"
7132
+ }), TYPE_OPTIONS.map(function (opt) {
7133
+ var active = typeFilter === opt.key;
7134
+ var showBadge = opt.key === "widgets" && state.selectedWidgets.length > 0;
7135
+ return /*#__PURE__*/jsxRuntime.jsxs("button", {
7136
+ type: "button",
7137
+ onClick: function onClick() {
7138
+ return setTypeFilter(opt.key);
7139
+ },
7140
+ className: rowClass(active),
7141
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
7142
+ children: opt.label
7143
+ }), showBadge && /*#__PURE__*/jsxRuntime.jsx(DashReact.Tag3, {
7144
+ text: "".concat(state.selectedWidgets.length, " selected")
7145
+ })]
7146
+ }, opt.key);
7117
7147
  })]
7118
7148
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
7119
- className: "flex flex-col gap-1.5",
7149
+ className: "flex flex-col",
7120
7150
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
7121
- className: "text-xs font-semibold text-gray-400 uppercase tracking-wide",
7122
- children: "Providers"
7123
- }), /*#__PURE__*/jsxRuntime.jsx("div", {
7124
- className: "flex flex-wrap gap-1.5",
7125
- children: KNOWN_PROVIDERS.map(function (prov) {
7126
- return /*#__PURE__*/jsxRuntime.jsx(DashReact.Tag2, {
7127
- text: prov.name,
7128
- onClick: function onClick() {
7129
- return handleToggleProvider(prov.key);
7130
- },
7131
- active: filters.providers.includes(prov.key)
7132
- }, prov.key);
7133
- })
7151
+ className: sectionLabelClass,
7152
+ children: "CATEGORIES"
7153
+ }), DASHBOARD_TAGS$1.map(function (tag) {
7154
+ var active = filters.categories.includes(tag);
7155
+ return /*#__PURE__*/jsxRuntime.jsx("button", {
7156
+ type: "button",
7157
+ onClick: function onClick() {
7158
+ return handleToggleCategory(tag);
7159
+ },
7160
+ className: "".concat(rowClass(active), " capitalize"),
7161
+ children: /*#__PURE__*/jsxRuntime.jsx("span", {
7162
+ children: tag
7163
+ })
7164
+ }, tag);
7134
7165
  })]
7135
- })]
7136
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
7137
- className: "flex items-center justify-between",
7138
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
7139
- className: "flex gap-1",
7140
- children: [/*#__PURE__*/jsxRuntime.jsxs("button", {
7141
- type: "button",
7142
- className: "px-4 py-2 text-sm font-medium rounded-t transition-colors ".concat(activeTab === "dashboards" ? "bg-gray-800 text-blue-400 border-b-2 border-blue-400" : "text-gray-400 hover:text-gray-200"),
7143
- onClick: function onClick() {
7144
- return setActiveTab("dashboards");
7145
- },
7146
- children: ["Dashboards (", filteredDashboards.length, ")"]
7147
- }), /*#__PURE__*/jsxRuntime.jsxs("button", {
7148
- type: "button",
7149
- className: "px-4 py-2 text-sm font-medium rounded-t transition-colors ".concat(activeTab === "widgets" ? "bg-gray-800 text-blue-400 border-b-2 border-blue-400" : "text-gray-400 hover:text-gray-200"),
7150
- onClick: function onClick() {
7151
- return setActiveTab("widgets");
7152
- },
7153
- children: ["Widgets (", filteredWidgets.length, ")", state.selectedWidgets.length > 0 && /*#__PURE__*/jsxRuntime.jsx("span", {
7154
- className: "ml-1.5",
7155
- children: /*#__PURE__*/jsxRuntime.jsx(DashReact.Tag3, {
7156
- text: "".concat(state.selectedWidgets.length, " selected")
7166
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
7167
+ className: "flex flex-col",
7168
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
7169
+ className: sectionLabelClass,
7170
+ children: "PROVIDERS"
7171
+ }), KNOWN_PROVIDERS.map(function (prov) {
7172
+ var active = filters.providers.includes(prov.key);
7173
+ return /*#__PURE__*/jsxRuntime.jsx("button", {
7174
+ type: "button",
7175
+ onClick: function onClick() {
7176
+ return handleToggleProvider(prov.key);
7177
+ },
7178
+ className: rowClass(active),
7179
+ children: /*#__PURE__*/jsxRuntime.jsx("span", {
7180
+ children: prov.name
7157
7181
  })
7158
- })]
7182
+ }, prov.key);
7159
7183
  })]
7160
- }), hasSelection && /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
7161
- onClick: handleClearSelection,
7162
- title: "Clear Selection",
7163
- textSize: "text-xs",
7164
- padding: "py-1 px-3",
7165
- backgroundColor: "bg-gray-700",
7166
- textColor: "text-gray-400",
7167
- hoverTextColor: "hover:text-white",
7168
- hoverBackgroundColor: "hover:bg-gray-600",
7169
- icon: "xmark"
7170
7184
  })]
7171
- }), /*#__PURE__*/jsxRuntime.jsx("div", {
7172
- className: "flex flex-col gap-6",
7173
- children: isLoading ? /*#__PURE__*/jsxRuntime.jsxs("div", {
7174
- className: "flex flex-col items-center justify-center gap-2 py-12 text-gray-400",
7175
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
7176
- icon: "spinner",
7177
- spin: true,
7178
- fixedWidth: true
7179
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
7180
- children: "Searching registry..."
7181
- })]
7182
- }) : error ? /*#__PURE__*/jsxRuntime.jsxs("div", {
7183
- className: "flex items-center gap-2 text-red-400 py-4",
7184
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
7185
- icon: "circle-exclamation",
7186
- fixedWidth: true
7187
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
7188
- children: error
7189
- })]
7190
- }) : !hasResults ? /*#__PURE__*/jsxRuntime.jsxs("div", {
7191
- className: "flex flex-col items-center justify-center gap-2 py-12 text-gray-500",
7192
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
7193
- icon: "magnifying-glass",
7194
- fixedWidth: true
7195
- }), /*#__PURE__*/jsxRuntime.jsx("p", {
7196
- children: "No results match your search."
7197
- }), hasActiveFilters && /*#__PURE__*/jsxRuntime.jsx("p", {
7198
- className: "text-xs text-gray-600",
7199
- children: "Try removing some filters to see more results."
7200
- })]
7201
- }) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
7202
- children: [activeTab === "dashboards" && filteredDashboards.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
7203
- className: "flex flex-col gap-3",
7204
- children: /*#__PURE__*/jsxRuntime.jsx("div", {
7205
- className: "grid grid-cols-3 gap-3",
7206
- children: filteredDashboards.map(function (dash) {
7207
- var isSelected = state.selectedDashboard && state.selectedDashboard.name === dash.name;
7208
- var widgetCount = (dash.widgets || []).length;
7209
- var providerTags = (dash.providers || []).map(function (p) {
7210
- return p.name || p.type;
7211
- }).filter(Boolean);
7212
- return /*#__PURE__*/jsxRuntime.jsxs(DashReact.Card2, {
7213
- hover: true,
7214
- selected: isSelected,
7215
- padding: "p-5",
7216
- rounded: "rounded-lg",
7217
- className: "hover:shadow-lg",
7218
- onClick: function onClick() {
7219
- return handleSelectDashboard(dash);
7220
- },
7221
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
7222
- className: "flex flex-col items-center text-center gap-2",
7223
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
7224
- className: "relative",
7225
- children: [/*#__PURE__*/jsxRuntime.jsx("span", {
7226
- className: "text-2xl",
7227
- children: /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
7228
- icon: resolveIcon(dash.icon || "grid-2"),
7229
- fixedWidth: true,
7230
- className: "text-gray-400"
7231
- })
7232
- }), isSelected && /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
7233
- icon: "circle-check",
7234
- className: "absolute -top-1 -right-3 text-blue-400 text-xs"
7235
- })]
7236
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
7237
- className: "text-sm font-semibold text-gray-200",
7238
- children: dash.displayName || dash.name
7239
- })]
7240
- }), dash.description && /*#__PURE__*/jsxRuntime.jsx("p", {
7241
- className: "text-xs text-gray-400 mt-2 line-clamp-2 text-center",
7242
- children: dash.description
7243
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
7244
- className: "flex items-center justify-between mt-3 pt-2 border-t border-gray-700/50",
7245
- children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
7246
- className: "text-xs text-gray-500",
7247
- children: [widgetCount, " widget", widgetCount !== 1 ? "s" : ""]
7248
- }), providerTags.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
7249
- className: "flex flex-wrap gap-1 justify-end",
7250
- children: providerTags.slice(0, 3).map(function (tag) {
7251
- return /*#__PURE__*/jsxRuntime.jsx("span", {
7252
- className: "text-xs px-1.5 py-0.5 rounded bg-gray-800 text-gray-400",
7253
- children: tag
7254
- }, tag);
7255
- })
7256
- })]
7257
- })]
7258
- }, dash.name);
7259
- })
7185
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
7186
+ className: "flex-1 min-w-0 flex flex-col gap-4",
7187
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
7188
+ className: "flex items-center gap-3",
7189
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
7190
+ className: "flex-1",
7191
+ children: /*#__PURE__*/jsxRuntime.jsx(DashReact.InputText, {
7192
+ value: searchQuery,
7193
+ onChange: handleSearchChange,
7194
+ placeholder: "Search registry..."
7260
7195
  })
7261
- }), activeTab === "dashboards" && filteredDashboards.length === 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
7196
+ }), hasSelection && /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
7197
+ onClick: handleClearSelection,
7198
+ title: "Clear Selection",
7199
+ textSize: "text-xs",
7200
+ padding: "py-1 px-3",
7201
+ backgroundColor: "bg-gray-700",
7202
+ textColor: "text-gray-400",
7203
+ hoverTextColor: "hover:text-white",
7204
+ hoverBackgroundColor: "hover:bg-gray-600",
7205
+ icon: "xmark"
7206
+ })]
7207
+ }), !isLoading && !error && /*#__PURE__*/jsxRuntime.jsx("div", {
7208
+ className: "text-xs text-gray-500 px-1",
7209
+ children: showDashboards ? "".concat(visibleDashboards.length, " dashboard").concat(visibleDashboards.length === 1 ? "" : "s") : "".concat(visibleWidgets.length, " widget").concat(visibleWidgets.length === 1 ? "" : "s")
7210
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
7211
+ className: "flex flex-col gap-6",
7212
+ children: isLoading ? /*#__PURE__*/jsxRuntime.jsxs("div", {
7213
+ className: "flex flex-col items-center justify-center gap-2 py-12 text-gray-400",
7214
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
7215
+ icon: "spinner",
7216
+ spin: true,
7217
+ fixedWidth: true
7218
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
7219
+ children: "Searching registry..."
7220
+ })]
7221
+ }) : error ? /*#__PURE__*/jsxRuntime.jsxs("div", {
7222
+ className: "flex items-center gap-2 text-red-400 py-4",
7223
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
7224
+ icon: "circle-exclamation",
7225
+ fixedWidth: true
7226
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
7227
+ children: error
7228
+ })]
7229
+ }) : !hasResults ? /*#__PURE__*/jsxRuntime.jsxs("div", {
7262
7230
  className: "flex flex-col items-center justify-center gap-2 py-12 text-gray-500",
7263
7231
  children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
7264
- icon: "grid-2",
7232
+ icon: "magnifying-glass",
7265
7233
  fixedWidth: true
7266
7234
  }), /*#__PURE__*/jsxRuntime.jsx("p", {
7267
- children: "No dashboards match your search."
7235
+ children: "No results match your search."
7236
+ }), hasActiveFilters && /*#__PURE__*/jsxRuntime.jsx("p", {
7237
+ className: "text-xs text-gray-600",
7238
+ children: "Try removing some filters to see more results."
7268
7239
  })]
7269
- }), activeTab === "widgets" && filteredWidgets.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
7270
- className: "flex flex-col gap-3",
7271
- children: /*#__PURE__*/jsxRuntime.jsx("div", {
7272
- className: "grid grid-cols-3 gap-3",
7273
- children: filteredWidgets.map(function (widget) {
7274
- var checked = isWidgetSelected(widget);
7275
- return /*#__PURE__*/jsxRuntime.jsxs(DashReact.Card2, {
7276
- hover: true,
7277
- selected: checked,
7278
- padding: "p-4",
7279
- rounded: "rounded-lg",
7280
- className: "hover:shadow-lg flex flex-col",
7281
- onClick: function onClick() {
7282
- return handleToggleWidget(widget);
7283
- },
7284
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
7285
- className: "flex items-start justify-between gap-2",
7240
+ }) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
7241
+ children: [showDashboards && visibleDashboards.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
7242
+ className: "flex flex-col gap-3",
7243
+ children: /*#__PURE__*/jsxRuntime.jsx("div", {
7244
+ className: "grid grid-cols-3 gap-3",
7245
+ children: visibleDashboards.map(function (dash) {
7246
+ var isSelected = state.selectedDashboard && state.selectedDashboard.name === dash.name;
7247
+ var widgetCount = (dash.widgets || []).length;
7248
+ var providerTags = (dash.providers || []).map(function (p) {
7249
+ return p.name || p.type;
7250
+ }).filter(Boolean);
7251
+ return /*#__PURE__*/jsxRuntime.jsxs(DashReact.Card2, {
7252
+ hover: true,
7253
+ selected: isSelected,
7254
+ padding: "p-5",
7255
+ rounded: "rounded-lg",
7256
+ className: "hover:shadow-lg",
7257
+ onClick: function onClick() {
7258
+ return handleSelectDashboard(dash);
7259
+ },
7286
7260
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
7287
- className: "flex items-center gap-1.5",
7288
- children: [widget.icon && /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
7289
- icon: resolveIcon(widget.icon),
7290
- fixedWidth: true,
7291
- className: "text-gray-400 text-sm"
7261
+ className: "flex flex-col items-center text-center gap-2",
7262
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
7263
+ className: "relative",
7264
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
7265
+ className: "text-2xl",
7266
+ children: /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
7267
+ icon: resolveIcon(dash.icon || "grid-2"),
7268
+ fixedWidth: true,
7269
+ className: "text-gray-400"
7270
+ })
7271
+ }), isSelected && /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
7272
+ icon: "circle-check",
7273
+ className: "absolute -top-1 -right-3 text-blue-400 text-xs"
7274
+ })]
7292
7275
  }), /*#__PURE__*/jsxRuntime.jsx("span", {
7293
- className: "text-sm font-medium text-gray-200 truncate",
7294
- children: widget.name
7276
+ className: "text-sm font-semibold text-gray-200",
7277
+ children: dash.displayName || dash.name
7278
+ })]
7279
+ }), dash.description && /*#__PURE__*/jsxRuntime.jsx("p", {
7280
+ className: "text-xs text-gray-400 mt-2 line-clamp-2 text-center",
7281
+ children: dash.description
7282
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
7283
+ className: "flex items-center justify-between mt-3 pt-2 border-t border-gray-700/50",
7284
+ children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
7285
+ className: "text-xs text-gray-500",
7286
+ children: [widgetCount, " widget", widgetCount !== 1 ? "s" : ""]
7287
+ }), providerTags.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
7288
+ className: "flex flex-wrap gap-1 justify-end",
7289
+ children: providerTags.slice(0, 3).map(function (tag) {
7290
+ return /*#__PURE__*/jsxRuntime.jsx("span", {
7291
+ className: "text-xs px-1.5 py-0.5 rounded bg-gray-800 text-gray-400",
7292
+ children: tag
7293
+ }, tag);
7294
+ })
7295
7295
  })]
7296
- }), /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
7297
- icon: checked ? "square-check" : "square",
7298
- fixedWidth: true,
7299
- className: checked ? "text-blue-400 flex-shrink-0" : "text-gray-500 flex-shrink-0"
7300
7296
  })]
7301
- }), widget.description && /*#__PURE__*/jsxRuntime.jsx("p", {
7302
- className: "text-xs text-gray-400 line-clamp-2 mt-1.5 flex-1",
7303
- children: widget.description
7304
- }), widget.packageDisplayName && /*#__PURE__*/jsxRuntime.jsx("span", {
7305
- className: "text-xs text-gray-500 mt-2 pt-1.5 border-t border-gray-700/50 truncate",
7306
- children: widget.packageDisplayName
7307
- })]
7308
- }, widget.key);
7297
+ }, dash.name);
7298
+ })
7299
+ })
7300
+ }), showWidgets && visibleWidgets.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
7301
+ className: "flex flex-col gap-3",
7302
+ children: /*#__PURE__*/jsxRuntime.jsx("div", {
7303
+ className: "grid grid-cols-3 gap-3",
7304
+ children: visibleWidgets.map(function (widget) {
7305
+ var checked = isWidgetSelected(widget);
7306
+ return /*#__PURE__*/jsxRuntime.jsxs(DashReact.Card2, {
7307
+ hover: true,
7308
+ selected: checked,
7309
+ padding: "p-4",
7310
+ rounded: "rounded-lg",
7311
+ className: "hover:shadow-lg flex flex-col",
7312
+ onClick: function onClick() {
7313
+ return handleToggleWidget(widget);
7314
+ },
7315
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
7316
+ className: "flex items-start justify-between gap-2",
7317
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
7318
+ className: "flex items-center gap-1.5",
7319
+ children: [widget.icon && /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
7320
+ icon: resolveIcon(widget.icon),
7321
+ fixedWidth: true,
7322
+ className: "text-gray-400 text-sm"
7323
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
7324
+ className: "text-sm font-medium text-gray-200 truncate",
7325
+ children: widget.name
7326
+ })]
7327
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
7328
+ icon: checked ? "square-check" : "square",
7329
+ fixedWidth: true,
7330
+ className: checked ? "text-blue-400 flex-shrink-0" : "text-gray-500 flex-shrink-0"
7331
+ })]
7332
+ }), widget.description && /*#__PURE__*/jsxRuntime.jsx("p", {
7333
+ className: "text-xs text-gray-400 line-clamp-2 mt-1.5 flex-1",
7334
+ children: widget.description
7335
+ }), widget.packageDisplayName && /*#__PURE__*/jsxRuntime.jsx("span", {
7336
+ className: "text-xs text-gray-500 mt-2 pt-1.5 border-t border-gray-700/50 truncate",
7337
+ children: widget.packageDisplayName
7338
+ })]
7339
+ }, widget.key);
7340
+ })
7309
7341
  })
7310
- })
7311
- }), activeTab === "widgets" && filteredWidgets.length === 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
7312
- className: "flex flex-col items-center justify-center gap-2 py-12 text-gray-500",
7313
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
7314
- icon: "puzzle-piece",
7315
- fixedWidth: true
7316
- }), /*#__PURE__*/jsxRuntime.jsx("p", {
7317
- children: "No widgets match your search."
7318
7342
  })]
7319
- })]
7320
- })
7343
+ })
7344
+ })]
7321
7345
  })]
7322
7346
  });
7323
7347
  };