lapikit 0.5.9 → 0.6.1
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/dist/@types/actions.d.ts +6 -0
- package/dist/@types/index.d.ts +1 -0
- package/dist/@types/index.js +1 -0
- package/dist/@types/props.d.ts +1 -0
- package/dist/actions.d.ts +2 -0
- package/dist/actions.js +2 -0
- package/dist/animations/ripple.d.ts +1 -1
- package/dist/animations/ripple.js +36 -23
- package/dist/components/app/app.svelte +122 -8
- package/dist/components/card/card.svelte +49 -96
- package/dist/components/card/card.types.d.ts +22 -2
- package/dist/components/card/modules/card-actions.svelte +53 -0
- package/dist/components/card/modules/card-actions.svelte.d.ts +4 -0
- package/dist/components/card/modules/card-container.svelte +51 -0
- package/dist/components/card/modules/card-container.svelte.d.ts +4 -0
- package/dist/components/card/modules/card-content.svelte +56 -0
- package/dist/components/card/modules/card-content.svelte.d.ts +4 -0
- package/dist/components/card/modules/card-media.svelte +52 -0
- package/dist/components/card/modules/card-media.svelte.d.ts +4 -0
- package/dist/components/card/modules/card-title.svelte +56 -0
- package/dist/components/card/modules/card-title.svelte.d.ts +4 -0
- package/dist/components/dialog/dialog.svelte +1 -2
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.js +5 -0
- package/dist/{@legacy/stores/components.d.ts → components/modal/modal.d.ts} +1 -2
- package/dist/{@legacy/stores/components.js → components/modal/modal.js} +1 -1
- package/dist/components/modal/modal.svelte +1 -1
- package/dist/components/textfield/textfield.svelte.d.ts +1 -1
- package/dist/constants.d.ts +2 -2
- package/dist/constants.js +8 -3
- package/dist/utils/components.d.ts +1 -0
- package/dist/utils/components.js +16 -0
- package/dist/utils/outside.d.ts +1 -0
- package/dist/utils/outside.js +5 -0
- package/dist/{@legacy/stores → utils}/themes.d.ts +1 -0
- package/dist/{@legacy/actions/use-theme.js → utils/themes.js} +4 -1
- package/package.json +11 -32
- package/dist/@legacy/actions/accordion.svelte.d.ts +0 -9
- package/dist/@legacy/actions/index.d.ts +0 -2
- package/dist/@legacy/actions/index.js +0 -2
- package/dist/@legacy/actions/use-theme.d.ts +0 -1
- package/dist/@legacy/assets/icons/arrow-down.svelte +0 -12
- package/dist/@legacy/assets/icons/arrow-down.svelte.d.ts +0 -18
- package/dist/@legacy/assets/icons/arrow-up.svelte +0 -12
- package/dist/@legacy/assets/icons/arrow-up.svelte.d.ts +0 -18
- package/dist/@legacy/assets/icons/close-fill.svelte +0 -12
- package/dist/@legacy/assets/icons/close-fill.svelte.d.ts +0 -18
- package/dist/@legacy/assets/icons/loading-fill.svelte +0 -31
- package/dist/@legacy/assets/icons/loading-fill.svelte.d.ts +0 -18
- package/dist/@legacy/components/accordion/accordion.css +0 -36
- package/dist/@legacy/components/accordion/accordion.svelte +0 -39
- package/dist/@legacy/components/accordion/accordion.svelte.d.ts +0 -4
- package/dist/@legacy/components/accordion/modules/accordion-item.css +0 -68
- package/dist/@legacy/components/accordion/modules/accordion-item.svelte +0 -94
- package/dist/@legacy/components/accordion/modules/accordion-item.svelte.d.ts +0 -4
- package/dist/@legacy/components/accordion/types.d.ts +0 -33
- package/dist/@legacy/components/alert/alert.css +0 -130
- package/dist/@legacy/components/alert/alert.svelte +0 -89
- package/dist/@legacy/components/alert/alert.svelte.d.ts +0 -4
- package/dist/@legacy/components/alert/types.d.ts +0 -28
- package/dist/@legacy/components/alert/types.js +0 -1
- package/dist/@legacy/components/app/app.css +0 -26
- package/dist/@legacy/components/app/app.svelte +0 -79
- package/dist/@legacy/components/app/app.svelte.d.ts +0 -4
- package/dist/@legacy/components/app/types.d.ts +0 -10
- package/dist/@legacy/components/app/types.js +0 -1
- package/dist/@legacy/components/appbar/appbar.css +0 -38
- package/dist/@legacy/components/appbar/appbar.svelte +0 -40
- package/dist/@legacy/components/appbar/appbar.svelte.d.ts +0 -4
- package/dist/@legacy/components/appbar/types.d.ts +0 -15
- package/dist/@legacy/components/appbar/types.js +0 -1
- package/dist/@legacy/components/aspect-ratio/aspect-ratio.css +0 -19
- package/dist/@legacy/components/aspect-ratio/aspect-ratio.svelte +0 -25
- package/dist/@legacy/components/aspect-ratio/aspect-ratio.svelte.d.ts +0 -4
- package/dist/@legacy/components/aspect-ratio/types.d.ts +0 -5
- package/dist/@legacy/components/aspect-ratio/types.js +0 -1
- package/dist/@legacy/components/avatar/avatar.css +0 -102
- package/dist/@legacy/components/avatar/avatar.svelte +0 -46
- package/dist/@legacy/components/avatar/avatar.svelte.d.ts +0 -4
- package/dist/@legacy/components/avatar/types.d.ts +0 -22
- package/dist/@legacy/components/avatar/types.js +0 -1
- package/dist/@legacy/components/button/button.css +0 -240
- package/dist/@legacy/components/button/button.svelte +0 -102
- package/dist/@legacy/components/button/button.svelte.d.ts +0 -4
- package/dist/@legacy/components/button/types.d.ts +0 -29
- package/dist/@legacy/components/button/types.js +0 -1
- package/dist/@legacy/components/card/card.css +0 -105
- package/dist/@legacy/components/card/card.svelte +0 -67
- package/dist/@legacy/components/card/card.svelte.d.ts +0 -4
- package/dist/@legacy/components/card/types.d.ts +0 -20
- package/dist/@legacy/components/card/types.js +0 -1
- package/dist/@legacy/components/chip/chip.css +0 -224
- package/dist/@legacy/components/chip/chip.svelte +0 -131
- package/dist/@legacy/components/chip/chip.svelte.d.ts +0 -4
- package/dist/@legacy/components/chip/types.d.ts +0 -32
- package/dist/@legacy/components/chip/types.js +0 -1
- package/dist/@legacy/components/dialog/dialog.css +0 -129
- package/dist/@legacy/components/dialog/dialog.svelte +0 -67
- package/dist/@legacy/components/dialog/dialog.svelte.d.ts +0 -4
- package/dist/@legacy/components/dialog/types.d.ts +0 -24
- package/dist/@legacy/components/dialog/types.js +0 -1
- package/dist/@legacy/components/dropdown/dropdown.css +0 -13
- package/dist/@legacy/components/dropdown/dropdown.svelte +0 -115
- package/dist/@legacy/components/dropdown/dropdown.svelte.d.ts +0 -4
- package/dist/@legacy/components/dropdown/types.d.ts +0 -26
- package/dist/@legacy/components/dropdown/types.js +0 -1
- package/dist/@legacy/components/icon/icon.css +0 -78
- package/dist/@legacy/components/icon/icon.svelte +0 -49
- package/dist/@legacy/components/icon/icon.svelte.d.ts +0 -4
- package/dist/@legacy/components/icon/types.d.ts +0 -16
- package/dist/@legacy/components/icon/types.js +0 -1
- package/dist/@legacy/components/index.d.ts +0 -22
- package/dist/@legacy/components/index.js +0 -23
- package/dist/@legacy/components/list/list.css +0 -149
- package/dist/@legacy/components/list/list.svelte +0 -44
- package/dist/@legacy/components/list/list.svelte.d.ts +0 -4
- package/dist/@legacy/components/list/modules/list-item.css +0 -67
- package/dist/@legacy/components/list/modules/list-item.svelte +0 -76
- package/dist/@legacy/components/list/modules/list-item.svelte.d.ts +0 -4
- package/dist/@legacy/components/list/types.d.ts +0 -33
- package/dist/@legacy/components/list/types.js +0 -1
- package/dist/@legacy/components/modal/modal.css +0 -137
- package/dist/@legacy/components/modal/modal.svelte +0 -118
- package/dist/@legacy/components/modal/modal.svelte.d.ts +0 -4
- package/dist/@legacy/components/modal/types.d.ts +0 -26
- package/dist/@legacy/components/modal/types.js +0 -1
- package/dist/@legacy/components/popover/popover.css +0 -13
- package/dist/@legacy/components/popover/popover.svelte +0 -73
- package/dist/@legacy/components/popover/popover.svelte.d.ts +0 -4
- package/dist/@legacy/components/popover/types.d.ts +0 -20
- package/dist/@legacy/components/popover/types.js +0 -1
- package/dist/@legacy/components/separator/separator.css +0 -42
- package/dist/@legacy/components/separator/separator.svelte +0 -37
- package/dist/@legacy/components/separator/separator.svelte.d.ts +0 -4
- package/dist/@legacy/components/separator/types.d.ts +0 -15
- package/dist/@legacy/components/separator/types.js +0 -1
- package/dist/@legacy/components/spacer/spacer.css +0 -3
- package/dist/@legacy/components/spacer/spacer.svelte +0 -7
- package/dist/@legacy/components/spacer/spacer.svelte.d.ts +0 -4
- package/dist/@legacy/components/spacer/types.d.ts +0 -4
- package/dist/@legacy/components/spacer/types.js +0 -1
- package/dist/@legacy/components/textfield/textfield.css +0 -298
- package/dist/@legacy/components/textfield/textfield.svelte +0 -193
- package/dist/@legacy/components/textfield/textfield.svelte.d.ts +0 -4
- package/dist/@legacy/components/textfield/types.d.ts +0 -37
- package/dist/@legacy/components/textfield/types.js +0 -1
- package/dist/@legacy/components/toolbar/toolbar.css +0 -106
- package/dist/@legacy/components/toolbar/toolbar.svelte +0 -47
- package/dist/@legacy/components/toolbar/toolbar.svelte.d.ts +0 -4
- package/dist/@legacy/components/toolbar/types.d.ts +0 -27
- package/dist/@legacy/components/toolbar/types.js +0 -1
- package/dist/@legacy/components/tooltip/tooltip.css +0 -116
- package/dist/@legacy/components/tooltip/tooltip.svelte +0 -113
- package/dist/@legacy/components/tooltip/tooltip.svelte.d.ts +0 -4
- package/dist/@legacy/components/tooltip/types.d.ts +0 -23
- package/dist/@legacy/components/tooltip/types.js +0 -1
- package/dist/@legacy/index.d.ts +0 -3
- package/dist/@legacy/index.js +0 -24
- package/dist/@legacy/internal/config/presets.d.ts +0 -149
- package/dist/@legacy/internal/config/presets.js +0 -169
- package/dist/@legacy/internal/config/variables.d.ts +0 -3
- package/dist/@legacy/internal/config/variables.js +0 -3
- package/dist/@legacy/internal/core/actions/assets.svelte.d.ts +0 -8
- package/dist/@legacy/internal/core/actions/assets.svelte.js +0 -54
- package/dist/@legacy/internal/core/actions/dropdown.svelte.d.ts +0 -7
- package/dist/@legacy/internal/core/actions/dropdown.svelte.js +0 -148
- package/dist/@legacy/internal/core/actions/popover.svelte.d.ts +0 -7
- package/dist/@legacy/internal/core/actions/popover.svelte.js +0 -134
- package/dist/@legacy/internal/core/actions/tooltip.svelte.d.ts +0 -7
- package/dist/@legacy/internal/core/actions/tooltip.svelte.js +0 -131
- package/dist/@legacy/internal/core/animations/ripple.d.ts +0 -12
- package/dist/@legacy/internal/core/animations/ripple.js +0 -96
- package/dist/@legacy/internal/core/bin/ansi.d.ts +0 -40
- package/dist/@legacy/internal/core/bin/ansi.js +0 -44
- package/dist/@legacy/internal/core/bin/terminal.d.ts +0 -1
- package/dist/@legacy/internal/core/bin/terminal.js +0 -12
- package/dist/@legacy/internal/core/css.d.ts +0 -1
- package/dist/@legacy/internal/core/css.js +0 -16
- package/dist/@legacy/internal/core/formatter/component.d.ts +0 -5
- package/dist/@legacy/internal/core/formatter/component.js +0 -60
- package/dist/@legacy/internal/core/formatter/device.d.ts +0 -5
- package/dist/@legacy/internal/core/formatter/device.js +0 -66
- package/dist/@legacy/internal/core/formatter/index.d.ts +0 -7
- package/dist/@legacy/internal/core/formatter/index.js +0 -35
- package/dist/@legacy/internal/core/formatter/style.d.ts +0 -4
- package/dist/@legacy/internal/core/formatter/style.js +0 -15
- package/dist/@legacy/internal/core/formatter/theme.d.ts +0 -5
- package/dist/@legacy/internal/core/formatter/theme.js +0 -44
- package/dist/@legacy/internal/core/formatter/typography.d.ts +0 -5
- package/dist/@legacy/internal/core/formatter/typography.js +0 -12
- package/dist/@legacy/internal/core/minify.d.ts +0 -1
- package/dist/@legacy/internal/core/minify.js +0 -10
- package/dist/@legacy/internal/core/standard-colors.d.ts +0 -75
- package/dist/@legacy/internal/core/standard-colors.js +0 -75
- package/dist/@legacy/internal/core/x11-colors.d.ts +0 -4
- package/dist/@legacy/internal/core/x11-colors.js +0 -151
- package/dist/@legacy/internal/helpers/colors.d.ts +0 -1
- package/dist/@legacy/internal/helpers/colors.js +0 -50
- package/dist/@legacy/internal/helpers/convert.d.ts +0 -1
- package/dist/@legacy/internal/helpers/convert.js +0 -17
- package/dist/@legacy/internal/helpers/deep-merge.d.ts +0 -44
- package/dist/@legacy/internal/helpers/deep-merge.js +0 -80
- package/dist/@legacy/internal/helpers/outside.d.ts +0 -9
- package/dist/@legacy/internal/helpers/outside.js +0 -34
- package/dist/@legacy/internal/helpers/parser.d.ts +0 -10
- package/dist/@legacy/internal/helpers/parser.js +0 -93
- package/dist/@legacy/internal/helpers/scroll.d.ts +0 -1
- package/dist/@legacy/internal/helpers/scroll.js +0 -5
- package/dist/@legacy/internal/plugins/vite.d.ts +0 -8
- package/dist/@legacy/internal/plugins/vite.js +0 -33
- package/dist/@legacy/internal/types/components.d.ts +0 -14
- package/dist/@legacy/internal/types/components.js +0 -1
- package/dist/@legacy/internal/types/configuration.d.ts +0 -63
- package/dist/@legacy/internal/types/configuration.js +0 -1
- package/dist/@legacy/internal/types/index.d.ts +0 -2
- package/dist/@legacy/internal/types/index.js +0 -2
- package/dist/@legacy/stores/breakpoints.d.ts +0 -6
- package/dist/@legacy/stores/breakpoints.js +0 -14
- package/dist/@legacy/stores/devices.d.ts +0 -6
- package/dist/@legacy/stores/devices.js +0 -9
- package/dist/@legacy/stores/index.d.ts +0 -5
- package/dist/@legacy/stores/index.js +0 -5
- package/dist/@legacy/stores/themes.js +0 -4
- package/dist/@legacy/stores/viewport.d.ts +0 -7
- package/dist/@legacy/stores/viewport.js +0 -7
- package/dist/@legacy/styles/animation.css +0 -33
- package/dist/@legacy/styles/keyframes.css +0 -30
- package/dist/@legacy/styles/reset.css +0 -133
- package/dist/@legacy/styles.css +0 -0
- package/dist/@legacy/styles.css.d.ts +0 -4
- package/dist/@legacy/themes.css +0 -0
- package/dist/@legacy/themes.css.d.ts +0 -4
- /package/dist/{@legacy/components/accordion/types.js → @types/actions.js} +0 -0
- /package/dist/{@legacy/actions → components/accordion}/accordion.svelte.js +0 -0
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
.kit-appbar {
|
|
2
|
-
--appbar-padding-wrapper: var(--system-spacing) * 4;
|
|
3
|
-
|
|
4
|
-
display: flex;
|
|
5
|
-
align-items: center;
|
|
6
|
-
border-style: solid;
|
|
7
|
-
border-width: 1px;
|
|
8
|
-
border-radius: var(--appbar-shape);
|
|
9
|
-
color: var(--appbar-color, var(--kit-label-primary));
|
|
10
|
-
background-color: var(--appbar-background, var(--kit-background-grouped-tertiary));
|
|
11
|
-
border-color: var(--appbar-background, var(--kit-background-grouped-tertiary));
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/* wrapper */
|
|
15
|
-
.kit-appbar .kit-appbar--wrapper {
|
|
16
|
-
display: flex;
|
|
17
|
-
align-items: center;
|
|
18
|
-
flex-direction: row;
|
|
19
|
-
height: calc(100% - (var(--appbar-padding-wrapper) * 2));
|
|
20
|
-
width: calc(100% - (var(--appbar-padding-wrapper) * 2));
|
|
21
|
-
margin: 0 auto;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/* density */
|
|
25
|
-
.kit-appbar[breakpoint]kit-appbar--density-default {
|
|
26
|
-
height: 4rem;
|
|
27
|
-
padding-inline: calc(var(--system-spacing) * 1.5);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.kit-appbar[breakpoint]kit-appbar--density-compact {
|
|
31
|
-
height: 3.5rem;
|
|
32
|
-
padding-inline: calc(var(--system-spacing) * 0.75);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.kit-appbar[breakpoint]kit-appbar--density-comfortable {
|
|
36
|
-
height: 4.5rem;
|
|
37
|
-
padding-inline: calc(var(--system-spacing) * 2.25);
|
|
38
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { getAssets } from '../../internal/core/actions/assets.svelte.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:--appbar-background={assets.color(background)}
|
|
34
|
-
style:--appbar-color={assets.color(color)}
|
|
35
|
-
style:--appbar-shape={assets.shape(rounded)}
|
|
36
|
-
>
|
|
37
|
-
<div class={['kit-appbar--wrapper', classContent]}>
|
|
38
|
-
{@render children?.()}
|
|
39
|
-
</div>
|
|
40
|
-
</svelte:element>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Component } from '../../internal/types/index.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 {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
.kit-aspect-ratio {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex: 1 0 auto;
|
|
4
|
-
max-height: 100%;
|
|
5
|
-
max-width: 100%;
|
|
6
|
-
overflow: hidden;
|
|
7
|
-
position: relative;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.kit-aspect-ratio--inline {
|
|
11
|
-
display: inline-flex;
|
|
12
|
-
flex: 0 0 auto;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.kit-aspect-ratio--sizer {
|
|
16
|
-
flex: 1 0 0px;
|
|
17
|
-
transition: padding-bottom 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
18
|
-
pointer-events: none;
|
|
19
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { AspectRationProps } from './types.js';
|
|
3
|
-
let { children, aspectRatio, inline, ...rest }: AspectRationProps = $props();
|
|
4
|
-
|
|
5
|
-
let paddingBottom = $state(0);
|
|
6
|
-
|
|
7
|
-
$effect.pre(() => {
|
|
8
|
-
if (aspectRatio) {
|
|
9
|
-
const [width, height] = aspectRatio.split('/').map(Number);
|
|
10
|
-
paddingBottom = (height / width) * 100;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
$effect(() => {
|
|
15
|
-
if (aspectRatio) {
|
|
16
|
-
const [width, height] = aspectRatio.split('/').map(Number);
|
|
17
|
-
paddingBottom = (height / width) * 100;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<div {...rest} class={['kit-aspect-ratio', inline && 'kit-aspect-ratio--inline', rest.class]}>
|
|
23
|
-
<div class="kit-aspect-ratio--sizer" style={`padding-bottom: ${paddingBottom}%;`}></div>
|
|
24
|
-
{@render children?.()}
|
|
25
|
-
</div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
.kit-avatar {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
white-space: nowrap;
|
|
6
|
-
padding-top: var(--avatar-spacing-x);
|
|
7
|
-
padding-bottom: var(--avatar-spacing-x);
|
|
8
|
-
padding-right: var(--avatar-spacing-y);
|
|
9
|
-
padding-left: var(--avatar-spacing-y);
|
|
10
|
-
border-width: 1px;
|
|
11
|
-
border-style: solid;
|
|
12
|
-
border-radius: var(--avatar-shape, var(--system-shape-full));
|
|
13
|
-
color: var(--avatar-color, var(--kit-label-primary));
|
|
14
|
-
background-color: var(--avatar-background, var(--kit-background-secondary));
|
|
15
|
-
border-color: var(--avatar-background, var(--kit-background-secondary));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.kit-avatar.kit-avatar--image {
|
|
19
|
-
position: relative;
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.kit-avatar.kit-avatar--image img {
|
|
24
|
-
position: relative;
|
|
25
|
-
top: 0;
|
|
26
|
-
left: 0;
|
|
27
|
-
width: 100%;
|
|
28
|
-
height: 100%;
|
|
29
|
-
object-fit: cover;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/* size */
|
|
33
|
-
.kit-avatar[breakpoint]kit-avatar--size-xs {
|
|
34
|
-
--avatar-height: 1.75rem;
|
|
35
|
-
--avatar-multiplier-y: 2;
|
|
36
|
-
font-size: 0.75rem;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.kit-avatar[breakpoint]kit-avatar--size-sm {
|
|
40
|
-
--avatar-height: 2rem;
|
|
41
|
-
--avatar-multiplier-y: 3;
|
|
42
|
-
font-size: 0.875rem;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.kit-avatar[breakpoint]kit-avatar--size-md {
|
|
46
|
-
--avatar-height: 2.25rem;
|
|
47
|
-
--avatar-multiplier-y: 4;
|
|
48
|
-
font-size: 0.875rem;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.kit-avatar[breakpoint]kit-avatar--size-lg {
|
|
52
|
-
--avatar-height: 2.5rem;
|
|
53
|
-
--avatar-multiplier-y: 5;
|
|
54
|
-
font-size: 1rem;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.kit-avatar[breakpoint]kit-avatar--size-xl {
|
|
58
|
-
--avatar-height: 2.75rem;
|
|
59
|
-
--avatar-multiplier-y: 6;
|
|
60
|
-
font-size: 1.125rem;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* density */
|
|
64
|
-
.kit-avatar[breakpoint]kit-avatar--density-default {
|
|
65
|
-
height: calc(var(--avatar-height));
|
|
66
|
-
width: calc(var(--avatar-height));
|
|
67
|
-
--avatar-spacing-x: 0;
|
|
68
|
-
--avatar-spacing-y: 0;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.kit-avatar[breakpoint]kit-avatar--density-compact {
|
|
72
|
-
height: calc(var(--avatar-height) - 0.25rem);
|
|
73
|
-
width: calc(var(--avatar-height) - 0.25rem);
|
|
74
|
-
--avatar-spacing-x: 0;
|
|
75
|
-
--avatar-spacing-y: 0;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.kit-avatar[breakpoint]kit-avatar--density-comfortable {
|
|
79
|
-
height: calc(var(--avatar-height) + 0.25rem);
|
|
80
|
-
width: calc(var(--avatar-height) + 0.25rem);
|
|
81
|
-
--avatar-spacing-x: 0;
|
|
82
|
-
--avatar-spacing-y: 0;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/* variant */
|
|
86
|
-
.kit-avatar[breakpoint]kit-avatar--variant-outline {
|
|
87
|
-
--avatar-color: var(--base, var(--kit-background-grouped-tertiary));
|
|
88
|
-
background-color: transparent;
|
|
89
|
-
border: 1px solid currentColor;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.kit-avatar[breakpoint]kit-avatar--variant-text {
|
|
93
|
-
--avatar-color: var(--base, var(--kit-background-grouped-tertiary));
|
|
94
|
-
background-color: transparent;
|
|
95
|
-
border-color: transparent;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.kit-avatar[breakpoint]kit-avatar--variant-dash {
|
|
99
|
-
--avatar-color: var(--base, var(--kit-background-grouped-tertiary));
|
|
100
|
-
background-color: transparent;
|
|
101
|
-
border: 1px dashed currentColor;
|
|
102
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { getAssets } from '../../internal/core/actions/assets.svelte.js';
|
|
3
|
-
import type { AvatarProps } from './types.js';
|
|
4
|
-
let {
|
|
5
|
-
children,
|
|
6
|
-
ref = $bindable(),
|
|
7
|
-
light,
|
|
8
|
-
dark,
|
|
9
|
-
size = 'md',
|
|
10
|
-
rounded,
|
|
11
|
-
alt,
|
|
12
|
-
background,
|
|
13
|
-
color,
|
|
14
|
-
src,
|
|
15
|
-
variant,
|
|
16
|
-
density = 'default',
|
|
17
|
-
...rest
|
|
18
|
-
}: AvatarProps = $props();
|
|
19
|
-
|
|
20
|
-
const assets = getAssets();
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<svelte:element
|
|
24
|
-
this={'div'}
|
|
25
|
-
bind:this={ref}
|
|
26
|
-
{...rest}
|
|
27
|
-
class={[
|
|
28
|
-
'kit-avatar',
|
|
29
|
-
light && 'light',
|
|
30
|
-
dark && 'dark',
|
|
31
|
-
src && 'kit-avatar--image',
|
|
32
|
-
size && assets.className('avatar', 'size', size),
|
|
33
|
-
variant && assets.className('avatar', 'variant', variant),
|
|
34
|
-
density && assets.className('avatar', 'density', density),
|
|
35
|
-
rest.class
|
|
36
|
-
]}
|
|
37
|
-
style:--avatar-background={assets.color(background)}
|
|
38
|
-
style:--avatar-color={assets.color(color)}
|
|
39
|
-
style:--avatar-shape={assets.shape(rounded)}
|
|
40
|
-
>
|
|
41
|
-
{#if src}
|
|
42
|
-
<img {src} {alt} />
|
|
43
|
-
{:else}
|
|
44
|
-
{@render children?.()}
|
|
45
|
-
{/if}
|
|
46
|
-
</svelte:element>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Component } from '../../internal/types/index.js';
|
|
2
|
-
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
3
|
-
type AvatarDensity = 'compact' | 'comfortable' | 'default';
|
|
4
|
-
type AvatarVariant = 'outline' | 'text' | 'dash';
|
|
5
|
-
export interface AvatarProps extends Component {
|
|
6
|
-
ref?: HTMLElement | null;
|
|
7
|
-
dark?: boolean;
|
|
8
|
-
light?: boolean;
|
|
9
|
-
color?: string;
|
|
10
|
-
background?: string;
|
|
11
|
-
src?: string;
|
|
12
|
-
size?: AvatarSize | {
|
|
13
|
-
[key: string]: AvatarSize;
|
|
14
|
-
};
|
|
15
|
-
variant?: AvatarVariant | {
|
|
16
|
-
[key: string]: AvatarVariant;
|
|
17
|
-
};
|
|
18
|
-
density?: AvatarDensity | {
|
|
19
|
-
[key: string]: AvatarDensity;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
.kit-button {
|
|
2
|
-
position: relative;
|
|
3
|
-
cursor: pointer;
|
|
4
|
-
border: none;
|
|
5
|
-
outline: none;
|
|
6
|
-
padding-top: var(--button-spacing-x);
|
|
7
|
-
padding-bottom: var(--button-spacing-x);
|
|
8
|
-
padding-right: var(--button-spacing-y);
|
|
9
|
-
padding-left: var(--button-spacing-y);
|
|
10
|
-
border-radius: var(--button-shape, var(--system-shape-md));
|
|
11
|
-
color: var(--button-color, var(--kit-label-primary));
|
|
12
|
-
font-weight: 500;
|
|
13
|
-
text-decoration: none;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.kit-button,
|
|
17
|
-
.kit-button .kit-button-content,
|
|
18
|
-
.kit-button .kit-button-append,
|
|
19
|
-
.kit-button .kit-button-prepend,
|
|
20
|
-
.kit-button .kit-button-loading {
|
|
21
|
-
display: inline-flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
justify-content: center;
|
|
24
|
-
white-space: nowrap;
|
|
25
|
-
gap: calc(var(--system-spacing) * var(--button-multiplier-gap));
|
|
26
|
-
font-size: calc(var(--system-spacing) * var(--button-multiplier-font-size));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.kit-button::after {
|
|
30
|
-
content: '';
|
|
31
|
-
position: absolute;
|
|
32
|
-
inset: 0;
|
|
33
|
-
background-color: currentColor;
|
|
34
|
-
opacity: 0;
|
|
35
|
-
transition: opacity 150ms ease;
|
|
36
|
-
pointer-events: none;
|
|
37
|
-
border-radius: inherit;
|
|
38
|
-
}
|
|
39
|
-
.kit-button:hover::after {
|
|
40
|
-
opacity: 0.08;
|
|
41
|
-
}
|
|
42
|
-
.kit-button:active::after {
|
|
43
|
-
opacity: 0.12;
|
|
44
|
-
}
|
|
45
|
-
.kit-button:focus-visible::after {
|
|
46
|
-
opacity: 0.12;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/* size */
|
|
50
|
-
.kit-button[breakpoint]kit-button--size-xs {
|
|
51
|
-
--button-multiplier-x: 12;
|
|
52
|
-
--button-multiplier-y: 2;
|
|
53
|
-
--button-multiplier-gap: 2;
|
|
54
|
-
--button-multiplier-font-size: 6;
|
|
55
|
-
}
|
|
56
|
-
.kit-button[breakpoint]kit-button--size-xs .kit-icon[class*='kit-icon--size-md'] {
|
|
57
|
-
--icon-multiplier-parent-size: 7;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.kit-button[breakpoint]kit-button--size-sm {
|
|
61
|
-
--button-multiplier-x: 16;
|
|
62
|
-
--button-multiplier-y: 3;
|
|
63
|
-
--button-multiplier-gap: 4;
|
|
64
|
-
--button-multiplier-font-size: 7;
|
|
65
|
-
}
|
|
66
|
-
.kit-button[breakpoint]kit-button--size-sm .kit-icon[class*='kit-icon--size-md'] {
|
|
67
|
-
--icon-multiplier-parent-size: 8;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.kit-button[breakpoint]kit-button--size-md {
|
|
71
|
-
--button-multiplier-x: 20;
|
|
72
|
-
--button-multiplier-y: 4;
|
|
73
|
-
--button-multiplier-gap: 4;
|
|
74
|
-
--button-multiplier-font-size: 8;
|
|
75
|
-
}
|
|
76
|
-
.kit-button[breakpoint]kit-button--size-md .kit-icon[class*='kit-icon--size-md'] {
|
|
77
|
-
--icon-multiplier-parent-size: 9;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.kit-button[breakpoint]kit-button--size-lg {
|
|
81
|
-
--button-multiplier-x: 24;
|
|
82
|
-
--button-multiplier-y: 5;
|
|
83
|
-
--button-multiplier-gap: 4;
|
|
84
|
-
--button-multiplier-font-size: 9;
|
|
85
|
-
}
|
|
86
|
-
.kit-button[breakpoint]kit-button--size-lg .kit-icon[class*='kit-icon--size-md'] {
|
|
87
|
-
--icon-multiplier-parent-size: 10;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.kit-button[breakpoint]kit-button--size-xl {
|
|
91
|
-
--button-multiplier-x: 28;
|
|
92
|
-
--button-multiplier-y: 6;
|
|
93
|
-
--button-multiplier-gap: 5;
|
|
94
|
-
--button-multiplier-font-size: 10;
|
|
95
|
-
}
|
|
96
|
-
.kit-button[breakpoint]kit-button--size-xl .kit-icon[class*='kit-icon--size-md'] {
|
|
97
|
-
--icon-multiplier-parent-size: 11;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/* density */
|
|
101
|
-
.kit-button:not(.kit-button--icon)[breakpoint]kit-button--density-default {
|
|
102
|
-
height: calc(var(--system-spacing) * var(--button-multiplier-x));
|
|
103
|
-
--button-spacing-x: 0;
|
|
104
|
-
--button-spacing-y: calc(var(--system-spacing) * var(--button-multiplier-y));
|
|
105
|
-
}
|
|
106
|
-
.kit-button.kit-button--icon[breakpoint]kit-button--density-default {
|
|
107
|
-
height: calc(var(--system-spacing) * var(--button-multiplier-x));
|
|
108
|
-
width: calc(var(--system-spacing) * var(--button-multiplier-x));
|
|
109
|
-
--button-spacing-x: 0;
|
|
110
|
-
--button-spacing-y: 0;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.kit-button:not(.kit-button--icon)[breakpoint]kit-button--density-compact {
|
|
114
|
-
height: calc(var(--system-spacing) * var(--button-multiplier-x) - 0.25rem);
|
|
115
|
-
--button-spacing-x: 0;
|
|
116
|
-
--button-spacing-y: calc(var(--system-spacing) * var(--button-multiplier-y) - 0.25rem);
|
|
117
|
-
}
|
|
118
|
-
.kit-button.kit-button--icon[breakpoint]kit-button--density-compact {
|
|
119
|
-
height: calc(var(--system-spacing) * var(--button-multiplier-x) - 0.25rem);
|
|
120
|
-
width: calc(var(--system-spacing) * var(--button-multiplier-x) - 0.25rem);
|
|
121
|
-
--button-spacing-x: 0;
|
|
122
|
-
--button-spacing-y: 0;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.kit-button:not(.kit-button--icon)[breakpoint]kit-button--density-comfortable {
|
|
126
|
-
height: calc(var(--system-spacing) * var(--button-multiplier-x) + 0.25rem);
|
|
127
|
-
--button-spacing-x: 0;
|
|
128
|
-
--button-spacing-y: calc(var(--system-spacing) * var(--button-multiplier-y) + 0.25rem);
|
|
129
|
-
}
|
|
130
|
-
.kit-button.kit-button--icon[breakpoint]kit-button--density-comfortable {
|
|
131
|
-
height: calc(var(--system-spacing) * var(--button-multiplier-x) + 0.25rem);
|
|
132
|
-
width: calc(var(--system-spacing) * var(--button-multiplier-x) + 0.25rem);
|
|
133
|
-
--button-spacing-x: 0;
|
|
134
|
-
--button-spacing-y: 0;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/* variant */
|
|
138
|
-
.kit-button[breakpoint]kit-button--variant-filled {
|
|
139
|
-
background-color: var(--button-background, var(--kit-background-grouped-primary));
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.kit-button[breakpoint]kit-button--variant-outline {
|
|
143
|
-
--button-color: var(--on, var(--kit-label-primary));
|
|
144
|
-
background-color: var(--button-background, var(--kit-background-grouped-primary));
|
|
145
|
-
}
|
|
146
|
-
.kit-button[breakpoint]kit-button--variant-outline::before {
|
|
147
|
-
content: '';
|
|
148
|
-
position: absolute;
|
|
149
|
-
inset: 0;
|
|
150
|
-
border: 1px solid currentColor;
|
|
151
|
-
pointer-events: none;
|
|
152
|
-
border-radius: inherit;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.kit-button[breakpoint]kit-button--variant-text {
|
|
156
|
-
--button-color: var(--base, var(--kit-label-primary));
|
|
157
|
-
background-color: transparent;
|
|
158
|
-
border: none;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/* state */
|
|
162
|
-
.kit-button.kit-button--info[class*='button--variant-filled'] {
|
|
163
|
-
--on: var(--kit-on-info);
|
|
164
|
-
--base: var(--kit-accent-info);
|
|
165
|
-
}
|
|
166
|
-
.kit-button.kit-button--info[class*='button--variant-']:not([class*='variant-filled']) {
|
|
167
|
-
--base: var(--kit-accent-info);
|
|
168
|
-
}
|
|
169
|
-
.kit-button.kit-button--success[class*='button--variant-filled'] {
|
|
170
|
-
--on: var(--kit-on-success);
|
|
171
|
-
--base: var(--kit-accent-successs);
|
|
172
|
-
}
|
|
173
|
-
.kit-button.kit-button--success[class*='button--variant-']:not([class*='variant-filled']) {
|
|
174
|
-
--base: var(--kit-accent-successs);
|
|
175
|
-
}
|
|
176
|
-
.kit-button.kit-button--warning[class*='button--variant-filled'] {
|
|
177
|
-
--on: var(--kit-on-warning);
|
|
178
|
-
--base: var(--kit-accent-warning);
|
|
179
|
-
}
|
|
180
|
-
.kit-button.kit-button--warning[class*='button--variant-']:not([class*='variant-filled']) {
|
|
181
|
-
--base: var(--kit-accent-warning);
|
|
182
|
-
}
|
|
183
|
-
.kit-button.kit-button--error[class*='button--variant-filled'] {
|
|
184
|
-
--on: var(--kit-on-error);
|
|
185
|
-
--base: var(--kit-accent-destructive);
|
|
186
|
-
}
|
|
187
|
-
.kit-button.kit-button--error[class*='button--variant-']:not([class*='variant-filled']) {
|
|
188
|
-
--base: var(--kit-accent-destructive);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/* events */
|
|
192
|
-
.kit-button[class*='button--variant-filled']:active,
|
|
193
|
-
.kit-button.kit-button--active[class*='button--variant-filled'] {
|
|
194
|
-
background-color: color-mix(in oklab, var(--button-background) 90%, var(--kit-state-shadow));
|
|
195
|
-
}
|
|
196
|
-
.kit-button.kit-button--active[class*='button--variant-']:not([class*='variant-filled']):active,
|
|
197
|
-
.kit-button.kit-button--active[class*='button--variant-']:not([class*='variant-filled']) {
|
|
198
|
-
background-color: color-mix(in oklab, currentColor 15%, transparent);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/* icon */
|
|
202
|
-
.kit-button i::before,
|
|
203
|
-
.kit-button .kit-icon {
|
|
204
|
-
--base-parent: var(--button-color);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/* disabled */
|
|
208
|
-
.kit-button.kit-button--disabled,
|
|
209
|
-
.kit-button[disabled],
|
|
210
|
-
.kit-button.kit-button--loading {
|
|
211
|
-
pointer-events: none;
|
|
212
|
-
user-select: none;
|
|
213
|
-
cursor: default;
|
|
214
|
-
}
|
|
215
|
-
.kit-button[class*='button--variant-filled'].kit-button--disabled {
|
|
216
|
-
color: color-mix(in oklab, var(--button-color) 40%, transparent) !important;
|
|
217
|
-
background-color: color-mix(in oklab, var(--button-background) 70%, transparent) !important;
|
|
218
|
-
}
|
|
219
|
-
.kit-button[class*='button--variant-filled'].kit-button--disabled i:before {
|
|
220
|
-
color: color-mix(in oklab, var(--button-color) 40%, transparent) !important;
|
|
221
|
-
}
|
|
222
|
-
.kit-button[class*='button--variant-']:not([class*='variant-filled']).kit-button--disabled,
|
|
223
|
-
.kit-button[class*='button--variant-']:not([class*='variant-filled']).kit-button--disabled
|
|
224
|
-
i::before {
|
|
225
|
-
color: color-mix(in oklab, var(--button-background) 40%, transparent) !important;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/* loading */
|
|
229
|
-
.kit-button.kit-button--loading > .kit-button-content,
|
|
230
|
-
.kit-button.kit-button--loading > .kit-button-append,
|
|
231
|
-
.kit-button.kit-button--loading > .kit-button-prepend {
|
|
232
|
-
visibility: hidden;
|
|
233
|
-
}
|
|
234
|
-
.kit-button.kit-button--loading > .kit-button-loading {
|
|
235
|
-
position: absolute;
|
|
236
|
-
min-width: fit-content;
|
|
237
|
-
}
|
|
238
|
-
.kit-button.kit-button--loading > .kit-button-loading .kit-icon-load {
|
|
239
|
-
animation: icon-rotate 1s ease-out infinite;
|
|
240
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { getAssets } from '../../internal/core/actions/assets.svelte.js';
|
|
3
|
-
import type { ButtonProps } from './types.js';
|
|
4
|
-
|
|
5
|
-
// external
|
|
6
|
-
import { Icon } from '../index.js';
|
|
7
|
-
import LoadingFill from '../../assets/icons/loading-fill.svelte';
|
|
8
|
-
import { ripple } from '../../internal/core/animations/ripple.js';
|
|
9
|
-
|
|
10
|
-
let {
|
|
11
|
-
children,
|
|
12
|
-
prepend,
|
|
13
|
-
append,
|
|
14
|
-
ref = $bindable(),
|
|
15
|
-
is = 'button',
|
|
16
|
-
href,
|
|
17
|
-
dark,
|
|
18
|
-
light,
|
|
19
|
-
active,
|
|
20
|
-
variant = 'filled',
|
|
21
|
-
error,
|
|
22
|
-
info,
|
|
23
|
-
success,
|
|
24
|
-
warning,
|
|
25
|
-
density = 'default',
|
|
26
|
-
disabled,
|
|
27
|
-
size = 'md',
|
|
28
|
-
type = 'button',
|
|
29
|
-
background,
|
|
30
|
-
color,
|
|
31
|
-
loading,
|
|
32
|
-
rounded,
|
|
33
|
-
icon,
|
|
34
|
-
load,
|
|
35
|
-
noRipple,
|
|
36
|
-
...rest
|
|
37
|
-
}: ButtonProps = $props();
|
|
38
|
-
|
|
39
|
-
const assets = getAssets();
|
|
40
|
-
</script>
|
|
41
|
-
|
|
42
|
-
<svelte:element
|
|
43
|
-
this={href ? 'a' : is}
|
|
44
|
-
bind:this={ref}
|
|
45
|
-
{...rest}
|
|
46
|
-
href={href && !disabled ? href : undefined}
|
|
47
|
-
class={[
|
|
48
|
-
'kit-button',
|
|
49
|
-
light && 'light',
|
|
50
|
-
dark && 'dark',
|
|
51
|
-
size && assets.className('button', 'size', size),
|
|
52
|
-
variant && assets.className('button', 'variant', variant),
|
|
53
|
-
density && assets.className('button', 'density', density),
|
|
54
|
-
error && 'kit-button--error',
|
|
55
|
-
info && 'kit-button--info',
|
|
56
|
-
success && 'kit-button--success',
|
|
57
|
-
warning && 'kit-button--warning',
|
|
58
|
-
disabled && 'kit-button--disabled',
|
|
59
|
-
active && 'kit-button--active',
|
|
60
|
-
loading && 'kit-button--loading',
|
|
61
|
-
icon && 'kit-button--icon',
|
|
62
|
-
rest.class
|
|
63
|
-
]}
|
|
64
|
-
tabindex={href && disabled ? -1 : 0}
|
|
65
|
-
disabled={href ? undefined : disabled}
|
|
66
|
-
type={href ? undefined : type}
|
|
67
|
-
use:ripple={{
|
|
68
|
-
component: 'button',
|
|
69
|
-
disabled: noRipple || disabled
|
|
70
|
-
}}
|
|
71
|
-
style:--button-background={assets.color(background)}
|
|
72
|
-
style:--button-color={assets.color(color)}
|
|
73
|
-
style:--button-shape={assets.shape(rounded)}
|
|
74
|
-
>
|
|
75
|
-
{#if loading}
|
|
76
|
-
<div class="kit-button-loading">
|
|
77
|
-
{#if load}
|
|
78
|
-
{@render load?.()}
|
|
79
|
-
{:else}
|
|
80
|
-
<Icon class="kit-icon-load">
|
|
81
|
-
<LoadingFill />
|
|
82
|
-
</Icon>
|
|
83
|
-
{/if}
|
|
84
|
-
</div>
|
|
85
|
-
{/if}
|
|
86
|
-
|
|
87
|
-
{#if prepend}
|
|
88
|
-
<div class="kit-button-prepend">
|
|
89
|
-
{@render prepend?.()}
|
|
90
|
-
</div>
|
|
91
|
-
{/if}
|
|
92
|
-
|
|
93
|
-
<div class="kit-button-content">
|
|
94
|
-
{@render children?.()}
|
|
95
|
-
</div>
|
|
96
|
-
|
|
97
|
-
{#if append}
|
|
98
|
-
<div class="kit-button-append">
|
|
99
|
-
{@render append?.()}
|
|
100
|
-
</div>
|
|
101
|
-
{/if}
|
|
102
|
-
</svelte:element>
|