lapikit 0.0.0-insiders.e7dc3e5 → 0.0.0-insiders.e82bc5b
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/components/aspect-ratio/aspect-ratio.svelte +23 -0
- package/dist/components/button/button.css +3 -3
- package/dist/components/card/card.css +109 -0
- package/dist/components/card/card.svelte +50 -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 +3 -4
- package/dist/components/chip/chip.svelte +5 -5
- package/dist/components/chip/types.d.ts +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/list/list.css +1 -1
- package/dist/components/toolbar/toolbar.css +142 -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/package.json +1 -1
|
@@ -23,3 +23,26 @@
|
|
|
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
|
+
background-color: aqua;
|
|
30
|
+
display: flex;
|
|
31
|
+
flex: 1 0 auto;
|
|
32
|
+
max-height: 100%;
|
|
33
|
+
max-width: 100%;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
position: relative;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.kit-aspect-ratio--inline {
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
flex: 0 0 auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.kit-aspect-ratio--sizer {
|
|
44
|
+
flex: 1 0 0px;
|
|
45
|
+
transition: padding-bottom 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
}
|
|
48
|
+
</style>
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
/* density */
|
|
83
83
|
.kit-btn:not(.kit-btn--icon)[breakpoint]kit-btn--density-default {
|
|
84
84
|
height: calc(var(--btn-height));
|
|
85
|
-
min-width: calc(var(--btn-height));
|
|
85
|
+
/* min-width: calc(var(--btn-height)); */
|
|
86
86
|
--btn-spacing-x: 0;
|
|
87
87
|
--btn-spacing-y: calc(var(--kit-spacing) * var(--btn-multiplier-y));
|
|
88
88
|
}
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
|
|
96
96
|
.kit-btn:not(.kit-btn--icon)[breakpoint]kit-btn--density-compact {
|
|
97
97
|
height: calc(var(--btn-height) - 0.25rem);
|
|
98
|
-
min-width: calc(var(--btn-height - 0.25rem));
|
|
98
|
+
/* min-width: calc(var(--btn-height - 0.25rem)); */
|
|
99
99
|
--btn-spacing-x: 0;
|
|
100
100
|
--btn-spacing-y: calc(var(--kit-spacing) * var(--btn-multiplier-y) - 0.25rem);
|
|
101
101
|
}
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
|
|
109
109
|
.kit-btn:not(.kit-btn--icon)[breakpoint]kit-btn--density-comfortable {
|
|
110
110
|
height: calc(var(--btn-height) + 0.25rem);
|
|
111
|
-
min-width: calc(var(--btn-height) + 0.25rem);
|
|
111
|
+
/* min-width: calc(var(--btn-height) + 0.25rem); */
|
|
112
112
|
--btn-spacing-x: 0;
|
|
113
113
|
--btn-spacing-y: calc(var(--kit-spacing) * var(--btn-multiplier-y) + 0.25rem);
|
|
114
114
|
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
.kit-card {
|
|
2
|
+
--card-color: var(--on, var(--kit-on-neutral));
|
|
3
|
+
--card-background: var(--base, var(--kit-neutral));
|
|
4
|
+
--card-radius: var(--shape, var(--kit-radius-md));
|
|
5
|
+
|
|
6
|
+
position: relative;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
text-align: start;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
transition:
|
|
12
|
+
color 0.5s,
|
|
13
|
+
background-color 0.5s;
|
|
14
|
+
|
|
15
|
+
padding-top: var(--card-spacing-x);
|
|
16
|
+
padding-bottom: var(--card-spacing-x);
|
|
17
|
+
padding-right: var(--card-spacing-y);
|
|
18
|
+
padding-left: var(--card-spacing-y);
|
|
19
|
+
|
|
20
|
+
border-width: 1px;
|
|
21
|
+
border-style: solid;
|
|
22
|
+
border-radius: var(--card-radius);
|
|
23
|
+
|
|
24
|
+
/* theme */
|
|
25
|
+
color: var(--card-color);
|
|
26
|
+
background-color: var(--card-background);
|
|
27
|
+
border-color: var(--card-background);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* density */
|
|
31
|
+
.kit-card[breakpoint]kit-card--density-default {
|
|
32
|
+
--card-spacing-x: 0.25rem;
|
|
33
|
+
--card-spacing-y: 0.25rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.kit-card[breakpoint]kit-card--density-compact {
|
|
37
|
+
--card-spacing-x: 0;
|
|
38
|
+
--card-spacing-y: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.kit-card[breakpoint]kit-card--density-comfortable {
|
|
42
|
+
--card-spacing-x: 0.5rem;
|
|
43
|
+
--card-spacing-y: 0.5rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
a.kit-card {
|
|
47
|
+
text-decoration: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.kit-card:hover:not(div) {
|
|
51
|
+
background-color: color-mix(in oklab, var(--card-background) 90%, black);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.kit-card:focus:not(div) {
|
|
55
|
+
background-color: color-mix(in oklab, var(--card-background) 95%, black);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.kit-card:active:not(div),
|
|
59
|
+
.kit-card.kit-card--active {
|
|
60
|
+
background-color: color-mix(in oklab, var(--card-background) 95%, black);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.kit-card:not(div) {
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.kit-card.kit-card--variant-outline {
|
|
68
|
+
border-color: currentColor;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.kit-card.kit-card--variant-text {
|
|
72
|
+
border-color: transparent;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.kit-card.kit-card--variant-outline,
|
|
76
|
+
.kit-card.kit-card--variant-text {
|
|
77
|
+
--card-color: var(--base, var(--kit-neutral));
|
|
78
|
+
background-color: transparent;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.kit-card.kit-card--variant-outline:hover:not(div),
|
|
82
|
+
.kit-card.kit-card--variant-text:hover:not(div) {
|
|
83
|
+
background-color: color-mix(in oklab, currentColor 7%, transparent);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.kit-card.kit-card--variant-outline:focus:not(div),
|
|
87
|
+
.kit-card.kit-card--variant-text:focus:not(div) {
|
|
88
|
+
background-color: color-mix(in oklab, currentColor 15%, transparent);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.kit-card.kit-card--variant-outline:active:not(div),
|
|
92
|
+
.kit-card.kit-card--variant-text:active:not(div),
|
|
93
|
+
.kit-card.kit-card--variant-outline.kit-card--active,
|
|
94
|
+
.kit-card.kit-card--variant-text.kit-card--active {
|
|
95
|
+
background-color: color-mix(in oklab, currentColor 10%, transparent);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.kit-card.kit-card--disabled,
|
|
99
|
+
.kit-card[disabled],
|
|
100
|
+
.kit-card:disabled {
|
|
101
|
+
pointer-events: none;
|
|
102
|
+
user-select: none;
|
|
103
|
+
opacity: 0.6;
|
|
104
|
+
}
|
|
105
|
+
.kit-card.kit-card--disabled > *,
|
|
106
|
+
.kit-card[disabled] > *,
|
|
107
|
+
.kit-card:disabled > * {
|
|
108
|
+
opacity: 0.6;
|
|
109
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { getAssets } from '../../internal/index.js';
|
|
3
|
+
import type { CardProps } from './types.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
children,
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
is = 'div',
|
|
9
|
+
href,
|
|
10
|
+
dark,
|
|
11
|
+
light,
|
|
12
|
+
active,
|
|
13
|
+
density = 'default',
|
|
14
|
+
variant,
|
|
15
|
+
disabled,
|
|
16
|
+
rounded,
|
|
17
|
+
color,
|
|
18
|
+
background,
|
|
19
|
+
...rest
|
|
20
|
+
}: CardProps = $props();
|
|
21
|
+
|
|
22
|
+
const assets = getAssets();
|
|
23
|
+
|
|
24
|
+
$effect(() => {
|
|
25
|
+
if (href) is = 'a';
|
|
26
|
+
});
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<svelte:element
|
|
30
|
+
this={is}
|
|
31
|
+
bind:this={ref}
|
|
32
|
+
{...rest}
|
|
33
|
+
href={href && !disabled ? href : undefined}
|
|
34
|
+
class={[
|
|
35
|
+
'kit-card',
|
|
36
|
+
light && 'light',
|
|
37
|
+
dark && 'dark',
|
|
38
|
+
variant && assets.className('card', 'variant', variant),
|
|
39
|
+
density && assets.className('card', 'density', density),
|
|
40
|
+
active && 'kit-card--active',
|
|
41
|
+
disabled && 'kit-card--disabled',
|
|
42
|
+
rest.class
|
|
43
|
+
]}
|
|
44
|
+
disabled={href ? undefined : disabled}
|
|
45
|
+
style:--base={assets.color(background)}
|
|
46
|
+
style:--on={assets.color(color)}
|
|
47
|
+
style:--shape={assets.shape(rounded)}
|
|
48
|
+
>
|
|
49
|
+
{@render children?.()}
|
|
50
|
+
</svelte:element>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Component } from '../../internal/types.js';
|
|
2
|
+
type Density = 'compact' | 'comfortable' | 'default';
|
|
3
|
+
export interface CardProps extends Component {
|
|
4
|
+
is?: 'a' | 'button' | 'div';
|
|
5
|
+
dark?: boolean;
|
|
6
|
+
light?: boolean;
|
|
7
|
+
href?: string;
|
|
8
|
+
variant?: 'outline' | 'text';
|
|
9
|
+
density?: Density | {
|
|
10
|
+
[key: string]: Density;
|
|
11
|
+
};
|
|
12
|
+
active?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
rounded?: string;
|
|
15
|
+
color?: string;
|
|
16
|
+
background?: string;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -28,6 +28,9 @@ button.kit-chip {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.kit-chip .kit-chip-content,
|
|
31
|
+
.kit-chip .kit-chip-append,
|
|
32
|
+
.kit-chip .kit-chip-prepend,
|
|
33
|
+
.kit-chip .kit-chip--close,
|
|
31
34
|
.kit-chip .kit-chip-loading {
|
|
32
35
|
display: inline-flex;
|
|
33
36
|
align-items: center;
|
|
@@ -84,10 +87,6 @@ button.kit-chip {
|
|
|
84
87
|
border: 1px solid currentColor;
|
|
85
88
|
}
|
|
86
89
|
|
|
87
|
-
.kit-chip[breakpoint]kit-chip--variant-label {
|
|
88
|
-
border-radius: var(--kit-radius-md);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
90
|
/* density */
|
|
92
91
|
.kit-chip[breakpoint]kit-chip--density-default {
|
|
93
92
|
height: calc(var(--chip-height));
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
prepend,
|
|
16
16
|
ref = $bindable(),
|
|
17
17
|
open = $bindable(true),
|
|
18
|
-
is = '
|
|
18
|
+
is = 'div',
|
|
19
19
|
href,
|
|
20
20
|
dark,
|
|
21
21
|
light,
|
|
@@ -85,17 +85,17 @@
|
|
|
85
85
|
{/if}
|
|
86
86
|
|
|
87
87
|
{#if prepend}
|
|
88
|
-
<
|
|
88
|
+
<span class="kit-chip-prepend">
|
|
89
89
|
{@render prepend?.()}
|
|
90
|
-
</
|
|
90
|
+
</span>
|
|
91
91
|
{/if}
|
|
92
92
|
<span class="kit-chip-content">
|
|
93
93
|
{@render children?.()}
|
|
94
94
|
</span>
|
|
95
95
|
{#if append}
|
|
96
|
-
<
|
|
96
|
+
<span class="kit-chip-append">
|
|
97
97
|
{@render append?.()}
|
|
98
|
-
</
|
|
98
|
+
</span>
|
|
99
99
|
{/if}
|
|
100
100
|
|
|
101
101
|
{#if closable}
|
|
@@ -15,3 +15,5 @@ export { default as AccordionItem } from './accordion/modules/accordion-item.sve
|
|
|
15
15
|
export { default as AspectRatio } from './aspect-ratio/aspect-ratio.svelte';
|
|
16
16
|
export { default as Alert } from './alert/alert.svelte';
|
|
17
17
|
export { default as Chip } from './chip/chip.svelte';
|
|
18
|
+
export { default as Card } from './card/card.svelte';
|
|
19
|
+
export { default as Toolbar } from './toolbar/toolbar.svelte';
|
package/dist/components/index.js
CHANGED
|
@@ -16,3 +16,5 @@ export { default as AccordionItem } from './accordion/modules/accordion-item.sve
|
|
|
16
16
|
export { default as AspectRatio } from './aspect-ratio/aspect-ratio.svelte';
|
|
17
17
|
export { default as Alert } from './alert/alert.svelte';
|
|
18
18
|
export { default as Chip } from './chip/chip.svelte';
|
|
19
|
+
export { default as Card } from './card/card.svelte';
|
|
20
|
+
export { default as Toolbar } from './toolbar/toolbar.svelte';
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
height: calc(var(--list-height) - 0.25rem);
|
|
73
73
|
min-width: calc(var(--list-height - 0.25rem));
|
|
74
74
|
--list-spacing-x: 0;
|
|
75
|
-
--list-spacing-y: calc(var(--
|
|
75
|
+
--list-spacing-y: calc(var(--kit-spacing) * var(--list-multiplier-y) - 0.25rem);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
.kit-list[breakpoint]kit-list--density-comfortable .kit-list-item {
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
.kit-toolbar {
|
|
2
|
+
--toolbar-color: var(--on, var(--kit-on-neutral));
|
|
3
|
+
--toolbar-background: var(--base, var(--kit-neutral));
|
|
4
|
+
--toolbar-radius: var(--shape, var(--kit-radius-md));
|
|
5
|
+
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
min-width: max-content;
|
|
9
|
+
border-style: solid;
|
|
10
|
+
transition:
|
|
11
|
+
color 0.5s,
|
|
12
|
+
border-color 0.5s,
|
|
13
|
+
background-color 0.5s;
|
|
14
|
+
|
|
15
|
+
border-width: 1px;
|
|
16
|
+
border-style: solid;
|
|
17
|
+
border-radius: var(--toolbar-radius);
|
|
18
|
+
|
|
19
|
+
/* theme */
|
|
20
|
+
color: var(--toolbar-color);
|
|
21
|
+
background-color: var(--toolbar-background);
|
|
22
|
+
border-color: var(--toolbar-background);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* density */
|
|
26
|
+
.kit-card[breakpoint]kit-card--density-default {
|
|
27
|
+
--card-spacing-x: 0.25rem;
|
|
28
|
+
--card-spacing-y: 0.25rem;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.kit-card[breakpoint]kit-card--density-compact {
|
|
32
|
+
--card-spacing-x: 0;
|
|
33
|
+
--card-spacing-y: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.kit-card[breakpoint]kit-card--density-comfortable {
|
|
37
|
+
--card-spacing-x: 0.5rem;
|
|
38
|
+
--card-spacing-y: 0.5rem;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* density */
|
|
42
|
+
.kit-toolbar[breakpoint]kit-toolbar--density-default {
|
|
43
|
+
border-radius: calc(var(--kit-spacing) * 2.25);
|
|
44
|
+
}
|
|
45
|
+
.kit-toolbar[breakpoint]kit-toolbar--density-default:not([class*='toolbar--orientation-vertical']) {
|
|
46
|
+
height: 3rem;
|
|
47
|
+
padding-inline: calc(var(--kit-spacing) * 1.5);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.kit-toolbar[breakpoint]kit-toolbar--density-default[class*='toolbar--orientation-vertical'] {
|
|
51
|
+
width: 3rem;
|
|
52
|
+
padding: calc(var(--kit-spacing) * 1.5) 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.kit-toolbar[breakpoint]kit-toolbar--density-compact {
|
|
56
|
+
border-radius: calc(var(--kit-spacing) * 1.75);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.kit-toolbar[breakpoint]kit-toolbar--density-compact:not([class*='toolbar--orientation-vertical']) {
|
|
60
|
+
height: 2.625rem;
|
|
61
|
+
padding-inline: calc(var(--kit-spacing) * 0.75);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.kit-toolbar[breakpoint]kit-toolbar--density-compact[class*='toolbar--orientation-vertical'] {
|
|
65
|
+
width: 2.625rem;
|
|
66
|
+
padding: calc(var(--kit-spacing) * 0.75) 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.kit-toolbar[breakpoint]kit-toolbar--density-comfortable {
|
|
70
|
+
border-radius: calc(var(--kit-spacing) * 3.5);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.kit-toolbar[breakpoint]kit-toolbar--density-comfortable:not(
|
|
74
|
+
[class*='toolbar--orientation-vertical']
|
|
75
|
+
) {
|
|
76
|
+
height: 3.5rem;
|
|
77
|
+
padding-inline: calc(var(--kit-spacing) * 2.25);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.kit-toolbar[breakpoint]kit-toolbar--density-comfortable[class*='toolbar--orientation-vertical'] {
|
|
81
|
+
width: 3.5rem;
|
|
82
|
+
padding: calc(var(--kit-spacing) * 2.25) 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.kit-toolbar[breakpoint]kit-toolbar--variant-text,
|
|
86
|
+
.kit-toolbar[breakpoint]kit-toolbar--variant-outline,
|
|
87
|
+
.kit-toolbar[breakpoint]kit-toolbar--variant-dash {
|
|
88
|
+
--toolbar-color: var(--base, var(--kit-neutral));
|
|
89
|
+
background-color: transparent;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.kit-toolbar[breakpoint]kit-toolbar--variant-outline {
|
|
93
|
+
border-color: currentColor;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.kit-toolbar[breakpoint]kit-toolbar--variant-dash {
|
|
97
|
+
border-style: dashed;
|
|
98
|
+
border-color: currentColor;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.kit-toolbar[breakpoint]kit-toolbar--orientation-horizontal {
|
|
102
|
+
flex-direction: row;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.kit-toolbar[breakpoint]kit-toolbar--orientation-vertical {
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
min-height: fit-content;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* wrapper */
|
|
111
|
+
.kit-toolbar .kit-toolbar--wrapper {
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
/* margin-left: auto;
|
|
115
|
+
margin-right: auto; */
|
|
116
|
+
flex-direction: row;
|
|
117
|
+
height: auto;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.kit-toolbar[breakpoint]kit-toolbar--orientation-vertical .kit-toolbar--wrapper {
|
|
121
|
+
flex-direction: column;
|
|
122
|
+
height: 100%;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* location */
|
|
126
|
+
.kit-toolbar[breakpoint]kit-toolbar--location-top {
|
|
127
|
+
top: 0px;
|
|
128
|
+
z-index: 1004;
|
|
129
|
+
transform: translateY(0px);
|
|
130
|
+
position: fixed;
|
|
131
|
+
left: 0px;
|
|
132
|
+
width: calc(100% + 0px);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.kit-toolbar[breakpoint]kit-toolbar--location-bottom {
|
|
136
|
+
z-index: 1004;
|
|
137
|
+
transform: translateY(0px);
|
|
138
|
+
position: fixed;
|
|
139
|
+
left: 0px;
|
|
140
|
+
width: calc(100% + 0px);
|
|
141
|
+
bottom: 0px;
|
|
142
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { getAssets } from '../../internal/index.js';
|
|
3
|
+
import type { ToolbarProps } from './types.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
children,
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
is = 'div',
|
|
9
|
+
classContent,
|
|
10
|
+
light,
|
|
11
|
+
dark,
|
|
12
|
+
variant,
|
|
13
|
+
rounded,
|
|
14
|
+
background,
|
|
15
|
+
color,
|
|
16
|
+
density = 'default',
|
|
17
|
+
orientation = 'horizontal',
|
|
18
|
+
location,
|
|
19
|
+
...rest
|
|
20
|
+
}: ToolbarProps = $props();
|
|
21
|
+
|
|
22
|
+
const assets = getAssets();
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<svelte:element
|
|
26
|
+
this={is}
|
|
27
|
+
bind:this={ref}
|
|
28
|
+
{...rest}
|
|
29
|
+
role="toolbar"
|
|
30
|
+
class={[
|
|
31
|
+
'kit-toolbar',
|
|
32
|
+
light && 'light',
|
|
33
|
+
dark && 'dark',
|
|
34
|
+
variant && assets.className('toolbar', 'variant', variant),
|
|
35
|
+
density && assets.className('toolbar', 'density', density),
|
|
36
|
+
orientation && assets.className('toolbar', 'orientation', orientation),
|
|
37
|
+
location && assets.className('toolbar', 'location', location),
|
|
38
|
+
rest.class
|
|
39
|
+
]}
|
|
40
|
+
style:--base={assets.color(background)}
|
|
41
|
+
style:--on={assets.color(color)}
|
|
42
|
+
style:--shape={assets.shape(rounded)}
|
|
43
|
+
>
|
|
44
|
+
<div class={['kit-toolbar--wrapper', classContent]}>
|
|
45
|
+
{@render children?.()}
|
|
46
|
+
</div>
|
|
47
|
+
</svelte:element>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Component } from '../../internal/types.js';
|
|
2
|
+
type Variant = 'outline' | 'text' | 'dash';
|
|
3
|
+
type Density = 'compact' | 'comfortable' | 'default';
|
|
4
|
+
type Orientation = 'horizontal' | 'vertical';
|
|
5
|
+
type Location = 'top' | 'bottom';
|
|
6
|
+
export interface ToolbarProps extends Component {
|
|
7
|
+
is?: 'div' | 'header' | 'nav';
|
|
8
|
+
variant?: Variant | {
|
|
9
|
+
[key: string]: Variant;
|
|
10
|
+
};
|
|
11
|
+
rounded?: string;
|
|
12
|
+
density?: Density | {
|
|
13
|
+
[key: string]: Density;
|
|
14
|
+
};
|
|
15
|
+
dark?: boolean;
|
|
16
|
+
light?: boolean;
|
|
17
|
+
color?: string;
|
|
18
|
+
orientation?: Orientation | {
|
|
19
|
+
[key: string]: Orientation;
|
|
20
|
+
};
|
|
21
|
+
background?: string;
|
|
22
|
+
location?: Location | {
|
|
23
|
+
[key: string]: Location;
|
|
24
|
+
};
|
|
25
|
+
classContent?: string | string[] | undefined;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|