@dust-tt/sparkle 0.2.456 → 0.2.457
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/DoubleIcon.d.ts +15 -0
- package/dist/esm/components/DoubleIcon.d.ts.map +1 -0
- package/dist/esm/components/DoubleIcon.js +26 -0
- package/dist/esm/components/DoubleIcon.js.map +1 -0
- package/dist/esm/components/Dropdown.d.ts.map +1 -1
- package/dist/esm/components/Dropdown.js +8 -4
- package/dist/esm/components/Dropdown.js.map +1 -1
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/stories/DoubleIcon.stories.d.ts +8 -0
- package/dist/esm/stories/DoubleIcon.stories.d.ts.map +1 -0
- package/dist/esm/stories/DoubleIcon.stories.js +97 -0
- package/dist/esm/stories/DoubleIcon.stories.js.map +1 -0
- package/dist/sparkle.css +21 -16
- package/package.json +1 -1
- package/src/components/DoubleIcon.tsx +43 -0
- package/src/components/Dropdown.tsx +18 -6
- package/src/components/index.ts +1 -0
- package/src/stories/DoubleIcon.stories.tsx +163 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import type { Meta } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
import { DoubleIcon } from "@sparkle/components";
|
|
5
|
+
import {
|
|
6
|
+
ChatBubbleBottomCenterTextIcon,
|
|
7
|
+
CheckCircleIcon,
|
|
8
|
+
DocumentIcon,
|
|
9
|
+
FolderIcon,
|
|
10
|
+
HeartIcon,
|
|
11
|
+
PlusIcon,
|
|
12
|
+
SparklesIcon,
|
|
13
|
+
StarIcon,
|
|
14
|
+
UserIcon,
|
|
15
|
+
} from "@sparkle/icons";
|
|
16
|
+
import { SlackLogo } from "@sparkle/logo";
|
|
17
|
+
|
|
18
|
+
const meta = {
|
|
19
|
+
title: "Primitives/DoubleIcon",
|
|
20
|
+
component: DoubleIcon,
|
|
21
|
+
} satisfies Meta<typeof DoubleIcon>;
|
|
22
|
+
|
|
23
|
+
export default meta;
|
|
24
|
+
|
|
25
|
+
export const IconPositions = () => (
|
|
26
|
+
<div className="s-flex s-flex-col s-gap-8">
|
|
27
|
+
<div className="s-flex s-items-center s-gap-16">
|
|
28
|
+
<div className="s-flex s-flex-col s-items-center s-gap-2">
|
|
29
|
+
<DoubleIcon
|
|
30
|
+
mainIconProps={{
|
|
31
|
+
visual: ChatBubbleBottomCenterTextIcon,
|
|
32
|
+
size: "md",
|
|
33
|
+
className: "s-text-primary-500",
|
|
34
|
+
}}
|
|
35
|
+
secondaryIconProps={{
|
|
36
|
+
visual: CheckCircleIcon,
|
|
37
|
+
size: "xs",
|
|
38
|
+
className: "s-text-success-500",
|
|
39
|
+
}}
|
|
40
|
+
position="bottom-right"
|
|
41
|
+
/>
|
|
42
|
+
<span className="s-text-xs s-text-muted-foreground">bottom-right</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div className="s-flex s-flex-col s-items-center s-gap-2">
|
|
46
|
+
<DoubleIcon
|
|
47
|
+
mainIconProps={{
|
|
48
|
+
visual: ChatBubbleBottomCenterTextIcon,
|
|
49
|
+
size: "md",
|
|
50
|
+
className: "s-text-primary-500",
|
|
51
|
+
}}
|
|
52
|
+
secondaryIconProps={{
|
|
53
|
+
visual: CheckCircleIcon,
|
|
54
|
+
size: "xs",
|
|
55
|
+
className: "s-text-success-500",
|
|
56
|
+
}}
|
|
57
|
+
position="top-right"
|
|
58
|
+
/>
|
|
59
|
+
<span className="s-text-xs s-text-muted-foreground">top-right</span>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div className="s-flex s-flex-col s-items-center s-gap-2">
|
|
63
|
+
<DoubleIcon
|
|
64
|
+
mainIconProps={{
|
|
65
|
+
visual: ChatBubbleBottomCenterTextIcon,
|
|
66
|
+
size: "md",
|
|
67
|
+
className: "s-text-primary-500",
|
|
68
|
+
}}
|
|
69
|
+
secondaryIconProps={{
|
|
70
|
+
visual: CheckCircleIcon,
|
|
71
|
+
size: "xs",
|
|
72
|
+
className: "s-text-success-500",
|
|
73
|
+
}}
|
|
74
|
+
position="bottom-left"
|
|
75
|
+
/>
|
|
76
|
+
<span className="s-text-xs s-text-muted-foreground">bottom-left</span>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div className="s-flex s-flex-col s-items-center s-gap-2">
|
|
80
|
+
<DoubleIcon
|
|
81
|
+
mainIconProps={{
|
|
82
|
+
visual: ChatBubbleBottomCenterTextIcon,
|
|
83
|
+
size: "md",
|
|
84
|
+
className: "s-text-primary-500",
|
|
85
|
+
}}
|
|
86
|
+
secondaryIconProps={{
|
|
87
|
+
visual: CheckCircleIcon,
|
|
88
|
+
size: "xs",
|
|
89
|
+
className: "s-text-success-500",
|
|
90
|
+
}}
|
|
91
|
+
position="top-left"
|
|
92
|
+
/>
|
|
93
|
+
<span className="s-text-xs s-text-muted-foreground">top-left</span>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<div className="s-flex s-items-center s-gap-16">
|
|
98
|
+
<div className="s-flex s-flex-col s-items-center s-gap-2">
|
|
99
|
+
<DoubleIcon
|
|
100
|
+
mainIconProps={{
|
|
101
|
+
visual: DocumentIcon,
|
|
102
|
+
size: "md",
|
|
103
|
+
className: "s-text-blue-500",
|
|
104
|
+
}}
|
|
105
|
+
secondaryIconProps={{
|
|
106
|
+
visual: PlusIcon,
|
|
107
|
+
size: "xs",
|
|
108
|
+
className: "s-text-highlight-500",
|
|
109
|
+
}}
|
|
110
|
+
position="bottom-right"
|
|
111
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
<div className="s-flex s-flex-col s-items-center s-gap-2">
|
|
115
|
+
<DoubleIcon
|
|
116
|
+
mainIconProps={{
|
|
117
|
+
visual: UserIcon,
|
|
118
|
+
size: "md",
|
|
119
|
+
className: "s-text-purple-500",
|
|
120
|
+
}}
|
|
121
|
+
secondaryIconProps={{
|
|
122
|
+
visual: StarIcon,
|
|
123
|
+
size: "xs",
|
|
124
|
+
className: "s-text-golden-500",
|
|
125
|
+
}}
|
|
126
|
+
position="top-right"
|
|
127
|
+
/>
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<div className="s-flex s-flex-col s-items-center s-gap-2">
|
|
131
|
+
<DoubleIcon
|
|
132
|
+
mainIconProps={{
|
|
133
|
+
visual: SlackLogo,
|
|
134
|
+
size: "md",
|
|
135
|
+
className: "s-text-green-500",
|
|
136
|
+
}}
|
|
137
|
+
secondaryIconProps={{
|
|
138
|
+
visual: FolderIcon,
|
|
139
|
+
size: "sm",
|
|
140
|
+
className: "s-text-red-500",
|
|
141
|
+
}}
|
|
142
|
+
position="bottom-right"
|
|
143
|
+
/>
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
<div className="s-flex s-flex-col s-items-center s-gap-2">
|
|
147
|
+
<DoubleIcon
|
|
148
|
+
mainIconProps={{
|
|
149
|
+
visual: HeartIcon,
|
|
150
|
+
size: "md",
|
|
151
|
+
className: "s-text-red-500",
|
|
152
|
+
}}
|
|
153
|
+
secondaryIconProps={{
|
|
154
|
+
visual: SparklesIcon,
|
|
155
|
+
size: "xs",
|
|
156
|
+
className: "s-text-golden-500",
|
|
157
|
+
}}
|
|
158
|
+
position="top-left"
|
|
159
|
+
/>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
);
|