lapikit 0.2.7 → 0.3.0
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/prompts.js +1 -1
- package/dist/components/app/app.css +12 -1
- package/dist/components/app/app.svelte +30 -12
- package/dist/components/app/app.svelte.d.ts +2 -7
- package/dist/components/app/types.d.ts +7 -1
- package/dist/internal/core/animations/ripple.js +1 -1
- package/dist/styles.css.d.ts +4 -0
- package/dist/themes.css.d.ts +4 -0
- package/package.json +33 -4
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/prompts.js
CHANGED
|
@@ -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,16 +1,20 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
const BROWSER = typeof window !== 'undefined';
|
|
3
|
-
import type { Snippet } from 'svelte';
|
|
4
3
|
import { useTheme } from '../../actions/use-theme.js';
|
|
5
4
|
import { modalOpen, setOpenModal } from '../../stores/components.js';
|
|
6
5
|
|
|
7
6
|
import { viewport } from '../../stores/viewport.js';
|
|
7
|
+
import type { AppProps } from './types.js';
|
|
8
8
|
|
|
9
9
|
let {
|
|
10
|
+
ref = $bindable(),
|
|
10
11
|
children,
|
|
11
12
|
themes,
|
|
12
|
-
storageKey = '@lapikit/theme'
|
|
13
|
-
|
|
13
|
+
storageKey = '@lapikit/theme',
|
|
14
|
+
light,
|
|
15
|
+
dark,
|
|
16
|
+
...rest
|
|
17
|
+
}: AppProps = $props();
|
|
14
18
|
|
|
15
19
|
$effect.pre(() => {
|
|
16
20
|
if (!BROWSER) return;
|
|
@@ -49,13 +53,27 @@
|
|
|
49
53
|
});
|
|
50
54
|
</script>
|
|
51
55
|
|
|
52
|
-
|
|
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?.()}
|
|
53
70
|
|
|
54
|
-
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
55
|
-
{#if $modalOpen}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
{/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
|
}
|
|
@@ -27,7 +27,7 @@ export function ripple(el, options = {}) {
|
|
|
27
27
|
options.duration = undefined;
|
|
28
28
|
}
|
|
29
29
|
if (options.component) {
|
|
30
|
-
rippleContainer.style.setProperty('--system-ripple-radius', `var(--${options.component}-
|
|
30
|
+
rippleContainer.style.setProperty('--system-ripple-radius', `var(--${options.component}-shape)`);
|
|
31
31
|
}
|
|
32
32
|
if (options.color) {
|
|
33
33
|
rippleContainer.style.setProperty('--system-ripple-color', options.color);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lapikit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -11,6 +11,12 @@
|
|
|
11
11
|
"url": "git+https://github.com/Nycolaide/lapikit.git",
|
|
12
12
|
"directory": "packages/lapikit"
|
|
13
13
|
},
|
|
14
|
+
"author": {
|
|
15
|
+
"name": "Nycolaide",
|
|
16
|
+
"email": "contact@lapikit.dev"
|
|
17
|
+
},
|
|
18
|
+
"funding": "https://buymeacoffee.com/nycolaide",
|
|
19
|
+
"bugs": "https://github.com/Nycolaide/lapikit/issues",
|
|
14
20
|
"scripts": {
|
|
15
21
|
"dev": "vite dev",
|
|
16
22
|
"build": "vite build && npm run prepack",
|
|
@@ -62,8 +68,14 @@
|
|
|
62
68
|
"./core/colors": {
|
|
63
69
|
"default": "./dist/internal/core/standard-colors.js"
|
|
64
70
|
},
|
|
65
|
-
"./styles":
|
|
66
|
-
|
|
71
|
+
"./styles": {
|
|
72
|
+
"types": "./dist/styles.css.d.ts",
|
|
73
|
+
"default": "./dist/styles.css"
|
|
74
|
+
},
|
|
75
|
+
"./themes": {
|
|
76
|
+
"types": "./dist/themes.css.d.ts",
|
|
77
|
+
"default": "./dist/themes.css"
|
|
78
|
+
}
|
|
67
79
|
},
|
|
68
80
|
"peerDependencies": {
|
|
69
81
|
"svelte": "^5.0.0"
|
|
@@ -93,7 +105,24 @@
|
|
|
93
105
|
"vitest": "^3.0.0"
|
|
94
106
|
},
|
|
95
107
|
"keywords": [
|
|
96
|
-
"svelte"
|
|
108
|
+
"svelte",
|
|
109
|
+
"sveltekit",
|
|
110
|
+
"components",
|
|
111
|
+
"ui",
|
|
112
|
+
"library",
|
|
113
|
+
"ui-library",
|
|
114
|
+
"design system",
|
|
115
|
+
"lapikit",
|
|
116
|
+
"material components",
|
|
117
|
+
"component library",
|
|
118
|
+
"frontend",
|
|
119
|
+
"svelte library",
|
|
120
|
+
"tailwindcss",
|
|
121
|
+
"unocss",
|
|
122
|
+
"component",
|
|
123
|
+
"theme",
|
|
124
|
+
"css",
|
|
125
|
+
"typescript"
|
|
97
126
|
],
|
|
98
127
|
"dependencies": {
|
|
99
128
|
"prompts": "^2.4.2"
|