@dust-tt/sparkle 0.3.5 → 0.3.7
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/cjs/index.js +1 -1
- package/dist/esm/components/ConversationMessage.d.ts.map +1 -1
- package/dist/esm/components/ConversationMessage.js +2 -2
- package/dist/esm/components/ConversationMessage.js.map +1 -1
- package/dist/esm/components/ScrollArea.d.ts +1 -1
- package/dist/esm/components/ScrollArea.d.ts.map +1 -1
- package/dist/esm/components/markdown/Markdown.js +1 -1
- package/dist/esm/components/markdown/Markdown.js.map +1 -1
- package/dist/esm/icons/actions/Frame.d.ts +5 -0
- package/dist/esm/icons/actions/Frame.d.ts.map +1 -0
- package/dist/esm/icons/actions/Frame.js +6 -0
- package/dist/esm/icons/actions/Frame.js.map +1 -0
- package/dist/esm/icons/actions/index.d.ts +1 -0
- package/dist/esm/icons/actions/index.d.ts.map +1 -1
- package/dist/esm/icons/actions/index.js +1 -0
- package/dist/esm/icons/actions/index.js.map +1 -1
- package/dist/esm/icons/src/actions/frame.svg +3 -0
- package/dist/esm/stories/AnchoredPopover.stories.d.ts +1 -2
- package/dist/esm/stories/AnchoredPopover.stories.d.ts.map +1 -1
- package/dist/esm/stories/AnchoredPopover.stories.js +36 -48
- package/dist/esm/stories/AnchoredPopover.stories.js.map +1 -1
- package/dist/esm/stories/Avatar.stories.d.ts +64 -5
- package/dist/esm/stories/Avatar.stories.d.ts.map +1 -1
- package/dist/esm/stories/Avatar.stories.js +407 -331
- package/dist/esm/stories/Avatar.stories.js.map +1 -1
- package/dist/esm/stories/Button.stories.d.ts +1 -0
- package/dist/esm/stories/Button.stories.d.ts.map +1 -1
- package/dist/esm/stories/Button.stories.js +1 -0
- package/dist/esm/stories/Button.stories.js.map +1 -1
- package/dist/esm/stories/Card.stories.d.ts +39 -3
- package/dist/esm/stories/Card.stories.d.ts.map +1 -1
- package/dist/esm/stories/Card.stories.js +92 -22
- package/dist/esm/stories/Card.stories.js.map +1 -1
- package/dist/esm/stories/Chip.stories.d.ts +4 -3
- package/dist/esm/stories/Chip.stories.d.ts.map +1 -1
- package/dist/esm/stories/Chip.stories.js +37 -30
- package/dist/esm/stories/Chip.stories.js.map +1 -1
- package/dist/esm/stories/Dropdown.stories.d.ts +13 -4
- package/dist/esm/stories/Dropdown.stories.d.ts.map +1 -1
- package/dist/esm/stories/Dropdown.stories.js +418 -411
- package/dist/esm/stories/Dropdown.stories.js.map +1 -1
- package/dist/esm/stories/Icon.stories.d.ts +1 -0
- package/dist/esm/stories/Icon.stories.d.ts.map +1 -1
- package/dist/esm/stories/Icon.stories.js +1 -0
- package/dist/esm/stories/Icon.stories.js.map +1 -1
- package/dist/esm/stories/IconSet.stories.d.ts +7 -5
- package/dist/esm/stories/IconSet.stories.d.ts.map +1 -1
- package/dist/esm/stories/IconSet.stories.js +21 -15
- package/dist/esm/stories/IconSet.stories.js.map +1 -1
- package/dist/esm/stories/Input.stories.d.ts +46 -1
- package/dist/esm/stories/Input.stories.d.ts.map +1 -1
- package/dist/esm/stories/Input.stories.js +94 -16
- package/dist/esm/stories/Input.stories.js.map +1 -1
- package/dist/esm/stories/Logo.stories.d.ts +6 -4
- package/dist/esm/stories/Logo.stories.d.ts.map +1 -1
- package/dist/esm/stories/Logo.stories.js +41 -37
- package/dist/esm/stories/Logo.stories.js.map +1 -1
- package/dist/esm/stories/Markdown.stories.d.ts +24 -2
- package/dist/esm/stories/Markdown.stories.d.ts.map +1 -1
- package/dist/esm/stories/Markdown.stories.js +1 -0
- package/dist/esm/stories/Markdown.stories.js.map +1 -1
- package/dist/esm/stories/ScrollArea.stories.d.ts +12 -5
- package/dist/esm/stories/ScrollArea.stories.d.ts.map +1 -1
- package/dist/esm/stories/ScrollArea.stories.js +7 -3
- package/dist/esm/stories/ScrollArea.stories.js.map +1 -1
- package/dist/esm/stories/Spinner.stories.d.ts +22 -1
- package/dist/esm/stories/Spinner.stories.d.ts.map +1 -1
- package/dist/esm/stories/Spinner.stories.js +91 -50
- package/dist/esm/stories/Spinner.stories.js.map +1 -1
- package/dist/esm/stories/Tabs.stories.d.ts +6 -2
- package/dist/esm/stories/Tabs.stories.d.ts.map +1 -1
- package/dist/esm/stories/Tabs.stories.js +10 -8
- package/dist/esm/stories/Tabs.stories.js.map +1 -1
- package/dist/sparkle.css +4 -19
- package/package.json +1 -1
- package/src/components/ConversationMessage.tsx +2 -9
- package/src/components/ScrollArea.tsx +1 -1
- package/src/components/markdown/Markdown.tsx +1 -1
- package/src/icons/actions/Frame.tsx +18 -0
- package/src/icons/actions/index.ts +1 -0
- package/src/icons/src/actions/frame.svg +3 -0
- package/src/stories/AnchoredPopover.stories.tsx +77 -91
- package/src/stories/Avatar.stories.tsx +558 -478
- package/src/stories/Button.stories.tsx +1 -0
- package/src/stories/Card.stories.tsx +146 -70
- package/src/stories/Chip.stories.tsx +108 -101
- package/src/stories/Dropdown.stories.tsx +725 -717
- package/src/stories/Icon.stories.tsx +1 -0
- package/src/stories/IconSet.stories.tsx +61 -52
- package/src/stories/Input.stories.tsx +168 -79
- package/src/stories/Logo.stories.tsx +76 -69
- package/src/stories/Markdown.stories.tsx +3 -2
- package/src/stories/ScrollArea.stories.tsx +10 -6
- package/src/stories/Spinner.stories.tsx +134 -87
- package/src/stories/Tabs.stories.tsx +13 -10
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
1
2
|
import React from "react";
|
|
2
3
|
|
|
3
4
|
import * as ActionIcons from "@sparkle/icons/actions";
|
|
@@ -11,9 +12,13 @@ type IconModule = {
|
|
|
11
12
|
};
|
|
12
13
|
};
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
const meta = {
|
|
15
16
|
title: "Assets/Icons",
|
|
16
|
-
|
|
17
|
+
tags: ["autodocs"],
|
|
18
|
+
} satisfies Meta;
|
|
19
|
+
|
|
20
|
+
export default meta;
|
|
21
|
+
type Story = StoryObj<typeof meta>;
|
|
17
22
|
|
|
18
23
|
const gridStyle = {
|
|
19
24
|
display: "grid",
|
|
@@ -29,56 +34,60 @@ const itemStyle = {
|
|
|
29
34
|
width: "100%",
|
|
30
35
|
};
|
|
31
36
|
|
|
32
|
-
export const IconSet =
|
|
33
|
-
|
|
34
|
-
{
|
|
35
|
-
(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
export const IconSet: Story = {
|
|
38
|
+
render: () => (
|
|
39
|
+
<div style={gridStyle}>
|
|
40
|
+
{Object.entries(SolidIcons as IconModule).map(
|
|
41
|
+
([iconName, IconComponent]) => {
|
|
42
|
+
const CurrentIcon = (
|
|
43
|
+
"default" in IconComponent ? IconComponent.default : IconComponent
|
|
44
|
+
) as React.ComponentType<{ className?: string }>;
|
|
45
|
+
return (
|
|
46
|
+
<div key={iconName}>
|
|
47
|
+
<Icon
|
|
48
|
+
visual={CurrentIcon}
|
|
49
|
+
size="md"
|
|
50
|
+
className="s-text-foreground dark:s-text-foreground-night"
|
|
51
|
+
/>
|
|
52
|
+
<div
|
|
53
|
+
style={itemStyle as React.CSSProperties}
|
|
54
|
+
className="s-text-sm s-text-foreground dark:s-text-foreground-night"
|
|
55
|
+
>
|
|
56
|
+
{iconName}
|
|
57
|
+
</div>
|
|
51
58
|
</div>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
)}
|
|
62
|
+
</div>
|
|
63
|
+
),
|
|
64
|
+
};
|
|
58
65
|
|
|
59
|
-
export const ActionIconSet =
|
|
60
|
-
|
|
61
|
-
{
|
|
62
|
-
(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
<
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
66
|
+
export const ActionIconSet: Story = {
|
|
67
|
+
render: () => (
|
|
68
|
+
<div style={gridStyle}>
|
|
69
|
+
{Object.entries(ActionIcons as IconModule).map(
|
|
70
|
+
([iconName, IconComponent]) => {
|
|
71
|
+
const CurrentIcon = (
|
|
72
|
+
"default" in IconComponent ? IconComponent.default : IconComponent
|
|
73
|
+
) as React.ComponentType<{ className?: string }>;
|
|
74
|
+
return (
|
|
75
|
+
<div key={iconName}>
|
|
76
|
+
<Icon
|
|
77
|
+
visual={CurrentIcon}
|
|
78
|
+
size="md"
|
|
79
|
+
className="s-text-foreground dark:s-text-foreground-night"
|
|
80
|
+
/>
|
|
81
|
+
<div
|
|
82
|
+
style={itemStyle as React.CSSProperties}
|
|
83
|
+
className="s-text-sm s-text-foreground dark:s-text-foreground-night"
|
|
84
|
+
>
|
|
85
|
+
{iconName}
|
|
86
|
+
</div>
|
|
78
87
|
</div>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
)}
|
|
91
|
+
</div>
|
|
92
|
+
),
|
|
93
|
+
};
|
|
@@ -1,91 +1,180 @@
|
|
|
1
|
-
import type { Meta } from "@storybook/react";
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
4
|
import { Input } from "../index_with_tw_base";
|
|
5
5
|
|
|
6
|
+
const MESSAGE_STATUSES = ["info", "default", "error"] as const;
|
|
7
|
+
|
|
6
8
|
const meta = {
|
|
7
9
|
title: "Primitives/Input",
|
|
8
10
|
component: Input,
|
|
11
|
+
tags: ["autodocs"],
|
|
12
|
+
argTypes: {
|
|
13
|
+
placeholder: {
|
|
14
|
+
control: "text",
|
|
15
|
+
description: "Placeholder text for the input",
|
|
16
|
+
},
|
|
17
|
+
value: {
|
|
18
|
+
control: "text",
|
|
19
|
+
description: "Current value of the input",
|
|
20
|
+
},
|
|
21
|
+
label: {
|
|
22
|
+
control: "text",
|
|
23
|
+
description: "Optional label above the input",
|
|
24
|
+
},
|
|
25
|
+
message: {
|
|
26
|
+
control: "text",
|
|
27
|
+
description: "Helper or error message below the input",
|
|
28
|
+
},
|
|
29
|
+
messageStatus: {
|
|
30
|
+
options: MESSAGE_STATUSES,
|
|
31
|
+
control: { type: "select" },
|
|
32
|
+
description: "Status/color of the message",
|
|
33
|
+
},
|
|
34
|
+
disabled: {
|
|
35
|
+
control: "boolean",
|
|
36
|
+
description: "Whether the input is disabled",
|
|
37
|
+
},
|
|
38
|
+
isError: {
|
|
39
|
+
control: "boolean",
|
|
40
|
+
description: "Whether the input is in an error state",
|
|
41
|
+
},
|
|
42
|
+
type: {
|
|
43
|
+
control: "select",
|
|
44
|
+
options: ["text", "email", "password", "number", "tel", "url"],
|
|
45
|
+
description: "HTML input type",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
9
48
|
} satisfies Meta<typeof Input>;
|
|
10
49
|
|
|
11
50
|
export default meta;
|
|
51
|
+
type Story = StoryObj<typeof meta>;
|
|
12
52
|
|
|
13
|
-
export const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
53
|
+
export const Playground: Story = {
|
|
54
|
+
args: {
|
|
55
|
+
placeholder: "Enter text...",
|
|
56
|
+
value: "",
|
|
57
|
+
label: "Input Label",
|
|
58
|
+
message: "This is a helper message",
|
|
59
|
+
messageStatus: "info",
|
|
60
|
+
disabled: false,
|
|
61
|
+
isError: false,
|
|
62
|
+
type: "text",
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const WithError: Story = {
|
|
67
|
+
args: {
|
|
68
|
+
placeholder: "Enter text...",
|
|
69
|
+
value: "Invalid value",
|
|
70
|
+
label: "Email",
|
|
71
|
+
message: "Please enter a valid email address",
|
|
72
|
+
messageStatus: "error",
|
|
73
|
+
isError: true,
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const Disabled: Story = {
|
|
78
|
+
args: {
|
|
79
|
+
placeholder: "Disabled input",
|
|
80
|
+
value: "Cannot edit",
|
|
81
|
+
label: "Disabled Field",
|
|
82
|
+
disabled: true,
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const WithInfoMessage: Story = {
|
|
87
|
+
args: {
|
|
88
|
+
placeholder: "Enter your name",
|
|
89
|
+
label: "Full Name",
|
|
90
|
+
message: "Name must be unique",
|
|
91
|
+
messageStatus: "info",
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export const AllVariants: Story = {
|
|
96
|
+
render: () => (
|
|
97
|
+
<div className="s-flex s-flex-col s-gap-20">
|
|
98
|
+
<div className="s-grid s-grid-cols-3 s-gap-4">
|
|
99
|
+
<Input
|
|
100
|
+
placeholder="placeholder"
|
|
101
|
+
name="input"
|
|
102
|
+
message="Name must be unique"
|
|
103
|
+
messageStatus="info"
|
|
104
|
+
/>
|
|
105
|
+
<Input
|
|
106
|
+
placeholder="placeholder"
|
|
107
|
+
name="input"
|
|
108
|
+
value="value"
|
|
109
|
+
message="errored because it's a very long message"
|
|
110
|
+
messageStatus="error"
|
|
111
|
+
/>
|
|
112
|
+
<Input
|
|
113
|
+
placeholder="placeholder"
|
|
114
|
+
name="input"
|
|
115
|
+
value="value"
|
|
116
|
+
message="Default message"
|
|
117
|
+
/>
|
|
118
|
+
<Input
|
|
119
|
+
placeholder="placeholder"
|
|
120
|
+
name="input"
|
|
121
|
+
value="value"
|
|
122
|
+
message="errored because it's a very long message"
|
|
123
|
+
messageStatus="error"
|
|
124
|
+
/>
|
|
125
|
+
<Input
|
|
126
|
+
placeholder="placeholder"
|
|
127
|
+
name="input"
|
|
128
|
+
value="disabled"
|
|
129
|
+
disabled
|
|
130
|
+
messageStatus="error"
|
|
131
|
+
/>
|
|
132
|
+
</div>
|
|
133
|
+
<div className="s-grid s-grid-cols-3 s-gap-4">
|
|
134
|
+
<Input placeholder="placeholder" name="input" />
|
|
135
|
+
<Input
|
|
136
|
+
placeholder="placeholder"
|
|
137
|
+
name="input"
|
|
138
|
+
value="value"
|
|
139
|
+
message="errored because it's a very long message"
|
|
140
|
+
messageStatus="error"
|
|
141
|
+
/>
|
|
142
|
+
<Input
|
|
143
|
+
placeholder="placeholder"
|
|
144
|
+
name="input"
|
|
145
|
+
value="value"
|
|
146
|
+
message="Default message"
|
|
147
|
+
/>
|
|
148
|
+
<Input
|
|
149
|
+
placeholder="placeholder"
|
|
150
|
+
name="input"
|
|
151
|
+
value="value"
|
|
152
|
+
message="errored because it's a very long message"
|
|
153
|
+
messageStatus="error"
|
|
154
|
+
/>
|
|
155
|
+
<Input
|
|
156
|
+
placeholder="placeholder"
|
|
157
|
+
name="input"
|
|
158
|
+
value="test"
|
|
159
|
+
messageStatus="error"
|
|
160
|
+
/>
|
|
161
|
+
</div>
|
|
162
|
+
<div className="s-grid s-grid-cols-3 s-gap-4">
|
|
163
|
+
<Input
|
|
164
|
+
placeholder="placeholder"
|
|
165
|
+
name="input"
|
|
166
|
+
label="Firstname"
|
|
167
|
+
isError
|
|
168
|
+
/>
|
|
169
|
+
<Input
|
|
170
|
+
placeholder="placeholder"
|
|
171
|
+
name="input"
|
|
172
|
+
label="Lastname"
|
|
173
|
+
message="Input your lastname"
|
|
174
|
+
messageStatus="info"
|
|
175
|
+
isError
|
|
176
|
+
/>
|
|
177
|
+
</div>
|
|
89
178
|
</div>
|
|
90
|
-
|
|
91
|
-
|
|
179
|
+
),
|
|
180
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
1
2
|
import React from "react";
|
|
2
3
|
|
|
3
4
|
import { Div3D, Hover3D } from "..";
|
|
@@ -14,9 +15,13 @@ import {
|
|
|
14
15
|
DustLogoWhite,
|
|
15
16
|
} from "../logo/dust";
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
const meta = {
|
|
18
19
|
title: "Assets/DustLogo",
|
|
19
|
-
|
|
20
|
+
tags: ["autodocs"],
|
|
21
|
+
} satisfies Meta;
|
|
22
|
+
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
20
25
|
|
|
21
26
|
const gridStyle = {
|
|
22
27
|
display: "grid",
|
|
@@ -32,83 +37,85 @@ const itemStyle = {
|
|
|
32
37
|
width: "100%",
|
|
33
38
|
};
|
|
34
39
|
|
|
35
|
-
export const DustLogos =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<div
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
export const DustLogos: Story = {
|
|
41
|
+
render: () => (
|
|
42
|
+
<>
|
|
43
|
+
<div style={gridStyle}>
|
|
44
|
+
<div className="s-p-6">
|
|
45
|
+
<DustLogo className="s-h-8 s-w-32" />
|
|
46
|
+
<div style={itemStyle as React.CSSProperties} className="s-text-sm">
|
|
47
|
+
DustLogo
|
|
48
|
+
</div>
|
|
42
49
|
</div>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
<div className="s-p-6">
|
|
51
|
+
<DustLogoGray className="s-h-8 s-w-32" />
|
|
52
|
+
<div style={itemStyle as React.CSSProperties} className="s-text-sm">
|
|
53
|
+
DustLogoGray
|
|
54
|
+
</div>
|
|
48
55
|
</div>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
<div className="s-bg-primary-800 s-p-6">
|
|
57
|
+
<DustLogoWhite className="s-h-8 s-w-32" />
|
|
58
|
+
<div
|
|
59
|
+
style={itemStyle as React.CSSProperties}
|
|
60
|
+
className="s-text-sm s-text-white"
|
|
61
|
+
>
|
|
62
|
+
DustLogoWhite
|
|
63
|
+
</div>
|
|
57
64
|
</div>
|
|
58
65
|
</div>
|
|
59
|
-
</div>
|
|
60
66
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
<div style={gridStyle}>
|
|
68
|
+
<div className="s-p-6">
|
|
69
|
+
<DustLogoSquare className="s-h-16 s-w-16" />
|
|
70
|
+
<div style={itemStyle as React.CSSProperties} className="s-text-sm">
|
|
71
|
+
DustLogoSquare
|
|
72
|
+
</div>
|
|
66
73
|
</div>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
74
|
+
<div className="s-p-6">
|
|
75
|
+
<DustLogoSquareGray className="s-h-16 s-w-16" />
|
|
76
|
+
<div style={itemStyle as React.CSSProperties} className="s-text-sm">
|
|
77
|
+
DustLogoSquareGray
|
|
78
|
+
</div>
|
|
72
79
|
</div>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
<div className="s-bg-primary-800 s-p-6">
|
|
81
|
+
<DustLogoSquareWhite className="s-h-16 s-w-16" />
|
|
82
|
+
<div
|
|
83
|
+
style={itemStyle as React.CSSProperties}
|
|
84
|
+
className="s-text-sm s-text-white"
|
|
85
|
+
>
|
|
86
|
+
DustLogoWhite
|
|
87
|
+
</div>
|
|
81
88
|
</div>
|
|
82
89
|
</div>
|
|
83
|
-
</div>
|
|
84
90
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
91
|
+
<div style={gridStyle}>
|
|
92
|
+
<div className="s-p-6">
|
|
93
|
+
<Hover3D className="s-relative s-h-8 s-w-32">
|
|
94
|
+
<Div3D depth={0} className="s-h-8 s-w-32">
|
|
95
|
+
<DustLogoLayer1 className="s-h-8 s-w-32" />
|
|
96
|
+
</Div3D>
|
|
97
|
+
<Div3D depth={25} className="s-absolute s-top-0">
|
|
98
|
+
<DustLogoLayer2 className="s-h-8 s-w-32" />
|
|
99
|
+
</Div3D>
|
|
100
|
+
</Hover3D>
|
|
101
|
+
<div style={itemStyle as React.CSSProperties} className="s-text-sm">
|
|
102
|
+
Horizontal Hover3D
|
|
103
|
+
</div>
|
|
97
104
|
</div>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
</
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
<div className="s-p-6">
|
|
106
|
+
<Hover3D className="s-relative s-h-16 s-w-16">
|
|
107
|
+
<Div3D depth={0} className="s-h-16 s-w-16">
|
|
108
|
+
<DustLogoSquareLayer1 className="s-h-16 s-w-16" />
|
|
109
|
+
</Div3D>
|
|
110
|
+
<Div3D depth={25} className="s-absolute s-top-0">
|
|
111
|
+
<DustLogoSquareLayer2 className="s-h-16 s-w-16" />
|
|
112
|
+
</Div3D>
|
|
113
|
+
</Hover3D>
|
|
114
|
+
<div style={itemStyle as React.CSSProperties} className="s-text-sm">
|
|
115
|
+
Square Hover3D
|
|
116
|
+
</div>
|
|
110
117
|
</div>
|
|
111
118
|
</div>
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
119
|
+
</>
|
|
120
|
+
),
|
|
121
|
+
};
|
|
@@ -3,9 +3,10 @@ import React from "react";
|
|
|
3
3
|
|
|
4
4
|
import { Markdown } from "../index_with_tw_base";
|
|
5
5
|
|
|
6
|
-
const meta
|
|
6
|
+
const meta = {
|
|
7
7
|
title: "Components/Markdown",
|
|
8
8
|
component: Markdown,
|
|
9
|
+
tags: ["autodocs"],
|
|
9
10
|
decorators: [(Story) => <Story />],
|
|
10
11
|
argTypes: {
|
|
11
12
|
textColor: {
|
|
@@ -17,7 +18,7 @@ const meta: Meta<typeof Markdown> = {
|
|
|
17
18
|
control: { type: "radio" },
|
|
18
19
|
},
|
|
19
20
|
},
|
|
20
|
-
}
|
|
21
|
+
} satisfies Meta<typeof Markdown>;
|
|
21
22
|
|
|
22
23
|
export default meta;
|
|
23
24
|
type Story = StoryObj<typeof meta>;
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
|
-
import { ScrollBar } from "@sparkle/components/ScrollArea";
|
|
5
|
-
import {
|
|
4
|
+
import { ScrollArea, ScrollBar } from "@sparkle/components/ScrollArea";
|
|
5
|
+
import { Separator } from "@sparkle/components/Separator";
|
|
6
6
|
|
|
7
|
-
const meta
|
|
7
|
+
const meta = {
|
|
8
8
|
title: "Primitives/ScrollArea",
|
|
9
9
|
component: ScrollArea,
|
|
10
|
-
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: "centered",
|
|
12
|
+
},
|
|
13
|
+
tags: ["autodocs"],
|
|
14
|
+
} satisfies Meta<typeof ScrollArea>;
|
|
11
15
|
|
|
12
16
|
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
14
18
|
|
|
15
19
|
const tags = Array.from({ length: 50 }).map(
|
|
16
20
|
(_, i, a) => `v1.2.0-beta.${a.length - i}`
|
|
17
21
|
);
|
|
18
22
|
|
|
19
|
-
export const
|
|
23
|
+
export const ScrollAreaExample: Story = {
|
|
20
24
|
render: () => (
|
|
21
25
|
<div className="s-flex s-flex-row s-gap-6 s-bg-muted s-p-8">
|
|
22
26
|
<div className="s-h-[400px]">
|