lapikit 0.4.5 → 0.4.6

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.
@@ -1,2 +1,9 @@
1
- const lapikitComponents = ['sheet', 'app', 'btn', 'icon', 'avatar'];
1
+ const lapikitComponents = [
2
+ 'sheet',
3
+ 'app',
4
+ 'btn',
5
+ 'icon',
6
+ 'avatar',
7
+ 'spacer'
8
+ ];
2
9
  export default lapikitComponents;
@@ -3,3 +3,4 @@ export { default as KitApp } from './app/app.svelte';
3
3
  export { default as KitBtn } from './btn/btn.svelte';
4
4
  export { default as KitIcon } from './icon/icon.svelte';
5
5
  export { default as KitAvatar } from './avatar/avatar.svelte';
6
+ export { default as KitSpacer } from './spacer/spacer.svelte';
@@ -4,3 +4,4 @@ export { default as KitApp } from './app/app.svelte';
4
4
  export { default as KitBtn } from './btn/btn.svelte';
5
5
  export { default as KitIcon } from './icon/icon.svelte';
6
6
  export { default as KitAvatar } from './avatar/avatar.svelte';
7
+ export { default as KitSpacer } from './spacer/spacer.svelte';
@@ -0,0 +1,44 @@
1
+ <script lang="ts">
2
+ import { makeComponentProps } from '../../compiler/mapped-code.js';
3
+ import { useClassName, useStyles } from '../../utils/index.js';
4
+ import type { SpacerProps } from './spacer.types.js';
5
+
6
+ let {
7
+ is = 'div',
8
+ class: className = '',
9
+ style: styleAttr = '',
10
+ 's-class': sClass,
11
+ 's-style': sStyle,
12
+ ...rest
13
+ }: SpacerProps = $props();
14
+
15
+ let { classProps, styleProps, restProps } = $derived(
16
+ makeComponentProps(rest as Record<string, unknown>)
17
+ );
18
+
19
+ let componentClass = $derived(
20
+ useClassName({
21
+ baseClass: 'kit-spacer',
22
+ className: `${className ?? ''}`.trim(),
23
+ sClass,
24
+ classProps
25
+ })
26
+ );
27
+
28
+ let componentStyle = $derived(
29
+ useStyles({
30
+ styleAttr,
31
+ sStyle,
32
+ styleProps
33
+ })
34
+ );
35
+ </script>
36
+
37
+ <svelte:element this={is} class={componentClass} style={componentStyle} {...restProps}>
38
+ </svelte:element>
39
+
40
+ <style>
41
+ .kit-spacer {
42
+ flex-grow: 1;
43
+ }
44
+ </style>
@@ -0,0 +1,4 @@
1
+ import type { SpacerProps } from './spacer.types.ts';
2
+ declare const Spacer: import("svelte").Component<SpacerProps, {}, "">;
3
+ type Spacer = ReturnType<typeof Spacer>;
4
+ export default Spacer;
@@ -0,0 +1,4 @@
1
+ import type { Base } from '../../utils/types/index.js';
2
+ export interface SpacerProps extends Base {
3
+ is?: 'div';
4
+ }
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lapikit",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"