lapikit 0.0.0-insiders.422a9fc → 0.0.0-insiders.426231f
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/helper.js +0 -38
- package/bin/prompts.js +1 -1
- package/dist/actions/index.d.ts +1 -0
- package/dist/actions/index.js +1 -0
- package/dist/actions/use-theme.d.ts +1 -0
- package/dist/actions/use-theme.js +18 -0
- package/dist/components/accordion/modules/accordion-item.css +2 -2
- package/dist/components/alert/alert.css +10 -10
- package/dist/components/app/app.css +12 -1
- package/dist/components/app/app.svelte +49 -14
- package/dist/components/app/app.svelte.d.ts +2 -7
- package/dist/components/app/types.d.ts +7 -1
- package/dist/components/appbar/appbar.css +3 -3
- package/dist/components/avatar/avatar.css +7 -7
- package/dist/components/button/button.css +14 -14
- package/dist/components/card/card.css +5 -5
- package/dist/components/card/card.svelte +4 -0
- package/dist/components/card/types.d.ts +2 -0
- package/dist/components/chip/chip.css +17 -17
- package/dist/components/dialog/dialog.css +4 -4
- package/dist/components/dropdown/dropdown.css +2 -2
- package/dist/components/dropdown/dropdown.svelte +0 -1
- package/dist/components/icon/icon.css +6 -6
- package/dist/components/list/list.css +9 -6
- package/dist/components/list/modules/list-item.css +1 -1
- package/dist/components/modal/modal.css +3 -3
- package/dist/components/popover/popover.css +2 -2
- package/dist/components/separator/separator.css +17 -17
- package/dist/components/separator/separator.svelte +1 -1
- package/dist/components/separator/types.d.ts +5 -1
- package/dist/components/textfield/textfield.css +5 -5
- package/dist/components/toolbar/toolbar.css +4 -15
- package/dist/components/tooltip/tooltip.css +4 -4
- package/dist/internal/config/presets.d.ts +71 -49
- package/dist/internal/config/presets.js +71 -40
- package/dist/internal/config/variables.d.ts +1 -5
- package/dist/internal/config/variables.js +1 -5
- package/dist/internal/core/animations/ripple.js +1 -1
- package/dist/internal/core/formatter/index.d.ts +1 -1
- package/dist/internal/core/formatter/index.js +1 -1
- package/dist/internal/core/formatter/theme.js +17 -2
- package/dist/internal/core/formatter/typography.js +1 -1
- package/dist/internal/core/standard-colors.d.ts +75 -0
- package/dist/internal/core/standard-colors.js +75 -0
- package/dist/internal/helpers/scroll.js +1 -2
- package/dist/internal/plugins/vite.js +4 -4
- package/dist/internal/types/configuration.d.ts +12 -13
- package/dist/stores/index.d.ts +1 -0
- package/dist/stores/index.js +1 -0
- package/dist/stores/themes.d.ts +0 -1
- package/dist/stores/themes.js +0 -17
- package/dist/stores/viewport.d.ts +7 -0
- package/dist/stores/viewport.js +7 -0
- package/dist/styles/reset.css +2 -2
- package/dist/styles.css.d.ts +4 -0
- package/dist/themes.css.d.ts +4 -0
- package/package.json +128 -96
- 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/README.md
CHANGED
|
@@ -1 +1,117 @@
|
|
|
1
|
-
|
|
1
|
+
<a href="https://lapikit.dev">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/Nycolaide/lapikit/main/.github/lapikit.svg" alt="Lapikit Logo" width="125">
|
|
3
|
+
</a>
|
|
4
|
+
|
|
5
|
+
# Lapikit - Svelte components library
|
|
6
|
+
|
|
7
|
+
[![][discover-lapikit-npm]](https://www.npmjs.com/package/lapikit)
|
|
8
|
+
[![][subscribe-to-instagram]](https://www.instagram.com/lapikit/)
|
|
9
|
+
[![][join-discord-lapikit]](https://discord.gg/gn9ZGtDtK4)
|
|
10
|
+
|
|
11
|
+
[![][version]](https://github.com/nycolaide/lapikit/releases?q=lapikit&expanded=true)
|
|
12
|
+
[![][installs]](https://www.npmjs.com/package/lapikit)
|
|
13
|
+
[![][installs-this-month]](https://www.npmjs.com/package/lapikit)
|
|
14
|
+
[![][license]](https://github.com/nycolaide/lapikit/blob/main/LICENSE)
|
|
15
|
+
[![][discord]](https://discord.gg/gn9ZGtDtK4)
|
|
16
|
+
|
|
17
|
+
Lapikit is a comprehensive Svelte components library that provides developers with a wide range of pre-built, customizable UI components to streamline the development process. Whether you're building a simple website or a complex web application, Lapikit has the tools you need to create beautiful and functional user interfaces with ease.
|
|
18
|
+
|
|
19
|
+
## 🖥️ Documentation
|
|
20
|
+
|
|
21
|
+
To check out the documentation, visit [lapikit.dev](https://lapikit.dev)
|
|
22
|
+
|
|
23
|
+
## ✨Quick Start
|
|
24
|
+
|
|
25
|
+
Getting started with Lapikit is easy. After create you SvelteKit project, you can install Lapikit using your preferred package manager:
|
|
26
|
+
|
|
27
|
+
Usage [bun](https://bun.sh/):
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
bun add -d lapikit
|
|
31
|
+
npx lapikit
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Using [npm](https://www.npmjs.com/):
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm i -D lapikit
|
|
38
|
+
npx lapikit
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Using [yarn](https://yarnpkg.com/):
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
yarn add -D lapikit
|
|
45
|
+
npx lapikit
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Using [pnpm](https://pnpm.io/):
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pnpm add -D lapikit
|
|
52
|
+
npx lapikit
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## 🚩Table of Contents
|
|
56
|
+
|
|
57
|
+
- [Lapikit - Svelte components library](#lapikit---svelte-components-library)
|
|
58
|
+
- [🖥️ Documentation](#️-documentation)
|
|
59
|
+
- [✨Quick Start](#quick-start)
|
|
60
|
+
- [🚩Table of Contents](#table-of-contents)
|
|
61
|
+
- [🤯Motivation](#motivation)
|
|
62
|
+
- [💖Community](#community)
|
|
63
|
+
- [💁♂️Contributing](#️contributing)
|
|
64
|
+
- [🖖Core Team Lapikit](#core-team-lapikit)
|
|
65
|
+
- [📄License](#license)
|
|
66
|
+
- [🪧We support these projects](#we-support-these-projects)
|
|
67
|
+
|
|
68
|
+
## 🤯Motivation
|
|
69
|
+
|
|
70
|
+
Lapikit has created to help Svelte developers save time and effort when building user interfaces. By providing a wide range of pre-built components, Lapikit allows developers to focus on building their applications rather than spending time designing and coding UI elements from scratch.
|
|
71
|
+
|
|
72
|
+
## 💖Community
|
|
73
|
+
|
|
74
|
+
Join our growing community on [Discord](https://discord.gg/gn9ZGtDtK4) and [GitHub Discussions](https://github.com/nycolaide/lapikit/discussions) where we discuss and collaborate on all things Lapikit. Don't be shy, jump right in and be part of the discussion!
|
|
75
|
+
|
|
76
|
+
## 💁♂️Contributing
|
|
77
|
+
|
|
78
|
+
Be part of the next revolution in code editing by contributing to the project. This is a community-led effort, so we welcome as many contributors who can help. Read the Contribution Guide for more information.
|
|
79
|
+
|
|
80
|
+
## 🖖Core Team Lapikit
|
|
81
|
+
|
|
82
|
+
[@Nycolaide](https://github.com/Nycolaide)
|
|
83
|
+
[@Simone](https://github.com/fersimone)
|
|
84
|
+
|
|
85
|
+
## 📄License
|
|
86
|
+
|
|
87
|
+
Licensed under the [MIT license](https://github.com/nycolaide/lapikit/blob/main/LICENSE).
|
|
88
|
+
|
|
89
|
+
Copyright © 2025 Nycolaide
|
|
90
|
+
|
|
91
|
+
## 🪧We support these projects
|
|
92
|
+
|
|
93
|
+
We are proud supporters of the open-source community and contribute to several projects that help make the web a better place. Here are some of the projects we support:
|
|
94
|
+
|
|
95
|
+
<table>
|
|
96
|
+
<tr>
|
|
97
|
+
<td>
|
|
98
|
+
<a href="https://www.w3.org/">
|
|
99
|
+
<img src="https://raw.githubusercontent.com/Nycolaide/lapikit/main/.github/w3c.svg" alt="W3C" width="75">
|
|
100
|
+
</a>
|
|
101
|
+
</td>
|
|
102
|
+
<td>
|
|
103
|
+
<a href="https://humanstxt.org/">
|
|
104
|
+
<img src="https://raw.githubusercontent.com/Nycolaide/lapikit/main/.github/humans.png" alt="Humans.txt" width="115">
|
|
105
|
+
</a>
|
|
106
|
+
</td>
|
|
107
|
+
</tr>
|
|
108
|
+
</table>
|
|
109
|
+
|
|
110
|
+
[discover-lapikit-npm]: https://img.shields.io/badge/Lapikit-black.svg?style=for-the-badge&logo=NPM
|
|
111
|
+
[join-discord-lapikit]: https://img.shields.io/badge/Join%20the%20community-black.svg?style=for-the-badge&logo=Discord
|
|
112
|
+
[subscribe-to-instagram]: https://img.shields.io/badge/Follow%20@Lapikit-black.svg?style=for-the-badge&logo=Instagram
|
|
113
|
+
[version]: https://img.shields.io/npm/v/lapikit.svg?label=Version&color=f58142
|
|
114
|
+
[license]: https://badgen.net/github/license/nycolaide/lapikit?label=License&color=cc5640
|
|
115
|
+
[installs]: https://badgen.net/npm/dt/lapikit?label=NPM%20installs&color=40ba12
|
|
116
|
+
[installs-this-month]: https://badgen.net/npm/dm/lapikit?label=NPM%20installs&color=40ba12
|
|
117
|
+
[discord]: https://img.shields.io/discord/1383879204671721492?color=5865F2&label=Discord&logo=discord&logoColor=white
|
package/bin/helper.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { promises as fs } from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
|
|
4
1
|
const color = {
|
|
5
2
|
red: (text) => `\x1b[31m${text}\x1b[0m`,
|
|
6
3
|
green: (text) => `\x1b[32m${text}\x1b[0m`,
|
|
@@ -60,38 +57,3 @@ export const terminal = (type = 'info', msg) => {
|
|
|
60
57
|
else if (type === 'none') console.log(msg);
|
|
61
58
|
else console.log(name, ansi.bold.blue('[info]'), msg);
|
|
62
59
|
};
|
|
63
|
-
|
|
64
|
-
export function getCssPathFromArgs() {
|
|
65
|
-
const args = process.argv.slice(2);
|
|
66
|
-
return args[1] || 'src/app.css';
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export function getLapikitPathFromArgs() {
|
|
70
|
-
const args = process.argv.slice(2);
|
|
71
|
-
// Search argument after --plugin-path or -p
|
|
72
|
-
const pluginPathIndex = args.findIndex((arg) => arg === '--plugin-path' || arg === '-p');
|
|
73
|
-
if (pluginPathIndex !== -1 && args[pluginPathIndex + 1]) {
|
|
74
|
-
return args[pluginPathIndex + 1];
|
|
75
|
-
}
|
|
76
|
-
return 'src/plugin';
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export function validatePluginPath(pluginPath) {
|
|
80
|
-
if (!pluginPath.startsWith('src/')) {
|
|
81
|
-
return {
|
|
82
|
-
valid: false,
|
|
83
|
-
error: 'The path must start with "src/"'
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
return { valid: true };
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export async function envTypescript() {
|
|
90
|
-
const directory = process.cwd();
|
|
91
|
-
try {
|
|
92
|
-
await fs.readFile(path.resolve(directory, 'tsconfig.json'), 'utf-8');
|
|
93
|
-
return true;
|
|
94
|
-
} catch {
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
}
|
package/bin/prompts.js
CHANGED
package/dist/actions/index.d.ts
CHANGED
package/dist/actions/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useTheme(name: string, key?: string): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { theme } from '../stores/themes.js';
|
|
2
|
+
// states
|
|
3
|
+
const isBrowser = typeof window !== 'undefined';
|
|
4
|
+
export function useTheme(name, key = '@lapikit/theme') {
|
|
5
|
+
theme.update(() => {
|
|
6
|
+
if (isBrowser) {
|
|
7
|
+
const html = document.documentElement;
|
|
8
|
+
html.classList.forEach((cls) => {
|
|
9
|
+
if (cls.startsWith('kit-theme--')) {
|
|
10
|
+
html.classList.remove(cls);
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
html.classList.add(`kit-theme--${name}`);
|
|
14
|
+
localStorage.setItem(key, name);
|
|
15
|
+
}
|
|
16
|
+
return name;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
transition: 0.3s all cubic-bezier(0.4, 0, 0.2, 1);
|
|
6
6
|
transition-property: margin-top, border-radius, border, max-width;
|
|
7
7
|
border-radius: var(--accordion-shape, var(--system-shape-md));
|
|
8
|
-
color: var(--accordion-color, var(--
|
|
9
|
-
background-color: var(--accordion-background, var(--
|
|
8
|
+
color: var(--accordion-color, var(--kit-label-primary));
|
|
9
|
+
background-color: var(--accordion-background, var(--kit-background-grouped-primary));
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.kit-accordion-item > button,
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
position: relative;
|
|
9
9
|
padding: 1rem;
|
|
10
10
|
overflow: hidden;
|
|
11
|
-
color: var(--alert-color, var(--
|
|
12
|
-
background-color: var(--alert-background, var(--
|
|
11
|
+
color: var(--alert-color, var(--kit-label-primary));
|
|
12
|
+
background-color: var(--alert-background, var(--kit-background-grouped-tertiary));
|
|
13
13
|
border-radius: var(--alert-shape, var(--system-shape-md));
|
|
14
14
|
line-height: 0;
|
|
15
15
|
}
|
|
@@ -80,34 +80,34 @@
|
|
|
80
80
|
/* state */
|
|
81
81
|
.kit-alert.kit-alert--info:not([class*='alert--variant-']) {
|
|
82
82
|
--on: var(--kit-on-info);
|
|
83
|
-
--base: var(--kit-info);
|
|
83
|
+
--base: var(--kit-accent-info);
|
|
84
84
|
}
|
|
85
85
|
.kit-alert.kit-alert--info[class*='alert--variant-'] {
|
|
86
|
-
--base: var(--kit-info);
|
|
86
|
+
--base: var(--kit-accent-info);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.kit-alert.kit-alert--success:not([class*='alert--variant-']) {
|
|
90
90
|
--on: var(--kit-on-success);
|
|
91
|
-
--base: var(--kit-
|
|
91
|
+
--base: var(--kit-accent-successs);
|
|
92
92
|
}
|
|
93
93
|
.kit-alert.kit-alert--success[class*='alert--variant-'] {
|
|
94
|
-
--base: var(--kit-
|
|
94
|
+
--base: var(--kit-accent-successs);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
.kit-alert.kit-alert--warning:not([class*='alert--variant-']) {
|
|
98
98
|
--on: var(--kit-on-warning);
|
|
99
|
-
--base: var(--kit-warning);
|
|
99
|
+
--base: var(--kit-accent-warning);
|
|
100
100
|
}
|
|
101
101
|
.kit-alert.kit-alert--warning[class*='alert--variant-'] {
|
|
102
|
-
--base: var(--kit-warning);
|
|
102
|
+
--base: var(--kit-accent-warning);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
.kit-alert.kit-alert--error:not([class*='alert--variant-']) {
|
|
106
106
|
--on: var(--kit-on-error);
|
|
107
|
-
--base: var(--kit-
|
|
107
|
+
--base: var(--kit-accent-destructive);
|
|
108
108
|
}
|
|
109
109
|
.kit-alert.kit-alert--error[class*='alert--variant-'] {
|
|
110
|
-
--base: var(--kit-
|
|
110
|
+
--base: var(--kit-accent-destructive);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
/* variant */
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
+
#kit-app,
|
|
2
|
+
.kit-application {
|
|
3
|
+
-webkit-text-size-adjust: 100%;
|
|
4
|
+
tab-size: 4;
|
|
5
|
+
line-height: 1.5;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
font-family: var(--kit-font-sans);
|
|
8
|
+
background-color: var(--kit-background-primary);
|
|
9
|
+
color: var(--kit-label-primary);
|
|
10
|
+
}
|
|
11
|
+
|
|
1
12
|
.kit-overlay {
|
|
2
13
|
position: fixed;
|
|
3
14
|
top: 0;
|
|
4
15
|
left: 0;
|
|
5
16
|
height: 100%;
|
|
6
17
|
width: 100%;
|
|
7
|
-
background-color: color-mix(in oklab,
|
|
18
|
+
background-color: color-mix(in oklab, black 70%, transparent);
|
|
8
19
|
z-index: 9000;
|
|
9
20
|
cursor: default;
|
|
10
21
|
}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import { useTheme } from '../../stores/themes.js';
|
|
2
|
+
const BROWSER = typeof window !== 'undefined';
|
|
3
|
+
import { useTheme } from '../../actions/use-theme.js';
|
|
5
4
|
import { modalOpen, setOpenModal } from '../../stores/components.js';
|
|
6
5
|
|
|
6
|
+
import { viewport } from '../../stores/viewport.js';
|
|
7
|
+
import type { AppProps } from './types.js';
|
|
8
|
+
|
|
7
9
|
let {
|
|
10
|
+
ref = $bindable(),
|
|
8
11
|
children,
|
|
9
12
|
themes,
|
|
10
|
-
storageKey = '@lapikit/theme'
|
|
11
|
-
|
|
13
|
+
storageKey = '@lapikit/theme',
|
|
14
|
+
light,
|
|
15
|
+
dark,
|
|
16
|
+
...rest
|
|
17
|
+
}: AppProps = $props();
|
|
12
18
|
|
|
13
19
|
$effect.pre(() => {
|
|
14
20
|
if (!BROWSER) return;
|
|
@@ -29,16 +35,45 @@
|
|
|
29
35
|
useTheme(colorScheme);
|
|
30
36
|
}
|
|
31
37
|
}
|
|
38
|
+
|
|
39
|
+
// Met à jour le store viewport à l'init et sur resize
|
|
40
|
+
function updateViewport() {
|
|
41
|
+
viewport.set({
|
|
42
|
+
innerWidth: window.innerWidth,
|
|
43
|
+
outerWidth: window.outerWidth,
|
|
44
|
+
innerHeight: window.innerHeight,
|
|
45
|
+
outerHeight: window.outerHeight
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
updateViewport();
|
|
49
|
+
window.addEventListener('resize', updateViewport);
|
|
50
|
+
return () => {
|
|
51
|
+
window.removeEventListener('resize', updateViewport);
|
|
52
|
+
};
|
|
32
53
|
});
|
|
33
54
|
</script>
|
|
34
55
|
|
|
35
|
-
|
|
56
|
+
<div
|
|
57
|
+
id="kit-app"
|
|
58
|
+
bind:this={ref}
|
|
59
|
+
{...rest}
|
|
60
|
+
class={[
|
|
61
|
+
'kit-application',
|
|
62
|
+
light && 'light',
|
|
63
|
+
dark && 'dark',
|
|
64
|
+
light && 'kit-theme--light',
|
|
65
|
+
dark && 'kit-theme--dark',
|
|
66
|
+
rest.class
|
|
67
|
+
]}
|
|
68
|
+
>
|
|
69
|
+
{@render children?.()}
|
|
36
70
|
|
|
37
|
-
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
38
|
-
{#if $modalOpen}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{/if}
|
|
71
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
72
|
+
{#if $modalOpen}
|
|
73
|
+
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
74
|
+
<div
|
|
75
|
+
class={['kit-overlay', $modalOpen === 'persistent' && 'kit-overlay--persistent']}
|
|
76
|
+
onclick={() => $modalOpen !== 'persistent' && setOpenModal(false)}
|
|
77
|
+
></div>
|
|
78
|
+
{/if}
|
|
79
|
+
</div>
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
children: Snippet;
|
|
4
|
-
themes?: string | string[];
|
|
5
|
-
storageKey?: string;
|
|
6
|
-
};
|
|
7
|
-
declare const App: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
1
|
+
import type { AppProps } from './types.js';
|
|
2
|
+
declare const App: import("svelte").Component<AppProps, {}, "ref">;
|
|
8
3
|
type App = ReturnType<typeof App>;
|
|
9
4
|
export default App;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
-
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
export interface AppProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
ref?: HTMLDivElement;
|
|
3
5
|
children?: Snippet;
|
|
6
|
+
themes?: string | string[];
|
|
7
|
+
storageKey?: string;
|
|
8
|
+
light?: boolean;
|
|
9
|
+
dark?: boolean;
|
|
4
10
|
}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
border-style: solid;
|
|
7
7
|
border-width: 1px;
|
|
8
8
|
border-radius: var(--appbar-shape);
|
|
9
|
-
color: var(--appbar-color, var(--
|
|
10
|
-
background-color: var(--appbar-background, var(--
|
|
11
|
-
border-color: var(--appbar-background, var(--
|
|
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
12
|
}
|
|
13
13
|
|
|
14
14
|
/* wrapper */
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
padding-left: var(--avatar-spacing-y);
|
|
10
10
|
border-width: 1px;
|
|
11
11
|
border-style: solid;
|
|
12
|
-
border-radius: var(--avatar-shape);
|
|
13
|
-
color: var(--avatar-color, var(--
|
|
14
|
-
background-color: var(--avatar-background, var(--
|
|
15
|
-
border-color: var(--avatar-background, var(--
|
|
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
16
|
}
|
|
17
17
|
|
|
18
18
|
.kit-avatar.kit-avatar--image {
|
|
@@ -84,19 +84,19 @@
|
|
|
84
84
|
|
|
85
85
|
/* variant */
|
|
86
86
|
.kit-avatar[breakpoint]kit-avatar--variant-outline {
|
|
87
|
-
--avatar-color: var(--base, var(--kit-
|
|
87
|
+
--avatar-color: var(--base, var(--kit-background-grouped-tertiary));
|
|
88
88
|
background-color: transparent;
|
|
89
89
|
border: 1px solid currentColor;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
.kit-avatar[breakpoint]kit-avatar--variant-text {
|
|
93
|
-
--avatar-color: var(--base, var(--kit-
|
|
93
|
+
--avatar-color: var(--base, var(--kit-background-grouped-tertiary));
|
|
94
94
|
background-color: transparent;
|
|
95
95
|
border-color: transparent;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
.kit-avatar[breakpoint]kit-avatar--variant-dash {
|
|
99
|
-
--avatar-color: var(--base, var(--kit-
|
|
99
|
+
--avatar-color: var(--base, var(--kit-background-grouped-tertiary));
|
|
100
100
|
background-color: transparent;
|
|
101
101
|
border: 1px dashed currentColor;
|
|
102
102
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
padding-right: var(--button-spacing-y);
|
|
9
9
|
padding-left: var(--button-spacing-y);
|
|
10
10
|
border-radius: var(--button-shape, var(--system-shape-md));
|
|
11
|
-
color: var(--button-color, var(--
|
|
11
|
+
color: var(--button-color, var(--kit-label-primary));
|
|
12
12
|
font-weight: 500;
|
|
13
13
|
text-decoration: none;
|
|
14
14
|
}
|
|
@@ -136,12 +136,12 @@
|
|
|
136
136
|
|
|
137
137
|
/* variant */
|
|
138
138
|
.kit-button[breakpoint]kit-button--variant-filled {
|
|
139
|
-
background-color: var(--button-background, var(--
|
|
139
|
+
background-color: var(--button-background, var(--kit-background-grouped-primary));
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
.kit-button[breakpoint]kit-button--variant-outline {
|
|
143
|
-
--button-color: var(--on, var(--kit-
|
|
144
|
-
background-color: var(--button-background, var(--
|
|
143
|
+
--button-color: var(--on, var(--kit-label-primary));
|
|
144
|
+
background-color: var(--button-background, var(--kit-background-grouped-primary));
|
|
145
145
|
}
|
|
146
146
|
.kit-button[breakpoint]kit-button--variant-outline::before {
|
|
147
147
|
content: '';
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
.kit-button[breakpoint]kit-button--variant-text {
|
|
156
|
-
--button-color: var(--base, var(--kit-
|
|
156
|
+
--button-color: var(--base, var(--kit-label-primary));
|
|
157
157
|
background-color: transparent;
|
|
158
158
|
border: none;
|
|
159
159
|
}
|
|
@@ -161,37 +161,37 @@
|
|
|
161
161
|
/* state */
|
|
162
162
|
.kit-button.kit-button--info[class*='button--variant-filled'] {
|
|
163
163
|
--on: var(--kit-on-info);
|
|
164
|
-
--base: var(--kit-info);
|
|
164
|
+
--base: var(--kit-accent-info);
|
|
165
165
|
}
|
|
166
166
|
.kit-button.kit-button--info[class*='button--variant-']:not([class*='variant-filled']) {
|
|
167
|
-
--base: var(--kit-info);
|
|
167
|
+
--base: var(--kit-accent-info);
|
|
168
168
|
}
|
|
169
169
|
.kit-button.kit-button--success[class*='button--variant-filled'] {
|
|
170
170
|
--on: var(--kit-on-success);
|
|
171
|
-
--base: var(--kit-
|
|
171
|
+
--base: var(--kit-accent-successs);
|
|
172
172
|
}
|
|
173
173
|
.kit-button.kit-button--success[class*='button--variant-']:not([class*='variant-filled']) {
|
|
174
|
-
--base: var(--kit-
|
|
174
|
+
--base: var(--kit-accent-successs);
|
|
175
175
|
}
|
|
176
176
|
.kit-button.kit-button--warning[class*='button--variant-filled'] {
|
|
177
177
|
--on: var(--kit-on-warning);
|
|
178
|
-
--base: var(--kit-warning);
|
|
178
|
+
--base: var(--kit-accent-warning);
|
|
179
179
|
}
|
|
180
180
|
.kit-button.kit-button--warning[class*='button--variant-']:not([class*='variant-filled']) {
|
|
181
|
-
--base: var(--kit-warning);
|
|
181
|
+
--base: var(--kit-accent-warning);
|
|
182
182
|
}
|
|
183
183
|
.kit-button.kit-button--error[class*='button--variant-filled'] {
|
|
184
184
|
--on: var(--kit-on-error);
|
|
185
|
-
--base: var(--kit-
|
|
185
|
+
--base: var(--kit-accent-destructive);
|
|
186
186
|
}
|
|
187
187
|
.kit-button.kit-button--error[class*='button--variant-']:not([class*='variant-filled']) {
|
|
188
|
-
--base: var(--kit-
|
|
188
|
+
--base: var(--kit-accent-destructive);
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
/* events */
|
|
192
192
|
.kit-button[class*='button--variant-filled']:active,
|
|
193
193
|
.kit-button.kit-button--active[class*='button--variant-filled'] {
|
|
194
|
-
background-color: color-mix(in oklab, var(--button-background) 90%, var(--kit-
|
|
194
|
+
background-color: color-mix(in oklab, var(--button-background) 90%, var(--kit-state-shadow));
|
|
195
195
|
}
|
|
196
196
|
.kit-button.kit-button--active[class*='button--variant-']:not([class*='variant-filled']):active,
|
|
197
197
|
.kit-button.kit-button--active[class*='button--variant-']:not([class*='variant-filled']) {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
padding-left: var(--card-spacing-y);
|
|
11
11
|
border-radius: var(--card-shape, var(--system-shape-md));
|
|
12
12
|
font-weight: 500;
|
|
13
|
-
color: var(--card-color, var(--
|
|
13
|
+
color: var(--card-color, var(--kit-label-primary));
|
|
14
14
|
text-decoration: none;
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
|
|
55
55
|
/* variant */
|
|
56
56
|
.kit-card[breakpoint]kit-card--variant-filled {
|
|
57
|
-
background-color: var(--card-background, var(--
|
|
57
|
+
background-color: var(--card-background, var(--kit-background-grouped-secondary));
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.kit-card[breakpoint]kit-card--variant-outline {
|
|
61
|
-
--card-color: var(--
|
|
61
|
+
--card-color: var(--card-background, var(--kit-label-primary));
|
|
62
62
|
background-color: transparent;
|
|
63
63
|
}
|
|
64
64
|
.kit-card[breakpoint]kit-card--variant-outline::before {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
.kit-card[breakpoint]kit-card--variant-text {
|
|
74
|
-
--card-color: var(--
|
|
74
|
+
--card-color: var(--card-background, var(--kit-label-primary));
|
|
75
75
|
background-color: transparent;
|
|
76
76
|
border: none;
|
|
77
77
|
}
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
/* events */
|
|
80
80
|
.kit-card[class*='card--variant-filled'].kit-card--clickable:active,
|
|
81
81
|
.kit-card.kit-card--active[class*='card--variant-filled'].kit-card--clickable {
|
|
82
|
-
background-color: color-mix(in oklab, var(--card-background) 90%, var(--kit-
|
|
82
|
+
background-color: color-mix(in oklab, var(--card-background) 90%, var(--kit-state-shadow));
|
|
83
83
|
}
|
|
84
84
|
.kit-card.kit-card--active[class*='card--variant-']:not(
|
|
85
85
|
[class*='variant-filled']
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
color,
|
|
21
21
|
background,
|
|
22
22
|
noRipple,
|
|
23
|
+
width,
|
|
24
|
+
height,
|
|
23
25
|
...rest
|
|
24
26
|
}: CardProps = $props();
|
|
25
27
|
|
|
@@ -58,6 +60,8 @@
|
|
|
58
60
|
style:--card-background={assets.color(background)}
|
|
59
61
|
style:--card-color={assets.color(color)}
|
|
60
62
|
style:--card-shape={assets.shape(rounded)}
|
|
63
|
+
style:width
|
|
64
|
+
style:height
|
|
61
65
|
>
|
|
62
66
|
{@render children?.()}
|
|
63
67
|
</svelte:element>
|