@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.
Files changed (56) hide show
  1. package/dist/components/dot-grid/dot-grid.js +8 -2
  2. package/dist/components/index.d.ts +1 -0
  3. package/dist/components/index.js +1 -0
  4. package/dist/components/slider/index.d.ts +2 -0
  5. package/dist/components/slider/index.js +3 -0
  6. package/dist/components/slider/slider.d.ts +10 -0
  7. package/dist/components/slider/slider.js +38 -0
  8. package/dist/components/table/data-table.js +7 -6
  9. package/dist/components/table/table.stories.data.js +1 -1
  10. package/dist/styles.css +1 -1
  11. package/package.json +17 -5
  12. package/dist/colors.stories.js +0 -61
  13. package/dist/components/alert/alert.stories.js +0 -227
  14. package/dist/components/avatar/avatar.stories.js +0 -267
  15. package/dist/components/badge/badge.stories.js +0 -802
  16. package/dist/components/button/button-link.stories.js +0 -127
  17. package/dist/components/button/button.stories.js +0 -187
  18. package/dist/components/button/icon-button.stories.js +0 -344
  19. package/dist/components/button-group/button-group.stories.js +0 -644
  20. package/dist/components/card/card.stories.js +0 -216
  21. package/dist/components/checkbox/checkbox.stories.js +0 -566
  22. package/dist/components/code-block/code-block.stories.js +0 -341
  23. package/dist/components/combobox/combobox.stories.js +0 -191
  24. package/dist/components/command/command.stories.js +0 -228
  25. package/dist/components/confetti/confetti.stories.js +0 -41
  26. package/dist/components/count-up/count-up.stories.js +0 -568
  27. package/dist/components/dashboard/components/charts/bar-chart.stories.js +0 -287
  28. package/dist/components/dashboard/components/charts/line-chart.stories.js +0 -257
  29. package/dist/components/dashboard/dashboard.stories.js +0 -23
  30. package/dist/components/date-picker/date-picker.stories.js +0 -349
  31. package/dist/components/dropdown-input/dropdown-input.stories.js +0 -240
  32. package/dist/components/dropdown-menu/dropdown-menu.stories.js +0 -462
  33. package/dist/components/dynamic-item/dynamic-item.stories.js +0 -385
  34. package/dist/components/empty-state/empty-state.stories.js +0 -74
  35. package/dist/components/form/form.stories.js +0 -587
  36. package/dist/components/icon/icon.stories.js +0 -38
  37. package/dist/components/inline-tips/inline-tips.stories.js +0 -219
  38. package/dist/components/input/input.stories.js +0 -265
  39. package/dist/components/interval-selector/interval-selector.stories.js +0 -232
  40. package/dist/components/item/item.stories.js +0 -239
  41. package/dist/components/kbd/kbd.stories.js +0 -119
  42. package/dist/components/label/label.stories.js +0 -105
  43. package/dist/components/modal/modal.stories.js +0 -566
  44. package/dist/components/search/search.stories.js +0 -630
  45. package/dist/components/select/select.stories.js +0 -393
  46. package/dist/components/sheet/sheet.stories.js +0 -368
  47. package/dist/components/skeleton/skeleton.stories.js +0 -345
  48. package/dist/components/table/table.stories.js +0 -302
  49. package/dist/components/tabs/tabs.stories.js +0 -179
  50. package/dist/components/textarea/textarea.stories.js +0 -339
  51. package/dist/components/toast/toast.stories.js +0 -326
  52. package/dist/components/tooltip/tooltip.stories.js +0 -560
  53. package/dist/components/typography/code.stories.js +0 -54
  54. package/dist/components/typography/header.stories.js +0 -34
  55. package/dist/components/typography/text.stories.js +0 -105
  56. package/dist/onboarding/sign-in.stories.js +0 -101
