@designbasekorea/ui-wc 0.5.3 → 0.5.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.
Files changed (156) hide show
  1. package/dist/chunks/lottie-e273b936.js +17032 -0
  2. package/dist/esm/components/animation-background/canvas-controller.js +121 -1
  3. package/dist/esm/components/animation-background/controls.js +180 -1
  4. package/dist/esm/components/animation-background/graphite-controller.js +196 -1
  5. package/dist/esm/components/animation-background/graphite-presets.js +42 -1
  6. package/dist/esm/components/animation-background/graphite-shader.js +111 -1
  7. package/dist/esm/components/animation-background/layers.js +369 -1
  8. package/dist/esm/components/animation-background/lumina-presets.js +53 -1
  9. package/dist/esm/components/animation-background/lumina-shaders.js +181 -1
  10. package/dist/esm/components/animation-background/lumina-utils.js +60 -1
  11. package/dist/esm/components/animation-background/particle-defaults.js +36 -1
  12. package/dist/esm/components/animation-background/renderers.js +167 -1
  13. package/dist/esm/components/animation-background/shader-controller.js +154 -1
  14. package/dist/esm/components/color-picker-utils.js +134 -1
  15. package/dist/esm/components/date-picker-utils.js +140 -1
  16. package/dist/esm/components/db-accordion.js +304 -1
  17. package/dist/esm/components/db-ad-banner.js +455 -1
  18. package/dist/esm/components/db-alert.js +149 -1
  19. package/dist/esm/components/db-animation-background.js +486 -1
  20. package/dist/esm/components/db-animation-text.js +601 -1
  21. package/dist/esm/components/db-app-badge.js +88 -1
  22. package/dist/esm/components/db-audio-player.js +752 -1
  23. package/dist/esm/components/db-avatar.js +188 -1
  24. package/dist/esm/components/db-backdrop.js +139 -1
  25. package/dist/esm/components/db-badge.js +91 -1
  26. package/dist/esm/components/db-banner.js +188 -1
  27. package/dist/esm/components/db-bottom-navigation.js +146 -1
  28. package/dist/esm/components/db-bottom-sheet.js +481 -1
  29. package/dist/esm/components/db-breadcrumbs.js +329 -1
  30. package/dist/esm/components/db-button.js +316 -1
  31. package/dist/esm/components/db-calendar.js +675 -1
  32. package/dist/esm/components/db-card.js +265 -1
  33. package/dist/esm/components/db-carousel.js +264 -1
  34. package/dist/esm/components/db-checkbox.js +202 -1
  35. package/dist/esm/components/db-chip.js +104 -1
  36. package/dist/esm/components/db-code-block.js +304 -1
  37. package/dist/esm/components/db-color-picker.js +746 -1
  38. package/dist/esm/components/db-confirm.js +191 -1
  39. package/dist/esm/components/db-container.js +39 -1
  40. package/dist/esm/components/db-context-menu.js +265 -1
  41. package/dist/esm/components/db-countdown.js +146 -1
  42. package/dist/esm/components/db-cursor-follower.js +173 -1
  43. package/dist/esm/components/db-date-picker.js +837 -1
  44. package/dist/esm/components/db-divider.js +66 -1
  45. package/dist/esm/components/db-drawer.js +245 -1
  46. package/dist/esm/components/db-dropdown.js +493 -1
  47. package/dist/esm/components/db-dropzone.js +266 -1
  48. package/dist/esm/components/db-empty-state.js +97 -1
  49. package/dist/esm/components/db-file-uploader.js +256 -1
  50. package/dist/esm/components/db-floating-action-button.js +139 -1
  51. package/dist/esm/components/db-footer.js +385 -1
  52. package/dist/esm/components/db-form.js +566 -1
  53. package/dist/esm/components/db-gantt.js +882 -1
  54. package/dist/esm/components/db-gradient.js +133 -1
  55. package/dist/esm/components/db-grid-background.js +909 -1
  56. package/dist/esm/components/db-grid.js +73 -1
  57. package/dist/esm/components/db-icons.js +82 -1
  58. package/dist/esm/components/db-image-list.js +214 -1
  59. package/dist/esm/components/db-image-placeholder.js +96 -1
  60. package/dist/esm/components/db-image.js +289 -1
  61. package/dist/esm/components/db-indicator.js +517 -1
  62. package/dist/esm/components/db-input.js +420 -1
  63. package/dist/esm/components/db-kanban.js +538 -1
  64. package/dist/esm/components/db-label.js +66 -1
  65. package/dist/esm/components/db-lightbox.js +372 -1
  66. package/dist/esm/components/db-list.js +340 -1
  67. package/dist/esm/components/db-logo-svg.js +72 -1
  68. package/dist/esm/components/db-logo.js +106 -1
  69. package/dist/esm/components/db-lottie.js +109 -1
  70. package/dist/esm/components/db-markdown-editor.js +458 -1
  71. package/dist/esm/components/db-marquee.js +402 -1
  72. package/dist/esm/components/db-masonry.js +94 -1
  73. package/dist/esm/components/db-menu-item.js +211 -1
  74. package/dist/esm/components/db-modal.js +522 -1
  75. package/dist/esm/components/db-navbar.js +680 -1
  76. package/dist/esm/components/db-onboarding-modal.js +322 -1
  77. package/dist/esm/components/db-page-header.js +312 -1
  78. package/dist/esm/components/db-pagination.js +271 -1
  79. package/dist/esm/components/db-popover.js +580 -1
  80. package/dist/esm/components/db-progress-step.js +166 -1
  81. package/dist/esm/components/db-progress.js +171 -1
  82. package/dist/esm/components/db-progressbar.js +72 -1
  83. package/dist/esm/components/db-radio.js +172 -1
  84. package/dist/esm/components/db-random-gradient.js +121 -1
  85. package/dist/esm/components/db-range-slider.js +811 -1
  86. package/dist/esm/components/db-rating.js +325 -1
  87. package/dist/esm/components/db-reorder.js +286 -1
  88. package/dist/esm/components/db-resizable-panels.js +282 -1
  89. package/dist/esm/components/db-scroll-area.js +126 -1
  90. package/dist/esm/components/db-search-bar.js +668 -1
  91. package/dist/esm/components/db-section-app-download.js +101 -1
  92. package/dist/esm/components/db-section-contact.js +102 -1
  93. package/dist/esm/components/db-section-cta.js +150 -1
  94. package/dist/esm/components/db-section-faq.js +120 -1
  95. package/dist/esm/components/db-section-feature-grid.js +137 -1
  96. package/dist/esm/components/db-section-feature.js +179 -1
  97. package/dist/esm/components/db-section-hero.js +243 -1
  98. package/dist/esm/components/db-section-logo-cloud.js +138 -1
  99. package/dist/esm/components/db-section-pricing.js +166 -1
  100. package/dist/esm/components/db-section-stats.js +129 -1
  101. package/dist/esm/components/db-section-testimonials.js +252 -1
  102. package/dist/esm/components/db-section.js +385 -1
  103. package/dist/esm/components/db-segment-control.js +231 -1
  104. package/dist/esm/components/db-select.js +571 -1
  105. package/dist/esm/components/db-share-icons.js +40 -1
  106. package/dist/esm/components/db-share.js +489 -1
  107. package/dist/esm/components/db-sidebar.js +1068 -1
  108. package/dist/esm/components/db-skeleton.js +94 -1
  109. package/dist/esm/components/db-spinner.js +102 -1
  110. package/dist/esm/components/db-split-view.js +297 -1
  111. package/dist/esm/components/db-stack.js +46 -1
  112. package/dist/esm/components/db-stat.js +218 -1
  113. package/dist/esm/components/db-stepper.js +398 -1
  114. package/dist/esm/components/db-table.js +412 -1
  115. package/dist/esm/components/db-tabs.js +335 -1
  116. package/dist/esm/components/db-testimonial.js +162 -1
  117. package/dist/esm/components/db-textarea.js +233 -1
  118. package/dist/esm/components/db-time-picker.js +523 -1
  119. package/dist/esm/components/db-timeline.js +174 -1
  120. package/dist/esm/components/db-toast.js +158 -1
  121. package/dist/esm/components/db-toggle.js +162 -1
  122. package/dist/esm/components/db-toolbar.js +94 -1
  123. package/dist/esm/components/db-tooltip.js +440 -1
  124. package/dist/esm/components/db-top-banner.js +121 -1
  125. package/dist/esm/components/db-tutorial.js +324 -1
  126. package/dist/esm/components/db-video-player.js +503 -1
  127. package/dist/esm/components/db-youtube-player.js +194 -1
  128. package/dist/esm/components/highlight-code.js +65 -1
  129. package/dist/esm/components/input-validation.js +50 -1
  130. package/dist/esm/components/marketing-block-host-utils.js +9 -1
  131. package/dist/esm/components/number-scrub.js +117 -1
  132. package/dist/esm/components/random-gradient-palettes.js +67 -1
  133. package/dist/esm/components/section-block-header-utils.js +48 -1
  134. package/dist/esm/helpers/confirm.js +52 -1
  135. package/dist/esm/helpers/toast.js +73 -1
  136. package/dist/esm/index.js +111 -1
  137. package/dist/esm/node_modules/prismjs/components/prism-bash.js +235 -1
  138. package/dist/esm/node_modules/prismjs/components/prism-clike.js +31 -1
  139. package/dist/esm/node_modules/prismjs/components/prism-css.js +64 -1
  140. package/dist/esm/node_modules/prismjs/components/prism-javascript.js +172 -1
  141. package/dist/esm/node_modules/prismjs/components/prism-json.js +27 -1
  142. package/dist/esm/node_modules/prismjs/components/prism-jsx.js +143 -1
  143. package/dist/esm/node_modules/prismjs/components/prism-markup.js +186 -1
  144. package/dist/esm/node_modules/prismjs/components/prism-scss.js +81 -1
  145. package/dist/esm/node_modules/prismjs/components/prism-tsx.js +15 -1
  146. package/dist/esm/node_modules/prismjs/components/prism-typescript.js +60 -1
  147. package/dist/index.cjs +55414 -1
  148. package/dist/index.css +1 -1
  149. package/dist/index.esm.js +38284 -1
  150. package/dist/react/chunks/lottie-72a4c6d4.js +17032 -0
  151. package/dist/react/index.cjs +56503 -1
  152. package/dist/react/index.d.ts +1 -1
  153. package/dist/react/index.esm.js +39373 -1
  154. package/package.json +1 -1
  155. package/dist/chunks/lottie-2d1f6278.js +0 -1
  156. package/dist/react/chunks/lottie-14e7addb.js +0 -1
