@lavalogic/scoria 0.37.47 → 0.37.48

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.
@@ -203,6 +203,12 @@
203
203
  border-radius: 0.1875rem;
204
204
  border: none;
205
205
  padding: 0;
206
+ --input-border: initial;
207
+ --input-height: initial;
208
+ --input-width: initial;
209
+ --input-min-width: initial;
210
+ --sv-border: initial;
211
+ --sv-min-height: initial;
206
212
  }
207
213
  dialog::backdrop {
208
214
  background: rgba(0, 0, 0, 0.3);
@@ -133,6 +133,12 @@
133
133
  border-radius: 0.1875rem;
134
134
  border: none;
135
135
  padding: 0;
136
+ --input-border: initial;
137
+ --input-height: initial;
138
+ --input-width: initial;
139
+ --input-min-width: initial;
140
+ --sv-border: initial;
141
+ --sv-min-height: initial;
136
142
  }
137
143
  dialog::backdrop {
138
144
  background: rgba(0, 0, 0, 0.3);
@@ -53,6 +53,12 @@
53
53
  border-radius: 0.1875rem;
54
54
  border: none;
55
55
  padding: 0;
56
+ --input-border: initial;
57
+ --input-height: initial;
58
+ --input-width: initial;
59
+ --input-min-width: initial;
60
+ --sv-border: initial;
61
+ --sv-min-height: initial;
56
62
  }
57
63
  dialog::backdrop {
58
64
  background: rgba(0, 0, 0, 0.3);
@@ -266,6 +266,12 @@
266
266
  border-radius: 0.1875rem;
267
267
  border: none;
268
268
  padding: 0;
269
+ --input-border: initial;
270
+ --input-height: initial;
271
+ --input-width: initial;
272
+ --input-min-width: initial;
273
+ --sv-border: initial;
274
+ --sv-min-height: initial;
269
275
  }
