lapikit 0.5.9 → 0.6.1
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/@types/actions.d.ts +6 -0
- package/dist/@types/index.d.ts +1 -0
- package/dist/@types/index.js +1 -0
- package/dist/@types/props.d.ts +1 -0
- package/dist/actions.d.ts +2 -0
- package/dist/actions.js +2 -0
- package/dist/animations/ripple.d.ts +1 -1
- package/dist/animations/ripple.js +36 -23
- package/dist/components/app/app.svelte +122 -8
- package/dist/components/card/card.svelte +49 -96
- package/dist/components/card/card.types.d.ts +22 -2
- package/dist/components/card/modules/card-actions.svelte +53 -0
- package/dist/components/card/modules/card-actions.svelte.d.ts +4 -0
- package/dist/components/card/modules/card-container.svelte +51 -0
- package/dist/components/card/modules/card-container.svelte.d.ts +4 -0
- package/dist/components/card/modules/card-content.svelte +56 -0
- package/dist/components/card/modules/card-content.svelte.d.ts +4 -0
- package/dist/components/card/modules/card-media.svelte +52 -0
- package/dist/components/card/modules/card-media.svelte.d.ts +4 -0
- package/dist/components/card/modules/card-title.svelte +56 -0
- package/dist/components/card/modules/card-title.svelte.d.ts +4 -0
- package/dist/components/dialog/dialog.svelte +1 -2
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.js +5 -0
- package/dist/{@legacy/stores/components.d.ts → components/modal/modal.d.ts} +1 -2
- package/dist/{@legacy/stores/components.js → components/modal/modal.js} +1 -1
- package/dist/components/modal/modal.svelte +1 -1
- package/dist/components/textfield/textfield.svelte.d.ts +1 -1
- package/dist/constants.d.ts +2 -2
- package/dist/constants.js +8 -3
- package/dist/utils/components.d.ts +1 -0
- package/dist/utils/components.js +16 -0
- package/dist/utils/outside.d.ts +1 -0
- package/dist/utils/outside.js +5 -0
- package/dist/{@legacy/stores → utils}/themes.d.ts +1 -0
- package/dist/{@legacy/actions/use-theme.js → utils/themes.js} +4 -1
- package/package.json +11 -32
- package/dist/@legacy/actions/accordion.svelte.d.ts +0 -9
- package/dist/@legacy/actions/index.d.ts +0 -2
- package/dist/@legacy/actions/index.js +0 -2
- package/dist/@legacy/actions/use-theme.d.ts +0 -1
- package/dist/@legacy/assets/icons/arrow-down.svelte +0 -12
- package/dist/@legacy/assets/icons/arrow-down.svelte.d.ts +0 -18
- package/dist/@legacy/assets/icons/arrow-up.svelte +0 -12
- package/dist/@legacy/assets/icons/arrow-up.svelte.d.ts +0 -18
- package/dist/@legacy/assets/icons/close-fill.svelte +0 -12
- package/dist/@legacy/assets/icons/close-fill.svelte.d.ts +0 -18
- package/dist/@legacy/assets/icons/loading-fill.svelte +0 -31
- package/dist/@legacy/assets/icons/loading-fill.svelte.d.ts +0 -18
- package/dist/@legacy/components/accordion/accordion.css +0 -36
- package/dist/@legacy/components/accordion/accordion.svelte +0 -39
- package/dist/@legacy/components/accordion/accordion.svelte.d.ts +0 -4
- package/dist/@legacy/components/accordion/modules/accordion-item.css +0 -68
- package/dist/@legacy/components/accordion/modules/accordion-item.svelte +0 -94
- package/dist/@legacy/components/accordion/modules/accordion-item.svelte.d.ts +0 -4
- package/dist/@legacy/components/accordion/types.d.ts +0 -33
- package/dist/@legacy/components/alert/alert.css +0 -130
- package/dist/@legacy/components/alert/alert.svelte +0 -89
- package/dist/@legacy/components/alert/alert.svelte.d.ts +0 -4
- package/dist/@legacy/components/alert/types.d.ts +0 -28
- package/dist/@legacy/components/alert/types.js +0 -1
- package/dist/@legacy/components/app/app.css +0 -26
- package/dist/@legacy/components/app/app.svelte +0 -79
- package/dist/@legacy/components/app/app.svelte.d.ts +0 -4
- package/dist/@legacy/components/app/types.d.ts +0 -10
- package/dist/@legacy/components/app/types.js +0 -1
- package/dist/@legacy/components/appbar/appbar.css +0 -38
- package/dist/@legacy/components/appbar/appbar.svelte +0 -40
- package/dist/@legacy/components/appbar/appbar.svelte.d.ts +0 -4
- package/dist/@legacy/components/appbar/types.d.ts +0 -15
- package/dist/@legacy/components/appbar/types.js +0 -1
- package/dist/@legacy/components/aspect-ratio/aspect-ratio.css +0 -19
- package/dist/@legacy/components/aspect-ratio/aspect-ratio.svelte +0 -25
- package/dist/@legacy/components/aspect-ratio/aspect-ratio.svelte.d.ts +0 -4
- package/dist/@legacy/components/aspect-ratio/types.d.ts +0 -5
- package/dist/@legacy/components/aspect-ratio/types.js +0 -1
- package/dist/@legacy/components/avatar/avatar.css +0 -102
- package/dist/@legacy/components/avatar/avatar.svelte +0 -46
- package/dist/@legacy/components/avatar/avatar.svelte.d.ts +0 -4
- package/dist/@legacy/components/avatar/types.d.ts +0 -22
- package/dist/@legacy/components/avatar/types.js +0 -1
- package/dist/@legacy/components/button/button.css +0 -240
- package/dist/@legacy/components/button/button.svelte +0 -102
- package/dist/@legacy/components/button/button.svelte.d.ts +0 -4
- package/dist/@legacy/components/button/types.d.ts +0 -29
- package/dist/@legacy/components/button/types.js +0 -1
- package/dist/@legacy/components/card/card.css +0 -105
- package/dist/@legacy/components/card/card.svelte +0 -67
- package/dist/@legacy/components/card/card.svelte.d.ts +0 -4
- package/dist/@legacy/components/card/types.d.ts +0 -20
- package/dist/@legacy/components/card/types.js +0 -1
- package/dist/@legacy/components/chip/chip.css +0 -224
- package/dist/@legacy/components/chip/chip.svelte +0 -131
- package/dist/@legacy/components/chip/chip.svelte.d.ts +0 -4
- package/dist/@legacy/components/chip/types.d.ts +0 -32
- package/dist/@legacy/components/chip/types.js +0 -1
- package/dist/@legacy/components/dialog/dialog.css +0 -129
- package/dist/@legacy/components/dialog/dialog.svelte +0 -67
- package/dist/@legacy/components/dialog/dialog.svelte.d.ts +0 -4
- package/dist/@legacy/components/dialog/types.d.ts +0 -24
- package/dist/@legacy/components/dialog/types.js +0 -1
- package/dist/@legacy/components/dropdown/dropdown.css +0 -13
- package/dist/@legacy/components/dropdown/dropdown.svelte +0 -115
- package/dist/@legacy/components/dropdown/dropdown.svelte.d.ts +0 -4
- package/dist/@legacy/components/dropdown/types.d.ts +0 -26
- package/dist/@legacy/components/dropdown/types.js +0 -1
- package/dist/@legacy/components/icon/icon.css +0 -78
- package/dist/@legacy/components/icon/icon.svelte +0 -49
- package/dist/@legacy/components/icon/icon.svelte.d.ts +0 -4
- package/dist/@legacy/components/icon/types.d.ts +0 -16
- package/dist/@legacy/components/icon/types.js +0 -1
- package/dist/@legacy/components/index.d.ts +0 -22
- package/dist/@legacy/components/index.js +0 -23
- package/dist/@legacy/components/list/list.css +0 -149
- package/dist/@legacy/components/list/list.svelte +0 -44
- package/dist/@legacy/components/list/list.svelte.d.ts +0 -4
- package/dist/@legacy/components/list/modules/list-item.css +0 -67
- package/dist/@legacy/components/list/modules/list-item.svelte +0 -76
- package/dist/@legacy/components/list/modules/list-item.svelte.d.ts +0 -4
- package/dist/@legacy/components/list/types.d.ts +0 -33
- package/dist/@legacy/components/list/types.js +0 -1
- package/dist/@legacy/components/modal/modal.css +0 -137
- package/dist/@legacy/components/modal/modal.svelte +0 -118
- package/dist/@legacy/components/modal/modal.svelte.d.ts +0 -4
- package/dist/@legacy/components/modal/types.d.ts +0 -26
- package/dist/@legacy/components/modal/types.js +0 -1
- package/dist/@legacy/components/popover/popover.css +0 -13
- package/dist/@legacy/components/popover/popover.svelte +0 -73
- package/dist/@legacy/components/popover/popover.svelte.d.ts +0 -4
- package/dist/@legacy/components/popover/types.d.ts +0 -20
- package/dist/@legacy/components/popover/types.js +0 -1
- package/dist/@legacy/components/separator/separator.css +0 -42
- package/dist/@legacy/components/separator/separator.svelte +0 -37
- package/dist/@legacy/components/separator/separator.svelte.d.ts +0 -4
- package/dist/@legacy/components/separator/types.d.ts +0 -15
- package/dist/@legacy/components/separator/types.js +0 -1
- package/dist/@legacy/components/spacer/spacer.css +0 -3
- package/dist/@legacy/components/spacer/spacer.svelte +0 -7
- package/dist/@legacy/components/spacer/spacer.svelte.d.ts +0 -4
- package/dist/@legacy/components/spacer/types.d.ts +0 -4
- package/dist/@legacy/components/spacer/types.js +0 -1
- package/dist/@legacy/components/textfield/textfield.css +0 -298
- package/dist/@legacy/components/textfield/textfield.svelte +0 -193
- package/dist/@legacy/components/textfield/textfield.svelte.d.ts +0 -4
- package/dist/@legacy/components/textfield/types.d.ts +0 -37
- package/dist/@legacy/components/textfield/types.js +0 -1
- package/dist/@legacy/components/toolbar/toolbar.css +0 -106
- package/dist/@legacy/components/toolbar/toolbar.svelte +0 -47
- package/dist/@legacy/components/toolbar/toolbar.svelte.d.ts +0 -4
- package/dist/@legacy/components/toolbar/types.d.ts +0 -27
- package/dist/@legacy/components/toolbar/types.js +0 -1
- package/dist/@legacy/components/tooltip/tooltip.css +0 -116
- package/dist/@legacy/components/tooltip/tooltip.svelte +0 -113
- package/dist/@legacy/components/tooltip/tooltip.svelte.d.ts +0 -4
- package/dist/@legacy/components/tooltip/types.d.ts +0 -23
- package/dist/@legacy/components/tooltip/types.js +0 -1
- package/dist/@legacy/index.d.ts +0 -3
- package/dist/@legacy/index.js +0 -24
- package/dist/@legacy/internal/config/presets.d.ts +0 -149
- package/dist/@legacy/internal/config/presets.js +0 -169
- package/dist/@legacy/internal/config/variables.d.ts +0 -3
- package/dist/@legacy/internal/config/variables.js +0 -3
- package/dist/@legacy/internal/core/actions/assets.svelte.d.ts +0 -8
- package/dist/@legacy/internal/core/actions/assets.svelte.js +0 -54
- package/dist/@legacy/internal/core/actions/dropdown.svelte.d.ts +0 -7
- package/dist/@legacy/internal/core/actions/dropdown.svelte.js +0 -148
- package/dist/@legacy/internal/core/actions/popover.svelte.d.ts +0 -7
- package/dist/@legacy/internal/core/actions/popover.svelte.js +0 -134
- package/dist/@legacy/internal/core/actions/tooltip.svelte.d.ts +0 -7
- package/dist/@legacy/internal/core/actions/tooltip.svelte.js +0 -131
- package/dist/@legacy/internal/core/animations/ripple.d.ts +0 -12
- package/dist/@legacy/internal/core/animations/ripple.js +0 -96
- package/dist/@legacy/internal/core/bin/ansi.d.ts +0 -40
- package/dist/@legacy/internal/core/bin/ansi.js +0 -44
- package/dist/@legacy/internal/core/bin/terminal.d.ts +0 -1
- package/dist/@legacy/internal/core/bin/terminal.js +0 -12
- package/dist/@legacy/internal/core/css.d.ts +0 -1
- package/dist/@legacy/internal/core/css.js +0 -16
- package/dist/@legacy/internal/core/formatter/component.d.ts +0 -5
- package/dist/@legacy/internal/core/formatter/component.js +0 -60
- package/dist/@legacy/internal/core/formatter/device.d.ts +0 -5
- package/dist/@legacy/internal/core/formatter/device.js +0 -66
- package/dist/@legacy/internal/core/formatter/index.d.ts +0 -7
- package/dist/@legacy/internal/core/formatter/index.js +0 -35
- package/dist/@legacy/internal/core/formatter/style.d.ts +0 -4
- package/dist/@legacy/internal/core/formatter/style.js +0 -15
- package/dist/@legacy/internal/core/formatter/theme.d.ts +0 -5
- package/dist/@legacy/internal/core/formatter/theme.js +0 -44
- package/dist/@legacy/internal/core/formatter/typography.d.ts +0 -5
- package/dist/@legacy/internal/core/formatter/typography.js +0 -12
- package/dist/@legacy/internal/core/minify.d.ts +0 -1
- package/dist/@legacy/internal/core/minify.js +0 -10
- package/dist/@legacy/internal/core/standard-colors.d.ts +0 -75
- package/dist/@legacy/internal/core/standard-colors.js +0 -75
- package/dist/@legacy/internal/core/x11-colors.d.ts +0 -4
- package/dist/@legacy/internal/core/x11-colors.js +0 -151
- package/dist/@legacy/internal/helpers/colors.d.ts +0 -1
- package/dist/@legacy/internal/helpers/colors.js +0 -50
- package/dist/@legacy/internal/helpers/convert.d.ts +0 -1
- package/dist/@legacy/internal/helpers/convert.js +0 -17
- package/dist/@legacy/internal/helpers/deep-merge.d.ts +0 -44
- package/dist/@legacy/internal/helpers/deep-merge.js +0 -80
- package/dist/@legacy/internal/helpers/outside.d.ts +0 -9
- package/dist/@legacy/internal/helpers/outside.js +0 -34
- package/dist/@legacy/internal/helpers/parser.d.ts +0 -10
- package/dist/@legacy/internal/helpers/parser.js +0 -93
- package/dist/@legacy/internal/helpers/scroll.d.ts +0 -1
- package/dist/@legacy/internal/helpers/scroll.js +0 -5
- package/dist/@legacy/internal/plugins/vite.d.ts +0 -8
- package/dist/@legacy/internal/plugins/vite.js +0 -33
- package/dist/@legacy/internal/types/components.d.ts +0 -14
- package/dist/@legacy/internal/types/components.js +0 -1
- package/dist/@legacy/internal/types/configuration.d.ts +0 -63
- package/dist/@legacy/internal/types/configuration.js +0 -1
- package/dist/@legacy/internal/types/index.d.ts +0 -2
- package/dist/@legacy/internal/types/index.js +0 -2
- package/dist/@legacy/stores/breakpoints.d.ts +0 -6
- package/dist/@legacy/stores/breakpoints.js +0 -14
- package/dist/@legacy/stores/devices.d.ts +0 -6
- package/dist/@legacy/stores/devices.js +0 -9
- package/dist/@legacy/stores/index.d.ts +0 -5
- package/dist/@legacy/stores/index.js +0 -5
- package/dist/@legacy/stores/themes.js +0 -4
- package/dist/@legacy/stores/viewport.d.ts +0 -7
- package/dist/@legacy/stores/viewport.js +0 -7
- package/dist/@legacy/styles/animation.css +0 -33
- package/dist/@legacy/styles/keyframes.css +0 -30
- package/dist/@legacy/styles/reset.css +0 -133
- package/dist/@legacy/styles.css +0 -0
- package/dist/@legacy/styles.css.d.ts +0 -4
- package/dist/@legacy/themes.css +0 -0
- package/dist/@legacy/themes.css.d.ts +0 -4
- /package/dist/{@legacy/components/accordion/types.js → @types/actions.js} +0 -0
- /package/dist/{@legacy/actions → components/accordion}/accordion.svelte.js +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { CardContainerProps } from '../card.types';
|
|
3
|
+
import { makeComponentProps } from '../../../html-mapped';
|
|
4
|
+
import { useClassName, useStyles } from '../../../utils';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
is = 'div',
|
|
9
|
+
children,
|
|
10
|
+
class: className = '',
|
|
11
|
+
style: styleAttr = '',
|
|
12
|
+
's-class': sClass,
|
|
13
|
+
's-style': sStyle,
|
|
14
|
+
...rest
|
|
15
|
+
}: CardContainerProps = $props();
|
|
16
|
+
|
|
17
|
+
let { classProps, styleProps, restProps } = $derived(makeComponentProps(rest));
|
|
18
|
+
|
|
19
|
+
let componentClass = $derived(
|
|
20
|
+
useClassName({
|
|
21
|
+
baseClass: 'kit-card-container',
|
|
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
|
|
38
|
+
this={is}
|
|
39
|
+
bind:this={ref}
|
|
40
|
+
class={componentClass}
|
|
41
|
+
style={componentStyle}
|
|
42
|
+
{...restProps}
|
|
43
|
+
>
|
|
44
|
+
{@render children?.()}
|
|
45
|
+
</svelte:element>
|
|
46
|
+
|
|
47
|
+
<style>
|
|
48
|
+
.kit-card-container {
|
|
49
|
+
gap: var(--kit-card-gap);
|
|
50
|
+
}
|
|
51
|
+
</style>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { CardContentProps } from '../card.types';
|
|
3
|
+
import { makeComponentProps } from '../../../html-mapped';
|
|
4
|
+
import { useClassName, useStyles } from '../../../utils';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
is = 'div',
|
|
9
|
+
children,
|
|
10
|
+
class: className = '',
|
|
11
|
+
style: styleAttr = '',
|
|
12
|
+
's-class': sClass,
|
|
13
|
+
's-style': sStyle,
|
|
14
|
+
...rest
|
|
15
|
+
}: CardContentProps = $props();
|
|
16
|
+
|
|
17
|
+
let { classProps, styleProps, restProps } = $derived(makeComponentProps(rest));
|
|
18
|
+
|
|
19
|
+
let componentClass = $derived(
|
|
20
|
+
useClassName({
|
|
21
|
+
baseClass: 'kit-card-content',
|
|
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
|
|
38
|
+
this={is}
|
|
39
|
+
bind:this={ref}
|
|
40
|
+
class={componentClass}
|
|
41
|
+
style={componentStyle}
|
|
42
|
+
{...restProps}
|
|
43
|
+
>
|
|
44
|
+
{@render children?.()}
|
|
45
|
+
</svelte:element>
|
|
46
|
+
|
|
47
|
+
<style>
|
|
48
|
+
.kit-card-content {
|
|
49
|
+
display: block;
|
|
50
|
+
line-height: 1.45;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.kit-card-content > :global(*) {
|
|
54
|
+
margin: 0;
|
|
55
|
+
}
|
|
56
|
+
</style>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { CardMediaProps } from '../card.types';
|
|
3
|
+
import { makeComponentProps } from '../../../html-mapped';
|
|
4
|
+
import { useClassName, useStyles } from '../../../utils';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
is = 'div',
|
|
9
|
+
children,
|
|
10
|
+
class: className = '',
|
|
11
|
+
style: styleAttr = '',
|
|
12
|
+
's-class': sClass,
|
|
13
|
+
's-style': sStyle,
|
|
14
|
+
...rest
|
|
15
|
+
}: CardMediaProps = $props();
|
|
16
|
+
|
|
17
|
+
let { classProps, styleProps, restProps } = $derived(makeComponentProps(rest));
|
|
18
|
+
|
|
19
|
+
let componentClass = $derived(
|
|
20
|
+
useClassName({
|
|
21
|
+
baseClass: 'kit-card-media',
|
|
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
|
|
38
|
+
this={is}
|
|
39
|
+
bind:this={ref}
|
|
40
|
+
class={componentClass}
|
|
41
|
+
style={componentStyle}
|
|
42
|
+
{...restProps}
|
|
43
|
+
>
|
|
44
|
+
{@render children?.()}
|
|
45
|
+
</svelte:element>
|
|
46
|
+
|
|
47
|
+
<style>
|
|
48
|
+
.kit-card-media {
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
border-radius: calc(var(--kit-card-radius) - 2px);
|
|
51
|
+
}
|
|
52
|
+
</style>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { CardTitleProps } from '../card.types';
|
|
3
|
+
import { makeComponentProps } from '../../../html-mapped';
|
|
4
|
+
import { useClassName, useStyles } from '../../../utils';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
is = 'div',
|
|
9
|
+
children,
|
|
10
|
+
class: className = '',
|
|
11
|
+
style: styleAttr = '',
|
|
12
|
+
's-class': sClass,
|
|
13
|
+
's-style': sStyle,
|
|
14
|
+
...rest
|
|
15
|
+
}: CardTitleProps = $props();
|
|
16
|
+
|
|
17
|
+
let { classProps, styleProps, restProps } = $derived(makeComponentProps(rest));
|
|
18
|
+
|
|
19
|
+
let componentClass = $derived(
|
|
20
|
+
useClassName({
|
|
21
|
+
baseClass: 'kit-card-title',
|
|
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
|
|
38
|
+
this={is}
|
|
39
|
+
bind:this={ref}
|
|
40
|
+
class={componentClass}
|
|
41
|
+
style={componentStyle}
|
|
42
|
+
{...restProps}
|
|
43
|
+
>
|
|
44
|
+
{@render children?.()}
|
|
45
|
+
</svelte:element>
|
|
46
|
+
|
|
47
|
+
<style>
|
|
48
|
+
.kit-card-title {
|
|
49
|
+
font-weight: 600;
|
|
50
|
+
line-height: 1.3;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.kit-card-title > :global(*) {
|
|
54
|
+
margin: 0;
|
|
55
|
+
}
|
|
56
|
+
</style>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { disabledScroll } from '../../@legacy/internal/helpers/scroll';
|
|
3
2
|
import { makeComponentProps } from '../../html-mapped';
|
|
4
|
-
import { useClassName, useStyles } from '../../utils';
|
|
3
|
+
import { useClassName, useStyles, disabledScroll } from '../../utils';
|
|
5
4
|
import type { DialogDensity, DialogPosition, DialogProps, DialogSize } from './dialog.types.js';
|
|
6
5
|
|
|
7
6
|
function resolveSize(value: DialogSize | undefined): DialogSize {
|
|
@@ -6,6 +6,11 @@ export { default as KitAppbar } from './appbar/appbar.svelte';
|
|
|
6
6
|
export { default as KitBtn } from './btn/btn.svelte';
|
|
7
7
|
export { default as KitIcon } from './icon/icon.svelte';
|
|
8
8
|
export { default as KitCard } from './card/card.svelte';
|
|
9
|
+
export { default as KitCardMedia } from './card/modules/card-media.svelte';
|
|
10
|
+
export { default as KitCardTitle } from './card/modules/card-title.svelte';
|
|
11
|
+
export { default as KitCardContent } from './card/modules/card-content.svelte';
|
|
12
|
+
export { default as KitCardActions } from './card/modules/card-actions.svelte';
|
|
13
|
+
export { default as KitCardContainer } from './card/modules/card-container.svelte';
|
|
9
14
|
export { default as KitChip } from './chip/chip.svelte';
|
|
10
15
|
export { default as KitAvatar } from './avatar/avatar.svelte';
|
|
11
16
|
export { default as KitDropdown } from './dropdown/dropdown.svelte';
|
package/dist/components/index.js
CHANGED
|
@@ -4,6 +4,11 @@ export { default as KitAppbar } from './appbar/appbar.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 KitCard } from './card/card.svelte';
|
|
7
|
+
export { default as KitCardMedia } from './card/modules/card-media.svelte';
|
|
8
|
+
export { default as KitCardTitle } from './card/modules/card-title.svelte';
|
|
9
|
+
export { default as KitCardContent } from './card/modules/card-content.svelte';
|
|
10
|
+
export { default as KitCardActions } from './card/modules/card-actions.svelte';
|
|
11
|
+
export { default as KitCardContainer } from './card/modules/card-container.svelte';
|
|
7
12
|
export { default as KitChip } from './chip/chip.svelte';
|
|
8
13
|
export { default as KitAvatar } from './avatar/avatar.svelte';
|
|
9
14
|
export { default as KitDropdown } from './dropdown/dropdown.svelte';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import type { ModalState } from '../../@types';
|
|
1
2
|
import { type Writable } from 'svelte/store';
|
|
2
|
-
type ModalState = boolean | 'persistent';
|
|
3
3
|
export declare const modalOpen: Writable<ModalState>;
|
|
4
4
|
export declare const modalStack: Writable<string[]>;
|
|
5
5
|
export declare function setOpenModal(state: boolean | 'persistent'): void;
|
|
6
6
|
export declare const pushModal: (id: string) => void;
|
|
7
7
|
export declare const popModal: (id: string) => void;
|
|
8
|
-
export {};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { get } from 'svelte/store';
|
|
4
4
|
import { makeComponentProps } from '../../html-mapped';
|
|
5
5
|
import { useClassName, useStyles } from '../../utils';
|
|
6
|
-
import { modalOpen, modalStack, popModal, pushModal, setOpenModal } from '
|
|
6
|
+
import { modalOpen, modalStack, popModal, pushModal, setOpenModal } from './modal.js';
|
|
7
7
|
import type { ModalDensity, ModalPosition, ModalProps, ModalSize } from './modal.types.js';
|
|
8
8
|
|
|
9
9
|
function resolveSize(value: ModalSize | undefined): ModalSize {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { TextfieldProps } from './textfield.types.ts';
|
|
2
|
-
declare const Textfield: import("svelte").Component<TextfieldProps, {}, "
|
|
2
|
+
declare const Textfield: import("svelte").Component<TextfieldProps, {}, "value" | "ref">;
|
|
3
3
|
type Textfield = ReturnType<typeof Textfield>;
|
|
4
4
|
export default Textfield;
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const lapikitImportsRef = "lapikit/
|
|
2
|
-
export declare const lapikitImportsLabsRef = "lapikit/labs/
|
|
1
|
+
export declare const lapikitImportsRef = "lapikit/components";
|
|
2
|
+
export declare const lapikitImportsLabsRef = "lapikit/labs/components";
|
|
3
3
|
export declare const lapikitComponents: readonly string[];
|
|
4
4
|
export declare const lapikitLabsComponents: readonly string[];
|
|
5
5
|
export declare const lapikitPlugins: {
|
package/dist/constants.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export const lapikitImportsRef = 'lapikit/
|
|
2
|
-
export const lapikitImportsLabsRef = 'lapikit/labs/
|
|
1
|
+
export const lapikitImportsRef = 'lapikit/components';
|
|
2
|
+
export const lapikitImportsLabsRef = 'lapikit/labs/components';
|
|
3
3
|
export const lapikitComponents = [
|
|
4
4
|
'app',
|
|
5
5
|
'btn',
|
|
@@ -28,7 +28,12 @@ export const lapikitComponents = [
|
|
|
28
28
|
'spacer',
|
|
29
29
|
'separator',
|
|
30
30
|
'chip',
|
|
31
|
-
'card'
|
|
31
|
+
'card',
|
|
32
|
+
'card-title',
|
|
33
|
+
'card-content',
|
|
34
|
+
'card-media',
|
|
35
|
+
'card-actions',
|
|
36
|
+
'card-container'
|
|
32
37
|
];
|
|
33
38
|
export const lapikitLabsComponents = ['sheet'];
|
|
34
39
|
export const lapikitPlugins = {
|
|
@@ -8,6 +8,7 @@ import type { useClassNameProps, useStylesProps } from '../@types';
|
|
|
8
8
|
* @returns A computed class string.
|
|
9
9
|
*/
|
|
10
10
|
export declare function useClassName({ baseClass, className, sClass, classProps }?: useClassNameProps): string;
|
|
11
|
+
export declare function useIsInteractive(props: Record<string, unknown>, tag: string, interactiveTags: readonly string[], interactive?: boolean): boolean;
|
|
11
12
|
/**
|
|
12
13
|
* useStyles - Utility to compute style declarations for a component (optimized pure function).
|
|
13
14
|
* @param styleAttr - Inline style attribute as a string.
|
package/dist/utils/components.js
CHANGED
|
@@ -54,6 +54,22 @@ export function useClassName({ baseClass = '', className, sClass, classProps } =
|
|
|
54
54
|
}
|
|
55
55
|
return classes.filter(Boolean).join(' ');
|
|
56
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* useIsInteractive - Utility to determine whether a component should behave as interactive:
|
|
59
|
+
* either explicitly flagged, rendered as an interactive tag (e.g. 'a', 'button'), or given
|
|
60
|
+
* one of the standard interactive event handlers (onclick, onpointerdown, onkeydown).
|
|
61
|
+
* @param props - The rest/spread props object of a component.
|
|
62
|
+
* @param tag - The resolved element tag the component renders as.
|
|
63
|
+
* @param interactiveTags - The tags considered interactive for this component (e.g. ['a', 'button']).
|
|
64
|
+
* @param interactive - Explicit interactive flag passed to the component.
|
|
65
|
+
* @returns True if the component should behave as interactive.
|
|
66
|
+
*/
|
|
67
|
+
const interactiveEventKeys = ['onclick', 'onpointerdown', 'onkeydown'];
|
|
68
|
+
export function useIsInteractive(props, tag, interactiveTags, interactive = false) {
|
|
69
|
+
return (interactive ||
|
|
70
|
+
interactiveTags.includes(tag) ||
|
|
71
|
+
interactiveEventKeys.some((key) => typeof props[key] === 'function'));
|
|
72
|
+
}
|
|
57
73
|
/**
|
|
58
74
|
* useStyles - Utility to compute style declarations for a component (optimized pure function).
|
|
59
75
|
* @param styleAttr - Inline style attribute as a string.
|
package/dist/utils/outside.d.ts
CHANGED
package/dist/utils/outside.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { writable } from 'svelte/store';
|
|
2
2
|
// states
|
|
3
3
|
const isBrowser = typeof window !== 'undefined';
|
|
4
|
+
// presets
|
|
5
|
+
const themeRef = 'light';
|
|
6
|
+
export const theme = writable(themeRef);
|
|
4
7
|
export function useTheme(name, key = '@lapikit/theme') {
|
|
5
8
|
theme.update(() => {
|
|
6
9
|
if (isBrowser) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lapikit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -43,51 +43,30 @@
|
|
|
43
43
|
"bin": {
|
|
44
44
|
"lapikit": "bin/index.js"
|
|
45
45
|
},
|
|
46
|
-
"svelte": "./dist
|
|
47
|
-
"types": "./dist
|
|
46
|
+
"svelte": "./dist/entry-bundler.js",
|
|
47
|
+
"types": "./dist/entry-bundler.d.ts",
|
|
48
48
|
"type": "module",
|
|
49
49
|
"exports": {
|
|
50
50
|
".": {
|
|
51
|
-
"types": "./dist
|
|
52
|
-
"svelte": "./dist
|
|
53
|
-
},
|
|
54
|
-
"./components": {
|
|
55
|
-
"svelte": "./dist/@legacy/components/index.js",
|
|
56
|
-
"default": "./dist/@legacy/components/index.js"
|
|
57
|
-
},
|
|
58
|
-
"./vite": {
|
|
59
|
-
"default": "./dist/@legacy/internal/plugins/vite.js"
|
|
60
|
-
},
|
|
61
|
-
"./stores": {
|
|
62
|
-
"default": "./dist/@legacy/stores/index.js"
|
|
63
|
-
},
|
|
64
|
-
"./actions": {
|
|
65
|
-
"default": "./dist/@legacy/actions/index.js"
|
|
66
|
-
},
|
|
67
|
-
"./core/colors": {
|
|
68
|
-
"default": "./dist/@legacy/internal/core/standard-colors.js"
|
|
69
|
-
},
|
|
70
|
-
"./styles": {
|
|
71
|
-
"types": "./dist/@legacy/styles.css.d.ts",
|
|
72
|
-
"default": "./dist/@legacy/styles.css"
|
|
73
|
-
},
|
|
74
|
-
"./themes": {
|
|
75
|
-
"types": "./dist/@legacy/themes.css.d.ts",
|
|
76
|
-
"default": "./dist/@legacy/themes.css"
|
|
51
|
+
"types": "./dist/entry-bundler.d.ts",
|
|
52
|
+
"svelte": "./dist/entry-bundler.js"
|
|
77
53
|
},
|
|
78
|
-
"./
|
|
54
|
+
"./preprocess": {
|
|
79
55
|
"types": "./dist/entry-bundler.d.ts",
|
|
80
56
|
"default": "./dist/entry-bundler.js"
|
|
81
57
|
},
|
|
82
|
-
"./
|
|
58
|
+
"./components": {
|
|
83
59
|
"types": "./dist/components/index.d.ts",
|
|
84
60
|
"svelte": "./dist/components/index.js",
|
|
85
61
|
"default": "./dist/components/index.js"
|
|
86
62
|
},
|
|
87
|
-
"./labs/
|
|
63
|
+
"./labs/components": {
|
|
88
64
|
"types": "./dist/labs/index.d.ts",
|
|
89
65
|
"svelte": "./dist/labs/index.js",
|
|
90
66
|
"default": "./dist/labs/index.js"
|
|
67
|
+
},
|
|
68
|
+
"./actions": {
|
|
69
|
+
"default": "./dist/actions.js"
|
|
91
70
|
}
|
|
92
71
|
},
|
|
93
72
|
"peerDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useTheme(name: string, key?: string): void;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<script lang="ts"></script>
|
|
2
|
-
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
|
|
4
|
-
><path
|
|
5
|
-
fill="none"
|
|
6
|
-
stroke="currentColor"
|
|
7
|
-
stroke-linecap="round"
|
|
8
|
-
stroke-linejoin="round"
|
|
9
|
-
stroke-width="2.5"
|
|
10
|
-
d="m7 10l5 5m0 0l5-5"
|
|
11
|
-
/></svg
|
|
12
|
-
>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const ArrowDown: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
-
[evt: string]: CustomEvent<any>;
|
|
16
|
-
}, {}, {}, string>;
|
|
17
|
-
type ArrowDown = InstanceType<typeof ArrowDown>;
|
|
18
|
-
export default ArrowDown;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<script lang="ts"></script>
|
|
2
|
-
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
|
|
4
|
-
><path
|
|
5
|
-
fill="none"
|
|
6
|
-
stroke="currentColor"
|
|
7
|
-
stroke-linecap="round"
|
|
8
|
-
stroke-linejoin="round"
|
|
9
|
-
stroke-width="2.5"
|
|
10
|
-
d="m17 14l-5-5m0 0l-5 5"
|
|
11
|
-
/></svg
|
|
12
|
-
>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const ArrowUp: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
-
[evt: string]: CustomEvent<any>;
|
|
16
|
-
}, {}, {}, string>;
|
|
17
|
-
type ArrowUp = InstanceType<typeof ArrowUp>;
|
|
18
|
-
export default ArrowUp;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<script lang="ts"></script>
|
|
2
|
-
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
|
|
4
|
-
><title>close_fill</title><g id="close_fill" fill="none" fill-rule="evenodd"
|
|
5
|
-
><path
|
|
6
|
-
d="M24 0v24H0V0zM12.593 23.258l-.011.002-.071.035-.02.004-.014-.004-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01-.017.428.005.02.01.013.104.074.015.004.012-.004.104-.074.012-.016.004-.017-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113-.013.002-.185.093-.01.01-.003.011.018.43.005.012.008.007.201.093c.012.004.023 0 .029-.008l.004-.014-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014-.034.614c0 .012.007.02.017.024l.015-.002.201-.093.01-.008.004-.011.017-.43-.003-.012-.01-.01z"
|
|
7
|
-
/><path
|
|
8
|
-
fill="currentColor"
|
|
9
|
-
d="m12 14.122 5.303 5.303a1.5 1.5 0 0 0 2.122-2.122L14.12 12l5.304-5.303a1.5 1.5 0 1 0-2.122-2.121L12 9.879 6.697 4.576a1.5 1.5 0 1 0-2.122 2.12L9.88 12l-5.304 5.304a1.5 1.5 0 1 0 2.122 2.12z"
|
|
10
|
-
/></g
|
|
11
|
-
></svg
|
|
12
|
-
>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const CloseFill: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
-
[evt: string]: CustomEvent<any>;
|
|
16
|
-
}, {}, {}, string>;
|
|
17
|
-
type CloseFill = InstanceType<typeof CloseFill>;
|
|
18
|
-
export default CloseFill;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<script lang="ts"></script>
|
|
2
|
-
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
|
|
4
|
-
><defs
|
|
5
|
-
><linearGradient id="a" x1="50%" x2="50%" y1="5.271%" y2="91.793%"
|
|
6
|
-
><stop offset="0%" stop-color="currentColor" /><stop
|
|
7
|
-
offset="100%"
|
|
8
|
-
stop-color="currentColor"
|
|
9
|
-
stop-opacity=".55"
|
|
10
|
-
/></linearGradient
|
|
11
|
-
><linearGradient id="b" x1="50%" x2="50%" y1="15.24%" y2="87.15%"
|
|
12
|
-
><stop offset="0%" stop-color="currentColor" stop-opacity="0" /><stop
|
|
13
|
-
offset="100%"
|
|
14
|
-
stop-color="currentColor"
|
|
15
|
-
stop-opacity=".55"
|
|
16
|
-
/></linearGradient
|
|
17
|
-
></defs
|
|
18
|
-
><g fill="none"
|
|
19
|
-
><path
|
|
20
|
-
d="M24 0v24H0V0zM12.593 23.258l-.011.002-.071.035-.02.004-.014-.004-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01-.017.428.005.02.01.013.104.074.015.004.012-.004.104-.074.012-.016.004-.017-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113-.013.002-.185.093-.01.01-.003.011.018.43.005.012.008.007.201.093c.012.004.023 0 .029-.008l.004-.014-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014-.034.614c0 .012.007.02.017.024l.015-.002.201-.093.01-.008.004-.011.017-.43-.003-.012-.01-.01z"
|
|
21
|
-
/><path
|
|
22
|
-
fill="url(#a)"
|
|
23
|
-
d="M8.749.021a1.5 1.5 0 0 1 .497 2.958A7.502 7.502 0 0 0 3 10.375a7.5 7.5 0 0 0 7.5 7.5v3c-5.799 0-10.5-4.7-10.5-10.5C0 5.23 3.726.865 8.749.021"
|
|
24
|
-
transform="translate(1.5 1.625)"
|
|
25
|
-
/><path
|
|
26
|
-
fill="url(#b)"
|
|
27
|
-
d="M15.392 2.673a1.5 1.5 0 0 1 2.119-.115A10.475 10.475 0 0 1 21 10.375c0 5.8-4.701 10.5-10.5 10.5v-3a7.5 7.5 0 0 0 5.007-13.084 1.5 1.5 0 0 1-.115-2.118"
|
|
28
|
-
transform="translate(1.5 1.625)"
|
|
29
|
-
/></g
|
|
30
|
-
></svg
|
|
31
|
-
>
|