@designbasekorea/figma-ui 0.2.10 → 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 +4 -4
package/dist/index.js
CHANGED
|
@@ -469,10 +469,14 @@ const defaultTranslations = {
|
|
|
469
469
|
perDay: '일',
|
|
470
470
|
resetsDaily: '매일 리셋',
|
|
471
471
|
donationPrompt: '이 플러그인이 유용했나요?',
|
|
472
|
+
betaStatus: 'BETA',
|
|
472
473
|
};
|
|
473
474
|
const defaultT = (key) => defaultTranslations[key] || key;
|
|
474
475
|
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, }) => {
|
|
475
476
|
const isActive = paymentStatus === 'PAID';
|
|
477
|
+
const isBeta = paymentStatus === 'BETA';
|
|
478
|
+
const resolvedShowUsageInfo = showUsageInfo && !isLoading && !isBeta;
|
|
479
|
+
const resolvedShowPaymentBadge = showPaymentStatus && showPaymentBadge;
|
|
476
480
|
const hasChildren = React.Children.count(children) > 0;
|
|
477
481
|
const classes = clsx('designbase-figma-footer', {
|
|
478
482
|
'designbase-figma-footer--has-children': hasChildren,
|
|
@@ -483,7 +487,7 @@ const FigmaFooter = ({ onLicensePageClick, paymentStatus = 'FREE', usageCount =
|
|
|
483
487
|
React.createElement(LogoDropdown, { logoSrc: logoSrc, logoAlt: logoAlt, logoType: logoType, logoSize: logoSize, links: logoLinks, t: t }),
|
|
484
488
|
showLanguageSelector && (React.createElement(LanguageSelector, { currentLanguage: currentLanguage, languages: languages, onLanguageChange: onLanguageChange, size: "s" }))),
|
|
485
489
|
showPaymentStatus && (React.createElement("div", { className: "designbase-figma-footer__payment-states" },
|
|
486
|
-
|
|
490
|
+
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,
|
|
487
491
|
React.createElement("span", { className: "designbase-figma-footer__usage-info designbase-figma-footer__usage-info--tooltip", title: t('resetsDaily') },
|
|
488
492
|
React.createElement("span", { className: "designbase-figma-footer__usage-count" }, usageCount),
|
|
489
493
|
React.createElement("span", { className: "designbase-figma-footer__max-daily-usage" },
|
|
@@ -491,7 +495,7 @@ const FigmaFooter = ({ onLicensePageClick, paymentStatus = 'FREE', usageCount =
|
|
|
491
495
|
maxDailyUsage,
|
|
492
496
|
" ",
|
|
493
497
|
t('perDay'))))))),
|
|
494
|
-
|
|
498
|
+
resolvedShowPaymentBadge && (React.createElement(PaymentBadge, { isActive: isActive, onClick: isBeta ? undefined : onLicensePageClick, isLoading: isLoading, text: isBeta ? (t('betaStatus') || 'BETA') : undefined, t: t })))),
|
|
495
499
|
showDonation && (React.createElement("div", { className: "designbase-figma-footer__donation" },
|
|
496
500
|
React.createElement(DonationBadge, { donationUrl: donationUrl, text: donationText, iconType: "heart", size: "s", showPrompt: showDonationText && !isActive, promptText: donationPromptText, t: t })))),
|
|
497
501
|
children));
|