lapikit 0.0.0-insiders.da3209a → 0.0.0-insiders.db064a9
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 +117 -1
- package/bin/configuration.js +0 -1
- package/bin/helper.js +0 -38
- package/bin/index.js +1 -9
- package/bin/presets.js +1 -1
- package/bin/prompts.js +46 -79
- package/dist/actions/accordion.svelte.d.ts +9 -0
- package/dist/actions/index.d.ts +2 -1
- package/dist/actions/index.js +2 -1
- package/dist/actions/use-theme.d.ts +1 -0
- package/dist/actions/use-theme.js +18 -0
- package/dist/components/accordion/accordion.css +0 -77
- package/dist/components/accordion/accordion.svelte +5 -3
- package/dist/components/accordion/modules/accordion-item.css +68 -0
- package/dist/components/accordion/modules/accordion-item.svelte +4 -4
- package/dist/components/accordion/types.d.ts +1 -1
- package/dist/components/alert/alert.css +11 -18
- package/dist/components/alert/alert.svelte +4 -4
- package/dist/components/alert/types.d.ts +1 -1
- package/dist/components/app/app.css +12 -2
- package/dist/components/app/app.svelte +68 -37
- package/dist/components/app/app.svelte.d.ts +2 -5
- package/dist/components/app/types.d.ts +7 -1
- package/dist/components/appbar/appbar.css +8 -18
- package/dist/components/appbar/appbar.svelte +4 -4
- package/dist/components/appbar/types.d.ts +1 -1
- package/dist/components/aspect-ratio/aspect-ratio.svelte +0 -22
- package/dist/components/aspect-ratio/types.d.ts +1 -1
- package/dist/components/avatar/avatar.css +7 -14
- package/dist/components/avatar/avatar.svelte +4 -4
- package/dist/components/avatar/types.d.ts +1 -1
- package/dist/components/button/button.css +29 -36
- package/dist/components/button/button.svelte +5 -5
- package/dist/components/button/types.d.ts +1 -1
- package/dist/components/card/card.css +10 -20
- package/dist/components/card/card.svelte +9 -5
- package/dist/components/card/types.d.ts +3 -1
- package/dist/components/chip/chip.css +26 -33
- package/dist/components/chip/chip.svelte +5 -5
- package/dist/components/chip/types.d.ts +1 -1
- package/dist/components/dialog/dialog.css +13 -20
- package/dist/components/dialog/dialog.svelte +5 -5
- package/dist/components/dialog/types.d.ts +1 -1
- package/dist/components/dropdown/dropdown.css +3 -12
- package/dist/components/dropdown/dropdown.svelte +6 -7
- package/dist/components/dropdown/types.d.ts +1 -1
- package/dist/components/icon/icon.css +11 -12
- package/dist/components/icon/icon.svelte +2 -2
- package/dist/components/icon/types.d.ts +1 -1
- package/dist/components/list/list.css +19 -91
- package/dist/components/list/list.svelte +4 -4
- package/dist/components/list/modules/list-item.css +67 -0
- package/dist/components/list/modules/list-item.svelte +5 -5
- package/dist/components/list/types.d.ts +1 -1
- package/dist/components/modal/modal.css +15 -23
- package/dist/components/modal/modal.svelte +4 -5
- package/dist/components/modal/types.d.ts +1 -1
- package/dist/components/popover/popover.css +3 -12
- package/dist/components/popover/popover.svelte +6 -6
- package/dist/components/popover/types.d.ts +1 -1
- package/dist/components/separator/separator.css +19 -23
- package/dist/components/separator/separator.svelte +6 -6
- package/dist/components/separator/types.d.ts +6 -2
- package/dist/components/spacer/types.d.ts +1 -1
- package/dist/components/textfield/textfield.css +16 -23
- package/dist/components/textfield/textfield.svelte +4 -4
- package/dist/components/textfield/types.d.ts +1 -1
- package/dist/components/toolbar/toolbar.css +11 -34
- package/dist/components/toolbar/toolbar.svelte +4 -4
- package/dist/components/toolbar/types.d.ts +1 -1
- package/dist/components/tooltip/tooltip.css +5 -13
- package/dist/components/tooltip/tooltip.svelte +5 -5
- package/dist/components/tooltip/types.d.ts +1 -1
- package/dist/index.d.ts +2 -26
- package/dist/index.js +2 -6
- package/dist/internal/config/presets.d.ts +88 -47
- package/dist/internal/config/presets.js +89 -41
- package/dist/internal/config/variables.d.ts +1 -4
- package/dist/internal/config/variables.js +1 -4
- package/dist/internal/{assets.svelte.js → core/actions/assets.svelte.js} +4 -4
- package/dist/internal/core/actions/dropdown.svelte.d.ts +7 -0
- package/dist/internal/core/actions/popover.svelte.d.ts +7 -0
- package/dist/internal/core/actions/tooltip.svelte.d.ts +7 -0
- package/dist/internal/{ripple.js → core/animations/ripple.js} +3 -3
- package/dist/internal/core/css.d.ts +1 -0
- package/dist/internal/core/css.js +16 -0
- package/dist/internal/core/formatter/component.d.ts +1 -1
- package/dist/internal/core/formatter/component.js +25 -21
- package/dist/internal/core/formatter/device.d.ts +5 -0
- package/dist/internal/core/formatter/device.js +66 -0
- package/dist/internal/core/formatter/index.d.ts +3 -1
- package/dist/internal/core/formatter/index.js +14 -6
- package/dist/internal/core/formatter/{styles.d.ts → style.d.ts} +1 -1
- package/dist/internal/core/formatter/{styles.js → style.js} +3 -3
- package/dist/internal/core/formatter/theme.d.ts +1 -1
- package/dist/internal/core/formatter/theme.js +30 -6
- package/dist/internal/core/formatter/typography.d.ts +1 -1
- package/dist/internal/core/formatter/typography.js +2 -2
- package/dist/internal/core/standard-colors.d.ts +75 -0
- package/dist/internal/core/standard-colors.js +75 -0
- package/dist/internal/helpers/colors.d.ts +1 -0
- package/dist/internal/{colors.js → helpers/colors.js} +2 -2
- package/dist/internal/helpers/parser.js +21 -21
- package/dist/internal/{scroll.js → helpers/scroll.js} +1 -2
- package/dist/internal/plugins/vite.d.ts +2 -2
- package/dist/internal/plugins/vite.js +15 -7
- package/dist/internal/types/components.d.ts +14 -0
- package/dist/internal/types/configuration.d.ts +24 -1
- package/dist/internal/types/index.d.ts +1 -0
- package/dist/internal/types/index.js +1 -0
- package/dist/stores/components.js +1 -1
- package/dist/stores/index.d.ts +1 -0
- package/dist/stores/index.js +1 -0
- package/dist/stores/themes.d.ts +0 -6
- package/dist/stores/themes.js +1 -31
- package/dist/stores/viewport.d.ts +7 -0
- package/dist/stores/viewport.js +7 -0
- package/dist/styles/animation.css +33 -0
- package/dist/styles/keyframes.css +30 -0
- package/dist/{style/normalize.css → styles/reset.css} +15 -7
- package/dist/styles.css.d.ts +4 -0
- package/dist/themes.css.d.ts +4 -0
- package/package.json +128 -103
- package/bin/lapikit.js +0 -86
- package/bin/legacy.js +0 -34
- package/bin/modules/adapter.js +0 -52
- package/bin/modules/plugin.js +0 -223
- package/bin/modules/preset.js +0 -11
- package/dist/app.d.ts +0 -13
- package/dist/app.html +0 -12
- package/dist/internal/colors.d.ts +0 -1
- package/dist/internal/index.d.ts +0 -4
- package/dist/internal/index.js +0 -4
- package/dist/internal/types.d.ts +0 -57
- package/dist/internal/unit.d.ts +0 -1
- package/dist/internal/unit.js +0 -11
- package/dist/labs/index.d.ts +0 -4
- package/dist/labs/index.js +0 -5
- package/dist/labs/my-component-style-global.svelte +0 -6
- package/dist/labs/my-component-style-global.svelte.d.ts +0 -18
- package/dist/labs/my-component-style-import.svelte +0 -15
- package/dist/labs/my-component-style-import.svelte.d.ts +0 -18
- package/dist/labs/my-component-style-mixed.svelte +0 -23
- package/dist/labs/my-component-style-mixed.svelte.d.ts +0 -18
- package/dist/labs/my-component.svelte +0 -16
- package/dist/labs/my-component.svelte.d.ts +0 -18
- package/dist/labs/style-mixed.css +0 -7
- package/dist/labs/style.css +0 -7
- package/dist/labs.css +0 -25
- package/dist/plugin/css.d.ts +0 -1
- package/dist/plugin/css.js +0 -73
- package/dist/plugin/modules/config.d.ts +0 -2
- package/dist/plugin/modules/config.js +0 -54
- package/dist/plugin/modules/importer.d.ts +0 -1
- package/dist/plugin/modules/importer.js +0 -15
- package/dist/plugin/preset-v2.d.ts +0 -108
- package/dist/plugin/preset-v2.js +0 -126
- package/dist/plugin/vitejs.d.ts +0 -10
- package/dist/plugin/vitejs.js +0 -55
- package/dist/preset.d.ts +0 -2
- package/dist/preset.js +0 -92
- package/dist/style/animation.css +0 -62
- package/dist/style/css.d.ts +0 -2
- package/dist/style/css.js +0 -34
- package/dist/style/parser/color.d.ts +0 -5
- package/dist/style/parser/color.js +0 -88
- package/dist/style/parser/component.d.ts +0 -2
- package/dist/style/parser/component.js +0 -115
- package/dist/style/parser/device.d.ts +0 -2
- package/dist/style/parser/device.js +0 -40
- package/dist/style/parser/index.d.ts +0 -4
- package/dist/style/parser/index.js +0 -4
- package/dist/style/parser/variable.d.ts +0 -2
- package/dist/style/parser/variable.js +0 -25
- package/dist/style/variable.css +0 -12
- /package/dist/{components/accordion → actions}/accordion.svelte.js +0 -0
- /package/dist/internal/{assets.svelte.d.ts → core/actions/assets.svelte.d.ts} +0 -0
- /package/dist/{components/dropdown → internal/core/actions}/dropdown.svelte.js +0 -0
- /package/dist/{components/popover → internal/core/actions}/popover.svelte.js +0 -0
- /package/dist/{components/tooltip → internal/core/actions}/tooltip.svelte.js +0 -0
- /package/dist/internal/{ripple.d.ts → core/animations/ripple.d.ts} +0 -0
- /package/dist/internal/{ansi.d.ts → core/bin/ansi.d.ts} +0 -0
- /package/dist/internal/{ansi.js → core/bin/ansi.js} +0 -0
- /package/dist/internal/{terminal.d.ts → core/bin/terminal.d.ts} +0 -0
- /package/dist/internal/{terminal.js → core/bin/terminal.js} +0 -0
- /package/dist/internal/{minify.d.ts → core/minify.d.ts} +0 -0
- /package/dist/internal/{minify.js → core/minify.js} +0 -0
- /package/dist/{utils/x11.d.ts → internal/core/x11-colors.d.ts} +0 -0
- /package/dist/{utils/x11.js → internal/core/x11-colors.js} +0 -0
- /package/dist/{utils → internal/helpers}/convert.d.ts +0 -0
- /package/dist/{utils → internal/helpers}/convert.js +0 -0
- /package/dist/internal/{deepMerge.d.ts → helpers/deep-merge.d.ts} +0 -0
- /package/dist/internal/{deepMerge.js → helpers/deep-merge.js} +0 -0
- /package/dist/internal/{clickOutside.d.ts → helpers/outside.d.ts} +0 -0
- /package/dist/internal/{clickOutside.js → helpers/outside.js} +0 -0
- /package/dist/internal/{scroll.d.ts → helpers/scroll.d.ts} +0 -0
- /package/dist/internal/{types.js → types/components.js} +0 -0
- /package/dist/{colors.css → themes.css} +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
.kit-list-item {
|
|
2
|
+
position: relative;
|
|
3
|
+
border: none;
|
|
4
|
+
outline: none;
|
|
5
|
+
padding-top: var(--list-spacing-x);
|
|
6
|
+
padding-bottom: var(--list-spacing-x);
|
|
7
|
+
padding-right: var(--list-spacing-y);
|
|
8
|
+
padding-left: var(--list-spacing-y);
|
|
9
|
+
color: var(--list-item-color, var(--kit-label-primary));
|
|
10
|
+
border-radius: var(--list-item-shape, var(--system-shape-sm));
|
|
11
|
+
font-weight: 500;
|
|
12
|
+
text-decoration: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.kit-list-item {
|
|
16
|
+
height: var(--list-height);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.kit-list-item:not(div) {
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.kit-list-item,
|
|
24
|
+
.kit-list-item .kit-list-item-content--content,
|
|
25
|
+
.kit-list-item .kit-list-item-content--append,
|
|
26
|
+
.kit-list-item .kit-list-item-content--prepend {
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
gap: calc(var(--system-spacing) * var(--list-multiplier-gap));
|
|
31
|
+
font-size: calc(var(--system-spacing) * var(--list-multiplier-font-size));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.kit-list-item.kit-list-item--append:not(.kit-list-item--prepend) {
|
|
35
|
+
display: grid;
|
|
36
|
+
grid-template-columns: auto 1fr;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.kit-list-item.kit-list-item--prepend:not(.kit-list-item--append) {
|
|
40
|
+
display: grid;
|
|
41
|
+
grid-template-columns: 1fr auto;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.kit-list-item.kit-list-item--prepend.kit-list-item--append {
|
|
45
|
+
display: grid;
|
|
46
|
+
grid-template-columns: auto 1fr auto;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.kit-list-item::after {
|
|
50
|
+
content: '';
|
|
51
|
+
position: absolute;
|
|
52
|
+
inset: 0;
|
|
53
|
+
background-color: currentColor;
|
|
54
|
+
opacity: 0;
|
|
55
|
+
transition: opacity 150ms ease;
|
|
56
|
+
pointer-events: none;
|
|
57
|
+
border-radius: inherit;
|
|
58
|
+
}
|
|
59
|
+
.kit-list-item:not(div):hover::after {
|
|
60
|
+
opacity: 0.08;
|
|
61
|
+
}
|
|
62
|
+
.kit-list-item:not(div):active::after {
|
|
63
|
+
opacity: 0.12;
|
|
64
|
+
}
|
|
65
|
+
.kit-list-item:not(div):focus-visible::after {
|
|
66
|
+
opacity: 0.12;
|
|
67
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { getAssets } from '../../../internal/
|
|
2
|
+
import { getAssets } from '../../../internal/core/actions/assets.svelte.js';
|
|
3
3
|
import type { ListItemProps } from '../types.js';
|
|
4
4
|
|
|
5
5
|
// external
|
|
6
|
-
import { ripple } from '../../../internal/ripple.js';
|
|
6
|
+
import { ripple } from '../../../internal/core/animations/ripple.js';
|
|
7
7
|
|
|
8
8
|
let {
|
|
9
9
|
children,
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
tabindex={href && disabled ? -2 : 0}
|
|
55
55
|
aria-disabled={href ? disabled : undefined}
|
|
56
56
|
disabled={href ? undefined : disabled}
|
|
57
|
-
style:--
|
|
58
|
-
style:--
|
|
59
|
-
style:--shape={assets.shape(rounded)}
|
|
57
|
+
style:--list-item-background={assets.color(background)}
|
|
58
|
+
style:--list-item-color={assets.color(color)}
|
|
59
|
+
style:--list-item-shape={assets.shape(rounded)}
|
|
60
60
|
>
|
|
61
61
|
{#if append}
|
|
62
62
|
<div class="kit-list-item-content--append">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Component } from '../../internal/types.js';
|
|
1
|
+
import type { Component } from '../../internal/types/index.js';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
type ListSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
4
4
|
type ListDensity = 'compact' | 'comfortable' | 'default';
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
/* root */
|
|
2
1
|
.kit-modal {
|
|
3
|
-
--modal-color: var(--on, var(--kit-on-surface));
|
|
4
|
-
--modal-background: var(--base, var(--kit-surface));
|
|
5
|
-
--modal-radius: var(--shape, var(--kit-radius-md));
|
|
6
2
|
--modal-translate-x: -50%;
|
|
7
3
|
--modal-translate-y: -50%;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.kit-modal {
|
|
11
4
|
width: 100%;
|
|
12
5
|
height: 100%;
|
|
13
6
|
position: absolute;
|
|
@@ -23,11 +16,9 @@
|
|
|
23
16
|
padding-bottom: var(--modal-spacing-x);
|
|
24
17
|
padding-right: var(--modal-spacing-y);
|
|
25
18
|
padding-left: var(--modal-spacing-y);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
color: var(--modal-
|
|
29
|
-
background-color: var(--modal-background);
|
|
30
|
-
border-color: var(--modal-background);
|
|
19
|
+
color: var(--modal-color, var(--kit-label-primary));
|
|
20
|
+
background-color: var(--modal-background, var(--kit-background-grouped-primary));
|
|
21
|
+
border-color: var(--modal-background, var(--kit-background-grouped-primary));
|
|
31
22
|
}
|
|
32
23
|
|
|
33
24
|
.kit-modal.kit-modal--contain {
|
|
@@ -45,54 +36,54 @@
|
|
|
45
36
|
|
|
46
37
|
/* size */
|
|
47
38
|
.kit-modal [breakpoint]kit-modal-container--size-xs {
|
|
48
|
-
max-width: var(--
|
|
39
|
+
max-width: var(--system-dialog-xs);
|
|
49
40
|
max-height: calc(100% - 3rem);
|
|
50
41
|
height: fit-content;
|
|
51
42
|
margin: 0 auto;
|
|
52
43
|
left: 50%;
|
|
53
44
|
bottom: initial;
|
|
54
45
|
translate: var(--modal-translate-x) var(--modal-translate-y);
|
|
55
|
-
border-radius: var(--modal-
|
|
46
|
+
border-radius: var(--modal-shape, var(--system-shape-md));
|
|
56
47
|
}
|
|
57
48
|
.kit-modal [breakpoint]kit-modal-container--size-sm {
|
|
58
|
-
max-width: var(--
|
|
49
|
+
max-width: var(--system-dialog-sm);
|
|
59
50
|
max-height: calc(100% - 3rem);
|
|
60
51
|
height: fit-content;
|
|
61
52
|
margin: 0 auto;
|
|
62
53
|
left: 50%;
|
|
63
54
|
bottom: initial;
|
|
64
55
|
translate: var(--modal-translate-x) var(--modal-translate-y);
|
|
65
|
-
border-radius: var(--modal-
|
|
56
|
+
border-radius: var(--modal-shape, var(--system-shape-md));
|
|
66
57
|
}
|
|
67
58
|
.kit-modal [breakpoint]kit-modal-container--size-md {
|
|
68
|
-
max-width: var(--
|
|
59
|
+
max-width: var(--system-dialog-md);
|
|
69
60
|
max-height: calc(100% - 3rem);
|
|
70
61
|
height: fit-content;
|
|
71
62
|
margin: 0 auto;
|
|
72
63
|
left: 50%;
|
|
73
64
|
bottom: initial;
|
|
74
65
|
translate: var(--modal-translate-x) var(--modal-translate-y);
|
|
75
|
-
border-radius: var(--modal-
|
|
66
|
+
border-radius: var(--modal-shape, var(--system-shape-md));
|
|
76
67
|
}
|
|
77
68
|
.kit-modal [breakpoint]kit-modal-container--size-lg {
|
|
78
|
-
max-width: var(--
|
|
69
|
+
max-width: var(--system-dialog-lg);
|
|
79
70
|
max-height: calc(100% - 3rem);
|
|
80
71
|
height: fit-content;
|
|
81
72
|
margin: 0 auto;
|
|
82
73
|
left: 50%;
|
|
83
74
|
bottom: initial;
|
|
84
75
|
translate: var(--modal-translate-x) var(--modal-translate-y);
|
|
85
|
-
border-radius: var(--modal-
|
|
76
|
+
border-radius: var(--modal-shape, var(--system-shape-md));
|
|
86
77
|
}
|
|
87
78
|
.kit-modal [breakpoint]kit-modal-container--size-xl {
|
|
88
|
-
max-width: var(--
|
|
79
|
+
max-width: var(--system-dialog-xl);
|
|
89
80
|
max-height: calc(100% - 3rem);
|
|
90
81
|
height: fit-content;
|
|
91
82
|
margin: 0 auto;
|
|
92
83
|
left: 50%;
|
|
93
84
|
bottom: initial;
|
|
94
85
|
translate: var(--modal-translate-x) var(--modal-translate-y);
|
|
95
|
-
border-radius: var(--modal-
|
|
86
|
+
border-radius: var(--modal-shape, var(--system-shape-md));
|
|
96
87
|
}
|
|
97
88
|
.kit-modal [breakpoint]kit-modal-container--size-full {
|
|
98
89
|
max-width: 100%;
|
|
@@ -103,7 +94,8 @@
|
|
|
103
94
|
left: 0;
|
|
104
95
|
top: initial;
|
|
105
96
|
height: 100%;
|
|
106
|
-
border-radius: var(--modal-
|
|
97
|
+
border-radius: var(--modal-shape, var(--system-shape-md))
|
|
98
|
+
var(--modal-shape, var(--system-shape-md)) 0 0;
|
|
107
99
|
}
|
|
108
100
|
|
|
109
101
|
/* density */
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
import { getAssets } from '../../internal/index.js';
|
|
2
|
+
import { getAssets } from '../../internal/core/actions/assets.svelte.js';
|
|
4
3
|
import { modalOpen, modalStack, popModal, pushModal, setOpenModal } from '../../stores/index.js';
|
|
5
4
|
import { onDestroy } from 'svelte';
|
|
6
5
|
import type { ModalProps } from './types.js';
|
|
@@ -103,9 +102,9 @@
|
|
|
103
102
|
density && assets.className('modal-container', 'density', density),
|
|
104
103
|
position && assets.className('modal-container', 'position', position)
|
|
105
104
|
]}
|
|
106
|
-
style:--
|
|
107
|
-
style:--
|
|
108
|
-
style:--shape={assets.shape(rounded)}
|
|
105
|
+
style:--modal-background={assets.color(background)}
|
|
106
|
+
style:--modal-color={assets.color(color)}
|
|
107
|
+
style:--modal-shape={assets.shape(rounded)}
|
|
109
108
|
>
|
|
110
109
|
{@render children?.()}
|
|
111
110
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Component } from '../../internal/types.js';
|
|
1
|
+
import type { Component } from '../../internal/types/index.js';
|
|
2
2
|
type ModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
3
3
|
type ModalPosition = 'bottom' | 'center' | 'top';
|
|
4
4
|
type ModalDensity = 'compact' | 'comfortable' | 'default';
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
.kit-popover-content {
|
|
2
|
-
--popover-color: var(--on, var(--kit-on-container));
|
|
3
|
-
--popover-background: var(--base, var(--kit-container));
|
|
4
|
-
--popover-radius: var(--shape, var(--kit-radius-md));
|
|
5
|
-
|
|
6
2
|
inset: 0px auto auto 0px;
|
|
7
3
|
margin: 0px;
|
|
8
4
|
position: fixed;
|
|
@@ -11,12 +7,7 @@
|
|
|
11
7
|
width: auto;
|
|
12
8
|
opacity: 1;
|
|
13
9
|
transition-property: opacity, transform;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/* theme */
|
|
19
|
-
background-color: var(--popover-background);
|
|
20
|
-
color: var(--popover-color);
|
|
21
|
-
border-radius: var(--popover-radius);
|
|
10
|
+
background-color: var(--popover-background, var(--kit-background-grouped-primary));
|
|
11
|
+
color: var(--popover-color, var(--kit-label-primary));
|
|
12
|
+
border-radius: var(--popover-shape, var(--system-shape-md));
|
|
22
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { getAssets } from '../../internal/assets.svelte.js';
|
|
3
|
-
import { clickOutside } from '../../internal/
|
|
4
|
-
import { getPositions } from '
|
|
2
|
+
import { getAssets } from '../../internal/core/actions/assets.svelte.js';
|
|
3
|
+
import { clickOutside } from '../../internal/helpers/outside.js';
|
|
4
|
+
import { getPositions } from '../../internal/core/actions/popover.svelte.js';
|
|
5
5
|
import type { PopoverProps, ModelPopoverProps } from './types.js';
|
|
6
6
|
|
|
7
7
|
let {
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
role="menu"
|
|
64
64
|
class={['kit-popover-content', light && 'light', dark && 'dark', rest.class]}
|
|
65
65
|
style={`transform: translate(${axis.x}px, ${axis.y}px);`}
|
|
66
|
-
style:--
|
|
67
|
-
style:--
|
|
68
|
-
style:--shape={assets.shape(rounded)}
|
|
66
|
+
style:--popover-background={assets.color(background)}
|
|
67
|
+
style:--popover-color={assets.color(color)}
|
|
68
|
+
style:--popover-shape={assets.shape(rounded)}
|
|
69
69
|
use:clickOutside={{ exclude: [ref, refActivator], onClose: () => (open = false) }}
|
|
70
70
|
>
|
|
71
71
|
{@render children?.()}
|
|
@@ -1,35 +1,14 @@
|
|
|
1
1
|
.kit-separator {
|
|
2
|
-
--separator-opacity: var(--opacity, 0.12);
|
|
3
|
-
--separator-color: var(--base, var(--kit-scrim));
|
|
4
|
-
|
|
5
2
|
display: block;
|
|
6
3
|
flex: 1 1 100%;
|
|
7
4
|
height: 0px;
|
|
8
5
|
max-height: 0px;
|
|
9
|
-
opacity: var(--separator-opacity);
|
|
6
|
+
opacity: var(--separator-opacity, 0.12);
|
|
10
7
|
transition: inherit;
|
|
11
|
-
border-color: var(--separator-color);
|
|
12
|
-
/* transition: border-color 0.5s; */
|
|
8
|
+
border-color: var(--separator-color, var(--kit-label-primary));
|
|
13
9
|
border-style: solid;
|
|
14
10
|
}
|
|
15
11
|
|
|
16
|
-
.kit-separator:not(.kit-separator--orientation-vertical) {
|
|
17
|
-
border-width: var(--border-top-width, thin) 0 0 0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.kit-separator--orientation-vertical {
|
|
21
|
-
align-self: stretch;
|
|
22
|
-
border-width: 0 thin 0 0;
|
|
23
|
-
display: inline-flex;
|
|
24
|
-
height: auto;
|
|
25
|
-
margin-left: 0px;
|
|
26
|
-
max-height: 100%;
|
|
27
|
-
max-width: 0px;
|
|
28
|
-
vertical-align: text-bottom;
|
|
29
|
-
width: 0px;
|
|
30
|
-
border-width: 0 var(--border-right-width, thin) 0 0;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
12
|
.kit-separator--inset:not(.kit-separator--orientation-vertical) {
|
|
34
13
|
max-width: calc(100% - 4.5rem);
|
|
35
14
|
margin-inline-start: 4.5rem;
|
|
@@ -44,3 +23,20 @@
|
|
|
44
23
|
.kit-separator:not(.kit-separator--orientation-vertical) {
|
|
45
24
|
width: 100%;
|
|
46
25
|
}
|
|
26
|
+
|
|
27
|
+
.kit-separator[breakpoint]kit-separator--orientation-horizontal {
|
|
28
|
+
border-width: var(--separator-top-width, thin) 0 0 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.kit-separator[breakpoint]kit-separator--orientation-vertical {
|
|
32
|
+
align-self: stretch;
|
|
33
|
+
border-width: 0 thin 0 0;
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
height: auto;
|
|
36
|
+
margin-left: 0px;
|
|
37
|
+
max-height: 100%;
|
|
38
|
+
max-width: 0px;
|
|
39
|
+
vertical-align: text-bottom;
|
|
40
|
+
width: 0px;
|
|
41
|
+
border-width: 0 var(--separator-right-width, thin) 0 0;
|
|
42
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { getAssets } from '../../internal/
|
|
2
|
+
import { getAssets } from '../../internal/core/actions/assets.svelte.js';
|
|
3
3
|
import type { SeparatorProps } from './types.js';
|
|
4
4
|
|
|
5
5
|
let {
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
orientation && assets.className('separator', 'orientation', orientation),
|
|
29
29
|
rest.class
|
|
30
30
|
]}
|
|
31
|
-
aria-orientation={orientation}
|
|
31
|
+
aria-orientation={typeof orientation === 'string' ? orientation : undefined}
|
|
32
32
|
role="separator"
|
|
33
|
-
style:--
|
|
34
|
-
style:--opacity={opacity}
|
|
35
|
-
style:--
|
|
36
|
-
style:--
|
|
33
|
+
style:--separator-color={assets.color(color)}
|
|
34
|
+
style:--separator-opacity={opacity}
|
|
35
|
+
style:--separator-top-width={orientation === 'horizontal' ? assets.unit(thickness) : undefined}
|
|
36
|
+
style:--separator-right-width={orientation === 'vertical' ? assets.unit(thickness) : undefined}
|
|
37
37
|
/>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Base } from '../../internal/types.js';
|
|
1
|
+
import type { Base } from '../../internal/types/index.js';
|
|
2
|
+
type Orientation = 'horizontal' | 'vertical';
|
|
2
3
|
export interface SeparatorProps extends Base {
|
|
3
4
|
is?: 'div' | 'hr';
|
|
4
5
|
light?: boolean;
|
|
@@ -7,5 +8,8 @@ export interface SeparatorProps extends Base {
|
|
|
7
8
|
thickness?: string;
|
|
8
9
|
opacity?: string | number;
|
|
9
10
|
color?: string;
|
|
10
|
-
orientation?:
|
|
11
|
+
orientation?: Orientation | {
|
|
12
|
+
[key: string]: Orientation;
|
|
13
|
+
};
|
|
11
14
|
}
|
|
15
|
+
export {};
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/* root */
|
|
2
|
-
.kit-textfield {
|
|
3
|
-
--textfield-color: var(--on, var(--kit-on-container));
|
|
4
|
-
--textfield-background: var(--base, var(--kit-container));
|
|
5
|
-
--textfield-radius: var(--shape, var(--kit-radius-md));
|
|
6
|
-
}
|
|
7
|
-
|
|
8
1
|
.kit-textfield {
|
|
9
2
|
flex: 1 1 auto;
|
|
10
3
|
font-size: 1rem;
|
|
@@ -18,16 +11,16 @@
|
|
|
18
11
|
|
|
19
12
|
/* variant */
|
|
20
13
|
.kit-textfield[breakpoint]kit-textfield--variant-filled .kit-field {
|
|
21
|
-
--textfield-border-color: var(--textfield-background);
|
|
22
|
-
background-color: var(--textfield-background);
|
|
23
|
-
border-radius: var(--textfield-
|
|
24
|
-
color: var(--textfield-color);
|
|
14
|
+
--textfield-border-color: var(--textfield-background, var(--kit-background-grouped-primary));
|
|
15
|
+
background-color: var(--textfield-background, var(--kit-background-grouped-primary));
|
|
16
|
+
border-radius: var(--textfield-shape, var(--system-shape-md));
|
|
17
|
+
color: var(--textfield-color, var(--kit-label-primary));
|
|
25
18
|
}
|
|
26
19
|
|
|
27
20
|
.kit-textfield[breakpoint]kit-textfield--variant-outline .kit-field {
|
|
28
21
|
--textfield-border-color: var(--textfield-color);
|
|
29
22
|
background-color: var(--textfield-background);
|
|
30
|
-
border-radius: var(--textfield-
|
|
23
|
+
border-radius: var(--textfield-shape);
|
|
31
24
|
color: var(--textfield-color);
|
|
32
25
|
}
|
|
33
26
|
|
|
@@ -37,7 +30,7 @@
|
|
|
37
30
|
border-top: 1px solid var(--textfield-border-color);
|
|
38
31
|
border-right: 1px solid var(--textfield-border-color);
|
|
39
32
|
border-left: 1px solid var(--textfield-border-color);
|
|
40
|
-
border-radius: var(--textfield-
|
|
33
|
+
border-radius: var(--textfield-shape);
|
|
41
34
|
}
|
|
42
35
|
|
|
43
36
|
.kit-textfield[breakpoint]kit-textfield--variant-text .kit-field {
|
|
@@ -75,7 +68,7 @@
|
|
|
75
68
|
}
|
|
76
69
|
|
|
77
70
|
.kit-textfield--error .kit-textfield-outline {
|
|
78
|
-
border: 1px solid var(--kit-
|
|
71
|
+
border: 1px solid var(--kit-accent-destructive);
|
|
79
72
|
}
|
|
80
73
|
|
|
81
74
|
.kit-textfield-outline {
|
|
@@ -155,15 +148,15 @@
|
|
|
155
148
|
display: grid;
|
|
156
149
|
grid-template-areas: 'prepend-inner field clear append-inner';
|
|
157
150
|
grid-template-columns: max-content minmax(0, 1fr) max-content max-content;
|
|
158
|
-
font-size: calc(var(--
|
|
151
|
+
font-size: calc(var(--system-spacing) * var(--textfield-multiplier-font-size));
|
|
159
152
|
max-width: 100%;
|
|
160
153
|
contain: layout;
|
|
161
154
|
flex: 1 0;
|
|
162
155
|
grid-area: control;
|
|
163
156
|
position: relative;
|
|
164
|
-
padding: calc(var(--
|
|
165
|
-
calc(var(--
|
|
166
|
-
gap: calc(var(--
|
|
157
|
+
padding: calc(var(--system-spacing) * var(--textfield-multiplier-x))
|
|
158
|
+
calc(var(--system-spacing) * var(--textfield-multiplier-y));
|
|
159
|
+
gap: calc(var(--system-spacing) * var(--textfield-multiplier-gap));
|
|
167
160
|
}
|
|
168
161
|
|
|
169
162
|
.kit-textfield-control .kit-field .kit-field--field {
|
|
@@ -222,13 +215,13 @@
|
|
|
222
215
|
min-width: 1px;
|
|
223
216
|
position: relative;
|
|
224
217
|
display: grid;
|
|
225
|
-
gap: calc(var(--
|
|
218
|
+
gap: calc(var(--system-spacing) * var(--textfield-multiplier-gap));
|
|
226
219
|
grid-template-areas: 'message-prepend message message-append ';
|
|
227
220
|
grid-template-columns: max-content minmax(0, 1fr) max-content;
|
|
228
221
|
}
|
|
229
222
|
|
|
230
223
|
.kit-message.kit-message--message-error {
|
|
231
|
-
color: var(--kit-
|
|
224
|
+
color: var(--kit-accent-destructive);
|
|
232
225
|
}
|
|
233
226
|
|
|
234
227
|
.kit-message .kit-message--message {
|
|
@@ -291,15 +284,15 @@
|
|
|
291
284
|
/*density */
|
|
292
285
|
.kit-textfield[breakpoint]kit-textfield--density-default {
|
|
293
286
|
--textfield-spacing-x: 0;
|
|
294
|
-
--textfield-spacing-y: calc(var(--
|
|
287
|
+
--textfield-spacing-y: calc(var(--system-spacing) * var(--textfield-multiplier-y));
|
|
295
288
|
}
|
|
296
289
|
|
|
297
290
|
.kit-textfield[breakpoint]kit-textfield--density-compact {
|
|
298
291
|
--textfield-spacing-x: calc(0 - 0.5rem);
|
|
299
|
-
--textfield-spacing-y: calc(var(--
|
|
292
|
+
--textfield-spacing-y: calc(var(--system-spacing) * var(--textfield-multiplier-y) - 0.5rem);
|
|
300
293
|
}
|
|
301
294
|
|
|
302
295
|
.kit-textfield[breakpoint]kit-textfield--density-comfortable {
|
|
303
296
|
--textfield-spacing-x: calc(0 + 0.5rem);
|
|
304
|
-
--textfield-spacing-y: calc(var(--
|
|
297
|
+
--textfield-spacing-y: calc(var(--system-spacing) * var(--textfield-multiplier-y) + 0.5rem);
|
|
305
298
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { getAssets } from '../../internal/
|
|
2
|
+
import { getAssets } from '../../internal/core/actions/assets.svelte.js';
|
|
3
3
|
import type { TextfieldProps } from './types.js';
|
|
4
4
|
|
|
5
5
|
//external
|
|
@@ -106,9 +106,9 @@
|
|
|
106
106
|
type === 'number' && hideSpinButtons && 'kit-textfield--hide-spin-buttons',
|
|
107
107
|
rest.class
|
|
108
108
|
]}
|
|
109
|
-
style:--
|
|
110
|
-
style:--
|
|
111
|
-
style:--shape={assets.shape(rounded)}
|
|
109
|
+
style:--textfield-background={assets.color(background)}
|
|
110
|
+
style:--textfield-color={assets.color(color)}
|
|
111
|
+
style:--textfield-shape={assets.shape(rounded)}
|
|
112
112
|
>
|
|
113
113
|
{#if prepend}
|
|
114
114
|
<div class="kit-textfield-prepend">
|
|
@@ -1,75 +1,52 @@
|
|
|
1
1
|
.kit-toolbar {
|
|
2
|
-
--toolbar-color: var(--on, var(--kit-on-surface));
|
|
3
|
-
--toolbar-background: var(--base, var(--kit-surface));
|
|
4
|
-
--toolbar-radius: var(--shape, var(--kit-radius-md));
|
|
5
|
-
|
|
6
2
|
display: flex;
|
|
7
3
|
align-items: center;
|
|
8
|
-
/* min-width: max-content; */
|
|
9
4
|
border-style: solid;
|
|
10
|
-
/* transition:
|
|
11
|
-
color 0.5s,
|
|
12
|
-
border-color 0.5s,
|
|
13
|
-
background-color 0.5s; */
|
|
14
|
-
|
|
15
5
|
border-width: 1px;
|
|
16
6
|
border-style: solid;
|
|
17
|
-
border-radius: var(--toolbar-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
color: var(--toolbar-
|
|
21
|
-
background-color: var(--toolbar-background);
|
|
22
|
-
border-color: var(--toolbar-background);
|
|
7
|
+
border-radius: var(--toolbar-shape, var(--system-shape-md));
|
|
8
|
+
color: var(--toolbar-color, var(--kit-label-primary));
|
|
9
|
+
background-color: var(--toolbar-background, var(--kit-background-grouped-tertiary));
|
|
10
|
+
border-color: var(--toolbar-background, var(--kit-background-grouped-tertiary));
|
|
23
11
|
}
|
|
24
12
|
|
|
25
13
|
/* density */
|
|
26
|
-
.kit-toolbar[breakpoint]kit-toolbar--density-default {
|
|
27
|
-
border-radius: calc(var(--kit-spacing) * 2.25);
|
|
28
|
-
}
|
|
29
14
|
.kit-toolbar[breakpoint]kit-toolbar--density-default:not([class*='toolbar--orientation-vertical']) {
|
|
30
15
|
height: 3rem;
|
|
31
|
-
padding-inline: calc(var(--
|
|
16
|
+
padding-inline: calc(var(--system-spacing) * 1.5);
|
|
32
17
|
}
|
|
33
18
|
|
|
34
19
|
.kit-toolbar[breakpoint]kit-toolbar--density-default[class*='toolbar--orientation-vertical'] {
|
|
35
20
|
width: 3rem;
|
|
36
|
-
padding: calc(var(--
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.kit-toolbar[breakpoint]kit-toolbar--density-compact {
|
|
40
|
-
border-radius: calc(var(--kit-spacing) * 1.75);
|
|
21
|
+
padding: calc(var(--system-spacing) * 1.5) 0;
|
|
41
22
|
}
|
|
42
23
|
|
|
43
24
|
.kit-toolbar[breakpoint]kit-toolbar--density-compact:not([class*='toolbar--orientation-vertical']) {
|
|
44
25
|
height: 2.625rem;
|
|
45
|
-
padding-inline: calc(var(--
|
|
26
|
+
padding-inline: calc(var(--system-spacing) * 0.75);
|
|
46
27
|
}
|
|
47
28
|
|
|
48
29
|
.kit-toolbar[breakpoint]kit-toolbar--density-compact[class*='toolbar--orientation-vertical'] {
|
|
49
30
|
width: 2.625rem;
|
|
50
|
-
padding: calc(var(--
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.kit-toolbar[breakpoint]kit-toolbar--density-comfortable {
|
|
54
|
-
border-radius: calc(var(--kit-spacing) * 3.5);
|
|
31
|
+
padding: calc(var(--system-spacing) * 0.75) 0;
|
|
55
32
|
}
|
|
56
33
|
|
|
57
34
|
.kit-toolbar[breakpoint]kit-toolbar--density-comfortable:not(
|
|
58
35
|
[class*='toolbar--orientation-vertical']
|
|
59
36
|
) {
|
|
60
37
|
height: 3.5rem;
|
|
61
|
-
padding-inline: calc(var(--
|
|
38
|
+
padding-inline: calc(var(--system-spacing) * 2.25);
|
|
62
39
|
}
|
|
63
40
|
|
|
64
41
|
.kit-toolbar[breakpoint]kit-toolbar--density-comfortable[class*='toolbar--orientation-vertical'] {
|
|
65
42
|
width: 3.5rem;
|
|
66
|
-
padding: calc(var(--
|
|
43
|
+
padding: calc(var(--system-spacing) * 2.25) 0;
|
|
67
44
|
}
|
|
68
45
|
|
|
69
46
|
.kit-toolbar[breakpoint]kit-toolbar--variant-text,
|
|
70
47
|
.kit-toolbar[breakpoint]kit-toolbar--variant-outline,
|
|
71
48
|
.kit-toolbar[breakpoint]kit-toolbar--variant-dash {
|
|
72
|
-
--toolbar-color: var(--base, var(--kit-
|
|
49
|
+
--toolbar-color: var(--base, var(--kit-background-grouped-primary));
|
|
73
50
|
background-color: transparent;
|
|
74
51
|
}
|
|
75
52
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { getAssets } from '../../internal/
|
|
2
|
+
import { getAssets } from '../../internal/core/actions/assets.svelte.js';
|
|
3
3
|
import type { ToolbarProps } from './types.js';
|
|
4
4
|
|
|
5
5
|
let {
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
location && assets.className('toolbar', 'location', location),
|
|
38
38
|
rest.class
|
|
39
39
|
]}
|
|
40
|
-
style:--
|
|
41
|
-
style:--
|
|
42
|
-
style:--shape={assets.shape(rounded)}
|
|
40
|
+
style:--toolbar-background={assets.color(background)}
|
|
41
|
+
style:--toolbar-color={assets.color(color)}
|
|
42
|
+
style:--toolbar-shape={assets.shape(rounded)}
|
|
43
43
|
>
|
|
44
44
|
<div class={['kit-toolbar--wrapper', classContent]}>
|
|
45
45
|
{@render children?.()}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Component } from '../../internal/types.js';
|
|
1
|
+
import type { Component } from '../../internal/types/index.js';
|
|
2
2
|
type Variant = 'outline' | 'text' | 'dash';
|
|
3
3
|
type Density = 'compact' | 'comfortable' | 'default';
|
|
4
4
|
type Orientation = 'horizontal' | 'vertical';
|