@burdenoff/microfe-healthybowl 2026.605.9 → 2026.606.2
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/healthybowl/components/ErrorBoundary.js +2 -2
- package/dist/healthybowl/components/ErrorBoundary.js.map +1 -1
- package/dist/healthybowl/components/StatCard.js +3 -3
- package/dist/healthybowl/components/StatCard.js.map +1 -1
- package/dist/healthybowl/components/StatusBadge.js +8 -8
- package/dist/healthybowl/components/StatusBadge.js.map +1 -1
- package/dist/healthybowl/components/Toast.js +4 -4
- package/dist/healthybowl/components/Toast.js.map +1 -1
- package/dist/healthybowl/hooks/useHealthyBowlData.js +385 -366
- package/dist/healthybowl/hooks/useHealthyBowlData.js.map +1 -1
- package/dist/healthybowl/pages/HomePage.js +2 -2
- package/dist/healthybowl/pages/HomePage.js.map +1 -1
- package/dist/healthybowl/pages/analytics/AnalyticsDashboardPage.js +6 -6
- package/dist/healthybowl/pages/analytics/AnalyticsDashboardPage.js.map +1 -1
- package/dist/healthybowl/pages/analytics/AnalyticsOverviewPage.js +4 -4
- package/dist/healthybowl/pages/analytics/AnalyticsOverviewPage.js.map +1 -1
- package/dist/healthybowl/pages/compliance/ComplianceAuditsPage.js +230 -41
- package/dist/healthybowl/pages/compliance/ComplianceAuditsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropDetailsPage.js +13 -13
- package/dist/healthybowl/pages/crops/CropDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropFieldsPage.js +1 -1
- package/dist/healthybowl/pages/crops/CropFieldsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropHarvestPage.js +2 -2
- package/dist/healthybowl/pages/crops/CropHarvestPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropsPage.js +2 -2
- package/dist/healthybowl/pages/crops/CropsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/FieldDetailsPage.js +6 -6
- package/dist/healthybowl/pages/crops/FieldDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/HarvestDetailsPage.js +26 -26
- package/dist/healthybowl/pages/crops/HarvestDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/PlanningDetailsPage.js +24 -24
- package/dist/healthybowl/pages/crops/PlanningDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/financial/BudgetManagementPage.js +3 -3
- package/dist/healthybowl/pages/financial/BudgetManagementPage.js.map +1 -1
- package/dist/healthybowl/pages/financial/FinancialDashboardPage.js +21 -21
- package/dist/healthybowl/pages/financial/FinancialDashboardPage.js.map +1 -1
- package/dist/healthybowl/pages/financial/FinancialReportsPage.js +5 -5
- package/dist/healthybowl/pages/financial/FinancialReportsPage.js.map +1 -1
- package/dist/healthybowl/pages/financial/InvoiceManagementPage.js +3 -3
- package/dist/healthybowl/pages/financial/InvoiceManagementPage.js.map +1 -1
- package/dist/healthybowl/pages/financial/TransactionsPage.js +2 -2
- package/dist/healthybowl/pages/financial/TransactionsPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/AnimalDetailsPage.js +2 -2
- package/dist/healthybowl/pages/livestock/AnimalDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/BreedingManagementPage.js +1 -1
- package/dist/healthybowl/pages/livestock/BreedingManagementPage.js.map +1 -1
- package/dist/healthybowl/pages/marketplace/CartPage.js +8 -8
- package/dist/healthybowl/pages/marketplace/CartPage.js.map +1 -1
- package/dist/healthybowl/pages/marketplace/MarketplacePage.js +8 -8
- package/dist/healthybowl/pages/marketplace/MarketplacePage.js.map +1 -1
- package/dist/healthybowl/pages/marketplace/OrdersPage.js +1 -1
- package/dist/healthybowl/pages/marketplace/OrdersPage.js.map +1 -1
- package/dist/healthybowl/pages/marketplace/ProductDetailPage.js +5 -5
- package/dist/healthybowl/pages/marketplace/ProductDetailPage.js.map +1 -1
- package/dist/healthybowl/pages/marketplace/WishlistPage.js +5 -5
- package/dist/healthybowl/pages/marketplace/WishlistPage.js.map +1 -1
- package/dist/healthybowl/pages/network/EventsPage.js +2 -2
- package/dist/healthybowl/pages/network/EventsPage.js.map +1 -1
- package/dist/healthybowl/pages/network/ExpertsPage.js +1 -1
- package/dist/healthybowl/pages/network/ExpertsPage.js.map +1 -1
- package/dist/healthybowl/pages/network/MentorsPage.js +4 -4
- package/dist/healthybowl/pages/network/MentorsPage.js.map +1 -1
- package/dist/healthybowl/pages/network/NetworkOverviewPage.js +1 -1
- package/dist/healthybowl/pages/network/NetworkOverviewPage.js.map +1 -1
- package/dist/healthybowl/pages/pest-management/PestOverviewPage.js +1 -1
- package/dist/healthybowl/pages/pest-management/PestOverviewPage.js.map +1 -1
- package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js +1 -1
- package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js.map +1 -1
- package/dist/healthybowl/pages/production/ProductionPlanningPage.js +1 -1
- package/dist/healthybowl/pages/production/ProductionPlanningPage.js.map +1 -1
- package/dist/healthybowl/pages/production/ProductionSchedulePage.js +4 -4
- package/dist/healthybowl/pages/production/ProductionSchedulePage.js.map +1 -1
- package/dist/healthybowl/pages/production/RecipeManagementPage.js +1 -1
- package/dist/healthybowl/pages/production/RecipeManagementPage.js.map +1 -1
- package/dist/healthybowl/pages/products/BatchesPage.js +2 -2
- package/dist/healthybowl/pages/products/BatchesPage.js.map +1 -1
- package/dist/healthybowl/pages/products/InventoryPage.js +6 -6
- package/dist/healthybowl/pages/products/InventoryPage.js.map +1 -1
- package/dist/healthybowl/pages/products/ProductsOverviewPage.js +6 -6
- package/dist/healthybowl/pages/products/ProductsOverviewPage.js.map +1 -1
- package/dist/healthybowl/pages/products/QualityPage.js +6 -6
- package/dist/healthybowl/pages/products/QualityPage.js.map +1 -1
- package/dist/healthybowl/pages/soil/SoilDashboardPage.js +1 -1
- package/dist/healthybowl/pages/soil/SoilDashboardPage.js.map +1 -1
- package/dist/healthybowl/pages/soil/SoilMonitoringPage.js +3 -3
- package/dist/healthybowl/pages/soil/SoilMonitoringPage.js.map +1 -1
- package/dist/healthybowl/pages/soil/SoilRecommendationsPage.js +1 -1
- package/dist/healthybowl/pages/soil/SoilRecommendationsPage.js.map +1 -1
- package/dist/healthybowl/pages/traceability/SupplyChainPage.js +1 -1
- package/dist/healthybowl/pages/traceability/SupplyChainPage.js.map +1 -1
- package/dist/healthybowl/pages/weather/WeatherAlertsPage.js +1 -1
- package/dist/healthybowl/pages/weather/WeatherAlertsPage.js.map +1 -1
- package/dist/healthybowl/pages/weather/WeatherForecastPage.js +7 -7
- package/dist/healthybowl/pages/weather/WeatherForecastPage.js.map +1 -1
- package/dist/healthybowl/pages/weather/WeatherHistoryPage.js +8 -8
- package/dist/healthybowl/pages/weather/WeatherHistoryPage.js.map +1 -1
- package/dist/healthybowl/pages/weather/WeatherOverviewPage.js +16 -16
- package/dist/healthybowl/pages/weather/WeatherOverviewPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -26,9 +26,9 @@ var a = class extends e {
|
|
|
26
26
|
};
|
|
27
27
|
render() {
|
|
28
28
|
return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ i("div", {
|
|
29
|
-
className: "flex flex-col items-center justify-center rounded-lg border border-dashed border-
|
|
29
|
+
className: "flex flex-col items-center justify-center rounded-lg border border-dashed border-destructive bg-destructive/10 p-12 text-center",
|
|
30
30
|
children: [
|
|
31
|
-
/* @__PURE__ */ r(t, { className: "mb-4 h-12 w-12 text-
|
|
31
|
+
/* @__PURE__ */ r(t, { className: "mb-4 h-12 w-12 text-destructive" }),
|
|
32
32
|
/* @__PURE__ */ r("h3", {
|
|
33
33
|
className: "text-lg font-medium text-foreground",
|
|
34
34
|
children: "Something went wrong"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.js","names":[],"sources":["../../../src/healthybowl/components/ErrorBoundary.tsx"],"sourcesContent":["import { Component, type ReactNode, type ErrorInfo } from 'react';\nimport { AlertTriangle, RefreshCw } from 'lucide-react';\n\ninterface ErrorBoundaryProps {\n children: ReactNode;\n fallback?: ReactNode;\n}\n\ninterface ErrorBoundaryState {\n hasError: boolean;\n error: Error | null;\n}\n\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = { hasError: false, error: null };\n }\n\n static getDerivedStateFromError(error: Error): ErrorBoundaryState {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error('[HealthyBowl ErrorBoundary]', error, errorInfo);\n }\n\n handleReset = () => {\n this.setState({ hasError: false, error: null });\n };\n\n render() {\n if (this.state.hasError) {\n if (this.props.fallback) return this.props.fallback;\n\n return (\n <div className=\"flex flex-col items-center justify-center rounded-lg border border-dashed border-
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","names":[],"sources":["../../../src/healthybowl/components/ErrorBoundary.tsx"],"sourcesContent":["import { Component, type ReactNode, type ErrorInfo } from 'react';\nimport { AlertTriangle, RefreshCw } from 'lucide-react';\n\ninterface ErrorBoundaryProps {\n children: ReactNode;\n fallback?: ReactNode;\n}\n\ninterface ErrorBoundaryState {\n hasError: boolean;\n error: Error | null;\n}\n\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = { hasError: false, error: null };\n }\n\n static getDerivedStateFromError(error: Error): ErrorBoundaryState {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error('[HealthyBowl ErrorBoundary]', error, errorInfo);\n }\n\n handleReset = () => {\n this.setState({ hasError: false, error: null });\n };\n\n render() {\n if (this.state.hasError) {\n if (this.props.fallback) return this.props.fallback;\n\n return (\n <div className=\"flex flex-col items-center justify-center rounded-lg border border-dashed border-destructive bg-destructive/10 p-12 text-center\">\n <AlertTriangle className=\"mb-4 h-12 w-12 text-destructive\" />\n <h3 className=\"text-lg font-medium text-foreground\">Something went wrong</h3>\n <p className=\"mt-1 max-w-md text-sm text-muted-foreground\">\n {this.state.error?.message ?? 'An unexpected error occurred while rendering this section.'}\n </p>\n <button\n onClick={this.handleReset}\n className=\"mt-4 flex items-center gap-1.5 rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90\"\n >\n <RefreshCw className=\"h-4 w-4\" /> Try Again\n </button>\n </div>\n );\n }\n\n return this.props.children;\n }\n}\n"],"mappings":";;;;AAaA,IAAa,IAAb,cAAmC,EAAkD;CACnF,YAAY,GAA2B;AAErC,EADA,MAAM,EAAM,EACZ,KAAK,QAAQ;GAAE,UAAU;GAAO,OAAO;GAAM;;CAG/C,OAAO,yBAAyB,GAAkC;AAChE,SAAO;GAAE,UAAU;GAAM;GAAO;;CAGlC,kBAAkB,GAAc,GAAsB;AACpD,UAAQ,MAAM,+BAA+B,GAAO,EAAU;;CAGhE,oBAAoB;AAClB,OAAK,SAAS;GAAE,UAAU;GAAO,OAAO;GAAM,CAAC;;CAGjD,SAAS;AAqBP,SApBI,KAAK,MAAM,WACT,KAAK,MAAM,WAAiB,KAAK,MAAM,WAGzC,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,GAAD,EAAe,WAAU,mCAAoC,CAAA;IAC7D,kBAAC,MAAD;KAAI,WAAU;eAAsC;KAAyB,CAAA;IAC7E,kBAAC,KAAD;KAAG,WAAU;eACV,KAAK,MAAM,OAAO,WAAW;KAC5B,CAAA;IACJ,kBAAC,UAAD;KACE,SAAS,KAAK;KACd,WAAU;eAFZ,CAIE,kBAAC,GAAD,EAAW,WAAU,WAAY,CAAA,EAAA,aAC1B;;IACL;OAIH,KAAK,MAAM"}
|
|
@@ -27,11 +27,11 @@ var c = ({ label: c, value: l, previousValue: u, unit: d, prefix: f, icon: p, tr
|
|
|
27
27
|
_ !== 0 && /* @__PURE__ */ s("div", {
|
|
28
28
|
className: "mt-2 flex items-center gap-1 text-xs",
|
|
29
29
|
children: [
|
|
30
|
-
v === "up" && /* @__PURE__ */ o(a, { className: "h-3 w-3 text-
|
|
31
|
-
v === "down" && /* @__PURE__ */ o(i, { className: "h-3 w-3 text-
|
|
30
|
+
v === "up" && /* @__PURE__ */ o(a, { className: "h-3 w-3 text-success" }),
|
|
31
|
+
v === "down" && /* @__PURE__ */ o(i, { className: "h-3 w-3 text-destructive" }),
|
|
32
32
|
v === "stable" && /* @__PURE__ */ o(r, { className: "h-3 w-3 text-muted-foreground" }),
|
|
33
33
|
/* @__PURE__ */ s("span", {
|
|
34
|
-
className: e("font-medium", v === "up" && "text-
|
|
34
|
+
className: e("font-medium", v === "up" && "text-success", v === "down" && "text-destructive", v === "stable" && "text-muted-foreground"),
|
|
35
35
|
children: [
|
|
36
36
|
_ > 0 ? "+" : "",
|
|
37
37
|
_,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatCard.js","names":[],"sources":["../../../src/healthybowl/components/StatCard.tsx"],"sourcesContent":["import type { FC, ReactNode } from 'react';\nimport { TrendingUp, TrendingDown, Minus } from 'lucide-react';\nimport { cn } from '../utils/helpers';\nimport { formatNumber, formatCurrency } from '../utils/helpers';\n\ninterface StatCardProps {\n label: string;\n value: number | string;\n previousValue?: number;\n unit?: string;\n prefix?: string;\n icon?: ReactNode;\n trend?: 'up' | 'down' | 'stable';\n change?: number;\n className?: string;\n}\n\nexport const StatCard: FC<StatCardProps> = ({\n label,\n value,\n previousValue,\n unit,\n prefix,\n icon,\n trend,\n change,\n className,\n}) => {\n const numericValue = typeof value === 'number' ? value : 0;\n const computedChange =\n change ?? (previousValue ? Math.round(((numericValue - previousValue) / previousValue) * 100) : 0);\n const computedTrend = trend ?? (computedChange > 0 ? 'up' : computedChange < 0 ? 'down' : 'stable');\n\n const displayValue =\n typeof value === 'string'\n ? value\n : prefix === '$'\n ? formatCurrency(value)\n : `${formatNumber(value)}${unit ? ` ${unit}` : ''}`;\n\n return (\n <div className={cn('rounded-lg border border-border bg-card p-4 shadow-sm', className)}>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-sm font-medium text-muted-foreground\">{label}</span>\n {icon && <span className=\"text-muted-foreground\">{icon}</span>}\n </div>\n <div className=\"mt-2 flex items-baseline gap-2\">\n <span className=\"text-2xl font-bold text-foreground\">{displayValue}</span>\n </div>\n {computedChange !== 0 && (\n <div className=\"mt-2 flex items-center gap-1 text-xs\">\n {computedTrend === 'up' && <TrendingUp className=\"h-3 w-3 text-
|
|
1
|
+
{"version":3,"file":"StatCard.js","names":[],"sources":["../../../src/healthybowl/components/StatCard.tsx"],"sourcesContent":["import type { FC, ReactNode } from 'react';\nimport { TrendingUp, TrendingDown, Minus } from 'lucide-react';\nimport { cn } from '../utils/helpers';\nimport { formatNumber, formatCurrency } from '../utils/helpers';\n\ninterface StatCardProps {\n label: string;\n value: number | string;\n previousValue?: number;\n unit?: string;\n prefix?: string;\n icon?: ReactNode;\n trend?: 'up' | 'down' | 'stable';\n change?: number;\n className?: string;\n}\n\nexport const StatCard: FC<StatCardProps> = ({\n label,\n value,\n previousValue,\n unit,\n prefix,\n icon,\n trend,\n change,\n className,\n}) => {\n const numericValue = typeof value === 'number' ? value : 0;\n const computedChange =\n change ?? (previousValue ? Math.round(((numericValue - previousValue) / previousValue) * 100) : 0);\n const computedTrend = trend ?? (computedChange > 0 ? 'up' : computedChange < 0 ? 'down' : 'stable');\n\n const displayValue =\n typeof value === 'string'\n ? value\n : prefix === '$'\n ? formatCurrency(value)\n : `${formatNumber(value)}${unit ? ` ${unit}` : ''}`;\n\n return (\n <div className={cn('rounded-lg border border-border bg-card p-4 shadow-sm', className)}>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-sm font-medium text-muted-foreground\">{label}</span>\n {icon && <span className=\"text-muted-foreground\">{icon}</span>}\n </div>\n <div className=\"mt-2 flex items-baseline gap-2\">\n <span className=\"text-2xl font-bold text-foreground\">{displayValue}</span>\n </div>\n {computedChange !== 0 && (\n <div className=\"mt-2 flex items-center gap-1 text-xs\">\n {computedTrend === 'up' && <TrendingUp className=\"h-3 w-3 text-success\" />}\n {computedTrend === 'down' && <TrendingDown className=\"h-3 w-3 text-destructive\" />}\n {computedTrend === 'stable' && <Minus className=\"h-3 w-3 text-muted-foreground\" />}\n <span\n className={cn(\n 'font-medium',\n computedTrend === 'up' && 'text-success',\n computedTrend === 'down' && 'text-destructive',\n computedTrend === 'stable' && 'text-muted-foreground'\n )}\n >\n {computedChange > 0 ? '+' : ''}\n {computedChange}%\n </span>\n <span className=\"text-muted-foreground\">vs last period</span>\n </div>\n )}\n </div>\n );\n};\n"],"mappings":";;;;AAiBA,IAAa,KAA+B,EAC1C,UACA,UACA,kBACA,SACA,WACA,SACA,UACA,WACA,mBACI;CAEJ,IAAM,IACJ,MAAW,IAAgB,KAAK,QAFb,OAAO,KAAU,WAAW,IAAQ,KAEA,KAAiB,IAAiB,IAAI,GAAG,IAC5F,IAAgB,MAAU,IAAiB,IAAI,OAAO,IAAiB,IAAI,SAAS,WAEpF,IACJ,OAAO,KAAU,WACb,IACA,MAAW,MACT,EAAe,EAAM,GACrB,GAAG,EAAa,EAAM,GAAG,IAAO,IAAI,MAAS;AAErD,QACE,kBAAC,OAAD;EAAK,WAAW,EAAG,yDAAyD,EAAU;YAAtF;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,QAAD;KAAM,WAAU;eAA6C;KAAa,CAAA,EACzE,KAAQ,kBAAC,QAAD;KAAM,WAAU;eAAyB;KAAY,CAAA,CAC1D;;GACN,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,QAAD;KAAM,WAAU;eAAsC;KAAoB,CAAA;IACtE,CAAA;GACL,MAAmB,KAClB,kBAAC,OAAD;IAAK,WAAU;cAAf;KACG,MAAkB,QAAQ,kBAAC,GAAD,EAAY,WAAU,wBAAyB,CAAA;KACzE,MAAkB,UAAU,kBAAC,GAAD,EAAc,WAAU,4BAA6B,CAAA;KACjF,MAAkB,YAAY,kBAAC,GAAD,EAAO,WAAU,iCAAkC,CAAA;KAClF,kBAAC,QAAD;MACE,WAAW,EACT,eACA,MAAkB,QAAQ,gBAC1B,MAAkB,UAAU,oBAC5B,MAAkB,YAAY,wBAC/B;gBANH;OAQG,IAAiB,IAAI,MAAM;OAC3B;OAAe;OACX;;KACP,kBAAC,QAAD;MAAM,WAAU;gBAAwB;MAAqB,CAAA;KACzD;;GAEJ"}
|
|
@@ -2,17 +2,17 @@ import { cn as e } from "../utils/helpers.js";
|
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
//#region src/healthybowl/components/StatusBadge.tsx
|
|
4
4
|
var r = {
|
|
5
|
-
success: "bg-
|
|
6
|
-
warning: "bg-
|
|
7
|
-
error: "bg-
|
|
8
|
-
info: "bg-
|
|
5
|
+
success: "bg-success-subtle text-success",
|
|
6
|
+
warning: "bg-status-warning-bg-subtle text-warning",
|
|
7
|
+
error: "bg-status-error-bg-subtle text-destructive",
|
|
8
|
+
info: "bg-status-info-bg-subtle text-info",
|
|
9
9
|
default: "bg-primary/10 text-primary",
|
|
10
10
|
muted: "bg-muted text-muted-foreground"
|
|
11
11
|
}, i = {
|
|
12
|
-
success: "bg-
|
|
13
|
-
warning: "bg-
|
|
14
|
-
error: "bg-
|
|
15
|
-
info: "bg-
|
|
12
|
+
success: "bg-success",
|
|
13
|
+
warning: "bg-warning",
|
|
14
|
+
error: "bg-destructive",
|
|
15
|
+
info: "bg-info",
|
|
16
16
|
default: "bg-primary",
|
|
17
17
|
muted: "bg-muted-foreground"
|
|
18
18
|
}, a = ({ label: a, variant: o = "default", dot: s = !1, className: c }) => /* @__PURE__ */ n("span", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/healthybowl/components/StatusBadge.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { cn } from '../utils/helpers';\n\ntype BadgeVariant = 'success' | 'warning' | 'error' | 'info' | 'default' | 'muted';\n\ninterface StatusBadgeProps {\n label: string;\n variant?: BadgeVariant;\n dot?: boolean;\n className?: string;\n}\n\nconst variantStyles: Record<BadgeVariant, string> = {\n success: 'bg-
|
|
1
|
+
{"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/healthybowl/components/StatusBadge.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { cn } from '../utils/helpers';\n\ntype BadgeVariant = 'success' | 'warning' | 'error' | 'info' | 'default' | 'muted';\n\ninterface StatusBadgeProps {\n label: string;\n variant?: BadgeVariant;\n dot?: boolean;\n className?: string;\n}\n\nconst variantStyles: Record<BadgeVariant, string> = {\n success: 'bg-success-subtle text-success',\n warning: 'bg-status-warning-bg-subtle text-warning',\n error: 'bg-status-error-bg-subtle text-destructive',\n info: 'bg-status-info-bg-subtle text-info',\n default: 'bg-primary/10 text-primary',\n muted: 'bg-muted text-muted-foreground',\n};\n\nconst dotStyles: Record<BadgeVariant, string> = {\n success: 'bg-success',\n warning: 'bg-warning',\n error: 'bg-destructive',\n info: 'bg-info',\n default: 'bg-primary',\n muted: 'bg-muted-foreground',\n};\n\nexport const StatusBadge: FC<StatusBadgeProps> = ({ label, variant = 'default', dot = false, className }) => {\n return (\n <span\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium',\n variantStyles[variant],\n className\n )}\n >\n {dot && <span className={cn('h-1.5 w-1.5 rounded-full', dotStyles[variant])} />}\n {label}\n </span>\n );\n};\n"],"mappings":";;;AAYA,IAAM,IAA8C;CAClD,SAAS;CACT,SAAS;CACT,OAAO;CACP,MAAM;CACN,SAAS;CACT,OAAO;CACR,EAEK,IAA0C;CAC9C,SAAS;CACT,SAAS;CACT,OAAO;CACP,MAAM;CACN,SAAS;CACT,OAAO;CACR,EAEY,KAAqC,EAAE,UAAO,aAAU,WAAW,SAAM,IAAO,mBAEzF,kBAAC,QAAD;CACE,WAAW,EACT,mFACA,EAAc,IACd,EACD;WALH,CAOG,KAAO,kBAAC,QAAD,EAAM,WAAW,EAAG,4BAA4B,EAAU,GAAS,EAAI,CAAA,EAC9E,EACI"}
|
|
@@ -6,19 +6,19 @@ import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
|
6
6
|
var l = {
|
|
7
7
|
success: {
|
|
8
8
|
icon: r,
|
|
9
|
-
className: "border-
|
|
9
|
+
className: "border-success/30 bg-success-subtle text-success"
|
|
10
10
|
},
|
|
11
11
|
error: {
|
|
12
12
|
icon: o,
|
|
13
|
-
className: "border-
|
|
13
|
+
className: "border-destructive/30 bg-destructive/10 text-destructive"
|
|
14
14
|
},
|
|
15
15
|
warning: {
|
|
16
16
|
icon: n,
|
|
17
|
-
className: "border-
|
|
17
|
+
className: "border-warning/30 bg-warning/10 text-warning"
|
|
18
18
|
},
|
|
19
19
|
info: {
|
|
20
20
|
icon: i,
|
|
21
|
-
className: "border-
|
|
21
|
+
className: "border-info/30 bg-info/10 text-info"
|
|
22
22
|
}
|
|
23
23
|
}, u = ({ id: n, title: r, description: i, variant: o, duration: u = 4e3, onDismiss: d }) => {
|
|
24
24
|
let { icon: f, className: p } = l[o];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.js","names":[],"sources":["../../../src/healthybowl/components/Toast.tsx"],"sourcesContent":["import { useEffect, type FC } from 'react';\nimport { X, CheckCircle, AlertTriangle, Info, XCircle } from 'lucide-react';\nimport { cn } from '../utils/helpers';\n\nexport type ToastVariant = 'success' | 'error' | 'warning' | 'info';\n\nexport interface ToastData {\n id: string;\n title: string;\n description?: string;\n variant: ToastVariant;\n duration?: number;\n}\n\ninterface ToastProps extends ToastData {\n onDismiss: (id: string) => void;\n}\n\nconst variantConfig: Record<ToastVariant, { icon: typeof CheckCircle; className: string }> = {\n success: {\n icon: CheckCircle,\n className: 'border-
|
|
1
|
+
{"version":3,"file":"Toast.js","names":[],"sources":["../../../src/healthybowl/components/Toast.tsx"],"sourcesContent":["import { useEffect, type FC } from 'react';\nimport { X, CheckCircle, AlertTriangle, Info, XCircle } from 'lucide-react';\nimport { cn } from '../utils/helpers';\n\nexport type ToastVariant = 'success' | 'error' | 'warning' | 'info';\n\nexport interface ToastData {\n id: string;\n title: string;\n description?: string;\n variant: ToastVariant;\n duration?: number;\n}\n\ninterface ToastProps extends ToastData {\n onDismiss: (id: string) => void;\n}\n\nconst variantConfig: Record<ToastVariant, { icon: typeof CheckCircle; className: string }> = {\n success: {\n icon: CheckCircle,\n className: 'border-success/30 bg-success-subtle text-success',\n },\n error: { icon: XCircle, className: 'border-destructive/30 bg-destructive/10 text-destructive' },\n warning: {\n icon: AlertTriangle,\n className: 'border-warning/30 bg-warning/10 text-warning',\n },\n info: { icon: Info, className: 'border-info/30 bg-info/10 text-info' },\n};\n\nexport const Toast: FC<ToastProps> = ({ id, title, description, variant, duration = 4000, onDismiss }) => {\n const { icon: Icon, className } = variantConfig[variant];\n\n useEffect(() => {\n if (duration > 0) {\n const timer = setTimeout(() => onDismiss(id), duration);\n return () => clearTimeout(timer);\n }\n }, [id, duration, onDismiss]);\n\n return (\n <div\n className={cn(\n 'flex items-start gap-3 rounded-lg border p-4 shadow-lg animate-in slide-in-from-right-full',\n className\n )}\n >\n <Icon className=\"mt-0.5 h-5 w-5 shrink-0\" />\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm font-medium\">{title}</p>\n {description && <p className=\"mt-0.5 text-xs opacity-80\">{description}</p>}\n </div>\n <button onClick={() => onDismiss(id)} className=\"shrink-0 opacity-60 hover:opacity-100\">\n <X className=\"h-4 w-4\" />\n </button>\n </div>\n );\n};\n\ninterface ToastContainerProps {\n toasts: ToastData[];\n onDismiss: (id: string) => void;\n}\n\nexport const ToastContainer: FC<ToastContainerProps> = ({ toasts, onDismiss }) => {\n if (toasts.length === 0) return null;\n return (\n <div className=\"fixed bottom-4 right-4 z-50 flex w-80 flex-col gap-2\">\n {toasts.map((t) => (\n <Toast key={t.id} {...t} onDismiss={onDismiss} />\n ))}\n </div>\n );\n};\n"],"mappings":";;;;;AAkBA,IAAM,IAAuF;CAC3F,SAAS;EACP,MAAM;EACN,WAAW;EACZ;CACD,OAAO;EAAE,MAAM;EAAS,WAAW;EAA4D;CAC/F,SAAS;EACP,MAAM;EACN,WAAW;EACZ;CACD,MAAM;EAAE,MAAM;EAAM,WAAW;EAAuC;CACvE,EAEY,KAAyB,EAAE,OAAI,UAAO,gBAAa,YAAS,cAAW,KAAM,mBAAgB;CACxG,IAAM,EAAE,MAAM,GAAM,iBAAc,EAAc;AAShD,QAPA,QAAgB;AACd,MAAI,IAAW,GAAG;GAChB,IAAM,IAAQ,iBAAiB,EAAU,EAAG,EAAE,EAAS;AACvD,gBAAa,aAAa,EAAM;;IAEjC;EAAC;EAAI;EAAU;EAAU,CAAC,EAG3B,kBAAC,OAAD;EACE,WAAW,EACT,8FACA,EACD;YAJH;GAME,kBAAC,GAAD,EAAM,WAAU,2BAA4B,CAAA;GAC5C,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,KAAD;KAAG,WAAU;eAAuB;KAAU,CAAA,EAC7C,KAAe,kBAAC,KAAD;KAAG,WAAU;eAA6B;KAAgB,CAAA,CACtE;;GACN,kBAAC,UAAD;IAAQ,eAAe,EAAU,EAAG;IAAE,WAAU;cAC9C,kBAAC,GAAD,EAAG,WAAU,WAAY,CAAA;IAClB,CAAA;GACL;;GASG,KAA2C,EAAE,WAAQ,mBAC5D,EAAO,WAAW,IAAU,OAE9B,kBAAC,OAAD;CAAK,WAAU;WACZ,EAAO,KAAK,MACX,kBAAC,GAAD;EAAkB,GAAI;EAAc;EAAa,EAArC,EAAE,GAAmC,CACjD;CACE,CAAA"}
|