@designbasekorea/ui-wc 0.7.3 → 0.8.1

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.
@@ -202,6 +202,8 @@ declare global {
202
202
  }
203
203
 
204
204
  declare class DbBanner extends HTMLElement {
205
+ private clickHandler?;
206
+ private keydownHandler?;
205
207
  static get observedAttributes(): string[];
206
208
  connectedCallback(): void;
207
209
  attributeChangedCallback(): void;
@@ -211,6 +213,9 @@ declare class DbBanner extends HTMLElement {
211
213
  private resolveIconName;
212
214
  private createActionControl;
213
215
  private render;
216
+ private createCloseButton;
217
+ private handleClose;
218
+ private setupInteractivity;
214
219
  }
215
220
  declare global {
216
221
  interface HTMLElementTagNameMap {
@@ -1713,6 +1718,15 @@ interface DbSidebarPromoBanner {
1713
1718
  ctaHref?: string;
1714
1719
  icon?: string;
1715
1720
  }
1721
+ interface DbSidebarUpdateBanner {
1722
+ title: string;
1723
+ description?: string;
1724
+ icon?: string;
1725
+ ctaLabel?: string;
1726
+ ctaHref?: string;
1727
+ /** db-banner variant. 기본 outline(흰 배경+보더). */
1728
+ variant?: 'primary' | 'secondary' | 'tertiary' | 'outline';
1729
+ }
1716
1730
  declare class DbSidebar extends HTMLElement {
1717
1731
  private expandedItems;
1718
1732
  private userMenuOpen;
@@ -1762,6 +1776,8 @@ declare class DbSidebar extends HTMLElement {
1762
1776
  set bottomSections(value: DbSidebarSection[] | string);
1763
1777
  get promoBanner(): DbSidebarPromoBanner | null;
1764
1778
  set promoBanner(value: DbSidebarPromoBanner | string | null);
1779
+ get updateBanner(): DbSidebarUpdateBanner | null;
1780
+ set updateBanner(value: DbSidebarUpdateBanner | string | null);
1765
1781
  get headerType(): 'default' | 'back';
1766
1782
  set headerType(value: 'default' | 'back');
1767
1783
  get backLabel(): string;
@@ -1781,6 +1797,7 @@ declare class DbSidebar extends HTMLElement {
1781
1797
  private parseBottomItems;
1782
1798
  private parseBottomSections;
1783
1799
  private parsePromoBanner;
1800
+ private parseUpdateBanner;
1784
1801
  private getSelectedProject;
1785
1802
  private bindOutsideClick;
1786
1803
  private closeOverlayMenus;
@@ -1801,6 +1818,7 @@ declare class DbSidebar extends HTMLElement {
1801
1818
  private dispatchProjectChange;
1802
1819
  private dispatchProjectManage;
1803
1820
  private dispatchPromoCtaClick;
1821
+ private dispatchUpdateCtaClick;
1804
1822
  private createProjectAvatar;
1805
1823
  private createProjectEmptyMark;
1806
1824
  private createProjectBadge;
@@ -1811,6 +1829,7 @@ declare class DbSidebar extends HTMLElement {
1811
1829
  private renderNav;
1812
1830
  private renderBottomNav;
1813
1831
  private createUserDropdown;
1832
+ private createUpdateBanner;
1814
1833
  private createPromoBanner;
1815
1834
  private createHeader;
1816
1835
  private createNavWrapper;
@@ -2909,6 +2928,7 @@ declare class DbColorPicker extends HTMLElement {
2909
2928
  private handleDocumentMouseMove;
2910
2929
  private handleDocumentMouseUp;
2911
2930
  private toggleOpen;
2931
+ close(): void;
2912
2932
  private handleModalCancel;
2913
2933
  private handleModalApply;
2914
2934
  private mount;
@@ -2922,6 +2942,40 @@ declare global {
2922
2942
  }
2923
2943
  }
2924
2944
 
2945
+ declare class DbColorSwatch extends HTMLElement {
2946
+ private colors;
2947
+ private selected;
2948
+ private customValue;
2949
+ private mounted;
2950
+ private gridEl?;
2951
+ private presetsEl?;
2952
+ private customWrapEl?;
2953
+ private customTipEl?;
2954
+ private customPickerEl?;
2955
+ static get observedAttributes(): string[];
2956
+ connectedCallback(): void;
2957
+ disconnectedCallback(): void;
2958
+ private handleOutsideMouseDown;
2959
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
2960
+ get value(): string;
2961
+ set value(next: string);
2962
+ private getOption;
2963
+ private getBool;
2964
+ private parseColors;
2965
+ private isCustomSelected;
2966
+ private emitChange;
2967
+ private selectPreset;
2968
+ private render;
2969
+ private buildSwatch;
2970
+ private ensureCustom;
2971
+ private updateCustom;
2972
+ }
2973
+ declare global {
2974
+ interface HTMLElementTagNameMap {
2975
+ 'db-color-swatch': DbColorSwatch;
2976
+ }
2977
+ }
2978
+
2925
2979
  type DbReorderItem = {
2926
2980
  id: string;
2927
2981
  content: string;
@@ -6557,8 +6611,27 @@ type BannerProps = WebComponentProps & {
6557
6611
  imageAlt?: string;
6558
6612
  actions?: BannerAction[] | string;
6559
6613
  size?: 's' | 'm' | 'l';
6560
- variant?: 'primary' | 'secondary' | 'tertiary' | 'image';
6614
+ /** 배너 스타일입니다. primary · secondary · tertiary · outline(흰 배경+보더) · image. */
6615
+ variant?: 'primary' | 'secondary' | 'tertiary' | 'outline' | 'image';
6561
6616
  backgroundImage?: string;
6617
+ /** 지정하면 배너 전체가 링크로 동작합니다. */
6618
+ href?: string;
6619
+ /** href 이동 대상입니다. 기본 _self. */
6620
+ target?: '_self' | '_blank';
6621
+ /** true이면 배너 전체가 클릭 요소가 되어 db-click 이벤트를 발생시킵니다. */
6622
+ clickable?: boolean;
6623
+ /** true이면 우측에 닫기 버튼을 표시합니다. */
6624
+ closable?: boolean;
6625
+ /** 닫기 버튼 aria-label입니다. 기본 Close. */
6626
+ closeLabel?: string;
6627
+ onClick?: DbEventHandler<{
6628
+ href: string | null;
6629
+ }>;
6630
+ onDbClick?: DbEventHandler<{
6631
+ href: string | null;
6632
+ }>;
6633
+ onClose?: DbEventHandler<Record<string, never>>;
6634
+ onDbClose?: DbEventHandler<Record<string, never>>;
6562
6635
  };
6563
6636
  type LogoProps = WebComponentProps & {
6564
6637
  type?: 'designbase' | 'designbase-mark' | 'custom';
@@ -7174,6 +7247,15 @@ type SidebarPromoBanner = {
7174
7247
  ctaHref?: string;
7175
7248
  icon?: string;
7176
7249
  };
7250
+ type SidebarUpdateBanner = {
7251
+ title: string;
7252
+ description?: string;
7253
+ icon?: string;
7254
+ ctaLabel?: string;
7255
+ ctaHref?: string;
7256
+ /** db-banner variant. 기본 outline(흰 배경+보더). */
7257
+ variant?: 'primary' | 'secondary' | 'tertiary' | 'outline';
7258
+ };
7177
7259
  type SidebarProps = WebComponentProps & {
7178
7260
  /**
7179
7261
  * 커스텀 내비게이션 콘텐츠입니다.
@@ -7195,6 +7277,8 @@ type SidebarProps = WebComponentProps & {
7195
7277
  bottomItems?: SidebarItem[] | string;
7196
7278
  bottomSections?: SidebarSection[] | string;
7197
7279
  promoBanner?: SidebarPromoBanner | string;
7280
+ /** 업데이트/공지 배너 영역입니다. Banner 컴포넌트를 활용해 표시합니다. */
7281
+ updateBanner?: SidebarUpdateBanner | string;
7198
7282
  headerType?: 'default' | 'back';
7199
7283
  backLabel?: string;
7200
7284
  backHref?: string;
@@ -7227,6 +7311,18 @@ type SidebarProps = WebComponentProps & {
7227
7311
  panel: string;
7228
7312
  previous?: string;
7229
7313
  }>;
7314
+ onPromoCtaClick?: DbEventHandler<{
7315
+ banner: SidebarPromoBanner;
7316
+ }>;
7317
+ onDbPromoCtaClick?: DbEventHandler<{
7318
+ banner: SidebarPromoBanner;
7319
+ }>;
7320
+ onUpdateCtaClick?: DbEventHandler<{
7321
+ banner: SidebarUpdateBanner;
7322
+ }>;
7323
+ onDbUpdateCtaClick?: DbEventHandler<{
7324
+ banner: SidebarUpdateBanner;
7325
+ }>;
7230
7326
  };
7231
7327
  type SpinnerProps = WebComponentProps & {
7232
7328
  type?: 'circular' | 'dots' | 'bars' | 'pulse' | 'ripple';
@@ -8194,6 +8290,7 @@ type MasonryProps = WebComponentProps & {
8194
8290
  type ColorPickerProps = WebComponentProps & {
8195
8291
  size?: 's' | 'm' | 'l';
8196
8292
  type?: 'dropdown' | 'modal';
8293
+ trigger?: 'input' | 'swatch';
8197
8294
  position?: 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';
8198
8295
  value?: string;
8199
8296
  defaultValue?: string;
@@ -8213,6 +8310,29 @@ type ColorPickerProps = WebComponentProps & {
8213
8310
  value: string;
8214
8311
  }>;
8215
8312
  };
8313
+ type ColorSwatchItem = {
8314
+ value: string;
8315
+ name?: string;
8316
+ };
8317
+ type ColorSwatchProps = WebComponentProps & {
8318
+ colors?: ColorSwatchItem[] | string[] | string;
8319
+ value?: string;
8320
+ defaultValue?: string;
8321
+ shape?: 'rounded' | 'circle';
8322
+ size?: 's' | 'm' | 'l';
8323
+ showName?: boolean;
8324
+ allowCustom?: boolean;
8325
+ customType?: 'dropdown' | 'modal';
8326
+ disabled?: boolean;
8327
+ onChange?: DbEventHandler<{
8328
+ value: string;
8329
+ name: string;
8330
+ }>;
8331
+ onDbChange?: DbEventHandler<{
8332
+ value: string;
8333
+ name: string;
8334
+ }>;
8335
+ };
8216
8336
  type ReorderItem = {
8217
8337
  id: string;
8218
8338
  content: string;
@@ -9620,6 +9740,7 @@ declare const Countdown: react.ForwardRefExoticComponent<Omit<CountdownProps, "r
9620
9740
  declare const Masonry: react.ForwardRefExoticComponent<Omit<MasonryProps, "ref"> & react.RefAttributes<HTMLElement>>;
9621
9741
  declare const Carousel: react.ForwardRefExoticComponent<Omit<CarouselProps, "ref"> & react.RefAttributes<HTMLElement>>;
9622
9742
  declare const ColorPicker: react.ForwardRefExoticComponent<Omit<ColorPickerProps, "ref"> & react.RefAttributes<HTMLElement>>;
9743
+ declare const ColorSwatch: react.ForwardRefExoticComponent<Omit<ColorSwatchProps, "ref"> & react.RefAttributes<HTMLElement>>;
9623
9744
  declare const Reorder: react.ForwardRefExoticComponent<Omit<ReorderProps, "ref"> & react.RefAttributes<HTMLElement>>;
9624
9745
  declare const Kanban: react.ForwardRefExoticComponent<Omit<KanbanProps, "ref"> & react.RefAttributes<HTMLElement>>;
9625
9746
  declare const Gantt: react.ForwardRefExoticComponent<Omit<GanttProps, "ref"> & react.RefAttributes<HTMLElement>>;
@@ -9693,5 +9814,5 @@ declare const DatePicker: react.ForwardRefExoticComponent<Omit<DatePickerProps,
9693
9814
  declare const TimePicker: react.ForwardRefExoticComponent<Omit<TimePickerProps, "ref"> & react.RefAttributes<HTMLElement>>;
9694
9815
  declare const Calendar: react.ForwardRefExoticComponent<Omit<CalendarProps, "ref"> & react.RefAttributes<HTMLElement>>;
9695
9816
 
9696
- export { Accordion, 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, 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, Lottie, 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 };
9697
- export type { AccordionItemConfig, AccordionProps, AdBannerProps, AiChatListProps, AiChatProps, AlertAction, AlertProps, AnimationBackgroundProps, AnimationTextProps, AppBadgeProps, AudioPlayerProps, AvatarProps, BackdropProps, BadgeProps, BannerAction, BannerProps, BottomNavigationItem, BottomNavigationProps, BottomSheetProps, BreadcrumbItemConfig, BreadcrumbMenuItemConfig, BreadcrumbsProps, ButtonProps, CalendarEvent, CalendarProps, CardProps, CarouselItem, CarouselProps, ChatComposerProps, ChatListProps, ChatMessageProps, ChatOrbProps, ChatRoomProps, ChatSuggestionsProps, ChatTypingProps, ChatWelcomeProps, ChatWidgetProps, ChipProps, CodeBlockItem, CodeBlockProps, ColorPickerProps, ConfirmProps, ContextMenuItemConfig, ContextMenuProps, CookieBannerProps, CountdownProps, CursorFollowerProps, DatePickerProps, DbChatSuggestion, DbChatTool, DbChatWidgetConversation, DbChatWidgetMessage, DbEventHandler, DividerProps, DownloadProgressProps, DrawerProps, DropdownItemConfig, DropdownProps, DropzoneProps, EmailVerifyProps, EmptyStateProps, FileUploaderProps, FloatingActionButtonProps, FooterCompanyInfo, FooterFamilySite, FooterLink, FooterLinkColumn, FooterProps, FooterSocialLink, FormFieldData, FormProps, GanttAssignee, GanttGroup, GanttItem, GanttProps, GanttRow, GradientColor, GradientProps, GradientScheme, GradientTone, GridBackgroundProps, ImageListItem, ImageListProps, ImagePlaceholderProps, ImageProps, IndicatorProps, InputProps, KanbanAssignee, KanbanCard, KanbanColumn, KanbanProps, KanbanTag, LabelProps, LightboxImage, LightboxProps, ListItemConfig, ListProps, LogoProps, LottieProps, MarkdownEditorProps, MarqueeImageItem, MarqueeProps, MasonryItem, MasonryProps, MenuItemChildConfig, MenuItemProps, ModalProps, ModalSegmentItem, ModalTabItem, NavbarItem, NavbarProps, NavbarUserProfile, OnboardingModalProps, OnboardingStep, OtpInputProps, PageHeaderProps, PageHeaderTabItem, PaginationProps, PhoneVerifyProps, PopoverProps, ProgressProps, ProgressStepItem, ProgressStepProps, RadioProps, RandomGradientProps, RangeSliderProps, RatingProps, ReorderItem, ReorderProps, ResizablePanelsProps, ScrollAreaProps, SearchBarProps, SectionAppDownloadProps, SectionAppDownloadStore, SectionBlockBadge, SectionContactAction, SectionContactProps, SectionCtaButton, SectionCtaProps, SectionFaqItem, SectionFaqProps, SectionFeatureAction, SectionFeatureBadge, SectionFeatureGridItem, SectionFeatureGridProps, SectionFeatureProps, SectionHeroButton, SectionHeroProps, SectionLogoCloudItem, SectionLogoCloudProps, SectionPricingCta, SectionPricingPlan, SectionPricingProps, SectionProps, SectionStatItem, SectionStatsProps, SectionTestimonialItem, SectionTestimonialsProps, SegmentControlProps, SelectProps, SelectionProps, SharePlatform, ShareProps, SidebarItem, SidebarProject, SidebarPromoBanner, SidebarProps, SidebarSection, SidebarUserProfile, SignatureProps, SkeletonProps, SpinnerProps, SplitViewProps, StatChange, StatProps, StepperProps, TabItemConfig, TableColumn, TableProps, TabsProps, TestimonialProps, TextareaProps, TimePickerProps, TimelineItem, TimelineProps, ToastProps, ToggleProps, TooltipProps, TopBannerProps, TutorialProps, TutorialStep, TwoFactorProps, UseContextMenuReturn, VideoPlayerProps, WebComponentProps, YouTubePlayerProps };
9817
+ export { Accordion, 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, Lottie, 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 };
9818
+ export type { AccordionItemConfig, AccordionProps, AdBannerProps, AiChatListProps, AiChatProps, AlertAction, AlertProps, AnimationBackgroundProps, AnimationTextProps, AppBadgeProps, AudioPlayerProps, AvatarProps, BackdropProps, BadgeProps, BannerAction, BannerProps, BottomNavigationItem, BottomNavigationProps, BottomSheetProps, BreadcrumbItemConfig, BreadcrumbMenuItemConfig, BreadcrumbsProps, ButtonProps, CalendarEvent, CalendarProps, CardProps, CarouselItem, CarouselProps, ChatComposerProps, ChatListProps, ChatMessageProps, ChatOrbProps, ChatRoomProps, ChatSuggestionsProps, ChatTypingProps, ChatWelcomeProps, ChatWidgetProps, ChipProps, CodeBlockItem, CodeBlockProps, ColorPickerProps, ColorSwatchItem, ColorSwatchProps, ConfirmProps, ContextMenuItemConfig, ContextMenuProps, CookieBannerProps, CountdownProps, CursorFollowerProps, DatePickerProps, DbChatSuggestion, DbChatTool, DbChatWidgetConversation, DbChatWidgetMessage, DbEventHandler, DividerProps, DownloadProgressProps, DrawerProps, DropdownItemConfig, DropdownProps, DropzoneProps, EmailVerifyProps, EmptyStateProps, FileUploaderProps, FloatingActionButtonProps, FooterCompanyInfo, FooterFamilySite, FooterLink, FooterLinkColumn, FooterProps, FooterSocialLink, FormFieldData, FormProps, GanttAssignee, GanttGroup, GanttItem, GanttProps, GanttRow, GradientColor, GradientProps, GradientScheme, GradientTone, GridBackgroundProps, ImageListItem, ImageListProps, ImagePlaceholderProps, ImageProps, IndicatorProps, InputProps, KanbanAssignee, KanbanCard, KanbanColumn, KanbanProps, KanbanTag, LabelProps, LightboxImage, LightboxProps, ListItemConfig, ListProps, LogoProps, LottieProps, MarkdownEditorProps, MarqueeImageItem, MarqueeProps, MasonryItem, MasonryProps, MenuItemChildConfig, MenuItemProps, ModalProps, ModalSegmentItem, ModalTabItem, NavbarItem, NavbarProps, NavbarUserProfile, OnboardingModalProps, OnboardingStep, OtpInputProps, PageHeaderProps, PageHeaderTabItem, PaginationProps, PhoneVerifyProps, PopoverProps, ProgressProps, ProgressStepItem, ProgressStepProps, RadioProps, RandomGradientProps, RangeSliderProps, RatingProps, ReorderItem, ReorderProps, ResizablePanelsProps, ScrollAreaProps, SearchBarProps, SectionAppDownloadProps, SectionAppDownloadStore, SectionBlockBadge, SectionContactAction, SectionContactProps, SectionCtaButton, SectionCtaProps, SectionFaqItem, SectionFaqProps, SectionFeatureAction, SectionFeatureBadge, SectionFeatureGridItem, SectionFeatureGridProps, SectionFeatureProps, SectionHeroButton, SectionHeroProps, SectionLogoCloudItem, SectionLogoCloudProps, SectionPricingCta, SectionPricingPlan, SectionPricingProps, SectionProps, SectionStatItem, SectionStatsProps, SectionTestimonialItem, SectionTestimonialsProps, SegmentControlProps, SelectProps, SelectionProps, SharePlatform, ShareProps, SidebarItem, SidebarProject, SidebarPromoBanner, SidebarProps, SidebarSection, SidebarUpdateBanner, SidebarUserProfile, SignatureProps, SkeletonProps, SpinnerProps, SplitViewProps, StatChange, StatProps, StepperProps, TabItemConfig, TableColumn, TableProps, TabsProps, TestimonialProps, TextareaProps, TimePickerProps, TimelineItem, TimelineProps, ToastProps, ToggleProps, TooltipProps, TopBannerProps, TutorialProps, TutorialStep, TwoFactorProps, UseContextMenuReturn, VideoPlayerProps, WebComponentProps, YouTubePlayerProps };