@rettangoli/ui 1.0.11 → 1.0.13
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rettangoli/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "A UI component library for building web interfaces.",
|
|
5
5
|
"main": "dist/rettangoli-esm.min.js",
|
|
6
6
|
"type": "module",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"build": "rtgl fe build -o ./.generated/fe-entry.js && bun run esbuild.js && bun run esbuild-dev.js && npm run copy:css",
|
|
38
38
|
"prepack": "npm run build",
|
|
39
39
|
"vt:generate": "bun run build:dev && rtgl vt generate",
|
|
40
|
-
"vt:docker": "bun run build:dev && bash -lc 'IMAGE=\"han4wluc/rtgl:playwright-v1.57.0-rtgl-v1.0.
|
|
40
|
+
"vt:docker": "bun run build:dev && bash -lc 'IMAGE=\"han4wluc/rtgl:playwright-v1.57.0-rtgl-v1.0.10\"; docker pull \"$IMAGE\" >/dev/null 2>&1; docker run --rm --user $(id -u):$(id -g) -v \"$PWD:/app\" -w /app \"$IMAGE\" rtgl vt screenshot'",
|
|
41
41
|
"vt:report": "bun run vt:docker && rtgl vt report",
|
|
42
42
|
"vt:accept": "rtgl vt accept",
|
|
43
43
|
"serve": "bunx serve .rettangoli/vt/_site"
|
package/src/primitives/grid.js
CHANGED
|
@@ -184,11 +184,14 @@ class RettangoliGridElement extends HTMLElement {
|
|
|
184
184
|
const overflow = this.getAttribute(addSizePrefix("overflow"));
|
|
185
185
|
|
|
186
186
|
if (scrollHorizontal && scrollVertical) {
|
|
187
|
-
this._styles[size].overflow = "
|
|
187
|
+
this._styles[size].overflow = "auto";
|
|
188
|
+
this._styles[size]["scrollbar-gutter"] = "stable";
|
|
188
189
|
} else if (scrollHorizontal) {
|
|
189
|
-
this._styles[size]["overflow-x"] = "
|
|
190
|
+
this._styles[size]["overflow-x"] = "auto";
|
|
191
|
+
this._styles[size]["scrollbar-gutter"] = "stable";
|
|
190
192
|
} else if (scrollVertical) {
|
|
191
|
-
this._styles[size]["overflow-y"] = "
|
|
193
|
+
this._styles[size]["overflow-y"] = "auto";
|
|
194
|
+
this._styles[size]["scrollbar-gutter"] = "stable";
|
|
192
195
|
}
|
|
193
196
|
|
|
194
197
|
if (overflow === "hidden") {
|
package/src/primitives/view.js
CHANGED
|
@@ -102,9 +102,6 @@ class RettangoliViewElement extends HTMLElement {
|
|
|
102
102
|
"bgs",
|
|
103
103
|
"bgp",
|
|
104
104
|
"bgr",
|
|
105
|
-
"sst",
|
|
106
|
-
"sna",
|
|
107
|
-
"sns",
|
|
108
105
|
"sbh",
|
|
109
106
|
"spi",
|
|
110
107
|
"stg",
|
|
@@ -181,15 +178,6 @@ class RettangoliViewElement extends HTMLElement {
|
|
|
181
178
|
const backgroundRepeat = normalizeRawCssValue(
|
|
182
179
|
this.getAttribute(addSizePrefix("bgr")),
|
|
183
180
|
);
|
|
184
|
-
const scrollSnapType = normalizeRawCssValue(
|
|
185
|
-
this.getAttribute(addSizePrefix("sst")),
|
|
186
|
-
);
|
|
187
|
-
const scrollSnapAlign = normalizeRawCssValue(
|
|
188
|
-
this.getAttribute(addSizePrefix("sna")),
|
|
189
|
-
);
|
|
190
|
-
const scrollSnapStop = normalizeRawCssValue(
|
|
191
|
-
this.getAttribute(addSizePrefix("sns")),
|
|
192
|
-
);
|
|
193
181
|
const scrollBehavior = normalizeRawCssValue(
|
|
194
182
|
this.getAttribute(addSizePrefix("sbh")),
|
|
195
183
|
);
|
|
@@ -228,18 +216,6 @@ class RettangoliViewElement extends HTMLElement {
|
|
|
228
216
|
this._styles[size]["background-repeat"] = backgroundRepeat;
|
|
229
217
|
}
|
|
230
218
|
|
|
231
|
-
if (scrollSnapType !== null) {
|
|
232
|
-
this._styles[size]["scroll-snap-type"] = scrollSnapType;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
if (scrollSnapAlign !== null) {
|
|
236
|
-
this._styles[size]["scroll-snap-align"] = scrollSnapAlign;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
if (scrollSnapStop !== null) {
|
|
240
|
-
this._styles[size]["scroll-snap-stop"] = scrollSnapStop;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
219
|
if (scrollBehavior !== null) {
|
|
244
220
|
this._styles[size]["scroll-behavior"] = scrollBehavior;
|
|
245
221
|
}
|
|
@@ -362,13 +338,16 @@ class RettangoliViewElement extends HTMLElement {
|
|
|
362
338
|
const overflow = this.getAttribute(addSizePrefix("overflow"));
|
|
363
339
|
|
|
364
340
|
if (scrollHorizontal && scrollVertical) {
|
|
365
|
-
this._styles[size]["overflow"] = "
|
|
341
|
+
this._styles[size]["overflow"] = "auto";
|
|
342
|
+
this._styles[size]["scrollbar-gutter"] = "stable";
|
|
366
343
|
this._styles[size]["flex-wrap"] = "nowrap";
|
|
367
344
|
} else if (scrollHorizontal) {
|
|
368
|
-
this._styles[size]["overflow-x"] = "
|
|
345
|
+
this._styles[size]["overflow-x"] = "auto";
|
|
346
|
+
this._styles[size]["scrollbar-gutter"] = "stable";
|
|
369
347
|
this._styles[size]["flex-wrap"] = "nowrap";
|
|
370
348
|
} else if (scrollVertical) {
|
|
371
|
-
this._styles[size]["overflow-y"] = "
|
|
349
|
+
this._styles[size]["overflow-y"] = "auto";
|
|
350
|
+
this._styles[size]["scrollbar-gutter"] = "stable";
|
|
372
351
|
this._styles[size]["flex-wrap"] = "nowrap";
|
|
373
352
|
}
|
|
374
353
|
|
|
@@ -3,17 +3,17 @@ import { css } from '../common.js'
|
|
|
3
3
|
|
|
4
4
|
export default css`
|
|
5
5
|
:host([sh]:not([sv])) {
|
|
6
|
-
overflow-x:
|
|
6
|
+
overflow-x: auto;
|
|
7
7
|
flex-wrap: nowrap;
|
|
8
8
|
min-width: 0;
|
|
9
9
|
}
|
|
10
10
|
:host([sv]:not([sh])) {
|
|
11
|
-
overflow-y:
|
|
11
|
+
overflow-y: auto;
|
|
12
12
|
flex-wrap: nowrap;
|
|
13
13
|
min-height: 0;
|
|
14
14
|
}
|
|
15
15
|
:host([sh][sv]) {
|
|
16
|
-
overflow:
|
|
16
|
+
overflow: auto;
|
|
17
17
|
flex-wrap: nowrap;
|
|
18
18
|
min-height: 0;
|
|
19
19
|
min-width: 0;
|
|
@@ -21,6 +21,7 @@ export default css`
|
|
|
21
21
|
:host([sh]),
|
|
22
22
|
:host([sv]) {
|
|
23
23
|
-ms-overflow-style: auto;
|
|
24
|
+
scrollbar-gutter: stable;
|
|
24
25
|
scrollbar-width: thin;
|
|
25
26
|
scrollbar-color: var(--scrollbar-thumb, var(--muted-foreground)) var(--scrollbar-track, transparent);
|
|
26
27
|
}
|