@surdeddd/bottom-sheet 0.22.1 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -14
- package/dist/core.cjs +13 -5
- package/dist/core.js +13 -5
- package/dist/element.cjs +43 -13
- package/dist/element.iife.global.js +2 -2
- package/dist/element.js +43 -13
- package/dist/features.cjs +28 -6
- package/dist/features.js +28 -6
- package/dist/index.cjs +41 -11
- package/dist/index.js +41 -11
- package/dist/qwik-lib/index.qwik.cjs +42 -11
- package/dist/qwik-lib/index.qwik.mjs +42 -11
- package/dist/qwik.cjs +41 -11
- package/dist/qwik.js +41 -11
- package/dist/react.cjs +41 -11
- package/dist/react.js +41 -11
- package/dist/solid.cjs +41 -11
- package/dist/solid.js +41 -11
- package/dist/solid.source.jsx +41 -11
- package/dist/styles.css +19 -2
- package/dist/svelte-core.cjs +41 -11
- package/dist/svelte-core.js +41 -11
- package/dist/svelte.cjs +41 -11
- package/dist/svelte.js +41 -11
- package/dist/vue.cjs +41 -11
- package/dist/vue.js +41 -11
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -250,7 +250,7 @@ type SnapPoint =
|
|
|
250
250
|
| `disableDrag` | `false` | Suppress the drag gesture (imperative snaps still work) |
|
|
251
251
|
| `dragFrom` | `"handle"` | Which regions start a drag: `"handle"`, `"sheet"` (whole sheet), or `"zones"` (only `[data-bs-drag]` subtrees). Defaults to `"sheet"` when no handle is given. `[data-bs-no-drag]` opts a subtree out in every mode. Also `setDragFrom()` / `getDragFrom()` — switching remounts the gesture, no component remount |
|
|
252
252
|
| `dragFromContent` | `true` | Whether a touch gesture on the scroll container drags the sheet; override per snap point with `{ id, size, dragFromContent: false }`. Also `setDragFromContent()` |
|
|
253
|
-
| `fitContentToSnap` | `false` | Keeps the whole scroll container reachable at every snap point, not only the largest. Off by default; see [Content reachable at every snap](#content-reachable-at-every-snap) |
|
|
253
|
+
| `fitContentToSnap` | `false` | Keeps the whole scroll container reachable and the footer on screen at every snap point, not only the largest. Off by default; see [Content reachable at every snap](#content-reachable-at-every-snap) |
|
|
254
254
|
| `radius` | token default | Corner radius (`string` CSS length or `number` px); also `setRadius()` |
|
|
255
255
|
| `maxHeight` | none | Cap the sheet height. `number` (px) or a string (`"92dvh"`, `"50%"`) re-resolved on viewport / orientation changes |
|
|
256
256
|
| `returnFocusTo` | opener | Focus target on dismiss — an `HTMLElement`, a selector `string`, or a `() => HTMLElement` factory |
|
|
@@ -526,19 +526,63 @@ last rows never come into view until the sheet is pulled up.
|
|
|
526
526
|
```
|
|
527
527
|
|
|
528
528
|
When the sheet settles, the engine writes the hidden amount to
|
|
529
|
-
`--bs-content-inset` and the stylesheet
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
the
|
|
529
|
+
`--bs-content-inset` and the stylesheet shrinks `.bs-content` by exactly that
|
|
530
|
+
much, so the scroll container ends at the edge of the screen: the last row, a
|
|
531
|
+
focused field and the scrollbar all stay in the visible part, and the thumb is
|
|
532
|
+
sized for what you can actually see. The moment the sheet starts to move, it
|
|
533
|
+
switches to the full-height container with a spacer of the same size at the end
|
|
534
|
+
of the list, so the rows below the edge are already laid out when a drag or an
|
|
535
|
+
animation reveals them. The switch changes the box and the scroll range by the
|
|
536
|
+
same amount, so nothing on screen moves. That is one layout when motion starts
|
|
537
|
+
and one when it settles, none per frame, so the motion stays transform-only.
|
|
538
|
+
While the sheet moves, a list that was scrolled to its very end is held in place
|
|
539
|
+
on screen instead of riding up with the sheet and dropping back at the end.
|
|
540
|
+
|
|
541
|
+
The footer has the same problem and gets the same cure. It is the last thing in
|
|
542
|
+
the sheet, so below the largest snap it sits under the screen edge along with
|
|
543
|
+
the end of the list. With `fitContentToSnap` on, the shrunken container puts the
|
|
544
|
+
footer at the bottom of the visible part of the sheet at rest, and while the
|
|
545
|
+
sheet moves the stylesheet lifts `.bs-footer` by `--bs-size − --bs-max-size`, so
|
|
546
|
+
it rides that edge on every frame of a drag or an animation, still without a
|
|
547
|
+
layout. The list ends above it, not under it. On a snap too short to hold both,
|
|
548
|
+
the footer slides under the screen edge instead of covering the handle. The
|
|
549
|
+
WebGL renderer keeps the full-height container and the footer where it was: its
|
|
550
|
+
surface is drawn on the GPU, the DOM footer has no background to cover the rows
|
|
551
|
+
with, and it captures the content at the start of a gesture.
|
|
552
|
+
|
|
553
|
+
#### Scrolling the list at every snap on touch
|
|
554
|
+
|
|
555
|
+
Making the end of the list *reachable* and letting a finger *scroll* to it are
|
|
556
|
+
two separate things. By default a swipe that starts on the content drags the
|
|
557
|
+
sheet until it reaches its largest snap, and only then scrolls the list — the
|
|
558
|
+
native sheet behaviour. On a mouse or trackpad the wheel scrolls at any snap
|
|
559
|
+
regardless; on touch it does not. To scroll at a half snap with a finger, hand
|
|
560
|
+
content swipes to the list and keep the handle (and header) for moving the
|
|
561
|
+
sheet:
|
|
562
|
+
|
|
563
|
+
```tsx
|
|
564
|
+
<BottomSheet snapPoints={points} fitContentToSnap dragFromContent={false}>
|
|
565
|
+
<LongList />
|
|
566
|
+
</BottomSheet>
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
`dragFromContent` can also be set per snap point, which keeps the native
|
|
570
|
+
pull-to-expand feel at a small peek and frees the list from half upwards:
|
|
571
|
+
|
|
572
|
+
```ts
|
|
573
|
+
const points = [
|
|
574
|
+
{ id: "peek", size: 120 },
|
|
575
|
+
{ id: "half", size: "50%", dragFromContent: false },
|
|
576
|
+
{ id: "full", size: "90%", dragFromContent: false },
|
|
577
|
+
];
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
It applies to `bottom` sheets and expects the scroll container to be the growing
|
|
581
|
+
child of the sheet's flex column, the way `.bs-content` is. For any other
|
|
582
|
+
container, `data-bs-fit-content` on the sheet reads `rest` or `moving` and
|
|
583
|
+
`--bs-content-inset` holds the hidden amount: shrink the container by it at
|
|
584
|
+
rest, or pad the end of its content by it while moving. On the slim core add
|
|
585
|
+
`contentFitFeature()` from `@surdeddd/bottom-sheet/features`.
|
|
542
586
|
|
|
543
587
|
### Scrim, blur & high contrast
|
|
544
588
|
|
package/dist/core.cjs
CHANGED
|
@@ -1487,13 +1487,17 @@ var AnimationRunner = class {
|
|
|
1487
1487
|
});
|
|
1488
1488
|
let stopped = false;
|
|
1489
1489
|
let auxRaf = 0;
|
|
1490
|
-
const start = performance.now();
|
|
1491
1490
|
const lastIdx = samples.values.length - 1;
|
|
1492
1491
|
const auxTick = () => {
|
|
1493
1492
|
if (stopped) return;
|
|
1494
|
-
const
|
|
1495
|
-
|
|
1496
|
-
|
|
1493
|
+
const at = Math.min(
|
|
1494
|
+
(Number(anim.currentTime) || 0) / samples.stepMs,
|
|
1495
|
+
lastIdx
|
|
1496
|
+
);
|
|
1497
|
+
const idx = Math.floor(at);
|
|
1498
|
+
const from = samples.values[idx];
|
|
1499
|
+
const to = samples.values[Math.min(idx + 1, lastIdx)];
|
|
1500
|
+
applyAux(from + (to - from) * (at - idx));
|
|
1497
1501
|
auxRaf = requestAnimationFrame(auxTick);
|
|
1498
1502
|
};
|
|
1499
1503
|
auxRaf = requestAnimationFrame(auxTick);
|
|
@@ -2705,7 +2709,11 @@ var BottomSheetCore = class {
|
|
|
2705
2709
|
getSize: () => this.size,
|
|
2706
2710
|
isDragging: () => this.isDraggingAny(),
|
|
2707
2711
|
applyAux: (size) => this.applySize(size, true),
|
|
2708
|
-
getTransformFor: (size) =>
|
|
2712
|
+
getTransformFor: (size) => {
|
|
2713
|
+
const cap = this.snaps.getMaxAxisSize();
|
|
2714
|
+
const shown = cap > 0 && !this.allowOvershoot ? Math.min(size, cap) : size;
|
|
2715
|
+
return this.transformTemplate(cap - shown);
|
|
2716
|
+
}
|
|
2709
2717
|
},
|
|
2710
2718
|
resolved.animation
|
|
2711
2719
|
);
|
package/dist/core.js
CHANGED
|
@@ -1485,13 +1485,17 @@ var AnimationRunner = class {
|
|
|
1485
1485
|
});
|
|
1486
1486
|
let stopped = false;
|
|
1487
1487
|
let auxRaf = 0;
|
|
1488
|
-
const start = performance.now();
|
|
1489
1488
|
const lastIdx = samples.values.length - 1;
|
|
1490
1489
|
const auxTick = () => {
|
|
1491
1490
|
if (stopped) return;
|
|
1492
|
-
const
|
|
1493
|
-
|
|
1494
|
-
|
|
1491
|
+
const at = Math.min(
|
|
1492
|
+
(Number(anim.currentTime) || 0) / samples.stepMs,
|
|
1493
|
+
lastIdx
|
|
1494
|
+
);
|
|
1495
|
+
const idx = Math.floor(at);
|
|
1496
|
+
const from = samples.values[idx];
|
|
1497
|
+
const to = samples.values[Math.min(idx + 1, lastIdx)];
|
|
1498
|
+
applyAux(from + (to - from) * (at - idx));
|
|
1495
1499
|
auxRaf = requestAnimationFrame(auxTick);
|
|
1496
1500
|
};
|
|
1497
1501
|
auxRaf = requestAnimationFrame(auxTick);
|
|
@@ -2703,7 +2707,11 @@ var BottomSheetCore = class {
|
|
|
2703
2707
|
getSize: () => this.size,
|
|
2704
2708
|
isDragging: () => this.isDraggingAny(),
|
|
2705
2709
|
applyAux: (size) => this.applySize(size, true),
|
|
2706
|
-
getTransformFor: (size) =>
|
|
2710
|
+
getTransformFor: (size) => {
|
|
2711
|
+
const cap = this.snaps.getMaxAxisSize();
|
|
2712
|
+
const shown = cap > 0 && !this.allowOvershoot ? Math.min(size, cap) : size;
|
|
2713
|
+
return this.transformTemplate(cap - shown);
|
|
2714
|
+
}
|
|
2707
2715
|
},
|
|
2708
2716
|
resolved.animation
|
|
2709
2717
|
);
|
package/dist/element.cjs
CHANGED
|
@@ -1630,13 +1630,17 @@ var init_animation_runner = __esm({
|
|
|
1630
1630
|
});
|
|
1631
1631
|
let stopped = false;
|
|
1632
1632
|
let auxRaf = 0;
|
|
1633
|
-
const start = performance.now();
|
|
1634
1633
|
const lastIdx = samples.values.length - 1;
|
|
1635
1634
|
const auxTick = () => {
|
|
1636
1635
|
if (stopped) return;
|
|
1637
|
-
const
|
|
1638
|
-
|
|
1639
|
-
|
|
1636
|
+
const at = Math.min(
|
|
1637
|
+
(Number(anim.currentTime) || 0) / samples.stepMs,
|
|
1638
|
+
lastIdx
|
|
1639
|
+
);
|
|
1640
|
+
const idx = Math.floor(at);
|
|
1641
|
+
const from = samples.values[idx];
|
|
1642
|
+
const to = samples.values[Math.min(idx + 1, lastIdx)];
|
|
1643
|
+
applyAux(from + (to - from) * (at - idx));
|
|
1640
1644
|
auxRaf = requestAnimationFrame(auxTick);
|
|
1641
1645
|
};
|
|
1642
1646
|
auxRaf = requestAnimationFrame(auxTick);
|
|
@@ -2984,7 +2988,11 @@ var init_BottomSheetCore = __esm({
|
|
|
2984
2988
|
getSize: () => this.size,
|
|
2985
2989
|
isDragging: () => this.isDraggingAny(),
|
|
2986
2990
|
applyAux: (size) => this.applySize(size, true),
|
|
2987
|
-
getTransformFor: (size) =>
|
|
2991
|
+
getTransformFor: (size) => {
|
|
2992
|
+
const cap = this.snaps.getMaxAxisSize();
|
|
2993
|
+
const shown = cap > 0 && !this.allowOvershoot ? Math.min(size, cap) : size;
|
|
2994
|
+
return this.transformTemplate(cap - shown);
|
|
2995
|
+
}
|
|
2988
2996
|
},
|
|
2989
2997
|
resolved.animation
|
|
2990
2998
|
);
|
|
@@ -4566,6 +4574,8 @@ function contentFitFeature() {
|
|
|
4566
4574
|
let inset = 0;
|
|
4567
4575
|
let unpaddedMax = -1;
|
|
4568
4576
|
let top = 0;
|
|
4577
|
+
let resting = false;
|
|
4578
|
+
const put = (name, px) => sheet.style.setProperty(name, `${px}px`);
|
|
4569
4579
|
const hiddenAt = (size) => sheet.dataset.mode === "bottom" ? Math.max(0, ctx.getMaxAxisSize() - size) : 0;
|
|
4570
4580
|
const follow = (size) => {
|
|
4571
4581
|
if (unpaddedMax < 0) {
|
|
@@ -4581,21 +4591,36 @@ function contentFitFeature() {
|
|
|
4581
4591
|
const settle = () => {
|
|
4582
4592
|
if (ctx.isDestroyed()) return;
|
|
4583
4593
|
const size = ctx.getSize();
|
|
4584
|
-
|
|
4585
|
-
|
|
4594
|
+
if (!resting) {
|
|
4595
|
+
unpaddedMax = -1;
|
|
4596
|
+
follow(size);
|
|
4597
|
+
}
|
|
4586
4598
|
inset = hiddenAt(size);
|
|
4587
|
-
|
|
4599
|
+
put(INSET_VAR, inset);
|
|
4600
|
+
put(SIZE_VAR, size);
|
|
4601
|
+
put(CAP_VAR, ctx.getMaxAxisSize());
|
|
4602
|
+
if (!resting) {
|
|
4603
|
+
resting = true;
|
|
4604
|
+
sheet.setAttribute(FIT_ATTR, "rest");
|
|
4605
|
+
}
|
|
4588
4606
|
unpaddedMax = -1;
|
|
4589
4607
|
};
|
|
4608
|
+
const move = (size) => {
|
|
4609
|
+
if (resting) {
|
|
4610
|
+
resting = false;
|
|
4611
|
+
sheet.setAttribute(FIT_ATTR, "moving");
|
|
4612
|
+
put(LIFT_VAR, scroller.offsetHeight);
|
|
4613
|
+
}
|
|
4614
|
+
follow(size);
|
|
4615
|
+
};
|
|
4590
4616
|
const moving = () => ctx.isAnimating() || ctx.isDragging();
|
|
4591
4617
|
const whenIdle = () => {
|
|
4592
4618
|
if (!moving()) settle();
|
|
4593
4619
|
};
|
|
4594
|
-
sheet.setAttribute(FIT_ATTR, "");
|
|
4595
4620
|
settle();
|
|
4596
4621
|
const offProgress = ctx.on(
|
|
4597
4622
|
"progress",
|
|
4598
|
-
(p) => moving() ?
|
|
4623
|
+
(p) => moving() ? move(p.size) : settle()
|
|
4599
4624
|
);
|
|
4600
4625
|
const offSnap = ctx.on("snap", settle);
|
|
4601
4626
|
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(whenIdle);
|
|
@@ -4607,15 +4632,20 @@ function contentFitFeature() {
|
|
|
4607
4632
|
observer?.disconnect();
|
|
4608
4633
|
window.removeEventListener("orientationchange", whenIdle);
|
|
4609
4634
|
sheet.removeAttribute(FIT_ATTR);
|
|
4610
|
-
|
|
4635
|
+
for (const name of [INSET_VAR, CAP_VAR, LIFT_VAR]) {
|
|
4636
|
+
sheet.style.removeProperty(name);
|
|
4637
|
+
}
|
|
4611
4638
|
};
|
|
4612
4639
|
}
|
|
4613
4640
|
};
|
|
4614
4641
|
}
|
|
4615
|
-
var INSET_VAR, FIT_ATTR;
|
|
4642
|
+
var INSET_VAR, SIZE_VAR, CAP_VAR, LIFT_VAR, FIT_ATTR;
|
|
4616
4643
|
var init_content_fit = __esm({
|
|
4617
4644
|
"src/core/features/content-fit.ts"() {
|
|
4618
4645
|
INSET_VAR = "--bs-content-inset";
|
|
4646
|
+
SIZE_VAR = "--bs-size";
|
|
4647
|
+
CAP_VAR = "--bs-max-size";
|
|
4648
|
+
LIFT_VAR = "--bs-footer-lift-max";
|
|
4619
4649
|
FIT_ATTR = "data-bs-fit-content";
|
|
4620
4650
|
}
|
|
4621
4651
|
});
|
|
@@ -4659,7 +4689,7 @@ var init_BottomSheetEngine = __esm({
|
|
|
4659
4689
|
var baseStyles;
|
|
4660
4690
|
var init_baseStyles = __esm({
|
|
4661
4691
|
"src/web-component/baseStyles.ts"() {
|
|
4662
|
-
baseStyles = `:where(.bs-root){--bs-surface-d:#ffffff;--bs-surface-border-d:rgba(225,227,237,1);--bs-radius-d:20px;--bs-handle-color-d:rgba(26,22,20,0.3);--bs-handle-width:40px;--bs-handle-height:5px;--bs-z-backdrop:90;--bs-z-sheet:100;--bs-backdrop-color-d:rgba(0,0,0,0.5);--bs-scrim-color-d:transparent;--bs-scrim-blur:0px;--bs-z-scrim:calc(var(--bs-z-sheet) - 1);--bs-size:0px;--bs-progress:0}.bs-backdrop{position:fixed;inset:0;background:var(--bs-backdrop-color,var(--bs-backdrop-color-d));opacity:0;pointer-events:none;z-index:var(--bs-z-backdrop);transition:opacity 0.24s cubic-bezier(0.22,1,0.36,1);will-change:opacity}.bs-root[data-dragging="true"] .bs-backdrop,.bs-root[data-animating="true"] .bs-backdrop{transition:none}.bs-sheet{position:fixed;background:var(--bs-surface,var(--bs-surface-d));box-shadow:var(--bs-shadow,var(--bs-shadow-auto,none));--bs-shadow-fade:clamp(0,calc(var(--bs-progress,0) * 8),1);z-index:var(--bs-z-sheet);pointer-events:auto;overflow:hidden;display:flex;flex-direction:column;-webkit-tap-highlight-color:transparent;user-select:none;overscroll-behavior:contain}.bs-sheet[data-mode="bottom"]{left:0;right:0;bottom:0;width:100%;border-top-left-radius:var(--bs-radius,var(--bs-radius-d));border-top-right-radius:var(--bs-radius,var(--bs-radius-d));border-top:1px solid var(--bs-surface-border,var(--bs-surface-border-d));padding-bottom:env(safe-area-inset-bottom);--bs-shadow-auto:0 calc(var(--bs-progress,0) * -2px - 3px) calc(var(--bs-progress,0) * 18px + 12px) rgba( 0,0,0,calc(var(--bs-shadow-fade) * (var(--bs-progress,0) * 0.15 + 0.12)) )}.bs-sheet[data-mode="top"]{left:0;right:0;top:0;width:100%;border-bottom-left-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-right-radius:var(--bs-radius,var(--bs-radius-d));border-bottom:1px solid var(--bs-surface-border,var(--bs-surface-border-d));flex-direction:column-reverse;--bs-shadow-auto:0 3px 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12));padding-top:env(safe-area-inset-top)}.bs-sheet[data-mode="left"]{top:0;bottom:0;left:0;height:100%;border-top-right-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-right-radius:var(--bs-radius,var(--bs-radius-d));border-right:1px solid var(--bs-surface-border,var(--bs-surface-border-d));--bs-shadow-auto:3px 0 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12))}.bs-sheet[data-mode="right"]{top:0;bottom:0;right:0;height:100%;border-top-left-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-left-radius:var(--bs-radius,var(--bs-radius-d));border-left:1px solid var(--bs-surface-border,var(--bs-surface-border-d));--bs-shadow-auto:-3px 0 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12))}.bs-sheet[data-bs-rest="closed"]{box-shadow:none;visibility:hidden}.bs-sheet[data-bs-webgl="on"],.bs-sheet[data-bs-webgl="on"] .bs-handle,.bs-sheet[data-bs-webgl="on"] .bs-header,.bs-sheet[data-bs-webgl="on"] .bs-footer{background:transparent;box-shadow:none}.bs-sheet[data-mode="left"] .bs-content{padding-right:36px}.bs-sheet[data-mode="right"] .bs-content{padding-left:36px}.bs-handle{flex-shrink:0;min-height:44px;display:flex;flex-direction:column;justify-content:center;padding:var(--bs-handle-padding,8px 16px 4px);cursor:grab;touch-action:none;user-select:none;background:var(--bs-surface,var(--bs-surface-d));-webkit-tap-highlight-color:transparent;outline:none;position:relative}.bs-handle:active{cursor:grabbing}.bs-handle:focus-visible{outline:2px solid currentColor;outline-offset:-2px;border-radius:var(--bs-radius,var(--bs-radius-d))}.bs-handle::before{content:"";display:block;width:var(--bs-handle-width);height:var(--bs-handle-height);background:var(--bs-handle-color,var(--bs-handle-color-d));border-radius:calc(var(--bs-handle-height) / 2);margin:0 auto 8px;transition:width 0.15s ease,background 0.15s ease,transform 0.15s ease;pointer-events:none}.bs-sheet[data-mode="left"] .bs-handle,.bs-sheet[data-mode="right"] .bs-handle{position:absolute;top:0;bottom:0;width:28px;min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;background:var(--bs-surface,var(--bs-surface-d));z-index:1;overflow:hidden}.bs-sheet[data-mode="left"] .bs-handle>*,.bs-sheet[data-mode="right"] .bs-handle>*{display:none}.bs-sheet[data-mode="left"] .bs-handle{right:0;border-left:1px solid var(--bs-surface-border,var(--bs-surface-border-d))}.bs-sheet[data-mode="right"] .bs-handle{left:0;border-right:1px solid var(--bs-surface-border,var(--bs-surface-border-d))}.bs-sheet[data-mode="left"] .bs-handle::before,.bs-sheet[data-mode="right"] .bs-handle::before{width:var(--bs-handle-height);height:var(--bs-handle-width);margin:0}.bs-sheet:hover .bs-handle::before{background:color-mix(in oklab,var(--bs-handle-color,var(--bs-handle-color-d)),#000 15%)}.bs-handle:active::before{background:color-mix(in oklab,var(--bs-handle-color,var(--bs-handle-color-d)),#000 35%);transform:scaleX(1.15)}.bs-handle.bs-handle--ticks::after{content:"";display:block;position:absolute;left:50%;bottom:6px;transform:translateX(-50%);width:calc(var(--bs-handle-width) * 2);height:3px;background-image:radial-gradient( circle,var(--bs-handle-color,var(--bs-handle-color-d)) 0 1.5px,transparent 1.6px );background-size:8px 3px;background-repeat:repeat-x;background-position:center;opacity:0;transition:opacity 0.18s ease-out;pointer-events:none}.bs-root[data-dragging="true"] .bs-handle.bs-handle--ticks::after{opacity:0.4}.bs-sheet[data-mode="top"] .bs-handle.bs-handle--ticks::after{bottom:auto;top:6px}.bs-sheet[data-mode="left"] .bs-handle.bs-handle--ticks::after,.bs-sheet[data-mode="right"] .bs-handle.bs-handle--ticks::after{left:50%;top:50%;bottom:auto;transform:translate(-50%,-50%);width:3px;height:calc(var(--bs-handle-width) * 2);background-size:3px 8px;background-repeat:repeat-y;margin-left:calc(var(--bs-handle-height) + 6px)}.bs-sheet[data-mode="right"] .bs-handle.bs-handle--ticks::after{margin-left:calc(-1 * (var(--bs-handle-height) + 6px))}.bs-header{flex:0 0 auto;min-height:var(--bs-header-min-height,0px);padding:var(--bs-header-padding,0 16px 8px);background:var(--bs-surface,var(--bs-surface-d))}.bs-content{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;user-select:text;padding:var(--bs-content-padding,0 16px 16px)}.bs-sheet[data-bs-fit-content] .bs-content{scroll-padding-bottom:var(--bs-content-inset,0px)}.bs-sheet[data-bs-fit-content] .bs-content::after{content:"";display:block;flex:none;height:var(--bs-content-inset,0px)}.bs-footer{flex:0 0 auto;padding:var(--bs-footer-padding,12px 16px calc(12px + env(safe-area-inset-bottom)));border-top:1px solid var(--bs-surface-border,var(--bs-surface-border-d));background:var(--bs-surface,var(--bs-surface-d))}.bs-sheet[data-mode="bottom"]:has(.bs-footer:not([hidden]):has(*)){padding-bottom:0}.bs-header:not(:has(*)),.bs-footer:not(:has(*)),.bs-header[hidden],.bs-footer[hidden]{display:none}.bs-screen{position:absolute;inset:0;pointer-events:none;z-index:var(--bs-z-scrim);background:var(--bs-scrim-color,var(--bs-scrim-color-d));backdrop-filter:blur(var(--bs-scrim-blur,0px));-webkit-backdrop-filter:blur(var(--bs-scrim-blur,0px));transition:opacity 0.24s cubic-bezier(0.22,1,0.36,1);will-change:opacity}.bs-root[data-dragging="true"] .bs-screen,.bs-root[data-animating="true"] .bs-screen{transition:none}.bs-scrim-overlay{z-index:calc(var(--bs-z-sheet) + 1);pointer-events:none}.bs-button-slot{position:fixed;z-index:calc(var(--bs-z-sheet) + 1);pointer-events:auto}.bs-button-slot[data-side="left"]{left:16px;bottom:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-side="right"]{right:16px;bottom:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-mode="top"]{bottom:auto;top:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-mode="left"]{left:calc(var(--bs-size,0px) + 12px);right:auto;bottom:auto;top:16px}.bs-button-slot[data-mode="right"]{right:calc(var(--bs-size,0px) + 12px);left:auto;bottom:auto;top:16px}@media (prefers-reduced-motion:reduce){.bs-backdrop,.bs-handle::before,.bs-button-slot[data-side="left"],.bs-button-slot[data-side="right"]{transition:none !important}}@media (prefers-color-scheme:dark){:where(.bs-root){--bs-surface-d:#1a1a1d;--bs-surface-border-d:rgba(255,255,255,0.08);--bs-handle-color-d:rgba(255,255,255,0.45);--bs-shadow-auto:0 -3px 16px rgba(0,0,0,0.5)}}@media (forced-colors:active){.bs-sheet{border:1px solid CanvasText}.bs-handle::before{background:CanvasText;forced-color-adjust:none}.bs-backdrop,.bs-screen{forced-color-adjust:none}}.bs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:where(.ovl-root){--ovl-surface:var(--bs-surface,var(--bs-surface-d,#ffffff));--ovl-surface-border:var(--bs-surface-border,var(--bs-surface-border-d,rgba(0,0,0,0.08)));--ovl-shadow:0 -8px 40px rgba(0,0,0,0.35);--ovl-radius:var(--bs-radius,var(--bs-radius-d,20px));--ovl-backdrop-color:rgba(0,0,0,0.5);--ovl-z-backdrop:200;--ovl-z-panel:201}.ovl-backdrop{position:fixed;inset:0;background:var(--ovl-backdrop-color);opacity:0;pointer-events:none;z-index:var(--ovl-z-backdrop)}.ovl-panel{position:fixed;background:var(--ovl-surface);box-shadow:var(--ovl-shadow);z-index:var(--ovl-z-panel);-webkit-tap-highlight-color:transparent;outline:none;transition:transform 0.32s cubic-bezier(0.29,1.24,0.84,0.99),opacity 0.32s ease-out}.ovl-panel[data-state="open"]{transform:translate3d(0,0,0);opacity:1}@starting-style{.ovl-panel[data-edge="bottom"][data-state="open"]{transform:translate3d(0,100%,0);opacity:0}.ovl-panel[data-edge="top"][data-state="open"]{transform:translate3d(0,-100%,0);opacity:0}.ovl-panel[data-edge="left"][data-state="open"]{transform:translate3d(-100%,0,0);opacity:0}.ovl-panel[data-edge="right"][data-state="open"]{transform:translate3d(100%,0,0);opacity:0}}.ovl-panel[data-edge="bottom"]{left:0;right:0;bottom:0;width:100%;border-top-left-radius:var(--ovl-radius);border-top-right-radius:var(--ovl-radius);border-top:1px solid var(--ovl-surface-border);padding-bottom:env(safe-area-inset-bottom)}.ovl-panel[data-edge="top"]{left:0;right:0;top:0;width:100%;border-bottom-left-radius:var(--ovl-radius);border-bottom-right-radius:var(--ovl-radius);border-bottom:1px solid var(--ovl-surface-border);padding-top:env(safe-area-inset-top)}.ovl-panel[data-edge="left"]{top:0;bottom:0;left:0;height:100%;border-top-right-radius:var(--ovl-radius);border-bottom-right-radius:var(--ovl-radius);border-right:1px solid var(--ovl-surface-border)}.ovl-panel[data-edge="right"]{top:0;bottom:0;right:0;height:100%;border-top-left-radius:var(--ovl-radius);border-bottom-left-radius:var(--ovl-radius);border-left:1px solid var(--ovl-surface-border)}@media (prefers-reduced-motion:reduce){.ovl-panel,.ovl-backdrop{transition:none !important}}`;
|
|
4692
|
+
baseStyles = `:where(.bs-root){--bs-surface-d:#ffffff;--bs-surface-border-d:rgba(225,227,237,1);--bs-radius-d:20px;--bs-handle-color-d:rgba(26,22,20,0.3);--bs-handle-width:40px;--bs-handle-height:5px;--bs-z-backdrop:90;--bs-z-sheet:100;--bs-backdrop-color-d:rgba(0,0,0,0.5);--bs-scrim-color-d:transparent;--bs-scrim-blur:0px;--bs-z-scrim:calc(var(--bs-z-sheet) - 1);--bs-size:0px;--bs-progress:0}.bs-backdrop{position:fixed;inset:0;background:var(--bs-backdrop-color,var(--bs-backdrop-color-d));opacity:0;pointer-events:none;z-index:var(--bs-z-backdrop);transition:opacity 0.24s cubic-bezier(0.22,1,0.36,1);will-change:opacity}.bs-root[data-dragging="true"] .bs-backdrop,.bs-root[data-animating="true"] .bs-backdrop{transition:none}.bs-sheet{position:fixed;background:var(--bs-surface,var(--bs-surface-d));box-shadow:var(--bs-shadow,var(--bs-shadow-auto,none));--bs-shadow-fade:clamp(0,calc(var(--bs-progress,0) * 8),1);z-index:var(--bs-z-sheet);pointer-events:auto;overflow:hidden;display:flex;flex-direction:column;-webkit-tap-highlight-color:transparent;user-select:none;overscroll-behavior:contain}.bs-sheet[data-mode="bottom"]{left:0;right:0;bottom:0;width:100%;border-top-left-radius:var(--bs-radius,var(--bs-radius-d));border-top-right-radius:var(--bs-radius,var(--bs-radius-d));border-top:1px solid var(--bs-surface-border,var(--bs-surface-border-d));padding-bottom:env(safe-area-inset-bottom);--bs-shadow-auto:0 calc(var(--bs-progress,0) * -2px - 3px) calc(var(--bs-progress,0) * 18px + 12px) rgba( 0,0,0,calc(var(--bs-shadow-fade) * (var(--bs-progress,0) * 0.15 + 0.12)) )}.bs-sheet[data-mode="top"]{left:0;right:0;top:0;width:100%;border-bottom-left-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-right-radius:var(--bs-radius,var(--bs-radius-d));border-bottom:1px solid var(--bs-surface-border,var(--bs-surface-border-d));flex-direction:column-reverse;--bs-shadow-auto:0 3px 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12));padding-top:env(safe-area-inset-top)}.bs-sheet[data-mode="left"]{top:0;bottom:0;left:0;height:100%;border-top-right-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-right-radius:var(--bs-radius,var(--bs-radius-d));border-right:1px solid var(--bs-surface-border,var(--bs-surface-border-d));--bs-shadow-auto:3px 0 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12))}.bs-sheet[data-mode="right"]{top:0;bottom:0;right:0;height:100%;border-top-left-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-left-radius:var(--bs-radius,var(--bs-radius-d));border-left:1px solid var(--bs-surface-border,var(--bs-surface-border-d));--bs-shadow-auto:-3px 0 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12))}.bs-sheet[data-bs-rest="closed"]{box-shadow:none;visibility:hidden}.bs-sheet[data-bs-webgl="on"],.bs-sheet[data-bs-webgl="on"] .bs-handle,.bs-sheet[data-bs-webgl="on"] .bs-header,.bs-sheet[data-bs-webgl="on"] .bs-footer{background:transparent;box-shadow:none}.bs-sheet[data-mode="left"] .bs-content{padding-right:36px}.bs-sheet[data-mode="right"] .bs-content{padding-left:36px}.bs-handle{flex-shrink:0;min-height:44px;display:flex;flex-direction:column;justify-content:center;padding:var(--bs-handle-padding,8px 16px 4px);cursor:grab;touch-action:none;user-select:none;background:var(--bs-surface,var(--bs-surface-d));-webkit-tap-highlight-color:transparent;outline:none;position:relative}.bs-handle:active{cursor:grabbing}.bs-handle:focus-visible{outline:2px solid currentColor;outline-offset:-2px;border-radius:var(--bs-radius,var(--bs-radius-d))}.bs-handle::before{content:"";display:block;width:var(--bs-handle-width);height:var(--bs-handle-height);background:var(--bs-handle-color,var(--bs-handle-color-d));border-radius:calc(var(--bs-handle-height) / 2);margin:0 auto 8px;transition:width 0.15s ease,background 0.15s ease,transform 0.15s ease;pointer-events:none}.bs-sheet[data-mode="left"] .bs-handle,.bs-sheet[data-mode="right"] .bs-handle{position:absolute;top:0;bottom:0;width:28px;min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;background:var(--bs-surface,var(--bs-surface-d));z-index:1;overflow:hidden}.bs-sheet[data-mode="left"] .bs-handle>*,.bs-sheet[data-mode="right"] .bs-handle>*{display:none}.bs-sheet[data-mode="left"] .bs-handle{right:0;border-left:1px solid var(--bs-surface-border,var(--bs-surface-border-d))}.bs-sheet[data-mode="right"] .bs-handle{left:0;border-right:1px solid var(--bs-surface-border,var(--bs-surface-border-d))}.bs-sheet[data-mode="left"] .bs-handle::before,.bs-sheet[data-mode="right"] .bs-handle::before{width:var(--bs-handle-height);height:var(--bs-handle-width);margin:0}.bs-sheet:hover .bs-handle::before{background:color-mix(in oklab,var(--bs-handle-color,var(--bs-handle-color-d)),#000 15%)}.bs-handle:active::before{background:color-mix(in oklab,var(--bs-handle-color,var(--bs-handle-color-d)),#000 35%);transform:scaleX(1.15)}.bs-handle.bs-handle--ticks::after{content:"";display:block;position:absolute;left:50%;bottom:6px;transform:translateX(-50%);width:calc(var(--bs-handle-width) * 2);height:3px;background-image:radial-gradient( circle,var(--bs-handle-color,var(--bs-handle-color-d)) 0 1.5px,transparent 1.6px );background-size:8px 3px;background-repeat:repeat-x;background-position:center;opacity:0;transition:opacity 0.18s ease-out;pointer-events:none}.bs-root[data-dragging="true"] .bs-handle.bs-handle--ticks::after{opacity:0.4}.bs-sheet[data-mode="top"] .bs-handle.bs-handle--ticks::after{bottom:auto;top:6px}.bs-sheet[data-mode="left"] .bs-handle.bs-handle--ticks::after,.bs-sheet[data-mode="right"] .bs-handle.bs-handle--ticks::after{left:50%;top:50%;bottom:auto;transform:translate(-50%,-50%);width:3px;height:calc(var(--bs-handle-width) * 2);background-size:3px 8px;background-repeat:repeat-y;margin-left:calc(var(--bs-handle-height) + 6px)}.bs-sheet[data-mode="right"] .bs-handle.bs-handle--ticks::after{margin-left:calc(-1 * (var(--bs-handle-height) + 6px))}.bs-header{flex:0 0 auto;min-height:var(--bs-header-min-height,0px);padding:var(--bs-header-padding,0 16px 8px);background:var(--bs-surface,var(--bs-surface-d))}.bs-content{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;user-select:text;padding:var(--bs-content-padding,0 16px 16px)}.bs-sheet[data-bs-fit-content="moving"] .bs-content,.bs-sheet[data-bs-fit-content][data-bs-webgl="on"] .bs-content{scroll-padding-bottom:var(--bs-content-inset,0px)}.bs-sheet[data-bs-fit-content="moving"] .bs-content::after,.bs-sheet[data-bs-fit-content][data-bs-webgl="on"] .bs-content::after{content:"";display:block;flex:none;height:var(--bs-content-inset,0px)}.bs-sheet[data-bs-fit-content="rest"][data-mode="bottom"]:not([data-bs-webgl="on"])::after{content:"";flex:0 1 max(0px,var(--bs-max-size,0px) - var(--bs-size,0px))}.bs-footer{flex:0 0 auto;padding:var(--bs-footer-padding,12px 16px calc(12px + env(safe-area-inset-bottom)));border-top:1px solid var(--bs-surface-border,var(--bs-surface-border-d));background:var(--bs-surface,var(--bs-surface-d))}.bs-sheet[data-bs-fit-content="moving"][data-mode="bottom"]:not([data-bs-webgl="on"]) .bs-footer{transform:translateY( clamp( calc(-1 * var(--bs-footer-lift-max,0px)),calc(var(--bs-size,0px) - var(--bs-max-size,0px)),0px ) )}.bs-sheet[data-mode="bottom"]:has(.bs-footer:not([hidden]):has(*)){padding-bottom:0}.bs-header:not(:has(*)),.bs-footer:not(:has(*)),.bs-header[hidden],.bs-footer[hidden]{display:none}.bs-screen{position:absolute;inset:0;pointer-events:none;z-index:var(--bs-z-scrim);background:var(--bs-scrim-color,var(--bs-scrim-color-d));backdrop-filter:blur(var(--bs-scrim-blur,0px));-webkit-backdrop-filter:blur(var(--bs-scrim-blur,0px));transition:opacity 0.24s cubic-bezier(0.22,1,0.36,1);will-change:opacity}.bs-root[data-dragging="true"] .bs-screen,.bs-root[data-animating="true"] .bs-screen{transition:none}.bs-scrim-overlay{z-index:calc(var(--bs-z-sheet) + 1);pointer-events:none}.bs-button-slot{position:fixed;z-index:calc(var(--bs-z-sheet) + 1);pointer-events:auto}.bs-button-slot[data-side="left"]{left:16px;bottom:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-side="right"]{right:16px;bottom:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-mode="top"]{bottom:auto;top:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-mode="left"]{left:calc(var(--bs-size,0px) + 12px);right:auto;bottom:auto;top:16px}.bs-button-slot[data-mode="right"]{right:calc(var(--bs-size,0px) + 12px);left:auto;bottom:auto;top:16px}@media (prefers-reduced-motion:reduce){.bs-backdrop,.bs-handle::before,.bs-button-slot[data-side="left"],.bs-button-slot[data-side="right"]{transition:none !important}}@media (prefers-color-scheme:dark){:where(.bs-root){--bs-surface-d:#1a1a1d;--bs-surface-border-d:rgba(255,255,255,0.08);--bs-handle-color-d:rgba(255,255,255,0.45);--bs-shadow-auto:0 -3px 16px rgba(0,0,0,0.5)}}@media (forced-colors:active){.bs-sheet{border:1px solid CanvasText}.bs-handle::before{background:CanvasText;forced-color-adjust:none}.bs-backdrop,.bs-screen{forced-color-adjust:none}}.bs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:where(.ovl-root){--ovl-surface:var(--bs-surface,var(--bs-surface-d,#ffffff));--ovl-surface-border:var(--bs-surface-border,var(--bs-surface-border-d,rgba(0,0,0,0.08)));--ovl-shadow:0 -8px 40px rgba(0,0,0,0.35);--ovl-radius:var(--bs-radius,var(--bs-radius-d,20px));--ovl-backdrop-color:rgba(0,0,0,0.5);--ovl-z-backdrop:200;--ovl-z-panel:201}.ovl-backdrop{position:fixed;inset:0;background:var(--ovl-backdrop-color);opacity:0;pointer-events:none;z-index:var(--ovl-z-backdrop)}.ovl-panel{position:fixed;background:var(--ovl-surface);box-shadow:var(--ovl-shadow);z-index:var(--ovl-z-panel);-webkit-tap-highlight-color:transparent;outline:none;transition:transform 0.32s cubic-bezier(0.29,1.24,0.84,0.99),opacity 0.32s ease-out}.ovl-panel[data-state="open"]{transform:translate3d(0,0,0);opacity:1}@starting-style{.ovl-panel[data-edge="bottom"][data-state="open"]{transform:translate3d(0,100%,0);opacity:0}.ovl-panel[data-edge="top"][data-state="open"]{transform:translate3d(0,-100%,0);opacity:0}.ovl-panel[data-edge="left"][data-state="open"]{transform:translate3d(-100%,0,0);opacity:0}.ovl-panel[data-edge="right"][data-state="open"]{transform:translate3d(100%,0,0);opacity:0}}.ovl-panel[data-edge="bottom"]{left:0;right:0;bottom:0;width:100%;border-top-left-radius:var(--ovl-radius);border-top-right-radius:var(--ovl-radius);border-top:1px solid var(--ovl-surface-border);padding-bottom:env(safe-area-inset-bottom)}.ovl-panel[data-edge="top"]{left:0;right:0;top:0;width:100%;border-bottom-left-radius:var(--ovl-radius);border-bottom-right-radius:var(--ovl-radius);border-bottom:1px solid var(--ovl-surface-border);padding-top:env(safe-area-inset-top)}.ovl-panel[data-edge="left"]{top:0;bottom:0;left:0;height:100%;border-top-right-radius:var(--ovl-radius);border-bottom-right-radius:var(--ovl-radius);border-right:1px solid var(--ovl-surface-border)}.ovl-panel[data-edge="right"]{top:0;bottom:0;right:0;height:100%;border-top-left-radius:var(--ovl-radius);border-bottom-left-radius:var(--ovl-radius);border-left:1px solid var(--ovl-surface-border)}@media (prefers-reduced-motion:reduce){.ovl-panel,.ovl-backdrop{transition:none !important}}`;
|
|
4663
4693
|
}
|
|
4664
4694
|
});
|
|
4665
4695
|
|