270
276
  dialog::backdrop {
271
277
  background: rgba(0, 0, 0, 0.3);
@@ -2,6 +2,7 @@
2
2
 
3
3
  <script lang="ts">
4
4
  import { dev } from '$app/environment';
5
+ import { resolve } from '$app/paths';
5
6
  import { page } from '$app/state';
6
7
  import { useAsyncFlag } from '../../Helpers/AsyncFlag.svelte.js';
7
8
  import { Size } from '../../Types/Internal/Size.js';
@@ -11,12 +12,18 @@
11
12
 
12
13
  const { item, selected: maybeSelected }: SideMenuItemProps = $props();
13
14
 
14
- const selected = $derived(maybeSelected ?? (item.path ? page.url.pathname == item.path : false));
15
+ // `page.url.pathname` carries the configured base path; `item.path`
16
+ // does not. Match with `includes` so the comparison holds whether or
17
+ // not a base path (e.g. a `URI_PREFIX` build arg) is set.
18
+ const selected = $derived(
19
+ maybeSelected ?? (item.path ? page.url.pathname.includes(item.path) : false)
20
+ );
15
21
 
16
22
  const visible = useAsyncFlag(() => item.visible, true);
17
23
 
18
24
  /**
19
- * Constrain the rendered `href` to safe, relative paths only.
25
+ * Constrain the rendered `href` to safe, relative paths only, then
26
+ * prefix the SvelteKit `base` path.
20
27
  *
21
28
  * `item.path` is typed as the SvelteKit `Pathname` brand at the
22
29
  * boundary, but the property is still a `string` at runtime. To
@@ -25,6 +32,11 @@
25
32
  * input that does not start with `/`. Disallowed values resolve
26
33
  * to `#` so the link is harmless if a future consumer supplies an
27
34
  * unsafe value.
35
+ *
36
+ * The validated path is run through `resolve` so the rendered `href`
37
+ * honours a configured base path (e.g. a `URI_PREFIX` build arg).
38
+ * `item.path` is the bare app-relative route; without the prefix the
39
+ * `<a href>` would point outside the deployed sub-path.
28
40
  */
29
41
  function safeHref(path: string): string {
30
42
  if (typeof path !== 'string' || path.length === 0) {
@@ -36,7 +48,7 @@
36
48
  if (/^[a-z][a-z0-9+.-]*:/i.test(path)) {
37
49
  return '#';
38
50
  }
39
- return path;
51
+ return resolve(path as '/');
40
52
  }
41
53
  </script>
42
54
 
@@ -87,6 +87,12 @@
87
87
  border-radius: 0.1875rem;
88
88
  border: none;
89
89
  padding: 0;
90
+ --input-border: initial;
91
+ --input-height: initial;
92
+ --input-width: initial;
93
+ --input-min-width: initial;
94
+ --sv-border: initial;
95
+ --sv-min-height: initial;
90
96
  }
91
97
  dialog::backdrop {
92
98
  background: rgba(0, 0, 0, 0.3);
@@ -131,6 +131,12 @@
131
131
  border-radius: 0.1875rem;
132
132
  border: none;
133
133
  padding: 0;
134
+ --input-border: initial;
135
+ --input-height: initial;
136
+ --input-width: initial;
137
+ --input-min-width: initial;
138
+ --sv-border: initial;
139
+ --sv-min-height: initial;
134
140
  }
135
141
  dialog::backdrop {
136
142
  background: rgba(0, 0, 0, 0.3);
@@ -103,6 +103,12 @@
103
103
  border-radius: 0.1875rem;
104
104
  border: none;
105
105
  padding: 0;
106
+ --input-border: initial;
107
+ --input-height: initial;
108
+ --input-width: initial;
109
+ --input-min-width: initial;
110
+ --sv-border: initial;
111
+ --sv-min-height: initial;
106
112
  }
107
113
  dialog::backdrop {
108
114
  background: rgba(0, 0, 0, 0.3);
@@ -114,6 +114,12 @@
114
114
  border-radius: 0.1875rem;
115
115
  border: none;
116
116
  padding: 0;
117
+ --input-border: initial;
118
+ --input-height: initial;
119
+ --input-width: initial;
120
+ --input-min-width: initial;
121
+ --sv-border: initial;
122
+ --sv-min-height: initial;
117
123
  }
118
124
  dialog::backdrop {
119
125
  background: rgba(0, 0, 0, 0.3);
@@ -282,6 +282,12 @@
282
282
  border-radius: 0.1875rem;
283
283
  border: none;
284
284
  padding: 0;
285
+ --input-border: initial;
286
+ --input-height: initial;
287
+ --input-width: initial;
288
+ --input-min-width: initial;
289
+ --sv-border: initial;
290
+ --sv-min-height: initial;
285
291
  }
286
292
  dialog::backdrop {
287
293
  background: rgba(0, 0, 0, 0.3);
@@ -372,6 +372,21 @@
372
372
  border: none;
373
373
  padding: 0;
374
374
 
375
+ // A `<dialog>` stays in the DOM at its mount point even while
376
+ // shown in the top layer, so it inherits CSS custom properties
377
+ // from whatever opened it. Display-cell modals mount inside a
378
+ // table cell, which sets `--input-border` / `--input-height` to
379
+ // strip and shrink in-cell inputs; left unchecked those leak into
380
+ // the modal's own inputs, selects and date pickers (missing
381
+ // borders, collapsed height). Reset the input-theming variables
382
+ // so modal content always renders with default input styling.
383
+ --input-border: initial;
384
+ --input-height: initial;
385
+ --input-width: initial;
386
+ --input-min-width: initial;
387
+ --sv-border: initial;
388
+ --sv-min-height: initial;
389
+
375
390
  &::backdrop {
376
391
  background: rgba(0, 0, 0, 0.3);
377
392
  backdrop-filter: blur(1px);
@@ -2303,6 +2318,21 @@
2303
2318
  border: none;
2304
2319
  padding: 0;
2305
2320
 
2321
+ // A `<dialog>` stays in the DOM at its mount point even while
2322
+ // shown in the top layer, so it inherits CSS custom properties
2323
+ // from whatever opened it. Display-cell modals mount inside a
2324
+ // table cell, which sets `--input-border` / `--input-height` to
2325
+ // strip and shrink in-cell inputs; left unchecked those leak into
2326
+ // the modal's own inputs, selects and date pickers (missing
2327
+ // borders, collapsed height). Reset the input-theming variables
2328
+ // so modal content always renders with default input styling.
2329
+ --input-border: initial;
2330
+ --input-height: initial;
2331
+ --input-width: initial;
2332
+ --input-min-width: initial;
2333
+ --sv-border: initial;
2334
+ --sv-min-height: initial;
2335
+
2306
2336
  &::backdrop {
2307
2337
  background: rgba(0, 0, 0, 0.3);
2308
2338
  backdrop-filter: blur(1px);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lavalogic/scoria",
3
3
  "description": "Svelte components used for the FloWMS Web Frontend",
4
- "version": "0.37.47",
4
+ "version": "0.37.48",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },