@plastic-js/tsumiki 0.1.19 → 0.1.21
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,11 +1,11 @@
|
|
|
1
1
|
import Icon from "../Icon.js";
|
|
2
|
-
import { makeWheel } from "./wheel.js";
|
|
2
|
+
import { expandCircular, makeWheel } from "./wheel.js";
|
|
3
3
|
import { Fragment, insert, jsx, mergeProps, setProp, template } from "@plastic-js/plastic/jsx-runtime";
|
|
4
4
|
import { css } from "@emotion/css";
|
|
5
5
|
import { createEffect, createSignal, splitProps } from "@plastic-js/plastic";
|
|
6
6
|
//#region src/components/DatePickerMobile/index.jsx
|
|
7
7
|
var _tmpl6 = template("<button type=\"button\"></button>");
|
|
8
|
-
var _tmpl5 = template("<div><div role=\"presentation\" aria-hidden=\"true\"></div><div role=\"dialog\" aria-label=\"Date picker\"><div><button type=\"button\">Cancel</button><span>Select Date</span><button type=\"button\">Done</button></div><div></div
|
|
8
|
+
var _tmpl5 = template("<div><div role=\"presentation\" aria-hidden=\"true\"></div><div role=\"dialog\" aria-label=\"Date picker\"><div><button type=\"button\">Cancel</button><span>Select Date</span><button type=\"button\">Done</button></div><div></div><!></div></div>");
|
|
9
9
|
var _tmpl4 = template("<span></span>");
|
|
10
10
|
var _tmpl3 = template("<button type=\"button\"><!><span></span></button>");
|
|
11
11
|
var _tmpl2 = template("<div></div>");
|
|
@@ -50,6 +50,10 @@ var triggerWrapperClass = css({
|
|
|
50
50
|
borderRadius: "10px",
|
|
51
51
|
"&:focus-visible": { boxShadow: "0 0 0 2px var(--accent)" }
|
|
52
52
|
});
|
|
53
|
+
var triggerDisabledClass = css({
|
|
54
|
+
opacity: .4,
|
|
55
|
+
cursor: "not-allowed"
|
|
56
|
+
});
|
|
53
57
|
var triggerClass = css({
|
|
54
58
|
width: "100%",
|
|
55
59
|
height: "42px",
|
|
@@ -142,7 +146,7 @@ var wheelAreaClass = css({
|
|
|
142
146
|
padding: "12px 0 20px",
|
|
143
147
|
position: "relative"
|
|
144
148
|
});
|
|
145
|
-
|
|
149
|
+
css({
|
|
146
150
|
position: "absolute",
|
|
147
151
|
left: 0,
|
|
148
152
|
right: 0,
|
|
@@ -170,7 +174,24 @@ var columnViewportClass = css({
|
|
|
170
174
|
height: `180px`,
|
|
171
175
|
overflow: "hidden",
|
|
172
176
|
position: "relative",
|
|
173
|
-
touchAction: "none"
|
|
177
|
+
touchAction: "none",
|
|
178
|
+
"&::before, &::after": {
|
|
179
|
+
content: "\"\"",
|
|
180
|
+
position: "absolute",
|
|
181
|
+
left: 0,
|
|
182
|
+
right: 0,
|
|
183
|
+
height: `72px`,
|
|
184
|
+
pointerEvents: "none",
|
|
185
|
+
zIndex: 2
|
|
186
|
+
},
|
|
187
|
+
"&::before": {
|
|
188
|
+
top: 0,
|
|
189
|
+
background: "linear-gradient(to bottom, var(--surface) 0%, transparent 100%)"
|
|
190
|
+
},
|
|
191
|
+
"&::after": {
|
|
192
|
+
bottom: 0,
|
|
193
|
+
background: "linear-gradient(to top, var(--surface) 0%, transparent 100%)"
|
|
194
|
+
}
|
|
174
195
|
});
|
|
175
196
|
var columnListClass = css({ willChange: "transform" });
|
|
176
197
|
var highlightBarClass = css({
|
|
@@ -228,10 +249,17 @@ function CalendarIconComp() {
|
|
|
228
249
|
strokeWidth: 1.5
|
|
229
250
|
}));
|
|
230
251
|
}
|
|
252
|
+
function mountWheel(el, wheel) {
|
|
253
|
+
if (el._wheel && el._wheel !== wheel) el._wheel.destroy();
|
|
254
|
+
el._wheel = wheel;
|
|
255
|
+
wheel.mount(el);
|
|
256
|
+
}
|
|
231
257
|
function Columns({ y, m, days, selDay, tempYear, tempMonth, tempDay }) {
|
|
232
|
-
const yearWheel = makeWheel(YEARS, YEARS.indexOf(y));
|
|
233
|
-
const
|
|
234
|
-
const
|
|
258
|
+
const yearWheel = makeWheel(YEARS, YEARS.indexOf(y), false);
|
|
259
|
+
const [monthItems, monthStartIdx] = expandCircular(MONTHS, m);
|
|
260
|
+
const monthWheel = makeWheel(monthItems, monthStartIdx, true);
|
|
261
|
+
const [dayItems, dayStartIdx] = expandCircular(days, selDay - 1);
|
|
262
|
+
const dayWheel = makeWheel(dayItems, dayStartIdx, true);
|
|
235
263
|
return () => {
|
|
236
264
|
const _el0 = _tmpl.cloneNode(true);
|
|
237
265
|
const _el1 = _el0.firstChild;
|
|
@@ -259,7 +287,7 @@ function Columns({ y, m, days, selDay, tempYear, tempMonth, tempDay }) {
|
|
|
259
287
|
return _el0;
|
|
260
288
|
}));
|
|
261
289
|
setProp(_el5, "ref", (el) => {
|
|
262
|
-
if (el)
|
|
290
|
+
if (el) mountWheel(el, yearWheel);
|
|
263
291
|
});
|
|
264
292
|
setProp(_el5, "className", () => columnListClass);
|
|
265
293
|
setProp(_el5, "onPointerDown", (e) => yearWheel.handlePointerDown(e));
|
|
@@ -275,15 +303,15 @@ function Columns({ y, m, days, selDay, tempYear, tempMonth, tempDay }) {
|
|
|
275
303
|
setProp(_el1, "className", () => columnWrapperClass);
|
|
276
304
|
setProp(_el7, "className", () => columnLabelClass);
|
|
277
305
|
setProp(_el9, "className", () => highlightBarClass);
|
|
278
|
-
insert(_el10, () =>
|
|
306
|
+
insert(_el10, () => monthItems.map((item, i) => () => {
|
|
279
307
|
const _el0 = _tmpl2.cloneNode(true);
|
|
280
308
|
insert(_el0, () => MONTH_NAMES_SHORT[item]);
|
|
281
|
-
setProp(_el0, "className", () => `${itemBaseClass} ${i ===
|
|
309
|
+
setProp(_el0, "className", () => `${itemBaseClass} ${i === monthStartIdx ? selectedItemClass : ""}`);
|
|
282
310
|
setProp(_el0, "key", () => i);
|
|
283
311
|
return _el0;
|
|
284
312
|
}));
|
|
285
313
|
setProp(_el10, "ref", (el) => {
|
|
286
|
-
if (el)
|
|
314
|
+
if (el) mountWheel(el, monthWheel);
|
|
287
315
|
});
|
|
288
316
|
setProp(_el10, "className", () => columnListClass);
|
|
289
317
|
setProp(_el10, "onPointerDown", (e) => monthWheel.handlePointerDown(e));
|
|
@@ -298,15 +326,15 @@ function Columns({ y, m, days, selDay, tempYear, tempMonth, tempDay }) {
|
|
|
298
326
|
setProp(_el6, "className", () => columnWrapperClass);
|
|
299
327
|
setProp(_el12, "className", () => columnLabelClass);
|
|
300
328
|
setProp(_el14, "className", () => highlightBarClass);
|
|
301
|
-
insert(_el15, () =>
|
|
329
|
+
insert(_el15, () => dayItems.map((item, i) => () => {
|
|
302
330
|
const _el0 = _tmpl2.cloneNode(true);
|
|
303
331
|
insert(_el0, () => String(item));
|
|
304
|
-
setProp(_el0, "className", () => `${itemBaseClass} ${i ===
|
|
332
|
+
setProp(_el0, "className", () => `${itemBaseClass} ${i === dayStartIdx ? selectedItemClass : ""}`);
|
|
305
333
|
setProp(_el0, "key", () => i);
|
|
306
334
|
return _el0;
|
|
307
335
|
}));
|
|
308
336
|
setProp(_el15, "ref", (el) => {
|
|
309
|
-
if (el)
|
|
337
|
+
if (el) mountWheel(el, dayWheel);
|
|
310
338
|
});
|
|
311
339
|
setProp(_el15, "className", () => columnListClass);
|
|
312
340
|
setProp(_el15, "onPointerDown", (e) => dayWheel.handlePointerDown(e));
|
|
@@ -329,6 +357,8 @@ var DatePickerMobile = (props) => {
|
|
|
329
357
|
"placeholder",
|
|
330
358
|
"clearable",
|
|
331
359
|
"clearLabel",
|
|
360
|
+
"disabled",
|
|
361
|
+
"disabledClassName",
|
|
332
362
|
"backdropClassName",
|
|
333
363
|
"backdropStyle"
|
|
334
364
|
]);
|
|
@@ -336,6 +366,9 @@ var DatePickerMobile = (props) => {
|
|
|
336
366
|
const resolveValue = () => {
|
|
337
367
|
return (typeof local.value === "function" ? local.value() : local.value) ?? null;
|
|
338
368
|
};
|
|
369
|
+
const isDisabled = () => {
|
|
370
|
+
return !!(typeof local.disabled === "function" ? local.disabled() : local.disabled);
|
|
371
|
+
};
|
|
339
372
|
const tempYear = createSignal(2e3);
|
|
340
373
|
const tempMonth = createSignal(0);
|
|
341
374
|
const tempDay = createSignal(1);
|
|
@@ -353,6 +386,7 @@ var DatePickerMobile = (props) => {
|
|
|
353
386
|
};
|
|
354
387
|
});
|
|
355
388
|
const openSheet = () => {
|
|
389
|
+
if (isDisabled()) return;
|
|
356
390
|
const d = resolveValue() || /* @__PURE__ */ new Date();
|
|
357
391
|
tempYear(d.getFullYear());
|
|
358
392
|
tempMonth(d.getMonth());
|
|
@@ -387,8 +421,9 @@ var DatePickerMobile = (props) => {
|
|
|
387
421
|
}, _el1);
|
|
388
422
|
insert(_el2, () => jsx(CalendarIconComp, {}));
|
|
389
423
|
setProp(_el2, "className", () => calendarIconClass);
|
|
390
|
-
setProp(_el0, "className", () => triggerWrapperClass);
|
|
424
|
+
setProp(_el0, "className", () => `${triggerWrapperClass} ${isDisabled() ? `${triggerDisabledClass} ${local.disabledClassName || ""}` : ""}`);
|
|
391
425
|
setProp(_el0, "onClick", () => openSheet);
|
|
426
|
+
setProp(_el0, "aria-disabled", () => isDisabled());
|
|
392
427
|
return _el0;
|
|
393
428
|
}, () => {
|
|
394
429
|
if (!open()) return null;
|
|
@@ -406,8 +441,6 @@ var DatePickerMobile = (props) => {
|
|
|
406
441
|
const _el6 = _el3.firstChild.nextSibling.nextSibling;
|
|
407
442
|
const _el7 = _el2.firstChild.nextSibling;
|
|
408
443
|
const _el8 = _el2.firstChild.nextSibling.nextSibling;
|
|
409
|
-
const _el9 = _el2.firstChild.nextSibling.nextSibling.nextSibling;
|
|
410
|
-
const _el10 = _el2.firstChild.nextSibling.nextSibling.nextSibling.nextSibling;
|
|
411
444
|
setProp(_el1, "className", () => `${backdropClass} ${local.backdropClassName || ""}`);
|
|
412
445
|
setProp(_el1, "style", () => local.backdropStyle);
|
|
413
446
|
setProp(_el1, "onClick", () => cancel);
|
|
@@ -417,19 +450,7 @@ var DatePickerMobile = (props) => {
|
|
|
417
450
|
setProp(_el6, "className", () => toolbarBtnClass);
|
|
418
451
|
setProp(_el6, "onClick", () => confirm);
|
|
419
452
|
setProp(_el3, "className", () => toolbarClass);
|
|
420
|
-
|
|
421
|
-
setProp(_el7, "style", () => ({
|
|
422
|
-
top: 0,
|
|
423
|
-
height: `72px`,
|
|
424
|
-
background: "linear-gradient(to bottom, var(--surface) 0%, transparent 100%)"
|
|
425
|
-
}));
|
|
426
|
-
setProp(_el8, "className", () => gradientOverlayClass);
|
|
427
|
-
setProp(_el8, "style", () => ({
|
|
428
|
-
bottom: 0,
|
|
429
|
-
height: `72px`,
|
|
430
|
-
background: "linear-gradient(to top, var(--surface) 0%, transparent 100%)"
|
|
431
|
-
}));
|
|
432
|
-
insert(_el9, () => jsx(Columns, mergeProps({
|
|
453
|
+
insert(_el7, () => jsx(Columns, mergeProps({
|
|
433
454
|
y,
|
|
434
455
|
m,
|
|
435
456
|
days,
|
|
@@ -438,14 +459,14 @@ var DatePickerMobile = (props) => {
|
|
|
438
459
|
tempMonth,
|
|
439
460
|
tempDay
|
|
440
461
|
})));
|
|
441
|
-
setProp(
|
|
462
|
+
setProp(_el7, "className", () => wheelAreaClass);
|
|
442
463
|
insert(_el2, () => local.clearable && (() => {
|
|
443
464
|
const _el0 = _tmpl6.cloneNode(true);
|
|
444
465
|
insert(_el0, () => local.clearLabel || "Clear");
|
|
445
466
|
setProp(_el0, "className", () => clearRowClass);
|
|
446
467
|
setProp(_el0, "onClick", () => clear);
|
|
447
468
|
return _el0;
|
|
448
|
-
}),
|
|
469
|
+
}), _el8);
|
|
449
470
|
setProp(_el2, "className", () => sheetClass);
|
|
450
471
|
setProp(_el0, "className", () => `${overlayClass} ${openClass}`);
|
|
451
472
|
return _el0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["css","createEffect","createSignal","splitProps","Icon","CENTER_OFFSET","ITEM_HEIGHT","makeWheel","_tmpl6","_template","_tmpl5","_tmpl4","_tmpl3","_tmpl2","_tmpl","MONTH_NAMES_SHORT","daysInMonth","year","month","Date","getDate","YEARS","Array","from","length","_","i","MONTHS","getDays","count","toDate","day","formatDateLabel","date","getMonth","getFullYear","calendarSvg","triggerWrapperClass","position","width","background","border","padding","font","cursor","color","outline","borderRadius","boxShadow","triggerClass","height","fontSize","fontFamily","boxSizing","display","alignItems","triggerPlaceholderClass","triggerValueClass","calendarIconClass","right","top","transform","pointerEvents","overlayClass","inset","zIndex","flexDirection","justifyContent","backdropClass","opacity","transition","sheetClass","borderTop","paddingBottom","openClass","toolbarClass","borderBottom","flexShrink","toolbarBtnClass","WebkitTapHighlightColor","toolbarTitleClass","fontWeight","wheelAreaClass","gradientOverlayClass","left","columnWrapperClass","flex","overflow","columnLabelClass","textTransform","letterSpacing","marginBottom","columnViewportClass","touchAction","columnListClass","willChange","highlightBarClass","itemBaseClass","userSelect","whiteSpace","textOverflow","selectedItemClass","clearRowClass","gap","CalendarIconComp","_jsx","_mergeProps","svg","size","strokeWidth","Columns","y","m","days","selDay","tempYear","tempMonth","tempDay","yearWheel","indexOf","monthWheel","dayWheel","_el0","cloneNode","_el1","firstChild","_el2","_el3","nextSibling","_el4","_el5","_el6","_el7","_el8","_el9","_el10","_el11","_el12","_el13","_el14","_el15","_setProp","_insert","map","item","String","el","mount","e","handlePointerDown","handlePointerMove","currentTarget","handlePointerUp","idx","newYear","maxDay","handlePointerCancel","DatePickerMobile","props","local","open","resolveValue","v","value","onKey","key","cancel","document","addEventListener","prevOverflow","body","style","removeEventListener","openSheet","d","Math","min","confirm","onValueChange","clear","dayItems","_Fragment","children","placeholder","backdropClassName","backdropStyle","bottom","clearable","clearLabel"],"sources":["../../../src/components/DatePickerMobile/index.jsx"],"sourcesContent":["import { css } from '@emotion/css'\nimport { createEffect, createSignal, splitProps } from '@plastic-js/plastic'\nimport Icon from '../Icon.jsx'\nimport { CENTER_OFFSET, ITEM_HEIGHT, makeWheel } from './wheel.js'\n\n// ── Date helpers ──────────────────────────────────────────────────────────\nconst MONTH_NAMES_SHORT = [\n\t'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',\n\t'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec',\n]\n\nconst daysInMonth = (year, month) => new Date(year, month + 1, 0).getDate()\n\nconst YEARS = Array.from({ length: 200 }, (_, i) => 1900 + i)\nconst MONTHS = Array.from({ length: 12 }, (_, i) => i)\n\nconst getDays = (year, month) => {\n\tconst count = daysInMonth(year, month)\n\treturn Array.from({ length: count }, (_, i) => i + 1)\n}\n\nconst toDate = (year, month, day) => new Date(year, month, day)\n\nconst formatDateLabel = (date) => {\n\tif (!date) return ''\n\treturn `${MONTH_NAMES_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`\n}\n\n// ── SVGs ───────────────────────────────────────────────────────────────────\nconst calendarSvg = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/><line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/><line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/></svg>'\n\n// ── Styles ─────────────────────────────────────────────────────────────────\nconst triggerWrapperClass = css({\n\tposition: 'relative',\n\twidth: '100%',\n\tbackground: 'none',\n\tborder: 'none',\n\tpadding: 0,\n\tfont: 'inherit',\n\tcursor: 'pointer',\n\tcolor: 'inherit',\n\toutline: 'none',\n\tborderRadius: '10px',\n\t'&:focus-visible': { boxShadow: '0 0 0 2px var(--accent)' },\n})\n\nconst triggerClass = css({\n\twidth: '100%',\n\theight: '42px',\n\tpadding: '0 36px 0 14px',\n\tbackground: 'rgba(255,255,255,0.06)',\n\tborder: '1px solid var(--border)',\n\tborderRadius: '10px',\n\tcolor: 'var(--ink)',\n\tfontSize: '16px',\n\tfontFamily: 'inherit',\n\toutline: 'none',\n\tboxSizing: 'border-box',\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tcursor: 'pointer',\n})\n\nconst triggerPlaceholderClass = css({\n\tcolor: 'var(--muted)',\n})\n\nconst triggerValueClass = css({\n\tcolor: 'var(--ink)',\n})\n\nconst calendarIconClass = css({\n\tposition: 'absolute',\n\tright: '10px',\n\ttop: '50%',\n\ttransform: 'translateY(-50%)',\n\twidth: '18px',\n\theight: '18px',\n\tcolor: 'var(--muted)',\n\tpointerEvents: 'none',\n})\n\nconst overlayClass = css({\n\tposition: 'fixed',\n\tinset: 0,\n\tzIndex: 1000,\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\tjustifyContent: 'flex-end',\n\tpointerEvents: 'none',\n})\n\nconst backdropClass = css({\n\tposition: 'absolute',\n\tinset: 0,\n\tbackground: 'rgba(0,0,0,0.5)',\n\topacity: 0,\n\ttransition: 'opacity 240ms ease',\n})\n\nconst sheetClass = css({\n\tposition: 'relative',\n\twidth: '100%',\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\tbackground: 'var(--surface)',\n\tborderTop: '1px solid var(--border)',\n\tborderRadius: '18px 18px 0 0',\n\tboxShadow: '0 -8px 32px rgba(0,0,0,0.4)',\n\tpaddingBottom: 'env(safe-area-inset-bottom, 0px)',\n\ttransform: 'translateY(100%)',\n\ttransition: 'transform 280ms cubic-bezier(0.32, 0.72, 0, 1)',\n})\n\nconst openClass = css({\n\tpointerEvents: 'auto',\n\t[`& .${backdropClass}`]: { opacity: 1 },\n\t[`& .${sheetClass}`]: { transform: 'translateY(0)' },\n})\n\nconst toolbarClass = css({\n\tdisplay: 'flex',\n\tjustifyContent: 'space-between',\n\talignItems: 'center',\n\tpadding: '12px 16px',\n\tborderBottom: '1px solid var(--border)',\n\tflexShrink: 0,\n})\n\nconst toolbarBtnClass = css({\n\tbackground: 'none',\n\tborder: 'none',\n\tpadding: '6px 0',\n\tcolor: 'var(--accent)',\n\tfontSize: '16px',\n\tfontFamily: 'inherit',\n\tcursor: 'pointer',\n\tWebkitTapHighlightColor: 'transparent',\n})\n\nconst toolbarTitleClass = css({\n\tfontSize: '15px',\n\tfontWeight: 600,\n\tcolor: 'var(--ink)',\n})\n\nconst wheelAreaClass = css({\n\tdisplay: 'flex',\n\tjustifyContent: 'center',\n\talignItems: 'stretch',\n\tpadding: '12px 0 20px',\n\tposition: 'relative',\n})\n\nconst gradientOverlayClass = css({\n\tposition: 'absolute',\n\tleft: 0,\n\tright: 0,\n\tpointerEvents: 'none',\n\tzIndex: 2,\n})\n\nconst columnWrapperClass = css({\n\tflex: 1,\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\talignItems: 'center',\n\toverflow: 'hidden',\n\tposition: 'relative',\n})\n\nconst columnLabelClass = css({\n\tfontSize: '11px',\n\tcolor: 'var(--muted)',\n\ttextTransform: 'uppercase',\n\tletterSpacing: '0.5px',\n\tmarginBottom: '6px',\n\tfontWeight: 500,\n})\n\nconst columnViewportClass = css({\n\twidth: '100%',\n\theight: `${CENTER_OFFSET * 2 + ITEM_HEIGHT}px`,\n\toverflow: 'hidden',\n\tposition: 'relative',\n\ttouchAction: 'none',\n})\n\nconst columnListClass = css({\n\twillChange: 'transform',\n})\n\nconst highlightBarClass = css({\n\tposition: 'absolute',\n\ttop: `${CENTER_OFFSET}px`,\n\tleft: '10%',\n\tright: '10%',\n\theight: `${ITEM_HEIGHT}px`,\n\tborderRadius: '8px',\n\tbackground: 'rgba(255,255,255,0.06)',\n\tpointerEvents: 'none',\n\tzIndex: 1,\n})\n\nconst itemBaseClass = css({\n\theight: `${ITEM_HEIGHT}px`,\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tjustifyContent: 'center',\n\tfontSize: '20px',\n\tcolor: 'var(--muted)',\n\tuserSelect: 'none',\n\twhiteSpace: 'nowrap',\n\toverflow: 'hidden',\n\ttextOverflow: 'ellipsis',\n\tpadding: '0 4px',\n\tboxSizing: 'border-box',\n})\n\nconst selectedItemClass = css({\n\tcolor: 'var(--ink)',\n\tfontWeight: 600,\n\tfontSize: '22px',\n})\n\nconst clearRowClass = css({\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tjustifyContent: 'center',\n\theight: '44px',\n\tgap: '6px',\n\tcolor: 'var(--accent)',\n\tfontSize: '15px',\n\tfontFamily: 'inherit',\n\tbackground: 'none',\n\tborder: 'none',\n\tborderTop: '1px solid var(--border)',\n\tcursor: 'pointer',\n\twidth: '100%',\n\tflexShrink: 0,\n\tpadding: 0,\n\t'&:active': { background: 'rgba(255,255,255,0.04)' },\n})\n\n// ── CalendarIcon ───────────────────────────────────────────────────────────\nfunction CalendarIconComp() {\n\treturn <Icon svg={calendarSvg} size={18} strokeWidth={1.5} />\n}\n\n// ── Columns ────────────────────────────────────────────────────────────────\n//\n// Renders the three wheel columns (year / month / day). Receives all data as\n// plain props so it can be used as a normal Plastic component.\nfunction Columns({ y, m, days, selDay, tempYear, tempMonth, tempDay }) {\n\tconst yearWheel = makeWheel(YEARS, YEARS.indexOf(y))\n\tconst monthWheel = makeWheel(MONTHS, m)\n\tconst dayWheel = makeWheel(days, selDay - 1)\n\n\treturn (\n\t\t<div style={{ display: 'flex', width: '100%' }}>\n\t\t\t<div className={columnWrapperClass}>\n\t\t\t\t<span className={columnLabelClass}>Year</span>\n\t\t\t\t<div className={columnViewportClass}>\n\t\t\t\t\t<div className={highlightBarClass} />\n\t\t\t\t\t<div\n\t\t\t\t\t\tref={(el) => { if (el) yearWheel.mount(el) }}\n\t\t\t\t\t\tclassName={columnListClass}\n\t\t\t\t\t\tonPointerDown={(e) => yearWheel.handlePointerDown(e)}\n\t\t\t\t\t\tonPointerMove={(e) => yearWheel.handlePointerMove(e, e.currentTarget)}\n\t\t\t\t\t\tonPointerUp={(e) => yearWheel.handlePointerUp(e, e.currentTarget, (idx) => {\n\t\t\t\t\t\t\tconst newYear = YEARS[idx]\n\t\t\t\t\t\t\ttempYear(newYear)\n\t\t\t\t\t\t\tconst maxDay = daysInMonth(newYear, tempYear())\n\t\t\t\t\t\t\tif (tempDay() > maxDay) tempDay(maxDay)\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tonPointerCancel={(e) => yearWheel.handlePointerCancel(e, e.currentTarget)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{YEARS.map((item, i) => (\n\t\t\t\t\t\t\t<div className={`${itemBaseClass} ${i === YEARS.indexOf(y) ? selectedItemClass : ''}`} key={i}>{String(item)}</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className={columnWrapperClass}>\n\t\t\t\t<span className={columnLabelClass}>Month</span>\n\t\t\t\t<div className={columnViewportClass}>\n\t\t\t\t\t<div className={highlightBarClass} />\n\t\t\t\t\t<div\n\t\t\t\t\t\tref={(el) => { if (el) monthWheel.mount(el) }}\n\t\t\t\t\t\tclassName={columnListClass}\n\t\t\t\t\t\tonPointerDown={(e) => monthWheel.handlePointerDown(e)}\n\t\t\t\t\t\tonPointerMove={(e) => monthWheel.handlePointerMove(e, e.currentTarget)}\n\t\t\t\t\t\tonPointerUp={(e) => monthWheel.handlePointerUp(e, e.currentTarget, (idx) => {\n\t\t\t\t\t\t\ttempMonth(idx)\n\t\t\t\t\t\t\tconst maxDay = daysInMonth(tempYear(), idx)\n\t\t\t\t\t\t\tif (tempDay() > maxDay) tempDay(maxDay)\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tonPointerCancel={(e) => monthWheel.handlePointerCancel(e, e.currentTarget)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{MONTHS.map((item, i) => (\n\t\t\t\t\t\t\t<div className={`${itemBaseClass} ${i === m ? selectedItemClass : ''}`} key={i}>{MONTH_NAMES_SHORT[item]}</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className={columnWrapperClass}>\n\t\t\t\t<span className={columnLabelClass}>Day</span>\n\t\t\t\t<div className={columnViewportClass}>\n\t\t\t\t\t<div className={highlightBarClass} />\n\t\t\t\t\t<div\n\t\t\t\t\t\tref={(el) => { if (el) dayWheel.mount(el) }}\n\t\t\t\t\t\tclassName={columnListClass}\n\t\t\t\t\t\tonPointerDown={(e) => dayWheel.handlePointerDown(e)}\n\t\t\t\t\t\tonPointerMove={(e) => dayWheel.handlePointerMove(e, e.currentTarget)}\n\t\t\t\t\t\tonPointerUp={(e) => dayWheel.handlePointerUp(e, e.currentTarget, (idx) => tempDay(idx + 1))}\n\t\t\t\t\t\tonPointerCancel={(e) => dayWheel.handlePointerCancel(e, e.currentTarget)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{days.map((item, i) => (\n\t\t\t\t\t\t\t<div className={`${itemBaseClass} ${i === selDay - 1 ? selectedItemClass : ''}`} key={i}>{String(item)}</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n\n// ── DatePickerMobile ───────────────────────────────────────────────────────\n//\n// A mobile bottom-sheet date picker with iOS-style wheel columns for\n// year, month, and day. The trigger visually mimics <input type=\"date\">.\n//\n// Props:\n// value Date | (() => Date | null) — current selected date\n// onValueChange (Date | null) => void — called when user confirms\n// placeholder string — trigger placeholder text (default \"Select date\")\n// clearable boolean — show a \"Clear\" row in the sheet\n// clearLabel string — label for the clear row (default \"Clear\")\n// backdropClassName className for the backdrop\n// backdropStyle inline style for the backdrop\nconst DatePickerMobile = (props) => {\n\tconst [local] = splitProps(props, [\n\t\t'value', 'onValueChange', 'placeholder',\n\t\t'clearable', 'clearLabel',\n\t\t'backdropClassName', 'backdropStyle',\n\t])\n\n\tconst open = createSignal(false)\n\n\tconst resolveValue = () => {\n\t\tconst v = typeof local.value === 'function' ? local.value() : local.value\n\t\treturn v ?? null\n\t}\n\n\tconst tempYear = createSignal(2000)\n\tconst tempMonth = createSignal(0)\n\tconst tempDay = createSignal(1)\n\n\tcreateEffect(() => {\n\t\tif (!open()) return\n\t\tconst onKey = (e) => { if (e.key === 'Escape') cancel() }\n\t\tdocument.addEventListener('keydown', onKey)\n\t\tconst prevOverflow = document.body.style.overflow\n\t\tdocument.body.style.overflow = 'hidden'\n\t\treturn () => {\n\t\t\tdocument.removeEventListener('keydown', onKey)\n\t\t\tdocument.body.style.overflow = prevOverflow\n\t\t}\n\t})\n\n\tconst openSheet = () => {\n\t\tconst d = resolveValue() || new Date()\n\t\ttempYear(d.getFullYear())\n\t\ttempMonth(d.getMonth())\n\t\ttempDay(Math.min(d.getDate(), daysInMonth(d.getFullYear(), d.getMonth())))\n\t\topen(true)\n\t}\n\n\tconst confirm = () => {\n\t\tconst date = toDate(tempYear(), tempMonth(), tempDay())\n\t\tlocal.onValueChange?.(date)\n\t\topen(false)\n\t}\n\n\tconst cancel = () => {\n\t\topen(false)\n\t}\n\n\tconst clear = () => {\n\t\tlocal.onValueChange?.(null)\n\t\topen(false)\n\t}\n\n\tconst dayItems = () => getDays(tempYear(), tempMonth())\n\n\treturn (\n\t\t<>\n\t\t\t<button type='button' className={triggerWrapperClass} onClick={openSheet}>\n\t\t\t\t{() => {\n\t\t\t\t\tconst d = resolveValue()\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<span className={`${triggerClass} ${d ? triggerValueClass : triggerPlaceholderClass}`}>\n\t\t\t\t\t\t\t{d ? formatDateLabel(d) : (local.placeholder || 'Select date')}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)\n\t\t\t\t}}\n\t\t\t\t<span className={calendarIconClass}>\n\t\t\t\t\t<CalendarIconComp />\n\t\t\t\t</span>\n\t\t\t</button>\n\n\t\t\t{() => {\n\t\t\t\tif (!open()) return null\n\t\t\t\tconst y = tempYear()\n\t\t\t\tconst m = tempMonth()\n\t\t\t\tconst days = dayItems()\n\t\t\t\tconst selDay = tempDay()\n\n\t\t\t\treturn (\n\t\t\t\t\t<div className={`${overlayClass} ${openClass}`}>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={`${backdropClass} ${local.backdropClassName || ''}`}\n\t\t\t\t\t\t\tstyle={local.backdropStyle}\n\t\t\t\t\t\t\trole='presentation'\n\t\t\t\t\t\t\taria-hidden='true'\n\t\t\t\t\t\t\tonClick={cancel}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className={sheetClass} role='dialog' aria-label='Date picker'>\n\t\t\t\t\t\t\t<div className={toolbarClass}>\n\t\t\t\t\t\t\t\t<button className={toolbarBtnClass} type='button' onClick={cancel}>Cancel</button>\n\t\t\t\t\t\t\t\t<span className={toolbarTitleClass}>Select Date</span>\n\t\t\t\t\t\t\t\t<button className={toolbarBtnClass} type='button' onClick={confirm}>Done</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className={gradientOverlayClass} style={{ top: 0, height: `${CENTER_OFFSET}px`, background: 'linear-gradient(to bottom, var(--surface) 0%, transparent 100%)' }} />\n\t\t\t\t\t\t\t<div className={gradientOverlayClass} style={{ bottom: 0, height: `${CENTER_OFFSET}px`, background: 'linear-gradient(to top, var(--surface) 0%, transparent 100%)' }} />\n\t\t\t\t\t\t\t<div className={wheelAreaClass}>\n\t\t\t\t\t\t\t\t<Columns\n\t\t\t\t\t\t\t\t\ty={y}\n\t\t\t\t\t\t\t\t\tm={m}\n\t\t\t\t\t\t\t\t\tdays={days}\n\t\t\t\t\t\t\t\t\tselDay={selDay}\n\t\t\t\t\t\t\t\t\ttempYear={tempYear}\n\t\t\t\t\t\t\t\t\ttempMonth={tempMonth}\n\t\t\t\t\t\t\t\t\ttempDay={tempDay}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{local.clearable && (\n\t\t\t\t\t\t\t\t<button className={clearRowClass} type='button' onClick={clear}>\n\t\t\t\t\t\t\t\t\t{local.clearLabel || 'Clear'}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)\n\t\t\t}}\n\t\t</>\n\t)\n}\n\nexport default DatePickerMobile\n"],"mappings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qG,QAAAR,MAAA,mBACpJlD,oBAAoB;GAAA0D,QAAAR,MAAA,gBAAS;IAAEqD,QAAQ;IAAGxI,QAAQ;IAAsBV,YAAY;GAA+D,EAAC;GAAAsG,OAAAR,YAAA7B,IAAAK,SAAAJ,WAAA;IAG/JK;IACAC;IACGC;IACEC;IACEC;IACCC;IACFC;GAAO,CAAA,CAAA,CAAA;GAAAwB,QAAAP,MAAA,mBARFpD,cAAc;GAAA4D,OAAAhB,YAW7BiC,MAAM4B,oBAAS;IAAA,MAAAjE,OAAAlH,OAAAmH,UAAA,IAAA;IAAAmB,OAAApB,YAEbqC,MAAM6B,cAAc,OAAO;IAAA/C,QAAAnB,MAAA,mBADVpB,aAAa;IAAAuC,QAAAnB,MAAA,iBAAyByD,KAAK;IAAA,OAAAzD;GAAA,IAG9Da,KAAA;GAAAM,QAAAf,MAAA,mBAvBcvD,UAAU;GAAAsE,QAAAnB,MAAA,mBARX,GAAG3D,aAAY,GAAIW,WAAW;GAAA,OAAAgD;EAAA;CAmChD,CAAC,EAAA,CAAA;AAGJ"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["css","createEffect","createSignal","splitProps","Icon","CENTER_OFFSET","ITEM_HEIGHT","expandCircular","makeWheel","_tmpl6","_template","_tmpl5","_tmpl4","_tmpl3","_tmpl2","_tmpl","MONTH_NAMES_SHORT","daysInMonth","year","month","Date","getDate","YEARS","Array","from","length","_","i","MONTHS","getDays","count","toDate","day","formatDateLabel","date","getMonth","getFullYear","calendarSvg","triggerWrapperClass","position","width","background","border","padding","font","cursor","color","outline","borderRadius","boxShadow","triggerDisabledClass","opacity","triggerClass","height","fontSize","fontFamily","boxSizing","display","alignItems","triggerPlaceholderClass","triggerValueClass","calendarIconClass","right","top","transform","pointerEvents","overlayClass","inset","zIndex","flexDirection","justifyContent","backdropClass","transition","sheetClass","borderTop","paddingBottom","openClass","toolbarClass","borderBottom","flexShrink","toolbarBtnClass","WebkitTapHighlightColor","toolbarTitleClass","fontWeight","wheelAreaClass","gradientOverlayClass","left","columnWrapperClass","flex","overflow","columnLabelClass","textTransform","letterSpacing","marginBottom","columnViewportClass","touchAction","content","bottom","columnListClass","willChange","highlightBarClass","itemBaseClass","userSelect","whiteSpace","textOverflow","selectedItemClass","clearRowClass","gap","CalendarIconComp","_jsx","_mergeProps","svg","size","strokeWidth","mountWheel","el","wheel","_wheel","destroy","mount","Columns","y","m","days","selDay","tempYear","tempMonth","tempDay","yearWheel","indexOf","monthItems","monthStartIdx","monthWheel","dayItems","dayStartIdx","dayWheel","_el0","cloneNode","_el1","firstChild","_el2","_el3","nextSibling","_el4","_el5","_el6","_el7","_el8","_el9","_el10","_el11","_el12","_el13","_el14","_el15","_setProp","_insert","map","item","String","e","handlePointerDown","handlePointerMove","currentTarget","handlePointerUp","idx","newYear","maxDay","handlePointerCancel","DatePickerMobile","props","local","open","resolveValue","v","value","isDisabled","d","disabled","onKey","key","cancel","document","addEventListener","prevOverflow","body","style","removeEventListener","openSheet","Math","min","confirm","onValueChange","clear","_Fragment","children","placeholder","disabledClassName","backdropClassName","backdropStyle","clearable","clearLabel"],"sources":["../../../src/components/DatePickerMobile/index.jsx"],"sourcesContent":["import { css } from '@emotion/css'\nimport { createEffect, createSignal, splitProps } from '@plastic-js/plastic'\nimport Icon from '../Icon.jsx'\nimport { CENTER_OFFSET, ITEM_HEIGHT, expandCircular, makeWheel } from './wheel.js'\n\n// ── Date helpers ──────────────────────────────────────────────────────────\nconst MONTH_NAMES_SHORT = [\n\t'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',\n\t'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec',\n]\n\nconst daysInMonth = (year, month) => new Date(year, month + 1, 0).getDate()\n\nconst YEARS = Array.from({ length: 200 }, (_, i) => 1900 + i)\nconst MONTHS = Array.from({ length: 12 }, (_, i) => i)\n\nconst getDays = (year, month) => {\n\tconst count = daysInMonth(year, month)\n\treturn Array.from({ length: count }, (_, i) => i + 1)\n}\n\nconst toDate = (year, month, day) => new Date(year, month, day)\n\nconst formatDateLabel = (date) => {\n\tif (!date) return ''\n\treturn `${MONTH_NAMES_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`\n}\n\n// ── SVGs ───────────────────────────────────────────────────────────────────\nconst calendarSvg = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/><line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/><line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/></svg>'\n\n// ── Styles ─────────────────────────────────────────────────────────────────\nconst triggerWrapperClass = css({\n\tposition: 'relative',\n\twidth: '100%',\n\tbackground: 'none',\n\tborder: 'none',\n\tpadding: 0,\n\tfont: 'inherit',\n\tcursor: 'pointer',\n\tcolor: 'inherit',\n\toutline: 'none',\n\tborderRadius: '10px',\n\t'&:focus-visible': { boxShadow: '0 0 0 2px var(--accent)' },\n})\n\nconst triggerDisabledClass = css({\n\topacity: 0.4,\n\tcursor: 'not-allowed',\n})\n\nconst triggerClass = css({\n\twidth: '100%',\n\theight: '42px',\n\tpadding: '0 36px 0 14px',\n\tbackground: 'rgba(255,255,255,0.06)',\n\tborder: '1px solid var(--border)',\n\tborderRadius: '10px',\n\tcolor: 'var(--ink)',\n\tfontSize: '16px',\n\tfontFamily: 'inherit',\n\toutline: 'none',\n\tboxSizing: 'border-box',\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tcursor: 'pointer',\n})\n\nconst triggerPlaceholderClass = css({\n\tcolor: 'var(--muted)',\n})\n\nconst triggerValueClass = css({\n\tcolor: 'var(--ink)',\n})\n\nconst calendarIconClass = css({\n\tposition: 'absolute',\n\tright: '10px',\n\ttop: '50%',\n\ttransform: 'translateY(-50%)',\n\twidth: '18px',\n\theight: '18px',\n\tcolor: 'var(--muted)',\n\tpointerEvents: 'none',\n})\n\nconst overlayClass = css({\n\tposition: 'fixed',\n\tinset: 0,\n\tzIndex: 1000,\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\tjustifyContent: 'flex-end',\n\tpointerEvents: 'none',\n})\n\nconst backdropClass = css({\n\tposition: 'absolute',\n\tinset: 0,\n\tbackground: 'rgba(0,0,0,0.5)',\n\topacity: 0,\n\ttransition: 'opacity 240ms ease',\n})\n\nconst sheetClass = css({\n\tposition: 'relative',\n\twidth: '100%',\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\tbackground: 'var(--surface)',\n\tborderTop: '1px solid var(--border)',\n\tborderRadius: '18px 18px 0 0',\n\tboxShadow: '0 -8px 32px rgba(0,0,0,0.4)',\n\tpaddingBottom: 'env(safe-area-inset-bottom, 0px)',\n\ttransform: 'translateY(100%)',\n\ttransition: 'transform 280ms cubic-bezier(0.32, 0.72, 0, 1)',\n})\n\nconst openClass = css({\n\tpointerEvents: 'auto',\n\t[`& .${backdropClass}`]: { opacity: 1 },\n\t[`& .${sheetClass}`]: { transform: 'translateY(0)' },\n})\n\nconst toolbarClass = css({\n\tdisplay: 'flex',\n\tjustifyContent: 'space-between',\n\talignItems: 'center',\n\tpadding: '12px 16px',\n\tborderBottom: '1px solid var(--border)',\n\tflexShrink: 0,\n})\n\nconst toolbarBtnClass = css({\n\tbackground: 'none',\n\tborder: 'none',\n\tpadding: '6px 0',\n\tcolor: 'var(--accent)',\n\tfontSize: '16px',\n\tfontFamily: 'inherit',\n\tcursor: 'pointer',\n\tWebkitTapHighlightColor: 'transparent',\n})\n\nconst toolbarTitleClass = css({\n\tfontSize: '15px',\n\tfontWeight: 600,\n\tcolor: 'var(--ink)',\n})\n\nconst wheelAreaClass = css({\n\tdisplay: 'flex',\n\tjustifyContent: 'center',\n\talignItems: 'stretch',\n\tpadding: '12px 0 20px',\n\tposition: 'relative',\n})\n\nconst gradientOverlayClass = css({\n\tposition: 'absolute',\n\tleft: 0,\n\tright: 0,\n\tpointerEvents: 'none',\n\tzIndex: 2,\n})\n\nconst columnWrapperClass = css({\n\tflex: 1,\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\talignItems: 'center',\n\toverflow: 'hidden',\n\tposition: 'relative',\n})\n\nconst columnLabelClass = css({\n\tfontSize: '11px',\n\tcolor: 'var(--muted)',\n\ttextTransform: 'uppercase',\n\tletterSpacing: '0.5px',\n\tmarginBottom: '6px',\n\tfontWeight: 500,\n})\n\nconst columnViewportClass = css({\n\twidth: '100%',\n\theight: `${CENTER_OFFSET * 2 + ITEM_HEIGHT}px`,\n\toverflow: 'hidden',\n\tposition: 'relative',\n\ttouchAction: 'none',\n\t// Gradient overlays for iOS-style edge fade\n\t'&::before, &::after': {\n\t\tcontent: '\"\"',\n\t\tposition: 'absolute',\n\t\tleft: 0,\n\t\tright: 0,\n\t\theight: `${CENTER_OFFSET}px`,\n\t\tpointerEvents: 'none',\n\t\tzIndex: 2,\n\t},\n\t'&::before': {\n\t\ttop: 0,\n\t\tbackground: 'linear-gradient(to bottom, var(--surface) 0%, transparent 100%)',\n\t},\n\t'&::after': {\n\t\tbottom: 0,\n\t\tbackground: 'linear-gradient(to top, var(--surface) 0%, transparent 100%)',\n\t},\n})\n\nconst columnListClass = css({\n\twillChange: 'transform',\n})\n\nconst highlightBarClass = css({\n\tposition: 'absolute',\n\ttop: `${CENTER_OFFSET}px`,\n\tleft: '10%',\n\tright: '10%',\n\theight: `${ITEM_HEIGHT}px`,\n\tborderRadius: '8px',\n\tbackground: 'rgba(255,255,255,0.06)',\n\tpointerEvents: 'none',\n\tzIndex: 1,\n})\n\nconst itemBaseClass = css({\n\theight: `${ITEM_HEIGHT}px`,\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tjustifyContent: 'center',\n\tfontSize: '20px',\n\tcolor: 'var(--muted)',\n\tuserSelect: 'none',\n\twhiteSpace: 'nowrap',\n\toverflow: 'hidden',\n\ttextOverflow: 'ellipsis',\n\tpadding: '0 4px',\n\tboxSizing: 'border-box',\n})\n\nconst selectedItemClass = css({\n\tcolor: 'var(--ink)',\n\tfontWeight: 600,\n\tfontSize: '22px',\n})\n\nconst clearRowClass = css({\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tjustifyContent: 'center',\n\theight: '44px',\n\tgap: '6px',\n\tcolor: 'var(--accent)',\n\tfontSize: '15px',\n\tfontFamily: 'inherit',\n\tbackground: 'none',\n\tborder: 'none',\n\tborderTop: '1px solid var(--border)',\n\tcursor: 'pointer',\n\twidth: '100%',\n\tflexShrink: 0,\n\tpadding: 0,\n\t'&:active': { background: 'rgba(255,255,255,0.04)' },\n})\n\n// ── CalendarIcon ───────────────────────────────────────────────────────────\nfunction CalendarIconComp() {\n\treturn <Icon svg={calendarSvg} size={18} strokeWidth={1.5} />\n}\n\n// ── mountWheel ref helper ──────────────────────────────────────────────────\n//\n// Stores the wheel controller on the DOM element so that a subsequent mount\n// can destroy the previous instance first — prevents animation leaks.\nfunction mountWheel(el, wheel) {\n\tif (el._wheel && el._wheel !== wheel) {\n\t\tel._wheel.destroy()\n\t}\n\tel._wheel = wheel\n\twheel.mount(el)\n}\n\n// ── Columns ────────────────────────────────────────────────────────────────\n//\n// Renders the three wheel columns (year / month / day). Receives all data as\n// plain props so it can be used as a normal Plastic component.\nfunction Columns({ y, m, days, selDay, tempYear, tempMonth, tempDay }) {\n\tconst yearWheel = makeWheel(YEARS, YEARS.indexOf(y), false)\n\n\tconst [monthItems, monthStartIdx] = expandCircular(MONTHS, m)\n\tconst monthWheel = makeWheel(monthItems, monthStartIdx, true)\n\n\tconst [dayItems, dayStartIdx] = expandCircular(days, selDay - 1)\n\tconst dayWheel = makeWheel(dayItems, dayStartIdx, true)\n\n\treturn (\n\t\t<div style={{ display: 'flex', width: '100%' }}>\n\t\t\t<div className={columnWrapperClass}>\n\t\t\t\t<span className={columnLabelClass}>Year</span>\n\t\t\t\t<div className={columnViewportClass}>\n\t\t\t\t\t<div className={highlightBarClass} />\n\t\t\t\t\t<div\n\t\t\t\t\t\tref={(el) => { if (el) mountWheel(el, yearWheel) }}\n\t\t\t\t\t\tclassName={columnListClass}\n\t\t\t\t\t\tonPointerDown={(e) => yearWheel.handlePointerDown(e)}\n\t\t\t\t\t\tonPointerMove={(e) => yearWheel.handlePointerMove(e, e.currentTarget)}\n\t\t\t\t\t\tonPointerUp={(e) => yearWheel.handlePointerUp(e, e.currentTarget, (idx) => {\n\t\t\t\t\t\t\tconst newYear = YEARS[idx]\n\t\t\t\t\t\t\ttempYear(newYear)\n\t\t\t\t\t\t\tconst maxDay = daysInMonth(newYear, tempYear())\n\t\t\t\t\t\t\tif (tempDay() > maxDay) tempDay(maxDay)\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tonPointerCancel={(e) => yearWheel.handlePointerCancel(e, e.currentTarget)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{YEARS.map((item, i) => (\n\t\t\t\t\t\t\t<div className={`${itemBaseClass} ${i === YEARS.indexOf(y) ? selectedItemClass : ''}`} key={i}>{String(item)}</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className={columnWrapperClass}>\n\t\t\t\t<span className={columnLabelClass}>Month</span>\n\t\t\t\t<div className={columnViewportClass}>\n\t\t\t\t\t<div className={highlightBarClass} />\n\t\t\t\t\t<div\n\t\t\t\t\t\tref={(el) => { if (el) mountWheel(el, monthWheel) }}\n\t\t\t\t\t\tclassName={columnListClass}\n\t\t\t\t\t\tonPointerDown={(e) => monthWheel.handlePointerDown(e)}\n\t\t\t\t\t\tonPointerMove={(e) => monthWheel.handlePointerMove(e, e.currentTarget)}\n\t\t\t\t\t\tonPointerUp={(e) => monthWheel.handlePointerUp(e, e.currentTarget, (idx) => {\n\t\t\t\t\t\t\ttempMonth(idx)\n\t\t\t\t\t\t\tconst maxDay = daysInMonth(tempYear(), idx)\n\t\t\t\t\t\t\tif (tempDay() > maxDay) tempDay(maxDay)\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tonPointerCancel={(e) => monthWheel.handlePointerCancel(e, e.currentTarget)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{monthItems.map((item, i) => (\n\t\t\t\t\t\t\t<div className={`${itemBaseClass} ${i === monthStartIdx ? selectedItemClass : ''}`} key={i}>{MONTH_NAMES_SHORT[item]}</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className={columnWrapperClass}>\n\t\t\t\t<span className={columnLabelClass}>Day</span>\n\t\t\t\t<div className={columnViewportClass}>\n\t\t\t\t\t<div className={highlightBarClass} />\n\t\t\t\t\t<div\n\t\t\t\t\t\tref={(el) => { if (el) mountWheel(el, dayWheel) }}\n\t\t\t\t\t\tclassName={columnListClass}\n\t\t\t\t\t\tonPointerDown={(e) => dayWheel.handlePointerDown(e)}\n\t\t\t\t\t\tonPointerMove={(e) => dayWheel.handlePointerMove(e, e.currentTarget)}\n\t\t\t\t\t\tonPointerUp={(e) => dayWheel.handlePointerUp(e, e.currentTarget, (idx) => tempDay(idx + 1))}\n\t\t\t\t\t\tonPointerCancel={(e) => dayWheel.handlePointerCancel(e, e.currentTarget)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{dayItems.map((item, i) => (\n\t\t\t\t\t\t\t<div className={`${itemBaseClass} ${i === dayStartIdx ? selectedItemClass : ''}`} key={i}>{String(item)}</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n\n// ── DatePickerMobile ───────────────────────────────────────────────────────\n//\n// A mobile bottom-sheet date picker with iOS-style wheel columns for\n// year, month, and day. The trigger visually mimics <input type=\"date\">.\n//\n// Props:\n// value Date | (() => Date | null) — current selected date\n// onValueChange (Date | null) => void — called when user confirms\n// placeholder string — trigger placeholder text (default \"Select date\")\n// clearable boolean — show a \"Clear\" row in the sheet\n// clearLabel string — label for the clear row (default \"Clear\")\n// disabled boolean — disable interaction (default false)\n// disabledClassName string — additional class when disabled\n// backdropClassName className for the backdrop\n// backdropStyle inline style for the backdrop\nconst DatePickerMobile = (props) => {\n\tconst [local] = splitProps(props, [\n\t\t'value', 'onValueChange', 'placeholder',\n\t\t'clearable', 'clearLabel',\n\t\t'disabled', 'disabledClassName',\n\t\t'backdropClassName', 'backdropStyle',\n\t])\n\n\tconst open = createSignal(false)\n\n\tconst resolveValue = () => {\n\t\tconst v = typeof local.value === 'function' ? local.value() : local.value\n\t\treturn v ?? null\n\t}\n\n\tconst isDisabled = () => {\n\t\tconst d = typeof local.disabled === 'function' ? local.disabled() : local.disabled\n\t\treturn !!d\n\t}\n\n\tconst tempYear = createSignal(2000)\n\tconst tempMonth = createSignal(0)\n\tconst tempDay = createSignal(1)\n\n\tcreateEffect(() => {\n\t\tif (!open()) return\n\t\tconst onKey = (e) => { if (e.key === 'Escape') cancel() }\n\t\tdocument.addEventListener('keydown', onKey)\n\t\tconst prevOverflow = document.body.style.overflow\n\t\tdocument.body.style.overflow = 'hidden'\n\t\treturn () => {\n\t\t\tdocument.removeEventListener('keydown', onKey)\n\t\t\tdocument.body.style.overflow = prevOverflow\n\t\t}\n\t})\n\n\tconst openSheet = () => {\n\t\tif (isDisabled()) return\n\t\tconst d = resolveValue() || new Date()\n\t\ttempYear(d.getFullYear())\n\t\ttempMonth(d.getMonth())\n\t\ttempDay(Math.min(d.getDate(), daysInMonth(d.getFullYear(), d.getMonth())))\n\t\topen(true)\n\t}\n\n\tconst confirm = () => {\n\t\tconst date = toDate(tempYear(), tempMonth(), tempDay())\n\t\tlocal.onValueChange?.(date)\n\t\topen(false)\n\t}\n\n\tconst cancel = () => {\n\t\topen(false)\n\t}\n\n\tconst clear = () => {\n\t\tlocal.onValueChange?.(null)\n\t\topen(false)\n\t}\n\n\tconst dayItems = () => getDays(tempYear(), tempMonth())\n\n\treturn (\n\t\t<>\n\t\t\t<button\n\t\t\t\ttype='button'\n\t\t\t\tclassName={`${triggerWrapperClass} ${isDisabled() ? `${triggerDisabledClass} ${local.disabledClassName || ''}` : ''}`}\n\t\t\t\tonClick={openSheet}\n\t\t\t\taria-disabled={isDisabled()}\n\t\t\t>\n\t\t\t\t{() => {\n\t\t\t\t\tconst d = resolveValue()\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<span className={`${triggerClass} ${d ? triggerValueClass : triggerPlaceholderClass}`}>\n\t\t\t\t\t\t\t{d ? formatDateLabel(d) : (local.placeholder || 'Select date')}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)\n\t\t\t\t}}\n\t\t\t\t<span className={calendarIconClass}>\n\t\t\t\t\t<CalendarIconComp />\n\t\t\t\t</span>\n\t\t\t</button>\n\n\t\t\t{() => {\n\t\t\t\tif (!open()) return null\n\t\t\t\tconst y = tempYear()\n\t\t\t\tconst m = tempMonth()\n\t\t\t\tconst days = dayItems()\n\t\t\t\tconst selDay = tempDay()\n\n\t\t\t\treturn (\n\t\t\t\t\t<div className={`${overlayClass} ${openClass}`}>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={`${backdropClass} ${local.backdropClassName || ''}`}\n\t\t\t\t\t\t\tstyle={local.backdropStyle}\n\t\t\t\t\t\t\trole='presentation'\n\t\t\t\t\t\t\taria-hidden='true'\n\t\t\t\t\t\t\tonClick={cancel}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className={sheetClass} role='dialog' aria-label='Date picker'>\n\t\t\t\t\t\t\t<div className={toolbarClass}>\n\t\t\t\t\t\t\t\t<button className={toolbarBtnClass} type='button' onClick={cancel}>Cancel</button>\n\t\t\t\t\t\t\t\t<span className={toolbarTitleClass}>Select Date</span>\n\t\t\t\t\t\t\t\t<button className={toolbarBtnClass} type='button' onClick={confirm}>Done</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className={wheelAreaClass}>\n\t\t\t\t\t\t\t\t<Columns\n\t\t\t\t\t\t\t\t\ty={y}\n\t\t\t\t\t\t\t\t\tm={m}\n\t\t\t\t\t\t\t\t\tdays={days}\n\t\t\t\t\t\t\t\t\tselDay={selDay}\n\t\t\t\t\t\t\t\t\ttempYear={tempYear}\n\t\t\t\t\t\t\t\t\ttempMonth={tempMonth}\n\t\t\t\t\t\t\t\t\ttempDay={tempDay}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{local.clearable && (\n\t\t\t\t\t\t\t\t<button className={clearRowClass} type='button' onClick={clear}>\n\t\t\t\t\t\t\t\t\t{local.clearLabel || 'Clear'}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)\n\t\t\t}}\n\t\t</>\n\t)\n}\n\nexport default DatePickerMobile\n"],"mappings":";;;;;;AAKA,IAAAS,SAAAC,SAAA,mCAAA;AAAA,IAAAC,SAAAD,SAAA,sPAAA;AAAA,IAAAE,SAAAF,SAAA,eAAA;AAAA,IAAAG,SAAAH,SAAA,mDAAA;AAAA,IAAAI,SAAAJ,SAAA,aAAA;AAAA,IAAAK,QAAAL,SAAA,oMAAA;AACA,IAAMM,oBAAoB;CACzB;CAAO;CAAO;CAAO;CAAO;CAAO;CACnC;CAAO;CAAO;CAAO;CAAO;CAAO;AAAK;AAGzC,IAAMC,eAAeC,MAAMC,UAAU,IAAIC,KAAKF,MAAMC,QAAQ,GAAG,CAAC,EAAEE,QAAQ;AAE1E,IAAMC,QAAQC,MAAMC,KAAK,EAAEC,QAAQ,IAAI,IAAIC,GAAGC,MAAM,OAAOA,CAAC;AAC5D,IAAMC,SAASL,MAAMC,KAAK,EAAEC,QAAQ,GAAG,IAAIC,GAAGC,MAAMA,CAAC;AAErD,IAAME,WAAWX,MAAMC,UAAU;CAChC,MAAMW,QAAQb,YAAYC,MAAMC,KAAK;CACrC,OAAOI,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CC;IACFC;GAAO,CAAA,CAAA,CAAA;GAAA4B,QAAAT,MAAA,mBARF9D,cAAc;GAAAwE,OAAAhB,YAW7B+B,MAAM6B,oBAAS;IAAA,MAAAhE,OAAA/H,OAAAgI,UAAA,IAAA;IAAAmB,OAAApB,YAEbmC,MAAM8B,cAAc,OAAO;IAAA9C,QAAAnB,MAAA,mBADV9B,aAAa;IAAAiD,QAAAnB,MAAA,iBAAyByD,KAAK;IAAA,OAAAzD;GAAA,IAG9DW,IAAA;GAAAQ,QAAAf,MAAA,mBArBcnE,UAAU;GAAAkF,QAAAnB,MAAA,mBARX,GAAGtE,aAAY,GAAIU,WAAW;GAAA,OAAA4D;EAAA;CAiChD,CAAC,EAAA,CAAA;AAGJ"}
|
|
@@ -1,35 +1,51 @@
|
|
|
1
|
+
function expandCircular(items, index) {
|
|
2
|
+
const len = items.length;
|
|
3
|
+
if (len === 0) return [items, index];
|
|
4
|
+
return [[
|
|
5
|
+
...items,
|
|
6
|
+
...items,
|
|
7
|
+
...items
|
|
8
|
+
], len + index];
|
|
9
|
+
}
|
|
1
10
|
function clampOffset(offset, itemCount) {
|
|
2
11
|
const max = 72;
|
|
3
12
|
const min = 72 - Math.max(0, itemCount - 1) * 36;
|
|
4
13
|
return Math.max(min, Math.min(max, offset));
|
|
5
14
|
}
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
function snapAnimation(el, from, to, onComplete) {
|
|
11
|
-
const duration = 180;
|
|
12
|
-
const startTime = performance.now();
|
|
13
|
-
function tick(now) {
|
|
14
|
-
const t = Math.min((now - startTime) / duration, 1);
|
|
15
|
-
const ease = 1 - Math.pow(1 - t, 3);
|
|
16
|
-
const current = from + (to - from) * ease;
|
|
17
|
-
el.style.transform = `translateY(${current}px)`;
|
|
18
|
-
if (t < 1) requestAnimationFrame(tick);
|
|
19
|
-
else onComplete?.();
|
|
20
|
-
}
|
|
21
|
-
requestAnimationFrame(tick);
|
|
22
|
-
}
|
|
23
|
-
function makeWheel(items, index) {
|
|
24
|
-
let translateY = clampOffset(72 - index * 36, items.length);
|
|
15
|
+
function makeWheel(displayItems, displayIndex, circular) {
|
|
16
|
+
const baseLen = circular ? Math.round(displayItems.length / 3) : displayItems.length;
|
|
17
|
+
let translateY = circular ? 72 - displayIndex * 36 : clampOffset(72 - displayIndex * 36, displayItems.length);
|
|
25
18
|
let drag = null;
|
|
26
19
|
let animFrame = null;
|
|
20
|
+
function clampOrPass(v) {
|
|
21
|
+
if (!circular) return clampOffset(v, displayItems.length);
|
|
22
|
+
const maxV = 108;
|
|
23
|
+
const minV = 72 - (2 * baseLen + 1) * 36;
|
|
24
|
+
if (v > maxV) return maxV + (v - maxV) * .15;
|
|
25
|
+
if (v < minV) return minV + (v - minV) * .15;
|
|
26
|
+
return v;
|
|
27
|
+
}
|
|
28
|
+
function resolveIndex(offset) {
|
|
29
|
+
const raw = Math.round((72 - offset) / 36);
|
|
30
|
+
if (circular) return (raw % baseLen + baseLen) % baseLen;
|
|
31
|
+
return Math.max(0, Math.min(displayItems.length - 1, raw));
|
|
32
|
+
}
|
|
33
|
+
function nearestCopyOffset(idx, currentOffset) {
|
|
34
|
+
if (!circular) return 72 - idx * 36;
|
|
35
|
+
return [
|
|
36
|
+
0,
|
|
37
|
+
1,
|
|
38
|
+
2
|
|
39
|
+
].map((c) => 72 - (c * baseLen + idx) * 36).reduce((a, b) => Math.abs(a - currentOffset) < Math.abs(b - currentOffset) ? a : b);
|
|
40
|
+
}
|
|
27
41
|
return {
|
|
28
42
|
mount(el) {
|
|
43
|
+
el.style.transition = "none";
|
|
29
44
|
el.style.transform = `translateY(${translateY}px)`;
|
|
30
45
|
},
|
|
31
46
|
destroy() {
|
|
32
47
|
cancelAnimationFrame(animFrame);
|
|
48
|
+
animFrame = null;
|
|
33
49
|
drag = null;
|
|
34
50
|
},
|
|
35
51
|
handlePointerDown(e) {
|
|
@@ -51,8 +67,9 @@ function makeWheel(items, index) {
|
|
|
51
67
|
if (dt > 0) drag.velocity = (e.clientY - drag.lastY) / dt;
|
|
52
68
|
drag.lastY = e.clientY;
|
|
53
69
|
drag.lastTime = now;
|
|
54
|
-
const offset =
|
|
70
|
+
const offset = clampOrPass(drag.startTranslate + dy);
|
|
55
71
|
translateY = offset;
|
|
72
|
+
el.style.transition = "none";
|
|
56
73
|
el.style.transform = `translateY(${offset}px)`;
|
|
57
74
|
},
|
|
58
75
|
handlePointerUp(e, el, onChange) {
|
|
@@ -60,23 +77,25 @@ function makeWheel(items, index) {
|
|
|
60
77
|
const vel = drag.velocity;
|
|
61
78
|
drag = null;
|
|
62
79
|
let finalOffset = translateY;
|
|
63
|
-
if (Math.abs(vel) > .3) finalOffset =
|
|
64
|
-
const idx =
|
|
65
|
-
const target =
|
|
80
|
+
if (Math.abs(vel) > .3) finalOffset = clampOrPass(finalOffset + vel * 120);
|
|
81
|
+
const idx = resolveIndex(finalOffset);
|
|
82
|
+
const target = nearestCopyOffset(idx, translateY);
|
|
66
83
|
translateY = target;
|
|
67
|
-
|
|
84
|
+
el.style.transition = "transform 180ms cubic-bezier(0.32, 0.72, 0, 1)";
|
|
85
|
+
el.style.transform = `translateY(${target}px)`;
|
|
68
86
|
onChange(idx);
|
|
69
87
|
},
|
|
70
88
|
handlePointerCancel(e, el) {
|
|
71
89
|
if (!drag) return;
|
|
72
|
-
const target =
|
|
90
|
+
const target = nearestCopyOffset(resolveIndex(translateY), translateY);
|
|
73
91
|
translateY = target;
|
|
74
|
-
|
|
92
|
+
el.style.transition = "transform 180ms cubic-bezier(0.32, 0.72, 0, 1)";
|
|
93
|
+
el.style.transform = `translateY(${target}px)`;
|
|
75
94
|
drag = null;
|
|
76
95
|
}
|
|
77
96
|
};
|
|
78
97
|
}
|
|
79
98
|
//#endregion
|
|
80
|
-
export { makeWheel };
|
|
99
|
+
export { expandCircular, makeWheel };
|
|
81
100
|
|
|
82
101
|
//# sourceMappingURL=wheel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wheel.js","names":[],"sources":["../../../src/components/DatePickerMobile/wheel.js"],"sourcesContent":["// ── Wheel constants ──────────────────────────────────────────────────────\nexport const ITEM_HEIGHT = 36\nexport const VISIBLE_ITEMS = 5\nexport const CONTAINER_HEIGHT = ITEM_HEIGHT * VISIBLE_ITEMS\nexport const CENTER_OFFSET = (CONTAINER_HEIGHT - ITEM_HEIGHT) / 2\n\n// ── Math helpers ─────────────────────────────────────────────────────────\nexport function clampOffset(offset, itemCount) {\n\tconst max = CENTER_OFFSET\n\tconst min = CENTER_OFFSET - Math.max(0, itemCount - 1) * ITEM_HEIGHT\n\treturn Math.max(min, Math.min(max, offset))\n}\n\nexport function getIndexFromOffset(offset, itemCount) {\n\tconst raw = Math.round((CENTER_OFFSET - offset) / ITEM_HEIGHT)\n\treturn Math.max(0, Math.min(itemCount - 1, raw))\n}\n\nexport function
|
|
1
|
+
{"version":3,"file":"wheel.js","names":[],"sources":["../../../src/components/DatePickerMobile/wheel.js"],"sourcesContent":["// ── Wheel constants ──────────────────────────────────────────────────────\nexport const ITEM_HEIGHT = 36\nexport const VISIBLE_ITEMS = 5\nexport const CONTAINER_HEIGHT = ITEM_HEIGHT * VISIBLE_ITEMS\nexport const CENTER_OFFSET = (CONTAINER_HEIGHT - ITEM_HEIGHT) / 2\n\n// ── Expand helper for circular mode ───────────────────────────────────────\n//\n// Returns [expandedArray, middleIndex] where the array is repeated 3x and\n// the original `index` is placed in the middle copy.\nexport function expandCircular(items, index) {\n\tconst len = items.length\n\tif (len === 0) return [items, index]\n\treturn [[...items, ...items, ...items], len + index]\n}\n\n// ── Math helpers ─────────────────────────────────────────────────────────\nexport function clampOffset(offset, itemCount) {\n\tconst max = CENTER_OFFSET\n\tconst min = CENTER_OFFSET - Math.max(0, itemCount - 1) * ITEM_HEIGHT\n\treturn Math.max(min, Math.min(max, offset))\n}\n\nexport function getIndexFromOffset(offset, itemCount) {\n\tconst raw = Math.round((CENTER_OFFSET - offset) / ITEM_HEIGHT)\n\treturn Math.max(0, Math.min(itemCount - 1, raw))\n}\n\n// ── Wheel controller factory ─────────────────────────────────────────────\n//\n// Creates a mutable wheel-scroll controller for one column. All state is kept\n// in plain closures — no Plastic signals.\n//\n// When `circular` is true the wheel snaps to the nearest 3x copy of the\n// target index, creating an infinite-scroll illusion.\n//\n// The controller stores itself on `el._wheel` so that the parent's ref\n// callback can destroy the previous instance before mounting a new one.\nexport function makeWheel(displayItems, displayIndex, circular) {\n\tconst baseLen = circular ? Math.round(displayItems.length / 3) : displayItems.length\n\n\tlet translateY = circular\n\t\t? CENTER_OFFSET - displayIndex * ITEM_HEIGHT\n\t\t: clampOffset(CENTER_OFFSET - displayIndex * ITEM_HEIGHT, displayItems.length)\n\n\tlet drag = null\n\tlet animFrame = null\n\n\tfunction clampOrPass(v) {\n\t\tif (!circular) return clampOffset(v, displayItems.length)\n\t\tconst maxV = CENTER_OFFSET + ITEM_HEIGHT\n\t\tconst minV = CENTER_OFFSET - (2 * baseLen + 1) * ITEM_HEIGHT\n\t\tif (v > maxV) return maxV + (v - maxV) * 0.15\n\t\tif (v < minV) return minV + (v - minV) * 0.15\n\t\treturn v\n\t}\n\n\tfunction resolveIndex(offset) {\n\t\tconst raw = Math.round((CENTER_OFFSET - offset) / ITEM_HEIGHT)\n\t\tif (circular) return ((raw % baseLen) + baseLen) % baseLen\n\t\treturn Math.max(0, Math.min(displayItems.length - 1, raw))\n\t}\n\n\tfunction nearestCopyOffset(idx, currentOffset) {\n\t\tif (!circular) return CENTER_OFFSET - idx * ITEM_HEIGHT\n\t\tconst copies = [0, 1, 2]\n\t\t\t.map((c) => CENTER_OFFSET - (c * baseLen + idx) * ITEM_HEIGHT)\n\t\treturn copies.reduce((a, b) =>\n\t\t\tMath.abs(a - currentOffset) < Math.abs(b - currentOffset) ? a : b,\n\t\t)\n\t}\n\n\treturn {\n\t\tmount(el) {\n\t\t\tel.style.transition = 'none'\n\t\t\tel.style.transform = `translateY(${translateY}px)`\n\t\t},\n\n\t\tdestroy() {\n\t\t\tcancelAnimationFrame(animFrame)\n\t\t\tanimFrame = null\n\t\t\tdrag = null\n\t\t},\n\n\t\thandlePointerDown(e) {\n\t\t\te.preventDefault()\n\t\t\tcancelAnimationFrame(animFrame)\n\t\t\tdrag = {\n\t\t\t\tstartY: e.clientY,\n\t\t\t\tstartTranslate: translateY,\n\t\t\t\tlastY: e.clientY,\n\t\t\t\tlastTime: performance.now(),\n\t\t\t\tvelocity: 0,\n\t\t\t}\n\t\t},\n\n\t\thandlePointerMove(e, el) {\n\t\t\tif (!drag) return\n\t\t\tconst dy = e.clientY - drag.startY\n\t\t\tconst now = performance.now()\n\t\t\tconst dt = now - drag.lastTime\n\t\t\tif (dt > 0) drag.velocity = (e.clientY - drag.lastY) / dt\n\t\t\tdrag.lastY = e.clientY\n\t\t\tdrag.lastTime = now\n\t\t\tconst offset = clampOrPass(drag.startTranslate + dy)\n\t\t\ttranslateY = offset\n\t\t\tel.style.transition = 'none'\n\t\t\tel.style.transform = `translateY(${offset}px)`\n\t\t},\n\n\t\thandlePointerUp(e, el, onChange) {\n\t\t\tif (!drag) return\n\t\t\tconst vel = drag.velocity\n\t\t\tdrag = null\n\n\t\t\tlet finalOffset = translateY\n\t\t\tif (Math.abs(vel) > 0.3) {\n\t\t\t\tfinalOffset = clampOrPass(finalOffset + vel * 120)\n\t\t\t}\n\n\t\t\tconst idx = resolveIndex(finalOffset)\n\t\t\tconst target = nearestCopyOffset(idx, translateY)\n\t\t\ttranslateY = target\n\n\t\t\tel.style.transition = 'transform 180ms cubic-bezier(0.32, 0.72, 0, 1)'\n\t\t\tel.style.transform = `translateY(${target}px)`\n\t\t\tonChange(idx)\n\t\t},\n\n\t\thandlePointerCancel(e, el) {\n\t\t\tif (!drag) return\n\t\t\tconst idx = resolveIndex(translateY)\n\t\t\tconst target = nearestCopyOffset(idx, translateY)\n\t\t\ttranslateY = target\n\t\t\tel.style.transition = 'transform 180ms cubic-bezier(0.32, 0.72, 0, 1)'\n\t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