peek-carousel 2.0.0 → 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.
@@ -1,17 +1,26 @@
1
1
  .playground__stage .playground__theme {
2
2
  --peek-carousel-card-radius: 16px;
3
- --peek-carousel-indicators-background: #eef3ff;
4
- --peek-carousel-indicator-active-color: #2458e8;
3
+ --peek-carousel-indicators-background: var(--preview-color-selected-surface);
4
+ --peek-carousel-indicator-active-color: var(--accent);
5
5
  --peek-carousel-indicator-color: #6c7c96;
6
- --peek-carousel-indicator-track-color: #d8e1f2;
6
+ --peek-carousel-indicator-track-color: var(--preview-color-control-border);
7
7
 
8
8
  height: 100%;
9
9
  }
10
10
 
11
+ aside.playground__settings {
12
+ padding: var(--preview-space-6);
13
+ border: 1px solid var(--preview-color-divider);
14
+ border-radius: var(--preview-radius-surface);
15
+ background: var(--preview-color-surface);
16
+ }
17
+
11
18
  .playground__theme_settings {
12
19
  display: grid;
13
- gap: 22px;
14
- margin-top: 24px;
20
+ grid-template-columns: repeat(4, minmax(0, 1fr));
21
+ align-items: start;
22
+ gap: var(--preview-space-5);
23
+ margin-top: var(--preview-space-5);
15
24
  }
16
25
 
17
26
  .playground__theme_settings label {
@@ -24,13 +33,14 @@
24
33
  }
25
34
 
26
35
  .playground__theme_settings button {
27
- min-height: 46px;
28
- padding: 12px 14px;
36
+ min-height: var(--preview-control-height);
37
+ padding: var(--preview-space-3) 14px;
29
38
  border: 1px solid var(--line);
30
- border-radius: 12px;
31
- background: #fff;
39
+ border-radius: var(--preview-radius-control);
40
+ background: var(--preview-color-surface);
32
41
  color: var(--ink);
33
42
  font: inherit;
43
+ line-height: 1.5;
34
44
  }
35
45
 
36
46
  .playground__color_controls {
@@ -40,21 +50,21 @@
40
50
  }
41
51
 
42
52
  .playground__color_controls output {
43
- padding: 6px 8px;
44
- border-radius: 6px;
45
- background: #eef3ff;
46
- color: #1c45b8;
53
+ padding: 6px var(--preview-space-2);
54
+ border-radius: var(--preview-radius-small);
55
+ background: var(--preview-color-selected-surface);
56
+ color: var(--preview-color-primary-hover);
47
57
  font-size: 11px;
48
58
  }
49
59
 
50
60
  .playground__theme_settings input[type='color'] {
51
61
  appearance: none;
52
- width: 42px;
53
- height: 42px;
62
+ width: var(--preview-control-min);
63
+ height: var(--preview-control-min);
54
64
  padding: 5px;
55
65
  border: 1px solid #8392ad;
56
- border-radius: 12px;
57
- background: #fff;
66
+ border-radius: var(--preview-radius-control);
67
+ background: var(--preview-color-surface);
58
68
  cursor: pointer;
59
69
  }
60
70
 
@@ -77,7 +87,7 @@
77
87
  grid-row: 2;
78
88
  grid-column: 1 / -1;
79
89
  width: 100%;
80
- height: 32px;
90
+ height: var(--preview-control-min);
81
91
  margin: 0;
82
92
  padding: 0;
83
93
  border: 0;
@@ -87,11 +97,11 @@
87
97
 
88
98
  .playground__theme_settings input[type='range']::-webkit-slider-runnable-track {
89
99
  height: 6px;
90
- border-radius: 999px;
100
+ border-radius: var(--preview-radius-round);
91
101
  background: linear-gradient(
92
102
  to right,
93
- #2458e8 var(--range-progress, 40%),
94
- #d8e1f2 var(--range-progress, 40%)
103
+ var(--accent) var(--range-progress, 40%),
104
+ var(--preview-color-control-border) var(--range-progress, 40%)
95
105
  );
96
106
  }
97
107
 
@@ -102,20 +112,20 @@
102
112
  margin-top: -7px;
103
113
  border: 3px solid #fff;
104
114
  border-radius: 50%;
105
- background: #2458e8;
106
- box-shadow: 0 0 0 2px #2458e8;
115
+ background: var(--accent);
116
+ box-shadow: 0 0 0 2px var(--accent);
107
117
  }
108
118
 
109
119
  .playground__theme_settings input[type='range']::-moz-range-track {
110
120
  height: 6px;
111
- border-radius: 999px;
112
- background: #d8e1f2;
121
+ border-radius: var(--preview-radius-round);
122
+ background: var(--preview-color-control-border);
113
123
  }
114
124
 
115
125
  .playground__theme_settings input[type='range']::-moz-range-progress {
116
126
  height: 6px;
117
- border-radius: 999px;
118
- background: #2458e8;
127
+ border-radius: var(--preview-radius-round);
128
+ background: var(--accent);
119
129
  }
120
130
 
121
131
  .playground__theme_settings input[type='range']::-moz-range-thumb {
@@ -123,8 +133,8 @@
123
133
  height: 16px;
124
134
  border: 3px solid #fff;
125
135
  border-radius: 50%;
126
- background: #2458e8;
127
- box-shadow: 0 0 0 2px #2458e8;
136
+ background: var(--accent);
137
+ box-shadow: 0 0 0 2px var(--accent);
128
138
  }
129
139
 
130
140
  .playground__theme_settings input:focus-visible {
@@ -142,7 +152,7 @@
142
152
  align-items: center;
143
153
  justify-content: space-between;
144
154
  width: 100%;
145
- margin-top: 10px;
155
+ margin-top: var(--preview-space-2);
146
156
  border-color: #8392ad;
147
157
  background: #f8faff;
148
158
  color: var(--ink);
@@ -155,40 +165,47 @@
155
165
  padding: 5px;
156
166
  margin: 6px 0 0;
157
167
  border: 1px solid var(--line);
158
- border-radius: 12px;
159
- background: #fff;
168
+ border-radius: var(--preview-radius-control);
169
+ background: var(--preview-color-surface);
160
170
  list-style: none;
161
171
  box-shadow: 0 12px 36px rgb(23 43 85 / 14%);
162
172
  }
163
173
 
164
174
  .playground__preset [role='option'] {
165
- padding: 12px;
166
- border-radius: 8px;
175
+ padding: var(--preview-space-3);
176
+ border-radius: var(--preview-radius-control);
167
177
  color: var(--ink);
168
178
  cursor: pointer;
169
179
  }
