@designbasekorea/figma-ui 0.2.11 → 0.2.12
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.d.ts +1 -1
- package/dist/index.esm.js +6 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -139,7 +139,7 @@ declare const LogoDropdown: React.FC<LogoDropdownProps>;
|
|
|
139
139
|
|
|
140
140
|
interface FigmaFooterProps {
|
|
141
141
|
onLicensePageClick?: () => void;
|
|
142
|
-
paymentStatus?: 'PAID' | 'FREE' | 'TRIAL';
|
|
142
|
+
paymentStatus?: 'PAID' | 'FREE' | 'TRIAL' | 'BETA';
|
|
143
143
|
usageCount?: number;
|
|
144
144
|
isLoading?: boolean;
|
|
145
145
|
showUsageInfo?: boolean;
|
package/dist/index.esm.js
CHANGED
|
@@ -468,10 +468,14 @@ const defaultTranslations = {
|
|
|
468
468
|
perDay: '일',
|
|
469
469
|
resetsDaily: '매일 리셋',
|
|
470
470
|
donationPrompt: '이 플러그인이 유용했나요?',
|
|
471
|
+
betaStatus: 'BETA',
|
|
471
472
|
};
|
|
472
473
|
const defaultT = (key) => defaultTranslations[key] || key;
|
|
473
474
|
const FigmaFooter = ({ onLicensePageClick, paymentStatus = 'FREE', usageCount = 0, isLoading = false, showPaymentStatus = true, showUsageInfo = true, maxDailyUsage = 20, showPaymentBadge = true, showDonation = true, donationUrl = 'https://buymeacoffee.com/designbase', donationText = 'Buy me a coffee', showDonationText = true, donationPromptText, showLanguageSelector = false, currentLanguage = 'ko', languages, onLanguageChange, logoSrc, logoAlt = 'DesignBase', logoType = 'designbase', logoSize = 'xs', logoLinks, className, t = defaultT, children, }) => {
|
|
474
475
|
const isActive = paymentStatus === 'PAID';
|
|
476
|
+
const isBeta = paymentStatus === 'BETA';
|
|
477
|
+
const resolvedShowUsageInfo = showUsageInfo && !isLoading && !isBeta;
|
|
478
|
+
const resolvedShowPaymentBadge = showPaymentStatus && showPaymentBadge;
|
|
475
479
|
const hasChildren = React.Children.count(children) > 0;
|
|
476
480
|
const classes = clsx('designbase-figma-footer', {
|
|
477
481
|
'designbase-figma-footer--has-children': hasChildren,
|
|
@@ -482,7 +486,7 @@ const FigmaFooter = ({ onLicensePageClick, paymentStatus = 'FREE', usageCount =
|
|
|
482
486
|
React.createElement(LogoDropdown, { logoSrc: logoSrc, logoAlt: logoAlt, logoType: logoType, logoSize: logoSize, links: logoLinks, t: t }),
|
|
483
487
|
showLanguageSelector && (React.createElement(LanguageSelector, { currentLanguage: currentLanguage, languages: languages, onLanguageChange: onLanguageChange, size: "s" }))),
|
|
484
488
|
showPaymentStatus && (React.createElement("div", { className: "designbase-figma-footer__payment-states" },
|
|
485
|
-
|
|
489
|
+
resolvedShowUsageInfo && (React.createElement("div", { className: "designbase-figma-footer__usage-info" }, isActive ? (React.createElement("span", { className: "designbase-figma-footer__unlimited-usage designbase-figma-footer__unlimited-usage--tooltip", title: t('unlimitedUsageTooltip') }, t('unlimitedUsage'))) : (React.createElement(React.Fragment, null,
|
|
486
490
|
React.createElement("span", { className: "designbase-figma-footer__usage-info designbase-figma-footer__usage-info--tooltip", title: t('resetsDaily') },
|
|
487
491
|
React.createElement("span", { className: "designbase-figma-footer__usage-count" }, usageCount),
|
|
488
492
|
React.createElement("span", { className: "designbase-figma-footer__max-daily-usage" },
|
|
@@ -490,7 +494,7 @@ const FigmaFooter = ({ onLicensePageClick, paymentStatus = 'FREE', usageCount =
|
|
|
490
494
|
maxDailyUsage,
|
|
491
495
|
" ",
|
|
492
496
|
t('perDay'))))))),
|
|
493
|
-
|
|
497
|
+
resolvedShowPaymentBadge && (React.createElement(PaymentBadge, { isActive: isActive, onClick: isBeta ? undefined : onLicensePageClick, isLoading: isLoading, text: isBeta ? (t('betaStatus') || 'BETA') : undefined, t: t })))),
|
|
494
498
|
showDonation && (React.createElement("div", { className: "designbase-figma-footer__donation" },
|
|
495
499
|
React.createElement(DonationBadge, { donationUrl: donationUrl, text: donationText, iconType: "heart", size: "s", showPrompt: showDonationText && !isActive, promptText: donationPromptText, t: t })))),
|
|
496
500
|
children));
|