designbase-wp-library 0.9.4 → 0.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -245,6 +245,69 @@ window.DEWP.showToast('메시지', 'success', 3000, 'lg');
245
245
  </script>
246
246
  ```
247
247
 
248
+ ### 8-1. 캐러셀 (Carousel)
249
+ ```html
250
+ <div class="dewp-carousel dewp-carousel--image" data-dewp-carousel data-carousel-indicators="true">
251
+ <div class="dewp-carousel__viewport">
252
+ <div class="dewp-carousel__track">
253
+ <div class="dewp-carousel__slide">
254
+ <img src="image-1.jpg" alt="첫 번째 슬라이드">
255
+ <div class="dewp-carousel__slide-caption">슬라이드 설명</div>
256
+ </div>
257
+ <div class="dewp-carousel__slide">
258
+ <img src="image-2.jpg" alt="두 번째 슬라이드">
259
+ </div>
260
+ </div>
261
+ </div>
262
+ </div>
263
+ ```
264
+ ```javascript
265
+ const carouselEl = document.querySelector('.dewp-carousel');
266
+ const carouselId = DEWP.initCarousel(carouselEl, {
267
+ loop: true,
268
+ autoplay: true,
269
+ interval: 4000,
270
+ indicators: true,
271
+ });
272
+
273
+ DEWP.goToCarousel(carouselEl, 1);
274
+ DEWP.nextCarousel(carouselEl);
275
+ DEWP.prevCarousel(carouselEl);
276
+ DEWP.startCarouselAutoplay(carouselEl, 4500);
277
+ DEWP.stopCarouselAutoplay(carouselEl);
278
+ ```
279
+
280
+ > 캐러셀은 활성 슬라이드의 콘텐츠 높이에 맞춰 자동으로 뷰포트 높이를 조절합니다.
281
+
282
+ ### 8-2. 라이트박스 (Lightbox)
283
+ ```html
284
+ <div class="dewp-lightbox-gallery">
285
+ <button type="button"
286
+ data-dewp-lightbox="gallery-a"
287
+ data-lightbox-src="large-1.jpg"
288
+ data-lightbox-caption="이미지 설명 1">
289
+ <img src="thumb-1.jpg" alt="이미지 1 썸네일">
290
+ </button>
291
+ <button type="button"
292
+ data-dewp-lightbox="gallery-a"
293
+ data-lightbox-src="large-2.jpg"
294
+ data-lightbox-caption="이미지 설명 2">
295
+ <img src="thumb-2.jpg" alt="이미지 2 썸네일">
296
+ </button>
297
+ </div>
298
+ ```
299
+ ```javascript
300
+ DEWP.registerLightbox('.dewp-lightbox-gallery', {
301
+ loop: true,
302
+ swipe: true,
303
+ showCaption: true,
304
+ });
305
+
306
+ DEWP.openLightbox('gallery-a', 0);
307
+ DEWP.nextLightbox();
308
+ DEWP.closeLightbox();
309
+ ```
310
+
248
311
  ### 9. 폼 요소 (Forms)
249
312
  ```html
250
313
  <!-- 입력 필드 -->