lapikit 0.0.0-insiders.efb49b7 → 0.0.0-insiders.f81b991
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/bin/lapikit.js +3 -2
- package/dist/assets/icons/arrow-down.svelte +2 -0
- package/dist/assets/icons/arrow-down.svelte.d.ts +6 -14
- package/dist/assets/icons/arrow-up.svelte +2 -0
- package/dist/assets/icons/arrow-up.svelte.d.ts +6 -14
- package/dist/assets/icons/close-fill.svelte +2 -0
- package/dist/assets/icons/close-fill.svelte.d.ts +6 -14
- package/dist/assets/icons/loading-fill.svelte +2 -0
- package/dist/assets/icons/loading-fill.svelte.d.ts +6 -14
- package/dist/components/accordion/accordion.css +6 -6
- package/dist/components/alert/alert.css +5 -5
- package/dist/components/app/app.css +1 -1
- package/dist/components/app/app.svelte +22 -4
- package/dist/components/appbar/appbar.css +48 -0
- package/dist/components/appbar/appbar.svelte +40 -0
- package/dist/components/appbar/appbar.svelte.d.ts +4 -0
- package/dist/components/appbar/types.d.ts +15 -0
- package/dist/components/appbar/types.js +1 -0
- package/dist/components/aspect-ratio/aspect-ratio.svelte +22 -0
- package/dist/components/avatar/avatar.css +5 -5
- package/dist/components/avatar/avatar.svelte +4 -4
- package/dist/components/avatar/types.d.ts +1 -1
- package/dist/components/button/button.css +164 -193
- package/dist/components/button/button.svelte +39 -31
- package/dist/components/button/button.svelte.d.ts +2 -2
- package/dist/components/button/types.d.ts +7 -5
- package/dist/components/card/card.css +115 -0
- package/dist/components/card/card.svelte +63 -0
- package/dist/components/card/card.svelte.d.ts +4 -0
- package/dist/components/card/types.d.ts +18 -0
- package/dist/components/card/types.js +1 -0
- package/dist/components/chip/chip.css +217 -4
- package/dist/components/chip/chip.svelte +15 -4
- package/dist/components/chip/types.d.ts +2 -1
- package/dist/components/dialog/dialog.css +2 -2
- package/dist/components/dropdown/dropdown.css +4 -4
- package/dist/components/icon/icon.css +14 -11
- package/dist/components/index.d.ts +6 -1
- package/dist/components/index.js +6 -1
- package/dist/components/list/list.css +145 -119
- package/dist/components/list/list.svelte +1 -3
- package/dist/components/list/modules/list-item.svelte +9 -1
- package/dist/components/list/types.d.ts +2 -5
- package/dist/components/modal/modal.css +10 -7
- package/dist/components/modal/modal.svelte +1 -0
- package/dist/components/popover/popover.css +4 -4
- package/dist/components/separator/separator.css +1 -1
- package/dist/components/spacer/spacer.css +3 -0
- package/dist/components/spacer/spacer.svelte +7 -0
- package/dist/components/spacer/spacer.svelte.d.ts +4 -0
- package/dist/components/spacer/types.d.ts +4 -0
- package/dist/components/spacer/types.js +1 -0
- package/dist/components/toolbar/toolbar.css +129 -0
- package/dist/components/toolbar/toolbar.svelte +47 -0
- package/dist/components/toolbar/toolbar.svelte.d.ts +4 -0
- package/dist/components/toolbar/types.d.ts +27 -0
- package/dist/components/toolbar/types.js +1 -0
- package/dist/components/tooltip/tooltip.css +4 -4
- package/dist/internal/assets.svelte.js +2 -0
- package/dist/internal/ripple.d.ts +12 -0
- package/dist/internal/ripple.js +93 -0
- package/dist/internal/unit.d.ts +1 -0
- package/dist/internal/unit.js +11 -0
- package/dist/preset.js +2 -2
- package/dist/stores/index.d.ts +4 -3
- package/dist/stores/index.js +9 -4
- package/dist/style/animation.css +42 -0
- package/dist/style/normalize.css +2 -0
- package/dist/style/parser/color.js +2 -2
- package/dist/style/parser/device.js +31 -19
- package/package.json +2 -1
package/bin/lapikit.js
CHANGED
|
@@ -35,7 +35,7 @@ if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
|
35
35
|
terminal('error', `failed to create configuration file:\n\n ${error}`);
|
|
36
36
|
terminal(
|
|
37
37
|
'warn',
|
|
38
|
-
`you can create lapikit.config.js manually, please visite https://
|
|
38
|
+
`you can create lapikit.config.js manually, please visite https://lapikit.dev/docs/getting-started for more information`
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -44,9 +44,10 @@ if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
|
44
44
|
|
|
45
45
|
terminal(
|
|
46
46
|
'info',
|
|
47
|
-
`${ansi.bold.blue('Thank to use lapikit, discover all posibility with lapikit on https://
|
|
47
|
+
`${ansi.bold.blue('Thank to use lapikit, discover all posibility with lapikit on https://lapikit.dev')}\n\n`
|
|
48
48
|
);
|
|
49
49
|
|
|
50
|
+
console.log('Website: https://lapikit.dev');
|
|
50
51
|
console.log('Github: https://github.com/nycolaide/lapikit');
|
|
51
52
|
console.log('Support the developement: https://buymeacoffee.com/nycolaide');
|
|
52
53
|
} else {
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
export default ArrowDown;
|
|
2
|
-
type ArrowDown = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const ArrowDown: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
1
|
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> {
|
|
15
|
-
new (options: import(
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
16
3
|
$$bindings?: Bindings;
|
|
17
4
|
} & Exports;
|
|
18
5
|
(internal: unknown, props: {
|
|
@@ -24,3 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
24
11
|
};
|
|
25
12
|
z_$$bindings?: Bindings;
|
|
26
13
|
}
|
|
14
|
+
declare const ArrowDown: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type ArrowDown = InstanceType<typeof ArrowDown>;
|
|
18
|
+
export default ArrowDown;
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
export default ArrowUp;
|
|
2
|
-
type ArrowUp = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const ArrowUp: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
1
|
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> {
|
|
15
|
-
new (options: import(
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
16
3
|
$$bindings?: Bindings;
|
|
17
4
|
} & Exports;
|
|
18
5
|
(internal: unknown, props: {
|
|
@@ -24,3 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
24
11
|
};
|
|
25
12
|
z_$$bindings?: Bindings;
|
|
26
13
|
}
|
|
14
|
+
declare const ArrowUp: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type ArrowUp = InstanceType<typeof ArrowUp>;
|
|
18
|
+
export default ArrowUp;
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
export default CloseFill;
|
|
2
|
-
type CloseFill = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const CloseFill: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
1
|
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> {
|
|
15
|
-
new (options: import(
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
16
3
|
$$bindings?: Bindings;
|
|
17
4
|
} & Exports;
|
|
18
5
|
(internal: unknown, props: {
|
|
@@ -24,3 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
24
11
|
};
|
|
25
12
|
z_$$bindings?: Bindings;
|
|
26
13
|
}
|
|
14
|
+
declare const CloseFill: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type CloseFill = InstanceType<typeof CloseFill>;
|
|
18
|
+
export default CloseFill;
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
export default LoadingFill;
|
|
2
|
-
type LoadingFill = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const LoadingFill: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
1
|
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> {
|
|
15
|
-
new (options: import(
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
16
3
|
$$bindings?: Bindings;
|
|
17
4
|
} & Exports;
|
|
18
5
|
(internal: unknown, props: {
|
|
@@ -24,3 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
24
11
|
};
|
|
25
12
|
z_$$bindings?: Bindings;
|
|
26
13
|
}
|
|
14
|
+
declare const LoadingFill: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type LoadingFill = InstanceType<typeof LoadingFill>;
|
|
18
|
+
export default LoadingFill;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.kit-accordion {
|
|
2
|
-
--accordion-color: var(--on, var(--kit-on-
|
|
3
|
-
--accordion-background: var(--base, var(--kit-
|
|
2
|
+
--accordion-color: var(--on, var(--kit-on-container));
|
|
3
|
+
--accordion-background: var(--base, var(--kit-container));
|
|
4
4
|
--accordion-radius: var(--shape, var(--kit-radius-md));
|
|
5
5
|
|
|
6
6
|
display: flex;
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
transition: 0.3s all cubic-bezier(0.4, 0, 0.2, 1);
|
|
48
48
|
transition-property: margin-top, border-radius, border, max-width;
|
|
49
49
|
border-radius: var(--shape, var(--accordion-radius, var(--kit-radius-md)));
|
|
50
|
-
color: var(--on, var(--accordion-color, var(--kit-on-
|
|
51
|
-
background-color: var(--base, var(--accordion-background, var(--kit-
|
|
52
|
-
transition:
|
|
50
|
+
color: var(--on, var(--accordion-color, var(--kit-on-container)));
|
|
51
|
+
background-color: var(--base, var(--accordion-background, var(--kit-container)));
|
|
52
|
+
/* transition:
|
|
53
53
|
color 0.5s,
|
|
54
|
-
background-color 0.5s;
|
|
54
|
+
background-color 0.5s; */
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.kit-accordion .kit-accordion-item > button,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.kit-alert {
|
|
2
|
-
--alert-color: var(--on, var(--kit-on-
|
|
3
|
-
--alert-background: var(--base, var(--kit-
|
|
2
|
+
--alert-color: var(--on, var(--kit-on-container));
|
|
3
|
+
--alert-background: var(--base, var(--kit-container));
|
|
4
4
|
--alert-radius: var(--shape, var(--kit-radius-md));
|
|
5
5
|
|
|
6
6
|
display: grid;
|
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
grid-template-areas:
|
|
9
9
|
'prepend content append close'
|
|
10
10
|
'. content . .';
|
|
11
|
-
grid-template-columns: max-content auto max-content max-content;
|
|
11
|
+
/* grid-template-columns: max-content auto max-content max-content; */ /* bug */
|
|
12
12
|
position: relative;
|
|
13
13
|
padding: 1rem;
|
|
14
14
|
overflow: hidden;
|
|
15
15
|
color: var(--alert-color);
|
|
16
16
|
background-color: var(--alert-background);
|
|
17
17
|
border-radius: var(--alert-radius);
|
|
18
|
-
transition:
|
|
18
|
+
/* transition:
|
|
19
19
|
color 0.5s,
|
|
20
|
-
background-color 0.5s;
|
|
20
|
+
background-color 0.5s; */
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.kit-alert .kit-alert--underlay {
|
|
@@ -1,18 +1,36 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { BROWSER } from 'esm-env';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
colorSchemeSystem,
|
|
5
|
+
modalOpen,
|
|
6
|
+
setOpenModal,
|
|
7
|
+
updateThemeStore
|
|
8
|
+
} from '../../stores/index.js';
|
|
4
9
|
import type { Snippet } from 'svelte';
|
|
5
10
|
let { children }: { children: Snippet } = $props();
|
|
6
11
|
|
|
7
12
|
$effect.pre(() => {
|
|
8
13
|
if (!BROWSER) return;
|
|
14
|
+
// system
|
|
15
|
+
if (window.matchMedia) {
|
|
16
|
+
colorSchemeSystem.set(
|
|
17
|
+
window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// listener
|
|
22
|
+
window
|
|
23
|
+
.matchMedia('(prefers-color-scheme: dark)')
|
|
24
|
+
.addEventListener('change', (event: MediaQueryListEvent) => {
|
|
25
|
+
colorSchemeSystem.set(event.matches ? 'dark' : 'light');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// local
|
|
9
29
|
const local = localStorage.getItem('@lapikit/theme');
|
|
10
|
-
if (local !== null) updateThemeStore(local as 'dark' | 'light' | '
|
|
30
|
+
if (local !== null) updateThemeStore(local as 'dark' | 'light' | 'system');
|
|
11
31
|
});
|
|
12
32
|
</script>
|
|
13
33
|
|
|
14
|
-
{$modalOpen ? ($modalOpen === 'persistent' ? 'persistent' : 'true') : 'false'}
|
|
15
|
-
|
|
16
34
|
{@render children?.()}
|
|
17
35
|
|
|
18
36
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* root default*/
|
|
2
|
+
.kit-appbar {
|
|
3
|
+
--appbar-color: var(--on, var(--kit-on-surface));
|
|
4
|
+
--appbar-background: var(--base, var(--kit-surface));
|
|
5
|
+
--appbar-radius: var(--shape, 0);
|
|
6
|
+
--appbar-padding-wrapper: var(--kit-spacing) * 4;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.kit-appbar {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
border-style: solid;
|
|
13
|
+
border-width: 1px;
|
|
14
|
+
border-radius: var(--appbar-radius);
|
|
15
|
+
color: var(--appbar-color);
|
|
16
|
+
background-color: var(--appbar-background);
|
|
17
|
+
border-color: var(--appbar-background);
|
|
18
|
+
/* transition:
|
|
19
|
+
color 0.5s,
|
|
20
|
+
border-color 0.5s,
|
|
21
|
+
background-color 0.5s; */
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* wrapper */
|
|
25
|
+
.kit-appbar .kit-appbar--wrapper {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
flex-direction: row;
|
|
29
|
+
height: calc(100% - (var(--appbar-padding-wrapper) * 2));
|
|
30
|
+
width: calc(100% - (var(--appbar-padding-wrapper) * 2));
|
|
31
|
+
margin: 0 auto;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* density */
|
|
35
|
+
.kit-appbar[breakpoint]kit-appbar--density-default {
|
|
36
|
+
height: 4rem;
|
|
37
|
+
padding-inline: calc(var(--kit-spacing) * 1.5);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.kit-appbar[breakpoint]kit-appbar--density-compact {
|
|
41
|
+
height: 3.5rem;
|
|
42
|
+
padding-inline: calc(var(--kit-spacing) * 0.75);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.kit-appbar[breakpoint]kit-appbar--density-comfortable {
|
|
46
|
+
height: 4.5rem;
|
|
47
|
+
padding-inline: calc(var(--kit-spacing) * 2.25);
|
|
48
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { getAssets } from '../../internal/index.js';
|
|
3
|
+
import type { AppbarProps } from './types.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
children,
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
is = 'header',
|
|
9
|
+
classContent,
|
|
10
|
+
light,
|
|
11
|
+
dark,
|
|
12
|
+
rounded,
|
|
13
|
+
background,
|
|
14
|
+
color,
|
|
15
|
+
density = 'default',
|
|
16
|
+
...rest
|
|
17
|
+
}: AppbarProps = $props();
|
|
18
|
+
|
|
19
|
+
const assets = getAssets();
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<svelte:element
|
|
23
|
+
this={is}
|
|
24
|
+
bind:this={ref}
|
|
25
|
+
{...rest}
|
|
26
|
+
class={[
|
|
27
|
+
'kit-appbar',
|
|
28
|
+
light && 'light',
|
|
29
|
+
dark && 'dark',
|
|
30
|
+
density && assets.className('appbar', 'density', density),
|
|
31
|
+
rest.class
|
|
32
|
+
]}
|
|
33
|
+
style:--base={assets.color(background)}
|
|
34
|
+
style:--on={assets.color(color)}
|
|
35
|
+
style:--shape={assets.shape(rounded)}
|
|
36
|
+
>
|
|
37
|
+
<div class={['kit-appbar--wrapper', classContent]}>
|
|
38
|
+
{@render children?.()}
|
|
39
|
+
</div>
|
|
40
|
+
</svelte:element>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Component } from '../../internal/types.js';
|
|
2
|
+
type Density = 'compact' | 'comfortable' | 'default';
|
|
3
|
+
export interface AppbarProps extends Component {
|
|
4
|
+
is?: 'div' | 'header' | 'nav';
|
|
5
|
+
rounded?: string;
|
|
6
|
+
density?: Density | {
|
|
7
|
+
[key: string]: Density;
|
|
8
|
+
};
|
|
9
|
+
dark?: boolean;
|
|
10
|
+
light?: boolean;
|
|
11
|
+
color?: string;
|
|
12
|
+
background?: string;
|
|
13
|
+
classContent?: string | string[] | undefined;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -23,3 +23,25 @@
|
|
|
23
23
|
<div class="kit-aspect-ratio--sizer" style={`padding-bottom: ${paddingBottom}%;`}></div>
|
|
24
24
|
{@render children?.()}
|
|
25
25
|
</div>
|
|
26
|
+
|
|
27
|
+
<style>
|
|
28
|
+
.kit-aspect-ratio {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex: 1 0 auto;
|
|
31
|
+
max-height: 100%;
|
|
32
|
+
max-width: 100%;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
position: relative;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.kit-aspect-ratio--inline {
|
|
38
|
+
display: inline-flex;
|
|
39
|
+
flex: 0 0 auto;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.kit-aspect-ratio--sizer {
|
|
43
|
+
flex: 1 0 0px;
|
|
44
|
+
transition: padding-bottom 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
}
|
|
47
|
+
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.kit-avatar {
|
|
2
|
-
--avatar-color: var(--on, var(--kit-on-
|
|
3
|
-
--avatar-background: var(--base, var(--kit-
|
|
2
|
+
--avatar-color: var(--on, var(--kit-on-container));
|
|
3
|
+
--avatar-background: var(--base, var(--kit-container));
|
|
4
4
|
--avatar-radius: var(--shape, var(--kit-radius-full));
|
|
5
5
|
|
|
6
6
|
display: flex;
|
|
@@ -91,19 +91,19 @@
|
|
|
91
91
|
|
|
92
92
|
/* variant */
|
|
93
93
|
.kit-avatar[breakpoint]kit-avatar--variant-outline {
|
|
94
|
-
--avatar-color: var(--base, var(--kit-
|
|
94
|
+
--avatar-color: var(--base, var(--kit-container));
|
|
95
95
|
background-color: transparent;
|
|
96
96
|
border: 1px solid currentColor;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
.kit-avatar[breakpoint]kit-avatar--variant-text {
|
|
100
|
-
--avatar-color: var(--base, var(--kit-
|
|
100
|
+
--avatar-color: var(--base, var(--kit-container));
|
|
101
101
|
background-color: transparent;
|
|
102
102
|
border-color: transparent;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
.kit-avatar[breakpoint]kit-avatar--variant-dash {
|
|
106
|
-
--avatar-color: var(--base, var(--kit-
|
|
106
|
+
--avatar-color: var(--base, var(--kit-container));
|
|
107
107
|
background-color: transparent;
|
|
108
108
|
border: 1px dashed currentColor;
|
|
109
109
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
alt,
|
|
12
12
|
background,
|
|
13
13
|
color,
|
|
14
|
-
|
|
14
|
+
src,
|
|
15
15
|
variant,
|
|
16
16
|
density = 'default',
|
|
17
17
|
...rest
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
'kit-avatar',
|
|
29
29
|
light && 'light',
|
|
30
30
|
dark && 'dark',
|
|
31
|
-
|
|
31
|
+
src && 'kit-avatar--image',
|
|
32
32
|
size && assets.className('avatar', 'size', size),
|
|
33
33
|
variant && assets.className('avatar', 'variant', variant),
|
|
34
34
|
density && assets.className('avatar', 'density', density),
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
style:--on={assets.color(color)}
|
|
39
39
|
style:--shape={assets.shape(rounded)}
|
|
40
40
|
>
|
|
41
|
-
{#if
|
|
42
|
-
<img src
|
|
41
|
+
{#if src}
|
|
42
|
+
<img {src} {alt} />
|
|
43
43
|
{:else}
|
|
44
44
|
{@render children?.()}
|
|
45
45
|
{/if}
|