@ttoss/react-billing 0.5.15 → 0.5.17
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.cjs +20 -20
- package/dist/index.mjs +20 -20
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -38,7 +38,7 @@ let _ttoss_components_EnhancedTitle = require("@ttoss/components/EnhancedTitle")
|
|
|
38
38
|
let _ttoss_components_MetricCard = require("@ttoss/components/MetricCard");
|
|
39
39
|
|
|
40
40
|
//#region src/components/planCard/PlanCardCtaSlot.tsx
|
|
41
|
-
|
|
41
|
+
var PlanCardCtaSlot = ({
|
|
42
42
|
buttonProps
|
|
43
43
|
}) => {
|
|
44
44
|
const {
|
|
@@ -73,7 +73,7 @@ const PlanCardCtaSlot = ({
|
|
|
73
73
|
|
|
74
74
|
//#endregion
|
|
75
75
|
//#region src/components/planCard/PlanCardVariants.ts
|
|
76
|
-
|
|
76
|
+
var normalizeVariant = variantType => {
|
|
77
77
|
if (variantType === "default") return "primary";
|
|
78
78
|
if (variantType === "enterprise") return "secondary";
|
|
79
79
|
return variantType ?? "primary";
|
|
@@ -82,7 +82,7 @@ const normalizeVariant = variantType => {
|
|
|
82
82
|
* PlanCard variants follow the same pattern as `Tooltip` variants:
|
|
83
83
|
* a simple mapping from `variantType` to a small set of style tokens.
|
|
84
84
|
*/
|
|
85
|
-
|
|
85
|
+
var getPlanCardVariantStyles = variantType => {
|
|
86
86
|
const variant = normalizeVariant(variantType);
|
|
87
87
|
const variants = {
|
|
88
88
|
primary: {
|
|
@@ -105,8 +105,8 @@ const getPlanCardVariantStyles = variantType => {
|
|
|
105
105
|
|
|
106
106
|
//#endregion
|
|
107
107
|
//#region src/components/planCard/PlanCardFeaturesSlot.tsx
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
var featuresTitle = "RECURSOS";
|
|
109
|
+
var PlanCardFeaturesSlot = ({
|
|
110
110
|
features,
|
|
111
111
|
variant = "primary"
|
|
112
112
|
}) => {
|
|
@@ -167,7 +167,7 @@ const PlanCardFeaturesSlot = ({
|
|
|
167
167
|
|
|
168
168
|
//#endregion
|
|
169
169
|
//#region src/components/planCard/PlanCardHeaderSlot.tsx
|
|
170
|
-
|
|
170
|
+
var PlanCardHeaderSlot = ({
|
|
171
171
|
title,
|
|
172
172
|
subtitle,
|
|
173
173
|
hasTopTag,
|
|
@@ -206,7 +206,7 @@ const PlanCardHeaderSlot = ({
|
|
|
206
206
|
|
|
207
207
|
//#endregion
|
|
208
208
|
//#region src/components/planCard/PlanCardMetadataSlot.tsx
|
|
209
|
-
|
|
209
|
+
var PlanCardMetadataSlot = ({
|
|
210
210
|
metadata,
|
|
211
211
|
variant = "primary"
|
|
212
212
|
}) => {
|
|
@@ -279,7 +279,7 @@ const PlanCardMetadataSlot = ({
|
|
|
279
279
|
|
|
280
280
|
//#endregion
|
|
281
281
|
//#region src/components/planCard/PlanCardPriceSlot.tsx
|
|
282
|
-
|
|
282
|
+
var PlanCardPriceSlot = ({
|
|
283
283
|
price,
|
|
284
284
|
variant = "primary"
|
|
285
285
|
}) => {
|
|
@@ -325,7 +325,7 @@ const PlanCardPriceSlot = ({
|
|
|
325
325
|
|
|
326
326
|
//#endregion
|
|
327
327
|
//#region src/components/planCard/PlanCardTopTagSlot.tsx
|
|
328
|
-
|
|
328
|
+
var PlanCardTopTagSlot = ({
|
|
329
329
|
children
|
|
330
330
|
}) => {
|
|
331
331
|
return /* @__PURE__ */(0, react_jsx_runtime.jsx)(_ttoss_ui.Box, {
|
|
@@ -338,7 +338,7 @@ const PlanCardTopTagSlot = ({
|
|
|
338
338
|
|
|
339
339
|
//#endregion
|
|
340
340
|
//#region src/components/planCard/PlanCard.tsx
|
|
341
|
-
|
|
341
|
+
var PlanCard = props => {
|
|
342
342
|
const {
|
|
343
343
|
variant = "primary",
|
|
344
344
|
topTag,
|
|
@@ -440,7 +440,7 @@ const PlanCard = props => {
|
|
|
440
440
|
* />
|
|
441
441
|
* ```
|
|
442
442
|
*/
|
|
443
|
-
|
|
443
|
+
var PlansPanel = ({
|
|
444
444
|
filters = [],
|
|
445
445
|
plans,
|
|
446
446
|
activePlanId,
|
|
@@ -536,7 +536,7 @@ const PlansPanel = ({
|
|
|
536
536
|
|
|
537
537
|
//#endregion
|
|
538
538
|
//#region src/components/subscriptionPanel/SubscriptionPanel.styles.ts
|
|
539
|
-
|
|
539
|
+
var gradientFlow = (0, _ttoss_ui.keyframes)({
|
|
540
540
|
"0%": {
|
|
541
541
|
backgroundPosition: "0% 50%"
|
|
542
542
|
},
|
|
@@ -547,19 +547,19 @@ const gradientFlow = (0, _ttoss_ui.keyframes)({
|
|
|
547
547
|
backgroundPosition: "0% 50%"
|
|
548
548
|
}
|
|
549
549
|
});
|
|
550
|
-
|
|
550
|
+
var getAccentGradientBackground = t => {
|
|
551
551
|
const theme = t;
|
|
552
552
|
const start = theme.colors?.action?.background?.accent?.default || theme.colors?.input?.background?.accent?.default;
|
|
553
553
|
if (!start) return void 0;
|
|
554
554
|
return `linear-gradient(270deg, ${start}, ${theme.colors?.action?.background?.accent?.active || theme.colors?.input?.background?.accent?.active || start}, ${start})`;
|
|
555
555
|
};
|
|
556
|
-
|
|
556
|
+
var getPrimaryGradientBackground = t => {
|
|
557
557
|
const theme = t;
|
|
558
558
|
const start = theme.colors?.action?.background?.primary?.default;
|
|
559
559
|
if (!start) return void 0;
|
|
560
560
|
return `linear-gradient(270deg, ${start}, ${theme.colors?.action?.background?.secondary?.default || start}, ${start})`;
|
|
561
561
|
};
|
|
562
|
-
|
|
562
|
+
var getVariantStyles = variantType => {
|
|
563
563
|
const variants = {
|
|
564
564
|
"spotlight-accent": {
|
|
565
565
|
backgroundColor: "input.background.accent.default",
|
|
@@ -594,7 +594,7 @@ const getVariantStyles = variantType => {
|
|
|
594
594
|
};
|
|
595
595
|
return variants[variantType] || variants["spotlight-accent"];
|
|
596
596
|
};
|
|
597
|
-
|
|
597
|
+
var getSubscriptionPanelAccentBarSx = (variant = "spotlight-accent") => {
|
|
598
598
|
const variantStyles = getVariantStyles(variant);
|
|
599
599
|
const isSpotlight = variant.startsWith("spotlight-");
|
|
600
600
|
const gradientBg = variant === "spotlight-accent" ? getAccentGradientBackground : getPrimaryGradientBackground;
|
|
@@ -613,14 +613,14 @@ const getSubscriptionPanelAccentBarSx = (variant = "spotlight-accent") => {
|
|
|
613
613
|
} : {})
|
|
614
614
|
};
|
|
615
615
|
};
|
|
616
|
-
|
|
616
|
+
var SubscriptionPanelAccentBarSx = getSubscriptionPanelAccentBarSx("spotlight-accent");
|
|
617
617
|
|
|
618
618
|
//#endregion
|
|
619
619
|
//#region src/components/subscriptionPanel/SubscriptionPanelActionsSlot.tsx
|
|
620
620
|
/**
|
|
621
621
|
* Renders action buttons for the subscription card.
|
|
622
622
|
*/
|
|
623
|
-
|
|
623
|
+
var SubscriptionPanelActionsSlot = ({
|
|
624
624
|
actions
|
|
625
625
|
}) => {
|
|
626
626
|
if (actions.length === 0) return null;
|
|
@@ -668,7 +668,7 @@ const SubscriptionPanelActionsSlot = ({
|
|
|
668
668
|
/**
|
|
669
669
|
* Renders a metric card based on its type.
|
|
670
670
|
*/
|
|
671
|
-
|
|
671
|
+
var renderMetricCard = params => {
|
|
672
672
|
const {
|
|
673
673
|
metric,
|
|
674
674
|
index,
|
|
@@ -717,7 +717,7 @@ const renderMetricCard = params => {
|
|
|
717
717
|
* />
|
|
718
718
|
* ```
|
|
719
719
|
*/
|
|
720
|
-
|
|
720
|
+
var SubscriptionPanel = ({
|
|
721
721
|
variant = "accent",
|
|
722
722
|
icon,
|
|
723
723
|
planName,
|
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { EnhancedTitle } from "@ttoss/components/EnhancedTitle";
|
|
|
7
7
|
import { MetricCard } from "@ttoss/components/MetricCard";
|
|
8
8
|
|
|
9
9
|
//#region src/components/planCard/PlanCardCtaSlot.tsx
|
|
10
|
-
|
|
10
|
+
var PlanCardCtaSlot = ({
|
|
11
11
|
buttonProps
|
|
12
12
|
}) => {
|
|
13
13
|
const {
|
|
@@ -42,7 +42,7 @@ const PlanCardCtaSlot = ({
|
|
|
42
42
|
|
|
43
43
|
//#endregion
|
|
44
44
|
//#region src/components/planCard/PlanCardVariants.ts
|
|
45
|
-
|
|
45
|
+
var normalizeVariant = variantType => {
|
|
46
46
|
if (variantType === "default") return "primary";
|
|
47
47
|
if (variantType === "enterprise") return "secondary";
|
|
48
48
|
return variantType ?? "primary";
|
|
@@ -51,7 +51,7 @@ const normalizeVariant = variantType => {
|
|
|
51
51
|
* PlanCard variants follow the same pattern as `Tooltip` variants:
|
|
52
52
|
* a simple mapping from `variantType` to a small set of style tokens.
|
|
53
53
|
*/
|
|
54
|
-
|
|
54
|
+
var getPlanCardVariantStyles = variantType => {
|
|
55
55
|
const variant = normalizeVariant(variantType);
|
|
56
56
|
const variants = {
|
|
57
57
|
primary: {
|
|
@@ -74,8 +74,8 @@ const getPlanCardVariantStyles = variantType => {
|
|
|
74
74
|
|
|
75
75
|
//#endregion
|
|
76
76
|
//#region src/components/planCard/PlanCardFeaturesSlot.tsx
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
var featuresTitle = "RECURSOS";
|
|
78
|
+
var PlanCardFeaturesSlot = ({
|
|
79
79
|
features,
|
|
80
80
|
variant = "primary"
|
|
81
81
|
}) => {
|
|
@@ -136,7 +136,7 @@ const PlanCardFeaturesSlot = ({
|
|
|
136
136
|
|
|
137
137
|
//#endregion
|
|
138
138
|
//#region src/components/planCard/PlanCardHeaderSlot.tsx
|
|
139
|
-
|
|
139
|
+
var PlanCardHeaderSlot = ({
|
|
140
140
|
title,
|
|
141
141
|
subtitle,
|
|
142
142
|
hasTopTag,
|
|
@@ -175,7 +175,7 @@ const PlanCardHeaderSlot = ({
|
|
|
175
175
|
|
|
176
176
|
//#endregion
|
|
177
177
|
//#region src/components/planCard/PlanCardMetadataSlot.tsx
|
|
178
|
-
|
|
178
|
+
var PlanCardMetadataSlot = ({
|
|
179
179
|
metadata,
|
|
180
180
|
variant = "primary"
|
|
181
181
|
}) => {
|
|
@@ -248,7 +248,7 @@ const PlanCardMetadataSlot = ({
|
|
|
248
248
|
|
|
249
249
|
//#endregion
|
|
250
250
|
//#region src/components/planCard/PlanCardPriceSlot.tsx
|
|
251
|
-
|
|
251
|
+
var PlanCardPriceSlot = ({
|
|
252
252
|
price,
|
|
253
253
|
variant = "primary"
|
|
254
254
|
}) => {
|
|
@@ -294,7 +294,7 @@ const PlanCardPriceSlot = ({
|
|
|
294
294
|
|
|
295
295
|
//#endregion
|
|
296
296
|
//#region src/components/planCard/PlanCardTopTagSlot.tsx
|
|
297
|
-
|
|
297
|
+
var PlanCardTopTagSlot = ({
|
|
298
298
|
children
|
|
299
299
|
}) => {
|
|
300
300
|
return /* @__PURE__ */jsx(Box, {
|
|
@@ -307,7 +307,7 @@ const PlanCardTopTagSlot = ({
|
|
|
307
307
|
|
|
308
308
|
//#endregion
|
|
309
309
|
//#region src/components/planCard/PlanCard.tsx
|
|
310
|
-
|
|
310
|
+
var PlanCard = props => {
|
|
311
311
|
const {
|
|
312
312
|
variant = "primary",
|
|
313
313
|
topTag,
|
|
@@ -409,7 +409,7 @@ const PlanCard = props => {
|
|
|
409
409
|
* />
|
|
410
410
|
* ```
|
|
411
411
|
*/
|
|
412
|
-
|
|
412
|
+
var PlansPanel = ({
|
|
413
413
|
filters = [],
|
|
414
414
|
plans,
|
|
415
415
|
activePlanId,
|
|
@@ -505,7 +505,7 @@ const PlansPanel = ({
|
|
|
505
505
|
|
|
506
506
|
//#endregion
|
|
507
507
|
//#region src/components/subscriptionPanel/SubscriptionPanel.styles.ts
|
|
508
|
-
|
|
508
|
+
var gradientFlow = keyframes({
|
|
509
509
|
"0%": {
|
|
510
510
|
backgroundPosition: "0% 50%"
|
|
511
511
|
},
|
|
@@ -516,19 +516,19 @@ const gradientFlow = keyframes({
|
|
|
516
516
|
backgroundPosition: "0% 50%"
|
|
517
517
|
}
|
|
518
518
|
});
|
|
519
|
-
|
|
519
|
+
var getAccentGradientBackground = t => {
|
|
520
520
|
const theme = t;
|
|
521
521
|
const start = theme.colors?.action?.background?.accent?.default || theme.colors?.input?.background?.accent?.default;
|
|
522
522
|
if (!start) return void 0;
|
|
523
523
|
return `linear-gradient(270deg, ${start}, ${theme.colors?.action?.background?.accent?.active || theme.colors?.input?.background?.accent?.active || start}, ${start})`;
|
|
524
524
|
};
|
|
525
|
-
|
|
525
|
+
var getPrimaryGradientBackground = t => {
|
|
526
526
|
const theme = t;
|
|
527
527
|
const start = theme.colors?.action?.background?.primary?.default;
|
|
528
528
|
if (!start) return void 0;
|
|
529
529
|
return `linear-gradient(270deg, ${start}, ${theme.colors?.action?.background?.secondary?.default || start}, ${start})`;
|
|
530
530
|
};
|
|
531
|
-
|
|
531
|
+
var getVariantStyles = variantType => {
|
|
532
532
|
const variants = {
|
|
533
533
|
"spotlight-accent": {
|
|
534
534
|
backgroundColor: "input.background.accent.default",
|
|
@@ -563,7 +563,7 @@ const getVariantStyles = variantType => {
|
|
|
563
563
|
};
|
|
564
564
|
return variants[variantType] || variants["spotlight-accent"];
|
|
565
565
|
};
|
|
566
|
-
|
|
566
|
+
var getSubscriptionPanelAccentBarSx = (variant = "spotlight-accent") => {
|
|
567
567
|
const variantStyles = getVariantStyles(variant);
|
|
568
568
|
const isSpotlight = variant.startsWith("spotlight-");
|
|
569
569
|
const gradientBg = variant === "spotlight-accent" ? getAccentGradientBackground : getPrimaryGradientBackground;
|
|
@@ -582,14 +582,14 @@ const getSubscriptionPanelAccentBarSx = (variant = "spotlight-accent") => {
|
|
|
582
582
|
} : {})
|
|
583
583
|
};
|
|
584
584
|
};
|
|
585
|
-
|
|
585
|
+
var SubscriptionPanelAccentBarSx = getSubscriptionPanelAccentBarSx("spotlight-accent");
|
|
586
586
|
|
|
587
587
|
//#endregion
|
|
588
588
|
//#region src/components/subscriptionPanel/SubscriptionPanelActionsSlot.tsx
|
|
589
589
|
/**
|
|
590
590
|
* Renders action buttons for the subscription card.
|
|
591
591
|
*/
|
|
592
|
-
|
|
592
|
+
var SubscriptionPanelActionsSlot = ({
|
|
593
593
|
actions
|
|
594
594
|
}) => {
|
|
595
595
|
if (actions.length === 0) return null;
|
|
@@ -637,7 +637,7 @@ const SubscriptionPanelActionsSlot = ({
|
|
|
637
637
|
/**
|
|
638
638
|
* Renders a metric card based on its type.
|
|
639
639
|
*/
|
|
640
|
-
|
|
640
|
+
var renderMetricCard = params => {
|
|
641
641
|
const {
|
|
642
642
|
metric,
|
|
643
643
|
index,
|
|
@@ -686,7 +686,7 @@ const renderMetricCard = params => {
|
|
|
686
686
|
* />
|
|
687
687
|
* ```
|
|
688
688
|
*/
|
|
689
|
-
|
|
689
|
+
var SubscriptionPanel = ({
|
|
690
690
|
variant = "accent",
|
|
691
691
|
icon,
|
|
692
692
|
planName,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/react-billing",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.17",
|
|
4
4
|
"description": "Billing UI components for React apps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"React",
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@ttoss/components": "^2.14.
|
|
29
|
-
"@ttoss/react-icons": "^0.7.
|
|
30
|
-
"@ttoss/ui": "^6.9.
|
|
28
|
+
"@ttoss/components": "^2.14.25",
|
|
29
|
+
"@ttoss/react-icons": "^0.7.18",
|
|
30
|
+
"@ttoss/ui": "^6.9.24"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@jest/globals": "^29.7.0",
|
|
34
34
|
"@types/react": "^19.2.14",
|
|
35
|
-
"jest": "^30.
|
|
35
|
+
"jest": "^30.4.2",
|
|
36
36
|
"react": "^19.2.6",
|
|
37
|
-
"tsdown": "^0.22.
|
|
38
|
-
"@ttoss/test-utils": "^4.2.
|
|
39
|
-
"@ttoss/config": "^1.37.
|
|
37
|
+
"tsdown": "^0.22.2",
|
|
38
|
+
"@ttoss/test-utils": "^4.2.16",
|
|
39
|
+
"@ttoss/config": "^1.37.16"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": ">=16.8.0"
|