subos-frontend 1.0.20 → 1.0.21
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 +26 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -24
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +0 -10
- package/dist/types/components/subscription/SubscriptionInfoGrid.d.ts +0 -2
- package/dist/types/components/subscription/SubscriptionInfoGrid.d.ts.map +1 -1
- package/dist/types/components/subscription/SubscriptionUsageDisplay.d.ts +0 -2
- package/dist/types/components/subscription/SubscriptionUsageDisplay.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2142,9 +2142,7 @@ var SubscriptionInfoGrid = ({
|
|
|
2142
2142
|
fields,
|
|
2143
2143
|
className = "",
|
|
2144
2144
|
gridCols = 3,
|
|
2145
|
-
showDefaultFields = true
|
|
2146
|
-
labelFontWeight = "normal",
|
|
2147
|
-
valueFontWeight = "medium"
|
|
2145
|
+
showDefaultFields = true
|
|
2148
2146
|
}) => {
|
|
2149
2147
|
const displayFields = fields || (showDefaultFields ? defaultFields : []);
|
|
2150
2148
|
if (!subscription || displayFields.length === 0) {
|
|
@@ -2198,9 +2196,7 @@ var SubscriptionUsageDisplay = ({
|
|
|
2198
2196
|
usageMetrics,
|
|
2199
2197
|
className = "",
|
|
2200
2198
|
gridCols = 3,
|
|
2201
|
-
showProgressBars = false
|
|
2202
|
-
labelFontWeight = "normal",
|
|
2203
|
-
valueFontWeight = "medium"
|
|
2199
|
+
showProgressBars = false
|
|
2204
2200
|
}) => {
|
|
2205
2201
|
if (!subscription || usageMetrics.length === 0) {
|
|
2206
2202
|
return null;
|
|
@@ -2233,22 +2229,6 @@ var SubscriptionUsageDisplay = ({
|
|
|
2233
2229
|
if (percentage >= 75) return "bg-yellow-500";
|
|
2234
2230
|
return "bg-green-500";
|
|
2235
2231
|
};
|
|
2236
|
-
const getFontWeightClass = (weight) => {
|
|
2237
|
-
switch (weight) {
|
|
2238
|
-
case "light":
|
|
2239
|
-
return "font-light";
|
|
2240
|
-
case "normal":
|
|
2241
|
-
return "font-normal";
|
|
2242
|
-
case "medium":
|
|
2243
|
-
return "font-medium";
|
|
2244
|
-
case "semibold":
|
|
2245
|
-
return "font-semibold";
|
|
2246
|
-
case "bold":
|
|
2247
|
-
return "font-bold";
|
|
2248
|
-
default:
|
|
2249
|
-
return "font-normal";
|
|
2250
|
-
}
|
|
2251
|
-
};
|
|
2252
2232
|
return /* @__PURE__ */ jsx("div", { className: `grid ${getGridClass()} gap-4 ${className}`, children: usageMetrics.map((metric) => {
|
|
2253
2233
|
var _a, _b;
|
|
2254
2234
|
const used = ((_a = subscription.usage) == null ? void 0 : _a[metric.key]) || 0;
|
|
@@ -2257,8 +2237,30 @@ var SubscriptionUsageDisplay = ({
|
|
|
2257
2237
|
const percentage = getProgressPercentage(used, total);
|
|
2258
2238
|
const shouldShowProgress = showProgressBars || metric.showProgress;
|
|
2259
2239
|
return /* @__PURE__ */ jsxs("div", { className: "p-4 border border-gray-200 rounded-lg bg-white space-y-1", children: [
|
|
2260
|
-
/* @__PURE__ */ jsx(
|
|
2261
|
-
|
|
2240
|
+
/* @__PURE__ */ jsx(
|
|
2241
|
+
"p",
|
|
2242
|
+
{
|
|
2243
|
+
className: "text-sm text-gray-500",
|
|
2244
|
+
style: {
|
|
2245
|
+
fontSize: "var(--subos-font-size-subscription-label, 0.875rem)",
|
|
2246
|
+
fontWeight: "var(--subos-font-weight-subscription-label, 400)",
|
|
2247
|
+
color: "var(--subos-color-subscription-label, #6c757d)"
|
|
2248
|
+
},
|
|
2249
|
+
children: metric.label
|
|
2250
|
+
}
|
|
2251
|
+
),
|
|
2252
|
+
/* @__PURE__ */ jsx(
|
|
2253
|
+
"p",
|
|
2254
|
+
{
|
|
2255
|
+
className: "font-medium",
|
|
2256
|
+
style: {
|
|
2257
|
+
fontSize: "var(--subos-font-size-subscription-value, 1rem)",
|
|
2258
|
+
fontWeight: "var(--subos-font-weight-subscription-value, 500)",
|
|
2259
|
+
color: "var(--subos-color-subscription-value, inherit)"
|
|
2260
|
+
},
|
|
2261
|
+
children: displayValue
|
|
2262
|
+
}
|
|
2263
|
+
),
|
|
2262
2264
|
shouldShowProgress && total > 0 && /* @__PURE__ */ jsx("div", { className: "w-full bg-gray-200 rounded-full h-2", children: /* @__PURE__ */ jsx(
|
|
2263
2265
|
"div",
|
|
2264
2266
|
{
|