@cloudvoyant/helix-svelte 0.13.0 → 0.14.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/dist/Page.svelte +27 -0
- package/dist/Page.svelte.d.ts +10 -0
- package/dist/PageContent.svelte +21 -0
- package/dist/PageContent.svelte.d.ts +9 -0
- package/dist/PageFooter.svelte +21 -0
- package/dist/PageFooter.svelte.d.ts +9 -0
- package/dist/PageGutter.svelte +37 -0
- package/dist/PageGutter.svelte.d.ts +12 -0
- package/dist/PageSection.svelte +21 -0
- package/dist/PageSection.svelte.d.ts +9 -0
- package/dist/Scroll.svelte +17 -12
- package/dist/Scroll.svelte.d.ts +2 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/package.json +2 -2
package/dist/Page.svelte
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- libs/helix-svelte/src/Page.svelte -->
|
|
2
|
+
<!-- No upstream component; composed from @cloudvoyant/helix page classes, mirrored from @cloudvoyant/helix-react -->
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { Ark } from '@ark-ui/svelte/factory';
|
|
5
|
+
import { pageVariants, cn } from '@cloudvoyant/helix';
|
|
6
|
+
import type { Snippet } from 'svelte';
|
|
7
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
class?: string;
|
|
11
|
+
variant?: 'default' | 'landing';
|
|
12
|
+
children?: Snippet;
|
|
13
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
14
|
+
|
|
15
|
+
let {
|
|
16
|
+
class: className = '',
|
|
17
|
+
variant = 'default',
|
|
18
|
+
children,
|
|
19
|
+
...rest
|
|
20
|
+
}: Props = $props();
|
|
21
|
+
|
|
22
|
+
const rootClasses = $derived(cn(pageVariants({ variant }), className));
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<Ark as="div" data-slot="page" class={rootClasses} {...rest}>
|
|
26
|
+
{@render children?.()}
|
|
27
|
+
</Ark>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
type Props = {
|
|
4
|
+
class?: string;
|
|
5
|
+
variant?: 'default' | 'landing';
|
|
6
|
+
children?: Snippet;
|
|
7
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
8
|
+
declare const Page: import("svelte").Component<Props, {}, "">;
|
|
9
|
+
type Page = ReturnType<typeof Page>;
|
|
10
|
+
export default Page;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!-- libs/helix-svelte/src/PageContent.svelte -->
|
|
2
|
+
<!-- No upstream component; composed from @cloudvoyant/helix page classes, mirrored from @cloudvoyant/helix-react -->
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { Ark } from '@ark-ui/svelte/factory';
|
|
5
|
+
import { pageContentBase, cn } from '@cloudvoyant/helix';
|
|
6
|
+
import type { Snippet } from 'svelte';
|
|
7
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
class?: string;
|
|
11
|
+
children?: Snippet;
|
|
12
|
+
} & HTMLAttributes<HTMLElement>;
|
|
13
|
+
|
|
14
|
+
let { class: className = '', children, ...rest }: Props = $props();
|
|
15
|
+
|
|
16
|
+
const classes = $derived(cn(pageContentBase, className));
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<Ark as="main" data-slot="page-content" class={classes} {...rest}>
|
|
20
|
+
{@render children?.()}
|
|
21
|
+
</Ark>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
type Props = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: Snippet;
|
|
6
|
+
} & HTMLAttributes<HTMLElement>;
|
|
7
|
+
declare const PageContent: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type PageContent = ReturnType<typeof PageContent>;
|
|
9
|
+
export default PageContent;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!-- libs/helix-svelte/src/PageFooter.svelte -->
|
|
2
|
+
<!-- No upstream component; composed from @cloudvoyant/helix page classes, mirrored from @cloudvoyant/helix-react -->
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { Ark } from '@ark-ui/svelte/factory';
|
|
5
|
+
import { pageFooterBase, cn } from '@cloudvoyant/helix';
|
|
6
|
+
import type { Snippet } from 'svelte';
|
|
7
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
class?: string;
|
|
11
|
+
children?: Snippet;
|
|
12
|
+
} & HTMLAttributes<HTMLElement>;
|
|
13
|
+
|
|
14
|
+
let { class: className = '', children, ...rest }: Props = $props();
|
|
15
|
+
|
|
16
|
+
const classes = $derived(cn(pageFooterBase, className));
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<Ark as="footer" data-slot="page-footer" class={classes} {...rest}>
|
|
20
|
+
{@render children?.()}
|
|
21
|
+
</Ark>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
type Props = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: Snippet;
|
|
6
|
+
} & HTMLAttributes<HTMLElement>;
|
|
7
|
+
declare const PageFooter: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type PageFooter = ReturnType<typeof PageFooter>;
|
|
9
|
+
export default PageFooter;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<!-- libs/helix-svelte/src/PageGutter.svelte -->
|
|
2
|
+
<!-- No upstream component; composed from @cloudvoyant/helix page classes, mirrored from @cloudvoyant/helix-react -->
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { Ark } from '@ark-ui/svelte/factory';
|
|
5
|
+
import { pageGutterAreaBase, pageGutterVariants, pageGutterContentVariants, cn } from '@cloudvoyant/helix';
|
|
6
|
+
import type { Snippet } from 'svelte';
|
|
7
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
class?: string;
|
|
11
|
+
contentClass?: string;
|
|
12
|
+
side?: 'left' | 'right';
|
|
13
|
+
align?: 'start' | 'center' | 'end';
|
|
14
|
+
children?: Snippet;
|
|
15
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
class: className = '',
|
|
19
|
+
contentClass = '',
|
|
20
|
+
side = 'left',
|
|
21
|
+
align = 'start',
|
|
22
|
+
children,
|
|
23
|
+
...rest
|
|
24
|
+
}: Props = $props();
|
|
25
|
+
|
|
26
|
+
const areaClasses = $derived(cn(pageGutterAreaBase, side === 'right' && '[grid-area:right]'));
|
|
27
|
+
const gutterClasses = $derived(cn(pageGutterVariants({ side }), className));
|
|
28
|
+
const contentClasses = $derived(cn(pageGutterContentVariants({ align }), contentClass));
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<div data-slot="page-gutter-area" class={areaClasses}>
|
|
32
|
+
<Ark as="div" data-slot="page-gutter" class={gutterClasses} {...rest}>
|
|
33
|
+
<div data-slot="page-gutter-content" class={contentClasses}>
|
|
34
|
+
{@render children?.()}
|
|
35
|
+
</div>
|
|
36
|
+
</Ark>
|
|
37
|
+
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
type Props = {
|
|
4
|
+
class?: string;
|
|
5
|
+
contentClass?: string;
|
|
6
|
+
side?: 'left' | 'right';
|
|
7
|
+
align?: 'start' | 'center' | 'end';
|
|
8
|
+
children?: Snippet;
|
|
9
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
10
|
+
declare const PageGutter: import("svelte").Component<Props, {}, "">;
|
|
11
|
+
type PageGutter = ReturnType<typeof PageGutter>;
|
|
12
|
+
export default PageGutter;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!-- libs/helix-svelte/src/PageSection.svelte -->
|
|
2
|
+
<!-- No upstream component; composed from @cloudvoyant/helix page classes, mirrored from @cloudvoyant/helix-react -->
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { Ark } from '@ark-ui/svelte/factory';
|
|
5
|
+
import { pageSectionBase, cn } from '@cloudvoyant/helix';
|
|
6
|
+
import type { Snippet } from 'svelte';
|
|
7
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
class?: string;
|
|
11
|
+
children?: Snippet;
|
|
12
|
+
} & HTMLAttributes<HTMLElement>;
|
|
13
|
+
|
|
14
|
+
let { class: className = '', children, ...rest }: Props = $props();
|
|
15
|
+
|
|
16
|
+
const classes = $derived(cn(pageSectionBase, className));
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<Ark as="section" data-slot="page-section" class={classes} {...rest}>
|
|
20
|
+
{@render children?.()}
|
|
21
|
+
</Ark>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
type Props = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: Snippet;
|
|
6
|
+
} & HTMLAttributes<HTMLElement>;
|
|
7
|
+
declare const PageSection: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type PageSection = ReturnType<typeof PageSection>;
|
|
9
|
+
export default PageSection;
|
package/dist/Scroll.svelte
CHANGED
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
|
|
23
23
|
type Props = ScrollAreaRootProps & {
|
|
24
24
|
orientation?: 'vertical' | 'horizontal' | 'both';
|
|
25
|
+
/** `default` shows the styled scrollbars; `hidden` keeps scrolling without rendering any scrollbar. */
|
|
26
|
+
variant?: 'default' | 'hidden';
|
|
25
27
|
contentClass?: string;
|
|
26
28
|
thumbClass?: string;
|
|
27
29
|
/** Overrides the viewport class. The default is `flex h-full w-full flex-col`;
|
|
@@ -32,6 +34,7 @@
|
|
|
32
34
|
let {
|
|
33
35
|
class: className = '',
|
|
34
36
|
orientation = 'vertical',
|
|
37
|
+
variant = 'default',
|
|
35
38
|
contentClass = '',
|
|
36
39
|
thumbClass = '',
|
|
37
40
|
viewportClass = '',
|
|
@@ -51,17 +54,19 @@
|
|
|
51
54
|
{@render children?.()}
|
|
52
55
|
</ScrollAreaContent>
|
|
53
56
|
</ScrollAreaViewport>
|
|
54
|
-
{#if
|
|
55
|
-
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
{#if variant !== 'hidden'}
|
|
58
|
+
{#if orientation === 'vertical' || orientation === 'both'}
|
|
59
|
+
<ScrollAreaScrollbar orientation="vertical" class={scrollScrollbarBase}>
|
|
60
|
+
<ScrollAreaThumb class={thumbClasses} />
|
|
61
|
+
</ScrollAreaScrollbar>
|
|
62
|
+
{/if}
|
|
63
|
+
{#if orientation === 'horizontal' || orientation === 'both'}
|
|
64
|
+
<ScrollAreaScrollbar orientation="horizontal" class={scrollScrollbarBase}>
|
|
65
|
+
<ScrollAreaThumb class={thumbClasses} />
|
|
66
|
+
</ScrollAreaScrollbar>
|
|
67
|
+
{/if}
|
|
68
|
+
{#if orientation === 'both'}
|
|
69
|
+
<ScrollAreaCorner class={scrollCornerBase} />
|
|
70
|
+
{/if}
|
|
66
71
|
{/if}
|
|
67
72
|
</ScrollAreaRoot>
|
package/dist/Scroll.svelte.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ScrollAreaRootProps } from '@ark-ui/svelte/scroll-area';
|
|
2
2
|
type Props = ScrollAreaRootProps & {
|
|
3
3
|
orientation?: 'vertical' | 'horizontal' | 'both';
|
|
4
|
+
/** `default` shows the styled scrollbars; `hidden` keeps scrolling without rendering any scrollbar. */
|
|
5
|
+
variant?: 'default' | 'hidden';
|
|
4
6
|
contentClass?: string;
|
|
5
7
|
thumbClass?: string;
|
|
6
8
|
/** Overrides the viewport class. The default is `flex h-full w-full flex-col`;
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,11 @@ export { default as Stack } from './Stack.svelte';
|
|
|
12
12
|
export { default as HStack } from './HStack.svelte';
|
|
13
13
|
export { default as VStack } from './VStack.svelte';
|
|
14
14
|
export { default as Scroll } from './Scroll.svelte';
|
|
15
|
+
export { default as Page } from './Page.svelte';
|
|
16
|
+
export { default as PageGutter } from './PageGutter.svelte';
|
|
17
|
+
export { default as PageContent } from './PageContent.svelte';
|
|
18
|
+
export { default as PageFooter } from './PageFooter.svelte';
|
|
19
|
+
export { default as PageSection } from './PageSection.svelte';
|
|
15
20
|
export { default as Splitter } from './Splitter.svelte';
|
|
16
21
|
export { default as SplitterPanel } from './SplitterPanel.svelte';
|
|
17
22
|
export { default as SplitterResizeTrigger } from './SplitterResizeTrigger.svelte';
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,11 @@ export { default as Stack } from './Stack.svelte';
|
|
|
13
13
|
export { default as HStack } from './HStack.svelte';
|
|
14
14
|
export { default as VStack } from './VStack.svelte';
|
|
15
15
|
export { default as Scroll } from './Scroll.svelte';
|
|
16
|
+
export { default as Page } from './Page.svelte';
|
|
17
|
+
export { default as PageGutter } from './PageGutter.svelte';
|
|
18
|
+
export { default as PageContent } from './PageContent.svelte';
|
|
19
|
+
export { default as PageFooter } from './PageFooter.svelte';
|
|
20
|
+
export { default as PageSection } from './PageSection.svelte';
|
|
16
21
|
export { default as Splitter } from './Splitter.svelte';
|
|
17
22
|
export { default as SplitterPanel } from './SplitterPanel.svelte';
|
|
18
23
|
export { default as SplitterResizeTrigger } from './SplitterResizeTrigger.svelte';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudvoyant/helix-svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "helix Svelte UI components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@ark-ui/svelte": "^5.23.1",
|
|
30
|
-
"@cloudvoyant/helix": "0.
|
|
30
|
+
"@cloudvoyant/helix": "0.14.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@sveltejs/package": "^2.5.8",
|