@designbasekorea/figma-ui 0.6.8 → 0.6.10
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 +41 -5
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.css.map +1 -1
- package/dist/index.esm.js +686 -272
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +825 -404
- 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;
|
|
@@ -230,6 +238,7 @@ interface FormWithSubmitProps {
|
|
|
230
238
|
helperText?: I18nText;
|
|
231
239
|
className?: string;
|
|
232
240
|
t?: TFunctionLite;
|
|
241
|
+
locale?: string;
|
|
233
242
|
}
|
|
234
243
|
declare const FormWithSubmit: React.FC<FormWithSubmitProps>;
|
|
235
244
|
|
|
@@ -243,6 +252,7 @@ interface InteractionFeedbackProps {
|
|
|
243
252
|
visible?: boolean;
|
|
244
253
|
className?: string;
|
|
245
254
|
t?: TFunctionLite;
|
|
255
|
+
locale?: string;
|
|
246
256
|
}
|
|
247
257
|
declare const InteractionFeedback: React.FC<InteractionFeedbackProps>;
|
|
248
258
|
|
|
@@ -264,6 +274,7 @@ interface LicenseOfferProps {
|
|
|
264
274
|
guideUrl?: string;
|
|
265
275
|
membershipUrl?: string;
|
|
266
276
|
t?: TFunctionLite;
|
|
277
|
+
locale?: string;
|
|
267
278
|
className?: string;
|
|
268
279
|
}
|
|
269
280
|
declare const LicenseOffer: React.FC<LicenseOfferProps>;
|
|
@@ -279,6 +290,7 @@ interface LicenseStatusCardProps {
|
|
|
279
290
|
validationMessage?: string;
|
|
280
291
|
allowRevealKey?: boolean;
|
|
281
292
|
t?: TFunctionLite;
|
|
293
|
+
locale?: string;
|
|
282
294
|
className?: string;
|
|
283
295
|
}
|
|
284
296
|
declare const LicenseStatusCard: React.FC<LicenseStatusCardProps>;
|
|
@@ -297,7 +309,8 @@ interface PricingComparisonProps {
|
|
|
297
309
|
features?: PricingFeature[];
|
|
298
310
|
pricing?: PlanPricing;
|
|
299
311
|
paymentType?: 'subscription' | 'lifetime';
|
|
300
|
-
t?:
|
|
312
|
+
t?: TFunctionLite;
|
|
313
|
+
locale?: string;
|
|
301
314
|
className?: string;
|
|
302
315
|
}
|
|
303
316
|
declare const PricingComparison: React.FC<PricingComparisonProps>;
|
|
@@ -334,7 +347,7 @@ interface LicensePageState {
|
|
|
334
347
|
lastVerifiedAt?: string;
|
|
335
348
|
validationMessage?: string;
|
|
336
349
|
}
|
|
337
|
-
|
|
350
|
+
|
|
338
351
|
declare const START_DESIGNBASE_AUTH_MESSAGE = "start-designbase-auth";
|
|
339
352
|
|
|
340
353
|
interface UseFigmaLicenseBridgeOptions {
|
|
@@ -352,6 +365,8 @@ declare function useFigmaLicenseBridge(options?: UseFigmaLicenseBridgeOptions):
|
|
|
352
365
|
verifyLicense: (licenseKey: string) => void;
|
|
353
366
|
deactivateLicense: () => void;
|
|
354
367
|
startDesignbaseAuth: () => void;
|
|
368
|
+
checkFeatureAccess: (featureKey?: string, amount?: number) => void;
|
|
369
|
+
consumeUsage: (amount?: number, featureKey?: string) => void;
|
|
355
370
|
setLicenseKeyInput: (licenseKey: string) => void;
|
|
356
371
|
};
|
|
357
372
|
|
|
@@ -376,6 +391,7 @@ interface PageLicenseProps {
|
|
|
376
391
|
onLicenseSubmit?: (licenseKey: string) => Promise<void> | void;
|
|
377
392
|
usageCount?: number;
|
|
378
393
|
t?: TFunctionLite;
|
|
394
|
+
locale?: string;
|
|
379
395
|
className?: string;
|
|
380
396
|
}
|
|
381
397
|
declare const PageLicense: React.FC<PageLicenseProps>;
|
|
@@ -385,7 +401,8 @@ interface PaymentBadgeProps {
|
|
|
385
401
|
onClick?: () => void;
|
|
386
402
|
isLoading?: boolean;
|
|
387
403
|
text?: string;
|
|
388
|
-
t?:
|
|
404
|
+
t?: TFunctionLite;
|
|
405
|
+
locale?: string;
|
|
389
406
|
className?: string;
|
|
390
407
|
}
|
|
391
408
|
declare const PaymentBadge: React.FC<PaymentBadgeProps>;
|
|
@@ -405,6 +422,7 @@ interface PaymentStatusSectionProps {
|
|
|
405
422
|
errorCode?: string;
|
|
406
423
|
className?: string;
|
|
407
424
|
t?: TFunctionLite;
|
|
425
|
+
locale?: string;
|
|
408
426
|
}
|
|
409
427
|
declare function resolvePaymentFeedbackVariant(errorCode?: string, explicitVariant?: PaymentActionFeedbackVariant): PaymentActionFeedbackVariant;
|
|
410
428
|
declare const PaymentStatusSection: React.FC<PaymentStatusSectionProps>;
|
|
@@ -429,6 +447,7 @@ interface ProgressModalProps {
|
|
|
429
447
|
completeIcon?: React.ReactNode;
|
|
430
448
|
className?: string;
|
|
431
449
|
t?: TFunctionLite;
|
|
450
|
+
locale?: string;
|
|
432
451
|
autoComplete?: boolean;
|
|
433
452
|
autoCloseOnComplete?: boolean;
|
|
434
453
|
}
|
|
@@ -469,6 +488,7 @@ interface SettingsModalProps {
|
|
|
469
488
|
description?: I18nText;
|
|
470
489
|
className?: string;
|
|
471
490
|
t?: TFunctionLite;
|
|
491
|
+
locale?: string;
|
|
472
492
|
}
|
|
473
493
|
declare const SettingsModal: React.FC<SettingsModalProps>;
|
|
474
494
|
|
|
@@ -481,6 +501,7 @@ interface TitleDescriptionProps {
|
|
|
481
501
|
features?: I18nText[];
|
|
482
502
|
className?: string;
|
|
483
503
|
t?: TFunctionLite;
|
|
504
|
+
locale?: string;
|
|
484
505
|
}
|
|
485
506
|
declare const TitleDescription: React.FC<TitleDescriptionProps>;
|
|
486
507
|
|
|
@@ -498,6 +519,7 @@ interface UpgradeBannerProps {
|
|
|
498
519
|
gradientAnimated?: boolean;
|
|
499
520
|
className?: string;
|
|
500
521
|
t?: TFunctionLite;
|
|
522
|
+
locale?: string;
|
|
501
523
|
}
|
|
502
524
|
declare const UpgradeBanner: React.FC<UpgradeBannerProps>;
|
|
503
525
|
|
|
@@ -511,9 +533,23 @@ interface UsageStatusPopoverProps {
|
|
|
511
533
|
isLoading?: boolean;
|
|
512
534
|
onLicensePageClick?: () => void;
|
|
513
535
|
t?: TFunctionLite;
|
|
536
|
+
locale?: string;
|
|
514
537
|
className?: string;
|
|
515
538
|
}
|
|
516
539
|
declare const UsageStatusPopover: React.FC<UsageStatusPopoverProps>;
|
|
517
540
|
|
|
518
|
-
|
|
519
|
-
|
|
541
|
+
interface FigmaUiI18nContextValue {
|
|
542
|
+
locale: FigmaUiLocale;
|
|
543
|
+
t: TFunctionLite;
|
|
544
|
+
parentT?: TFunctionLite;
|
|
545
|
+
}
|
|
546
|
+
interface FigmaUiI18nProviderProps {
|
|
547
|
+
locale?: string;
|
|
548
|
+
t?: TFunctionLite;
|
|
549
|
+
children?: React.ReactNode;
|
|
550
|
+
}
|
|
551
|
+
declare const FigmaUiI18nProvider: React.FC<FigmaUiI18nProviderProps>;
|
|
552
|
+
declare function useFigmaUiI18n(localeOverride?: string, tOverride?: TFunctionLite): FigmaUiI18nContextValue;
|
|
553
|
+
|
|
554
|
+
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 };
|
|
555
|
+
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 };
|