@danielito1996/compose-svelted 0.2.7-alpha04 → 0.2.8-alpha01
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/README.md +44 -41
- package/dist/components/AppRoot.svelte +26 -11
- package/dist/components/Surface.svelte +29 -19
- package/dist/components/Text.svelte +37 -23
- package/dist/components/buttons/Button.svelte +66 -34
- package/dist/components/buttons/CheckButton.svelte +2 -2
- package/dist/components/layouts/Alignment.d.ts +40 -18
- package/dist/components/layouts/Alignment.js +40 -18
- package/dist/components/layouts/Arrangement.d.ts +27 -11
- package/dist/components/layouts/Arrangement.js +34 -41
- package/dist/components/layouts/Box.svelte +54 -47
- package/dist/components/layouts/Box.svelte.d.ts +19 -3
- package/dist/components/layouts/Column.svelte +52 -46
- package/dist/components/layouts/Column.svelte.d.ts +10 -2
- package/dist/components/layouts/Row.svelte +52 -46
- package/dist/components/layouts/Row.svelte.d.ts +10 -2
- package/dist/components/layouts/Scaffold.svelte +86 -53
- package/dist/components/layouts/Scaffold.svelte.d.ts +5 -2
- package/dist/components/layouts/resolveAlignment.d.ts +25 -4
- package/dist/components/layouts/resolveAlignment.js +46 -42
- package/dist/components/layouts/resolveFlexAlignSelf.d.ts +5 -1
- package/dist/components/layouts/resolveFlexAlignSelf.js +6 -8
- package/dist/components/motion/motion/AnimatedContent.svelte +41 -0
- package/dist/components/motion/{AnimatedContent.svelte.d.ts → motion/AnimatedContent.svelte.d.ts} +1 -1
- package/dist/components/motion/{AnimatedVisibility.svelte → motion/AnimatedVisibility.svelte} +3 -3
- package/dist/components/motion/{AnimatedVisibility.svelte.d.ts → motion/AnimatedVisibility.svelte.d.ts} +1 -1
- package/dist/components/motion/motion/AnimationSpec.d.ts +6 -0
- package/dist/components/motion/motion/AnimationSpec.js +1 -0
- package/dist/components/motion/motion/ContentTransition.d.ts +5 -0
- package/dist/components/motion/motion/ContentTransition.js +1 -0
- package/dist/components/motion/motion/applyAnimation.d.ts +0 -0
- package/dist/components/motion/motion/applyAnimation.js +0 -0
- package/dist/components/motion/motion/contentTransitions.d.ts +4 -0
- package/dist/components/motion/motion/contentTransitions.js +22 -0
- package/dist/components/motion/motion/transitions.d.ts +7 -0
- package/dist/components/motion/motion/transitions.js +70 -0
- package/dist/components/textFields/BaseTextField.svelte +4 -3
- package/dist/components/textFields/BaseTextField.svelte.d.ts +1 -0
- package/dist/components/textFields/OutlinedTextField.svelte +8 -7
- package/dist/components/textFields/TextField.svelte +8 -8
- package/dist/core/modifier/Modifier.d.ts +11 -171
- package/dist/core/modifier/Modifier.js +8 -170
- package/dist/core/modifier/ModifierImpl.d.ts +24 -6
- package/dist/core/modifier/ModifierImpl.js +96 -47
- package/dist/core/motion/AnimationSpec.d.ts +1 -6
- package/dist/core/motion/ContentTransition.d.ts +1 -5
- package/dist/core/motion/applyAnimation.d.ts +2 -0
- package/dist/core/motion/applyAnimation.js +3 -0
- package/dist/core/motion/contentTransitions.d.ts +1 -4
- package/dist/core/motion/contentTransitions.js +1 -22
- package/dist/core/motion/transitions.d.ts +1 -7
- package/dist/core/motion/transitions.js +1 -70
- package/dist/core/navigation/NavHost.svelte +46 -45
- package/dist/core/styles/baseline-safe.css +34 -0
- package/dist/core/styles/baseline.css +44 -48
- package/dist/core/theme/ColorScheme.d.ts +2 -0
- package/dist/core/theme/ColorScheme.js +2 -0
- package/dist/core/theme/ComposeTheme.svelte +36 -21
- package/dist/core/theme/colors.d.ts +2 -0
- package/dist/core/theme/defaults/darkColors.js +2 -0
- package/dist/core/theme/defaults/lightColors.js +2 -0
- package/dist/index.d.ts +48 -129
- package/dist/index.js +7 -3
- package/package.json +73 -59
- package/dist/components/motion/AnimatedContent.svelte +0 -34
|
@@ -1,47 +1,54 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Modifier } from "../../core/modifier/Modifier";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export let
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Box
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Modifier } from "../../core/modifier/Modifier";
|
|
3
|
+
import { Alignment } from "./Alignment";
|
|
4
|
+
import type { BoxAlignment } from "./Alignment";
|
|
5
|
+
import { resolveBoxPlaceItems } from "./resolveAlignment";
|
|
6
|
+
|
|
7
|
+
export let modifier: Modifier = Modifier.empty();
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Alineación por defecto para TODOS los hijos del Box.
|
|
11
|
+
* Equivalente a contentAlignment en Jetpack Compose.
|
|
12
|
+
*
|
|
13
|
+
* Cada hijo puede sobreescribir con Modifier.align(Alignment.XXX).
|
|
14
|
+
*
|
|
15
|
+
* @default Alignment.TopStart
|
|
16
|
+
*/
|
|
17
|
+
export let contentAlignment: BoxAlignment = Alignment.TopStart;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* CSS Grid place-items resuelto desde el contentAlignment.
|
|
21
|
+
* Formato: "<vertical> <horizontal>"
|
|
22
|
+
*/
|
|
23
|
+
$: placeItems = resolveBoxPlaceItems(contentAlignment);
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<!--
|
|
27
|
+
Box — contenedor de apilamiento (stack), fiel a Jetpack Compose.
|
|
28
|
+
|
|
29
|
+
Implementación:
|
|
30
|
+
• display: grid con grid-template-areas: 'stack'
|
|
31
|
+
• El CSS interno fuerza a todos los hijos directos a usar grid-area: 'stack'
|
|
32
|
+
• Esto hace que todos los hijos se solapen en la misma celda.
|
|
33
|
+
• place-items controla la alineación por defecto de TODOS los hijos.
|
|
34
|
+
• Cada hijo puede sobreescribir con place-self via Modifier.align().
|
|
35
|
+
-->
|
|
36
|
+
<div
|
|
37
|
+
class="cs-box"
|
|
38
|
+
style={`
|
|
39
|
+
display: grid;
|
|
40
|
+
grid-template-areas: 'stack';
|
|
41
|
+
place-items: ${placeItems};
|
|
42
|
+
position: relative;
|
|
43
|
+
${modifier.toStyle()}
|
|
44
|
+
`}
|
|
45
|
+
>
|
|
46
|
+
<slot />
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<style>
|
|
50
|
+
/* Fuerza a todos los hijos directos a apilarse en la misma área de grid */
|
|
51
|
+
.cs-box > :global(*) {
|
|
52
|
+
grid-area: stack;
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
@@ -13,11 +13,27 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
13
13
|
};
|
|
14
14
|
z_$$bindings?: Bindings;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
17
|
+
default: any;
|
|
18
|
+
} ? Props extends Record<string, never> ? any : {
|
|
19
|
+
children?: any;
|
|
20
|
+
} : {});
|
|
21
|
+
declare const Box: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
17
22
|
modifier?: Modifier;
|
|
18
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Alineación por defecto para TODOS los hijos del Box.
|
|
25
|
+
* Equivalente a contentAlignment en Jetpack Compose.
|
|
26
|
+
*
|
|
27
|
+
* Cada hijo puede sobreescribir con Modifier.align(Alignment.XXX).
|
|
28
|
+
*
|
|
29
|
+
* @default Alignment.TopStart
|
|
30
|
+
*/ contentAlignment?: BoxAlignment;
|
|
19
31
|
}, {
|
|
32
|
+
default: {};
|
|
33
|
+
}>, {
|
|
20
34
|
[evt: string]: CustomEvent<any>;
|
|
21
|
-
}, {
|
|
35
|
+
}, {
|
|
36
|
+
default: {};
|
|
37
|
+
}, {}, string>;
|
|
22
38
|
type Box = InstanceType<typeof Box>;
|
|
23
39
|
export default Box;
|
|
@@ -1,46 +1,52 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Modifier } from "../../core/modifier/Modifier";
|
|
3
|
-
import { Alignment } from "./Alignment";
|
|
4
|
-
import { Arrangement } from "./Arrangement";
|
|
5
|
-
import type { ArrangementValue } from "./Arrangement";
|
|
6
|
-
import type { HorizontalAlignment } from "./Alignment";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Modifier } from "../../core/modifier/Modifier";
|
|
3
|
+
import { Alignment } from "./Alignment";
|
|
4
|
+
import { Arrangement } from "./Arrangement";
|
|
5
|
+
import type { ArrangementValue } from "./Arrangement";
|
|
6
|
+
import type { HorizontalAlignment } from "./Alignment";
|
|
7
|
+
|
|
8
|
+
export let modifier: Modifier = Modifier.empty();
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Alineación en el eje cross (horizontal) de todos los hijos.
|
|
12
|
+
* Equivalente a horizontalAlignment en Jetpack Compose Column.
|
|
13
|
+
* @default Alignment.Start
|
|
14
|
+
*/
|
|
15
|
+
export let horizontalAlignment: HorizontalAlignment = Alignment.Start;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Disposición en el eje main (vertical).
|
|
19
|
+
* Equivalente a verticalArrangement en Jetpack Compose Column.
|
|
20
|
+
* @default Arrangement.Top
|
|
21
|
+
*/
|
|
22
|
+
export let verticalArrangement: ArrangementValue = Arrangement.Top;
|
|
23
|
+
|
|
24
|
+
$: gapStyle = verticalArrangement.type === 'spaced'
|
|
25
|
+
? `gap:${verticalArrangement.gap}px;`
|
|
26
|
+
: '';
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<!--
|
|
30
|
+
Column — contenedor flex vertical.
|
|
31
|
+
|
|
32
|
+
• align-items controla la alineación horizontal de los hijos (cross-axis)
|
|
33
|
+
• justify-content controla la distribución vertical (main-axis)
|
|
34
|
+
• Los hijos pueden sobreescribir su alineación individual via
|
|
35
|
+
Modifier.align() que inyecta align-self en su propio estilo
|
|
36
|
+
|
|
37
|
+
No hay wrapper interno: cada hijo gestiona su propio layout.
|
|
38
|
+
El scroll no está habilitado por defecto — usar Modifier.verticalScroll()
|
|
39
|
+
o LazyColumn para contenido que desborda.
|
|
40
|
+
-->
|
|
41
|
+
<div
|
|
42
|
+
style={`
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
align-items: ${horizontalAlignment.cssValue};
|
|
46
|
+
justify-content: ${verticalArrangement.justifyContent};
|
|
47
|
+
${gapStyle}
|
|
48
|
+
${modifier.toStyle()}
|
|
49
|
+
`}
|
|
50
|
+
>
|
|
51
|
+
<slot />
|
|
52
|
+
</div>
|
|
@@ -21,8 +21,16 @@ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
|
21
21
|
} : {});
|
|
22
22
|
declare const Column: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
23
23
|
modifier?: Modifier;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Alineación en el eje cross (horizontal) de todos los hijos.
|
|
26
|
+
* Equivalente a horizontalAlignment en Jetpack Compose Column.
|
|
27
|
+
* @default Alignment.Start
|
|
28
|
+
*/ horizontalAlignment?: HorizontalAlignment;
|
|
29
|
+
/**
|
|
30
|
+
* Disposición en el eje main (vertical).
|
|
31
|
+
* Equivalente a verticalArrangement en Jetpack Compose Column.
|
|
32
|
+
* @default Arrangement.Top
|
|
33
|
+
*/ verticalArrangement?: ArrangementValue;
|
|
26
34
|
}, {
|
|
27
35
|
default: {};
|
|
28
36
|
}>, {
|
|
@@ -1,46 +1,52 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Modifier } from "../../core/modifier/Modifier";
|
|
3
|
-
import { Alignment } from "./Alignment";
|
|
4
|
-
import { Arrangement } from "./Arrangement";
|
|
5
|
-
import type { ArrangementValue } from "./Arrangement";
|
|
6
|
-
import type { VerticalAlignment } from "./Alignment";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Modifier } from "../../core/modifier/Modifier";
|
|
3
|
+
import { Alignment } from "./Alignment";
|
|
4
|
+
import { Arrangement } from "./Arrangement";
|
|
5
|
+
import type { ArrangementValue } from "./Arrangement";
|
|
6
|
+
import type { VerticalAlignment } from "./Alignment";
|
|
7
|
+
|
|
8
|
+
export let modifier: Modifier = Modifier.empty();
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Alineación en el eje cross (vertical) de todos los hijos.
|
|
12
|
+
* Equivalente a verticalAlignment en Jetpack Compose Row.
|
|
13
|
+
* @default Alignment.Top
|
|
14
|
+
*/
|
|
15
|
+
export let verticalAlignment: VerticalAlignment = Alignment.Top;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Disposición en el eje main (horizontal).
|
|
19
|
+
* Equivalente a horizontalArrangement en Jetpack Compose Row.
|
|
20
|
+
* @default Arrangement.Start
|
|
21
|
+
*/
|
|
22
|
+
export let horizontalArrangement: ArrangementValue = Arrangement.Start;
|
|
23
|
+
|
|
24
|
+
$: gapStyle = horizontalArrangement.type === 'spaced'
|
|
25
|
+
? `gap:${horizontalArrangement.gap}px;`
|
|
26
|
+
: '';
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<!--
|
|
30
|
+
Row — contenedor flex horizontal.
|
|
31
|
+
|
|
32
|
+
• align-items controla la alineación vertical de los hijos (cross-axis)
|
|
33
|
+
• justify-content controla la distribución horizontal (main-axis)
|
|
34
|
+
• Los hijos pueden sobreescribir su alineación individual via
|
|
35
|
+
Modifier.align() que inyecta align-self en su propio estilo
|
|
36
|
+
|
|
37
|
+
No hay wrapper interno: cada hijo gestiona su propio layout.
|
|
38
|
+
El scroll no está habilitado por defecto — usar Modifier.horizontalScroll()
|
|
39
|
+
o LazyRow para contenido que desborda.
|
|
40
|
+
-->
|
|
41
|
+
<div
|
|
42
|
+
style={`
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: row;
|
|
45
|
+
align-items: ${verticalAlignment.cssValue};
|
|
46
|
+
justify-content: ${horizontalArrangement.justifyContent};
|
|
47
|
+
${gapStyle}
|
|
48
|
+
${modifier.toStyle()}
|
|
49
|
+
`}
|
|
50
|
+
>
|
|
51
|
+
<slot />
|
|
52
|
+
</div>
|
|
@@ -21,8 +21,16 @@ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
|
21
21
|
} : {});
|
|
22
22
|
declare const Row: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
23
23
|
modifier?: Modifier;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Alineación en el eje cross (vertical) de todos los hijos.
|
|
26
|
+
* Equivalente a verticalAlignment en Jetpack Compose Row.
|
|
27
|
+
* @default Alignment.Top
|
|
28
|
+
*/ verticalAlignment?: VerticalAlignment;
|
|
29
|
+
/**
|
|
30
|
+
* Disposición en el eje main (horizontal).
|
|
31
|
+
* Equivalente a horizontalArrangement en Jetpack Compose Row.
|
|
32
|
+
* @default Arrangement.Start
|
|
33
|
+
*/ horizontalArrangement?: ArrangementValue;
|
|
26
34
|
}, {
|
|
27
35
|
default: {};
|
|
28
36
|
}>, {
|
|
@@ -1,53 +1,86 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Modifier } from "../../core/modifier/Modifier";
|
|
3
|
-
import {
|
|
4
|
-
import {Alignment
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export let
|
|
8
|
-
export let
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Modifier } from "../../core/modifier/Modifier";
|
|
3
|
+
import { resolveBoxPlaceSelf } from "./resolveAlignment";
|
|
4
|
+
import { Alignment } from "./Alignment";
|
|
5
|
+
import type { BoxAlignment } from "./Alignment";
|
|
6
|
+
|
|
7
|
+
export let modifier: Modifier = Modifier.empty();
|
|
8
|
+
export let contentPadding = 16;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Posición del FloatingActionButton dentro del Scaffold.
|
|
12
|
+
* @default Alignment.BottomEnd
|
|
13
|
+
*/
|
|
14
|
+
export let fabAlignment: BoxAlignment = Alignment.BottomEnd;
|
|
15
|
+
|
|
16
|
+
$: fabPlaceSelf = resolveBoxPlaceSelf(fabAlignment);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<!--
|
|
20
|
+
Scaffold — estructura base de pantalla.
|
|
21
|
+
|
|
22
|
+
Slots:
|
|
23
|
+
topBar → barra superior (TopAppBar)
|
|
24
|
+
default → contenido principal (ahora es un flex container para permitir fillMaxSize)
|
|
25
|
+
bottomBar → barra inferior (NavigationBar)
|
|
26
|
+
floatingActionButton → FAB posicionado por fabAlignment
|
|
27
|
+
-->
|
|
28
|
+
<div
|
|
29
|
+
class="cs-relative"
|
|
30
|
+
style={`
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
${modifier.toStyle()}
|
|
37
|
+
`}
|
|
38
|
+
>
|
|
39
|
+
<!-- Top bar -->
|
|
40
|
+
<slot name="topBar" />
|
|
41
|
+
|
|
42
|
+
<!-- Content — ocupa el espacio restante -->
|
|
43
|
+
<!--
|
|
44
|
+
Se añade display: flex para que los hijos que usen fillMaxSize()
|
|
45
|
+
puedan expandirse correctamente basándose en el tamaño de este contenedor.
|
|
46
|
+
-->
|
|
47
|
+
<div
|
|
48
|
+
style={`
|
|
49
|
+
flex: 1;
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
min-height: 0;
|
|
53
|
+
padding: ${contentPadding}px;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
`}
|
|
56
|
+
>
|
|
57
|
+
<slot />
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<!-- Bottom bar -->
|
|
61
|
+
<slot name="bottomBar" />
|
|
62
|
+
|
|
63
|
+
<!-- FAB overlay -->
|
|
64
|
+
<div
|
|
65
|
+
style="
|
|
66
|
+
position: absolute;
|
|
67
|
+
inset: 0;
|
|
68
|
+
pointer-events: none;
|
|
69
|
+
display: grid;
|
|
70
|
+
grid-template-areas: 'fab';
|
|
71
|
+
"
|
|
72
|
+
>
|
|
73
|
+
<div
|
|
74
|
+
style={`
|
|
75
|
+
grid-area: fab;
|
|
76
|
+
${fabPlaceSelf}
|
|
77
|
+
pointer-events: auto;
|
|
78
|
+
margin: 16px;
|
|
79
|
+
width: fit-content;
|
|
80
|
+
height: fit-content;
|
|
81
|
+
`}
|
|
82
|
+
>
|
|
83
|
+
<slot name="floatingActionButton" />
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Modifier } from "../../core/modifier/Modifier";
|
|
2
|
-
import { BoxAlignment } from "./Alignment";
|
|
2
|
+
import type { BoxAlignment } from "./Alignment";
|
|
3
3
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
4
4
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
5
5
|
$$bindings?: Bindings;
|
|
@@ -21,7 +21,10 @@ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
|
21
21
|
declare const Scaffold: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
22
22
|
modifier?: Modifier;
|
|
23
23
|
contentPadding?: number;
|
|
24
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Posición del FloatingActionButton dentro del Scaffold.
|
|
26
|
+
* @default Alignment.BottomEnd
|
|
27
|
+
*/ fabAlignment?: BoxAlignment;
|
|
25
28
|
}, {
|
|
26
29
|
topBar: {};
|
|
27
30
|
default: {};
|
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* resolveAlignment.ts
|
|
3
|
+
*
|
|
4
|
+
* Funciones puras que traducen los tokens de Alignment a CSS inline.
|
|
5
|
+
* Trabajan con el nuevo shape de BoxAlignment (objeto con .horizontal / .vertical).
|
|
6
|
+
*/
|
|
7
|
+
import type { BoxAlignment, HorizontalAlignment, VerticalAlignment } from './Alignment';
|
|
8
|
+
/**
|
|
9
|
+
* Resuelve el `place-items` de un Box stack container.
|
|
10
|
+
* CSS Grid: "align-items justify-items"
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveBoxPlaceItems(alignment: BoxAlignment): string;
|
|
13
|
+
/**
|
|
14
|
+
* Resuelve el `place-self` de un hijo de Box que sobreescribe su alineación.
|
|
15
|
+
* Usado por Modifier.align() dentro de un Box.
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveBoxPlaceSelf(alignment: BoxAlignment): string;
|
|
18
|
+
/**
|
|
19
|
+
* Resuelve `align-self` para un hijo de Column (eje horizontal).
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveColumnAlignSelf(alignment: HorizontalAlignment): string;
|
|
22
|
+
/**
|
|
23
|
+
* Resuelve `align-self` para un hijo de Row (eje vertical).
|
|
24
|
+
*/
|
|
25
|
+
export declare function resolveRowAlignSelf(alignment: VerticalAlignment): string;
|