lapikit 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/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 +1 -2
- package/dist/components/app/app.svelte +24 -28
- package/dist/components/app/app.svelte.d.ts +2 -0
- 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 +5 -5
- package/dist/components/card/types.d.ts +1 -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 +4 -8
- package/dist/components/separator/separator.svelte +5 -5
- package/dist/components/separator/types.d.ts +1 -1
- 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 +14 -26
- 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 +5 -2
- package/dist/internal/core/formatter/index.js +15 -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.d.ts +1 -0
- package/dist/internal/helpers/parser.js +43 -20
- package/dist/{plugin/vitejs.d.ts → internal/plugins/vite.d.ts} +1 -3
- package/dist/internal/plugins/vite.js +33 -0
- 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/themes.d.ts +0 -6
- package/dist/stores/themes.js +1 -31
- 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/package.json +7 -8
- 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/internal/colors.d.ts +0 -1
- package/dist/internal/core/parser-config.d.ts +0 -1
- package/dist/internal/core/parser-config.js +0 -24
- 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.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/{scroll.js → helpers/scroll.js} +0 -0
- /package/dist/internal/{types.js → types/components.js} +0 -0
- /package/dist/{colors.css → themes.css} +0 -0
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.kit-dialog::backdrop {
|
|
18
|
-
background-color: color-mix(in oklab, var(--kit-shadow) 30%, transparent);
|
|
18
|
+
background-color: color-mix(in oklab, var(--kit-state-shadow) 30%, transparent);
|
|
19
19
|
animation: fade 0.2s ease-out;
|
|
20
20
|
}
|
|
21
21
|
.kit-dialog[open]::backdrop {
|
|
@@ -23,23 +23,17 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.kit-dialog .kit-dialog-container {
|
|
26
|
-
|
|
27
|
-
--dialog-background: var(--base, var(--kit-surface));
|
|
28
|
-
--dialog-radius: var(--shape, var(--kit-radius-md));
|
|
29
|
-
|
|
30
|
-
border-radius: var(--dialog-radius);
|
|
31
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
32
|
-
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
33
|
-
transition-duration: 0.2s;
|
|
26
|
+
border-radius: var(--dialog-shape, var(--system-shape-md));
|
|
34
27
|
padding-top: var(--dialog-spacing-x);
|
|
35
28
|
padding-bottom: var(--dialog-spacing-x);
|
|
36
29
|
padding-right: var(--dialog-spacing-y);
|
|
37
30
|
padding-left: var(--dialog-spacing-y);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
color: var(--dialog-
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
color: var(--dialog-color, var(--kit-label-primary));
|
|
32
|
+
background-color: var(--dialog-background, var(--kit-background-grouped-primary));
|
|
33
|
+
border-color: var(--dialog-background, var(--kit-background-grouped-primary));
|
|
34
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
35
|
+
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
36
|
+
transition-duration: 0.2s;
|
|
43
37
|
}
|
|
44
38
|
|
|
45
39
|
.kit-dialog .close-dialog {
|
|
@@ -60,32 +54,31 @@
|
|
|
60
54
|
}
|
|
61
55
|
|
|
62
56
|
.kit-dialog[breakpoint]kit-dialog--position-center {
|
|
63
|
-
/* margin: auto; */
|
|
64
57
|
margin-top: auto;
|
|
65
58
|
margin-bottom: auto;
|
|
66
59
|
}
|
|
67
60
|
|
|
68
61
|
.kit-dialog[breakpoint]kit-dialog--size-xs {
|
|
69
|
-
max-width: var(--
|
|
62
|
+
max-width: var(--system-dialog-xs);
|
|
70
63
|
}
|
|
71
64
|
|
|
72
65
|
.kit-dialog[breakpoint]kit-dialog--size-sm {
|
|
73
|
-
max-width: var(--
|
|
66
|
+
max-width: var(--system-dialog-sm);
|
|
74
67
|
height: fit-content;
|
|
75
68
|
}
|
|
76
69
|
|
|
77
70
|
.kit-dialog[breakpoint]kit-dialog--size-md {
|
|
78
|
-
max-width: var(--
|
|
71
|
+
max-width: var(--system-dialog-md);
|
|
79
72
|
height: fit-content;
|
|
80
73
|
}
|
|
81
74
|
|
|
82
75
|
.kit-dialog[breakpoint]kit-dialog--size-lg {
|
|
83
|
-
max-width: var(--
|
|
76
|
+
max-width: var(--system-dialog-lg);
|
|
84
77
|
height: fit-content;
|
|
85
78
|
}
|
|
86
79
|
|
|
87
80
|
.kit-dialog[breakpoint]kit-dialog--size-xl {
|
|
88
|
-
max-width: var(--
|
|
81
|
+
max-width: var(--system-dialog-xl);
|
|
89
82
|
height: fit-content;
|
|
90
83
|
}
|
|
91
84
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { disabledScroll } from '../../internal/
|
|
3
|
-
import { getAssets } from '../../internal/
|
|
2
|
+
import { disabledScroll } from '../../internal/helpers/scroll.js';
|
|
3
|
+
import { getAssets } from '../../internal/core/actions/assets.svelte.js';
|
|
4
4
|
import type { DialogProps } from './types.js';
|
|
5
5
|
|
|
6
6
|
let {
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
rest.class
|
|
59
59
|
]}
|
|
60
60
|
onclick={(event: MouseEvent) => event.stopPropagation()}
|
|
61
|
-
style:--
|
|
62
|
-
style:--
|
|
63
|
-
style:--shape={assets.shape(rounded)}
|
|
61
|
+
style:--dialog-background={assets.color(background)}
|
|
62
|
+
style:--dialog-color={assets.color(color)}
|
|
63
|
+
style:--dialog-shape={assets.shape(rounded)}
|
|
64
64
|
>
|
|
65
65
|
{@render children?.()}
|
|
66
66
|
</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 DialogSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
3
|
type DialogPosition = 'bottom' | 'center' | 'top';
|
|
4
4
|
type DialogDensity = 'compact' | 'comfortable' | 'default';
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
.kit-dropdown-content {
|
|
2
|
-
--dropdown-color: var(--on, var(--kit-on-surface));
|
|
3
|
-
--dropdown-background: var(--base, var(--kit-surface));
|
|
4
|
-
--dropdown-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(--dropdown-background);
|
|
20
|
-
color: var(--dropdown-color);
|
|
21
|
-
border-radius: var(--dropdown-radius);
|
|
10
|
+
background-color: var(--dropdown-background, var(--kit-background-grouped-primary));
|
|
11
|
+
color: var(--dropdown-color, var(--kit-label-primary));
|
|
12
|
+
border-radius: var(--dropdown-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/dropdown.svelte.js';
|
|
5
5
|
import type { DropdownProps, ModelDropdownProps } from './types.js';
|
|
6
6
|
|
|
7
7
|
let {
|
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
state: 'open' | 'close',
|
|
56
56
|
element: HTMLElement | PointerEvent | null
|
|
57
57
|
) => {
|
|
58
|
-
console.log();
|
|
59
58
|
if (openOnHover && state === 'open') {
|
|
60
59
|
if (timeoutId) {
|
|
61
60
|
clearTimeout(timeoutId);
|
|
@@ -106,9 +105,9 @@
|
|
|
106
105
|
e.stopPropagation();
|
|
107
106
|
handleClose();
|
|
108
107
|
}}
|
|
109
|
-
style:--
|
|
110
|
-
style:--
|
|
111
|
-
style:--shape={assets.shape(rounded)}
|
|
108
|
+
style:--dropdown-background={assets.color(background)}
|
|
109
|
+
style:--dropdown-color={assets.color(color)}
|
|
110
|
+
style:--dropdown-shape={assets.shape(rounded)}
|
|
112
111
|
use:clickOutside={{ exclude: [ref, refActivator], onClose: () => (open = false) }}
|
|
113
112
|
>
|
|
114
113
|
{@render children?.()}
|
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
.kit-icon {
|
|
2
|
-
--icon-color: var(--base, var(--base-parent, var(--kit-on-neutral)));
|
|
3
|
-
|
|
4
2
|
display: inline-flex;
|
|
5
3
|
align-items: center;
|
|
6
4
|
justify-content: center;
|
|
7
|
-
/* transition: color 0.5s; */
|
|
8
5
|
text-indent: 0;
|
|
9
6
|
font-size: calc(
|
|
10
|
-
var(--icon-multiplier-parent-size, var(--icon-multiplier-size)) * var(--
|
|
7
|
+
var(--icon-multiplier-parent-size, var(--icon-multiplier-size)) * var(--system-spacing)
|
|
11
8
|
);
|
|
12
9
|
}
|
|
13
10
|
|
|
14
11
|
.kit-icon:before {
|
|
15
|
-
color: var(--icon-color);
|
|
12
|
+
color: var(--icon-color, currentColor);
|
|
16
13
|
}
|
|
17
14
|
|
|
18
15
|
.kit-icon svg {
|
|
19
|
-
color: var(--icon-color);
|
|
16
|
+
color: var(--icon-color, currentColor);
|
|
20
17
|
}
|
|
21
18
|
|
|
22
19
|
.kit-icon svg,
|
|
23
20
|
.kit-icon img {
|
|
24
|
-
width: calc(
|
|
21
|
+
width: calc(
|
|
22
|
+
var(--icon-multiplier-parent-size, var(--icon-multiplier-size)) * var(--system-spacing)
|
|
23
|
+
);
|
|
25
24
|
height: calc(
|
|
26
|
-
var(--icon-multiplier-parent-size, var(--icon-multiplier-size)) * var(--
|
|
25
|
+
var(--icon-multiplier-parent-size, var(--icon-multiplier-size)) * var(--system-spacing)
|
|
27
26
|
);
|
|
28
27
|
}
|
|
29
28
|
|
|
@@ -50,16 +49,16 @@
|
|
|
50
49
|
|
|
51
50
|
/* state */
|
|
52
51
|
.kit-icon.kit-icon--info {
|
|
53
|
-
--base: var(--kit-info);
|
|
52
|
+
--base: var(--kit-accent-info);
|
|
54
53
|
}
|
|
55
54
|
.kit-icon.kit-icon--success {
|
|
56
|
-
--base: var(--kit-
|
|
55
|
+
--base: var(--kit-accent-successs);
|
|
57
56
|
}
|
|
58
57
|
.kit-icon.kit-icon--warning {
|
|
59
|
-
--base: var(--kit-warning);
|
|
58
|
+
--base: var(--kit-accent-warning);
|
|
60
59
|
}
|
|
61
60
|
.kit-icon.kit-icon--error {
|
|
62
|
-
--base: var(--kit-
|
|
61
|
+
--base: var(--kit-accent-destructive);
|
|
63
62
|
}
|
|
64
63
|
|
|
65
64
|
/* disabled */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { getAssets } from '../../internal/assets.svelte.js';
|
|
2
|
+
import { getAssets } from '../../internal/core/actions/assets.svelte.js';
|
|
3
3
|
import type { IconProps } from './types.js';
|
|
4
4
|
let {
|
|
5
5
|
children,
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
size && assets.className('icon', 'size', size),
|
|
40
40
|
rest.class
|
|
41
41
|
]}
|
|
42
|
-
style:--
|
|
42
|
+
style:--icon-color={assets.color(color)}
|
|
43
43
|
>
|
|
44
44
|
{#if icon && icon.includes('/')}
|
|
45
45
|
<img src={icon} {alt} />
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/* root */
|
|
2
|
-
.kit-list {
|
|
3
|
-
--list-color: var(--on, var(--kit-on-container));
|
|
4
|
-
--list-background: var(--base, var(--kit-container));
|
|
5
|
-
--list-radius: var(--shape, var(--kit-radius-md));
|
|
6
|
-
}
|
|
7
|
-
|
|
8
1
|
.kit-list {
|
|
9
2
|
position: relative;
|
|
10
3
|
flex-direction: column;
|
|
@@ -14,74 +7,6 @@
|
|
|
14
7
|
outline: none;
|
|
15
8
|
}
|
|
16
9
|
|
|
17
|
-
.kit-list-item {
|
|
18
|
-
--list-item-radius: var(--shape, var(--list-radius, var(--kit-radius-md)));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.kit-list-item {
|
|
22
|
-
position: relative;
|
|
23
|
-
border: none;
|
|
24
|
-
outline: none;
|
|
25
|
-
padding-top: var(--list-spacing-x);
|
|
26
|
-
padding-bottom: var(--list-spacing-x);
|
|
27
|
-
padding-right: var(--list-spacing-y);
|
|
28
|
-
padding-left: var(--list-spacing-y);
|
|
29
|
-
color: var(--list-item-color);
|
|
30
|
-
border-radius: var(--list-item-radius);
|
|
31
|
-
font-weight: 500;
|
|
32
|
-
text-decoration: none;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.kit-list-item:not(div) {
|
|
36
|
-
cursor: pointer;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.kit-list-item,
|
|
40
|
-
.kit-list-item .kit-list-item-content--content,
|
|
41
|
-
.kit-list-item .kit-list-item-content--append,
|
|
42
|
-
.kit-list-item .kit-list-item-content--prepend {
|
|
43
|
-
display: inline-flex;
|
|
44
|
-
align-items: center;
|
|
45
|
-
white-space: nowrap;
|
|
46
|
-
gap: calc(var(--kit-spacing) * var(--list-multiplier-gap));
|
|
47
|
-
font-size: calc(var(--kit-spacing) * var(--list-multiplier-font-size));
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.kit-list-item.kit-list-item--append:not(.kit-list-item--prepend) {
|
|
51
|
-
display: grid;
|
|
52
|
-
grid-template-columns: auto 1fr;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.kit-list-item.kit-list-item--prepend:not(.kit-list-item--append) {
|
|
56
|
-
display: grid;
|
|
57
|
-
grid-template-columns: 1fr auto;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.kit-list-item.kit-list-item--prepend.kit-list-item--append {
|
|
61
|
-
display: grid;
|
|
62
|
-
grid-template-columns: auto 1fr auto;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.kit-list-item::after {
|
|
66
|
-
content: '';
|
|
67
|
-
position: absolute;
|
|
68
|
-
inset: 0;
|
|
69
|
-
background-color: currentColor;
|
|
70
|
-
opacity: 0;
|
|
71
|
-
transition: opacity 150ms ease;
|
|
72
|
-
pointer-events: none;
|
|
73
|
-
border-radius: inherit;
|
|
74
|
-
}
|
|
75
|
-
.kit-list-item:not(div):hover::after {
|
|
76
|
-
opacity: 0.08;
|
|
77
|
-
}
|
|
78
|
-
.kit-list-item:not(div):active::after {
|
|
79
|
-
opacity: 0.12;
|
|
80
|
-
}
|
|
81
|
-
.kit-list-item:not(div):focus-visible::after {
|
|
82
|
-
opacity: 0.12;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
10
|
.kit-list.kit-list--nav {
|
|
86
11
|
padding-top: 8px;
|
|
87
12
|
padding-bottom: 8px;
|
|
@@ -140,36 +65,39 @@
|
|
|
140
65
|
}
|
|
141
66
|
|
|
142
67
|
/* density */
|
|
143
|
-
.kit-list[breakpoint]kit-list--density-default
|
|
144
|
-
height: calc(var(--
|
|
68
|
+
.kit-list[breakpoint]kit-list--density-default {
|
|
69
|
+
--list-height: calc(var(--system-spacing) * var(--list-multiplier-x));
|
|
145
70
|
--list-spacing-x: 0;
|
|
146
|
-
--list-spacing-y: calc(var(--
|
|
71
|
+
--list-spacing-y: calc(var(--system-spacing) * var(--list-multiplier-y));
|
|
147
72
|
}
|
|
148
73
|
|
|
149
|
-
.kit-list[breakpoint]kit-list--density-compact
|
|
150
|
-
height: calc(var(--
|
|
74
|
+
.kit-list[breakpoint]kit-list--density-compact {
|
|
75
|
+
--list-height: calc(var(--system-spacing) * var(--list-multiplier-x) - 0.25rem);
|
|
151
76
|
--list-spacing-x: 0;
|
|
152
|
-
--list-spacing-y: calc(var(--
|
|
77
|
+
--list-spacing-y: calc(var(--system-spacing) * var(--list-multiplier-y) - 0.25rem);
|
|
153
78
|
}
|
|
154
79
|
|
|
155
|
-
.kit-list[breakpoint]kit-list--density-comfortable
|
|
156
|
-
height: calc(var(--
|
|
80
|
+
.kit-list[breakpoint]kit-list--density-comfortable {
|
|
81
|
+
--list-height: calc(var(--system-spacing) * var(--list-multiplier-x) + 0.25rem);
|
|
157
82
|
--list-spacing-x: 0;
|
|
158
|
-
--list-spacing-y: calc(var(--
|
|
83
|
+
--list-spacing-y: calc(var(--system-spacing) * var(--list-multiplier-y) + 0.25rem);
|
|
159
84
|
}
|
|
160
85
|
|
|
161
86
|
/* variant */
|
|
162
87
|
.kit-list[breakpoint]kit-list--variant-filled .kit-list-item {
|
|
163
|
-
--list-item-color: var(--on, var(--list-color, var(--kit-
|
|
164
|
-
--list-item-background: var(
|
|
88
|
+
--list-item-color: var(--on, var(--list-color, var(--kit-label-primary)));
|
|
89
|
+
--list-item-background: var(
|
|
90
|
+
--base,
|
|
91
|
+
var(--list-background, var(--kit-background-grouped-primary))
|
|
92
|
+
);
|
|
165
93
|
background-color: var(--list-item-background);
|
|
166
94
|
}
|
|
167
95
|
|
|
168
96
|
.kit-list[breakpoint]kit-list--variant-outline .kit-list-item {
|
|
169
|
-
--list-item-color: var(--base, var(--list-color, var(--kit-
|
|
97
|
+
--list-item-color: var(--base, var(--list-color, var(--kit-label-primary)));
|
|
170
98
|
background-color: transparent;
|
|
171
99
|
}
|
|
172
|
-
.kit-list[breakpoint]kit-list--variant-outline .kit-list-item::before {
|
|
100
|
+
.kit-list[breakpoint]kit-list--variant-outline :global(.kit-list-item::before) {
|
|
173
101
|
content: '';
|
|
174
102
|
position: absolute;
|
|
175
103
|
inset: 0;
|
|
@@ -179,7 +107,7 @@
|
|
|
179
107
|
}
|
|
180
108
|
|
|
181
109
|
.kit-list[breakpoint]kit-list--variant-text .kit-list-item {
|
|
182
|
-
--list-item-color: var(--base, var(--list-color, var(--kit-
|
|
110
|
+
--list-item-color: var(--base, var(--list-color, var(--kit-label-primary)));
|
|
183
111
|
background-color: transparent;
|
|
184
112
|
border-color: transparent;
|
|
185
113
|
}
|
|
@@ -187,8 +115,8 @@
|
|
|
187
115
|
/* events */
|
|
188
116
|
.kit-list[class*='list--variant-filled'] .kit-list-item.kit-list-item--active:not(div),
|
|
189
117
|
.kit-list[class*='list--variant-filled'] .kit-list-item:active:not(div) {
|
|
190
|
-
background-color: color-mix(in oklab, var(--list-item-background) 90%, var(--kit-
|
|
191
|
-
border-color: color-mix(in oklab, var(--list-item-background) 90%, var(--kit-
|
|
118
|
+
background-color: color-mix(in oklab, var(--list-item-background) 90%, var(--kit-state-shadow));
|
|
119
|
+
border-color: color-mix(in oklab, var(--list-item-background) 90%, var(--kit-state-shadow));
|
|
192
120
|
}
|
|
193
121
|
.kit-list[class*='list--variant-']:not([class*='variant-filled'])
|
|
194
122
|
.kit-list-item.kit-list-item--active:not(div),
|
|
@@ -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 { ListProps } from './types.js';
|
|
4
4
|
|
|
5
5
|
let {
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
rest.class
|
|
37
37
|
]}
|
|
38
38
|
role="listbox"
|
|
39
|
-
style:--
|
|
40
|
-
style:--
|
|
41
|
-
style:--shape={assets.shape(rounded)}
|
|
39
|
+
style:--list-background={assets.color(background)}
|
|
40
|
+
style:--list-color={assets.color(color)}
|
|
41
|
+
style:--list-shape={assets.shape(rounded)}
|
|
42
42
|
>
|
|
43
43
|
{@render children?.()}
|
|
44
44
|
</svelte:element>
|
|
@@ -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';
|