@galaxy-io/dls 2.11.0 → 2.11.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/dist/layout/ScrollArea.js +13 -4
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -49,10 +49,19 @@ var SCROLL_AREA_ORIENTATION_TO_SCROLLBAR_CSS_MAP = {
|
|
|
49
49
|
[Orientation.VERTICAL]: "gx-ScrollArea-Orientation_VERTICAL-o174c7co",
|
|
50
50
|
[Orientation.HORIZONTAL]: "gx-ScrollArea-Orientation_HORIZONTAL-okpbxfy"
|
|
51
51
|
};
|
|
52
|
-
/** The 4px thumb, a quiet neutral on every surface
|
|
52
|
+
/** The 4px thumb, a quiet neutral on every surface. */
|
|
53
53
|
var THUMB_CSS = "gx-ScrollArea-THUMB_CSS-tzpebzb";
|
|
54
|
+
/**
|
|
55
|
+
* The thumb's 24px pointer target (`::before`), anchored to the track's outer edge (the root's
|
|
56
|
+
* edge) and growing inward over the content, so it never leaves the root and never adds overflow to
|
|
57
|
+
* a scrolling parent. Along the track it matches the thumb.
|
|
58
|
+
*/
|
|
59
|
+
var SCROLL_AREA_ORIENTATION_TO_THUMB_CSS_MAP = {
|
|
60
|
+
[Orientation.VERTICAL]: "gx-ScrollArea-Orientation_VERTICAL-o1otan2y",
|
|
61
|
+
[Orientation.HORIZONTAL]: "gx-ScrollArea-Orientation_HORIZONTAL-o1rdgqrq"
|
|
62
|
+
};
|
|
54
63
|
/** Where the two scrollbars meet. */
|
|
55
|
-
var CORNER_CSS = "gx-ScrollArea-CORNER_CSS-
|
|
64
|
+
var CORNER_CSS = "gx-ScrollArea-CORNER_CSS-c1pufd3e";
|
|
56
65
|
/** Reads the viewport's scroll geometry into edge flags. */
|
|
57
66
|
function measureEdges(viewport, canScrollHorizontally) {
|
|
58
67
|
const { scrollTop, scrollHeight, clientHeight, scrollWidth, clientWidth } = viewport;
|
|
@@ -122,12 +131,12 @@ var ScrollArea = forwardRef(function ScrollArea({ children, canScrollHorizontall
|
|
|
122
131
|
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Scrollbar, {
|
|
123
132
|
orientation: "vertical",
|
|
124
133
|
className: SCROLL_AREA_ORIENTATION_TO_SCROLLBAR_CSS_MAP[Orientation.VERTICAL],
|
|
125
|
-
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.Thumb, { className: THUMB_CSS })
|
|
134
|
+
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.Thumb, { className: cx(THUMB_CSS, SCROLL_AREA_ORIENTATION_TO_THUMB_CSS_MAP[Orientation.VERTICAL]) })
|
|
126
135
|
}),
|
|
127
136
|
canScrollHorizontally && /* @__PURE__ */ jsx(ScrollAreaPrimitive.Scrollbar, {
|
|
128
137
|
orientation: "horizontal",
|
|
129
138
|
className: SCROLL_AREA_ORIENTATION_TO_SCROLLBAR_CSS_MAP[Orientation.HORIZONTAL],
|
|
130
|
-
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.Thumb, { className: THUMB_CSS })
|
|
139
|
+
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.Thumb, { className: cx(THUMB_CSS, SCROLL_AREA_ORIENTATION_TO_THUMB_CSS_MAP[Orientation.HORIZONTAL]) })
|
|
131
140
|
}),
|
|
132
141
|
canScrollHorizontally && /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, { className: CORNER_CSS })
|
|
133
142
|
]
|