@trops/dash-core 0.1.458 → 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.esm.js CHANGED
@@ -2,7 +2,7 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
2
2
  import _typeof from '@babel/runtime/helpers/typeof';
3
3
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
4
  import * as DashReact from '@trops/dash-react';
5
- import { isObject, ThemeContext, deepCopy, MainSection, getUUID, getStylesForItem, themeObjects, Heading, SearchInput, ButtonIcon, SubHeading3, InputText, Button, FontAwesomeIcon, Tag, Modal, Button3, Button2, Paragraph, Sidebar, Panel, Stepper, Tag2, Tag3, Card2, Card3, Heading3, MenuItem3, FormLabel, SelectMenu, Switch, SelectInput, CodeEditorVS, SettingsModal, SubHeading2, tailwindHeightFractions, Menu3, Panel3, ButtonIcon2, DropdownPanel, MenuItem2, DragComponent, ConfirmationModal, DropComponent, getStyleName, capitalizeFirstLetter, colorTypes, getCSSStyleForClassname, Panel2, Heading2, SubHeading, Paragraph2, Paragraph3, MenuItem, ButtonIcon3, DashPanel, colorNames, shades, themeVariants, Tabs3, DataList, Checkbox, StatCard, Card, Tabs, Accordion, Alert, Toast, ProgressBar, Toggle, Breadcrumbs, Tabs2, Accordion2, Alert2, Toast2, ProgressBar2, Toggle2, Breadcrumbs2, Accordion3, Alert3, Toast3, ProgressBar3, Toggle3, Breadcrumbs3, ThemeFromUrlPane, TextArea, CodeEditorInline, Icon2, AlgoliaSearchBox, CommandPalette, useSidebar, EmptyState, Navbar, withRouter, Menu as Menu$1 } from '@trops/dash-react';
5
+ import { isObject, ThemeContext, deepCopy, MainSection, getUUID, getStylesForItem, themeObjects, Heading, SearchInput, ButtonIcon, SubHeading3, InputText, Button, FontAwesomeIcon, Tag, Modal, Button3, Button2, Paragraph, Sidebar, Panel, Stepper, Tag3, Card2, Card3, Heading3, MenuItem3, FormLabel, SelectMenu, Switch, SelectInput, CodeEditorVS, SettingsModal, SubHeading2, tailwindHeightFractions, Menu3, Panel3, ButtonIcon2, DropdownPanel, MenuItem2, DragComponent, ConfirmationModal, DropComponent, getStyleName, capitalizeFirstLetter, colorTypes, getCSSStyleForClassname, Panel2, Heading2, SubHeading, Paragraph2, Paragraph3, MenuItem, Tag2, ButtonIcon3, DashPanel, colorNames, shades, themeVariants, Tabs3, DataList, Checkbox, StatCard, Card, Tabs, Accordion, Alert, Toast, ProgressBar, Toggle, Breadcrumbs, Tabs2, Accordion2, Alert2, Toast2, ProgressBar2, Toggle2, Breadcrumbs2, Accordion3, Alert3, Toast3, ProgressBar3, Toggle3, Breadcrumbs3, ThemeFromUrlPane, TextArea, CodeEditorInline, Icon2, AlgoliaSearchBox, CommandPalette, useSidebar, EmptyState, Navbar, withRouter, Menu as Menu$1 } from '@trops/dash-react';
6
6
  export * from '@trops/dash-react';
7
7
  export { ThemeContext } from '@trops/dash-react';
