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.
- package/dist/labs/compiler/components.js +8 -1
- package/dist/labs/components/index.d.ts +1 -0
- package/dist/labs/components/index.js +1 -0
- package/dist/labs/components/spacer/spacer.svelte +44 -0
- package/dist/labs/components/spacer/spacer.svelte.d.ts +4 -0
- package/dist/labs/components/spacer/spacer.types.d.ts +4 -0
- package/dist/labs/components/spacer/spacer.types.js +1 -0
- package/package.json +1 -1
|
@@ -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 @@
|
|
|
1
|
+
export {};
|