lapikit 0.2.6 → 0.2.8

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 CHANGED
@@ -1 +1,107 @@
1
- # Lapikit
1
+ [![][logo]](https://lapikit.dev)
2
+
3
+ # Lapikit - Svelte components library
4
+
5
+ [![][discover-lapikit-npm]](https://www.npmjs.com/package/lapikit)
6
+ [![][subscribe-to-instagram]](https://www.instagram.com/lapikit/)
7
+ [![][join-discord-lapikit]](https://discord.gg/gn9ZGtDtK4)
8
+
9
+ [![][version]](https://github.com/nycolaide/lapikit/releases?q=lapikit&expanded=true)
10
+ [![][installs]](https://www.npmjs.com/package/lapikit)
11
+ [![][installs-this-month]](https://www.npmjs.com/package/lapikit)
12
+ [![][license]](https://github.com/nycolaide/lapikit/blob/main/LICENSE)
13
+ [![][discord]](https://discord.gg/gn9ZGtDtK4)
14
+
15
+ 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.
16
+
17
+ ## 🖥️ Documentation
18
+
19
+ To check out the documentation, visit [lapikit.dev](https://lapikit.dev)
20
+
21
+ ## ✨Quick Start
22
+
23
+ Getting started with Lapikit is easy. After create you SvelteKit project, you can install Lapikit using your preferred package manager:
24
+
25
+ Usage [bun](https://bun.sh/):
26
+
27
+ ```bash
28
+ bun add -d lapikit
29
+ npx lapikit
30
+ ```
31
+
32
+ Using [npm](https://www.npmjs.com/):
33
+
34
+ ```bash
35
+ npm i -D lapikit
36
+ npx lapikit
37
+ ```
38
+
39
+ Using [yarn](https://yarnpkg.com/):
40
+
41
+ ```bash
42
+ yarn add -D lapikit
43
+ npx lapikit
44
+ ```
45
+
46
+ Using [pnpm](https://pnpm.io/):
47
+
48
+ ```bash
49
+ pnpm add -D lapikit
50
+ npx lapikit
51
+ ```
52
+
53
+ ## 🚩Table of Contents
54
+
55
+ - [Lapikit - Svelte components library](#lapikit---svelte-components-library)
56
+ - [🖥️ Documentation](#️-documentation)
57
+ - [✨Quick Start](#quick-start)
58
+ - [🚩Table of Contents](#table-of-contents)
59
+ - [🤯Motivation](#motivation)
60
+ - [💖Community](#community)
61
+ - [💁‍♂️Contributing](#️contributing)
62
+ - [🖖Core Team Lapikit](#core-team-lapikit)
63
+ - [📄License](#license)
64
+ - [🪧We support these projects](#we-support-these-projects)
65
+
66
+ ## 🤯Motivation
67
+
68
+ 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.
69
+
70
+ ## 💖Community
71
+
72
+ 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!
73
+
74
+ ## 💁‍♂️Contributing
75
+
76
+ 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.
77
+
78
+ ## 🖖Core Team Lapikit
79
+
80
+ [@Nycolaide](https://github.com/Nycolaide)
81
+ [@Simone](https://github.com/fersimone)
82
+
83
+ ## 📄License
84
+
85
+ Licensed under the [MIT license](https://github.com/nycolaide/lapikit/blob/main/LICENSE).
86
+
87
+ Copyright © 2025 Nycolaide
88
+
89
+ ## 🪧We support these projects
90
+
91
+ 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:
92
+
93
+ | | |
94
+ | ------------------------------- | --------------------------------------- |
95
+ | [![][w3c]](https://www.w3.org/) | [![][humantxt]](https://humanstxt.org/) |
96
+
97
+ [logo]: https://github.com/Nycolaide/lapikit/tree/main/.github/lapikit.svg
98
+ [discover-lapikit-npm]: https://img.shields.io/badge/Lapikit-black.svg?style=for-the-badge&logo=NPM
99
+ [join-discord-lapikit]: https://img.shields.io/badge/Join%20the%20community-black.svg?style=for-the-badge&logo=Discord
100
+ [subscribe-to-instagram]: https://img.shields.io/badge/Follow%20@Lapikit-black.svg?style=for-the-badge&logo=Instagram
101
+ [version]: https://img.shields.io/npm/v/lapikit.svg?label=Version&color=f58142
102
+ [license]: https://badgen.net/github/license/nycolaide/lapikit?label=License&color=cc5640
103
+ [installs]: https://badgen.net/npm/dt/lapikit?label=NPM%20installs&color=40ba12
104
+ [installs-this-month]: https://badgen.net/npm/dm/lapikit?label=NPM%20installs&color=40ba12
105
+ [discord]: https://img.shields.io/discord/1383879204671721492?color=5865F2&label=Discord&logo=discord&logoColor=white
106
+ [w3c]: https://github.com/Nycolaide/lapikit/tree/main/.github/W3C.svg
107
+ [humantxt]: https://github.com/Nycolaide/lapikit/tree/main/.github/humans.png
package/bin/prompts.js CHANGED
@@ -18,7 +18,7 @@ export async function initPrompts() {
18
18
  }
19
19
 
20
20
  // Preview install
21
- let settings = await prompts([
21
+ const settings = await prompts([
22
22
  {
23
23
  type: 'text',
24
24
  name: 'pathConfig',
@@ -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, var(--kit-state-shadow) 70%, transparent);
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
- import { BROWSER } from 'esm-env';
3
- import type { Snippet } from 'svelte';
2
+ const BROWSER = typeof window !== 'undefined';
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
- }: { children: Snippet; themes?: string | string[]; storageKey?: string } = $props();
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
- {@render children?.()}
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
- <!-- svelte-ignore a11y_click_events_have_key_events -->
57
- <div
58
- class={['kit-overlay', $modalOpen === 'persistent' && 'kit-overlay--persistent']}
59
- onclick={() => $modalOpen !== 'persistent' && setOpenModal(false)}
60
- ></div>
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 { Snippet } from 'svelte';
2
- type $$ComponentProps = {
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
- export interface AppProps {
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
  }
@@ -5,7 +5,7 @@
5
5
  max-height: 0px;
6
6
  opacity: var(--separator-opacity, 0.12);
7
7
  transition: inherit;
8
- border-color: var(--separator-color, var(--kit-state-shadow));
8
+ border-color: var(--separator-color, var(--kit-label-primary));
9
9
  border-style: solid;
10
10
  }
11
11
 
@@ -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}-radius)`);
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);
@@ -1,6 +1,5 @@
1
- import { BROWSER } from 'esm-env';
2
1
  export function disabledScroll(state) {
3
- if (BROWSER) {
2
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
4
3
  document.body.style.overflow = state ? 'hidden' : '';
5
4
  }
6
5
  }
@@ -0,0 +1,4 @@
1
+ declare module 'lapikit/styles' {
2
+ const styles: string;
3
+ export default styles;
4
+ }
@@ -0,0 +1,4 @@
1
+ declare module 'lapikit/themes' {
2
+ const themes: string;
3
+ export default themes;
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lapikit",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
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": "./dist/styles.css",
66
- "./themes": "./dist/themes.css"
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"