@streamscloud/kit 0.2.21 → 0.2.23
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.
|
@@ -2,8 +2,8 @@ export declare class ColorHelper {
|
|
|
2
2
|
/**
|
|
3
3
|
* Normalize a color value to a clean hex string.
|
|
4
4
|
* - Strips 100% alpha (`#FF0000FF` → `#FF0000`)
|
|
5
|
-
* - Returns `''` for
|
|
6
|
-
* - Preserves partial alpha (`#FF000080`
|
|
5
|
+
* - Returns `''` for empty / invalid values
|
|
6
|
+
* - Preserves partial and zero alpha (`#FF000080`, `#FF000000` stay as-is)
|
|
7
7
|
*/
|
|
8
8
|
static normalizeHex(value: string | null | undefined): string;
|
|
9
9
|
/**
|
|
@@ -5,8 +5,8 @@ export class ColorHelper {
|
|
|
5
5
|
/**
|
|
6
6
|
* Normalize a color value to a clean hex string.
|
|
7
7
|
* - Strips 100% alpha (`#FF0000FF` → `#FF0000`)
|
|
8
|
-
* - Returns `''` for
|
|
9
|
-
* - Preserves partial alpha (`#FF000080`
|
|
8
|
+
* - Returns `''` for empty / invalid values
|
|
9
|
+
* - Preserves partial and zero alpha (`#FF000080`, `#FF000000` stay as-is)
|
|
10
10
|
*/
|
|
11
11
|
static normalizeHex(value) {
|
|
12
12
|
if (!value) {
|
|
@@ -17,9 +17,6 @@ export class ColorHelper {
|
|
|
17
17
|
return '';
|
|
18
18
|
}
|
|
19
19
|
const alpha = parsed.alpha();
|
|
20
|
-
if (alpha === 0) {
|
|
21
|
-
return '';
|
|
22
|
-
}
|
|
23
20
|
const hex = parsed.toHex().toUpperCase();
|
|
24
21
|
if (alpha === 1) {
|
|
25
22
|
return hex.substring(0, 7);
|
|
@@ -59,6 +59,7 @@ const size = $derived(dialog.controller.containerSettings.size);
|
|
|
59
59
|
const position = $derived(dialog.controller.containerSettings.position);
|
|
60
60
|
const isCustomWidth = $derived(!DIALOG_SIZES.includes(size));
|
|
61
61
|
const customWidth = $derived(isCustomWidth ? size : null);
|
|
62
|
+
const isStretchContent = $derived(position === 'full-screen' || position === 'full-height');
|
|
62
63
|
</script>
|
|
63
64
|
|
|
64
65
|
<dialog
|
|
@@ -79,7 +80,7 @@ const customWidth = $derived(isCustomWidth ? size : null);
|
|
|
79
80
|
oncancel={handleCancel}
|
|
80
81
|
onclick={handleBackdropClick}
|
|
81
82
|
style:--dialog-container--custom-width={customWidth}>
|
|
82
|
-
<div class="dialog-container__content">
|
|
83
|
+
<div class="dialog-container__content" class:dialog-container__content--stretch={isStretchContent}>
|
|
83
84
|
<DialogView controller={dialog.controller} data={dialog.data as TData} />
|
|
84
85
|
</div>
|
|
85
86
|
</dialog>
|
|
@@ -176,9 +177,9 @@ const customWidth = $derived(isCustomWidth ? size : null);
|
|
|
176
177
|
border-radius: var(--_dialog-container--border-radius);
|
|
177
178
|
pointer-events: auto;
|
|
178
179
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
.dialog-container__content--stretch {
|
|
181
|
+
display: flex;
|
|
182
|
+
flex-direction: column;
|
|
182
183
|
flex: 1;
|
|
183
184
|
min-height: 0;
|
|
184
185
|
}</style>
|
|
@@ -75,6 +75,7 @@ A structured dialog panel with header (title + close button), scrollable body, a
|
|
|
75
75
|
--_dialog--header--padding-block: var(--sc-kit--dialog--header--padding-block, var(--_dialog--padding-block));
|
|
76
76
|
--_dialog--header--padding-inline: var(--sc-kit--dialog--header--padding-inline, var(--_dialog--padding-inline));
|
|
77
77
|
display: flex;
|
|
78
|
+
flex: 1;
|
|
78
79
|
flex-direction: column;
|
|
79
80
|
height: var(--_dialog--height);
|
|
80
81
|
min-height: var(--_dialog--min-height);
|