@designbasekorea/figma-ui 0.6.3 → 0.6.6
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 +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +115 -14
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.css.map +1 -1
- package/dist/index.esm.js +427 -132
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +978 -147
- package/dist/index.js.map +1 -1
- package/package.json +26 -19
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { PaymentStatus, UsageResetPeriod, LicenseManagerMessageTypes } from '@designbasekorea/figma-license-core';
|
|
3
|
+
import { GradientScheme, GradientTone } from '@designbasekorea/ui-wc/react';
|
|
4
|
+
export * from '@designbasekorea/ui-wc/react';
|
|
5
|
+
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';
|
|
4
6
|
|
|
5
7
|
type I18nText = string | {
|
|
6
8
|
key: string;
|
|
@@ -16,6 +18,7 @@ interface DonationBadgeProps {
|
|
|
16
18
|
size?: 's' | 'm' | 'l';
|
|
17
19
|
variant?: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'ghost';
|
|
18
20
|
fullWidth?: boolean;
|
|
21
|
+
iconOnly?: boolean;
|
|
19
22
|
disabled?: boolean;
|
|
20
23
|
showPrompt?: boolean;
|
|
21
24
|
promptText?: I18nText;
|
|
@@ -43,9 +46,14 @@ interface FigmaContainerProps {
|
|
|
43
46
|
}
|
|
44
47
|
declare const FigmaContainer: React.FC<FigmaContainerProps>;
|
|
45
48
|
|
|
49
|
+
interface FigmaHeaderAction {
|
|
50
|
+
startIcon: string;
|
|
51
|
+
ariaLabel: string;
|
|
52
|
+
onPress?: () => void;
|
|
53
|
+
}
|
|
46
54
|
interface FigmaHeaderProps {
|
|
47
55
|
children?: React.ReactNode;
|
|
48
|
-
actions?:
|
|
56
|
+
actions?: FigmaHeaderAction[];
|
|
49
57
|
searchBar?: React.ReactNode;
|
|
50
58
|
sticky?: boolean;
|
|
51
59
|
className?: string;
|
|
@@ -142,6 +150,7 @@ interface FigmaFooterProps {
|
|
|
142
150
|
paymentStatus?: 'PAID' | 'FREE' | 'TRIAL' | 'BETA';
|
|
143
151
|
usageCount?: number;
|
|
144
152
|
isLoading?: boolean;
|
|
153
|
+
showPaymentStatus?: boolean;
|
|
145
154
|
showUsageInfo?: boolean;
|
|
146
155
|
maxDailyUsage?: number;
|
|
147
156
|
showPaymentBadge?: boolean;
|
|
@@ -165,6 +174,18 @@ interface FigmaFooterProps {
|
|
|
165
174
|
}
|
|
166
175
|
declare const FigmaFooter: React.FC<FigmaFooterProps>;
|
|
167
176
|
|
|
177
|
+
type ToastStatus = 'info' | 'success' | 'warning' | 'error';
|
|
178
|
+
interface ToastItem {
|
|
179
|
+
id: string;
|
|
180
|
+
createdAt: number;
|
|
181
|
+
title?: string;
|
|
182
|
+
description?: string;
|
|
183
|
+
status?: ToastStatus;
|
|
184
|
+
duration?: number;
|
|
185
|
+
showProgress?: boolean;
|
|
186
|
+
showCloseButton?: boolean;
|
|
187
|
+
}
|
|
188
|
+
type ToastPosition = 'top-right' | 'top-center' | 'bottom-center' | 'bottom-right';
|
|
168
189
|
interface ToastContextType {
|
|
169
190
|
addToast: (toast: Omit<ToastItem, 'id' | 'createdAt'>) => void;
|
|
170
191
|
removeToast: (id: string) => void;
|
|
@@ -173,7 +194,7 @@ interface ToastContextType {
|
|
|
173
194
|
declare const useToast: () => ToastContextType;
|
|
174
195
|
interface FigmaToastProviderProps {
|
|
175
196
|
children: React.ReactNode;
|
|
176
|
-
position?:
|
|
197
|
+
position?: ToastPosition;
|
|
177
198
|
maxToasts?: number;
|
|
178
199
|
}
|
|
179
200
|
declare const FigmaToastProvider: React.FC<FigmaToastProviderProps>;
|
|
@@ -181,13 +202,13 @@ interface FigmaToastProps {
|
|
|
181
202
|
message: string;
|
|
182
203
|
isVisible: boolean;
|
|
183
204
|
onClose: () => void;
|
|
184
|
-
type?:
|
|
205
|
+
type?: ToastStatus;
|
|
185
206
|
duration?: number;
|
|
186
207
|
className?: string;
|
|
187
208
|
}
|
|
188
209
|
declare const FigmaToast: React.FC<FigmaToastProps>;
|
|
189
210
|
declare const useFigmaToast: () => {
|
|
190
|
-
showToast: (message: string,
|
|
211
|
+
showToast: (message: string, _type?: ToastStatus) => void;
|
|
191
212
|
toastComponent: React.JSX.Element | null;
|
|
192
213
|
};
|
|
193
214
|
|
|
@@ -220,6 +241,28 @@ interface InteractionFeedbackProps {
|
|
|
220
241
|
}
|
|
221
242
|
declare const InteractionFeedback: React.FC<InteractionFeedbackProps>;
|
|
222
243
|
|
|
244
|
+
interface LicenseOfferProps {
|
|
245
|
+
membershipUrl?: string;
|
|
246
|
+
t?: TFunctionLite;
|
|
247
|
+
className?: string;
|
|
248
|
+
}
|
|
249
|
+
declare const LicenseOffer: React.FC<LicenseOfferProps>;
|
|
250
|
+
|
|
251
|
+
interface LicenseStatusCardProps {
|
|
252
|
+
status: PaymentStatus;
|
|
253
|
+
licenseKey?: string;
|
|
254
|
+
licenseStatus?: string;
|
|
255
|
+
licenseSource?: string;
|
|
256
|
+
accessScope?: string;
|
|
257
|
+
expiresAt?: string;
|
|
258
|
+
lastVerifiedAt?: string;
|
|
259
|
+
validationMessage?: string;
|
|
260
|
+
allowRevealKey?: boolean;
|
|
261
|
+
t?: TFunctionLite;
|
|
262
|
+
className?: string;
|
|
263
|
+
}
|
|
264
|
+
declare const LicenseStatusCard: React.FC<LicenseStatusCardProps>;
|
|
265
|
+
|
|
223
266
|
interface PricingFeature {
|
|
224
267
|
name: string;
|
|
225
268
|
free: string | boolean;
|
|
@@ -239,19 +282,77 @@ interface PricingComparisonProps {
|
|
|
239
282
|
}
|
|
240
283
|
declare const PricingComparison: React.FC<PricingComparisonProps>;
|
|
241
284
|
|
|
285
|
+
interface WordPressLinks {
|
|
286
|
+
membershipUrl?: string;
|
|
287
|
+
purchaseUrl?: string;
|
|
288
|
+
accountUrl?: string;
|
|
289
|
+
helpUrl?: string;
|
|
290
|
+
}
|
|
291
|
+
interface LicensePageState {
|
|
292
|
+
paymentStatus: PaymentStatus;
|
|
293
|
+
licenseKey: string;
|
|
294
|
+
planTier: string;
|
|
295
|
+
hasLicenseKey: boolean;
|
|
296
|
+
isLicenseRegistered: boolean;
|
|
297
|
+
activationLimit: number;
|
|
298
|
+
activationUsage: number;
|
|
299
|
+
usageCount: number;
|
|
300
|
+
remainingUsage: number;
|
|
301
|
+
usageUsed: number;
|
|
302
|
+
usageLimit: number | 'unlimited';
|
|
303
|
+
usageReset: UsageResetPeriod;
|
|
304
|
+
canUseFeature: boolean;
|
|
305
|
+
usageReason?: 'USAGE_LIMIT_REACHED' | 'FEATURE_NOT_ALLOWED';
|
|
306
|
+
lastMessage?: string;
|
|
307
|
+
lastErrorCode?: string;
|
|
308
|
+
licenseStatus?: string;
|
|
309
|
+
licenseSource?: string;
|
|
310
|
+
accessScope?: string;
|
|
311
|
+
expiresAt?: string;
|
|
312
|
+
lastVerifiedAt?: string;
|
|
313
|
+
validationMessage?: string;
|
|
314
|
+
}
|
|
315
|
+
declare const DEFAULT_LICENSE_MESSAGE_TYPES: LicenseManagerMessageTypes;
|
|
316
|
+
declare const START_DESIGNBASE_AUTH_MESSAGE = "start-designbase-auth";
|
|
317
|
+
|
|
318
|
+
interface UseFigmaLicenseBridgeOptions {
|
|
319
|
+
messageTypes?: Partial<LicenseManagerMessageTypes>;
|
|
320
|
+
initialState?: Partial<LicensePageState>;
|
|
321
|
+
onStateChange?: (state: LicensePageState) => void;
|
|
322
|
+
onPaymentStatusChange?: (status: PaymentStatus) => void;
|
|
323
|
+
onUsageCountChange?: (count: number) => void;
|
|
324
|
+
}
|
|
325
|
+
declare function useFigmaLicenseBridge(options?: UseFigmaLicenseBridgeOptions): {
|
|
326
|
+
state: LicensePageState;
|
|
327
|
+
isVerifying: boolean;
|
|
328
|
+
isDeactivating: boolean;
|
|
329
|
+
isStartingAuth: boolean;
|
|
330
|
+
verifyLicense: (licenseKey: string) => void;
|
|
331
|
+
deactivateLicense: () => void;
|
|
332
|
+
startDesignbaseAuth: () => void;
|
|
333
|
+
setLicenseKeyInput: (licenseKey: string) => void;
|
|
334
|
+
};
|
|
335
|
+
|
|
242
336
|
interface PageLicenseProps {
|
|
243
|
-
status:
|
|
337
|
+
status: PaymentStatus;
|
|
244
338
|
onClose: () => void;
|
|
245
|
-
usageCount?: number;
|
|
246
|
-
onLicenseSubmit: (licenseKey: string) => Promise<void> | void;
|
|
247
339
|
licenseKey?: string;
|
|
248
|
-
|
|
249
|
-
setUsageCount: (count: number) => void;
|
|
250
|
-
setShowLicensePage: (show: boolean) => void;
|
|
340
|
+
wordpressLinks?: WordPressLinks;
|
|
251
341
|
paymentPageUrl?: string;
|
|
342
|
+
mode?: 'pricing' | 'youtube-membership';
|
|
343
|
+
membershipUrl?: string;
|
|
344
|
+
enableAccountAuth?: boolean;
|
|
345
|
+
showLicenseKeyInput?: boolean;
|
|
252
346
|
pricingFeatures?: PricingFeature[];
|
|
253
347
|
pricing?: PlanPricing;
|
|
254
348
|
paymentType?: 'subscription' | 'lifetime';
|
|
349
|
+
messageTypes?: Partial<LicenseManagerMessageTypes>;
|
|
350
|
+
onStateChange?: (state: LicensePageState) => void;
|
|
351
|
+
setPaymentStatus?: (status: PaymentStatus) => void;
|
|
352
|
+
setUsageCount?: (count: number) => void;
|
|
353
|
+
setShowLicensePage?: (show: boolean) => void;
|
|
354
|
+
onLicenseSubmit?: (licenseKey: string) => Promise<void> | void;
|
|
355
|
+
usageCount?: number;
|
|
255
356
|
t?: TFunctionLite;
|
|
256
357
|
className?: string;
|
|
257
358
|
}
|
|
@@ -373,5 +474,5 @@ interface UpgradeBannerProps {
|
|
|
373
474
|
}
|
|
374
475
|
declare const UpgradeBanner: React.FC<UpgradeBannerProps>;
|
|
375
476
|
|
|
376
|
-
export { DonationBadge, FigmaContainer, FigmaFooter, FigmaHeader, FigmaPageHead, FigmaSection, FigmaSidebar, FigmaToast, FigmaToastProvider, FormWithSubmit, InteractionFeedback, LanguageSelector, LogoDropdown, PageLicense, PaymentBadge, PaymentStatusSection, PricingComparison, ProgressModal, ResizablePlugin, SettingsModal, TitleDescription, UpgradeBanner, getActiveSection, resolveText, scrollToSection, useFigmaToast, useToast };
|
|
377
|
-
export type { DonationBadgeProps, FeedbackStatus, FigmaContainerProps, FigmaContainerSize, FigmaFooterProps, FigmaHeaderProps, FigmaPageHeadAction, FigmaPageHeadProps, FigmaSectionProps, FigmaSidebarProps, FormWithSubmitProps, I18nText, InteractionFeedbackProps, Language, LanguageSelectorProps, LogoDropdownLink, LogoDropdownProps, PageLicenseProps, PaymentBadgeProps, PaymentStatusSectionProps, PlanPricing, PricingComparisonProps, PricingFeature, ProgressModalProgress, ProgressModalProps, ResizablePluginProps, SettingsCategory, SettingsCategoryGroup, SettingsModalProps, TFunctionLite, TitleDescriptionProps, UpgradeBannerProps };
|
|
477
|
+
export { DEFAULT_LICENSE_MESSAGE_TYPES, DonationBadge, FigmaContainer, FigmaFooter, FigmaHeader, FigmaPageHead, FigmaSection, FigmaSidebar, FigmaToast, FigmaToastProvider, FormWithSubmit, InteractionFeedback, LanguageSelector, LicenseOffer, LicenseStatusCard, LogoDropdown, PageLicense, PaymentBadge, PaymentStatusSection, PricingComparison, ProgressModal, ResizablePlugin, START_DESIGNBASE_AUTH_MESSAGE, SettingsModal, TitleDescription, UpgradeBanner, getActiveSection, resolveText, scrollToSection, useFigmaLicenseBridge, useFigmaToast, useToast };
|
|
478
|
+
export type { DonationBadgeProps, FeedbackStatus, FigmaContainerProps, FigmaContainerSize, FigmaFooterProps, FigmaHeaderAction, FigmaHeaderProps, FigmaPageHeadAction, FigmaPageHeadProps, FigmaSectionProps, FigmaSidebarProps, FormWithSubmitProps, I18nText, InteractionFeedbackProps, Language, LanguageSelectorProps, LicenseOfferProps, LicensePageState, LicenseStatusCardProps, LogoDropdownLink, LogoDropdownProps, PageLicenseProps, PaymentBadgeProps, PaymentStatusSectionProps, PlanPricing, PricingComparisonProps, PricingFeature, ProgressModalProgress, ProgressModalProps, ResizablePluginProps, SettingsCategory, SettingsCategoryGroup, SettingsModalProps, TFunctionLite, TitleDescriptionProps, UpgradeBannerProps, WordPressLinks };
|