@designbasekorea/ui-wc 0.5.5 → 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 (155) 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.esm.js +39373 -1
  153. package/package.json +1 -1
  154. package/dist/chunks/lottie-2637aa0f.js +0 -1
  155. package/dist/react/chunks/lottie-14e7addb.js +0 -1
@@ -1 +1,133 @@
1
- const t="designbase-wc-gradient";class DbGradient extends HTMLElement{static get observedAttributes(){return["colors","direction","size","variant","animation-duration","animation-delay","full-width","full-height"]}connectedCallback(){this.style.display="flex",this.updateUI()}attributeChangedCallback(){this.updateUI()}getBool(t){return this.hasAttribute(t)&&"false"!==this.getAttribute(t)}get colors(){return this.parseColors()}set colors(t){this.setAttribute("colors","string"==typeof t?t:JSON.stringify(t))}parseColors(){try{const t=JSON.parse(this.getAttribute("colors")||"[]");return Array.isArray(t)?t:[]}catch{return[]}}directionMap(t){return{"to-right":"to right","to-left":"to left","to-bottom":"to bottom","to-top":"to top","to-bottom-right":"to bottom right","to-bottom-left":"to bottom left","to-top-right":"to top right","to-top-left":"to top left",radial:"circle"}[t]}colorStops(t){return t.map(t=>{const e=void 0!==t.position?`${t.position}%`:"";return e?`${t.color} ${e}`:t.color}).join(", ")}generateGradientStyle(t,e){if(0===t.length)return{};const i=this.colorStops(t);return"radial"===e?{background:`radial-gradient(circle, ${i})`}:{background:`linear-gradient(${this.directionMap(e)}, ${i})`}}generateAnimatedStyle(t,e,i,o){const r=t.map((t,e)=>{const i=((void 0!==t.position?t.position:0)+20*e)%100;return`${t.color} ${i}%`}).join(", ");return{background:"radial"===e?`radial-gradient(circle, ${r})`:`linear-gradient(${this.directionMap(e)}, ${r})`,animation:`gradient-shift ${i}s ease-in-out ${o}s infinite`,backgroundSize:"200% 200%"}}generateMeshStyle(t){return{background:`conic-gradient(from 0deg, ${t.slice(0,4).map((t,e)=>{const i=void 0!==t.position?t.position:33.33*e;return`${t.color} ${i}%`}).join(", ")})`}}updateUI(){const e=this.parseColors(),i=this.getAttribute("direction")||"to-right",o=this.getAttribute("size")||"m",r=this.getAttribute("variant")||"default",n=Number(this.getAttribute("animation-duration")||3),a=Number(this.getAttribute("animation-delay")||0),s=this.getBool("full-width"),l=this.getBool("full-height");this.className=[t,`${t}--size-${o}`,`${t}--variant-${r}`,`${t}--direction-${i}`,s&&`${t}--full-width`,l&&`${t}--full-height`].filter(Boolean).join(" ");let d={};d="animated"===r?this.generateAnimatedStyle(e,i,n,a):"mesh"===r?this.generateMeshStyle(e):this.generateGradientStyle(e,i),Object.assign(this.style,d)}}customElements.get("db-gradient")||customElements.define("db-gradient",DbGradient);export{DbGradient};
1
+ const CLASS = 'designbase-wc-gradient';
2
+ class DbGradient extends HTMLElement {
3
+ static get observedAttributes() {
4
+ return [
5
+ 'colors',
6
+ 'direction',
7
+ 'size',
8
+ 'variant',
9
+ 'animation-duration',
10
+ 'animation-delay',
11
+ 'full-width',
12
+ 'full-height',
13
+ ];
14
+ }
15
+ connectedCallback() {
16
+ this.style.display = 'flex';
17
+ this.updateUI();
18
+ }
19
+ attributeChangedCallback() {
20
+ this.updateUI();
21
+ }
22
+ getBool(name) {
23
+ return this.hasAttribute(name) && this.getAttribute(name) !== 'false';
24
+ }
25
+ get colors() {
26
+ return this.parseColors();
27
+ }
28
+ set colors(value) {
29
+ this.setAttribute('colors', typeof value === 'string' ? value : JSON.stringify(value));
30
+ }
31
+ parseColors() {
32
+ try {
33
+ const parsed = JSON.parse(this.getAttribute('colors') || '[]');
34
+ return Array.isArray(parsed) ? parsed : [];
35
+ }
36
+ catch {
37
+ return [];
38
+ }
39
+ }
40
+ directionMap(direction) {
41
+ const map = {
42
+ 'to-right': 'to right',
43
+ 'to-left': 'to left',
44
+ 'to-bottom': 'to bottom',
45
+ 'to-top': 'to top',
46
+ 'to-bottom-right': 'to bottom right',
47
+ 'to-bottom-left': 'to bottom left',
48
+ 'to-top-right': 'to top right',
49
+ 'to-top-left': 'to top left',
50
+ radial: 'circle',
51
+ };
52
+ return map[direction];
53
+ }
54
+ colorStops(colors) {
55
+ return colors
56
+ .map((entry) => {
57
+ const position = entry.position !== undefined ? `${entry.position}%` : '';
58
+ return position ? `${entry.color} ${position}` : entry.color;
59
+ })
60
+ .join(', ');
61
+ }
62
+ generateGradientStyle(colors, direction) {
63
+ if (colors.length === 0)
64
+ return {};
65
+ const stops = this.colorStops(colors);
66
+ if (direction === 'radial') {
67
+ return { background: `radial-gradient(circle, ${stops})` };
68
+ }
69
+ return { background: `linear-gradient(${this.directionMap(direction)}, ${stops})` };
70
+ }
71
+ generateAnimatedStyle(colors, direction, duration, delay) {
72
+ const animatedStops = colors
73
+ .map((entry, index) => {
74
+ const position = entry.position !== undefined ? entry.position : 0;
75
+ const animatedPosition = (position + index * 20) % 100;
76
+ return `${entry.color} ${animatedPosition}%`;
77
+ })
78
+ .join(', ');
79
+ const gradient = direction === 'radial'
80
+ ? `radial-gradient(circle, ${animatedStops})`
81
+ : `linear-gradient(${this.directionMap(direction)}, ${animatedStops})`;
82
+ return {
83
+ background: gradient,
84
+ animation: `gradient-shift ${duration}s ease-in-out ${delay}s infinite`,
85
+ backgroundSize: '200% 200%',
86
+ };
87
+ }
88
+ generateMeshStyle(colors) {
89
+ const meshColors = colors.slice(0, 4);
90
+ const stops = meshColors
91
+ .map((entry, index) => {
92
+ const position = entry.position !== undefined ? entry.position : index * 33.33;
93
+ return `${entry.color} ${position}%`;
94
+ })
95
+ .join(', ');
96
+ return { background: `conic-gradient(from 0deg, ${stops})` };
97
+ }
98
+ updateUI() {
99
+ const colors = this.parseColors();
100
+ const direction = (this.getAttribute('direction') || 'to-right');
101
+ const size = this.getAttribute('size') || 'm';
102
+ const variant = this.getAttribute('variant') || 'default';
103
+ const duration = Number(this.getAttribute('animation-duration') || 3);
104
+ const delay = Number(this.getAttribute('animation-delay') || 0);
105
+ const fullWidth = this.getBool('full-width');
106
+ const fullHeight = this.getBool('full-height');
107
+ this.className = [
108
+ CLASS,
109
+ `${CLASS}--size-${size}`,
110
+ `${CLASS}--variant-${variant}`,
111
+ `${CLASS}--direction-${direction}`,
112
+ fullWidth && `${CLASS}--full-width`,
113
+ fullHeight && `${CLASS}--full-height`,
114
+ ]
115
+ .filter(Boolean)
116
+ .join(' ');
117
+ let style = {};
118
+ if (variant === 'animated') {
119
+ style = this.generateAnimatedStyle(colors, direction, duration, delay);
120
+ }
121
+ else if (variant === 'mesh') {
122
+ style = this.generateMeshStyle(colors);
123
+ }
124
+ else {
125
+ style = this.generateGradientStyle(colors, direction);
126
+ }
127
+ Object.assign(this.style, style);
128
+ }
129
+ }
130
+ if (!customElements.get('db-gradient'))
131
+ customElements.define('db-gradient', DbGradient);
132
+
133
+ export { DbGradient };