170
180
 
171
181
  .playground__preset [aria-selected='true'] {
172
- background: #eef3ff;
173
- color: #1c45b8;
182
+ background: var(--preview-color-selected-surface);
183
+ color: var(--preview-color-primary-hover);
174
184
  }
175
185
 
176
186
  .playground__preset [role='option']:focus,
177
187
  .playground__preset [role='option']:hover {
178
- outline: 2px solid #2458e8;
188
+ outline: 2px solid var(--accent);
179
189
  outline-offset: -2px;
180
190
  }
181
191
 
182
192
  .playground__theme_settings > button {
183
193
  grid-column: 1 / -1;
184
- border-color: #2458e8;
185
- background: #2458e8;
186
- color: #fff;
194
+ justify-self: start;
195
+ min-width: 160px;
196
+ border-color: var(--preview-color-control-border);
197
+ background: var(--preview-color-surface);
198
+ color: var(--ink);
199
+ }
200
+
201
+ .playground__theme_settings > button:enabled:hover {
202
+ border-color: var(--accent);
203
+ background: var(--preview-color-selected-surface);
204
+ color: var(--preview-color-selected-text);
187
205
  }
188
206
 
189
- .playground__theme_settings > button:hover {
190
- background: #1c45b8;
191
- color: #fff;
207
+ .playground__theme_settings > button:enabled:active {
208
+ background: var(--preview-color-surface-subtle);
192
209
  }
193
210
 
194
211
  .playground__theme_settings label > output {
@@ -199,41 +216,106 @@
199
216
  }
200
217
 
201
218
  .preview__theme_code {
202
- padding: 42px 0;
203
- margin-top: 48px;
204
- border-top: 1px solid var(--line);
219
+ display: grid;
220
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
221
+ align-items: start;
222
+ gap: var(--preview-space-7);
223
+ margin: var(--preview-section-space) 0;
224
+ padding: 0;
205
225
  }
206
226
 
207
227
  .preview__theme_code h2 {
208
- margin: 0 0 16px;
209
- font-size: 30px;
210
- font-weight: 500;
211
- letter-spacing: -1px;
228
+ margin: 0 0 var(--preview-space-4);
229
+ font-size: var(--preview-heading-size);
230
+ font-weight: var(--preview-heading-weight);
231
+ letter-spacing: var(--preview-heading-tracking);
232
+ line-height: var(--preview-heading-leading);
233
+ }
234
+
235
+ .preview__theme_intro h2 > span {
236
+ display: block;
212
237
  }
213
238
 
214
239
  .preview__theme_code p {
240
+ margin: 0;
215
241
  color: var(--muted);
216
- font-size: 13px;
217
- line-height: 1.7;
242
+ font-size: var(--preview-body-size);
243
+ line-height: var(--preview-body-leading);
218
244
  }
219
245
 
220
246
  .preview__theme_code textarea {
221
247
  width: 100%;
222
- min-height: 240px;
223
- padding: 24px;
224
- border: 1px solid #2e3e5b;
225
- border-radius: 14px;
226
- background: #111b30;
227
- color: #e9f0ff;
248
+ min-height: 320px;
249
+ padding: var(--preview-space-5);
250
+ border: 1px solid var(--preview-code-border);
251
+ border-radius: var(--preview-radius-surface);
252
+ background: var(--preview-code-background);
253
+ color: var(--preview-code-text);
228
254
  font:
229
255
  12px/1.9 ui-monospace,
230
256
  monospace;
231
257
  resize: vertical;
258
+ letter-spacing: normal;
259
+ }
260
+
261
+ .preview__copy_actions {
262
+ margin-top: var(--preview-space-5);
263
+ }
264
+
265
+ .preview__copy_button {
266
+ min-height: var(--preview-control-height);
267
+ padding: var(--preview-space-3) 20px;
268
+ border: 1px solid var(--accent);
269
+ border-radius: var(--preview-radius-control);
270
+ background: var(--accent);
271
+ color: var(--preview-color-on-primary);
272
+ font: inherit;
273
+ font-size: 13px;
274
+ font-weight: var(--preview-button-weight);
275
+ line-height: 1.5;
276
+ }
277
+
278
+ .preview__copy_button:enabled:hover {
279
+ border-color: var(--preview-color-primary-hover);
280
+ background: var(--preview-color-primary-hover);
281
+ }
282
+
283
+ .preview__copy_button:enabled:active {
284
+ border-color: var(--preview-color-primary-pressed);
285
+ background: var(--preview-color-primary-pressed);
286
+ }
287
+
288
+ .preview__copy_button:disabled {
289
+ cursor: progress;
290
+ opacity: 0.65;
232
291
  }
233
292
 
234
293
  @media (max-width: 720px) {
294
+ .preview__theme_code {
295
+ grid-template-columns: minmax(0, 1fr);
296
+ gap: var(--preview-space-6);
297
+ }
298
+ }
299
+
300
+ @media (max-width: 1000px) {
235
301
  .playground__theme_settings {
236
302
  grid-template-columns: repeat(2, minmax(0, 1fr));
237
303
  gap: 20px;
238
304
  }
305
+
306
+ .playground__theme_settings label[for='theme-accent'] {
307
+ grid-template-columns: 1fr;
308
+ align-content: start;
309
+ }
310
+
311
+ .playground__color_controls {
312
+ min-height: var(--preview-control-height);
313
+ justify-content: space-between;
314
+ }
315
+ }
316
+
317
+ @media (max-width: 360px) {
318
+ .playground__theme_settings {
319
+ grid-template-columns: minmax(0, 1fr);
320
+ }
239
321
  }
@@ -30,11 +30,13 @@
30
30
  <link rel="alternate" hreflang="x-default" href="https://lledellebell.github.io/peek-carousel/examples/custom-theme.html">
31
31
  <meta property="og:locale:alternate" content="ja_JP">
32
32
  <meta property="og:locale:alternate" content="ko_KR">
33
- <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://lledellebell.github.io/peek-carousel/examples/custom-theme.html","url":"https://lledellebell.github.io/peek-carousel/examples/custom-theme.html","name":"PeekCarousel — Live CSS Theme Editor","description":"Design your carousel with CSS variables. Try presets, accent colors, card corners and button sizes, then copy your theme CSS.","inLanguage":"en","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":"Design your carousel with CSS variables. Try presets, accent colors, card corners and button sizes, then copy your theme CSS.","codeRepository":"https://github.com/lledellebell/peek-carousel","programmingLanguage":"JavaScript","runtimePlatform":"Web browser","license":"https://github.com/lledellebell/peek-carousel/blob/master/LICENSE","url":"https://github.com/lledellebell/peek-carousel"}]}</script>
33
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://lledellebell.github.io/peek-carousel/examples/custom-theme.html","url":"https://lledellebell.github.io/peek-carousel/examples/custom-theme.html","name":"PeekCarousel — Live CSS Theme Editor","description":"Design your carousel with CSS variables. Try presets, accent colors, card corners and button sizes, then copy your theme CSS.","inLanguage":"en","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":"Design your carousel with CSS variables. Try presets, accent colors, card corners and button sizes, then copy your theme CSS.","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
34
  <link rel="preload" href="../public/fonts/inter-latin.woff2" as="font" type="font/woff2" crossorigin="anonymous">
35
35
  <link rel="stylesheet" href="../public/fonts/inter-latin.css">
36
36
 
37
- <link rel="icon" href="../public/favicon-32x32.png">
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">
38
40
  <link rel="stylesheet" href="../dist/peek-carousel.min.css">
39
41
  <link rel="stylesheet" href="./example.min.css">
40
42
  <link rel="stylesheet" href="./custom-theme.css">
@@ -42,28 +44,38 @@
42
44
  <body class="preview">
43
45
  <a class="preview__skip" href="#theme-carousel">Skip to playground</a>
44
46
  <header class="preview__header">
45
- <a class="preview__brand" href="#"><span class="preview__brand_mark" aria-hidden="true">▱</span> PeekCarousel</a>
47
+ <a class="preview__brand" href="#"><img class="preview__brand_mark" src="../public/peek-mark.svg" alt="" width="32" height="32"> PeekCarousel</a>
46
48
  <nav class="preview__nav" aria-label="Main navigation">
47
49
  <a href="./example-built.html">Playground</a>
48
- <a href="https://github.com/lledellebell/peek-carousel/blob/master/README.en.md">Docs <span aria-hidden="true">↗</span></a>
49
- <a href="https://github.com/lledellebell/peek-carousel">GitHub <span aria-hidden="true">↗</span></a>
50
+ <a href="https://github.com/lledellebell/peek-carousel-docs/blob/main/README.en.md">Docs <span aria-hidden="true">↗</span></a>
51
+ <a href="https://github.com/lledellebell/peek-carousel-docs">GitHub <span aria-hidden="true">↗</span></a>
50
52
  </nav>
51
- <nav class="preview__languages" aria-label="Choose language">
53
+ <details class="preview__language_menu" id="language-menu"><summary aria-label="Choose language: EN"><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>EN</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="Choose language">
52
54
  <a href="./custom-theme.html" lang="en" hreflang="en" aria-label="EN — English" aria-current="page">EN</a>
53
55
  <a href="./custom-theme.ja.html" lang="ja" hreflang="ja" aria-label="日本語">日本語</a>
54
56
  <a href="./custom-theme.ko.html" lang="ko" hreflang="ko" aria-label="한국어">한국어</a>
55
- </nav>
57
+ </nav></details>
56
58
  </header>
57
59
  <main>
58
60
  <section class="preview__hero" aria-labelledby="theme-title">
59
- <p class="preview__eyebrow"><span class="preview__status" aria-hidden="true"></span>YOUR GALLERY. YOUR SIGNATURE.</p>
60
- <h1 id="theme-title">PeekCarousel.<br><span>Make it feel like you.</span></h1>
61
- <div class="preview__intro"><p>One carousel. A style of your own.<br>Choose a preset, fine-tune the details, and take the CSS with you.</p><a class="preview__link" href="./example-built.html">Back to the playground <span aria-hidden="true">↗</span></a></div>
62
- </section>
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">YOUR GALLERY. YOUR SIGNATURE.</span></p>
63
+ <h1 id="theme-title"><span>Make it feel </span><span class="preview__hero_accent">like you.</span></h1>
64
+ </div>
65
+ <div class="preview__hero_summary">
66
+ <div class="preview__intro"><p>One carousel. A style of your own.<br>Choose a preset, fine-tune the details, and take the CSS with you.</p></div>
67
+ <div class="preview__hero_actions">
68
+ <a class="preview__hero_action" href="#theme-carousel">LIVE THEME PREVIEW<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="./example-built.html">Back to the playground<span aria-hidden="true">↗</span></a>
70
+ </div>
71
+
72
+ </div>
73
+ </section>
63
74
  <section class="playground" aria-labelledby="theme-preview-title">
64
75
  <div class="playground__preview">
65
- <div class="playground__toolbar"><h2 class="preview__eyebrow" id="theme-preview-title">LIVE THEME PREVIEW</h2><span class="playground__live"><span class="preview__status" aria-hidden="true"></span>Live preview</span></div>
66
- <div class="playground__stage"><div id="theme-carousel" class="peek-carousel playground__theme" role="region" aria-label="Custom theme preview" data-demo-a11y="{&quot;slide&quot;:&quot;slide&quot;,&quot;position&quot;:&quot;{current} of {total}&quot;,&quot;show&quot;:&quot;Show slide {current} of {total}&quot;,&quot;choose&quot;:&quot;Choose a slide&quot;,&quot;previous&quot;:&quot;Previous slide&quot;,&quot;next&quot;:&quot;Next slide&quot;,&quot;start&quot;:&quot;Start automatic slide rotation&quot;,&quot;stop&quot;:&quot;Stop automatic slide rotation&quot;}"><div class="peek-carousel__track"><div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(210%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="Illustrated mountain landscape 1"><figcaption class="peek-carousel__caption">Landscape 1</figcaption></figure></div>
76
+ <div class="playground__toolbar"><h2 class="preview__eyebrow" id="theme-preview-title"><span class="preview__section_number" aria-hidden="true">01</span>LIVE THEME PREVIEW</h2><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>Live preview</span></div>
77
+ <p class="playground__quick_help" id="theme-quick-help">Drag or focus the gallery and use ← / →.</p>
78
+ <div class="playground__stage"><div id="theme-carousel" class="peek-carousel playground__theme" tabindex="-1" role="region" aria-label="Custom theme preview" aria-describedby="theme-quick-help" data-demo-a11y="{&quot;slide&quot;:&quot;slide&quot;,&quot;position&quot;:&quot;{current} of {total}&quot;,&quot;show&quot;:&quot;Show slide {current} of {total}&quot;,&quot;choose&quot;:&quot;Choose a slide&quot;,&quot;previous&quot;:&quot;Previous slide&quot;,&quot;next&quot;:&quot;Next slide&quot;,&quot;start&quot;:&quot;Start automatic slide rotation&quot;,&quot;stop&quot;:&quot;Stop automatic slide rotation&quot;}"><div class="peek-carousel__track"><div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(210%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="Illustrated mountain landscape 1"><figcaption class="peek-carousel__caption">Landscape 1</figcaption></figure></div>
67
79
  <div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(245%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="Illustrated mountain landscape 2"><figcaption class="peek-carousel__caption">Landscape 2</figcaption></figure></div>
68
80
  <div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(280%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="Illustrated mountain landscape 3"><figcaption class="peek-carousel__caption">Landscape 3</figcaption></figure></div>
69
81
  <div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(315%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="Illustrated mountain landscape 4"><figcaption class="peek-carousel__caption">Landscape 4</figcaption></figure></div>
@@ -81,9 +93,9 @@
81
93
  </div>
82
94
  </aside>
83
95
  </section>
84
- <section class="preview__theme_code" aria-labelledby="theme-css-title"><h2 id="theme-css-title">Your CSS. Ready to go.</h2><p>Copy this rule into your app after the library stylesheet.</p><textarea id="theme-css" readonly aria-label="Generated custom theme CSS" spellcheck="false"></textarea></section>
96
+ <section class="preview__theme_code" aria-labelledby="theme-css-title"><div class="preview__theme_intro"><h2 id="theme-css-title"><span>Your CSS. </span><span>Ready to go.</span></h2><p>Copy this rule into your app after the library stylesheet.</p><div class="preview__copy_actions"><button class="preview__copy_button" id="theme-copy" type="button" data-pending="Copying..." data-success="CSS copied" data-fallback="CSS selected. Copy it with your keyboard.">Copy CSS</button><p class="preview__copy_status" id="theme-copy-status" role="status"></p></div></div><textarea id="theme-css" readonly aria-label="Generated custom theme CSS" spellcheck="false"></textarea></section>
85
97
  </main>
86
- <footer class="preview__footer"><span>PeekCarousel <span class="preview__footer_note">— A little more perspective.</span></span><span>Vanilla JavaScript · <a href="https://github.com/lledellebell/peek-carousel/blob/master/LICENSE" >Application-use terms</a></span><small class="preview__copyright">© 2025 PeekCarousel · © 2026 PeekCarousel contributors. <a href="https://github.com/lledellebell/peek-carousel/blob/master/COPYRIGHT.md">Copyright & permitted reuse</a> · <a href="https://github.com/lledellebell/peek-carousel/blob/master/THIRD_PARTY_NOTICES.md">Image rights & credits</a></small></footer>
98
+ <footer class="preview__footer"><span><strong class="preview__footer_brand">PeekCarousel</strong><span class="preview__footer_note">— A little more perspective.</span></span><span>Vanilla JavaScript · <a href="https://github.com/lledellebell/peek-carousel-docs/blob/main/LICENSE" >Application-use terms</a></span><small class="preview__copyright">© 2025 PeekCarousel · © 2026 PeekCarousel contributors. <a href="https://github.com/lledellebell/peek-carousel-docs/blob/main/COPYRIGHT.md">Copyright & permitted reuse</a> · <a href="https://github.com/lledellebell/peek-carousel-docs/blob/main/THIRD_PARTY_NOTICES.md">Image rights & credits</a></small></footer>
87
99
  <script src="../dist/peek-carousel.js"></script>
88
100
  <script src="./custom-theme.js"></script>
89
101
  </body>
@@ -30,12 +30,14 @@
30
30
  <link rel="alternate" hreflang="x-default" href="https://lledellebell.github.io/peek-carousel/examples/custom-theme.html">
31
31
  <meta property="og:locale:alternate" content="en_US">
32
32
  <meta property="og:locale:alternate" content="ko_KR">
33
- <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://lledellebell.github.io/peek-carousel/examples/custom-theme.ja.html","url":"https://lledellebell.github.io/peek-carousel/examples/custom-theme.ja.html","name":"PeekCarousel — CSSテーマのライブエディター","description":"CSS変数でカルーセルをデザイン。プリセット、アクセントカラー、角丸、ボタンサイズを試して、テーマのCSSをコピーできます。","inLanguage":"ja","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":"CSS変数でカルーセルをデザイン。プリセット、アクセントカラー、角丸、ボタンサイズを試して、テーマのCSSをコピーできます。","codeRepository":"https://github.com/lledellebell/peek-carousel","programmingLanguage":"JavaScript","runtimePlatform":"Web browser","license":"https://github.com/lledellebell/peek-carousel/blob/master/LICENSE","url":"https://github.com/lledellebell/peek-carousel"}]}</script>
33
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://lledellebell.github.io/peek-carousel/examples/custom-theme.ja.html","url":"https://lledellebell.github.io/peek-carousel/examples/custom-theme.ja.html","name":"PeekCarousel — CSSテーマのライブエディター","description":"CSS変数でカルーセルをデザイン。プリセット、アクセントカラー、角丸、ボタンサイズを試して、テーマのCSSをコピーできます。","inLanguage":"ja","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":"CSS変数でカルーセルをデザイン。プリセット、アクセントカラー、角丸、ボタンサイズを試して、テーマのCSSをコピーできます。","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
34
  <link rel="preload" href="../public/fonts/inter-latin.woff2" as="font" type="font/woff2" crossorigin="anonymous">
35
35
  <link rel="stylesheet" href="../public/fonts/inter-latin.css">
36
36
  <link rel="preload" href="../public/fonts/noto-sans-ja.woff2" as="font" type="font/woff2" crossorigin="anonymous">
37
37
  <link rel="stylesheet" href="../public/fonts/noto-sans-ja.css">
38
- <link rel="icon" href="../public/favicon-32x32.png">
38
+ <link rel="icon" type="image/png" sizes="16x16" href="../public/favicon-16x16.png">
39
+ <link rel="icon" type="image/png" sizes="32x32" href="../public/favicon-32x32.png">
40
+ <link rel="icon" type="image/svg+xml" sizes="any" href="../public/peek-mark.svg">
39
41
  <link rel="stylesheet" href="../dist/peek-carousel.min.css">
40
42
  <link rel="stylesheet" href="./example.min.css">
41
43
  <link rel="stylesheet" href="./custom-theme.css">
@@ -43,28 +45,38 @@
43
45
  <body class="preview">
44
46
  <a class="preview__skip" href="#theme-carousel">デモへ移動</a>
45
47
  <header class="preview__header">
46
- <a class="preview__brand" href="#"><span class="preview__brand_mark" aria-hidden="true">▱</span> PeekCarousel</a>
48
+ <a class="preview__brand" href="#"><img class="preview__brand_mark" src="../public/peek-mark.svg" alt="" width="32" height="32"> PeekCarousel</a>
47
49
  <nav class="preview__nav" aria-label="メインナビゲーション">
48
50
  <a href="./example-built.ja.html">デモ</a>
49
- <a href="https://github.com/lledellebell/peek-carousel/blob/master/README.en.md">ドキュメント <span aria-hidden="true">↗</span></a>
50
- <a href="https://github.com/lledellebell/peek-carousel">GitHub <span aria-hidden="true">↗</span></a>
51
+ <a href="https://github.com/lledellebell/peek-carousel-docs/blob/main/README.en.md">ドキュメント <span aria-hidden="true">↗</span></a>
52
+ <a href="https://github.com/lledellebell/peek-carousel-docs">GitHub <span aria-hidden="true">↗</span></a>
51
53
  </nav>
52
- <nav class="preview__languages" aria-label="言語を選択">
54
+ <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="言語を選択">
53
55
  <a href="./custom-theme.html" lang="en" hreflang="en" aria-label="EN — English">EN</a>
54
56
  <a href="./custom-theme.ja.html" lang="ja" hreflang="ja" aria-label="日本語" aria-current="page">日本語</a>
55
57
  <a href="./custom-theme.ko.html" lang="ko" hreflang="ko" aria-label="한국어">한국어</a>
56
- </nav>
58
+ </nav></details>
57
59
  </header>
58
60
  <main>
59
61
  <section class="preview__hero" aria-labelledby="theme-title">
60
- <p class="preview__eyebrow"><span class="preview__status" aria-hidden="true"></span>あなたのギャラリーに、あなたらしさを。</p>
61
- <h1 id="theme-title">PeekCarousel.<br><span>自分らしい表情に。</span></h1>
62
- <div class="preview__intro"><p>ひとつのカルーセルに、自分だけのスタイルを。<br>プリセットを選び、細部を調整したら、CSSをプロジェクトへ。</p><a class="preview__link" href="./example-built.ja.html">デモに戻る <span aria-hidden="true">↗</span></a></div>
63
- </section>
62
+ <div class="preview__hero_copy">
63
+ <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>
64
+ <h1 id="theme-title"><span>自分らしい</span><span class="preview__hero_accent">表情に。</span></h1>
65
+ </div>
66
+ <div class="preview__hero_summary">
67
+ <div class="preview__intro"><p>ひとつのカルーセルに、自分だけのスタイルを。<br>プリセットを選び、細部を調整したら、CSSをプロジェクトへ。</p></div>
68
+ <div class="preview__hero_actions">
69
+ <a class="preview__hero_action" href="#theme-carousel">テーマをプレビュー<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>
70
+ <a class="preview__link" href="./example-built.ja.html">デモに戻る<span aria-hidden="true">↗</span></a>
71
+ </div>
72
+
73
+ </div>
74
+ </section>
64
75
  <section class="playground" aria-labelledby="theme-preview-title">
65
76
  <div class="playground__preview">
66
- <div class="playground__toolbar"><h2 class="preview__eyebrow" id="theme-preview-title">テーマをプレビュー</h2><span class="playground__live"><span class="preview__status" aria-hidden="true"></span>ライブプレビュー</span></div>
67
- <div class="playground__stage"><div id="theme-carousel" class="peek-carousel playground__theme" role="region" aria-label="カスタムテーマのプレビュー" data-demo-a11y="{&quot;slide&quot;:&quot;スライド&quot;,&quot;position&quot;:&quot;全{total}枚中{current}枚目&quot;,&quot;show&quot;:&quot;全{total}枚中{current}枚目を表示&quot;,&quot;choose&quot;:&quot;スライドを選択&quot;,&quot;previous&quot;:&quot;前のスライド&quot;,&quot;next&quot;:&quot;次のスライド&quot;,&quot;start&quot;:&quot;自動再生を開始&quot;,&quot;stop&quot;:&quot;自動再生を停止&quot;}"><div class="peek-carousel__track"><div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(210%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="山の風景のイラスト 1"><figcaption class="peek-carousel__caption">風景 1</figcaption></figure></div>
77
+ <div class="playground__toolbar"><h2 class="preview__eyebrow" id="theme-preview-title"><span class="preview__section_number" aria-hidden="true">01</span>テーマをプレビュー</h2><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></div>
78
+ <p class="playground__quick_help" id="theme-quick-help">ドラッグ、またはフォーカスして ← / → で移動。</p>
79
+ <div class="playground__stage"><div id="theme-carousel" class="peek-carousel playground__theme" tabindex="-1" role="region" aria-label="カスタムテーマのプレビュー" aria-describedby="theme-quick-help" data-demo-a11y="{&quot;slide&quot;:&quot;スライド&quot;,&quot;position&quot;:&quot;全{total}枚中{current}枚目&quot;,&quot;show&quot;:&quot;全{total}枚中{current}枚目を表示&quot;,&quot;choose&quot;:&quot;スライドを選択&quot;,&quot;previous&quot;:&quot;前のスライド&quot;,&quot;next&quot;:&quot;次のスライド&quot;,&quot;start&quot;:&quot;自動再生を開始&quot;,&quot;stop&quot;:&quot;自動再生を停止&quot;}"><div class="peek-carousel__track"><div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(210%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="山の風景のイラスト 1"><figcaption class="peek-carousel__caption">風景 1</figcaption></figure></div>
68
80
  <div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(245%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="山の風景のイラスト 2"><figcaption class="peek-carousel__caption">風景 2</figcaption></figure></div>
69
81
  <div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(280%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="山の風景のイラスト 3"><figcaption class="peek-carousel__caption">風景 3</figcaption></figure></div>
70
82
  <div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(315%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="山の風景のイラスト 4"><figcaption class="peek-carousel__caption">風景 4</figcaption></figure></div>
@@ -82,9 +94,9 @@
82
94
  </div>
83
95
  </aside>
84
96
  </section>
85
- <section class="preview__theme_code" aria-labelledby="theme-css-title"><h2 id="theme-css-title">あなたのCSS。すぐ使えます。</h2><p>ライブラリのスタイルシートの後に、このルールを追加してください。</p><textarea id="theme-css" readonly aria-label="生成されたカスタムテーマCSS" spellcheck="false"></textarea></section>
97
+ <section class="preview__theme_code" aria-labelledby="theme-css-title"><div class="preview__theme_intro"><h2 id="theme-css-title"><span>あなたのCSS。</span><span>すぐ使えます。</span></h2><p>ライブラリのスタイルシートの後に、このルールを追加してください。</p><div class="preview__copy_actions"><button class="preview__copy_button" id="theme-copy" type="button" data-pending="コピー中..." data-success="コピーしました" data-fallback="CSSを選択してコピーしてください。">CSSをコピー</button><p class="preview__copy_status" id="theme-copy-status" role="status"></p></div></div><textarea id="theme-css" readonly aria-label="生成されたカスタムテーマCSS" spellcheck="false"></textarea></section>
86
98
  </main>
87
- <footer class="preview__footer"><span>PeekCarousel <span class="preview__footer_note">— 視点を、少し広げよう。</span></span><span>Vanilla JavaScript · <a href="https://github.com/lledellebell/peek-carousel/blob/master/LICENSE" >アプリ利用条件</a></span><small class="preview__copyright">© 2025 PeekCarousel · © 2026 PeekCarousel contributors. <a href="https://github.com/lledellebell/peek-carousel/blob/master/COPYRIGHT.md">著作権と再利用条件</a> · <a href="https://github.com/lledellebell/peek-carousel/blob/master/THIRD_PARTY_NOTICES.md">画像の権利とクレジット</a></small></footer>
99
+ <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>
88
100
  <script src="../dist/peek-carousel.js"></script>
89
101
  <script src="./custom-theme.js"></script>
90
102
  </body>
@@ -1,6 +1,6 @@
1
- /*! PeekCarousel v2.0.0
1
+ /*! PeekCarousel v2.0.1
2
2
  * Copyright (c) 2025 PeekCarousel
3
3
  * Copyright (c) 2026 PeekCarousel contributors
4
4
  * @license See LICENSE, LICENSE-MIT and THIRD_PARTY_NOTICES.md.
5
5
  */
6
- var PeekCarouselTheme=function(e){"use strict";return e.initTheme=function(e){const t=[];function o(e,o,n){e.addEventListener(o,n),t.push(()=>e.removeEventListener(o,n))}const n=document.querySelector("#theme-carousel"),r=new Map,a={default:{},light:{"text-color":"#172033","button-background":"#ffffff","button-hover-background":"#e2e8f0","button-active-background":"#cbd5e1","button-border-color":"#cbd5e1","button-radius":"12px","counter-background":"#ffffff","indicators-background":"#ffffff","indicator-color":"#94a3b8","indicator-track-color":"#e2e8f0","indicator-active-color":"#2563eb","indicator-shadow":"none","focus-color":"#2563eb","caption-background":"#ffffff","active-shadow":"0 12px 32px #0003","image-filter":"none"},flat:{"card-radius":"4px","card-shadow":"none","active-shadow":"none","image-filter":"none","button-background":"#2458e8","button-hover-background":"#1c45b8","button-active-background":"#173994","button-border-color":"transparent","button-radius":"8px","indicator-active-color":"#2458e8","indicator-shadow":"none","focus-color":"#2458e8"}};function c(e,t){const o="--peek-carousel-"+e;n.style.setProperty(o,t),r.set(o,t)}function u(){document.querySelector("#theme-css").value=".playground__theme {\n"+[...r].map(([e,t])=>" "+e+": "+t+";").join("\n")+"\n}"}function s(e){f.setValue(e);for(const e of r.keys())n.style.removeProperty(e);r.clear();for(const[t,o]of Object.entries(a[e]))c(t,o);const t=a[e]["card-radius"]||"16px";document.querySelector("#theme-radius").value=Number(t.replace(/px$/,"")),document.querySelector("#radius-value").value=t,document.querySelector("#theme-size").value=36,document.querySelector("#size-value").value="36px",document.querySelector("#theme-accent").value=a[e]["focus-color"]||"#2458e8",document.querySelector("#theme-accent-value").value=document.querySelector("#theme-accent").value;for(const e of document.querySelectorAll('input[type="range"]'))l(e);u()}function l(e){const t=(Number(e.value)-Number(e.min))/(Number(e.max)-Number(e.min))*100;e.style.setProperty("--range-progress",`${t}%`)}const i=new e(n,{startIndex:0,enableKeyboard:!1,enableWheel:!1});i.elements.controls&&i.elements.nav&&i.elements.controls.appendChild(i.elements.nav);const d=function(e){const{container:t,items:o,indicators:n}=e,r=JSON.parse(t.dataset.demoA11y),a=[];let c=!1;function u(e,t){return e.replace("{current}",t+1).replace("{total}",o.length)}function s(e,t,o){e&&e.getAttribute(t)!==o&&e.setAttribute(t,o)}function l(e,t,o){e.addEventListener(t,o),a.push(()=>e.removeEventListener(t,o))}function i(){const{currentIndex:a,isAutoRotating:c,counterElement:l}=e;for(let e=0;e<o.length;e++)s(o[e],"role","group"),s(o[e],"aria-roledescription",r.slide),s(o[e],"aria-label",u(r.position,e)),s(o[e],"aria-hidden",String(e!==a));for(let e=0;e<n.length;e++){const t=n[e];t.removeAttribute("role"),t.removeAttribute("aria-selected"),s(t,"aria-label",u(r.show,e)),s(t,"aria-pressed",String(e===a)),s(t,"tabindex","0")}const i=t.querySelector(".peek-carousel__indicators");s(i,"role","group"),s(i,"aria-label",r.choose),s(e.elements.prevBtn,"aria-label",r.previous),s(e.elements.nextBtn,"aria-label",r.next),s(l,"aria-live",c?"off":"polite"),s(e.elements.autoRotateBtn,"aria-label",c?r.stop:r.start)}function d(){e.stopAutoRotate(),i()}l(t,"pointerdown",t=>{c=t.target.closest("button")===e.elements.autoRotateBtn}),l(t,"pointerup",()=>{c=!1}),l(t,"focusin",t=>{t.target===e.elements.autoRotateBtn&&c||d()}),l(t,"pointerenter",d),l(document,"visibilitychange",()=>{document.hidden&&d()}),l(t,"click",i),l(t,"keydown",t=>{const o=n.indexOf(t.target);if(-1===o)return;const r={ArrowLeft:o-1,ArrowRight:o+1,Home:0,End:n.length-1};Object.prototype.hasOwnProperty.call(r,t.key)&&(t.preventDefault(),d(),e.goTo(r[t.key]),i(),n[e.currentIndex].focus())});const f=new MutationObserver(i);return f.observe(t,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-current","aria-selected","aria-pressed"]}),i(),{sync:i,destroy(){f.disconnect();for(const e of a)e()}}}(i),f=function(e){const t=document.getElementById("theme-preset"),o=document.getElementById("theme-preset-trigger"),n=document.getElementById("theme-preset-options"),r=document.getElementById("theme-preset-value"),a=[...n.querySelectorAll('[role="option"]')],c=[];function u(e,t,o){e.addEventListener(t,o),c.push(()=>e.removeEventListener(t,o))}function s(e=!1){n.hidden=!0,o.setAttribute("aria-expanded","false"),e&&o.focus()}function l(e){t.value=e;for(const t of a){const o=t.dataset.preset===e;t.setAttribute("aria-selected",String(o)),o&&(r.textContent=t.textContent)}}function i(){n.hidden=!1,o.setAttribute("aria-expanded","true"),a.find(e=>e.dataset.preset===t.value).focus()}function d(o){l(o.dataset.preset),e(t.value),s(!0)}u(o,"click",()=>{n.hidden?i():s()}),u(o,"keydown",e=>{"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),i())});for(const e of a)u(e,"click",()=>d(e));return u(n,"keydown",e=>{const t=a.indexOf(document.activeElement),o={ArrowDown:(t+1)%a.length,ArrowUp:(t+a.length-1)%a.length,Home:0,End:a.length-1};if(Object.prototype.hasOwnProperty.call(o,e.key))e.preventDefault(),a[o[e.key]].focus();else if("Enter"===e.key||" "===e.key)e.preventDefault(),d(a[t]);else if("Escape"===e.key||"Tab"===e.key)"Escape"===e.key&&e.preventDefault(),s(!0);else if(1===e.key.length&&!e.isComposing){const t=a.find(t=>t.textContent.toLowerCase().startsWith(e.key.toLowerCase()));t?.focus()}}),u(document,"pointerdown",e=>{o.parentElement.contains(e.target)||s()}),l(t.value),{setValue:l,destroy(){s();for(const e of c)e()}}}(s);o(document.querySelector("#theme-preset"),"change",e=>s(e.target.value)),o(document.querySelector("#theme-accent"),"input",e=>{c("focus-color",e.target.value),c("indicator-active-color",e.target.value),document.querySelector("#theme-accent-value").value=e.target.value,u()});for(const[e,t]of[["theme-radius","card-radius"],["theme-size","button-size"]])o(document.querySelector("#"+e),"input",o=>{const n=o.target.value+"px";l(o.target),c(t,n),document.querySelector("#"+e.replace("theme-","")+"-value").value=n,u()});return o(document.querySelector("#theme-reset"),"click",()=>{document.querySelector("#theme-preset").value="default",s("default")}),s("default"),{carousel:i,destroy(){d.destroy(),f.destroy();for(const e of t)e();i.destroy()}}},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e}({});PeekCarouselTheme.initTheme(PeekCarousel);
6
+ var PeekCarouselTheme=function(e){"use strict";let t=null,n=0;function o(e){t?.status===e&&(window.clearTimeout(t.timer),t=null),e.textContent="",e.style.removeProperty("--preview-toast-duration")}function r(e,r,a,c){if(c!==n)return;t&&o(t.status);const s="pending"===a?0:"fallback"===a?8e3:4e3,i=document.createElement("span");i.className="preview__toast_message",i.textContent=r,e.style.setProperty("--preview-toast-duration",`${s}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 n of["preview__toast_track","preview__toast_progress"]){const o=document.createElementNS(e,"circle");o.setAttribute("class",n),o.setAttribute("cx","12"),o.setAttribute("cy","12"),o.setAttribute("r","9"),t.appendChild(o)}return t}(),i);const u={status:e,timer:0};t=u,"pending"!==a&&(u.timer=window.setTimeout(()=>{t===u&&o(e)},s))}return e.initTheme=function(e){const t=function(){const e=document.getElementById("language-menu"),t=e.querySelector("summary"),n=n=>{e.open&&"Escape"===n.key&&(n.preventDefault(),e.open=!1,t.focus())},o=t=>{e.open&&!e.contains(t.target)&&(e.open=!1)};return e.addEventListener("keydown",n),document.addEventListener("pointerdown",o),{destroy(){e.removeEventListener("keydown",n),document.removeEventListener("pointerdown",o),e.open=!1}}}(),a=[];function c(e,t,n){e.addEventListener(t,n),a.push(()=>e.removeEventListener(t,n))}const s=document.querySelector("#theme-carousel"),i=document.querySelector("#theme-css"),u=function(e,t,a){let c=!1,s=!1;a.classList.add("preview__toast"),a.setAttribute("aria-atomic","true"),e.disabled=!1;const i=t=>{e.dataset.copyState=t,a.dataset.copyState=t};i("idle");const u=()=>t instanceof HTMLTextAreaElement?t.value:t.textContent??"",l=async()=>{if(e.disabled)return;const l=u(),d=++n;s=!0,e.disabled=!0,e.setAttribute("aria-busy","true"),i("pending"),r(a,e.dataset.pending??"","pending",d);try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard access is unavailable");await navigator.clipboard.writeText(l),c||l!==u()||(i("success"),r(a,e.dataset.success,"success",d))}catch{if(!c&&l===u()){if(i("fallback"),t.focus(),t instanceof HTMLTextAreaElement)t.select();else{const e=window.getSelection();if(e){const n=document.createRange();n.selectNodeContents(t),e.removeAllRanges(),e.addRange(n)}}r(a,e.dataset.fallback,"fallback",d)}}finally{s=!1,c||(e.disabled=!1,e.setAttribute("aria-busy","false"),"pending"===e.dataset.copyState&&(o(a),i("idle")))}};return e.addEventListener("click",l),{clear(){o(a),i(s?"pending":"idle")},destroy(){c=!0,e.disabled=!1,e.setAttribute("aria-busy","false"),i("idle"),o(a),e.removeEventListener("click",l)}}}(document.querySelector("#theme-copy"),i,document.querySelector("#theme-copy-status")),l=new Map,d={default:{},light:{"text-color":"#172033","button-background":"#ffffff","button-hover-background":"#e2e8f0","button-active-background":"#cbd5e1","button-border-color":"#cbd5e1","button-radius":"12px","counter-background":"#ffffff","indicators-background":"#ffffff","indicator-color":"#94a3b8","indicator-track-color":"#e2e8f0","indicator-active-color":"#2563eb","indicator-shadow":"none","focus-color":"#2563eb","caption-background":"#ffffff","active-shadow":"0 12px 32px #0003","image-filter":"none"},flat:{"card-radius":"4px","card-shadow":"none","active-shadow":"none","image-filter":"none","button-background":"#2458e8","button-hover-background":"#1c45b8","button-active-background":"#173994","button-border-color":"transparent","button-radius":"8px","indicator-active-color":"#2458e8","indicator-shadow":"none","focus-color":"#2458e8"}};function f(e,t){const n="--peek-carousel-"+e;s.style.setProperty(n,t),l.set(n,t)}function m(){u.clear(),i.value=".playground__theme {\n"+[...l].map(([e,t])=>" "+e+": "+t+";").join("\n")+"\n}"}function p(e){g.setValue(e);for(const e of l.keys())s.style.removeProperty(e);l.clear();for(const[t,n]of Object.entries(d[e]))f(t,n);const t=d[e]["card-radius"]||"16px";document.querySelector("#theme-radius").value=Number(t.replace(/px$/,"")),document.querySelector("#radius-value").value=t,document.querySelector("#theme-size").value=36,document.querySelector("#size-value").value="36px",document.querySelector("#theme-accent").value=d[e]["focus-color"]||"#2458e8",document.querySelector("#theme-accent-value").value=document.querySelector("#theme-accent").value;for(const e of document.querySelectorAll('input[type="range"]'))b(e);m()}function b(e){const t=(Number(e.value)-Number(e.min))/(Number(e.max)-Number(e.min))*100;e.style.setProperty("--range-progress",`${t}%`)}const y=new e(s,{startIndex:0,enableKeyboard:!1,enableWheel:!1});y.elements.controls&&y.elements.nav&&y.elements.controls.appendChild(y.elements.nav);const v=function(e){const{container:t,items:n,indicators:o}=e,r=JSON.parse(t.dataset.demoA11y),a=[];let c=!1;function s(e,t){return e.replace("{current}",t+1).replace("{total}",n.length)}function i(e,t,n){e&&e.getAttribute(t)!==n&&e.setAttribute(t,n)}function u(e,t,n){e.addEventListener(t,n),a.push(()=>e.removeEventListener(t,n))}function l(){const{currentIndex:a,isAutoRotating:c,counterElement:u}=e;for(let e=0;e<n.length;e++)i(n[e],"role","group"),i(n[e],"aria-roledescription",r.slide),i(n[e],"aria-label",s(r.position,e)),i(n[e],"aria-hidden",String(e!==a));for(let e=0;e<o.length;e++){const t=o[e];t.removeAttribute("role"),t.removeAttribute("aria-selected"),i(t,"aria-label",s(r.show,e)),i(t,"aria-pressed",String(e===a)),i(t,"tabindex","0")}const l=t.querySelector(".peek-carousel__indicators");i(l,"role","group"),i(l,"aria-label",r.choose),i(e.elements.prevBtn,"aria-label",r.previous),i(e.elements.nextBtn,"aria-label",r.next),i(u,"aria-live",c?"off":"polite"),i(e.elements.autoRotateBtn,"aria-label",c?r.stop:r.start)}function d(){e.stopAutoRotate(),l()}u(t,"pointerdown",t=>{c=t.target.closest("button")===e.elements.autoRotateBtn}),u(t,"pointerup",()=>{c=!1}),u(t,"focusin",t=>{t.target===e.elements.autoRotateBtn&&c||d()}),u(t,"pointerenter",d),u(document,"visibilitychange",()=>{document.hidden&&d()}),u(t,"click",l),u(t,"keydown",t=>{const n=o.indexOf(t.target);if(-1===n)return;const r={ArrowLeft:n-1,ArrowRight:n+1,Home:0,End:o.length-1};Object.prototype.hasOwnProperty.call(r,t.key)&&(t.preventDefault(),d(),e.goTo(r[t.key]),l(),o[e.currentIndex].focus())});const f=new MutationObserver(l);return f.observe(t,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-current","aria-selected","aria-pressed"]}),l(),{sync:l,destroy(){f.disconnect();for(const e of a)e()}}}(y),g=function(e){const t=document.getElementById("theme-preset"),n=document.getElementById("theme-preset-trigger"),o=document.getElementById("theme-preset-options"),r=document.getElementById("theme-preset-value"),a=[...o.querySelectorAll('[role="option"]')],c=[];function s(e,t,n){e.addEventListener(t,n),c.push(()=>e.removeEventListener(t,n))}function i(e=!1){o.hidden=!0,n.setAttribute("aria-expanded","false"),e&&n.focus()}function u(e){t.value=e;for(const t of a){const n=t.dataset.preset===e;t.setAttribute("aria-selected",String(n)),n&&(r.textContent=t.textContent)}}function l(){o.hidden=!1,n.setAttribute("aria-expanded","true"),a.find(e=>e.dataset.preset===t.value).focus()}function d(n){u(n.dataset.preset),e(t.value),i(!0)}s(n,"click",()=>{o.hidden?l():i()}),s(n,"keydown",e=>{"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),l())});for(const e of a)s(e,"click",()=>d(e));return s(o,"keydown",e=>{const t=a.indexOf(document.activeElement),n={ArrowDown:(t+1)%a.length,ArrowUp:(t+a.length-1)%a.length,Home:0,End:a.length-1};if(Object.prototype.hasOwnProperty.call(n,e.key))e.preventDefault(),a[n[e.key]].focus();else if("Enter"===e.key||" "===e.key)e.preventDefault(),d(a[t]);else if("Escape"===e.key||"Tab"===e.key)"Escape"===e.key&&e.preventDefault(),i(!0);else if(1===e.key.length&&!e.isComposing){const t=a.find(t=>t.textContent.toLowerCase().startsWith(e.key.toLowerCase()));t?.focus()}}),s(document,"pointerdown",e=>{n.parentElement.contains(e.target)||i()}),u(t.value),{setValue:u,destroy(){i();for(const e of c)e()}}}(p);c(document.querySelector("#theme-preset"),"change",e=>p(e.target.value)),c(document.querySelector("#theme-accent"),"input",e=>{f("focus-color",e.target.value),f("indicator-active-color",e.target.value),document.querySelector("#theme-accent-value").value=e.target.value,m()});for(const[e,t]of[["theme-radius","card-radius"],["theme-size","button-size"]])c(document.querySelector("#"+e),"input",n=>{const o=n.target.value+"px";b(n.target),f(t,o),document.querySelector("#"+e.replace("theme-","")+"-value").value=o,m()});return c(document.querySelector("#theme-reset"),"click",()=>{document.querySelector("#theme-preset").value="default",p("default")}),p("default"),{carousel:y,destroy(){t.destroy(),u.destroy(),v.destroy(),g.destroy();for(const e of a)e();y.destroy()}}},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e}({});PeekCarouselTheme.initTheme(PeekCarousel);