@shipfox/react-ui 0.25.0 → 0.27.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/components/dot-grid/dot-grid.js +8 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/slider/index.d.ts +2 -0
- package/dist/components/slider/index.js +3 -0
- package/dist/components/slider/slider.d.ts +10 -0
- package/dist/components/slider/slider.js +38 -0
- package/dist/components/table/data-table.js +7 -6
- package/dist/components/table/table.stories.data.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +17 -5
- package/dist/colors.stories.js +0 -61
- package/dist/components/alert/alert.stories.js +0 -227
- package/dist/components/avatar/avatar.stories.js +0 -267
- package/dist/components/badge/badge.stories.js +0 -802
- package/dist/components/button/button-link.stories.js +0 -127
- package/dist/components/button/button.stories.js +0 -187
- package/dist/components/button/icon-button.stories.js +0 -344
- package/dist/components/button-group/button-group.stories.js +0 -644
- package/dist/components/card/card.stories.js +0 -216
- package/dist/components/checkbox/checkbox.stories.js +0 -566
- package/dist/components/code-block/code-block.stories.js +0 -341
- package/dist/components/combobox/combobox.stories.js +0 -191
- package/dist/components/command/command.stories.js +0 -228
- package/dist/components/confetti/confetti.stories.js +0 -41
- package/dist/components/count-up/count-up.stories.js +0 -568
- package/dist/components/dashboard/components/charts/bar-chart.stories.js +0 -287
- package/dist/components/dashboard/components/charts/line-chart.stories.js +0 -257
- package/dist/components/dashboard/dashboard.stories.js +0 -23
- package/dist/components/date-picker/date-picker.stories.js +0 -349
- package/dist/components/dropdown-input/dropdown-input.stories.js +0 -240
- package/dist/components/dropdown-menu/dropdown-menu.stories.js +0 -462
- package/dist/components/dynamic-item/dynamic-item.stories.js +0 -385
- package/dist/components/empty-state/empty-state.stories.js +0 -74
- package/dist/components/form/form.stories.js +0 -587
- package/dist/components/icon/icon.stories.js +0 -38
- package/dist/components/inline-tips/inline-tips.stories.js +0 -219
- package/dist/components/input/input.stories.js +0 -265
- package/dist/components/interval-selector/interval-selector.stories.js +0 -232
- package/dist/components/item/item.stories.js +0 -239
- package/dist/components/kbd/kbd.stories.js +0 -119
- package/dist/components/label/label.stories.js +0 -105
- package/dist/components/modal/modal.stories.js +0 -566
- package/dist/components/search/search.stories.js +0 -630
- package/dist/components/select/select.stories.js +0 -393
- package/dist/components/sheet/sheet.stories.js +0 -368
- package/dist/components/skeleton/skeleton.stories.js +0 -345
- package/dist/components/table/table.stories.js +0 -302
- package/dist/components/tabs/tabs.stories.js +0 -179
- package/dist/components/textarea/textarea.stories.js +0 -339
- package/dist/components/toast/toast.stories.js +0 -326
- package/dist/components/tooltip/tooltip.stories.js +0 -560
- package/dist/components/typography/code.stories.js +0 -54
- package/dist/components/typography/header.stories.js +0 -34
- package/dist/components/typography/text.stories.js +0 -105
- package/dist/onboarding/sign-in.stories.js +0 -101
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { Icon } from '../icon/index.js';
|
|
4
|
-
import { Popover, PopoverContent, PopoverTrigger } from '../popover/index.js';
|
|
5
|
-
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CommandTrigger } from './command.js';
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'Components/Command',
|
|
8
|
-
component: Command,
|
|
9
|
-
tags: [
|
|
10
|
-
'autodocs'
|
|
11
|
-
]
|
|
12
|
-
};
|
|
13
|
-
export default meta;
|
|
14
|
-
export const Default = {
|
|
15
|
-
render: ()=>/*#__PURE__*/ _jsxs(Command, {
|
|
16
|
-
className: "rounded-10 shadow-tooltip max-w-400",
|
|
17
|
-
children: [
|
|
18
|
-
/*#__PURE__*/ _jsx(CommandInput, {
|
|
19
|
-
placeholder: "Type a command or search..."
|
|
20
|
-
}),
|
|
21
|
-
/*#__PURE__*/ _jsxs(CommandList, {
|
|
22
|
-
children: [
|
|
23
|
-
/*#__PURE__*/ _jsx(CommandEmpty, {
|
|
24
|
-
children: "No results found."
|
|
25
|
-
}),
|
|
26
|
-
/*#__PURE__*/ _jsxs(CommandGroup, {
|
|
27
|
-
heading: "Suggestions",
|
|
28
|
-
children: [
|
|
29
|
-
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
30
|
-
children: [
|
|
31
|
-
/*#__PURE__*/ _jsx(Icon, {
|
|
32
|
-
name: "calendar2Line",
|
|
33
|
-
className: "size-16 mr-8"
|
|
34
|
-
}),
|
|
35
|
-
/*#__PURE__*/ _jsx("span", {
|
|
36
|
-
children: "Calendar"
|
|
37
|
-
})
|
|
38
|
-
]
|
|
39
|
-
}),
|
|
40
|
-
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
41
|
-
children: [
|
|
42
|
-
/*#__PURE__*/ _jsx(Icon, {
|
|
43
|
-
name: "emotion2Line",
|
|
44
|
-
className: "size-16 mr-8"
|
|
45
|
-
}),
|
|
46
|
-
/*#__PURE__*/ _jsx("span", {
|
|
47
|
-
children: "Search Emoji"
|
|
48
|
-
})
|
|
49
|
-
]
|
|
50
|
-
}),
|
|
51
|
-
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
52
|
-
children: [
|
|
53
|
-
/*#__PURE__*/ _jsx(Icon, {
|
|
54
|
-
name: "calculatorLine",
|
|
55
|
-
className: "size-16 mr-8"
|
|
56
|
-
}),
|
|
57
|
-
/*#__PURE__*/ _jsx("span", {
|
|
58
|
-
children: "Calculator"
|
|
59
|
-
})
|
|
60
|
-
]
|
|
61
|
-
})
|
|
62
|
-
]
|
|
63
|
-
}),
|
|
64
|
-
/*#__PURE__*/ _jsx(CommandSeparator, {}),
|
|
65
|
-
/*#__PURE__*/ _jsxs(CommandGroup, {
|
|
66
|
-
heading: "Settings",
|
|
67
|
-
children: [
|
|
68
|
-
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
69
|
-
children: [
|
|
70
|
-
/*#__PURE__*/ _jsx(Icon, {
|
|
71
|
-
name: "user3Line",
|
|
72
|
-
className: "size-16 mr-8"
|
|
73
|
-
}),
|
|
74
|
-
/*#__PURE__*/ _jsx("span", {
|
|
75
|
-
children: "Profile"
|
|
76
|
-
}),
|
|
77
|
-
/*#__PURE__*/ _jsx(CommandShortcut, {
|
|
78
|
-
children: "⌘P"
|
|
79
|
-
})
|
|
80
|
-
]
|
|
81
|
-
}),
|
|
82
|
-
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
83
|
-
children: [
|
|
84
|
-
/*#__PURE__*/ _jsx(Icon, {
|
|
85
|
-
name: "mailLine",
|
|
86
|
-
className: "size-16 mr-8"
|
|
87
|
-
}),
|
|
88
|
-
/*#__PURE__*/ _jsx("span", {
|
|
89
|
-
children: "Mail"
|
|
90
|
-
}),
|
|
91
|
-
/*#__PURE__*/ _jsx(CommandShortcut, {
|
|
92
|
-
children: "⌘M"
|
|
93
|
-
})
|
|
94
|
-
]
|
|
95
|
-
}),
|
|
96
|
-
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
97
|
-
children: [
|
|
98
|
-
/*#__PURE__*/ _jsx(Icon, {
|
|
99
|
-
name: "settings3Line",
|
|
100
|
-
className: "size-16 mr-8"
|
|
101
|
-
}),
|
|
102
|
-
/*#__PURE__*/ _jsx("span", {
|
|
103
|
-
children: "Settings"
|
|
104
|
-
}),
|
|
105
|
-
/*#__PURE__*/ _jsx(CommandShortcut, {
|
|
106
|
-
children: "⌘S"
|
|
107
|
-
})
|
|
108
|
-
]
|
|
109
|
-
})
|
|
110
|
-
]
|
|
111
|
-
})
|
|
112
|
-
]
|
|
113
|
-
})
|
|
114
|
-
]
|
|
115
|
-
})
|
|
116
|
-
};
|
|
117
|
-
export const Combobox = {
|
|
118
|
-
render: ()=>{
|
|
119
|
-
const frameworks = [
|
|
120
|
-
{
|
|
121
|
-
value: 'next.js',
|
|
122
|
-
label: 'Next.js',
|
|
123
|
-
icon: 'reactjsLine'
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
value: 'sveltekit',
|
|
127
|
-
label: 'SvelteKit',
|
|
128
|
-
icon: 'svelteLine'
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
value: 'nuxt.js',
|
|
132
|
-
label: 'Nuxt.js',
|
|
133
|
-
icon: 'vuejsLine'
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
value: 'remix',
|
|
137
|
-
label: 'Remix',
|
|
138
|
-
icon: 'reactjsLine'
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
value: 'astro',
|
|
142
|
-
label: 'Astro',
|
|
143
|
-
icon: 'rocketLine'
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
value: 'vue',
|
|
147
|
-
label: 'Vue',
|
|
148
|
-
icon: 'vuejsLine'
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
value: 'react',
|
|
152
|
-
label: 'React',
|
|
153
|
-
icon: 'reactjsLine'
|
|
154
|
-
}
|
|
155
|
-
];
|
|
156
|
-
function ComboboxDemo() {
|
|
157
|
-
const [open, setOpen] = useState(false);
|
|
158
|
-
const [value, setValue] = useState('');
|
|
159
|
-
return /*#__PURE__*/ _jsxs("div", {
|
|
160
|
-
className: "flex flex-col gap-16",
|
|
161
|
-
children: [
|
|
162
|
-
/*#__PURE__*/ _jsxs(Popover, {
|
|
163
|
-
open: open,
|
|
164
|
-
onOpenChange: setOpen,
|
|
165
|
-
children: [
|
|
166
|
-
/*#__PURE__*/ _jsx(PopoverTrigger, {
|
|
167
|
-
asChild: true,
|
|
168
|
-
children: /*#__PURE__*/ _jsx(CommandTrigger, {
|
|
169
|
-
className: "w-280",
|
|
170
|
-
placeholder: "Select framework...",
|
|
171
|
-
children: value ? frameworks.find((framework)=>framework.value === value)?.label : null
|
|
172
|
-
})
|
|
173
|
-
}),
|
|
174
|
-
/*#__PURE__*/ _jsx(PopoverContent, {
|
|
175
|
-
className: "w-280 p-0",
|
|
176
|
-
align: "start",
|
|
177
|
-
children: /*#__PURE__*/ _jsxs(Command, {
|
|
178
|
-
children: [
|
|
179
|
-
/*#__PURE__*/ _jsx(CommandInput, {
|
|
180
|
-
placeholder: "Search framework..."
|
|
181
|
-
}),
|
|
182
|
-
/*#__PURE__*/ _jsxs(CommandList, {
|
|
183
|
-
children: [
|
|
184
|
-
/*#__PURE__*/ _jsx(CommandEmpty, {
|
|
185
|
-
children: "No framework found."
|
|
186
|
-
}),
|
|
187
|
-
/*#__PURE__*/ _jsx(CommandGroup, {
|
|
188
|
-
children: frameworks.map((framework)=>/*#__PURE__*/ _jsxs(CommandItem, {
|
|
189
|
-
value: framework.value,
|
|
190
|
-
onSelect: (currentValue)=>{
|
|
191
|
-
setValue(currentValue === value ? '' : currentValue);
|
|
192
|
-
setOpen(false);
|
|
193
|
-
},
|
|
194
|
-
children: [
|
|
195
|
-
/*#__PURE__*/ _jsx(Icon, {
|
|
196
|
-
name: "check",
|
|
197
|
-
className: `size-16 mr-8 ${value === framework.value ? 'opacity-100' : 'opacity-0'}`
|
|
198
|
-
}),
|
|
199
|
-
/*#__PURE__*/ _jsx(Icon, {
|
|
200
|
-
name: framework.icon,
|
|
201
|
-
className: "size-16 mr-8"
|
|
202
|
-
}),
|
|
203
|
-
framework.label
|
|
204
|
-
]
|
|
205
|
-
}, framework.value))
|
|
206
|
-
})
|
|
207
|
-
]
|
|
208
|
-
})
|
|
209
|
-
]
|
|
210
|
-
})
|
|
211
|
-
})
|
|
212
|
-
]
|
|
213
|
-
}),
|
|
214
|
-
value && /*#__PURE__*/ _jsxs("p", {
|
|
215
|
-
className: "text-sm text-foreground-neutral-muted",
|
|
216
|
-
children: [
|
|
217
|
-
"Selected: ",
|
|
218
|
-
frameworks.find((f)=>f.value === value)?.label
|
|
219
|
-
]
|
|
220
|
-
})
|
|
221
|
-
]
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
return /*#__PURE__*/ _jsx(ComboboxDemo, {});
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
//# sourceMappingURL=command.stories.js.map
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Confetti, ConfettiButton } from './confetti.js';
|
|
3
|
-
const meta = {
|
|
4
|
-
title: 'Components/Confetti',
|
|
5
|
-
component: Confetti,
|
|
6
|
-
tags: [
|
|
7
|
-
'autodocs'
|
|
8
|
-
],
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: 'centered'
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
export default meta;
|
|
14
|
-
export const Default = {
|
|
15
|
-
render: ()=>/*#__PURE__*/ _jsx("div", {
|
|
16
|
-
className: "flex h-400 w-600 items-center justify-center rounded-16 bg-background-subtle-base",
|
|
17
|
-
children: /*#__PURE__*/ _jsx(ConfettiButton, {
|
|
18
|
-
children: "Click for Confetti!"
|
|
19
|
-
})
|
|
20
|
-
})
|
|
21
|
-
};
|
|
22
|
-
export const WithOptions = {
|
|
23
|
-
render: ()=>/*#__PURE__*/ _jsx("div", {
|
|
24
|
-
className: "flex h-400 w-600 items-center justify-center rounded-16 bg-background-subtle-base",
|
|
25
|
-
children: /*#__PURE__*/ _jsx(ConfettiButton, {
|
|
26
|
-
options: {
|
|
27
|
-
particleCount: 150,
|
|
28
|
-
spread: 60,
|
|
29
|
-
colors: [
|
|
30
|
-
'#ff6b6b',
|
|
31
|
-
'#4ecdc4',
|
|
32
|
-
'#ffe66d',
|
|
33
|
-
'#95e1d3'
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
children: "Custom Confetti Button"
|
|
37
|
-
})
|
|
38
|
-
})
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
//# sourceMappingURL=confetti.stories.js.map
|