paris 0.22.0 → 0.22.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# paris
|
|
2
2
|
|
|
3
|
+
## 0.22.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b612946: Fix two issues with `DrawerBottomPanel` slots:
|
|
8
|
+
|
|
9
|
+
- **Border on the wrong slot when panels mount out of priority order.** Separator between portaled slots used an adjacent-sibling selector on the container, which keys off DOM source order while visual ordering is driven by CSS `order` via the `priority` prop. When slots mounted in non-priority order (e.g. one gated on async data), the border landed on the wrong slot. Borders are now applied per slot item so they travel with the element regardless of layout order.
|
|
10
|
+
- **Spacer didn't recompute when a slot registered after initial mount.** The bottom panel's content spacer only observed the outer panel element on initial attach, so late-registering slots (conditional on async data) left the spacer too short and hid scrollable content behind the panel. The effect now re-observes on entry changes, reads `offsetHeight` for an accurate border-box measurement, takes an explicit initial measurement, and observes individual slot items as a safety net.
|
|
11
|
+
|
|
3
12
|
## 0.22.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "paris",
|
|
3
3
|
"author": "Sanil Chawla <sanil@slingshot.fm> (https://sanil.co)",
|
|
4
4
|
"description": "Paris is Slingshot's React design system. It's a collection of reusable components, design tokens, and guidelines that help us build consistent, accessible, and performant user interfaces.",
|
|
5
|
-
"version": "0.22.
|
|
5
|
+
"version": "0.22.1",
|
|
6
6
|
"homepage": "https://paris.slingshot.fm",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|
|
@@ -433,7 +433,6 @@ $panelAnimationDelay: var(--pte-animations-duration-fast);
|
|
|
433
433
|
}
|
|
434
434
|
|
|
435
435
|
.bottomPanel {
|
|
436
|
-
border-top: 1px solid var(--pte-new-colors-borderStrong);
|
|
437
436
|
position: absolute;
|
|
438
437
|
bottom: 0;
|
|
439
438
|
width: 100%;
|
|
@@ -442,16 +441,6 @@ $panelAnimationDelay: var(--pte-animations-duration-fast);
|
|
|
442
441
|
.bottomPanelSlots {
|
|
443
442
|
display: flex;
|
|
444
443
|
flex-direction: column;
|
|
445
|
-
|
|
446
|
-
// Auto-separator between portaled slot items
|
|
447
|
-
> * + * {
|
|
448
|
-
border-top: 1px solid var(--pte-new-colors-borderMedium);
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
// Separator between slots and base bottomPanel content that follows
|
|
452
|
-
&:not(:empty) ~ * {
|
|
453
|
-
border-top: 1px solid var(--pte-new-colors-borderMedium);
|
|
454
|
-
}
|
|
455
444
|
}
|
|
456
445
|
|
|
457
446
|
.bottomPanelContent {
|
|
@@ -464,6 +453,7 @@ $panelAnimationDelay: var(--pte-animations-duration-fast);
|
|
|
464
453
|
}
|
|
465
454
|
|
|
466
455
|
.bottomPanelSlotItem {
|
|
456
|
+
border-top: 1px solid var(--pte-new-colors-borderStrong);
|
|
467
457
|
position: relative;
|
|
468
458
|
padding: 20px;
|
|
469
459
|
}
|
|
@@ -243,17 +243,25 @@ const DrawerInner = <T extends string[] | readonly string[] = string[]>({
|
|
|
243
243
|
// Sync spacer height with absolute-positioned bottom panel so content doesn't get clipped
|
|
244
244
|
const bottomPanelElRef = useRef<HTMLDivElement | null>(null);
|
|
245
245
|
const spacerRef = useRef<HTMLDivElement | null>(null);
|
|
246
|
+
const appendEntries = slotContext?.bottomPanelAppendEntries;
|
|
246
247
|
useEffect(() => {
|
|
247
248
|
if (!showBottomPanel) return;
|
|
248
249
|
const panel = bottomPanelElRef.current;
|
|
249
250
|
const spacer = spacerRef.current;
|
|
250
251
|
if (!panel || !spacer) return;
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
|
|
253
|
+
const update = () => {
|
|
254
|
+
spacer.style.height = `${panel.offsetHeight}px`;
|
|
255
|
+
};
|
|
256
|
+
update();
|
|
257
|
+
|
|
258
|
+
const observer = new ResizeObserver(update);
|
|
254
259
|
observer.observe(panel);
|
|
260
|
+
for (const child of panel.querySelectorAll<HTMLElement>('[data-slot-mode]')) {
|
|
261
|
+
observer.observe(child);
|
|
262
|
+
}
|
|
255
263
|
return () => observer.disconnect();
|
|
256
|
-
}, [showBottomPanel]);
|
|
264
|
+
}, [showBottomPanel, appendEntries]);
|
|
257
265
|
|
|
258
266
|
const [loadedPage, setLoadedPage] = useState<string | null>(pagination?.currentPage ?? null);
|
|
259
267
|
|