@reshape-biotech/design-system 2.7.27 → 2.7.29
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/components/dropdown/components/dropdown-item.svelte +9 -3
- package/dist/components/dropdown/index.d.ts +1 -0
- package/dist/components/markdown/Markdown.stories.svelte +12 -6
- package/dist/components/markdown/Markdown.svelte +3 -2
- package/dist/components/markdown/Markdown.svelte.d.ts +1 -0
- package/dist/components/select/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -2,17 +2,23 @@
|
|
|
2
2
|
import { DropdownMenu } from 'bits-ui';
|
|
3
3
|
import type { DropdownItemProps } from '../types';
|
|
4
4
|
|
|
5
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
children,
|
|
7
|
+
child: userChild,
|
|
8
|
+
class: className = '',
|
|
9
|
+
onSelect,
|
|
10
|
+
...restProps
|
|
11
|
+
}: DropdownItemProps = $props();
|
|
6
12
|
</script>
|
|
7
13
|
|
|
8
|
-
<DropdownMenu.Item
|
|
14
|
+
<DropdownMenu.Item {onSelect} {...restProps}>
|
|
9
15
|
{#snippet child({ props }: { props: Record<string, any> })}
|
|
10
16
|
{#if userChild}
|
|
11
17
|
{@render userChild({ props })}
|
|
12
18
|
{:else}
|
|
13
19
|
<div
|
|
14
20
|
{...props}
|
|
15
|
-
class="h-
|
|
21
|
+
class="hover:bg-neutral-hover focus:bg-neutral-hover h-9 cursor-pointer rounded-lg px-2 py-1.5 text-sm transition-colors outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_a]:no-underline {className}"
|
|
16
22
|
>
|
|
17
23
|
{@render children?.()}
|
|
18
24
|
</div>
|
|
@@ -8,6 +8,7 @@ import SubContent from './components/dropdown-sub-content.svelte';
|
|
|
8
8
|
export declare const Root: import("svelte").Component<{
|
|
9
9
|
open?: boolean;
|
|
10
10
|
onOpenChange?: import("bits-ui/dist/internal/types").OnChangeFn<boolean>;
|
|
11
|
+
onOpenChangeComplete?: import("bits-ui/dist/internal/types").OnChangeFn<boolean>;
|
|
11
12
|
dir?: import("bits-ui").Direction;
|
|
12
13
|
} & {
|
|
13
14
|
children?: import("svelte").Snippet | undefined;
|
|
@@ -8,11 +8,8 @@
|
|
|
8
8
|
title: 'Design System/Markdown',
|
|
9
9
|
tags: ['autodocs'],
|
|
10
10
|
});
|
|
11
|
-
</script>
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
<Markdown
|
|
15
|
-
markdown={`# Welcome to My Markdown Story
|
|
12
|
+
const markdownContent = `# Welcome to My Markdown Story
|
|
16
13
|
|
|
17
14
|
## Features
|
|
18
15
|
|
|
@@ -36,6 +33,15 @@ greet('Storybook');
|
|
|
36
33
|
|
|
37
34
|
---
|
|
38
35
|
|
|
39
|
-
Happy storytelling with Markdown
|
|
40
|
-
|
|
36
|
+
Happy storytelling with Markdown!`;
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<Story name="Light" asChild>
|
|
40
|
+
<Markdown markdown={markdownContent} variant="light" />
|
|
41
|
+
</Story>
|
|
42
|
+
|
|
43
|
+
<Story name="Dark" asChild>
|
|
44
|
+
<div class="bg-gray-900 p-6 rounded-lg">
|
|
45
|
+
<Markdown markdown={markdownContent} variant="dark" />
|
|
46
|
+
</div>
|
|
41
47
|
</Story>
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
import { marked } from 'marked';
|
|
3
3
|
interface Props {
|
|
4
4
|
markdown: string;
|
|
5
|
+
variant?: 'light' | 'dark';
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
let { markdown }: Props = $props();
|
|
8
|
+
let { markdown, variant = 'light' }: Props = $props();
|
|
8
9
|
</script>
|
|
9
10
|
|
|
10
|
-
<div class="prose
|
|
11
|
+
<div class="prose prose-slate text-sm {variant === 'dark' ? 'dark:prose-invert' : ''}">
|
|
11
12
|
{@html marked.parse(markdown ?? '')}
|
|
12
13
|
</div>
|
|
@@ -4,7 +4,7 @@ import GroupHeading from './components/SelectGroupHeading.svelte';
|
|
|
4
4
|
import Trigger from './components/SelectTrigger.svelte';
|
|
5
5
|
import MultiSelectTrigger from './components/MultiSelectTrigger.svelte';
|
|
6
6
|
import Group from './components/Group.svelte';
|
|
7
|
-
export declare const Root: import("svelte").Component<import("bits-ui").
|
|
7
|
+
export declare const Root: import("svelte").Component<import("bits-ui").SelectRootPropsWithoutHTML, {}, "value" | "open">;
|
|
8
8
|
export declare const Portal: import("svelte").Component<import("bits-ui").PortalProps, {}, "">;
|
|
9
9
|
export { Content, Item, Group, GroupHeading, Trigger, MultiSelectTrigger };
|
|
10
10
|
export * from './types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reshape-biotech/design-system",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.29",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build",
|
|
@@ -410,7 +410,7 @@
|
|
|
410
410
|
"webpack-bundle-analyzer": "^4.10.2"
|
|
411
411
|
},
|
|
412
412
|
"dependencies": {
|
|
413
|
-
"bits-ui": "^
|
|
413
|
+
"bits-ui": "^2.14.1",
|
|
414
414
|
"echarts": "^5.6.0",
|
|
415
415
|
"tailwind-merge": "^3.3.1"
|
|
416
416
|
}
|