@designbasekorea/ui-wc 0.5.6 → 0.6.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.
Files changed (193) hide show
  1. package/dist/chunks/lottie-35a9b0f5.js +1 -0
  2. package/dist/esm/components/animation-background/canvas-controller.js +1 -121
  3. package/dist/esm/components/animation-background/controls.js +1 -180
  4. package/dist/esm/components/animation-background/graphite-controller.js +1 -196
  5. package/dist/esm/components/animation-background/graphite-presets.js +1 -42
  6. package/dist/esm/components/animation-background/graphite-shader.js +1 -111
  7. package/dist/esm/components/animation-background/layers.js +1 -369
  8. package/dist/esm/components/animation-background/lumina-presets.js +1 -53
  9. package/dist/esm/components/animation-background/lumina-shaders.js +1 -181
  10. package/dist/esm/components/animation-background/lumina-utils.js +1 -60
  11. package/dist/esm/components/animation-background/particle-defaults.js +1 -36
  12. package/dist/esm/components/animation-background/renderers.js +1 -167
  13. package/dist/esm/components/animation-background/shader-controller.js +1 -154
  14. package/dist/esm/components/color-picker-utils.js +1 -134
  15. package/dist/esm/components/date-picker-utils.js +1 -140
  16. package/dist/esm/components/db-accordion.js +1 -304
  17. package/dist/esm/components/db-ad-banner.js +1 -455
  18. package/dist/esm/components/db-ai-chat-list.d.ts +43 -0
  19. package/dist/esm/components/db-ai-chat-list.js +1 -0
  20. package/dist/esm/components/db-ai-chat.d.ts +159 -0
  21. package/dist/esm/components/db-ai-chat.js +1 -0
  22. package/dist/esm/components/db-alert.js +1 -149
  23. package/dist/esm/components/db-animation-background.js +1 -486
  24. package/dist/esm/components/db-animation-text.js +1 -601
  25. package/dist/esm/components/db-app-badge.js +1 -88
  26. package/dist/esm/components/db-audio-player.js +1 -752
  27. package/dist/esm/components/db-avatar.js +1 -188
  28. package/dist/esm/components/db-backdrop.js +1 -139
  29. package/dist/esm/components/db-badge.js +1 -91
  30. package/dist/esm/components/db-banner.js +1 -188
  31. package/dist/esm/components/db-bottom-navigation.js +1 -146
  32. package/dist/esm/components/db-bottom-sheet.js +1 -481
  33. package/dist/esm/components/db-breadcrumbs.js +1 -329
  34. package/dist/esm/components/db-button.js +1 -316
  35. package/dist/esm/components/db-calendar.js +1 -675
  36. package/dist/esm/components/db-card.js +1 -265
  37. package/dist/esm/components/db-carousel.js +1 -264
  38. package/dist/esm/components/db-chat-composer.d.ts +134 -0
  39. package/dist/esm/components/db-chat-composer.js +1 -0
  40. package/dist/esm/components/db-chat-list.d.ts +47 -0
  41. package/dist/esm/components/db-chat-list.js +1 -0
  42. package/dist/esm/components/db-chat-message.d.ts +39 -0
  43. package/dist/esm/components/db-chat-message.js +1 -0
  44. package/dist/esm/components/db-chat-orb.d.ts +99 -0
  45. package/dist/esm/components/db-chat-orb.js +1 -0
  46. package/dist/esm/components/db-chat-room.d.ts +71 -0
  47. package/dist/esm/components/db-chat-room.js +1 -0
  48. package/dist/esm/components/db-chat-suggestions.d.ts +44 -0
  49. package/dist/esm/components/db-chat-suggestions.js +1 -0
  50. package/dist/esm/components/db-chat-typing.d.ts +22 -0
  51. package/dist/esm/components/db-chat-typing.js +1 -0
  52. package/dist/esm/components/db-chat-welcome.d.ts +32 -0
  53. package/dist/esm/components/db-chat-welcome.js +1 -0
  54. package/dist/esm/components/db-chat-widget.d.ts +146 -0
  55. package/dist/esm/components/db-chat-widget.js +1 -0
  56. package/dist/esm/components/db-checkbox.js +1 -202
  57. package/dist/esm/components/db-chip.js +1 -104
  58. package/dist/esm/components/db-code-block.js +1 -304
  59. package/dist/esm/components/db-color-picker.js +1 -746
  60. package/dist/esm/components/db-confirm.js +1 -191
  61. package/dist/esm/components/db-container.js +1 -39
  62. package/dist/esm/components/db-context-menu.js +1 -265
  63. package/dist/esm/components/db-countdown.js +1 -146
  64. package/dist/esm/components/db-cursor-follower.js +1 -173
  65. package/dist/esm/components/db-date-picker.js +1 -837
  66. package/dist/esm/components/db-divider.js +1 -66
  67. package/dist/esm/components/db-download-progress.d.ts +89 -0
  68. package/dist/esm/components/db-download-progress.js +1 -0
  69. package/dist/esm/components/db-drawer.js +1 -245
  70. package/dist/esm/components/db-dropdown.js +1 -493
  71. package/dist/esm/components/db-dropzone.js +1 -266
  72. package/dist/esm/components/db-email-verify.d.ts +64 -0
  73. package/dist/esm/components/db-email-verify.js +1 -0
  74. package/dist/esm/components/db-empty-state.js +1 -97
  75. package/dist/esm/components/db-file-uploader.js +1 -256
  76. package/dist/esm/components/db-floating-action-button.js +1 -139
  77. package/dist/esm/components/db-footer.js +1 -385
  78. package/dist/esm/components/db-form.js +1 -566
  79. package/dist/esm/components/db-gantt.js +1 -882
  80. package/dist/esm/components/db-gradient.js +1 -133
  81. package/dist/esm/components/db-grid-background.js +1 -909
  82. package/dist/esm/components/db-grid.js +1 -73
  83. package/dist/esm/components/db-icons.d.ts +3 -0
  84. package/dist/esm/components/db-icons.js +1 -82
  85. package/dist/esm/components/db-image-list.js +1 -214
  86. package/dist/esm/components/db-image-placeholder.js +1 -96
  87. package/dist/esm/components/db-image.js +1 -289
  88. package/dist/esm/components/db-indicator.js +1 -517
  89. package/dist/esm/components/db-input.js +1 -420
  90. package/dist/esm/components/db-kanban.js +1 -538
  91. package/dist/esm/components/db-label.js +1 -66
  92. package/dist/esm/components/db-lightbox.js +1 -372
  93. package/dist/esm/components/db-list.js +1 -340
  94. package/dist/esm/components/db-logo-svg.js +1 -72
  95. package/dist/esm/components/db-logo.js +1 -106
  96. package/dist/esm/components/db-lottie.js +1 -109
  97. package/dist/esm/components/db-markdown-editor.js +1 -458
  98. package/dist/esm/components/db-marquee.js +1 -402
  99. package/dist/esm/components/db-masonry.js +1 -94
  100. package/dist/esm/components/db-menu-item.js +1 -211
  101. package/dist/esm/components/db-modal.js +1 -522
  102. package/dist/esm/components/db-navbar.js +1 -680
  103. package/dist/esm/components/db-onboarding-modal.js +1 -322
  104. package/dist/esm/components/db-otp-input.d.ts +53 -0
  105. package/dist/esm/components/db-otp-input.js +1 -0
  106. package/dist/esm/components/db-page-header.js +1 -312
  107. package/dist/esm/components/db-pagination.js +1 -271
  108. package/dist/esm/components/db-phone-verify.d.ts +63 -0
  109. package/dist/esm/components/db-phone-verify.js +1 -0
  110. package/dist/esm/components/db-popover.js +1 -580
  111. package/dist/esm/components/db-progress-step.js +1 -166
  112. package/dist/esm/components/db-progress.js +1 -171
  113. package/dist/esm/components/db-progressbar.js +1 -72
  114. package/dist/esm/components/db-radio.js +1 -172
  115. package/dist/esm/components/db-random-gradient.js +1 -121
  116. package/dist/esm/components/db-range-slider.js +1 -811
  117. package/dist/esm/components/db-rating.js +1 -325
  118. package/dist/esm/components/db-reorder.js +1 -286
  119. package/dist/esm/components/db-resizable-panels.js +1 -282
  120. package/dist/esm/components/db-scroll-area.js +1 -126
  121. package/dist/esm/components/db-search-bar.js +1 -668
  122. package/dist/esm/components/db-section-app-download.js +1 -101
  123. package/dist/esm/components/db-section-contact.js +1 -102
  124. package/dist/esm/components/db-section-cta.js +1 -150
  125. package/dist/esm/components/db-section-faq.js +1 -120
  126. package/dist/esm/components/db-section-feature-grid.js +1 -137
  127. package/dist/esm/components/db-section-feature.js +1 -179
  128. package/dist/esm/components/db-section-hero.js +1 -243
  129. package/dist/esm/components/db-section-logo-cloud.js +1 -138
  130. package/dist/esm/components/db-section-pricing.js +1 -166
  131. package/dist/esm/components/db-section-stats.js +1 -129
  132. package/dist/esm/components/db-section-testimonials.js +1 -252
  133. package/dist/esm/components/db-section.js +1 -385
  134. package/dist/esm/components/db-segment-control.js +1 -231
  135. package/dist/esm/components/db-select.js +1 -571
  136. package/dist/esm/components/db-share-icons.js +1 -40
  137. package/dist/esm/components/db-share.js +1 -489
  138. package/dist/esm/components/db-sidebar.d.ts +20 -0
  139. package/dist/esm/components/db-sidebar.js +1 -1068
  140. package/dist/esm/components/db-skeleton.js +1 -94
  141. package/dist/esm/components/db-spinner.js +1 -102
  142. package/dist/esm/components/db-split-view.js +1 -297
  143. package/dist/esm/components/db-stack.js +1 -46
  144. package/dist/esm/components/db-stat.js +1 -218
  145. package/dist/esm/components/db-stepper.js +1 -398
  146. package/dist/esm/components/db-table.js +1 -412
  147. package/dist/esm/components/db-tabs.js +1 -335
  148. package/dist/esm/components/db-testimonial.d.ts +2 -0
  149. package/dist/esm/components/db-testimonial.js +1 -162
  150. package/dist/esm/components/db-textarea.js +1 -233
  151. package/dist/esm/components/db-time-picker.js +1 -523
  152. package/dist/esm/components/db-timeline.js +1 -174
  153. package/dist/esm/components/db-toast.js +1 -158
  154. package/dist/esm/components/db-toggle.js +1 -162
  155. package/dist/esm/components/db-toolbar.js +1 -94
  156. package/dist/esm/components/db-tooltip.js +1 -440
  157. package/dist/esm/components/db-top-banner.js +1 -121
  158. package/dist/esm/components/db-tutorial.js +1 -324
  159. package/dist/esm/components/db-two-factor.d.ts +71 -0
  160. package/dist/esm/components/db-two-factor.js +1 -0
  161. package/dist/esm/components/db-video-player.js +1 -503
  162. package/dist/esm/components/db-youtube-player.js +1 -194
  163. package/dist/esm/components/highlight-code.js +1 -65
  164. package/dist/esm/components/input-validation.js +1 -50
  165. package/dist/esm/components/marketing-block-host-utils.js +1 -9
  166. package/dist/esm/components/number-scrub.js +1 -117
  167. package/dist/esm/components/random-gradient-palettes.js +1 -67
  168. package/dist/esm/components/section-block-header-utils.js +1 -48
  169. package/dist/esm/helpers/confirm.js +1 -52
  170. package/dist/esm/helpers/toast.js +1 -73
  171. package/dist/esm/index.d.ts +16 -0
  172. package/dist/esm/index.js +1 -111
  173. package/dist/esm/node_modules/prismjs/components/prism-bash.js +1 -235
  174. package/dist/esm/node_modules/prismjs/components/prism-clike.js +1 -31
  175. package/dist/esm/node_modules/prismjs/components/prism-css.js +1 -64
  176. package/dist/esm/node_modules/prismjs/components/prism-javascript.js +1 -172
  177. package/dist/esm/node_modules/prismjs/components/prism-json.js +1 -27
  178. package/dist/esm/node_modules/prismjs/components/prism-jsx.js +1 -143
  179. package/dist/esm/node_modules/prismjs/components/prism-markup.js +1 -186
  180. package/dist/esm/node_modules/prismjs/components/prism-scss.js +1 -81
  181. package/dist/esm/node_modules/prismjs/components/prism-tsx.js +1 -15
  182. package/dist/esm/node_modules/prismjs/components/prism-typescript.js +1 -60
  183. package/dist/index.cjs +1 -55414
  184. package/dist/index.css +1 -1
  185. package/dist/index.d.ts +1125 -2
  186. package/dist/index.esm.js +1 -38284
  187. package/dist/react/chunks/lottie-14e7addb.js +1 -0
  188. package/dist/react/index.cjs +1 -56503
  189. package/dist/react/index.d.ts +1637 -21
  190. package/dist/react/index.esm.js +1 -39373
  191. package/package.json +2 -2
  192. package/dist/chunks/lottie-e273b936.js +0 -17032
  193. package/dist/react/chunks/lottie-72a4c6d4.js +0 -17032
@@ -1,101 +1 @@
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
+ 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,102 +1 @@
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
+ 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,150 +1 @@
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
+ 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,120 +1 @@
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
+ 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,137 +1 @@
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 };
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};