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 CHANGED
@@ -2149,9 +2149,7 @@ var SubscriptionInfoGrid = ({
2149
2149
  fields,
2150
2150
  className = "",
2151
2151
  gridCols = 3,
2152
- showDefaultFields = true,
2153
- labelFontWeight = "normal",
2154
- valueFontWeight = "medium"
2152
+ showDefaultFields = true
2155
2153
  }) => {
2156
2154
  const displayFields = fields || (showDefaultFields ? defaultFields : []);
2157
2155
  if (!subscription || displayFields.length === 0) {
@@ -2205,9 +2203,7 @@ var SubscriptionUsageDisplay = ({
2205
2203
  usageMetrics,
2206
2204
  className = "",
2207
2205
  gridCols = 3,
2208
- showProgressBars = false,
2209
- labelFontWeight = "normal",
2210
- valueFontWeight = "medium"
2206
+ showProgressBars = false
2211
2207
  }) => {
2212
2208
  if (!subscription || usageMetrics.length === 0) {
2213
2209
  return null;
@@ -2240,22 +2236,6 @@ var SubscriptionUsageDisplay = ({
2240
2236
  if (percentage >= 75) return "bg-yellow-500";
2241
2237
  return "bg-green-500";
2242
2238
  };
2243
- const getFontWeightClass = (weight) => {
2244
- switch (weight) {
2245
- case "light":
2246
- return "font-light";
2247
- case "normal":
2248
- return "font-normal";
2249
- case "medium":
2250
- return "font-medium";
2251
- case "semibold":
2252
- return "font-semibold";
2253
- case "bold":
2254
- return "font-bold";
2255
- default:
2256
- return "font-normal";
2257
- }
2258
- };
2259
2239
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `grid ${getGridClass()} gap-4 ${className}`, children: usageMetrics.map((metric) => {
2260
2240
  var _a, _b;
2261
2241
  const used = ((_a = subscription.usage) == null ? void 0 : _a[metric.key]) || 0;
@@ -2264,8 +2244,30 @@ var SubscriptionUsageDisplay = ({
2264
2244
  const percentage = getProgressPercentage(used, total);
2265
2245
  const shouldShowProgress = showProgressBars || metric.showProgress;
2266
2246
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 border border-gray-200 rounded-lg bg-white space-y-1", children: [
2267
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-sm text-gray-500 ${getFontWeightClass(labelFontWeight)}`, children: metric.label }),
2268
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: getFontWeightClass(valueFontWeight), children: displayValue }),
2247
+ /* @__PURE__ */ jsxRuntime.jsx(
2248
+ "p",
2249
+ {
2250
+ className: "text-sm text-gray-500",
2251
+ style: {
2252
+ fontSize: "var(--subos-font-size-subscription-label, 0.875rem)",
2253
+ fontWeight: "var(--subos-font-weight-subscription-label, 400)",
2254
+ color: "var(--subos-color-subscription-label, #6c757d)"
2255
+ },
2256
+ children: metric.label
2257
+ }
2258
+ ),
2259
+ /* @__PURE__ */ jsxRuntime.jsx(
2260
+ "p",
2261
+ {
2262
+ className: "font-medium",
2263
+ style: {
2264
+ fontSize: "var(--subos-font-size-subscription-value, 1rem)",
2265
+ fontWeight: "var(--subos-font-weight-subscription-value, 500)",
2266
+ color: "var(--subos-color-subscription-value, inherit)"
2267
+ },
2268
+ children: displayValue
2269
+ }
2270
+ ),
2269
2271
  shouldShowProgress && total > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full bg-gray-200 rounded-full h-2", children: /* @__PURE__ */ jsxRuntime.jsx(
2270
2272
  "div",
2271
2273
  {