8
8
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
@@ -6946,12 +6946,19 @@ var KNOWN_PROVIDERS = [{
6946
6946
  /**
6947
6947
  * WizardDiscoverStep
6948
6948
  *
6949
- * Step 0 of the Dashboard Wizard. Combines search, category/provider
6950
- * filter chips, and results (dashboards + widgets) in a single view.
6951
- * Replaces the old Intent, Providers, and Results steps.
6949
+ * Step 0 of the Dashboard Wizard. Two-column layout mirroring the
6950
+ * dash-registry homepage: a left filter sidebar (TYPE / CATEGORIES /
6951
+ * PROVIDERS as vertical lists) and a right content pane with the
6952
+ * search input + result grid.
6952
6953
  *
6953
- * - Selecting a dashboard sets path to "prebuilt" and clears widget selections.
6954
- * - Selecting widgets sets path to "custom" and clears dashboard selection.
6954
+ * - TYPE filter (single-select): All / Dashboards / Widgets. Replaces
6955
+ * the previous tab bar so the right pane is a single result surface.
6956
+ * - CATEGORIES + PROVIDERS (multi-select): preserves the existing
6957
+ * wizard filter shape (`filters.categories[]`, `filters.providers[]`).
6958
+ *
6959
+ * Selecting a dashboard sets path = "prebuilt" and clears widget
6960
+ * selections. Selecting widgets sets path = "custom" and clears the
6961
+ * dashboard selection.
6955
6962
  *
6956
6963
  * @param {Object} props
6957
6964
  * @param {Object} props.state - Wizard state from useWizardState
@@ -7034,7 +7041,7 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
7034
7041
  });
7035
7042
  }, [state.selectedWidgets]);
7036
7043
 
7037
- // --- Filter chip handlers ---
7044
+ // --- Filter handlers ---
7038
7045
  var handleToggleCategory = useCallback(function (cat) {
7039
7046
  return dispatch({
7040
7047
  type: "TOGGLE_FILTER_CATEGORY",
@@ -7048,13 +7055,26 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
7048
7055
  });
7049
7056
  }, [dispatch]);
7050
7057
 
7051
- // Tab state (DASH-185)
7058
+ // TYPE filter — replaces the old tab bar. Binary because the
7059
+ // wizard's data model is mutually exclusive: selecting a dashboard
7060
+ // clears widgets and sets path="prebuilt"; selecting a widget
7061
+ // clears the dashboard and sets path="custom". An "All" view would
7062
+ // imply you can browse both freely when in reality the first click
7063
+ // commits you to one of two paths. Defaulting to "dashboards" since
7064
+ // pre-built is the simpler, more common starting point.
7052
7065
  var _useState = useState("dashboards"),
7053
7066
  _useState2 = _slicedToArray(_useState, 2),
7054
- activeTab = _useState2[0],
7055
- setActiveTab = _useState2[1];
7067
+ typeFilter = _useState2[0],
7068
+ setTypeFilter = _useState2[1];
7069
+ var TYPE_OPTIONS = [{
7070
+ key: "dashboards",
7071
+ label: "Dashboards"
7072
+ }, {
7073
+ key: "widgets",
7074
+ label: "Widgets"
7075
+ }];
7056
7076
 
7057
- // Clear selection handler (DASH-186)
7077
+ // Clear-selection handler
7058
7078
  var hasSelection = state.selectedDashboard !== null || state.selectedWidgets.length > 0;
7059
7079
  var handleClearSelection = useCallback(function () {
7060
7080
  dispatch({
@@ -7070,236 +7090,240 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
7070
7090
  payload: null
7071
7091
  });
7072
7092
  }, [dispatch]);
7073
- var hasResults = filteredDashboards.length > 0 || filteredWidgets.length > 0;
7093
+ var showDashboards = typeFilter === "dashboards";
7094
+ var showWidgets = typeFilter === "widgets";
7095
+ var visibleDashboards = showDashboards ? filteredDashboards : [];
7096
+ var visibleWidgets = showWidgets ? filteredWidgets : [];
7097
+ var hasResults = visibleDashboards.length > 0 || visibleWidgets.length > 0;
7074
7098
  var hasActiveFilters = filters.categories.length > 0 || filters.providers.length > 0;
7099
+
7100
+ // Shared row class for sidebar list items.
7101
+ var rowClass = function rowClass(active) {
7102
+ 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");
7103
+ };
7104
+ var sectionLabelClass = "text-xs font-semibold text-gray-400 uppercase tracking-wide px-3 mb-1";
7075
7105
  return /*#__PURE__*/jsxs("div", {
7076
- className: "flex flex-col gap-4",
7077
- children: [/*#__PURE__*/jsx(InputText, {
7078
- value: searchQuery,
7079
- onChange: handleSearchChange,
7080
- placeholder: "Search registry..."
7081
- }), /*#__PURE__*/jsxs("div", {
7082
- className: "flex flex-col gap-3",
7106
+ className: "flex flex-row gap-4",
7107
+ children: [/*#__PURE__*/jsxs("aside", {
7108
+ className: "flex-shrink-0 w-56 flex flex-col gap-4 overflow-y-auto",
7083
7109
  children: [/*#__PURE__*/jsxs("div", {
7084
- className: "flex flex-col gap-1.5",
7110
+ className: "flex flex-col",
7085
7111
  children: [/*#__PURE__*/jsx("span", {
7086
- className: "text-xs font-semibold text-gray-400 uppercase tracking-wide",
7087
- children: "Categories"
7088
- }), /*#__PURE__*/jsx("div", {
7089
- className: "flex flex-wrap gap-1.5",
7090
- children: DASHBOARD_TAGS$1.map(function (tag) {
7091
- return /*#__PURE__*/jsx(Tag2, {
7092
- text: tag,
7093
- onClick: function onClick() {
7094
- return handleToggleCategory(tag);
7095
- },
7096
- active: filters.categories.includes(tag)
7097
- }, tag);
7098
- })
7112
+ className: sectionLabelClass,
7113
+ children: "TYPE"
7114
+ }), TYPE_OPTIONS.map(function (opt) {
7115
+ var active = typeFilter === opt.key;
7116
+ var showBadge = opt.key === "widgets" && state.selectedWidgets.length > 0;
7117
+ return /*#__PURE__*/jsxs("button", {
7118
+ type: "button",
7119
+ onClick: function onClick() {
7120
+ return setTypeFilter(opt.key);
7121
+ },
7122
+ className: rowClass(active),
7123
+ children: [/*#__PURE__*/jsx("span", {
7124
+ children: opt.label
7125
+ }), showBadge && /*#__PURE__*/jsx(Tag3, {
7126
+ text: "".concat(state.selectedWidgets.length, " selected")
7127
+ })]
7128
+ }, opt.key);
7099
7129
  })]
7100
7130
  }), /*#__PURE__*/jsxs("div", {
7101
- className: "flex flex-col gap-1.5",
7131
+ className: "flex flex-col",
7102
7132
  children: [/*#__PURE__*/jsx("span", {
7103
- className: "text-xs font-semibold text-gray-400 uppercase tracking-wide",
7104
- children: "Providers"
7105
- }), /*#__PURE__*/jsx("div", {
7106
- className: "flex flex-wrap gap-1.5",
7107
- children: KNOWN_PROVIDERS.map(function (prov) {
7108
- return /*#__PURE__*/jsx(Tag2, {
7109
- text: prov.name,
7110
- onClick: function onClick() {
7111
- return handleToggleProvider(prov.key);
7112
- },
7113
- active: filters.providers.includes(prov.key)
7114
- }, prov.key);
7115
- })
7133
+ className: sectionLabelClass,
7134
+ children: "CATEGORIES"
7135
+ }), DASHBOARD_TAGS$1.map(function (tag) {
7136
+ var active = filters.categories.includes(tag);
7137
+ return /*#__PURE__*/jsx("button", {
7138
+ type: "button",
7139
+ onClick: function onClick() {
7140
+ return handleToggleCategory(tag);
7141
+ },
7142
+ className: "".concat(rowClass(active), " capitalize"),
7143
+ children: /*#__PURE__*/jsx("span", {
7144
+ children: tag
7145
+ })
7146
+ }, tag);
7116
7147
  })]
7117
- })]
7118
- }), /*#__PURE__*/jsxs("div", {
7119
- className: "flex items-center justify-between",
7120
- children: [/*#__PURE__*/jsxs("div", {
7121
- className: "flex gap-1",
7122
- children: [/*#__PURE__*/jsxs("button", {
7123
- type: "button",
7124
- 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"),
7125
- onClick: function onClick() {
7126
- return setActiveTab("dashboards");
7127
- },
7128
- children: ["Dashboards (", filteredDashboards.length, ")"]
7129
- }), /*#__PURE__*/jsxs("button", {
7130
- type: "button",
7131
- 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"),
7132
- onClick: function onClick() {
7133
- return setActiveTab("widgets");
7134
- },
7135
- children: ["Widgets (", filteredWidgets.length, ")", state.selectedWidgets.length > 0 && /*#__PURE__*/jsx("span", {
7136
- className: "ml-1.5",
7137
- children: /*#__PURE__*/jsx(Tag3, {
7138
- text: "".concat(state.selectedWidgets.length, " selected")
7148
+ }), /*#__PURE__*/jsxs("div", {
7149
+ className: "flex flex-col",
7150
+ children: [/*#__PURE__*/jsx("span", {
7151
+ className: sectionLabelClass,
7152
+ children: "PROVIDERS"
7153
+ }), KNOWN_PROVIDERS.map(function (prov) {
7154
+ var active = filters.providers.includes(prov.key);
7155
+ return /*#__PURE__*/jsx("button", {
7156
+ type: "button",
7157
+ onClick: function onClick() {
7158
+ return handleToggleProvider(prov.key);
7159
+ },
7160
+ className: rowClass(active),
7161
+ children: /*#__PURE__*/jsx("span", {
7162
+ children: prov.name
7139
7163
  })
7140
- })]
7164
+ }, prov.key);
7141
7165
  })]
7142
- }), hasSelection && /*#__PURE__*/jsx(Button, {
7143
- onClick: handleClearSelection,
7144
- title: "Clear Selection",
7145
- textSize: "text-xs",
7146
- padding: "py-1 px-3",
7147
- backgroundColor: "bg-gray-700",
7148
- textColor: "text-gray-400",
7149
- hoverTextColor: "hover:text-white",
7150
- hoverBackgroundColor: "hover:bg-gray-600",
7151
- icon: "xmark"
7152
7166
  })]
7153
- }), /*#__PURE__*/jsx("div", {
7154
- className: "flex flex-col gap-6",
7155
- children: isLoading ? /*#__PURE__*/jsxs("div", {
7156
- className: "flex flex-col items-center justify-center gap-2 py-12 text-gray-400",
7157
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
7158
- icon: "spinner",
7159
- spin: true,
7160
- fixedWidth: true
7161
- }), /*#__PURE__*/jsx("span", {
7162
- children: "Searching registry..."
7163
- })]
7164
- }) : error ? /*#__PURE__*/jsxs("div", {
7165
- className: "flex items-center gap-2 text-red-400 py-4",
7166
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
7167
- icon: "circle-exclamation",
7168
- fixedWidth: true
7169
- }), /*#__PURE__*/jsx("span", {
7170
- children: error
7171
- })]
7172
- }) : !hasResults ? /*#__PURE__*/jsxs("div", {
7173
- className: "flex flex-col items-center justify-center gap-2 py-12 text-gray-500",
7174
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
7175
- icon: "magnifying-glass",
7176
- fixedWidth: true
7177
- }), /*#__PURE__*/jsx("p", {
7178
- children: "No results match your search."
7179
- }), hasActiveFilters && /*#__PURE__*/jsx("p", {
7180
- className: "text-xs text-gray-600",
7181
- children: "Try removing some filters to see more results."
7182
- })]
7183
- }) : /*#__PURE__*/jsxs(Fragment, {
7184
- children: [activeTab === "dashboards" && filteredDashboards.length > 0 && /*#__PURE__*/jsx("div", {
7185
- className: "flex flex-col gap-3",
7186
- children: /*#__PURE__*/jsx("div", {
7187
- className: "grid grid-cols-3 gap-3",
7188
- children: filteredDashboards.map(function (dash) {
7189
- var isSelected = state.selectedDashboard && state.selectedDashboard.name === dash.name;
7190
- var widgetCount = (dash.widgets || []).length;
7191
- var providerTags = (dash.providers || []).map(function (p) {
7192
- return p.name || p.type;
7193
- }).filter(Boolean);
7194
- return /*#__PURE__*/jsxs(Card2, {
7195
- hover: true,
7196
- selected: isSelected,
7197
- padding: "p-5",
7198
- rounded: "rounded-lg",
7199
- className: "hover:shadow-lg",
7200
- onClick: function onClick() {
7201
- return handleSelectDashboard(dash);
7202
- },
7203
- children: [/*#__PURE__*/jsxs("div", {
7204
- className: "flex flex-col items-center text-center gap-2",
7205
- children: [/*#__PURE__*/jsxs("div", {
7206
- className: "relative",
7207
- children: [/*#__PURE__*/jsx("span", {
7208
- className: "text-2xl",
7209
- children: /*#__PURE__*/jsx(FontAwesomeIcon, {
7210
- icon: resolveIcon(dash.icon || "grid-2"),
7211
- fixedWidth: true,
7212
- className: "text-gray-400"
7213
- })
7214
- }), isSelected && /*#__PURE__*/jsx(FontAwesomeIcon, {
7215
- icon: "circle-check",
7216
- className: "absolute -top-1 -right-3 text-blue-400 text-xs"
7217
- })]
7218
- }), /*#__PURE__*/jsx("span", {
7219
- className: "text-sm font-semibold text-gray-200",
7220
- children: dash.displayName || dash.name
7221
- })]
7222
- }), dash.description && /*#__PURE__*/jsx("p", {
7223
- className: "text-xs text-gray-400 mt-2 line-clamp-2 text-center",
7224
- children: dash.description
7225
- }), /*#__PURE__*/jsxs("div", {
7226
- className: "flex items-center justify-between mt-3 pt-2 border-t border-gray-700/50",
7227
- children: [/*#__PURE__*/jsxs("span", {
7228
- className: "text-xs text-gray-500",
7229
- children: [widgetCount, " widget", widgetCount !== 1 ? "s" : ""]
7230
- }), providerTags.length > 0 && /*#__PURE__*/jsx("div", {
7231
- className: "flex flex-wrap gap-1 justify-end",
7232
- children: providerTags.slice(0, 3).map(function (tag) {
7233
- return /*#__PURE__*/jsx("span", {
7234
- className: "text-xs px-1.5 py-0.5 rounded bg-gray-800 text-gray-400",
7235
- children: tag
7236
- }, tag);
7237
- })
7238
- })]
7239
- })]
7240
- }, dash.name);
7241
- })
7167
+ }), /*#__PURE__*/jsxs("div", {
7168
+ className: "flex-1 min-w-0 flex flex-col gap-4",
7169
+ children: [/*#__PURE__*/jsxs("div", {
7170
+ className: "flex items-center gap-3",
7171
+ children: [/*#__PURE__*/jsx("div", {
7172
+ className: "flex-1",
7173
+ children: /*#__PURE__*/jsx(InputText, {
7174
+ value: searchQuery,
7175
+ onChange: handleSearchChange,
7176
+ placeholder: "Search registry..."
7242
7177
  })
7243
- }), activeTab === "dashboards" && filteredDashboards.length === 0 && /*#__PURE__*/jsxs("div", {
7178
+ }), hasSelection && /*#__PURE__*/jsx(Button, {
7179
+ onClick: handleClearSelection,
7180
+ title: "Clear Selection",
7181
+ textSize: "text-xs",
7182
+ padding: "py-1 px-3",
7183
+ backgroundColor: "bg-gray-700",
7184
+ textColor: "text-gray-400",
7185
+ hoverTextColor: "hover:text-white",
7186
+ hoverBackgroundColor: "hover:bg-gray-600",
7187
+ icon: "xmark"
7188
+ })]
7189
+ }), !isLoading && !error && /*#__PURE__*/jsx("div", {
7190
+ className: "text-xs text-gray-500 px-1",
7191
+ children: showDashboards ? "".concat(visibleDashboards.length, " dashboard").concat(visibleDashboards.length === 1 ? "" : "s") : "".concat(visibleWidgets.length, " widget").concat(visibleWidgets.length === 1 ? "" : "s")
7192
+ }), /*#__PURE__*/jsx("div", {
7193
+ className: "flex flex-col gap-6",
7194
+ children: isLoading ? /*#__PURE__*/jsxs("div", {
7195
+ className: "flex flex-col items-center justify-center gap-2 py-12 text-gray-400",
7196
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
7197
+ icon: "spinner",
7198
+ spin: true,
7199
+ fixedWidth: true
7200
+ }), /*#__PURE__*/jsx("span", {
7201
+ children: "Searching registry..."
7202
+ })]
7203
+ }) : error ? /*#__PURE__*/jsxs("div", {
7204
+ className: "flex items-center gap-2 text-red-400 py-4",
7205
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
7206
+ icon: "circle-exclamation",
7207
+ fixedWidth: true
7208
+ }), /*#__PURE__*/jsx("span", {
7209
+ children: error
7210
+ })]
7211
+ }) : !hasResults ? /*#__PURE__*/jsxs("div", {
7244
7212
  className: "flex flex-col items-center justify-center gap-2 py-12 text-gray-500",
7245
7213
  children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
7246
- icon: "grid-2",
7214
+ icon: "magnifying-glass",
7247
7215
  fixedWidth: true
7248
7216
  }), /*#__PURE__*/jsx("p", {
7249
- children: "No dashboards match your search."
7217
+ children: "No results match your search."
7218
+ }), hasActiveFilters && /*#__PURE__*/jsx("p", {
7219
+ className: "text-xs text-gray-600",
7220
+ children: "Try removing some filters to see more results."
7250
7221
  })]
7251
- }), activeTab === "widgets" && filteredWidgets.length > 0 && /*#__PURE__*/jsx("div", {
7252
- className: "flex flex-col gap-3",
7253
- children: /*#__PURE__*/jsx("div", {
7254
- className: "grid grid-cols-3 gap-3",
7255
- children: filteredWidgets.map(function (widget) {
7256
- var checked = isWidgetSelected(widget);
7257
- return /*#__PURE__*/jsxs(Card2, {
7258
- hover: true,
7259
- selected: checked,
7260
- padding: "p-4",
7261
- rounded: "rounded-lg",
7262
- className: "hover:shadow-lg flex flex-col",
7263
- onClick: function onClick() {
7264
- return handleToggleWidget(widget);
7265
- },
7266
- children: [/*#__PURE__*/jsxs("div", {
7267
- className: "flex items-start justify-between gap-2",
7222
+ }) : /*#__PURE__*/jsxs(Fragment, {
7223
+ children: [showDashboards && visibleDashboards.length > 0 && /*#__PURE__*/jsx("div", {
7224
+ className: "flex flex-col gap-3",
7225
+ children: /*#__PURE__*/jsx("div", {
7226
+ className: "grid grid-cols-3 gap-3",
7227
+ children: visibleDashboards.map(function (dash) {
7228
+ var isSelected = state.selectedDashboard && state.selectedDashboard.name === dash.name;
7229
+ var widgetCount = (dash.widgets || []).length;
7230
+ var providerTags = (dash.providers || []).map(function (p) {
7231
+ return p.name || p.type;
7232
+ }).filter(Boolean);
7233
+ return /*#__PURE__*/jsxs(Card2, {
7234
+ hover: true,
7235
+ selected: isSelected,
7236
+ padding: "p-5",
7237
+ rounded: "rounded-lg",
7238
+ className: "hover:shadow-lg",
7239
+ onClick: function onClick() {
7240
+ return handleSelectDashboard(dash);
7241
+ },
7268
7242
  children: [/*#__PURE__*/jsxs("div", {
7269
- className: "flex items-center gap-1.5",
7270
- children: [widget.icon && /*#__PURE__*/jsx(FontAwesomeIcon, {
7271
- icon: resolveIcon(widget.icon),
7272
- fixedWidth: true,
7273
- className: "text-gray-400 text-sm"
7243
+ className: "flex flex-col items-center text-center gap-2",
7244
+ children: [/*#__PURE__*/jsxs("div", {
7245
+ className: "relative",
7246
+ children: [/*#__PURE__*/jsx("span", {
7247
+ className: "text-2xl",
7248
+ children: /*#__PURE__*/jsx(FontAwesomeIcon, {
7249
+ icon: resolveIcon(dash.icon || "grid-2"),
7250
+ fixedWidth: true,
7251
+ className: "text-gray-400"
7252
+ })
7253
+ }), isSelected && /*#__PURE__*/jsx(FontAwesomeIcon, {
7254
+ icon: "circle-check",
7255
+ className: "absolute -top-1 -right-3 text-blue-400 text-xs"
7256
+ })]
7274
7257
  }), /*#__PURE__*/jsx("span", {
7275
- className: "text-sm font-medium text-gray-200 truncate",
7276
- children: widget.name
7258
+ className: "text-sm font-semibold text-gray-200",
7259
+ children: dash.displayName || dash.name
7260
+ })]
7261
+ }), dash.description && /*#__PURE__*/jsx("p", {
7262
+ className: "text-xs text-gray-400 mt-2 line-clamp-2 text-center",
7263
+ children: dash.description
7264
+ }), /*#__PURE__*/jsxs("div", {
7265
+ className: "flex items-center justify-between mt-3 pt-2 border-t border-gray-700/50",
7266
+ children: [/*#__PURE__*/jsxs("span", {
7267
+ className: "text-xs text-gray-500",
7268
+ children: [widgetCount, " widget", widgetCount !== 1 ? "s" : ""]
7269
+ }), providerTags.length > 0 && /*#__PURE__*/jsx("div", {
7270
+ className: "flex flex-wrap gap-1 justify-end",
7271
+ children: providerTags.slice(0, 3).map(function (tag) {
7272
+ return /*#__PURE__*/jsx("span", {
7273
+ className: "text-xs px-1.5 py-0.5 rounded bg-gray-800 text-gray-400",
7274
+ children: tag
7275
+ }, tag);
7276
+ })
7277
7277
  })]
7278
- }), /*#__PURE__*/jsx(FontAwesomeIcon, {
7279
- icon: checked ? "square-check" : "square",
7280
- fixedWidth: true,
7281
- className: checked ? "text-blue-400 flex-shrink-0" : "text-gray-500 flex-shrink-0"
7282
7278
  })]
7283
- }), widget.description && /*#__PURE__*/jsx("p", {
7284
- className: "text-xs text-gray-400 line-clamp-2 mt-1.5 flex-1",
7285
- children: widget.description
7286
- }), widget.packageDisplayName && /*#__PURE__*/jsx("span", {
7287
- className: "text-xs text-gray-500 mt-2 pt-1.5 border-t border-gray-700/50 truncate",
7288
- children: widget.packageDisplayName
7289
- })]
7290
- }, widget.key);
7279
+ }, dash.name);
7280
+ })
7281
+ })
7282
+ }), showWidgets && visibleWidgets.length > 0 && /*#__PURE__*/jsx("div", {
7283
+ className: "flex flex-col gap-3",
7284
+ children: /*#__PURE__*/jsx("div", {
7285
+ className: "grid grid-cols-3 gap-3",
7286
+ children: visibleWidgets.map(function (widget) {
7287
+ var checked = isWidgetSelected(widget);
7288
+ return /*#__PURE__*/jsxs(Card2, {
7289
+ hover: true,
7290
+ selected: checked,
7291
+ padding: "p-4",
7292
+ rounded: "rounded-lg",
7293
+ className: "hover:shadow-lg flex flex-col",
7294
+ onClick: function onClick() {
7295
+ return handleToggleWidget(widget);
7296
+ },
7297
+ children: [/*#__PURE__*/jsxs("div", {
7298
+ className: "flex items-start justify-between gap-2",
7299
+ children: [/*#__PURE__*/jsxs("div", {
7300
+ className: "flex items-center gap-1.5",
7301
+ children: [widget.icon && /*#__PURE__*/jsx(FontAwesomeIcon, {
7302
+ icon: resolveIcon(widget.icon),
7303
+ fixedWidth: true,
7304
+ className: "text-gray-400 text-sm"
7305
+ }), /*#__PURE__*/jsx("span", {
7306
+ className: "text-sm font-medium text-gray-200 truncate",
7307
+ children: widget.name
7308
+ })]
7309
+ }), /*#__PURE__*/jsx(FontAwesomeIcon, {
7310
+ icon: checked ? "square-check" : "square",
7311
+ fixedWidth: true,
7312
+ className: checked ? "text-blue-400 flex-shrink-0" : "text-gray-500 flex-shrink-0"
7313
+ })]
7314
+ }), widget.description && /*#__PURE__*/jsx("p", {
7315
+ className: "text-xs text-gray-400 line-clamp-2 mt-1.5 flex-1",
7316
+ children: widget.description
7317
+ }), widget.packageDisplayName && /*#__PURE__*/jsx("span", {
7318
+ className: "text-xs text-gray-500 mt-2 pt-1.5 border-t border-gray-700/50 truncate",
7319
+ children: widget.packageDisplayName
7320
+ })]
7321
+ }, widget.key);
7322
+ })
7291
7323
  })
7292
- })
7293
- }), activeTab === "widgets" && filteredWidgets.length === 0 && /*#__PURE__*/jsxs("div", {
7294
- className: "flex flex-col items-center justify-center gap-2 py-12 text-gray-500",
7295
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
7296
- icon: "puzzle-piece",
7297
- fixedWidth: true
7298
- }), /*#__PURE__*/jsx("p", {
7299
- children: "No widgets match your search."
7300
7324
  })]
7301
- })]
7302
- })
7325
+ })
7326
+ })]
7303
7327
  })]
7304
7328
  });
7305
7329
  };
@@ -47650,12 +47674,11 @@ var ProvidersSection = function ProvidersSection(_ref) {
47650
47674
  var listContent = /*#__PURE__*/jsxs(Fragment, {
47651
47675
  children: [/*#__PURE__*/jsx("div", {
47652
47676
  className: "px-2 pt-2 pb-2",
47653
- children: /*#__PURE__*/jsx(InputText, {
47677
+ children: /*#__PURE__*/jsx(SearchInput, {
47654
47678
  value: searchQuery,
47655
- onChange: function onChange(value) {
47656
- return setSearchQuery(value);
47657
- },
47658
- placeholder: "Search providers..."
47679
+ onChange: setSearchQuery,
47680
+ placeholder: "Search providers...",
47681
+ inputClassName: "py-1.5 text-xs"
47659
47682
  })
47660
47683
  }), /*#__PURE__*/jsx("div", {
47661
47684
  className: "px-2",