@designbasekorea/figma-ui 0.6.9 → 0.7.0
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/README.md +14 -2
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +53 -6
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.css.map +1 -1
- package/dist/index.esm.js +819 -295
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +959 -428
- package/dist/index.js.map +1 -1
- package/package.json +9 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PaymentStatus, UsageResetPeriod, LicenseManagerMessageTypes } from '@designbasekorea/figma-license-core';
|
|
3
|
+
export { DEFAULT_LICENSE_MESSAGE_TYPES } from '@designbasekorea/figma-license-core';
|
|
3
4
|
import { GradientScheme, GradientTone } from '@designbasekorea/ui-wc/react';
|
|
4
5
|
export * from '@designbasekorea/ui-wc/react';
|
|
5
6
|
export { Accordion, ActivityHeatmap, AdBanner, AiChat, AiChatList, Alert, AnimationBackground, AnimationText, AppBadge, AudioPlayer, Avatar, Backdrop, Badge, Banner, BottomNavigation, BottomSheet, Breadcrumbs, Button, Calendar, Card, Carousel, ChatComposer, ChatList, ChatMessage, ChatOrb, ChatRoom, ChatSuggestions, ChatTyping, ChatWelcome, ChatWidget, Checkbox, Chip, CodeBlock, ColorPicker, ColorSwatch, Confirm, Container, ContextMenu, CookieBanner, Countdown, CursorFollower, DatePicker, Divider, DownloadProgress, Drawer, Dropdown, Dropzone, EmailVerify, EmptyState, FileUploader, FloatingActionButton, Footer, Form, Gantt, Gradient, Grid, GridBackground, GridItem, Image, ImageList, ImagePlaceholder, Indicator, Input, Kanban, Label, Lightbox, List, Logo, MarkdownEditor, Marquee, Masonry, MenuItem, Modal, ModalBody, ModalFooter, ModalHeader, Navbar, OnboardingModal, OtpInput, PageHeader, Pagination, PhoneVerify, Popover, Progress, ProgressStep, Progressbar, Radio, RandomGradient, RangeSlider, Rating, Reorder, ResizablePanels, ScrollArea, SearchBar, Section, SectionAppDownload, SectionContact, SectionCta, SectionFaq, SectionFeature, SectionFeatureGrid, SectionHero, SectionLogoCloud, SectionPricing, SectionStats, SectionTestimonials, SegmentControl, Select, Share, Sidebar, Signature, Skeleton, Spinner, SplitView, Stack, Stat, Stepper, Table, Tabs, Testimonial, Textarea, TimePicker, Timeline, Toast, Toggle, Toolbar, Tooltip, TopBanner, Tutorial, TwoFactor, VideoPlayer, YouTubePlayer, useContextMenu } from '@designbasekorea/ui-wc/react';
|
|
@@ -9,6 +10,10 @@ type I18nText = string | {
|
|
|
9
10
|
values?: Record<string, any>;
|
|
10
11
|
};
|
|
11
12
|
type TFunctionLite = (key: string, values?: Record<string, any>) => string;
|
|
13
|
+
type FigmaUiLocale = 'ko' | 'en' | 'ja';
|
|
14
|
+
declare const FIGMA_UI_TRANSLATIONS: Record<FigmaUiLocale, Readonly<Record<string, string>>>;
|
|
15
|
+
declare function normalizeFigmaUiLocale(locale?: string): FigmaUiLocale;
|
|
16
|
+
declare function createFigmaUiTranslator(locale?: string | undefined, parentT?: TFunctionLite): TFunctionLite;
|
|
12
17
|
declare function interpolateText(template: string, values?: Record<string, unknown>): string;
|
|
13
18
|
declare function resolveText(t: TFunctionLite | undefined, input: I18nText | undefined, fallback?: string): string | undefined;
|
|
14
19
|
|
|
@@ -26,6 +31,7 @@ interface DonationBadgeProps {
|
|
|
26
31
|
className?: string;
|
|
27
32
|
onClick?: () => void;
|
|
28
33
|
t?: TFunctionLite;
|
|
34
|
+
locale?: string;
|
|
29
35
|
}
|
|
30
36
|
declare const DonationBadge: React.FC<DonationBadgeProps>;
|
|
31
37
|
|
|
@@ -75,6 +81,7 @@ interface FigmaPageHeadProps {
|
|
|
75
81
|
moreActions?: FigmaPageHeadAction[];
|
|
76
82
|
className?: string;
|
|
77
83
|
t?: TFunctionLite;
|
|
84
|
+
locale?: string;
|
|
78
85
|
}
|
|
79
86
|
declare const FigmaPageHead: React.FC<FigmaPageHeadProps>;
|
|
80
87
|
|
|
@@ -91,6 +98,7 @@ interface FigmaSectionProps {
|
|
|
91
98
|
headerHeight?: number;
|
|
92
99
|
onActiveSectionChange?: (category: string) => void;
|
|
93
100
|
t?: TFunctionLite;
|
|
101
|
+
locale?: string;
|
|
94
102
|
collapsible?: boolean;
|
|
95
103
|
defaultCollapsed?: boolean;
|
|
96
104
|
onCollapseChange?: (collapsed: boolean, category: string) => void;
|
|
@@ -154,10 +162,20 @@ interface FigmaFooterProps {
|
|
|
154
162
|
onLicensePageClick?: () => void;
|
|
155
163
|
paymentStatus?: 'PAID' | 'FREE' | 'TRIAL' | 'BETA';
|
|
156
164
|
usageCount?: number;
|
|
165
|
+
remainingUsage?: number;
|
|
166
|
+
listenForUsageMessages?: boolean;
|
|
157
167
|
isLoading?: boolean;
|
|
158
168
|
showPaymentStatus?: boolean;
|
|
159
169
|
showUsageInfo?: boolean;
|
|
160
170
|
maxDailyUsage?: number;
|
|
171
|
+
showLowUsageWarning?: boolean;
|
|
172
|
+
lowUsageThresholdPercent?: number;
|
|
173
|
+
lowUsageWarningText?: I18nText;
|
|
174
|
+
onLowUsageWarning?: (details: {
|
|
175
|
+
remaining: number;
|
|
176
|
+
percent: number;
|
|
177
|
+
limit: number;
|
|
178
|
+
}) => void;
|
|
161
179
|
showPaymentBadge?: boolean;
|
|
162
180
|
showDonation?: boolean;
|
|
163
181
|
donationUrl?: string;
|
|
@@ -213,7 +231,7 @@ interface FigmaToastProps {
|
|
|
213
231
|
}
|
|
214
232
|
declare const FigmaToast: React.FC<FigmaToastProps>;
|
|
215
233
|
declare const useFigmaToast: () => {
|
|
216
|
-
showToast: (message: string,
|
|
234
|
+
showToast: (message: string, type?: ToastStatus) => void;
|
|
217
235
|
toastComponent: React.JSX.Element | null;
|
|
218
236
|
};
|
|
219
237
|
|
|
@@ -230,6 +248,7 @@ interface FormWithSubmitProps {
|
|
|
230
248
|
helperText?: I18nText;
|
|
231
249
|
className?: string;
|
|
232
250
|
t?: TFunctionLite;
|
|
251
|
+
locale?: string;
|
|
233
252
|
}
|
|
234
253
|
declare const FormWithSubmit: React.FC<FormWithSubmitProps>;
|
|
235
254
|
|
|
@@ -243,6 +262,7 @@ interface InteractionFeedbackProps {
|
|
|
243
262
|
visible?: boolean;
|
|
244
263
|
className?: string;
|
|
245
264
|
t?: TFunctionLite;
|
|
265
|
+
locale?: string;
|
|
246
266
|
}
|
|
247
267
|
declare const InteractionFeedback: React.FC<InteractionFeedbackProps>;
|
|
248
268
|
|
|
@@ -264,6 +284,7 @@ interface LicenseOfferProps {
|
|
|
264
284
|
guideUrl?: string;
|
|
265
285
|
membershipUrl?: string;
|
|
266
286
|
t?: TFunctionLite;
|
|
287
|
+
locale?: string;
|
|
267
288
|
className?: string;
|
|
268
289
|
}
|
|
269
290
|
declare const LicenseOffer: React.FC<LicenseOfferProps>;
|
|
@@ -279,6 +300,7 @@ interface LicenseStatusCardProps {
|
|
|
279
300
|
validationMessage?: string;
|
|
280
301
|
allowRevealKey?: boolean;
|
|
281
302
|
t?: TFunctionLite;
|
|
303
|
+
locale?: string;
|
|
282
304
|
className?: string;
|
|
283
305
|
}
|
|
284
306
|
declare const LicenseStatusCard: React.FC<LicenseStatusCardProps>;
|
|
@@ -297,7 +319,8 @@ interface PricingComparisonProps {
|
|
|
297
319
|
features?: PricingFeature[];
|
|
298
320
|
pricing?: PlanPricing;
|
|
299
321
|
paymentType?: 'subscription' | 'lifetime';
|
|
300
|
-
t?:
|
|
322
|
+
t?: TFunctionLite;
|
|
323
|
+
locale?: string;
|
|
301
324
|
className?: string;
|
|
302
325
|
}
|
|
303
326
|
declare const PricingComparison: React.FC<PricingComparisonProps>;
|
|
@@ -334,7 +357,7 @@ interface LicensePageState {
|
|
|
334
357
|
lastVerifiedAt?: string;
|
|
335
358
|
validationMessage?: string;
|
|
336
359
|
}
|
|
337
|
-
|
|
360
|
+
|
|
338
361
|
declare const START_DESIGNBASE_AUTH_MESSAGE = "start-designbase-auth";
|
|
339
362
|
|
|
340
363
|
interface UseFigmaLicenseBridgeOptions {
|
|
@@ -352,6 +375,8 @@ declare function useFigmaLicenseBridge(options?: UseFigmaLicenseBridgeOptions):
|
|
|
352
375
|
verifyLicense: (licenseKey: string) => void;
|
|
353
376
|
deactivateLicense: () => void;
|
|
354
377
|
startDesignbaseAuth: () => void;
|
|
378
|
+
checkFeatureAccess: (featureKey?: string, amount?: number) => void;
|
|
379
|
+
consumeUsage: (amount?: number, featureKey?: string) => void;
|
|
355
380
|
setLicenseKeyInput: (licenseKey: string) => void;
|
|
356
381
|
};
|
|
357
382
|
|
|
@@ -376,6 +401,7 @@ interface PageLicenseProps {
|
|
|
376
401
|
onLicenseSubmit?: (licenseKey: string) => Promise<void> | void;
|
|
377
402
|
usageCount?: number;
|
|
378
403
|
t?: TFunctionLite;
|
|
404
|
+
locale?: string;
|
|
379
405
|
className?: string;
|
|
380
406
|
}
|
|
381
407
|
declare const PageLicense: React.FC<PageLicenseProps>;
|
|
@@ -385,7 +411,8 @@ interface PaymentBadgeProps {
|
|
|
385
411
|
onClick?: () => void;
|
|
386
412
|
isLoading?: boolean;
|
|
387
413
|
text?: string;
|
|
388
|
-
t?:
|
|
414
|
+
t?: TFunctionLite;
|
|
415
|
+
locale?: string;
|
|
389
416
|
className?: string;
|
|
390
417
|
}
|
|
391
418
|
declare const PaymentBadge: React.FC<PaymentBadgeProps>;
|
|
@@ -405,6 +432,7 @@ interface PaymentStatusSectionProps {
|
|
|
405
432
|
errorCode?: string;
|
|
406
433
|
className?: string;
|
|
407
434
|
t?: TFunctionLite;
|
|
435
|
+
locale?: string;
|
|
408
436
|
}
|
|
409
437
|
declare function resolvePaymentFeedbackVariant(errorCode?: string, explicitVariant?: PaymentActionFeedbackVariant): PaymentActionFeedbackVariant;
|
|
410
438
|
declare const PaymentStatusSection: React.FC<PaymentStatusSectionProps>;
|
|
@@ -429,6 +457,7 @@ interface ProgressModalProps {
|
|
|
429
457
|
completeIcon?: React.ReactNode;
|
|
430
458
|
className?: string;
|
|
431
459
|
t?: TFunctionLite;
|
|
460
|
+
locale?: string;
|
|
432
461
|
autoComplete?: boolean;
|
|
433
462
|
autoCloseOnComplete?: boolean;
|
|
434
463
|
}
|
|
@@ -469,6 +498,7 @@ interface SettingsModalProps {
|
|
|
469
498
|
description?: I18nText;
|
|
470
499
|
className?: string;
|
|
471
500
|
t?: TFunctionLite;
|
|
501
|
+
locale?: string;
|
|
472
502
|
}
|
|
473
503
|
declare const SettingsModal: React.FC<SettingsModalProps>;
|
|
474
504
|
|
|
@@ -481,6 +511,7 @@ interface TitleDescriptionProps {
|
|
|
481
511
|
features?: I18nText[];
|
|
482
512
|
className?: string;
|
|
483
513
|
t?: TFunctionLite;
|
|
514
|
+
locale?: string;
|
|
484
515
|
}
|
|
485
516
|
declare const TitleDescription: React.FC<TitleDescriptionProps>;
|
|
486
517
|
|
|
@@ -498,6 +529,7 @@ interface UpgradeBannerProps {
|
|
|
498
529
|
gradientAnimated?: boolean;
|
|
499
530
|
className?: string;
|
|
500
531
|
t?: TFunctionLite;
|
|
532
|
+
locale?: string;
|
|
501
533
|
}
|
|
502
534
|
declare const UpgradeBanner: React.FC<UpgradeBannerProps>;
|
|
503
535
|
|
|
@@ -505,15 +537,30 @@ type UsagePaymentStatus = 'PAID' | 'FREE' | 'TRIAL' | 'BETA';
|
|
|
505
537
|
interface UsageStatusPopoverProps {
|
|
506
538
|
paymentStatus: UsagePaymentStatus;
|
|
507
539
|
usageCount?: number;
|
|
540
|
+
remainingUsage?: number;
|
|
508
541
|
maxDailyUsage?: number;
|
|
509
542
|
showUsage?: boolean;
|
|
510
543
|
showPlan?: boolean;
|
|
511
544
|
isLoading?: boolean;
|
|
512
545
|
onLicensePageClick?: () => void;
|
|
513
546
|
t?: TFunctionLite;
|
|
547
|
+
locale?: string;
|
|
514
548
|
className?: string;
|
|
515
549
|
}
|
|
516
550
|
declare const UsageStatusPopover: React.FC<UsageStatusPopoverProps>;
|
|
517
551
|
|
|
518
|
-
|
|
519
|
-
|
|
552
|
+
interface FigmaUiI18nContextValue {
|
|
553
|
+
locale: FigmaUiLocale;
|
|
554
|
+
t: TFunctionLite;
|
|
555
|
+
parentT?: TFunctionLite;
|
|
556
|
+
}
|
|
557
|
+
interface FigmaUiI18nProviderProps {
|
|
558
|
+
locale?: string;
|
|
559
|
+
t?: TFunctionLite;
|
|
560
|
+
children?: React.ReactNode;
|
|
561
|
+
}
|
|
562
|
+
declare const FigmaUiI18nProvider: React.FC<FigmaUiI18nProviderProps>;
|
|
563
|
+
declare function useFigmaUiI18n(localeOverride?: string, tOverride?: TFunctionLite): FigmaUiI18nContextValue;
|
|
564
|
+
|
|
565
|
+
export { DonationBadge, FIGMA_UI_TRANSLATIONS, FigmaContainer, FigmaFooter, FigmaHeader, FigmaPageHead, FigmaSection, FigmaSidebar, FigmaToast, FigmaToastProvider, FigmaUiI18nProvider, FormWithSubmit, InteractionFeedback, LanguageSelector, LanguageSettingsModal, LicenseOffer, LicenseStatusCard, LogoDropdown, PageLicense, PaymentBadge, PaymentStatusSection, PricingComparison, ProgressModal, ResizablePlugin, START_DESIGNBASE_AUTH_MESSAGE, SettingsModal, TitleDescription, UpgradeBanner, UsageStatusPopover, createFigmaUiTranslator, getActiveSection, interpolateText, normalizeFigmaUiLocale, resolvePaymentFeedbackVariant, resolveText, scrollToSection, useFigmaLicenseBridge, useFigmaToast, useFigmaUiI18n, useToast };
|
|
566
|
+
export type { DonationBadgeProps, FeedbackStatus, FigmaContainerProps, FigmaContainerSize, FigmaFooterProps, FigmaHeaderAction, FigmaHeaderProps, FigmaPageHeadAction, FigmaPageHeadProps, FigmaSectionProps, FigmaSidebarProps, FigmaUiI18nContextValue, FigmaUiI18nProviderProps, FigmaUiLocale, FormWithSubmitProps, I18nText, InteractionFeedbackProps, Language, LanguageSelectorProps, LanguageSettingsModalProps, LicenseOfferProps, LicensePageState, LicenseStatusCardProps, LogoDropdownLink, LogoDropdownProps, PageLicenseProps, PaymentActionFeedbackVariant, PaymentBadgeProps, PaymentStatusSectionProps, PlanPricing, PricingComparisonProps, PricingFeature, ProgressModalProgress, ProgressModalProps, ResizablePluginProps, SettingsCategory, SettingsCategoryGroup, SettingsModalProps, TFunctionLite, TitleDescriptionProps, UpgradeBannerProps, UsagePaymentStatus, UsageStatusPopoverProps, WordPressLinks };
|