peek-carousel 1.1.1 → 2.0.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.
- package/COPYRIGHT.md +50 -28
- package/LICENSE +68 -18
- package/LICENSE-MIT +22 -0
- package/README.en.md +49 -19
- package/README.md +44 -18
- package/THIRD_PARTY_NOTICES.md +53 -24
- package/dist/peek-carousel.cjs +2 -2
- package/dist/peek-carousel.css +2 -2
- package/dist/peek-carousel.esm.js +2 -2
- package/dist/peek-carousel.js +2 -2
- package/dist/peek-carousel.min.css +2 -2
- package/docs/en/reference.md +14 -16
- package/docs/integrations.md +120 -29
- package/docs/ko/reference.md +11 -12
- package/examples/custom-theme.css +292 -46
- package/examples/custom-theme.html +96 -62
- package/examples/custom-theme.ja.html +103 -0
- package/examples/custom-theme.js +6 -121
- package/examples/custom-theme.ko.html +102 -0
- package/examples/example-built.html +80 -63
- package/examples/example-built.ja.html +172 -0
- package/examples/example-built.ko.html +171 -0
- package/examples/example.min.css +3 -3
- package/examples/example.min.js +3 -3
- package/package.json +24 -8
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/fonts/OFL-noto.txt +93 -0
- package/public/fonts/OFL-pretendard.txt +94 -0
- package/public/fonts/inter-latin.css +1 -1
- package/public/fonts/noto-sans-ja-bold.woff2 +0 -0
- package/public/fonts/noto-sans-ja.css +70 -0
- package/public/fonts/noto-sans-ja.woff2 +0 -0
- package/public/fonts/peek-preview-kr.css +53 -0
- package/public/fonts/peek-preview-kr.woff2 +0 -0
- package/public/peek-mark.svg +5 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="ko">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>PeekCarousel — JavaScript 캐러셀 데모와 4가지 레이아웃</title>
|
|
7
|
+
<meta name="description" content="Stack·Radial·Classic·Fan shape 레이아웃을 직접 체험하세요. 터치, 키보드, 자동 재생과 CSS 테마를 지원하는 런타임 의존성 없는 JavaScript 캐러셀입니다.">
|
|
8
|
+
<meta name="robots" content="index, follow, max-image-preview:large">
|
|
9
|
+
<meta name="theme-color" content="#ffffff">
|
|
10
|
+
<meta property="og:type" content="website">
|
|
11
|
+
<meta property="og:site_name" content="PeekCarousel">
|
|
12
|
+
<meta property="og:locale" content="ko_KR">
|
|
13
|
+
<meta property="og:url" content="https://lledellebell.github.io/peek-carousel/examples/example-built.ko.html">
|
|
14
|
+
<meta property="og:title" content="PeekCarousel — JavaScript 캐러셀 데모와 4가지 레이아웃">
|
|
15
|
+
<meta property="og:description" content="Stack·Radial·Classic·Fan shape 레이아웃을 직접 체험하세요. 터치, 키보드, 자동 재생과 CSS 테마를 지원하는 런타임 의존성 없는 JavaScript 캐러셀입니다.">
|
|
16
|
+
<meta property="og:image" content="https://lledellebell.github.io/peek-carousel/public/assets/share_image.png">
|
|
17
|
+
<meta property="og:image:type" content="image/png">
|
|
18
|
+
<meta property="og:image:width" content="1200">
|
|
19
|
+
<meta property="og:image:height" content="720">
|
|
20
|
+
<meta property="og:image:alt" content="흰 배경에 파란 컨트롤과 사진 카드를 배치한 PeekCarousel">
|
|
21
|
+
<meta name="twitter:card" content="summary_large_image">
|
|
22
|
+
<meta name="twitter:title" content="PeekCarousel — JavaScript 캐러셀 데모와 4가지 레이아웃">
|
|
23
|
+
<meta name="twitter:description" content="Stack·Radial·Classic·Fan shape 레이아웃을 직접 체험하세요. 터치, 키보드, 자동 재생과 CSS 테마를 지원하는 런타임 의존성 없는 JavaScript 캐러셀입니다.">
|
|
24
|
+
<meta name="twitter:image" content="https://lledellebell.github.io/peek-carousel/public/assets/share_image.png">
|
|
25
|
+
<meta name="twitter:image:alt" content="흰 배경에 파란 컨트롤과 사진 카드를 배치한 PeekCarousel">
|
|
26
|
+
<link rel="canonical" href="https://lledellebell.github.io/peek-carousel/examples/example-built.ko.html">
|
|
27
|
+
<link rel="alternate" hreflang="en" href="https://lledellebell.github.io/peek-carousel/examples/example-built.html">
|
|
28
|
+
<link rel="alternate" hreflang="ja" href="https://lledellebell.github.io/peek-carousel/examples/example-built.ja.html">
|
|
29
|
+
<link rel="alternate" hreflang="ko" href="https://lledellebell.github.io/peek-carousel/examples/example-built.ko.html">
|
|
30
|
+
<link rel="alternate" hreflang="x-default" href="https://lledellebell.github.io/peek-carousel/examples/example-built.html">
|
|
31
|
+
<meta property="og:locale:alternate" content="en_US">
|
|
32
|
+
<meta property="og:locale:alternate" content="ja_JP">
|
|
33
|
+
<script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://lledellebell.github.io/peek-carousel/examples/example-built.ko.html","url":"https://lledellebell.github.io/peek-carousel/examples/example-built.ko.html","name":"PeekCarousel — JavaScript 캐러셀 데모와 4가지 레이아웃","description":"Stack·Radial·Classic·Fan shape 레이아웃을 직접 체험하세요. 터치, 키보드, 자동 재생과 CSS 테마를 지원하는 런타임 의존성 없는 JavaScript 캐러셀입니다.","inLanguage":"ko","mainEntity":{"@id":"https://lledellebell.github.io/peek-carousel/examples/example-built.html#library-source"}},{"@type":"SoftwareSourceCode","@id":"https://lledellebell.github.io/peek-carousel/examples/example-built.html#library-source","name":"PeekCarousel","description":"Stack·Radial·Classic·Fan shape 레이아웃을 직접 체험하세요. 터치, 키보드, 자동 재생과 CSS 테마를 지원하는 런타임 의존성 없는 JavaScript 캐러셀입니다.","programmingLanguage":"JavaScript","runtimePlatform":"Web browser","license":"https://github.com/lledellebell/peek-carousel-docs/blob/main/LICENSE","url":"https://github.com/lledellebell/peek-carousel-docs"}]}</script>
|
|
34
|
+
|
|
35
|
+
<link rel="preload" href="../public/fonts/peek-preview-kr.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
36
|
+
<link rel="stylesheet" href="../public/fonts/peek-preview-kr.css">
|
|
37
|
+
<link rel="icon" type="image/png" sizes="16x16" href="../public/favicon-16x16.png">
|
|
38
|
+
<link rel="icon" type="image/png" sizes="32x32" href="../public/favicon-32x32.png">
|
|
39
|
+
<link rel="icon" type="image/svg+xml" sizes="any" href="../public/peek-mark.svg">
|
|
40
|
+
<link rel="stylesheet" href="../dist/peek-carousel.min.css">
|
|
41
|
+
<link rel="stylesheet" href="./example.min.css">
|
|
42
|
+
|
|
43
|
+
</head>
|
|
44
|
+
<body class="preview">
|
|
45
|
+
<a class="preview__skip" href="#demo-carousel">미리보기로 건너뛰기</a>
|
|
46
|
+
<header class="preview__header">
|
|
47
|
+
<a class="preview__brand" href="#"><img class="preview__brand_mark" src="../public/peek-mark.svg" alt="" width="32" height="32"> PeekCarousel</a>
|
|
48
|
+
<nav class="preview__nav" aria-label="주요 탐색">
|
|
49
|
+
<a href="#layout-controls" aria-current="page">미리보기</a>
|
|
50
|
+
<a href="https://github.com/lledellebell/peek-carousel-docs/blob/main/README.md">문서 <span aria-hidden="true">↗</span></a>
|
|
51
|
+
<a href="https://github.com/lledellebell/peek-carousel-docs">GitHub <span aria-hidden="true">↗</span></a>
|
|
52
|
+
</nav>
|
|
53
|
+
<details class="preview__language_menu" id="language-menu"><summary aria-label="언어 선택: 한국어"><svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="6" fill="none" stroke="currentColor"/><path d="M2 8h12M8 2c-3 3-3 9 0 12M8 2c3 3 3 9 0 12" fill="none" stroke="currentColor"/></svg><span>한국어</span><svg width="12" height="12" viewBox="0 0 12 12" aria-hidden="true"><path d="m3 4.5 3 3 3-3" fill="none" stroke="currentColor" stroke-width="1.5"/></svg></summary><nav class="preview__languages" aria-label="언어 선택">
|
|
54
|
+
<a href="./example-built.html" lang="en" hreflang="en" aria-label="EN — English">EN</a>
|
|
55
|
+
<a href="./example-built.ja.html" lang="ja" hreflang="ja" aria-label="日本語">日本語</a>
|
|
56
|
+
<a href="./example-built.ko.html" lang="ko" hreflang="ko" aria-label="한국어" aria-current="page">한국어</a>
|
|
57
|
+
</nav></details>
|
|
58
|
+
</header>
|
|
59
|
+
<main>
|
|
60
|
+
<section class="preview__hero" aria-labelledby="hero-title">
|
|
61
|
+
<div class="preview__hero_copy">
|
|
62
|
+
<p class="preview__eyebrow"><svg class="preview__tagline_icon" width="18" height="18" viewBox="0 0 64 64" fill="none" aria-hidden="true" focusable="false"><rect x="6" y="15" width="32" height="40" rx="7" transform="rotate(-12 22 35)" stroke="currentColor" stroke-width="3"/><rect x="24" y="7" width="32" height="44" rx="7" fill="currentColor"/><path d="M47 17v24" stroke="white" stroke-width="3" stroke-linecap="round"/></svg><span class="preview__hero_tagline">작은 라이브러리. 새로운 시선.</span></p>
|
|
63
|
+
<h1 id="hero-title"><span>네 가지 레이아웃. </span><span class="preview__hero_accent">하나의 캐러셀.</span></h1>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="preview__hero_summary">
|
|
66
|
+
<div class="preview__intro"><p>런타임 의존성 없는 JavaScript 캐러셀입니다.<br>터치, 키보드, 자동 재생을 직접 체험하세요.</p></div>
|
|
67
|
+
<div class="preview__hero_actions">
|
|
68
|
+
<a class="preview__hero_action" href="#layout-controls">레이아웃 체험<svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 3v10m-4-4 4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg></a>
|
|
69
|
+
<a class="preview__link" href="https://github.com/lledellebell/peek-carousel-docs/blob/main/README.md#설치">설치 안내<span aria-hidden="true">↗</span></a>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="preview__install_wrapper"><div class="preview__install"><code id="install-command" tabindex="0">npm install peek-carousel</code><button class="preview__install_copy" id="install-copy" type="button" aria-label="코드 복사: npm install peek-carousel" data-pending="복사 중..." data-success="코드 복사 성공" data-fallback="코드를 선택하고 복사하세요." disabled><svg width="18" height="18" viewBox="0 0 18 18" aria-hidden="true"><rect x="6" y="6" width="9" height="9" rx="2" fill="none" stroke="currentColor" stroke-width="1.4"/><path d="M11 3H5a2 2 0 0 0-2 2v6" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/></svg></button></div><p id="install-copy-status" class="preview__install_status" role="status"></p></div>
|
|
72
|
+
</div>
|
|
73
|
+
</section>
|
|
74
|
+
<section class="playground playground__gallery" aria-labelledby="playground-title">
|
|
75
|
+
<div class="playground__preview">
|
|
76
|
+
<div class="playground__toolbar">
|
|
77
|
+
<h2 class="preview__eyebrow" id="playground-title"><span class="preview__section_number" aria-hidden="true">01</span>직접 만나는 캐러셀</h2>
|
|
78
|
+
<span class="playground__live"><svg class="playground__live_icon" width="18" height="18" viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><rect x="3" y="5" width="18" height="14" rx="4" stroke="currentColor" stroke-width="1.5"/><path d="m10 9 5 3-5 3Z" fill="currentColor"/></svg>실시간 미리보기</span>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="playground__mode_bar" id="layout-controls" tabindex="-1"><h3 id="settings-title">레이아웃 선택</h3>
|
|
81
|
+
<div class="playground__layout_picker" role="group" aria-label="레이아웃 선택">
|
|
82
|
+
<button type="button" class="playground__layout" data-layout="stack" data-description="익숙한 겹침 사이로, 새로운 발견." aria-pressed="true" disabled><span>Stack</span><svg class="playground__layout_check" width="12" height="12" viewBox="0 0 16 16" aria-hidden="true"><path d="m3 8 3 3 7-7" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></button>
|
|
83
|
+
<button type="button" class="playground__layout" data-layout="radial" data-description="돌릴 때마다, 새로운 시선." aria-pressed="false" disabled><span>Radial</span><svg class="playground__layout_check" width="12" height="12" viewBox="0 0 16 16" aria-hidden="true"><path d="m3 8 3 3 7-7" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></button>
|
|
84
|
+
<button type="button" class="playground__layout" data-layout="classic" data-description="한 장씩, 편안한 리듬으로." aria-pressed="false" disabled><span>Classic</span><svg class="playground__layout_check" width="12" height="12" viewBox="0 0 16 16" aria-hidden="true"><path d="m3 8 3 3 7-7" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></button>
|
|
85
|
+
<button type="button" class="playground__layout" data-layout="fan" data-description="부채처럼 펼쳐지는, 다음 풍경." aria-pressed="false" disabled><span>Fan shape</span><svg class="playground__layout_check" width="12" height="12" viewBox="0 0 16 16" aria-hidden="true"><path d="m3 8 3 3 7-7" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></button>
|
|
86
|
+
</div></div>
|
|
87
|
+
<p class="playground__quick_help" id="gallery-quick-help">드래그하거나 ← / → 키로 이동하세요.</p>
|
|
88
|
+
<noscript><p>직접 조작하려면 JavaScript가 필요합니다. 레이아웃 설명과 시작 코드는 아래에서 읽을 수 있습니다.</p></noscript>
|
|
89
|
+
<div class="playground__stage" id="playground-stage" tabindex="-1">
|
|
90
|
+
<p class="playground__label" data-layout-label>01 / STACK</p>
|
|
91
|
+
<div class="peek-carousel" id="demo-carousel" tabindex="0" role="region" aria-label="사진 갤러리" aria-roledescription="캐러셀" data-demo-a11y="{"slide":"슬라이드","position":"전체 {total}장 중 {current}번째","show":"전체 {total}장 중 {current}번째 슬라이드 표시","choose":"슬라이드 선택","previous":"이전 슬라이드","next":"다음 슬라이드","start":"자동 재생 시작","stop":"자동 재생 중지"}" aria-describedby="gallery-quick-help">
|
|
92
|
+
<div class="peek-carousel__track">
|
|
93
|
+
<div class="peek-carousel__item">
|
|
94
|
+
<figure class="peek-carousel__figure">
|
|
95
|
+
<img class="peek-carousel__image" src="https://picsum.photos/id/1015/650/490.webp" alt="푸른 피오르 위로 솟은 바위산" width="650" height="490">
|
|
96
|
+
<figcaption class="peek-carousel__caption"><span class="preview__caption_title">고요한 사이</span><span class="preview__caption_subtitle">바위와 물, 탁 트인 하늘</span></figcaption>
|
|
97
|
+
</figure>
|
|
98
|
+
</div>
|
|
99
|
+
<div class="peek-carousel__item">
|
|
100
|
+
<figure class="peek-carousel__figure">
|
|
101
|
+
<img class="peek-carousel__image" src="https://picsum.photos/id/1018/650/490.webp" alt="안개 낀 계곡을 둘러싼 초록 절벽" width="650" height="490">
|
|
102
|
+
<figcaption class="peek-carousel__caption"><span class="preview__caption_title">조금 더 느린 곳</span><span class="preview__caption_subtitle">일상에서 한 걸음 멀리</span></figcaption>
|
|
103
|
+
</figure>
|
|
104
|
+
</div>
|
|
105
|
+
<div class="peek-carousel__item">
|
|
106
|
+
<figure class="peek-carousel__figure">
|
|
107
|
+
<img class="peek-carousel__image" src="https://picsum.photos/id/1019/650/490.webp" alt="흐린 하늘 아래 펼쳐진 해안 풍경" width="650" height="490">
|
|
108
|
+
<figcaption class="peek-carousel__caption"><span class="preview__caption_title">푸른빛 너머로</span><span class="preview__caption_subtitle">해안선을 따라서</span></figcaption>
|
|
109
|
+
</figure>
|
|
110
|
+
</div>
|
|
111
|
+
<div class="peek-carousel__item">
|
|
112
|
+
<figure class="peek-carousel__figure">
|
|
113
|
+
<img class="peek-carousel__image" src="https://picsum.photos/id/1025/650/490.webp" alt="담요에 싸인 퍼그" width="650" height="490">
|
|
114
|
+
<figcaption class="peek-carousel__caption"><span class="preview__caption_title">함께하는 순간</span><span class="preview__caption_subtitle">작은 순간, 커다란 개성</span></figcaption>
|
|
115
|
+
</figure>
|
|
116
|
+
</div>
|
|
117
|
+
<div class="peek-carousel__item">
|
|
118
|
+
<figure class="peek-carousel__figure">
|
|
119
|
+
<img class="peek-carousel__image" src="https://picsum.photos/id/1035/650/490.webp" alt="물이 흐르는 자연 풍경" width="650" height="490">
|
|
120
|
+
<figcaption class="peek-carousel__caption"><span class="preview__caption_title">흐름을 따라서</span><span class="preview__caption_subtitle">풍경을 즐기는 돌아가는 길</span></figcaption>
|
|
121
|
+
</figure>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
<p class="playground__description" data-layout-description aria-live="polite">익숙한 겹침 사이로, 새로운 발견.</p>
|
|
127
|
+
</div>
|
|
128
|
+
<div class="playground__settings">
|
|
129
|
+
<details class="playground__options"><summary>재생·탐색 설정<svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"><path d="m4 6 4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></summary><div class="playground__options_content"><fieldset class="playground__toggles"><legend>재생·탐색 설정</legend>
|
|
130
|
+
<label class="playground__toggle" for="show-navigation"><span>좌우 탐색 버튼</span><input type="checkbox" role="switch" id="show-navigation" checked><span class="playground__toggle_track" aria-hidden="true"></span></label>
|
|
131
|
+
<label class="playground__toggle" for="show-counter"><span>슬라이드 카운터</span><input type="checkbox" role="switch" id="show-counter" checked><span class="playground__toggle_track" aria-hidden="true"></span></label>
|
|
132
|
+
<label class="playground__toggle" for="show-indicators"><span>진행 표시</span><input type="checkbox" role="switch" id="show-indicators" checked><span class="playground__toggle_track" aria-hidden="true"></span></label>
|
|
133
|
+
<label class="playground__toggle" for="show-auto-rotate-button"><span>재생 컨트롤</span><input type="checkbox" role="switch" id="show-auto-rotate-button" checked><span class="playground__toggle_track" aria-hidden="true"></span></label>
|
|
134
|
+
</fieldset><div class="playground__help"><h3>다양한 조작 방식</h3><p id="gallery-help">카드를 드래그하거나 스와이프하세요. 갤러리 위에서 휠을 사용하거나 초점을 둔 뒤 ← / →로 이동할 수 있습니다. Home / End는 처음과 끝으로, Space는 재생을 전환합니다. 포인터나 초점이 갤러리에 들어오면 자동 재생이 멈춥니다.</p></div></div></details>
|
|
135
|
+
</div>
|
|
136
|
+
</section>
|
|
137
|
+
<section class="preview__layouts" id="carousel-layouts" aria-labelledby="layouts-title">
|
|
138
|
+
<div class="preview__section_intro"><p class="preview__eyebrow"><span class="preview__section_number" aria-hidden="true">02</span>같은 콘텐츠, 다른 분위기.</p><h2 id="layouts-title">네 가지 JavaScript 캐러셀.</h2><p>layoutMode로 레이아웃을 고르세요. 모든 레이아웃에서 순환 탐색, 터치, 마우스와 재생 컨트롤을 사용할 수 있습니다.</p></div>
|
|
139
|
+
<div class="preview__layout_grid"><article id="layout-stack" data-layout-card="stack" data-current="true"><div class="preview__layout_art" data-layout-art="stack" aria-hidden="true"><span></span><span></span><span></span><svg class="preview__layout_check" viewBox="0 0 16 16" aria-hidden="true"><path d="m3 8 3 3 7-7" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></div><h3>Stack</h3><p>겹친 카드가 현재 사진을 강조하고 양옆으로 이웃한 사진을 보여줍니다.</p><code>layoutMode: 'stack'</code><a class="preview__layout_try" href="#playground-stage" data-try-layout="stack" aria-current="true" aria-label="Stack — 미리보기">미리보기<span aria-hidden="true"><svg width="16" height="16" viewBox="0 0 16 16"><path d="M8 13V3m-4 4 4-4 4 4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg></span></a></article>
|
|
140
|
+
<article id="layout-radial" data-layout-card="radial" data-current="false"><div class="preview__layout_art" data-layout-art="radial" aria-hidden="true"><span></span><span></span><span></span><svg class="preview__layout_check" viewBox="0 0 16 16" aria-hidden="true"><path d="m3 8 3 3 7-7" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></div><h3>Radial</h3><p>입체적인 고리를 따라 카드가 회전하며 선택한 사진을 앞으로 가져옵니다.</p><code>layoutMode: 'radial'</code><a class="preview__layout_try" href="#playground-stage" data-try-layout="radial" aria-current="false" aria-label="Radial — 미리보기">미리보기<span aria-hidden="true"><svg width="16" height="16" viewBox="0 0 16 16"><path d="M8 13V3m-4 4 4-4 4 4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg></span></a></article>
|
|
141
|
+
<article id="layout-classic" data-layout-card="classic" data-current="false"><div class="preview__layout_art" data-layout-art="classic" aria-hidden="true"><span></span><span></span><span></span><svg class="preview__layout_check" viewBox="0 0 16 16" aria-hidden="true"><path d="m3 8 3 3 7-7" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></div><h3>Classic</h3><p>사진이 가로로 움직이는 익숙한 순환형 슬라이더입니다.</p><code>layoutMode: 'classic'</code><a class="preview__layout_try" href="#playground-stage" data-try-layout="classic" aria-current="false" aria-label="Classic — 미리보기">미리보기<span aria-hidden="true"><svg width="16" height="16" viewBox="0 0 16 16"><path d="M8 13V3m-4 4 4-4 4 4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg></span></a></article>
|
|
142
|
+
<article id="layout-fan" data-layout-card="fan" data-current="false"><div class="preview__layout_art" data-layout-art="fan" aria-hidden="true"><span></span><span></span><span></span><svg class="preview__layout_check" viewBox="0 0 16 16" aria-hidden="true"><path d="m3 8 3 3 7-7" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></div><h3>Fan shape</h3><p>최대 다섯 장의 카드가 부채 모양으로 펼쳐집니다. 끝의 카드는 페이드 없이 앞쪽 카드 뒤로 이동합니다.</p><code>layoutMode: 'fan'</code><a class="preview__layout_try" href="#playground-stage" data-try-layout="fan" aria-current="false" aria-label="Fan shape — 미리보기">미리보기<span aria-hidden="true"><svg width="16" height="16" viewBox="0 0 16 16"><path d="M8 13V3m-4 4 4-4 4 4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg></span></a></article></div>
|
|
143
|
+
</section>
|
|
144
|
+
<section class="preview__usage" id="getting-started" aria-labelledby="usage-title">
|
|
145
|
+
<div><p class="preview__eyebrow"><span class="preview__section_number" aria-hidden="true">03</span>설정은 가볍게, 경험은 풍부하게.</p><h2 id="usage-title">몇 줄의 코드, 더 많은 가능성.</h2><p>#gallery-carousel 안에 .peek-carousel__track과 .peek-carousel__item을 추가하세요. CSS를 불러오고 DOM이 준비된 뒤 초기화합니다.</p><a class="preview__link" href="https://github.com/lledellebell/peek-carousel-docs/blob/main/README.md">문서 살펴보기 <span aria-hidden="true">↗</span></a></div>
|
|
146
|
+
<figure class="preview__code"><figcaption class="preview__code_heading"><span data-code-filename>gallery.js</span><button class="preview__code_copy" id="starter-copy" type="button" data-pending="복사 중..." data-success="코드 복사 성공" data-fallback="코드를 선택하고 복사하세요." disabled>코드 복사</button></figcaption><div class="preview__code_tabs" role="tablist" aria-label="JavaScript 시작 예제"><button type="button" role="tab" id="starter-tab-vanilla" data-code-format="vanilla" aria-controls="starter-panel" aria-selected="true" tabindex="0" disabled>Vanilla JS</button><button type="button" role="tab" id="starter-tab-react" data-code-format="react" aria-controls="starter-panel" aria-selected="false" tabindex="-1" disabled>React</button><button type="button" role="tab" id="starter-tab-cdn" data-code-format="cdn" aria-controls="starter-panel" aria-selected="false" tabindex="-1" disabled>CDN</button></div><pre id="starter-panel" tabindex="0" role="tabpanel" aria-labelledby="starter-tab-vanilla"><code data-demo-code>import PeekCarousel from 'peek-carousel';
|
|
147
|
+
import 'peek-carousel/dist/peek-carousel.css';
|
|
148
|
+
|
|
149
|
+
new PeekCarousel('#gallery-carousel', {
|
|
150
|
+
layoutMode: 'stack',
|
|
151
|
+
startIndex: 0,
|
|
152
|
+
});</code></pre><p class="preview__code_status" id="starter-copy-status" role="status"></p></figure>
|
|
153
|
+
</section>
|
|
154
|
+
<section class="preview__questions" id="carousel-questions" aria-labelledby="questions-title">
|
|
155
|
+
<div class="preview__section_intro"><p class="preview__eyebrow"><span class="preview__section_number" aria-hidden="true">04</span>알아두면 좋은 이야기</p><h2 id="questions-title">자주 묻는 질문.</h2></div>
|
|
156
|
+
<div class="preview__faq_list">
|
|
157
|
+
<details open><summary>React 같은 프레임워크가 필요한가요?<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M3 8h10M8 3v10" fill="none" stroke="currentColor" stroke-width="1.5"/></svg></summary><div class="preview__faq_answer"><p>아니요. 런타임 의존성 없는 바닐라 JavaScript 라이브러리입니다. ESM, CommonJS와 브라우저 UMD 빌드를 제공합니다.</p></div></details>
|
|
158
|
+
<details open><summary>TypeScript나 Python·Go 프로젝트에서도 쓸 수 있나요?<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M3 8h10M8 3v10" fill="none" stroke="currentColor" stroke-width="1.5"/></svg></summary><div class="preview__faq_answer"><p>TypeScript 타입 선언을 포함합니다. 다른 웹 서버에서도 같은 브라우저 JS와 CSS를 제공할 수 있습니다. 서버 언어 전용 API는 아닙니다. <a href="https://github.com/lledellebell/peek-carousel-docs/blob/main/docs/integrations.md">프로젝트 통합 안내</a></p></div></details>
|
|
159
|
+
<details open><summary>어떤 컨트롤을 체험할 수 있나요?<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M3 8h10M8 3v10" fill="none" stroke="currentColor" stroke-width="1.5"/></svg></summary><div class="preview__faq_answer"><p>드래그, 스와이프와 휠을 사용하세요. 갤러리에 초점을 두면 방향키, Home, End와 Space도 동작합니다. 설정에서 탐색, 카운터, 진행 표시와 재생 버튼을 켜고 끌 수 있습니다.</p></div></details>
|
|
160
|
+
<details><summary>스타일을 바꿀 수 있나요?<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M3 8h10M8 3v10" fill="none" stroke="currentColor" stroke-width="1.5"/></svg></summary><div class="preview__faq_answer"><p>네. CSS 변수로 카드 모서리, 그림자, 색상과 컨트롤을 조정할 수 있습니다. <a href="./custom-theme.ko.html">CSS 테마 미리보기</a></p></div></details>
|
|
161
|
+
<details><summary>상업용 프로젝트에 사용할 수 있나요?<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M3 8h10M8 3v10" fill="none" stroke="currentColor" stroke-width="1.5"/></svg></summary><div class="preview__faq_answer"><p>네. 출처와 필수 고지를 유지하면 자신의 앱에서 상업적으로 사용할 수 있습니다. 새 자료를 라이브러리나 템플릿 자체로 재배포하려면 허가가 필요합니다. 기존 MIT와 사진의 권한은 유지됩니다.</p></div></details>
|
|
162
|
+
<details><summary>JavaScript 없이도 볼 수 있나요?<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M3 8h10M8 3v10" fill="none" stroke="currentColor" stroke-width="1.5"/></svg></summary><div class="preview__faq_answer"><p>레이아웃 설명, 시작 코드, 언어 링크와 질문·답변은 정적 HTML입니다. 직접 조작하는 미리보기에는 JavaScript가 필요합니다.</p></div></details>
|
|
163
|
+
</div>
|
|
164
|
+
<p class="preview__sources"><a href="https://github.com/lledellebell/peek-carousel-docs/blob/main/README.md">소스와 API 문서 <span aria-hidden="true">↗</span></a></p>
|
|
165
|
+
</section>
|
|
166
|
+
</main>
|
|
167
|
+
<footer class="preview__footer"><span><strong class="preview__footer_brand">PeekCarousel</strong><span class="preview__footer_note">— 시선을 조금 더 넓게.</span></span><span>Vanilla JavaScript · <a href="https://github.com/lledellebell/peek-carousel-docs/blob/main/LICENSE" >앱 이용 조건</a></span><small class="preview__copyright">© 2025 PeekCarousel · © 2026 PeekCarousel contributors. <a href="https://github.com/lledellebell/peek-carousel-docs/blob/main/COPYRIGHT.md">저작권과 재사용 조건</a> · <a href="https://github.com/lledellebell/peek-carousel-docs/blob/main/THIRD_PARTY_NOTICES.md">이미지 권리와 출처</a></small></footer>
|
|
168
|
+
<script src="../dist/peek-carousel.js"></script>
|
|
169
|
+
<script src="./example.min.js"></script>
|
|
170
|
+
</body>
|
|
171
|
+
</html>
|
package/examples/example.min.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! PeekCarousel
|
|
1
|
+
/*! PeekCarousel v2.0.1
|
|
2
2
|
* Copyright (c) 2025 PeekCarousel
|
|
3
3
|
* Copyright (c) 2026 PeekCarousel contributors
|
|
4
|
-
* @license
|
|
4
|
+
* @license See LICENSE, LICENSE-MIT and THIRD_PARTY_NOTICES.md.
|
|
5
5
|
*/
|
|
6
|
-
:root{background:#f6f5f1;color:#252822;color-scheme:light;font-family:Inter,Helvetica Neue,Arial,sans-serif;font-synthesis:none;-webkit-font-smoothing:antialiased;--ink:#252822;--muted:#6a7065;--line:#dedfd6;--accent:#d9fb75}*{box-sizing:border-box}body{margin:0}a{color:inherit;text-decoration:none}button,input{font:inherit}a,button,input,summary{-webkit-tap-highlight-color:transparent}.playground__stage [role=region]:focus-visible,.playground__stage:focus-visible,a:focus-visible,button:focus-visible,input:focus-visible,pre:focus-visible,summary:focus-visible{outline:2px solid #53632d;outline-offset:5px}button{cursor:pointer}.preview{margin:auto;max-width:1440px;padding:0 64px}.preview__header{align-items:center;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;min-height:100px}.preview__brand{align-items:center;display:flex;font-size:20px;font-weight:650;gap:10px;letter-spacing:-.8px}.preview__brand_mark{font-size:35px;transform:rotate(-15deg)}.preview__nav{align-items:center;display:flex;font-size:13px;gap:30px}.preview__nav a{padding:10px 0}.preview__nav [aria-current]{border-bottom:1px solid var(--ink)}.preview__nav span{color:var(--muted);margin-left:5px}.preview__hero{padding:65px 0 46px}.preview__eyebrow{font-size:10px;font-weight:650;letter-spacing:1.6px}.preview__hero>.preview__eyebrow{align-items:center;display:flex;gap:9px;margin:0 0 25px}.preview__status{background:#668136;border-radius:50%;display:inline-block;height:6px;width:6px}h1{font-size:clamp(42px,5.4vw,76px);font-weight:500;letter-spacing:-4px;line-height:1.06;margin:0}h1 span{color:#7c8274}.preview__intro{align-items:flex-end;display:flex;justify-content:space-between;margin-top:24px}.preview__intro p,.preview__usage p{color:var(--muted);font-size:14px;line-height:1.7;margin:0}.preview__link{align-items:center;border-bottom:1px solid var(--ink);display:inline-flex;font-size:13px;font-weight:600;gap:24px;padding:12px 0}.playground{border-top:1px solid var(--line);display:grid;gap:36px;grid-template-columns:minmax(0,1fr) 275px;padding-top:25px}.playground__preview{min-width:0}.playground__toolbar{align-items:center;display:flex;justify-content:space-between;margin-bottom:17px}.playground__live{align-items:center;color:var(--muted);display:flex;font-size:11px;gap:7px}.playground__stage{background:#e9ecdf;border:1px solid #d9ddcf;border-radius:14px;height:490px;isolation:isolate;overflow:hidden;position:relative}.playground__label{color:#59614c;display:flex;font-size:10px;inset:22px 24px auto;justify-content:space-between;letter-spacing:1px;z-index:1}.playground__hint,.playground__label{margin:0;pointer-events:none;position:absolute}.playground__hint{bottom:15px;color:#5f6853;font-size:11px;left:24px;letter-spacing:1.3px}.playground__hint span{margin-left:10px}.playground__description{color:var(--muted);font-size:12px;margin:16px 0 0}.playground__settings{padding-top:1px}.playground__settings h2{font-size:27px;font-weight:500;letter-spacing:-.8px;line-height:1.15;margin:28px 0 10px}.playground__settings_intro{color:var(--muted);font-size:12px;margin-bottom:22px}.playground__layout_picker{display:grid;gap:8px;grid-template-columns:1fr 1fr}.playground__layout{align-items:flex-start;background:transparent;border:1px solid var(--line);border-radius:8px;color:var(--ink);display:flex;flex-direction:column;font-size:11px;gap:7px;justify-content:center;min-height:78px;padding:12px;position:relative;transition:background .2s,border-color .2s}.playground__layout:hover{border-color:#939c85}.playground__layout[aria-pressed=true]{background:var(--accent);border-color:#abc850}.playground__layout_mark{font-size:24px;line-height:1}.playground__layout_number{color:#626a57;font-size:9px;position:absolute;right:12px;top:13px}.playground__toggles{border:0;border-top:1px solid var(--line);margin:26px 0 0;min-width:0;padding:17px 0 0}.playground__toggles legend{color:var(--muted);font-size:11px;letter-spacing:1.3px;padding:0 10px 0 0}.playground__toggle{align-items:center;cursor:pointer;display:flex;font-size:12px;justify-content:space-between;min-height:44px;position:relative}.playground__toggle input{cursor:pointer;height:22px;margin:0;opacity:0;position:absolute;right:0;width:36px}.playground__toggle_track{background:#d8ddce;border:1px solid #abb29f;border-radius:999px;flex-shrink:0;height:22px;pointer-events:none;position:relative;transition:background-color .18s,border-color .18s;width:36px}.playground__toggle_track:before{background:#fff;border-radius:50%;box-shadow:0 1px 3px rgba(31,46,19,.2);content:"";height:16px;left:2px;position:absolute;top:2px;transition:transform .18s;width:16px}.playground__toggle input:checked+.playground__toggle_track{background:#414e31;border-color:#414e31}.playground__toggle input:checked+.playground__toggle_track:before{transform:translateX(14px)}.playground__toggle input:focus+.playground__toggle_track{outline:2px solid #53632d;outline-offset:3px}.playground__help{border-top:1px solid var(--line);font-size:11px;margin-top:17px;padding-top:17px}.playground__help summary{cursor:pointer;display:flex;justify-content:space-between;list-style:none}.playground__help summary::-webkit-details-marker{display:none}.playground__help p{color:var(--muted);line-height:1.7}.preview__usage{align-items:center;border-top:1px solid var(--line);display:grid;gap:64px;grid-template-columns:1fr 1.35fr;margin-top:50px;padding:45px 0 55px}.preview__usage .preview__eyebrow{color:var(--ink);font-size:10px}.preview__usage h2{font-size:32px;font-weight:500;letter-spacing:-1px;line-height:1.12;margin:15px 0}.preview__usage .preview__link{margin-top:15px}.preview__code{background:#272e25;border-radius:12px;color:#e8efdc;margin:0;overflow:hidden}.preview__code_heading{border-bottom:1px solid #454d3f;color:#b6c0ab;display:flex;font:10px ui-monospace,monospace;justify-content:space-between;padding:18px 24px}.preview__code pre{font:12px/1.9 ui-monospace,SFMono-Regular,Consolas,monospace;margin:0;overflow-x:auto;padding:27px 24px 30px}.preview__footer{border-top:1px solid var(--line);display:flex;flex-wrap:wrap;font-size:11px;justify-content:space-between;padding:24px 0 30px;row-gap:14px}.preview__footer>span:nth-child(2),.preview__footer_note{color:var(--muted)}.preview__skip{background:var(--accent);left:20px;padding:12px;position:fixed;top:-80px;z-index:1000}.preview__skip:focus{top:20px}.playground__stage .peek-carousel{--peek-carousel-card-radius:10px;--peek-carousel-card-shadow:0 12px 25px rgba(31,46,19,.13);--peek-carousel-active-shadow:0 18px 45px rgba(31,46,19,.23);--peek-carousel-image-filter:none;--peek-carousel-text-color:#fff;--peek-carousel-button-background:#35422c;--peek-carousel-button-hover-background:#536541;--peek-carousel-button-active-background:#536541;--peek-carousel-button-border-color:transparent;--peek-carousel-button-size:36px;--peek-carousel-button-radius:50%;--peek-carousel-counter-background:#35422c;--peek-carousel-indicators-background:#35422c;--peek-carousel-indicator-active-color:#d9fb75;--peek-carousel-indicator-shadow:none;--peek-carousel-focus-color:#53632d}.playground__stage .peek-carousel__item{margin-top:-18px;width:clamp(200px,25vw,330px)}.playground__stage .peek-carousel__caption{padding:22px;text-align:left}.preview__caption_title{display:block;font-size:20px;font-weight:500;letter-spacing:-.5px}.preview__caption_subtitle{display:block;font-size:12px;margin-top:6px;opacity:.8}.playground__stage .peek-carousel__nav{animation:none;flex-shrink:0;gap:8px;inset:auto;opacity:1;position:static;transform:none}.playground__stage .peek-carousel__counter{inset:18px 18px auto auto}.playground__stage .peek-carousel__controls{bottom:20px;gap:8px;max-width:calc(100% - 16px)}@media (max-width:1000px){.preview{padding:0 30px}.playground{gap:24px;grid-template-columns:minmax(0,1fr) 235px}.playground__stage{height:460px}.playground__stage .peek-carousel__item{width:235px}h1{letter-spacing:-2px}.preview__usage{gap:30px}}@media (max-width:720px){.preview{padding:0 20px}.preview__header{min-height:78px}.preview__brand{font-size:17px;gap:6px}.preview__brand_mark{font-size:27px}.preview__nav{font-size:11px;gap:16px}.preview__nav a:first-child{display:none}.preview__hero{padding:40px 0 32px}.preview__hero>.preview__eyebrow{font-size:10px;letter-spacing:1.1px;margin-bottom:22px}h1{font-size:clamp(32px,7vw,50px);letter-spacing:-1.5px}.preview__intro{align-items:flex-start;flex-direction:column;gap:12px}.preview__intro p{font-size:12px}.playground{gap:30px;grid-template-columns:1fr}.playground__stage{height:390px}.playground__stage .peek-carousel__item{width:clamp(165px,53vw,260px)}.playground__stage .peek-carousel__caption{padding:15px}.preview__caption_title{font-size:16px}.preview__caption_subtitle{font-size:11px}.playground__label{inset:18px 18px auto}.playground__hint{display:none}.playground__stage .peek-carousel__controls{gap:6px}.playground__stage .peek-carousel__indicators{gap:6px;padding-left:8px;padding-right:8px}.playground__stage .peek-carousel__counter{font-size:10px;inset:18px 18px auto auto}.playground__settings h2{margin-top:18px}.playground__layout_picker{grid-template-columns:repeat(4,1fr)}.playground__layout{font-size:10px;padding:10px}.playground__layout_number{font-size:8px;right:8px;top:10px}.playground__toggles{-moz-column-gap:22px;column-gap:22px;display:grid;grid-template-columns:1fr 1fr}.playground__toggle{font-size:11px}.preview__usage{gap:25px;grid-template-columns:1fr;margin-top:35px;padding:30px 0}.preview__code pre{font-size:10px;padding:20px 15px}.preview__code_heading{padding:16px}.preview__footer{font-size:10px;gap:18px;line-height:1.6}.preview__footer_note{display:block}}@media (prefers-reduced-motion:reduce){.playground__stage *,.playground__stage :after,.playground__stage :before{animation-delay:0s;animation-duration:.01ms;transition-duration:.01ms}}.preview__layouts,.preview__questions{border-top:1px solid var(--line);margin-top:48px;padding:40px 0 0}.preview__section_intro{max-width:620px}.preview__section_intro h2{font-size:30px;font-weight:500;letter-spacing:-1px;margin:14px 0}.preview__layout_grid p,.preview__questions dd,.preview__section_intro>p:last-child,.preview__sources{color:var(--muted);font-size:13px;line-height:1.75}.preview__layout_grid{display:grid;gap:24px;grid-template-columns:repeat(4,minmax(0,1fr));margin-top:28px}.preview__layout_grid h3{font-size:16px;font-weight:600;margin:0}.preview__layout_grid code{background:#e9ecdf;border-radius:4px;display:inline-block;font-size:11px;max-width:100%;overflow-wrap:anywhere;padding:6px 9px}.preview__questions{margin:0 0 45px}.preview__questions dl{margin:24px 0}.preview__questions dl>div{border-bottom:1px solid var(--line);display:grid;gap:40px;grid-template-columns:1fr 1.5fr;padding:20px 0}.preview__questions dt{font-size:14px;font-weight:600;line-height:1.6}.preview__questions dd{margin:0}.preview__questions a{text-decoration:underline;text-underline-offset:3px}@media (max-width:720px){.preview__layouts{margin-top:30px;padding-top:28px}.preview__section_intro h2{font-size:25px}.preview__layout_grid{gap:24px 18px;grid-template-columns:repeat(2,minmax(0,1fr))}.preview__questions dl>div{gap:10px;grid-template-columns:1fr}}.preview__links{color:var(--muted);display:flex;flex-wrap:wrap;font-size:12px;gap:12px 20px;margin-top:24px}.preview__links a{text-decoration:underline;text-underline-offset:4px}.preview__copyright{color:var(--muted);flex-basis:100%;font-size:10px;line-height:1.7}.preview__copyright a{text-decoration:underline;text-underline-offset:3px}@media (max-width:360px){.playground__toggles{grid-template-columns:1fr}}@media (forced-colors:active){.playground__toggle_track{background:Canvas;border-color:ButtonText}.playground__toggle_track:before{background:ButtonText}.playground__toggle input:checked+.playground__toggle_track{background:Highlight;border-color:Highlight}.playground__toggle input:checked+.playground__toggle_track:before{background:HighlightText}.playground__toggle input:focus+.playground__toggle_track{outline-color:Highlight}.playground__layout[aria-pressed=true]{outline:2px solid Highlight;outline-offset:-3px}.playground__stage .peek-carousel__btn,.playground__stage .peek-carousel__indicators{border:1px solid ButtonText}}.playground__stage [role=region]:focus-visible{outline-offset:-3px}.playground__stage .peek-carousel__indicators{gap:6px;max-width:190px;min-width:0;overflow-x:auto;padding:0 8px;scrollbar-width:thin}.playground__stage .peek-carousel__indicator{flex:0 0 24px;height:36px;width:24px}.playground__stage .peek-carousel__indicator--active{flex-basis:42px;width:42px}.playground__stage .peek-carousel__indicator--active:after,.playground__stage .peek-carousel__indicator--active:before{max-width:100%;width:100%}.playground__stage .peek-carousel__indicator:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.playground__stage .peek-carousel__btn--auto-rotate{flex-shrink:0}@supports not selector(:focus-visible){.preview [tabindex]:focus,.preview a:focus,.preview button:focus,.preview input:focus,.preview pre:focus,.preview summary:focus{outline:2px solid #53632d;outline-offset:5px}}
|
|
6
|
+
:root{background:#fff;color:var(--preview-color-text);color-scheme:light;font-family:Inter,Helvetica Neue,Arial,sans-serif;font-synthesis:none;-webkit-font-smoothing:antialiased;--preview-color-text:#141b2e;--preview-color-muted:#536178;--preview-color-subtle:#647189;--preview-color-divider:#e4e8f0;--preview-color-control-border:#8492aa;--preview-color-border-hover:#2458e8;--preview-color-surface:#fff;--preview-color-surface-subtle:#f5f6f8;--preview-canvas-background:#121a2a;--preview-canvas-text:#b7c5dd;--preview-code-accent:#b9ceff;--preview-color-primary:#2458e8;--preview-color-primary-hover:#1c45b8;--preview-color-primary-pressed:#173994;--preview-color-on-primary:#fff;--preview-color-selected-surface:#eef3ff;--preview-color-selected-text:#1c45b8;--preview-color-focus:#2458e8;--preview-color-success:#176843;--preview-color-fallback:#805400;--preview-color-fallback-surface:#fff4d6;--preview-code-background:#111b30;--preview-code-surface:#0c1629;--preview-code-border:#2e3e5b;--preview-code-text:#e9f0ff;--preview-code-muted:#aebbd4;--preview-code-control:#1a2a46;--preview-code-hover:#263d62;--preview-code-success:#a7e7c7;--preview-code-fallback:#ffd38c;--preview-space-1:4px;--preview-space-2:8px;--preview-space-3:12px;--preview-space-4:16px;--preview-space-5:24px;--preview-space-6:32px;--preview-space-7:48px;--preview-radius-small:8px;--preview-radius-control:12px;--preview-radius-surface:24px;--preview-radius-round:999px;--preview-control-min:44px;--preview-control-height:48px;--preview-control-primary:52px;--preview-focus-width:2px;--preview-focus-offset:3px;--ink:var(--preview-color-text);--muted:var(--preview-color-muted);--subtle:var(--preview-color-subtle);--line:var(--preview-color-divider);--accent:var(--preview-color-primary);--preview-body-leading:1.7;--preview-body-weight:400;--preview-body-tracking:0;--preview-heading-leading:1.2;--preview-heading-tracking:-0.035em;--preview-title-leading:1.08;--preview-title-tracking:-0.045em;--preview-label-tracking:0.08em;--preview-heading-size:clamp(30px,3.2vw,40px);--preview-body-size:15px;--preview-small-size:12px;--preview-heading-weight:700;--preview-label-weight:600;--preview-button-weight:650;--preview-secondary-weight:550;--preview-section-space:96px}*{box-sizing:border-box}body{margin:0}a{color:inherit;text-decoration:none}button,input{font:inherit;line-height:1.5}a,button,input,summary{-webkit-tap-highlight-color:transparent}.playground__stage [role=region]:focus-visible,.playground__stage:focus-visible,a:focus-visible,button:focus-visible,input:focus-visible,pre:focus-visible,summary:focus-visible{outline:var(--preview-focus-width) solid var(--preview-color-focus);outline-offset:var(--preview-focus-offset)}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}button[data-copy-state=pending]{cursor:progress}.preview{font-weight:var(--preview-body-weight);letter-spacing:var(--preview-body-tracking);line-height:var(--preview-body-leading);margin:auto;max-width:1440px;padding:0 var(--preview-space-7)}.preview section[id]{scroll-margin-top:32px}.playground__stage,.playground__stage [role=region]{scroll-margin-top:72px}.playground__mode_bar{scroll-margin-top:24px}.playground__mode_bar:focus-visible{border-radius:var(--preview-radius-control);outline:var(--preview-focus-width) solid var(--preview-color-focus);outline-offset:var(--preview-focus-offset)}.preview__header{align-items:center;border-bottom:1px solid var(--line);display:flex;gap:var(--preview-space-5);justify-content:space-between;min-height:80px}.preview__brand{align-items:center;display:flex;font-size:20px;font-weight:650;gap:10px;letter-spacing:-.8px;margin-right:auto}.preview__brand_mark{display:block;flex-shrink:0;height:32px;width:32px}.preview__nav{align-items:center;display:flex;font-size:13px;gap:var(--preview-space-2)}.preview__nav>a{align-items:center;background:transparent;border:1px solid transparent;border-radius:var(--preview-radius-control);color:var(--muted);display:inline-flex;font-weight:var(--preview-secondary-weight);gap:6px;justify-content:center;line-height:1.5;min-height:var(--preview-control-min);padding:10px var(--preview-space-3);text-decoration:none;transition:background-color .16s,border-color .16s,color .16s}.preview__nav>a:focus-visible,.preview__nav>a:hover{background:var(--preview-color-surface-subtle);color:var(--preview-color-primary-hover)}.preview__nav>a:active{background:var(--preview-color-selected-surface)}.preview__nav>a[aria-current]{background:var(--preview-color-surface);border-color:var(--preview-color-divider);color:var(--ink);font-weight:var(--preview-button-weight)}.preview__nav span{color:currentcolor;margin-left:0}.preview__hero{align-items:center;display:grid;gap:var(--preview-space-5);grid-template-columns:minmax(0,1fr);padding:var(--preview-space-7) 0 40px;text-align:center}.preview__hero_copy{min-width:0;padding:0}.preview__hero h1{color:var(--ink);font-size:clamp(40px,5vw,72px);margin:auto;max-width:1100px}.preview__hero_summary{min-width:0}.preview__hero_summary .preview__intro{margin:0 auto}.preview__hero h1>span{display:inline}.preview__hero_accent{color:var(--ink)}.preview__hero_actions{align-items:center;display:flex;flex-wrap:wrap;gap:var(--preview-space-3) var(--preview-space-4);justify-content:center;margin-top:20px}.preview__hero_action{align-items:center;background:var(--accent);border:1px solid var(--accent);border-radius:var(--preview-radius-control);color:var(--preview-color-on-primary);display:inline-flex;font-size:14px;font-weight:var(--preview-button-weight);gap:var(--preview-space-4);justify-content:space-between;line-height:1.5;min-height:var(--preview-control-primary);padding:11px 14px 11px 20px;transition:background-color .16s,border-color .16s}.preview__hero_action>svg{background:hsla(0,0%,100%,.18);border-radius:50%;flex-shrink:0;height:28px;padding:6px;transition:transform .16s;width:28px}.preview__hero_action:focus-visible>svg,.preview__hero_action:hover>svg{transform:translateY(2px)}.preview__hero_actions .preview__link{min-height:var(--preview-control-primary);padding-bottom:11px;padding-top:11px}.preview__hero_action:hover{background:var(--preview-color-primary-hover);border-color:var(--preview-color-primary-hover)}.preview__hero_action:active{background:var(--preview-color-primary-pressed);border-color:var(--preview-color-primary-pressed)}.preview__install_wrapper{margin:var(--preview-space-4) auto 0;max-width:400px;text-align:left}.preview__install{align-items:center;background:var(--preview-color-surface-subtle);border:1px solid var(--line);border-radius:var(--preview-radius-control);display:flex;justify-content:space-between;min-width:0}.preview__install code{color:var(--ink);font:12px/1.5 ui-monospace,monospace;letter-spacing:normal;min-width:0;overflow:auto;padding:var(--preview-space-3) 14px;white-space:nowrap}.preview__install_copy{align-items:center;background:transparent;border:0;border-left:1px solid var(--line);border-radius:0 var(--preview-radius-control) var(--preview-radius-control) 0;color:var(--muted);display:inline-flex;flex-shrink:0;justify-content:center;min-height:var(--preview-control-min);min-width:44px;padding:10px}.preview__install_copy:hover{background:#eaf0ff;color:var(--preview-color-primary-hover)}.preview__install code:focus-visible{border-radius:var(--preview-radius-control);outline:var(--preview-focus-width) solid var(--preview-color-focus);outline-offset:-3px}.preview__eyebrow{align-items:center;display:flex;font-size:11px;font-weight:var(--preview-label-weight,650);gap:10px;letter-spacing:var(--preview-label-tracking);margin:0}.preview__section_number{align-items:center;background:#eaf0ff;border-radius:var(--preview-radius-control);color:var(--preview-color-primary-hover);display:inline-flex;flex-shrink:0;font-size:10px;height:28px;justify-content:center;letter-spacing:normal;width:28px}.preview__hero_copy>.preview__eyebrow{align-items:center;display:flex;gap:9px;justify-content:center;margin:0 0 var(--preview-space-5)}.preview__hero_tagline{color:var(--muted)}@media (forced-colors:active),print{.preview__hero_tagline{background:none;color:CanvasText;-webkit-text-fill-color:currentcolor}}.playground__live_icon,.preview__tagline_icon{color:var(--accent);display:block;flex-shrink:0;height:18px;width:18px}h1{font-size:clamp(42px,5.4vw,76px);font-weight:var(--preview-heading-weight);letter-spacing:var(--preview-title-tracking);line-height:var(--preview-title-leading);margin:0}.preview__intro{margin-top:var(--preview-space-5)}.preview__intro p,.preview__usage p{color:var(--muted);font-size:var(--preview-body-size);line-height:var(--preview-body-leading);margin:0}.preview__intro p{font-size:17px;margin:auto;max-width:32em}.preview__link{align-items:center;background:var(--preview-color-surface);border:1px solid var(--preview-color-control-border);border-radius:var(--preview-radius-control);color:var(--ink);display:inline-flex;font-size:13px;font-weight:var(--preview-secondary-weight);gap:var(--preview-space-3);justify-content:space-between;line-height:1.5;min-height:var(--preview-control-height);padding:9px 14px 9px 18px;text-decoration:none;transition:background-color .16s,border-color .16s,color .16s}.preview__layout_try>span,.preview__link>span{align-items:center;color:currentcolor;display:inline-flex;flex-shrink:0;font-size:14px;height:20px;justify-content:center;line-height:1;transition:transform .16s;width:20px}.preview__link:focus-visible,.preview__link:hover{background:var(--preview-color-selected-surface);border-color:var(--preview-color-border-hover);color:var(--preview-color-primary-hover)}.preview__link:active{background:var(--preview-color-surface-subtle);border-color:var(--preview-color-primary-pressed);color:var(--preview-color-primary-pressed)}.preview__link:focus-visible>span,.preview__link:hover>span{transform:translate(2px,-2px)}.playground{align-items:start;display:grid;gap:var(--preview-space-4);grid-template-columns:minmax(0,1fr);padding:0}.playground__preview{min-width:0}.playground__gallery{background:transparent;border:0;padding:0}.playground__gallery .playground__toolbar{border-bottom:0;padding-bottom:0}.playground__gallery .playground__stage{background:var(--preview-canvas-background);border:0}.playground__gallery .playground__layout:not([aria-pressed=true]){background:var(--preview-color-surface);border-color:var(--preview-color-divider)}.playground__gallery .playground__layout:hover{border-color:var(--accent)}.playground__toolbar{align-items:center;display:flex;justify-content:space-between;margin-bottom:var(--preview-space-4)}.playground__toolbar .preview__eyebrow{margin:0}.playground__live{align-items:center;color:var(--subtle);display:flex;font-size:var(--preview-small-size);gap:7px}.playground__stage{--preview-stage-height:clamp(400px,50vh,460px);--preview-color-focus:var(--preview-code-accent);background:var(--preview-canvas-background);border:0;border-radius:var(--preview-radius-surface);height:var(--preview-stage-height);isolation:isolate;overflow:hidden;position:relative}.playground__label{color:var(--preview-canvas-text);display:flex;font-size:10px;inset:22px 24px auto;justify-content:space-between;letter-spacing:var(--preview-label-tracking);margin:0;pointer-events:none;position:absolute;z-index:1}.playground__description{color:var(--muted);font-size:var(--preview-small-size);margin:var(--preview-space-4) 0 0}.playground__settings{border-top:1px solid var(--line);min-width:0;padding:var(--preview-space-5) 0}.playground__gallery .playground__settings{border:0;padding:0}.playground__mode_bar{align-items:center;display:grid;gap:var(--preview-space-4);grid-template-columns:140px minmax(0,1fr)}.playground__mode_bar h3{color:var(--muted);font-size:12px;font-weight:600;margin:0}.playground__quick_help{color:var(--muted);font-size:12px;line-height:1.6;margin:var(--preview-space-2) 0 var(--preview-space-3)}.playground__settings h2{font-size:25px;font-weight:var(--preview-heading-weight);letter-spacing:var(--preview-heading-tracking);line-height:var(--preview-heading-leading);margin:var(--preview-space-3) 0}.playground__layout_picker{display:grid;gap:var(--preview-space-2);grid-template-columns:repeat(4,minmax(0,1fr))}.playground__layout{align-items:center;background:transparent;border:1px solid var(--preview-color-control-border);border-radius:var(--preview-radius-control);color:var(--ink);display:flex;font-size:13px;font-weight:var(--preview-secondary-weight);gap:var(--preview-space-2);justify-content:center;min-height:var(--preview-control-height);padding:10px var(--preview-space-3);position:relative;transition:background .2s,border-color .2s}.playground__layout:not(:disabled):hover{border-color:var(--accent)}.playground__layout[aria-pressed=true]{background:var(--ink);border-color:var(--ink);color:var(--preview-color-on-primary);font-weight:var(--preview-button-weight)}.playground__layout_check{position:absolute;right:6px;top:6px;visibility:hidden}.playground__layout[aria-pressed=true] .playground__layout_check{visibility:visible}.playground__toggles{border:0;display:grid;gap:0 var(--preview-space-5);grid-template-columns:repeat(2,minmax(0,1fr));margin:0;min-width:0;padding:0}.playground__toggles legend{color:var(--muted);font-size:11px;letter-spacing:var(--preview-label-tracking);padding:0 0 var(--preview-space-3)}.playground__toggle{align-items:center;cursor:pointer;display:flex;font-size:var(--preview-small-size);gap:10px;justify-content:space-between;min-height:var(--preview-control-min);position:relative}.playground__toggle input{cursor:pointer;height:22px;margin:0;opacity:0;position:absolute;right:0;width:36px}.playground__toggle_track{background:#e1e7f2;border:1px solid #98a4ba;border-radius:var(--preview-radius-round);flex-shrink:0;height:22px;pointer-events:none;position:relative;transition:background-color .18s,border-color .18s;width:36px}.playground__toggle_track:before{background:var(--preview-color-surface);border-radius:50%;box-shadow:0 1px 3px rgba(23,43,85,.2);content:"";height:16px;left:2px;position:absolute;top:2px;transition:transform .18s;width:16px}.playground__toggle input:checked+.playground__toggle_track{background:var(--accent);border-color:var(--accent)}.playground__toggle input:checked+.playground__toggle_track:before{transform:translateX(14px)}.playground__toggle input:focus+.playground__toggle_track{outline:var(--preview-focus-width) solid var(--preview-color-focus);outline-offset:3px}.playground__help{font-size:12px}.playground__help h3{font-size:13px;font-weight:600;margin:0}.playground__options{border-bottom:1px solid var(--line);margin-top:var(--preview-space-4)}.playground__options>summary{align-items:center;color:var(--muted);cursor:pointer;display:flex;font-size:12px;gap:var(--preview-space-4);justify-content:space-between;list-style:none;min-height:var(--preview-control-height);padding:var(--preview-space-3) 0}.playground__options>summary::-webkit-details-marker{display:none}.playground__options[open]>summary svg{transform:rotate(180deg)}.playground__options_content{display:grid;gap:40px;grid-template-columns:repeat(2,minmax(0,1fr));padding:var(--preview-space-4) 0 var(--preview-space-5)}.playground__help p{color:var(--muted);line-height:var(--preview-body-leading);margin:var(--preview-space-2) 0 0}.preview__usage{align-items:start;display:grid;gap:var(--preview-space-7);grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);margin:var(--preview-section-space) 0;padding:0}.preview__usage .preview__eyebrow{color:var(--ink);font-size:10px}.preview__usage h2{font-size:var(--preview-heading-size);font-weight:var(--preview-heading-weight);letter-spacing:var(--preview-heading-tracking);line-height:var(--preview-heading-leading);margin:var(--preview-space-4) 0}.preview__usage .preview__link{margin-top:var(--preview-space-5)}.preview__code{background:var(--preview-code-background);border:1px solid var(--preview-code-border);border-radius:var(--preview-radius-surface);color:var(--preview-code-text);margin:0;overflow:hidden}.preview__code_heading{align-items:center;border-bottom:1px solid var(--preview-code-border);color:var(--preview-code-muted);display:flex;font:11px ui-monospace,monospace;gap:var(--preview-space-2);justify-content:space-between;padding:var(--preview-space-3) var(--preview-space-4)}.preview__code_heading [data-code-filename]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.preview__code_copy{background:var(--preview-code-control);border:1px solid #8da2c4;border-radius:var(--preview-radius-small);color:var(--preview-code-text);flex-shrink:0;font-size:11px;line-height:1.5;min-height:var(--preview-control-min);padding:var(--preview-space-2) 10px}.preview__code_copy:enabled:hover{background:var(--preview-code-hover)}.preview__code_tabs{border-bottom:1px solid var(--preview-code-border);display:flex;gap:var(--preview-space-1);padding:var(--preview-space-2) var(--preview-space-3)}.preview__code_tabs button{background:transparent;border:0;border-radius:var(--preview-radius-small);color:var(--preview-code-muted);font-size:12px;line-height:1.5;min-height:var(--preview-control-min);padding:var(--preview-space-2) 10px}.preview__code_tabs [aria-selected=true]{background:var(--preview-color-selected-surface);color:var(--ink);font-weight:600}.preview__code_tabs button:not([aria-selected=true]):enabled:hover{background:var(--preview-code-hover);color:var(--preview-color-on-primary)}.preview__code_tabs [aria-selected=true]:enabled:hover{background:var(--preview-color-surface)}.preview__code_tabs [aria-selected=true]:enabled:active{background:var(--preview-code-accent)}.preview__code_copy:focus-visible,.preview__code_tabs button:focus-visible{outline-color:#a8c3ff;outline-offset:2px}.preview__code pre:focus-visible{outline-color:#a8c3ff;outline-offset:-3px}.preview__code pre{background:var(--preview-code-surface);border:0;border-radius:0;color:var(--preview-code-text);font:13px/1.8 ui-monospace,SFMono-Regular,Consolas,monospace;height:320px;letter-spacing:normal;margin:0;min-width:0;overflow:auto;padding:var(--preview-space-5);scrollbar-color:#6b7e9f var(--preview-code-surface);scrollbar-width:thin;-moz-tab-size:2;-o-tab-size:2;tab-size:2}.preview__code pre>code{font:inherit}.preview__code pre code::-moz-selection,.preview__code pre::-moz-selection{background:#34548a;color:var(--preview-color-on-primary)}.preview__code pre code::selection,.preview__code pre::selection{background:#34548a;color:var(--preview-color-on-primary)}.preview__footer{border-top:1px solid var(--line);display:flex;flex-wrap:wrap;font-size:var(--preview-small-size);gap:14px var(--preview-space-5);justify-content:space-between;padding:40px 0 36px}.preview__footer>span:nth-child(2),.preview__footer_note{color:var(--muted)}.preview__footer_brand{display:block;font-size:22px;font-weight:600;letter-spacing:-.04em;margin-bottom:6px}.preview__skip{background:var(--accent);color:var(--preview-color-on-primary);left:20px;padding:var(--preview-space-3);position:fixed;top:-80px;z-index:1000}.preview__skip:focus{top:20px}.playground__stage .peek-carousel{--peek-carousel-font-family:inherit;--peek-carousel-card-radius:10px;--peek-carousel-card-shadow:0 12px 25px rgba(23,43,85,.12);--peek-carousel-active-shadow:0 18px 45px rgba(23,43,85,.2);--peek-carousel-image-filter:none;--peek-carousel-text-color:var(--preview-color-on-primary);--peek-carousel-button-background:var(--accent);--peek-carousel-button-hover-background:var(--accent);--peek-carousel-button-active-background:var(--accent);--peek-carousel-button-border-color:transparent;--peek-carousel-button-size:36px;--peek-carousel-button-radius:50%;--peek-carousel-counter-background:var(--preview-color-surface);--peek-carousel-indicators-background:#172b55;--peek-carousel-indicator-active-color:var(--preview-color-on-primary);--peek-carousel-indicator-shadow:none;--peek-carousel-focus-color:var(--preview-code-accent)}.playground__stage .peek-carousel__item{margin-top:-18px;width:min(72%,(var(--preview-stage-height) - 120px) * 1.15)}.playground__stage .peek-carousel--radial .peek-carousel__item{width:min(60%,(var(--preview-stage-height) - 120px) * .88)}.playground__stage .peek-carousel--classic .peek-carousel__item{width:min(72%,(var(--preview-stage-height) - 120px) * 1.32)}.playground__stage .peek-carousel--fan .peek-carousel__item{margin-top:calc(16px - var(--preview-stage-height)*.2);width:min(64%,(var(--preview-stage-height) - 160px) * 1.02)}.playground__stage .peek-carousel__caption{padding:22px;text-align:left}.preview__caption_title{display:block;font-size:20px;font-weight:var(--preview-heading-weight);letter-spacing:-.5px}.preview__caption_subtitle{display:block;font-size:var(--preview-small-size);margin-top:6px;opacity:.8}.playground__stage .peek-carousel__nav{animation:none;flex-shrink:0;gap:var(--preview-space-2);inset:auto;opacity:1;position:static;transform:none}.playground__stage .peek-carousel__counter{border:1px solid var(--line);color:var(--ink);inset:18px 18px auto auto}.playground__stage .peek-carousel__controls{bottom:20px;gap:var(--preview-space-2);max-width:calc(100% - 16px)}html:lang(ja){font-family:Inter,Noto Sans JP,sans-serif;--preview-body-leading:1.85;--preview-body-tracking:0.015em;--preview-heading-leading:1.4;--preview-heading-tracking:-0.015em;--preview-title-leading:1.3;--preview-title-tracking:-0.02em;--preview-label-tracking:0.04em;--preview-secondary-weight:400;--preview-button-weight:700;--preview-label-weight:400}html:lang(ko){font-family:Peek Preview KR,sans-serif;word-break:keep-all;--preview-body-leading:1.75;--preview-body-weight:400;--preview-body-tracking:0;--preview-heading-leading:1.4;--preview-heading-weight:700;--preview-heading-tracking:-0.02em;--preview-title-leading:1.24;--preview-title-tracking:-0.02em;--preview-label-tracking:0.035em;--preview-label-weight:600}html:lang(ko) .playground__preset,html:lang(ko) .playground__theme_settings label,html:lang(ko) .playground__toggle,html:lang(ko) .preview__nav{font-weight:500;line-height:1.65}html:lang(ko) .playground__theme_settings>button{font-weight:600}html:lang(ko) .preview__hero h1,html:lang(ko) .preview__usage h2{font-weight:750}.preview__language_menu{flex-shrink:0;position:relative;z-index:5}.preview__language_menu>summary{align-items:center;background:var(--preview-color-surface);border:1px solid var(--preview-color-control-border);border-radius:var(--preview-radius-control);color:var(--ink);cursor:pointer;display:flex;font-size:12px;gap:var(--preview-space-2);justify-content:center;list-style:none;min-height:var(--preview-control-min);padding:10px var(--preview-space-3)}.preview__language_menu>summary::-webkit-details-marker{display:none}.preview__language_menu[open]>summary{background:var(--preview-color-selected-surface);border-color:var(--accent)}.preview__languages{background:var(--preview-color-surface);border:1px solid var(--preview-color-control-border);border-radius:var(--preview-radius-control);box-shadow:0 8px 24px rgba(23,43,85,.12);display:flex;flex-direction:column;font-size:12px;gap:var(--preview-space-1);padding:var(--preview-space-1);position:absolute;right:0;top:calc(100% + 8px);width:176px}.preview__languages a{align-items:center;border-radius:var(--preview-radius-small);color:var(--muted);display:flex;line-height:1.5;min-height:var(--preview-control-min);padding:10px var(--preview-space-3)}.preview__languages a:hover{background:var(--preview-color-surface-subtle)}.preview__languages [aria-current]{background:var(--preview-color-selected-surface);color:var(--preview-color-selected-text);font-weight:600}.preview__nav a:hover,.preview__sources a:hover{color:var(--accent)}@media (max-width:1000px){:root{--preview-section-space:64px}.preview{padding:0 30px}.playground{gap:var(--preview-space-5);grid-template-columns:minmax(0,1fr)}.preview__usage{gap:30px}.preview__hero{gap:var(--preview-space-6)}.playground__mode_bar{gap:var(--preview-space-3);grid-template-columns:minmax(0,1fr)}}@media (max-width:720px){:root{--preview-section-space:56px;--preview-body-size:14px}.preview{padding:0 20px}.preview__header{display:grid;gap:var(--preview-space-1) var(--preview-space-3);grid-template-columns:minmax(0,1fr) auto;padding:var(--preview-space-2) 0}.preview__language_menu{grid-column:2;grid-row:1}.preview__brand{font-size:17px;gap:6px}.preview__brand_mark{height:28px;width:28px}.preview__nav{font-size:12px;gap:var(--preview-space-2);grid-column:1/-1;grid-row:2}.preview__nav>a{gap:var(--preview-space-1);padding-left:var(--preview-space-2);padding-right:var(--preview-space-2)}.preview__hero{gap:var(--preview-space-5);grid-template-columns:minmax(0,1fr);padding:var(--preview-space-6) 0 var(--preview-space-5)}.preview__hero_copy>.preview__eyebrow{font-size:10px;margin-bottom:20px}.preview__hero h1{font-size:clamp(30px,8.2vw,40px)}.preview__hero h1>span{display:block}.preview__hero_actions{gap:var(--preview-space-3);margin-top:20px}.preview__hero_action{font-size:12px;gap:var(--preview-space-3);min-height:var(--preview-control-height);padding:9px 10px 9px var(--preview-space-4)}.preview__hero_action>svg{height:24px;padding:var(--preview-space-1);width:24px}.preview__hero_actions .preview__link{font-size:12px;gap:var(--preview-space-2);min-height:var(--preview-control-height);padding:var(--preview-space-2) var(--preview-space-3)}.preview__hero_actions .preview__link>span{background:transparent;height:20px;width:20px}.preview__intro p{font-size:14px}.playground{background:transparent;border:0;gap:var(--preview-space-5);grid-template-columns:minmax(0,1fr);padding:0}.playground__stage{--preview-stage-height:clamp(300px,42vh,360px)}.playground__stage .peek-carousel__caption{padding:15px}.preview__caption_title{font-size:16px}.preview__caption_subtitle{font-size:11px}.playground__label{inset:18px 18px auto}.playground__stage .peek-carousel__controls{gap:6px}.playground__stage .peek-carousel__indicators{gap:6px;padding-left:var(--preview-space-2);padding-right:var(--preview-space-2)}.playground__stage .peek-carousel__counter{border:1px solid var(--line);color:var(--ink);font-size:10px;inset:18px 18px auto auto}.playground__settings h2{margin-top:var(--preview-space-3)}.playground__layout_picker{grid-template-columns:repeat(4,minmax(0,1fr))}.playground__layout{font-size:12px;padding:10px}.playground__toggles{-moz-column-gap:18px;column-gap:18px;display:grid;grid-template-columns:minmax(0,1fr)}.playground__toggle{font-size:11px}.playground__options_content{gap:var(--preview-space-5);grid-template-columns:minmax(0,1fr)}.preview__usage{gap:var(--preview-space-6);grid-template-columns:1fr}.preview__code pre{font-size:12px;height:300px;padding:20px var(--preview-space-4)}.preview__code_heading{padding:var(--preview-space-4)}.preview__footer{font-size:10px;gap:18px;line-height:1.6}.preview__footer_note{display:block}}@media (prefers-reduced-motion:reduce){.playground__stage *,.playground__stage :after,.playground__stage :before{animation-delay:0s;animation-duration:.01ms;transition-duration:.01ms}}.preview__layouts,.preview__questions{border:0;margin-top:var(--preview-section-space);padding:0}.preview__section_intro{max-width:640px}.preview__section_intro h2{font-size:var(--preview-heading-size);font-weight:var(--preview-heading-weight);letter-spacing:var(--preview-heading-tracking);line-height:var(--preview-heading-leading);margin:var(--preview-space-4) 0}.preview__faq_answer,.preview__layout_grid p,.preview__section_intro>p:last-child,.preview__sources{color:var(--muted);font-size:var(--preview-body-size);line-height:var(--preview-body-leading)}.preview__section_intro>p:last-child{margin:0}.preview__layout_grid{display:grid;gap:var(--preview-space-5);grid-template-columns:repeat(4,minmax(0,1fr));margin-top:var(--preview-space-6)}.preview__layout_grid article{background:var(--preview-color-surface-subtle);border:1px solid transparent;border-radius:var(--preview-radius-surface);display:flex;flex-direction:column;min-width:0;padding:20px;transition:border-color .16s,background-color .16s}.preview__layout_grid article[data-current=true]{background:var(--preview-color-surface);border-color:var(--preview-color-control-border)}.preview__layouts>.preview__section_intro{align-items:end;display:grid;gap:var(--preview-space-3) var(--preview-space-7);grid-template-columns:minmax(0,1fr) minmax(0,.8fr);max-width:none}.preview__layouts>.preview__section_intro>.preview__eyebrow{grid-column:1/-1;margin:0}.preview__layouts>.preview__section_intro h2{margin:0;max-width:20ch}.preview__layouts>.preview__section_intro>p:last-child{max-width:48ch}.preview__layout_grid p{flex:1;margin:var(--preview-space-2) 0 var(--preview-space-3)}.preview__layout_art{align-items:center;background:#e4e8ef;border-radius:var(--preview-radius-control);display:flex;gap:var(--preview-space-1);justify-content:center;min-height:140px;position:relative;width:100%}.preview__layout_check{background:var(--accent);border-radius:50%;color:var(--preview-color-on-primary);height:22px;padding:var(--preview-space-1);position:absolute;right:10px;top:10px;visibility:hidden;width:22px}.preview__layout_grid [data-current=true] .preview__layout_check{visibility:visible}.preview__layout_art span{background:#cad9f9;border:2px solid #fff;border-radius:7px;box-shadow:0 4px 12px rgba(23,43,85,.08);flex-shrink:0;height:44px;width:28px}.preview__layout_art span:nth-child(2){background:var(--accent);z-index:1}.preview__layout_art[data-layout-art=stack] span:first-child{transform:translate(14px,5px) rotate(-12deg)}.preview__layout_art[data-layout-art=stack] span:last-child{transform:translate(-14px,5px) rotate(12deg)}.preview__layout_art[data-layout-art=radial] span:first-child{transform:perspective(140px) rotateY(-35deg) scale(.85)}.preview__layout_art[data-layout-art=radial] span:last-child{transform:perspective(140px) rotateY(35deg) scale(.85)}.preview__layout_art[data-layout-art=fan] span:first-child{transform:translateX(12px) rotate(-24deg);transform-origin:bottom right}.preview__layout_art[data-layout-art=fan] span:last-child{transform:translateX(-12px) rotate(24deg);transform-origin:bottom left}@media (max-width:1000px){.preview__layout_grid{grid-template-columns:repeat(2,minmax(0,1fr))}}.preview__layout_grid h3{font-size:18px;font-weight:var(--preview-heading-weight);line-height:var(--preview-heading-leading);margin:var(--preview-space-5) 0 0}.preview__layout_grid code{align-self:flex-start;display:inline-block;font-size:11px;letter-spacing:normal;margin:0;max-width:100%;overflow-wrap:anywhere;padding:0}.preview__layout_try{align-items:center;align-self:stretch;background:var(--preview-color-surface);border:1px solid var(--preview-color-control-border);border-radius:var(--preview-radius-control);color:var(--ink);display:flex;font-size:13px;font-weight:600;gap:var(--preview-space-2);justify-content:space-between;line-height:1.5;margin-top:var(--preview-space-2);min-height:var(--preview-control-height);padding:var(--preview-space-3) var(--preview-space-4);text-decoration:none;transition:background-color .16s,border-color .16s,color .16s;width:100%}.preview__layout_try:focus-visible,.preview__layout_try:hover{background:var(--ink);border-color:var(--ink);color:var(--preview-color-on-primary)}.preview__layout_try[aria-current=true]{border-color:var(--ink)}.preview__layout_try[aria-current=true]:not(:hover):not(:focus-visible){background:var(--preview-color-surface-subtle)}.preview__layout_try:active{background:#2b3449;border-color:#2b3449;color:var(--preview-color-on-primary)}.preview__layout_try:focus-visible>span,.preview__layout_try:hover>span{transform:translateY(-2px)}.preview__sources a{align-items:center;color:var(--preview-color-selected-text);display:inline-flex;gap:var(--preview-space-2);min-height:var(--preview-control-min)}.preview__questions{align-items:start;display:grid;gap:0 64px;grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr);margin:var(--preview-section-space) 0}.preview__faq_list{margin:0}.preview__questions .preview__section_intro{position:sticky;top:24px}.preview__questions .preview__sources{grid-column:2;margin:var(--preview-space-5) 0 0}.preview__faq_list>details{background:var(--preview-color-surface);border:1px solid var(--preview-color-divider);border-radius:var(--preview-radius-surface);margin-bottom:var(--preview-space-3);padding:0 20px}.preview__faq_list summary{align-items:center;cursor:pointer;display:flex;font-size:15px;font-weight:600;gap:var(--preview-space-5);justify-content:space-between;line-height:1.6;list-style:none;min-height:var(--preview-control-primary);padding:var(--preview-space-4) 0}.preview__faq_answer{padding:0 0 var(--preview-space-5)}.preview__faq_list [open]>summary{padding-bottom:var(--preview-space-2)}.preview__faq_answer p{margin:0;max-width:62ch}.preview__faq_list summary::-webkit-details-marker{display:none}.preview__faq_list summary svg{color:var(--accent);flex-shrink:0}.preview__faq_list [open] summary svg{transform:rotate(45deg)}.preview__faq_list summary:hover{color:var(--accent)}.preview__questions a{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.3em;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto}@media (max-width:720px){.preview__layouts{padding-top:0}.preview__layouts>.preview__section_intro{gap:var(--preview-space-4);grid-template-columns:minmax(0,1fr)}.preview__section_intro h2{font-size:28px}.preview__layout_grid{grid-template-columns:repeat(2,minmax(0,1fr))}.preview__questions{gap:var(--preview-space-5);grid-template-columns:minmax(0,1fr);margin:var(--preview-section-space) 0}.preview__questions .preview__section_intro{position:static}.preview__questions .preview__sources{grid-column:1;margin-top:0}}@media (max-width:479px){.preview__layout_grid{grid-template-columns:minmax(0,1fr)}.playground__layout{font-size:12px;padding:10px var(--preview-space-1)}.preview__layout_grid article{padding:var(--preview-space-5)}.preview__layout_art span{height:36px;width:22px}}@media (max-width:359px){.playground__layout{font-size:11px}}@media (min-width:480px) and (max-width:1000px){.playground__layout_picker{grid-template-columns:repeat(4,minmax(0,1fr))}.playground__toggles{-moz-column-gap:var(--preview-space-5);column-gap:var(--preview-space-5);display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}.preview__copyright{color:var(--subtle);flex-basis:100%;font-size:11px;line-height:1.7}.preview__copyright a{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.3em;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto}@media (max-width:360px){.playground__toggles{grid-template-columns:1fr}}@media (forced-colors:active){.playground__toggle_track{background:Canvas;border-color:ButtonText}.playground__toggle_track:before{background:ButtonText}.playground__toggle input:checked+.playground__toggle_track{background:Highlight;border-color:Highlight}.playground__toggle input:checked+.playground__toggle_track:before{background:HighlightText}.playground__toggle input:focus+.playground__toggle_track{outline-color:Highlight}.playground__layout[aria-pressed=true]{outline:2px solid Highlight;outline-offset:-3px}.playground__stage .peek-carousel__btn,.playground__stage .peek-carousel__indicators{border:1px solid ButtonText}}.playground__stage [role=region]:focus-visible{outline-offset:-3px}.playground__stage .peek-carousel__indicators{gap:6px;max-width:190px;min-width:0;overflow-x:auto;padding:0 var(--preview-space-2);scrollbar-width:thin}.playground__stage .peek-carousel__indicator{flex:0 0 24px;height:36px;width:24px}.playground__stage .peek-carousel__indicator--active{flex-basis:42px;width:42px}.playground__stage .peek-carousel__indicator--active:after,.playground__stage .peek-carousel__indicator--active:before{max-width:100%;width:100%}.playground__stage .peek-carousel__indicator:focus-visible{outline:var(--preview-focus-width) solid var(--preview-color-focus);outline-offset:-2px}.playground__stage .peek-carousel__btn--auto-rotate{flex-shrink:0}@supports not selector(:focus-visible){.preview [tabindex]:focus,.preview a:focus,.preview button:focus,.preview input:focus,.preview pre:focus,.preview summary:focus{outline:var(--preview-focus-width) solid var(--preview-color-focus);outline-offset:var(--preview-focus-offset)}.preview .preview__code pre:focus{outline-color:#a8c3ff;outline-offset:-3px}.preview .preview__code_copy:focus,.preview .preview__code_tabs button:focus{outline-color:#a8c3ff;outline-offset:2px}}.preview button[data-copy-state=success]:enabled{background:var(--preview-color-selected-surface);border-color:#c4d0e7;color:var(--preview-color-selected-text)}.preview button[data-copy-state=fallback]:enabled{background:var(--preview-color-fallback-surface);border-color:var(--preview-color-fallback);color:var(--preview-color-fallback)}.preview__install_copy[data-copy-state=success]>svg{display:none}.preview__install_copy[data-copy-state=success]:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%231c45b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Crect width='12' height='12' x='8' y='8' rx='2.5'/%3E%3Cpath d='M16 4H6a2 2 0 0 0-2 2v10m7-2 2 2 4-4'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:20px;content:"";height:20px;width:20px}.preview .preview__toast{align-items:center;background:var(--ink);border:1px solid #33425a;border-radius:var(--preview-radius-round);bottom:calc(24px + env(safe-area-inset-bottom, 0px));box-shadow:0 12px 36px rgba(12,20,36,.25);color:#f1f5ff;display:flex;font-size:13px;font-weight:var(--preview-secondary-weight);gap:var(--preview-space-3);justify-content:center;left:50%;line-height:1.6;margin:0;max-width:calc(100vw - 32px);min-height:56px;padding:14px 20px;pointer-events:none;position:fixed;text-align:left;transform:translateX(-50%);width:-moz-max-content;width:max-content;z-index:1000}.preview__toast_timer{display:block;fill:none;flex-shrink:0;height:24px;stroke-width:2;width:24px}.preview__toast_track{stroke:#445169}.preview__toast_progress{animation:preview-toast-countdown var(--preview-toast-duration) linear forwards;stroke:#c7d8ff;stroke-dasharray:56.55;stroke-dashoffset:0;stroke-linecap:round;transform:rotate(-90deg);transform-origin:center}.preview__toast[data-copy-state=pending] .preview__toast_timer{animation:preview-toast-waiting 1s linear infinite}.preview__toast[data-copy-state=pending] .preview__toast_progress{animation:none;stroke-dasharray:14 42.55}.preview__toast[data-copy-state=success] .preview__toast_progress{stroke:#97e3b9}.preview__toast[data-copy-state=fallback] .preview__toast_progress{stroke:#ffe0a8}.preview__toast_message{min-width:0}@keyframes preview-toast-countdown{to{stroke-dashoffset:56.55}}@keyframes preview-toast-waiting{to{transform:rotate(1turn)}}.preview .preview__toast:empty{border:0;box-shadow:none;min-height:0;padding:0}@media (prefers-reduced-motion:reduce){.preview .preview__toast_progress,.preview .preview__toast_timer,.preview__toast[data-copy-state=pending] .preview__toast_timer{animation:none}.preview a,.preview button,.preview summary,.preview__hero_action>svg,.preview__layout_try>span,.preview__link>span{transition:none}.preview a:focus-visible>span,.preview a:focus-visible>svg,.preview a:hover>span,.preview a:hover>svg{transform:none}}
|
package/examples/example.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! PeekCarousel
|
|
1
|
+
/*! PeekCarousel v2.0.1
|
|
2
2
|
* Copyright (c) 2025 PeekCarousel
|
|
3
3
|
* Copyright (c) 2026 PeekCarousel contributors
|
|
4
|
-
* @license
|
|
4
|
+
* @license See LICENSE, LICENSE-MIT and THIRD_PARTY_NOTICES.md.
|
|
5
5
|
*/
|
|
6
|
-
var PeekCarouselDemo=function(e){"use strict";const t=[{value:"stack",name:"Stack",mark:"▱",
|
|
6
|
+
var PeekCarouselDemo=function(e){"use strict";const t=[{value:"stack",name:"Stack",mark:"▱"},{value:"radial",name:"Radial",mark:"◉"},{value:"classic",name:"Classic",mark:"▤"},{value:"fan",name:"Fan shape",mark:"⤴"}];let r=null,o=0;function a(e){r?.status===e&&(window.clearTimeout(r.timer),r=null),e.textContent="",e.style.removeProperty("--preview-toast-duration")}function n(e,t,n,s){if(s!==o)return;r&&a(r.status);const l="pending"===n?0:"fallback"===n?8e3:4e3,c=document.createElement("span");c.className="preview__toast_message",c.textContent=t,e.style.setProperty("--preview-toast-duration",`${l}ms`),e.replaceChildren(function(){const e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.classList.add("preview__toast_timer"),t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("width","24"),t.setAttribute("height","24"),t.setAttribute("aria-hidden","true"),t.setAttribute("focusable","false");for(const r of["preview__toast_track","preview__toast_progress"]){const o=document.createElementNS(e,"circle");o.setAttribute("class",r),o.setAttribute("cx","12"),o.setAttribute("cy","12"),o.setAttribute("r","9"),t.appendChild(o)}return t}(),c);const i={status:e,timer:0};r=i,"pending"!==n&&(i.timer=window.setTimeout(()=>{r===i&&a(e)},l))}function s(e,t,r){let s=!1,l=!1;r.classList.add("preview__toast"),r.setAttribute("aria-atomic","true"),e.disabled=!1;const c=t=>{e.dataset.copyState=t,r.dataset.copyState=t};c("idle");const i=()=>t instanceof HTMLTextAreaElement?t.value:t.textContent??"",u=async()=>{if(e.disabled)return;const u=i(),d=++o;l=!0,e.disabled=!0,e.setAttribute("aria-busy","true"),c("pending"),n(r,e.dataset.pending??"","pending",d);try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard access is unavailable");await navigator.clipboard.writeText(u),s||u!==i()||(c("success"),n(r,e.dataset.success,"success",d))}catch{if(!s&&u===i()){if(c("fallback"),t.focus(),t instanceof HTMLTextAreaElement)t.select();else{const e=window.getSelection();if(e){const r=document.createRange();r.selectNodeContents(t),e.removeAllRanges(),e.addRange(r)}}n(r,e.dataset.fallback,"fallback",d)}}finally{l=!1,s||(e.disabled=!1,e.setAttribute("aria-busy","false"),"pending"===e.dataset.copyState&&(a(r),c("idle")))}};return e.addEventListener("click",u),{clear(){a(r),c(l?"pending":"idle")},destroy(){s=!0,e.disabled=!1,e.setAttribute("aria-busy","false"),c("idle"),a(r),e.removeEventListener("click",u)}}}const l=["showNavigation","showCounter","showIndicators","showAutoRotateButton"],c=t.map(e=>e.value);return e.initDemo=function(e){const r=function(){const e=document.getElementById("language-menu"),t=e.querySelector("summary"),r=r=>{e.open&&"Escape"===r.key&&(r.preventDefault(),e.open=!1,t.focus())},o=t=>{e.open&&!e.contains(t.target)&&(e.open=!1)};return e.addEventListener("keydown",r),document.addEventListener("pointerdown",o),{destroy(){e.removeEventListener("keydown",r),document.removeEventListener("pointerdown",o),e.open=!1}}}(),o=document.querySelector("#demo-carousel"),a=o.innerHTML,n=[],i=document.getElementById("starter-panel"),u=[...document.querySelectorAll("[data-code-format]")],d=s(document.getElementById("starter-copy"),i,document.getElementById("starter-copy-status")),m=s(document.getElementById("install-copy"),document.getElementById("install-command"),document.getElementById("install-copy-status"));let p,y,f="vanilla";function g(e,t,r){e&&(e.addEventListener(t,r),n.push(()=>e.removeEventListener(t,r)))}function v(r=!1){const n=p?.currentIndex??0,s=r&&p?.isAutoRotating||!1;y?.destroy(),p?.destroy(),o.innerHTML=a,o.classList.remove(...c.map(e=>`peek-carousel--${e}`));const i=document.querySelector('[data-layout][aria-pressed="true"]')?.dataset.layout??"stack",u=Object.fromEntries(l.map(e=>[e,document.getElementById(e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`))?.checked??!0]));p=new e(o,{...u,startIndex:n,layoutMode:i,autoRotate:s,autoRotateInterval:3e3,enableKeyboard:!1});const{nav:d}=p.elements;if(d){let{controls:e}=p.elements;e||(e=document.createElement("div"),e.className="peek-carousel__controls",o.appendChild(e),p.elements.controls=e),e.appendChild(d)}y=function(e){const{container:t,items:r,indicators:o}=e,a=JSON.parse(t.dataset.demoA11y),n=[];let s=!1;function l(e,t){return e.replace("{current}",t+1).replace("{total}",r.length)}function c(e,t,r){e&&e.getAttribute(t)!==r&&e.setAttribute(t,r)}function i(e,t,r){e.addEventListener(t,r),n.push(()=>e.removeEventListener(t,r))}function u(){const{currentIndex:n,isAutoRotating:s,counterElement:i}=e;for(let e=0;e<r.length;e++)c(r[e],"role","group"),c(r[e],"aria-roledescription",a.slide),c(r[e],"aria-label",l(a.position,e)),c(r[e],"aria-hidden",String(e!==n));for(let e=0;e<o.length;e++){const t=o[e];t.removeAttribute("role"),t.removeAttribute("aria-selected"),c(t,"aria-label",l(a.show,e)),c(t,"aria-pressed",String(e===n)),c(t,"tabindex","0")}const u=t.querySelector(".peek-carousel__indicators");c(u,"role","group"),c(u,"aria-label",a.choose),c(e.elements.prevBtn,"aria-label",a.previous),c(e.elements.nextBtn,"aria-label",a.next),c(i,"aria-live",s?"off":"polite"),c(e.elements.autoRotateBtn,"aria-label",s?a.stop:a.start)}function d(){e.stopAutoRotate(),u()}i(t,"pointerdown",t=>{s=t.target.closest("button")===e.elements.autoRotateBtn}),i(t,"pointerup",()=>{s=!1}),i(t,"focusin",t=>{t.target===e.elements.autoRotateBtn&&s||d()}),i(t,"pointerenter",d),i(document,"visibilitychange",()=>{document.hidden&&d()}),i(t,"click",u),i(t,"keydown",t=>{const r=o.indexOf(t.target);if(-1===r)return;const a={ArrowLeft:r-1,ArrowRight:r+1,Home:0,End:o.length-1};Object.prototype.hasOwnProperty.call(a,t.key)&&(t.preventDefault(),d(),e.goTo(a[t.key]),u(),o[e.currentIndex].focus())});const m=new MutationObserver(u);return m.observe(t,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-current","aria-selected","aria-pressed"]}),u(),{sync:u,destroy(){m.disconnect();for(const e of n)e()}}}(p);const m=t.find(e=>e.value===i);document.querySelector("[data-layout-label]").textContent=`0${c.indexOf(i)+1} / ${m.name.toUpperCase()}`,document.querySelector("[data-layout-description]").textContent=document.querySelector(`[data-layout="${i}"]`).dataset.description,b(i);for(const e of document.querySelectorAll("[data-try-layout]")){const t=String(e.dataset.tryLayout===i);e.setAttribute("aria-current",t),e.closest("[data-layout-card]").dataset.current=t}}function b(e){document.querySelector("[data-demo-code]").textContent=function(e="stack",t="vanilla"){return"react"===t?["import {useEffect, useRef} from 'react';","import PeekCarousel from 'peek-carousel';","import 'peek-carousel/dist/peek-carousel.css';","","export function Gallery({images}) {"," const host = useRef(null);"," useEffect(() => {"," if (!host.current || images.length === 0) return;"," const carousel = new PeekCarousel(host.current, {",` layoutMode: '${e}',`," startIndex: 0,"," });"," return () => carousel.destroy();"," }, [images]);",""," // Set a height for .gallery-carousel in your stylesheet."," return (",' <div ref={host} className="peek-carousel gallery-carousel">',' <div className="peek-carousel__track">'," {images.map(({src, alt}) => (",' <div key={src} className="peek-carousel__item">',' <figure className="peek-carousel__figure">',' <img className="peek-carousel__image" src={src} alt={alt} />'," </figure>"," </div>"," ))}"," </div>"," </div>"," );","}"].join("\n"):"cdn"===t?["\x3c!-- Add the gallery markup and its height from the docs. --\x3e",'<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/peek-carousel@2.0.0/dist/peek-carousel.min.css">','<script src="https://cdn.jsdelivr.net/npm/peek-carousel@2.0.0/dist/peek-carousel.js"><\/script>',"<script>"," new PeekCarousel('#gallery-carousel', {",` layoutMode: '${e}',`," startIndex: 0,"," });","<\/script>"].join("\n"):`import PeekCarousel from 'peek-carousel';\nimport 'peek-carousel/dist/peek-carousel.css';\n\nnew PeekCarousel('#gallery-carousel', {\n layoutMode: '${e}',\n startIndex: 0,\n});`}(e,f),document.querySelector("[data-code-filename]").textContent={vanilla:"gallery.js",react:"gallery.jsx",cdn:"index.html"}[f],d.clear()}for(const e of u)e.disabled=!1,g(e,"click",()=>{f=e.dataset.codeFormat;for(const t of u){const r=t===e;t.setAttribute("aria-selected",String(r)),t.tabIndex=r?0:-1}i.setAttribute("aria-labelledby",e.id);b(document.querySelector('[data-layout][aria-pressed="true"]').dataset.layout)}),g(e,"keydown",t=>{const r=u.indexOf(e),o={ArrowRight:(r+1)%u.length,ArrowLeft:(r+u.length-1)%u.length,Home:0,End:u.length-1};if(!Object.prototype.hasOwnProperty.call(o,t.key))return;t.preventDefault();const a=u[o[t.key]];a.click(),a.focus({preventScroll:!0})});for(const e of document.querySelectorAll("[data-layout]"))e.disabled=!1,g(e,"click",()=>{for(const t of document.querySelectorAll("[data-layout]")){const r=e===t;t.setAttribute("aria-pressed",String(r))}v(!0)});for(const e of l)g(document.getElementById(e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)),"change",()=>v(!0));for(const e of document.querySelectorAll("[data-try-layout]"))g(e,"click",t=>{t.preventDefault(),document.querySelector(`[data-layout="${e.dataset.tryLayout}"]`).click(),document.getElementById("playground-stage").scrollIntoView({block:"start"}),o.focus({preventScroll:!0})});return g(o,"keydown",e=>{if(e.target!==o)return;const t={ArrowLeft:p.currentIndex-1,ArrowRight:p.currentIndex+1,Home:0,End:p.totalItems-1};" "===e.key?(e.preventDefault(),p.toggleAutoRotate(),y.sync()):Object.prototype.hasOwnProperty.call(t,e.key)&&(e.preventDefault(),p.stopAutoRotate(),p.goTo(t[e.key]),y.sync())}),v(),{get carousel(){return p},destroy(){r.destroy(),d.destroy(),m.destroy(),y.destroy();for(const e of n)e();p.destroy()}}},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e}({});PeekCarouselDemo.initDemo(PeekCarousel);
|
package/package.json
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "peek-carousel",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "A modular carousel library with four layout modes (Stack, Radial, Classic, Fan shape) featuring peek effect, touch/drag input, keyboard controls, and ARIA states - inspired by iPhone 17 Pro",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"publishConfig": {
|
|
7
|
-
"access": "public"
|
|
8
|
-
},
|
|
9
6
|
"main": "dist/peek-carousel.cjs",
|
|
10
7
|
"module": "dist/peek-carousel.esm.js",
|
|
11
8
|
"types": "types/index.d.ts",
|
|
@@ -35,9 +32,13 @@
|
|
|
35
32
|
"types/index.d.cts",
|
|
36
33
|
"types/options.d.cts",
|
|
37
34
|
"examples/example-built.html",
|
|
35
|
+
"examples/example-built.ja.html",
|
|
36
|
+
"examples/example-built.ko.html",
|
|
38
37
|
"examples/example.min.js",
|
|
39
38
|
"examples/example.min.css",
|
|
40
39
|
"examples/custom-theme.html",
|
|
40
|
+
"examples/custom-theme.ja.html",
|
|
41
|
+
"examples/custom-theme.ko.html",
|
|
41
42
|
"examples/custom-theme.js",
|
|
42
43
|
"examples/custom-theme.css",
|
|
43
44
|
"README.md",
|
|
@@ -47,11 +48,23 @@
|
|
|
47
48
|
"docs/integrations.md",
|
|
48
49
|
"THIRD_PARTY_NOTICES.md",
|
|
49
50
|
"LICENSE",
|
|
51
|
+
"LICENSE-MIT",
|
|
50
52
|
"COPYRIGHT.md",
|
|
51
53
|
"schemas/peek-carousel.schema.json",
|
|
52
54
|
"public/fonts/inter-latin.css",
|
|
55
|
+
"public/peek-mark.svg",
|
|
56
|
+
"public/favicon.ico",
|
|
57
|
+
"public/favicon-16x16.png",
|
|
58
|
+
"public/favicon-32x32.png",
|
|
53
59
|
"public/fonts/inter-latin.woff2",
|
|
54
|
-
"public/fonts/OFL.txt"
|
|
60
|
+
"public/fonts/OFL.txt",
|
|
61
|
+
"public/fonts/noto-sans-ja.css",
|
|
62
|
+
"public/fonts/noto-sans-ja.woff2",
|
|
63
|
+
"public/fonts/noto-sans-ja-bold.woff2",
|
|
64
|
+
"public/fonts/peek-preview-kr.css",
|
|
65
|
+
"public/fonts/peek-preview-kr.woff2",
|
|
66
|
+
"public/fonts/OFL-noto.txt",
|
|
67
|
+
"public/fonts/OFL-pretendard.txt"
|
|
55
68
|
],
|
|
56
69
|
"scripts": {
|
|
57
70
|
"dev": "vite",
|
|
@@ -120,11 +133,11 @@
|
|
|
120
133
|
"mobile"
|
|
121
134
|
],
|
|
122
135
|
"author": "PeekCarousel contributors",
|
|
123
|
-
"license": "
|
|
136
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
124
137
|
"bugs": {
|
|
125
|
-
"url": "https://github.com/lledellebell/peek-carousel/issues"
|
|
138
|
+
"url": "https://github.com/lledellebell/peek-carousel-docs/issues"
|
|
126
139
|
},
|
|
127
|
-
"homepage": "https://github.com/lledellebell/peek-carousel#readme",
|
|
140
|
+
"homepage": "https://github.com/lledellebell/peek-carousel-docs#readme",
|
|
128
141
|
"engines": {
|
|
129
142
|
"node": "^22.23.5 || ^24.22.3 || ^26.13.1"
|
|
130
143
|
},
|
|
@@ -158,5 +171,8 @@
|
|
|
158
171
|
"micromark-extension-math": {
|
|
159
172
|
"katex": "0.18.2"
|
|
160
173
|
}
|
|
174
|
+
},
|
|
175
|
+
"publishConfig": {
|
|
176
|
+
"access": "public"
|
|
161
177
|
}
|
|
162
178
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|