@@ -1 +1,101 @@
1
- import{syncMarketingBlockHost as t}from"./marketing-block-host-utils.js";const e="designbase-wc-section-app-download";class DbSectionAppDownload extends HTMLElement{constructor(){super(...arguments),this.built=!1}static get observedAttributes(){return["title","description","stores","align","size","full-width","full-height","overflow-visible"]}connectedCallback(){this.style.display="block",this.built||(this.built=!0,this.build()),this.updateUI()}attributeChangedCallback(){this.built&&this.updateUI()}get stores(){return this.parseStores()}set stores(t){this.setAttribute("stores","string"==typeof t?t:JSON.stringify(t))}parseStores(){try{const t=JSON.parse(this.getAttribute("stores")||"[]");if(Array.isArray(t)&&t.length>0)return t}catch{}return[{store:"app-store",href:"#"},{store:"google-play",href:"#"}]}build(){this.innerEl=document.createElement("div"),this.innerEl.className=`${e}__inner`,this.titleEl=document.createElement("h2"),this.titleEl.className=`${e}__title`,this.descriptionEl=document.createElement("p"),this.descriptionEl.className=`${e}__description`,this.badgesEl=document.createElement("div"),this.badgesEl.className=`${e}__badges`,this.innerEl.append(this.titleEl,this.descriptionEl,this.badgesEl),this.append(this.innerEl)}updateUI(){const s=this.getAttribute("title")||"지금 바로 시작하세요",i=this.getAttribute("description")||"앱을 다운로드하고 바로 이용해 보세요.",r=this.getAttribute("align")||"center",l=this.parseStores();this.className=[e,`${e}--${r}`].join(" "),t(this,e),this.titleEl&&(this.titleEl.textContent=s),this.descriptionEl&&(this.descriptionEl.textContent=i,this.descriptionEl.hidden=!i),this.badgesEl&&(this.badgesEl.replaceChildren(),l.forEach(t=>{const e=document.createElement("db-app-badge");e.setAttribute("store",t.store),e.setAttribute("size",t.size||"m"),e.setAttribute("theme",t.theme||"dark"),t.href&&e.setAttribute("href",t.href),t.label&&e.setAttribute("label",t.label),t.storeName&&e.setAttribute("store-name",t.storeName),this.badgesEl.append(e)}))}}customElements.get("db-section-app-download")||customElements.define("db-section-app-download",DbSectionAppDownload);export{DbSectionAppDownload};
1
+ import { syncMarketingBlockHost } from './marketing-block-host-utils.js';
2
+
3
+ const CLASS = 'designbase-wc-section-app-download';
4
+ class DbSectionAppDownload extends HTMLElement {
5
+ constructor() {
6
+ super(...arguments);
7
+ this.built = false;
8
+ }
9
+ static get observedAttributes() {
10
+ return [
11
+ 'title',
12
+ 'description',
13
+ 'stores',
14
+ 'align',
15
+ 'size',
16
+ 'full-width',
17
+ 'full-height',
18
+ 'overflow-visible',
19
+ ];
20
+ }
21
+ connectedCallback() {
22
+ this.style.display = 'block';
23
+ if (!this.built) {
24
+ this.built = true;
25
+ this.build();
26
+ }
27
+ this.updateUI();
28
+ }
29
+ attributeChangedCallback() {
30
+ if (!this.built)
31
+ return;
32
+ this.updateUI();
33
+ }
34
+ get stores() {
35
+ return this.parseStores();
36
+ }
37
+ set stores(value) {
38
+ this.setAttribute('stores', typeof value === 'string' ? value : JSON.stringify(value));
39
+ }
40
+ parseStores() {
41
+ try {
42
+ const parsed = JSON.parse(this.getAttribute('stores') || '[]');
43
+ if (Array.isArray(parsed) && parsed.length > 0)
44
+ return parsed;
45
+ }
46
+ catch {
47
+ /* use default */
48
+ }
49
+ return [
50
+ { store: 'app-store', href: '#' },
51
+ { store: 'google-play', href: '#' },
52
+ ];
53
+ }
54
+ build() {
55
+ this.innerEl = document.createElement('div');
56
+ this.innerEl.className = `${CLASS}__inner`;
57
+ this.titleEl = document.createElement('h2');
58
+ this.titleEl.className = `${CLASS}__title`;
59
+ this.descriptionEl = document.createElement('p');
60
+ this.descriptionEl.className = `${CLASS}__description`;
61
+ this.badgesEl = document.createElement('div');
62
+ this.badgesEl.className = `${CLASS}__badges`;
63
+ this.innerEl.append(this.titleEl, this.descriptionEl, this.badgesEl);
64
+ this.append(this.innerEl);
65
+ }
66
+ updateUI() {
67
+ const title = this.getAttribute('title') || '지금 바로 시작하세요';
68
+ const description = this.getAttribute('description') || '앱을 다운로드하고 바로 이용해 보세요.';
69
+ const align = this.getAttribute('align') || 'center';
70
+ const stores = this.parseStores();
71
+ this.className = [CLASS, `${CLASS}--${align}`].join(' ');
72
+ syncMarketingBlockHost(this, CLASS);
73
+ if (this.titleEl)
74
+ this.titleEl.textContent = title;
75
+ if (this.descriptionEl) {
76
+ this.descriptionEl.textContent = description;
77
+ this.descriptionEl.hidden = !description;
78
+ }
79
+ if (this.badgesEl) {
80
+ this.badgesEl.replaceChildren();
81
+ stores.forEach((store) => {
82
+ const badge = document.createElement('db-app-badge');
83
+ badge.setAttribute('store', store.store);
84
+ badge.setAttribute('size', store.size || 'm');
85
+ badge.setAttribute('theme', store.theme || 'dark');
86
+ if (store.href)
87
+ badge.setAttribute('href', store.href);
88
+ if (store.label)
89
+ badge.setAttribute('label', store.label);
90
+ if (store.storeName)
91
+ badge.setAttribute('store-name', store.storeName);
92
+ this.badgesEl.append(badge);
93
+ });
94
+ }
95
+ }
96
+ }
97
+ if (!customElements.get('db-section-app-download')) {
98
+ customElements.define('db-section-app-download', DbSectionAppDownload);
99
+ }
100
+
101
+ export { DbSectionAppDownload };
@@ -1 +1,102 @@
1
- import{syncMarketingBlockHost as t}from"./marketing-block-host-utils.js";const i="designbase-wc-section-contact",e="contact@designbase.co.kr";class DbSectionContact extends HTMLElement{constructor(){super(...arguments),this.built=!1}static get observedAttributes(){return["title","description","action","align","accent","content-padding","size","full-width","full-height","overflow-visible"]}connectedCallback(){this.style.display="block",this.built||(this.built=!0,this.build()),this.updateUI()}attributeChangedCallback(){this.built&&this.updateUI()}parseAction(){try{const t=this.getAttribute("action");if(t)return JSON.parse(t)}catch{}return{label:e,href:`mailto:${e}`}}build(){this.innerEl=document.createElement("div"),this.innerEl.className=`${i}__inner`,this.titleEl=document.createElement("h2"),this.titleEl.className=`${i}__title`,this.descriptionEl=document.createElement("p"),this.descriptionEl.className=`${i}__description`,this.actionEl=document.createElement("db-button"),this.actionEl.className=`${i}__action`,this.actionEl.setAttribute("variant","primary"),this.actionEl.setAttribute("size","m"),this.actionEl.setAttribute("radius","pill"),this.actionEl.setAttribute("start-icon","mail"),this.actionEl.addEventListener("click",t=>{t.stopPropagation(),this.dispatchEvent(new CustomEvent("db-action",{detail:{action:this.parseAction()},bubbles:!0,composed:!0}))}),this.innerEl.append(this.titleEl,this.descriptionEl,this.actionEl),this.append(this.innerEl)}updateUI(){const e=this.getAttribute("title")||"문의하기",s=this.getAttribute("description")||"궁금한 점이 있으시면 언제든지 연락주세요.",n=this.getAttribute("align")||"center",c=this.getAttribute("content-padding")||"l",a=!this.hasAttribute("accent")||"false"!==this.getAttribute("accent"),l=this.parseAction();this.className=[i,`${i}--${n}`,`${i}--padding-${c}`,a&&`${i}--accent`].filter(Boolean).join(" "),t(this,i),this.titleEl&&(this.titleEl.textContent=e),this.descriptionEl&&(this.descriptionEl.textContent=s,this.descriptionEl.hidden=!s),this.actionEl&&(this.actionEl.textContent=l.label,l.href?this.actionEl.setAttribute("href",l.href):this.actionEl.removeAttribute("href"))}}customElements.get("db-section-contact")||customElements.define("db-section-contact",DbSectionContact);export{DbSectionContact};
1
+ import { syncMarketingBlockHost } from './marketing-block-host-utils.js';
2
+
3
+ const CLASS = 'designbase-wc-section-contact';
4
+ const DEFAULT_EMAIL = 'contact@designbase.co.kr';
5
+ class DbSectionContact extends HTMLElement {
6
+ constructor() {
7
+ super(...arguments);
8
+ this.built = false;
9
+ }
10
+ static get observedAttributes() {
11
+ return [
12
+ 'title',
13
+ 'description',
14
+ 'action',
15
+ 'align',
16
+ 'accent',
17
+ 'content-padding',
18
+ 'size',
19
+ 'full-width',
20
+ 'full-height',
21
+ 'overflow-visible',
22
+ ];
23
+ }
24
+ connectedCallback() {
25
+ this.style.display = 'block';
26
+ if (!this.built) {
27
+ this.built = true;
28
+ this.build();
29
+ }
30
+ this.updateUI();
31
+ }
32
+ attributeChangedCallback() {
33
+ if (!this.built)
34
+ return;
35
+ this.updateUI();
36
+ }
37
+ parseAction() {
38
+ try {
39
+ const raw = this.getAttribute('action');
40
+ if (raw)
41
+ return JSON.parse(raw);
42
+ }
43
+ catch {
44
+ /* use default */
45
+ }
46
+ return { label: DEFAULT_EMAIL, href: `mailto:${DEFAULT_EMAIL}` };
47
+ }
48
+ build() {
49
+ this.innerEl = document.createElement('div');
50
+ this.innerEl.className = `${CLASS}__inner`;
51
+ this.titleEl = document.createElement('h2');
52
+ this.titleEl.className = `${CLASS}__title`;
53
+ this.descriptionEl = document.createElement('p');
54
+ this.descriptionEl.className = `${CLASS}__description`;
55
+ this.actionEl = document.createElement('db-button');
56
+ this.actionEl.className = `${CLASS}__action`;
57
+ this.actionEl.setAttribute('variant', 'primary');
58
+ this.actionEl.setAttribute('size', 'm');
59
+ this.actionEl.setAttribute('radius', 'pill');
60
+ this.actionEl.setAttribute('start-icon', 'mail');
61
+ this.actionEl.addEventListener('click', (event) => {
62
+ event.stopPropagation();
63
+ this.dispatchEvent(new CustomEvent('db-action', { detail: { action: this.parseAction() }, bubbles: true, composed: true }));
64
+ });
65
+ this.innerEl.append(this.titleEl, this.descriptionEl, this.actionEl);
66
+ this.append(this.innerEl);
67
+ }
68
+ updateUI() {
69
+ const title = this.getAttribute('title') || '문의하기';
70
+ const description = this.getAttribute('description') || '궁금한 점이 있으시면 언제든지 연락주세요.';
71
+ const align = this.getAttribute('align') || 'center';
72
+ const contentPadding = this.getAttribute('content-padding') || 'l';
73
+ const accent = !this.hasAttribute('accent') || this.getAttribute('accent') !== 'false';
74
+ const action = this.parseAction();
75
+ this.className = [
76
+ CLASS,
77
+ `${CLASS}--${align}`,
78
+ `${CLASS}--padding-${contentPadding}`,
79
+ accent && `${CLASS}--accent`,
80
+ ]
81
+ .filter(Boolean)
82
+ .join(' ');
83
+ syncMarketingBlockHost(this, CLASS);
84
+ if (this.titleEl)
85
+ this.titleEl.textContent = title;
86
+ if (this.descriptionEl) {
87
+ this.descriptionEl.textContent = description;
88
+ this.descriptionEl.hidden = !description;
89
+ }
90
+ if (this.actionEl) {
91
+ this.actionEl.textContent = action.label;
92
+ if (action.href)
93
+ this.actionEl.setAttribute('href', action.href);
94
+ else
95
+ this.actionEl.removeAttribute('href');
96
+ }
97
+ }
98
+ }
99
+ if (!customElements.get('db-section-contact'))
100
+ customElements.define('db-section-contact', DbSectionContact);
101
+
102
+ export { DbSectionContact };
@@ -1 +1,150 @@
1
- import{syncMarketingBlockHost as t}from"./marketing-block-host-utils.js";const e="designbase-wc-section-cta";class DbSectionCta extends HTMLElement{constructor(){super(...arguments),this.built=!1}static get observedAttributes(){return["title","headline","subtitle","description","badge","buttons","variant","theme","align","content-padding","size","full-width","full-height","overflow-visible"]}connectedCallback(){this.style.display="block",this.built||(this.built=!0,this.build()),this.updateUI()}attributeChangedCallback(){this.built&&this.updateUI()}parseBadge(){try{const t=this.getAttribute("badge");return t?JSON.parse(t):null}catch{return null}}parseButtons(){try{const t=JSON.parse(this.getAttribute("buttons")||"[]");return Array.isArray(t)?t:[]}catch{return[]}}build(){this.wrapEl=document.createElement("div"),this.wrapEl.className=`${e}__inner`,this.headerEl=document.createElement("div"),this.headerEl.className="designbase-wc-section-block-header",this.badgeEl=document.createElement("db-badge"),this.badgeEl.className="designbase-wc-section-block-header__badge",this.badgeEl.hidden=!0,this.headlineEl=document.createElement("h2"),this.headlineEl.className="designbase-wc-section-block-header__headline",this.subtitleEl=document.createElement("p"),this.subtitleEl.className="designbase-wc-section-block-header__subtitle",this.descriptionEl=document.createElement("p"),this.descriptionEl.className="designbase-wc-section-block-header__description",this.headerEl.append(this.badgeEl,this.headlineEl,this.subtitleEl,this.descriptionEl),this.actionsEl=document.createElement("div"),this.actionsEl.className=`${e}__actions`,this.wrapEl.append(this.headerEl,this.actionsEl),this.append(this.wrapEl)}updateUI(){const i=this.getAttribute("headline")||this.getAttribute("title")||"",s=this.getAttribute("subtitle")||"",a=this.getAttribute("description")||"",n=this.getAttribute("variant")||"default",l=this.getAttribute("theme")||"gradient",h=this.getAttribute("align")||"center",d=this.getAttribute("content-padding")||"l",r=this.parseBadge(),c=this.parseButtons();this.className=[e,`${e}--${n}`,`${e}--${l}`,`${e}--${h}`,`${e}--padding-${d}`].join(" "),t(this,e),this.headerEl&&(this.headerEl.className=["designbase-wc-section-block-header",`designbase-wc-section-block-header--${h}`,`${e}__header`].join(" ")),this.badgeEl&&(r?.text?(this.badgeEl.hidden=!1,this.badgeEl.style.display="",this.badgeEl.setAttribute("variant",r.variant||"primary"),this.badgeEl.setAttribute("badge-style",r.style||"text"),this.badgeEl.setAttribute("size",r.size||"m"),this.badgeEl.textContent=r.text):(this.badgeEl.hidden=!0,this.badgeEl.style.display="none",this.badgeEl.textContent="")),this.headlineEl&&(this.headlineEl.textContent=i,this.headlineEl.hidden=!i),this.subtitleEl&&(this.subtitleEl.textContent=s,this.subtitleEl.hidden=!s),this.descriptionEl&&(this.descriptionEl.textContent=a,this.descriptionEl.hidden=!a),this.actionsEl&&(this.actionsEl.replaceChildren(),c.forEach((t,e)=>{const i=document.createElement("db-button");i.setAttribute("variant",t.variant||(0===e?"primary":"tertiary")),i.setAttribute("size",t.size||"m"),t.href&&i.setAttribute("href",t.href),i.textContent=t.text,this.actionsEl.append(i)}),this.actionsEl.hidden=0===c.length)}}customElements.get("db-section-cta")||customElements.define("db-section-cta",DbSectionCta);export{DbSectionCta};
1
+ import { syncMarketingBlockHost } from './marketing-block-host-utils.js';
2
+
3
+ const CLASS = 'designbase-wc-section-cta';
4
+ class DbSectionCta extends HTMLElement {
5
+ constructor() {
6
+ super(...arguments);
7
+ this.built = false;
8
+ }
9
+ static get observedAttributes() {
10
+ return [
11
+ 'title',
12
+ 'headline',
13
+ 'subtitle',
14
+ 'description',
15
+ 'badge',
16
+ 'buttons',
17
+ 'variant',
18
+ 'theme',
19
+ 'align',
20
+ 'content-padding',
21
+ 'size',
22
+ 'full-width',
23
+ 'full-height',
24
+ 'overflow-visible',
25
+ ];
26
+ }
27
+ connectedCallback() {
28
+ this.style.display = 'block';
29
+ if (!this.built) {
30
+ this.built = true;
31
+ this.build();
32
+ }
33
+ this.updateUI();
34
+ }
35
+ attributeChangedCallback() {
36
+ if (!this.built)
37
+ return;
38
+ this.updateUI();
39
+ }
40
+ parseBadge() {
41
+ try {
42
+ const raw = this.getAttribute('badge');
43
+ if (!raw)
44
+ return null;
45
+ return JSON.parse(raw);
46
+ }
47
+ catch {
48
+ return null;
49
+ }
50
+ }
51
+ parseButtons() {
52
+ try {
53
+ const parsed = JSON.parse(this.getAttribute('buttons') || '[]');
54
+ return Array.isArray(parsed) ? parsed : [];
55
+ }
56
+ catch {
57
+ return [];
58
+ }
59
+ }
60
+ build() {
61
+ this.wrapEl = document.createElement('div');
62
+ this.wrapEl.className = `${CLASS}__inner`;
63
+ this.headerEl = document.createElement('div');
64
+ this.headerEl.className = 'designbase-wc-section-block-header';
65
+ this.badgeEl = document.createElement('db-badge');
66
+ this.badgeEl.className = 'designbase-wc-section-block-header__badge';
67
+ this.badgeEl.hidden = true;
68
+ this.headlineEl = document.createElement('h2');
69
+ this.headlineEl.className = 'designbase-wc-section-block-header__headline';
70
+ this.subtitleEl = document.createElement('p');
71
+ this.subtitleEl.className = 'designbase-wc-section-block-header__subtitle';
72
+ this.descriptionEl = document.createElement('p');
73
+ this.descriptionEl.className = 'designbase-wc-section-block-header__description';
74
+ this.headerEl.append(this.badgeEl, this.headlineEl, this.subtitleEl, this.descriptionEl);
75
+ this.actionsEl = document.createElement('div');
76
+ this.actionsEl.className = `${CLASS}__actions`;
77
+ this.wrapEl.append(this.headerEl, this.actionsEl);
78
+ this.append(this.wrapEl);
79
+ }
80
+ updateUI() {
81
+ const headline = this.getAttribute('headline') || this.getAttribute('title') || '';
82
+ const subtitle = this.getAttribute('subtitle') || '';
83
+ const description = this.getAttribute('description') || '';
84
+ const variant = this.getAttribute('variant') || 'default';
85
+ const theme = this.getAttribute('theme') || 'gradient';
86
+ const align = this.getAttribute('align') || 'center';
87
+ const contentPadding = this.getAttribute('content-padding') || 'l';
88
+ const badge = this.parseBadge();
89
+ const buttons = this.parseButtons();
90
+ this.className = [
91
+ CLASS,
92
+ `${CLASS}--${variant}`,
93
+ `${CLASS}--${theme}`,
94
+ `${CLASS}--${align}`,
95
+ `${CLASS}--padding-${contentPadding}`,
96
+ ].join(' ');
97
+ syncMarketingBlockHost(this, CLASS);
98
+ if (this.headerEl) {
99
+ this.headerEl.className = [
100
+ 'designbase-wc-section-block-header',
101
+ `designbase-wc-section-block-header--${align}`,
102
+ `${CLASS}__header`,
103
+ ].join(' ');
104
+ }
105
+ if (this.badgeEl) {
106
+ if (badge?.text) {
107
+ this.badgeEl.hidden = false;
108
+ this.badgeEl.style.display = '';
109
+ this.badgeEl.setAttribute('variant', badge.variant || 'primary');
110
+ this.badgeEl.setAttribute('badge-style', badge.style || 'text');
111
+ this.badgeEl.setAttribute('size', badge.size || 'm');
112
+ this.badgeEl.textContent = badge.text;
113
+ }
114
+ else {
115
+ this.badgeEl.hidden = true;
116
+ this.badgeEl.style.display = 'none';
117
+ this.badgeEl.textContent = '';
118
+ }
119
+ }
120
+ if (this.headlineEl) {
121
+ this.headlineEl.textContent = headline;
122
+ this.headlineEl.hidden = !headline;
123
+ }
124
+ if (this.subtitleEl) {
125
+ this.subtitleEl.textContent = subtitle;
126
+ this.subtitleEl.hidden = !subtitle;
127
+ }
128
+ if (this.descriptionEl) {
129
+ this.descriptionEl.textContent = description;
130
+ this.descriptionEl.hidden = !description;
131
+ }
132
+ if (this.actionsEl) {
133
+ this.actionsEl.replaceChildren();
134
+ buttons.forEach((button, index) => {
135
+ const el = document.createElement('db-button');
136
+ el.setAttribute('variant', button.variant || (index === 0 ? 'primary' : 'tertiary'));
137
+ el.setAttribute('size', button.size || 'm');
138
+ if (button.href)
139
+ el.setAttribute('href', button.href);
140
+ el.textContent = button.text;
141
+ this.actionsEl.append(el);
142
+ });
143
+ this.actionsEl.hidden = buttons.length === 0;
144
+ }
145
+ }
146
+ }
147
+ if (!customElements.get('db-section-cta'))
148
+ customElements.define('db-section-cta', DbSectionCta);
149
+
150
+ export { DbSectionCta };
@@ -1 +1,120 @@
1
- import{applySectionBlockHeader as t}from"./section-block-header-utils.js";import{syncMarketingBlockHost as e}from"./marketing-block-host-utils.js";const i="designbase-wc-section-faq";class DbSectionFaq extends HTMLElement{constructor(){super(...arguments),this.built=!1}static get observedAttributes(){return["headline","subtitle","description","badge","items","allow-multiple","align","content-padding","size","full-width","full-height","overflow-visible"]}connectedCallback(){this.style.display="block",this.built||(this.built=!0,this.build()),this.updateUI()}attributeChangedCallback(){this.built&&this.updateUI()}parseItems(){try{const t=JSON.parse(this.getAttribute("items")||"[]");return Array.isArray(t)?t:[]}catch{return[]}}parseBadge(){try{const t=this.getAttribute("badge");return t?JSON.parse(t):null}catch{return null}}build(){this.innerEl=document.createElement("div"),this.innerEl.className=`${i}__inner`,this.headerEl=document.createElement("div"),this.headerEl.className="designbase-wc-section-block-header",this.headerEl.innerHTML='\n <db-badge class="designbase-wc-section-block-header__badge" hidden></db-badge>\n <h2 class="designbase-wc-section-block-header__headline"></h2>\n <p class="designbase-wc-section-block-header__subtitle"></p>\n <p class="designbase-wc-section-block-header__description"></p>\n ',this.accordionEl=document.createElement("db-accordion"),this.accordionEl.className=`${i}__accordion`,this.innerEl.append(this.headerEl,this.accordionEl),this.append(this.innerEl)}updateUI(){const s=this.getAttribute("headline")||"자주 묻는 질문",n=this.getAttribute("subtitle")||"",a=this.getAttribute("description")||"",l=this.getAttribute("content-padding")||"l",r=this.getAttribute("align")||"center",c=this.hasAttribute("allow-multiple"),d=this.parseBadge(),o=this.parseItems();if(this.className=[i,`${i}--padding-${l}`].join(" "),e(this,i),this.headerEl&&t(this.headerEl,{headline:s,subtitle:n,description:a,badge:d,align:r}),!this.accordionEl)return;const h=o.map(t=>({id:t.id,title:t.question,content:t.answer,itemType:"question"}));this.accordionEl.setAttribute("items",JSON.stringify(h)),this.accordionEl.setAttribute("variant","separated"),this.accordionEl.setAttribute("size","m"),this.accordionEl.setAttribute("default-item-type","question"),c?(this.accordionEl.setAttribute("allow-multiple",""),this.accordionEl.setAttribute("expand-mode","multiple")):(this.accordionEl.removeAttribute("allow-multiple"),this.accordionEl.setAttribute("expand-mode","single"))}}customElements.get("db-section-faq")||customElements.define("db-section-faq",DbSectionFaq);export{DbSectionFaq};
1
+ import { applySectionBlockHeader } from './section-block-header-utils.js';
2
+ import { syncMarketingBlockHost } from './marketing-block-host-utils.js';
3
+
4
+ const CLASS = 'designbase-wc-section-faq';
5
+ class DbSectionFaq extends HTMLElement {
6
+ constructor() {
7
+ super(...arguments);
8
+ this.built = false;
9
+ }
10
+ static get observedAttributes() {
11
+ return [
12
+ 'headline',
13
+ 'subtitle',
14
+ 'description',
15
+ 'badge',
16
+ 'items',
17
+ 'allow-multiple',
18
+ 'align',
19
+ 'content-padding',
20
+ 'size',
21
+ 'full-width',
22
+ 'full-height',
23
+ 'overflow-visible',
24
+ ];
25
+ }
26
+ connectedCallback() {
27
+ this.style.display = 'block';
28
+ if (!this.built) {
29
+ this.built = true;
30
+ this.build();
31
+ }
32
+ this.updateUI();
33
+ }
34
+ attributeChangedCallback() {
35
+ if (!this.built)
36
+ return;
37
+ this.updateUI();
38
+ }
39
+ parseItems() {
40
+ try {
41
+ const parsed = JSON.parse(this.getAttribute('items') || '[]');
42
+ return Array.isArray(parsed) ? parsed : [];
43
+ }
44
+ catch {
45
+ return [];
46
+ }
47
+ }
48
+ parseBadge() {
49
+ try {
50
+ const raw = this.getAttribute('badge');
51
+ if (!raw)
52
+ return null;
53
+ return JSON.parse(raw);
54
+ }
55
+ catch {
56
+ return null;
57
+ }
58
+ }
59
+ build() {
60
+ this.innerEl = document.createElement('div');
61
+ this.innerEl.className = `${CLASS}__inner`;
62
+ this.headerEl = document.createElement('div');
63
+ this.headerEl.className = 'designbase-wc-section-block-header';
64
+ this.headerEl.innerHTML = `
65
+ <db-badge class="designbase-wc-section-block-header__badge" hidden></db-badge>
66
+ <h2 class="designbase-wc-section-block-header__headline"></h2>
67
+ <p class="designbase-wc-section-block-header__subtitle"></p>
68
+ <p class="designbase-wc-section-block-header__description"></p>
69
+ `;
70
+ this.accordionEl = document.createElement('db-accordion');
71
+ this.accordionEl.className = `${CLASS}__accordion`;
72
+ this.innerEl.append(this.headerEl, this.accordionEl);
73
+ this.append(this.innerEl);
74
+ }
75
+ updateUI() {
76
+ const headline = this.getAttribute('headline') || '자주 묻는 질문';
77
+ const subtitle = this.getAttribute('subtitle') || '';
78
+ const description = this.getAttribute('description') || '';
79
+ const contentPadding = this.getAttribute('content-padding') || 'l';
80
+ const align = this.getAttribute('align') || 'center';
81
+ const allowMultiple = this.hasAttribute('allow-multiple');
82
+ const badge = this.parseBadge();
83
+ const items = this.parseItems();
84
+ this.className = [CLASS, `${CLASS}--padding-${contentPadding}`].join(' ');
85
+ syncMarketingBlockHost(this, CLASS);
86
+ if (this.headerEl) {
87
+ applySectionBlockHeader(this.headerEl, {
88
+ headline,
89
+ subtitle,
90
+ description,
91
+ badge,
92
+ align,
93
+ });
94
+ }
95
+ if (!this.accordionEl)
96
+ return;
97
+ const accordionItems = items.map((item) => ({
98
+ id: item.id,
99
+ title: item.question,
100
+ content: item.answer,
101
+ itemType: 'question',
102
+ }));
103
+ this.accordionEl.setAttribute('items', JSON.stringify(accordionItems));
104
+ this.accordionEl.setAttribute('variant', 'separated');
105
+ this.accordionEl.setAttribute('size', 'm');
106
+ this.accordionEl.setAttribute('default-item-type', 'question');
107
+ if (allowMultiple) {
108
+ this.accordionEl.setAttribute('allow-multiple', '');
109
+ this.accordionEl.setAttribute('expand-mode', 'multiple');
110
+ }
111
+ else {
112
+ this.accordionEl.removeAttribute('allow-multiple');
113
+ this.accordionEl.setAttribute('expand-mode', 'single');
114
+ }
115
+ }
116
+ }
117
+ if (!customElements.get('db-section-faq'))
118
+ customElements.define('db-section-faq', DbSectionFaq);
119
+
120
+ export { DbSectionFaq };
@@ -1 +1,137 @@
1
- import{createDbIcon as e}from"./db-icons.js";import{applySectionBlockHeader as t}from"./section-block-header-utils.js";import{syncMarketingBlockHost as i}from"./marketing-block-host-utils.js";const s="designbase-wc-section-feature-grid",n={sparkles:"sparkle",rocket:"package",shield:"award",chart:"trending-up",users:"user",bolt:"bulb"};class DbSectionFeatureGrid extends HTMLElement{constructor(){super(...arguments),this.built=!1}static get observedAttributes(){return["headline","subtitle","description","badge","items","columns","tinted","align","content-padding","size","full-width","full-height","overflow-visible"]}connectedCallback(){this.style.display="block",this.built||(this.built=!0,this.build()),this.updateUI()}attributeChangedCallback(){this.built&&this.updateUI()}parseItems(){try{const e=JSON.parse(this.getAttribute("items")||"[]");return Array.isArray(e)?e:[]}catch{return[]}}parseBadge(){try{const e=this.getAttribute("badge");return e?JSON.parse(e):null}catch{return null}}build(){this.innerEl=document.createElement("div"),this.innerEl.className=`${s}__inner`,this.headerEl=document.createElement("div"),this.headerEl.className="designbase-wc-section-block-header",this.headerEl.innerHTML='\n <db-badge class="designbase-wc-section-block-header__badge" hidden></db-badge>\n <h2 class="designbase-wc-section-block-header__headline"></h2>\n <p class="designbase-wc-section-block-header__subtitle"></p>\n <p class="designbase-wc-section-block-header__description"></p>\n ',this.gridEl=document.createElement("div"),this.gridEl.className=`${s}__grid`,this.innerEl.append(this.headerEl,this.gridEl),this.append(this.innerEl)}updateUI(){const a=this.getAttribute("headline")||"주요 기능",r=this.getAttribute("subtitle")||"",d=this.getAttribute("description")||"",l=this.getAttribute("columns")||"3",c=this.getAttribute("content-padding")||"l",o=this.getAttribute("align")||"center",h=this.hasAttribute("tinted"),u=this.parseBadge(),b=this.parseItems();this.className=[s,`${s}--cols-${l}`,`${s}--padding-${c}`,h&&`${s}--tinted`].filter(Boolean).join(" "),i(this,s),this.headerEl&&t(this.headerEl,{headline:a,subtitle:r,description:d,badge:u,align:o}),this.gridEl&&(this.gridEl.replaceChildren(),b.forEach(t=>{const i=document.createElement("article");i.className=`${s}__card`;const a=document.createElement("div");a.className=`${s}__card-icon`,a.append(e(n[t.iconName||"sparkles"]||"sparkle",24));const r=document.createElement("h3");r.className=`${s}__card-title`,r.textContent=t.title;const d=document.createElement("p");d.className=`${s}__card-description`,d.textContent=t.description,i.append(a,r,d),this.gridEl.append(i)}))}}customElements.get("db-section-feature-grid")||customElements.define("db-section-feature-grid",DbSectionFeatureGrid);export{DbSectionFeatureGrid};
1
+ import { createDbIcon } from './db-icons.js';
2
+ import { applySectionBlockHeader } from './section-block-header-utils.js';
3
+ import { syncMarketingBlockHost } from './marketing-block-host-utils.js';
4
+
5
+ const CLASS = 'designbase-wc-section-feature-grid';
6
+ const ICON_ATTR_MAP = {
7
+ sparkles: 'sparkle',
8
+ rocket: 'package',
9
+ shield: 'award',
10
+ chart: 'trending-up',
11
+ users: 'user',
12
+ bolt: 'bulb',
13
+ };
14
+ class DbSectionFeatureGrid extends HTMLElement {
15
+ constructor() {
16
+ super(...arguments);
17
+ this.built = false;
18
+ }
19
+ static get observedAttributes() {
20
+ return [
21
+ 'headline',
22
+ 'subtitle',
23
+ 'description',
24
+ 'badge',
25
+ 'items',
26
+ 'columns',
27
+ 'tinted',
28
+ 'align',
29
+ 'content-padding',
30
+ 'size',
31
+ 'full-width',
32
+ 'full-height',
33
+ 'overflow-visible',
34
+ ];
35
+ }
36
+ connectedCallback() {
37
+ this.style.display = 'block';
38
+ if (!this.built) {
39
+ this.built = true;
40
+ this.build();
41
+ }
42
+ this.updateUI();
43
+ }
44
+ attributeChangedCallback() {
45
+ if (!this.built)
46
+ return;
47
+ this.updateUI();
48
+ }
49
+ parseItems() {
50
+ try {
51
+ const parsed = JSON.parse(this.getAttribute('items') || '[]');
52
+ return Array.isArray(parsed) ? parsed : [];
53
+ }
54
+ catch {
55
+ return [];
56
+ }
57
+ }
58
+ parseBadge() {
59
+ try {
60
+ const raw = this.getAttribute('badge');
61
+ if (!raw)
62
+ return null;
63
+ return JSON.parse(raw);
64
+ }
65
+ catch {
66
+ return null;
67
+ }
68
+ }
69
+ build() {
70
+ this.innerEl = document.createElement('div');
71
+ this.innerEl.className = `${CLASS}__inner`;
72
+ this.headerEl = document.createElement('div');
73
+ this.headerEl.className = 'designbase-wc-section-block-header';
74
+ this.headerEl.innerHTML = `
75
+ <db-badge class="designbase-wc-section-block-header__badge" hidden></db-badge>
76
+ <h2 class="designbase-wc-section-block-header__headline"></h2>
77
+ <p class="designbase-wc-section-block-header__subtitle"></p>
78
+ <p class="designbase-wc-section-block-header__description"></p>
79
+ `;
80
+ this.gridEl = document.createElement('div');
81
+ this.gridEl.className = `${CLASS}__grid`;
82
+ this.innerEl.append(this.headerEl, this.gridEl);
83
+ this.append(this.innerEl);
84
+ }
85
+ updateUI() {
86
+ const headline = this.getAttribute('headline') || '주요 기능';
87
+ const subtitle = this.getAttribute('subtitle') || '';
88
+ const description = this.getAttribute('description') || '';
89
+ const columns = this.getAttribute('columns') || '3';
90
+ const contentPadding = this.getAttribute('content-padding') || 'l';
91
+ const align = this.getAttribute('align') || 'center';
92
+ const tinted = this.hasAttribute('tinted');
93
+ const badge = this.parseBadge();
94
+ const items = this.parseItems();
95
+ this.className = [
96
+ CLASS,
97
+ `${CLASS}--cols-${columns}`,
98
+ `${CLASS}--padding-${contentPadding}`,
99
+ tinted && `${CLASS}--tinted`,
100
+ ]
101
+ .filter(Boolean)
102
+ .join(' ');
103
+ syncMarketingBlockHost(this, CLASS);
104
+ if (this.headerEl) {
105
+ applySectionBlockHeader(this.headerEl, {
106
+ headline,
107
+ subtitle,
108
+ description,
109
+ badge,
110
+ align,
111
+ });
112
+ }
113
+ if (!this.gridEl)
114
+ return;
115
+ this.gridEl.replaceChildren();
116
+ items.forEach((item) => {
117
+ const card = document.createElement('article');
118
+ card.className = `${CLASS}__card`;
119
+ const iconWrap = document.createElement('div');
120
+ iconWrap.className = `${CLASS}__card-icon`;
121
+ iconWrap.append(createDbIcon(ICON_ATTR_MAP[item.iconName || 'sparkles'] || 'sparkle', 24));
122
+ const title = document.createElement('h3');
123
+ title.className = `${CLASS}__card-title`;
124
+ title.textContent = item.title;
125
+ const desc = document.createElement('p');
126
+ desc.className = `${CLASS}__card-description`;
127
+ desc.textContent = item.description;
128
+ card.append(iconWrap, title, desc);
129
+ this.gridEl.append(card);
130
+ });
131
+ }
132
+ }
133
+ if (!customElements.get('db-section-feature-grid')) {
134
+ customElements.define('db-section-feature-grid', DbSectionFeatureGrid);
135
+ }
136
+
137
+ export { DbSectionFeatureGrid };