@@ -1,127 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ButtonLink } from './button-link.js';
3
- const meta = {
4
- title: 'Components/Button/ButtonLink',
5
- component: ButtonLink,
6
- tags: [
7
- 'autodocs'
8
- ],
9
- argTypes: {
10
- variant: {
11
- control: 'select',
12
- options: [
13
- 'base',
14
- 'interactive',
15
- 'muted',
16
- 'subtle'
17
- ]
18
- },
19
- size: {
20
- control: 'select',
21
- options: [
22
- 'xs',
23
- 'sm',
24
- 'md',
25
- 'xl'
26
- ]
27
- },
28
- underline: {
29
- control: 'boolean'
30
- },
31
- asChild: {
32
- control: 'boolean'
33
- }
34
- },
35
- args: {
36
- children: 'Label',
37
- variant: 'base',
38
- size: 'sm',
39
- underline: false,
40
- href: '#'
41
- }
42
- };
43
- export default meta;
44
- export const Default = {};
45
- export const Variants = {
46
- render: (args)=>/*#__PURE__*/ _jsxs("div", {
47
- className: "flex gap-16 items-center",
48
- children: [
49
- /*#__PURE__*/ _jsx(ButtonLink, {
50
- ...args,
51
- variant: "base",
52
- children: "Base"
53
- }),
54
- /*#__PURE__*/ _jsx(ButtonLink, {
55
- ...args,
56
- variant: "interactive",
57
- children: "Interactive"
58
- }),
59
- /*#__PURE__*/ _jsx(ButtonLink, {
60
- ...args,
61
- variant: "muted",
62
- children: "Muted"
63
- }),
64
- /*#__PURE__*/ _jsx(ButtonLink, {
65
- ...args,
66
- variant: "subtle",
67
- children: "Subtle"
68
- })
69
- ]
70
- })
71
- };
72
- export const WithUnderline = {
73
- render: (args)=>/*#__PURE__*/ _jsxs("div", {
74
- className: "flex gap-16 items-center",
75
- children: [
76
- /*#__PURE__*/ _jsx(ButtonLink, {
77
- ...args,
78
- variant: "base",
79
- underline: true,
80
- children: "Base"
81
- }),
82
- /*#__PURE__*/ _jsx(ButtonLink, {
83
- ...args,
84
- variant: "interactive",
85
- underline: true,
86
- children: "Interactive"
87
- }),
88
- /*#__PURE__*/ _jsx(ButtonLink, {
89
- ...args,
90
- variant: "muted",
91
- underline: true,
92
- children: "Muted"
93
- }),
94
- /*#__PURE__*/ _jsx(ButtonLink, {
95
- ...args,
96
- variant: "subtle",
97
- underline: true,
98
- children: "Subtle"
99
- })
100
- ]
101
- })
102
- };
103
- export const WithIcons = {
104
- render: (args)=>/*#__PURE__*/ _jsxs("div", {
105
- className: "flex gap-16 items-center",
106
- children: [
107
- /*#__PURE__*/ _jsx(ButtonLink, {
108
- ...args,
109
- iconLeft: "addLine",
110
- children: "Icon Left"
111
- }),
112
- /*#__PURE__*/ _jsx(ButtonLink, {
113
- ...args,
114
- iconRight: "chevronRight",
115
- children: "Icon Right"
116
- }),
117
- /*#__PURE__*/ _jsx(ButtonLink, {
118
- ...args,
119
- iconLeft: "addLine",
120
- iconRight: "chevronRight",
121
- children: "Both Icons"
122
- })
123
- ]
124
- })
125
- };
126
-
127
- //# sourceMappingURL=button-link.stories.js.map
@@ -1,187 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Code } from '../../components/typography/index.js';
3
- import { Button } from './button.js';
4
- const variantOptions = [
5
- 'primary',
6
- 'secondary',
7
- 'danger',
8
- 'success',
9
- 'transparent',
10
- 'transparentMuted'
11
- ];
12
- const sizeOptions = [
13
- '2xs',
14
- 'xs',
15
- 'sm',
16
- 'md',
17
- 'lg',
18
- 'xl'
19
- ];
20
- const meta = {
21
- title: 'Components/Button',
22
- component: Button,
23
- tags: [
24
- 'autodocs'
25
- ],
26
- argTypes: {
27
- variant: {
28
- control: 'select',
29
- options: variantOptions
30
- },
31
- size: {
32
- control: 'select',
33
- options: sizeOptions
34
- },
35
- asChild: {
36
- control: 'boolean'
37
- },
38
- isLoading: {
39
- control: 'boolean'
40
- }
41
- },
42
- args: {
43
- children: 'Click me',
44
- variant: 'primary',
45
- size: 'md'
46
- }
47
- };
48
- export default meta;
49
- export const Default = {};
50
- export const Variants = {
51
- render: (args)=>/*#__PURE__*/ _jsx("div", {
52
- className: "flex flex-col gap-32",
53
- children: sizeOptions.map((size)=>/*#__PURE__*/ _jsxs("table", {
54
- className: "w-fit border-separate border-spacing-x-32 border-spacing-y-16",
55
- children: [
56
- /*#__PURE__*/ _jsx("thead", {
57
- children: /*#__PURE__*/ _jsxs("tr", {
58
- children: [
59
- /*#__PURE__*/ _jsx("th", {
60
- children: size
61
- }),
62
- /*#__PURE__*/ _jsx("th", {
63
- children: "Default"
64
- }),
65
- /*#__PURE__*/ _jsx("th", {
66
- children: "Hover"
67
- }),
68
- /*#__PURE__*/ _jsx("th", {
69
- children: "Focus"
70
- }),
71
- /*#__PURE__*/ _jsx("th", {
72
- children: "Disabled"
73
- })
74
- ]
75
- })
76
- }),
77
- /*#__PURE__*/ _jsx("tbody", {
78
- children: variantOptions.map((variant)=>/*#__PURE__*/ _jsxs("tr", {
79
- children: [
80
- /*#__PURE__*/ _jsx("td", {
81
- children: /*#__PURE__*/ _jsx(Code, {
82
- variant: "label",
83
- className: "text-foreground-neutral-subtle",
84
- children: variant
85
- })
86
- }),
87
- /*#__PURE__*/ _jsx("td", {
88
- children: /*#__PURE__*/ _jsx(Button, {
89
- ...args,
90
- variant: variant,
91
- size: size,
92
- children: "Click me"
93
- })
94
- }),
95
- /*#__PURE__*/ _jsx("td", {
96
- children: /*#__PURE__*/ _jsx(Button, {
97
- ...args,
98
- variant: variant,
99
- className: "hover",
100
- size: size,
101
- children: "Click me"
102
- })
103
- }),
104
- /*#__PURE__*/ _jsx("td", {
105
- children: /*#__PURE__*/ _jsx(Button, {
106
- ...args,
107
- variant: variant,
108
- className: "focus",
109
- size: size,
110
- children: "Click me"
111
- })
112
- }),
113
- /*#__PURE__*/ _jsx("td", {
114
- children: /*#__PURE__*/ _jsx(Button, {
115
- ...args,
116
- variant: variant,
117
- disabled: true,
118
- size: size,
119
- children: "Click me"
120
- })
121
- })
122
- ]
123
- }, variant))
124
- })
125
- ]
126
- }, size))
127
- })
128
- };
129
- Variants.parameters = {
130
- pseudo: {
131
- hover: '.hover',
132
- focusVisible: '.focus'
133
- }
134
- };
135
- export const Icons = {
136
- render: (args)=>/*#__PURE__*/ _jsxs("div", {
137
- className: "flex flex-col gap-16",
138
- children: [
139
- /*#__PURE__*/ _jsx("div", {
140
- children: /*#__PURE__*/ _jsx(Button, {
141
- ...args,
142
- iconLeft: "google",
143
- children: "Click me"
144
- })
145
- }),
146
- /*#__PURE__*/ _jsx("div", {
147
- children: /*#__PURE__*/ _jsx(Button, {
148
- ...args,
149
- iconRight: "microsoft",
150
- children: "Click me"
151
- })
152
- }),
153
- /*#__PURE__*/ _jsx("div", {
154
- children: /*#__PURE__*/ _jsx(Button, {
155
- ...args,
156
- iconLeft: "google",
157
- iconRight: "microsoft",
158
- children: "Click me"
159
- })
160
- })
161
- ]
162
- })
163
- };
164
- export const Loading = {
165
- render: (args)=>/*#__PURE__*/ _jsxs("div", {
166
- className: "flex flex-col gap-16",
167
- children: [
168
- /*#__PURE__*/ _jsx("div", {
169
- children: /*#__PURE__*/ _jsx(Button, {
170
- ...args,
171
- isLoading: true,
172
- children: "Loading..."
173
- })
174
- }),
175
- /*#__PURE__*/ _jsx("div", {
176
- children: /*#__PURE__*/ _jsx(Button, {
177
- ...args,
178
- isLoading: true,
179
- iconLeft: "google",
180
- children: "Loading with left icon"
181
- })
182
- })
183
- ]
184
- })
185
- };
186
-
187
- //# sourceMappingURL=button.stories.js.map
@@ -1,344 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { createElement as _createElement } from "react";
3
- import { Code } from '../../components/typography/index.js';
4
- import { IconButton } from './icon-button.js';
5
- const variantOptions = [
6
- 'primary',
7
- 'transparent'
8
- ];
9
- const sizeOptions = [
10
- '2xs',
11
- 'xs',
12
- 'sm',
13
- 'md',
14
- 'lg',
15
- 'xl'
16
- ];
17
- const radiusOptions = [
18
- 'rounded',
19
- 'full'
20
- ];
21
- const meta = {
22
- title: 'Components/Button/IconButton',
23
- component: IconButton,
24
- tags: [
25
- 'autodocs'
26
- ],
27
- argTypes: {
28
- variant: {
29
- control: 'select',
30
- options: variantOptions
31
- },
32
- size: {
33
- control: 'select',
34
- options: sizeOptions
35
- },
36
- radius: {
37
- control: 'select',
38
- options: radiusOptions
39
- },
40
- muted: {
41
- control: 'boolean'
42
- },
43
- asChild: {
44
- control: 'boolean'
45
- }
46
- },
47
- args: {
48
- icon: 'addLine',
49
- variant: 'primary',
50
- size: 'md',
51
- radius: 'rounded',
52
- muted: false
53
- }
54
- };
55
- export default meta;
56
- export const Default = {};
57
- export const Variants = {
58
- render: (args)=>/*#__PURE__*/ _jsx("div", {
59
- className: "flex flex-col gap-32",
60
- children: sizeOptions.map((size)=>/*#__PURE__*/ _jsxs("div", {
61
- className: "flex flex-col gap-16",
62
- children: [
63
- /*#__PURE__*/ _jsxs(Code, {
64
- variant: "label",
65
- className: "text-foreground-neutral-subtle",
66
- children: [
67
- "Size: ",
68
- size
69
- ]
70
- }),
71
- radiusOptions.map((radius)=>/*#__PURE__*/ _jsxs("table", {
72
- className: "w-fit border-separate border-spacing-x-32 border-spacing-y-16",
73
- children: [
74
- /*#__PURE__*/ _jsx("thead", {
75
- children: /*#__PURE__*/ _jsxs("tr", {
76
- children: [
77
- /*#__PURE__*/ _jsx("th", {
78
- children: radius
79
- }),
80
- /*#__PURE__*/ _jsx("th", {
81
- children: "Default"
82
- }),
83
- /*#__PURE__*/ _jsx("th", {
84
- children: "Hover"
85
- }),
86
- /*#__PURE__*/ _jsx("th", {
87
- children: "Focus"
88
- }),
89
- /*#__PURE__*/ _jsx("th", {
90
- children: "Disabled"
91
- })
92
- ]
93
- })
94
- }),
95
- /*#__PURE__*/ _jsx("tbody", {
96
- children: variantOptions.map((variant)=>/*#__PURE__*/ _jsxs("tr", {
97
- children: [
98
- /*#__PURE__*/ _jsx("td", {
99
- children: /*#__PURE__*/ _jsx(Code, {
100
- variant: "label",
101
- className: "text-foreground-neutral-subtle",
102
- children: variant
103
- })
104
- }),
105
- /*#__PURE__*/ _jsx("td", {
106
- children: /*#__PURE__*/ _jsx(IconButton, {
107
- ...args,
108
- icon: "addLine",
109
- "aria-label": "Add",
110
- variant: variant,
111
- size: size,
112
- radius: radius
113
- })
114
- }),
115
- /*#__PURE__*/ _jsx("td", {
116
- children: /*#__PURE__*/ _jsx(IconButton, {
117
- ...args,
118
- icon: "addLine",
119
- "aria-label": "Add",
120
- variant: variant,
121
- className: "hover",
122
- size: size,
123
- radius: radius
124
- })
125
- }),
126
- /*#__PURE__*/ _jsx("td", {
127
- children: /*#__PURE__*/ _jsx(IconButton, {
128
- ...args,
129
- icon: "addLine",
130
- "aria-label": "Add",
131
- variant: variant,
132
- className: "focus",
133
- size: size,
134
- radius: radius
135
- })
136
- }),
137
- /*#__PURE__*/ _jsx("td", {
138
- children: /*#__PURE__*/ _jsx(IconButton, {
139
- ...args,
140
- icon: "addLine",
141
- "aria-label": "Add",
142
- variant: variant,
143
- disabled: true,
144
- size: size,
145
- radius: radius
146
- })
147
- })
148
- ]
149
- }, variant))
150
- })
151
- ]
152
- }, radius))
153
- ]
154
- }, size))
155
- })
156
- };
157
- Variants.parameters = {
158
- pseudo: {
159
- hover: '.hover',
160
- focusVisible: '.focus'
161
- }
162
- };
163
- export const Muted = {
164
- render: (args)=>/*#__PURE__*/ _jsxs("div", {
165
- className: "flex flex-col gap-16",
166
- children: [
167
- /*#__PURE__*/ _jsxs("div", {
168
- className: "flex gap-16 items-center",
169
- children: [
170
- /*#__PURE__*/ _jsx(Code, {
171
- variant: "label",
172
- children: "Normal:"
173
- }),
174
- /*#__PURE__*/ _jsx(IconButton, {
175
- ...args,
176
- icon: "addLine",
177
- "aria-label": "Add"
178
- }),
179
- /*#__PURE__*/ _jsx(IconButton, {
180
- ...args,
181
- icon: "addLine",
182
- "aria-label": "Add",
183
- variant: "transparent"
184
- })
185
- ]
186
- }),
187
- /*#__PURE__*/ _jsxs("div", {
188
- className: "flex gap-16 items-center",
189
- children: [
190
- /*#__PURE__*/ _jsx(Code, {
191
- variant: "label",
192
- children: "Muted:"
193
- }),
194
- /*#__PURE__*/ _jsx(IconButton, {
195
- ...args,
196
- icon: "addLine",
197
- "aria-label": "Add",
198
- muted: true
199
- }),
200
- /*#__PURE__*/ _jsx(IconButton, {
201
- ...args,
202
- icon: "addLine",
203
- "aria-label": "Add",
204
- variant: "transparent",
205
- muted: true
206
- })
207
- ]
208
- })
209
- ]
210
- })
211
- };
212
- export const Sizes = {
213
- render: ({ children: _children, ...args })=>/*#__PURE__*/ _jsxs("div", {
214
- className: "flex flex-col gap-16",
215
- children: [
216
- /*#__PURE__*/ _jsxs("div", {
217
- className: "flex gap-16 items-center",
218
- children: [
219
- /*#__PURE__*/ _jsx(Code, {
220
- variant: "label",
221
- children: "Rounded:"
222
- }),
223
- sizeOptions.map((size)=>/*#__PURE__*/ _createElement(IconButton, {
224
- ...args,
225
- key: size,
226
- icon: "addLine",
227
- "aria-label": "Add",
228
- size: size,
229
- radius: "rounded"
230
- }))
231
- ]
232
- }),
233
- /*#__PURE__*/ _jsxs("div", {
234
- className: "flex gap-16 items-center",
235
- children: [
236
- /*#__PURE__*/ _jsx(Code, {
237
- variant: "label",
238
- children: "Full:"
239
- }),
240
- sizeOptions.map((size)=>/*#__PURE__*/ _createElement(IconButton, {
241
- ...args,
242
- key: size,
243
- icon: "addLine",
244
- "aria-label": "Add",
245
- size: size,
246
- radius: "full"
247
- }))
248
- ]
249
- })
250
- ]
251
- })
252
- };
253
- export const Loading = {
254
- render: ({ children: _children, ...args })=>/*#__PURE__*/ _jsxs("div", {
255
- className: "flex flex-col gap-32",
256
- children: [
257
- /*#__PURE__*/ _jsxs("div", {
258
- className: "flex flex-col gap-16",
259
- children: [
260
- /*#__PURE__*/ _jsx(Code, {
261
- variant: "label",
262
- children: "Loading by Size:"
263
- }),
264
- /*#__PURE__*/ _jsx("div", {
265
- className: "flex gap-16 items-center",
266
- children: sizeOptions.map((size)=>/*#__PURE__*/ _jsxs("div", {
267
- className: "flex flex-col gap-8 items-center",
268
- children: [
269
- /*#__PURE__*/ _jsx(Code, {
270
- variant: "label",
271
- className: "text-foreground-neutral-subtle text-xs",
272
- children: size
273
- }),
274
- /*#__PURE__*/ _jsx(IconButton, {
275
- ...args,
276
- icon: "addLine",
277
- "aria-label": "Loading",
278
- size: size,
279
- isLoading: true
280
- })
281
- ]
282
- }, size))
283
- })
284
- ]
285
- }),
286
- /*#__PURE__*/ _jsxs("div", {
287
- className: "flex flex-col gap-16",
288
- children: [
289
- /*#__PURE__*/ _jsx(Code, {
290
- variant: "label",
291
- children: "Loading by Variant:"
292
- }),
293
- /*#__PURE__*/ _jsx("div", {
294
- className: "flex gap-16 items-center",
295
- children: variantOptions.map((variant)=>/*#__PURE__*/ _jsxs("div", {
296
- className: "flex flex-col gap-8 items-center",
297
- children: [
298
- /*#__PURE__*/ _jsx(Code, {
299
- variant: "label",
300
- className: "text-foreground-neutral-subtle text-xs",
301
- children: variant
302
- }),
303
- /*#__PURE__*/ _jsx(IconButton, {
304
- ...args,
305
- icon: "addLine",
306
- "aria-label": "Loading",
307
- variant: variant,
308
- isLoading: true
309
- })
310
- ]
311
- }, variant))
312
- })
313
- ]
314
- }),
315
- /*#__PURE__*/ _jsxs("div", {
316
- className: "flex flex-col gap-16",
317
- children: [
318
- /*#__PURE__*/ _jsx(Code, {
319
- variant: "label",
320
- children: "Normal vs Loading:"
321
- }),
322
- /*#__PURE__*/ _jsxs("div", {
323
- className: "flex gap-16 items-center",
324
- children: [
325
- /*#__PURE__*/ _jsx(IconButton, {
326
- ...args,
327
- icon: "addLine",
328
- "aria-label": "Add"
329
- }),
330
- /*#__PURE__*/ _jsx(IconButton, {
331
- ...args,
332
- icon: "addLine",
333
- "aria-label": "Loading",
334
- isLoading: true
335
- })
336
- ]
337
- })
338
- ]
339
- })
340
- ]
341
- })
342
- };
343
-
344
- //# sourceMappingURL=icon-button.stories.js.map