@shipfox/react-ui 0.25.0 → 0.26.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 (53) hide show
  1. package/dist/components/index.d.ts +1 -0
  2. package/dist/components/index.js +1 -0
  3. package/dist/components/slider/index.d.ts +2 -0
  4. package/dist/components/slider/index.js +3 -0
  5. package/dist/components/slider/slider.d.ts +10 -0
  6. package/dist/components/slider/slider.js +38 -0
  7. package/dist/styles.css +1 -1
  8. package/package.json +4 -4
  9. package/dist/colors.stories.js +0 -61
  10. package/dist/components/alert/alert.stories.js +0 -227
  11. package/dist/components/avatar/avatar.stories.js +0 -267
  12. package/dist/components/badge/badge.stories.js +0 -802
  13. package/dist/components/button/button-link.stories.js +0 -127
  14. package/dist/components/button/button.stories.js +0 -187
  15. package/dist/components/button/icon-button.stories.js +0 -344
  16. package/dist/components/button-group/button-group.stories.js +0 -644
  17. package/dist/components/card/card.stories.js +0 -216
  18. package/dist/components/checkbox/checkbox.stories.js +0 -566
  19. package/dist/components/code-block/code-block.stories.js +0 -341
  20. package/dist/components/combobox/combobox.stories.js +0 -191
  21. package/dist/components/command/command.stories.js +0 -228
  22. package/dist/components/confetti/confetti.stories.js +0 -41
  23. package/dist/components/count-up/count-up.stories.js +0 -568
  24. package/dist/components/dashboard/components/charts/bar-chart.stories.js +0 -287
  25. package/dist/components/dashboard/components/charts/line-chart.stories.js +0 -257
  26. package/dist/components/dashboard/dashboard.stories.js +0 -23
  27. package/dist/components/date-picker/date-picker.stories.js +0 -349
  28. package/dist/components/dropdown-input/dropdown-input.stories.js +0 -240
  29. package/dist/components/dropdown-menu/dropdown-menu.stories.js +0 -462
  30. package/dist/components/dynamic-item/dynamic-item.stories.js +0 -385
  31. package/dist/components/empty-state/empty-state.stories.js +0 -74
  32. package/dist/components/form/form.stories.js +0 -587
  33. package/dist/components/icon/icon.stories.js +0 -38
  34. package/dist/components/inline-tips/inline-tips.stories.js +0 -219
  35. package/dist/components/input/input.stories.js +0 -265
  36. package/dist/components/interval-selector/interval-selector.stories.js +0 -232
  37. package/dist/components/item/item.stories.js +0 -239
  38. package/dist/components/kbd/kbd.stories.js +0 -119
  39. package/dist/components/label/label.stories.js +0 -105
  40. package/dist/components/modal/modal.stories.js +0 -566
  41. package/dist/components/search/search.stories.js +0 -630
  42. package/dist/components/select/select.stories.js +0 -393
  43. package/dist/components/sheet/sheet.stories.js +0 -368
  44. package/dist/components/skeleton/skeleton.stories.js +0 -345
  45. package/dist/components/table/table.stories.js +0 -302
  46. package/dist/components/tabs/tabs.stories.js +0 -179
  47. package/dist/components/textarea/textarea.stories.js +0 -339
  48. package/dist/components/toast/toast.stories.js +0 -326
  49. package/dist/components/tooltip/tooltip.stories.js +0 -560
  50. package/dist/components/typography/code.stories.js +0 -54
  51. package/dist/components/typography/header.stories.js +0 -34
  52. package/dist/components/typography/text.stories.js +0 -105
  53. package/dist/onboarding/sign-in.stories.js +0 -101
@@ -1,179 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from 'react';
3
- import { Tabs, TabsContent, TabsContents, TabsList, TabsTrigger } from './index.js';
4
- const meta = {
5
- title: 'Components/Tabs',
6
- component: Tabs,
7
- parameters: {
8
- layout: 'centered'
9
- },
10
- tags: [
11
- 'autodocs'
12
- ]
13
- };
14
- export default meta;
15
- export const Default = {
16
- args: {
17
- defaultValue: 'analytics'
18
- },
19
- render: ()=>/*#__PURE__*/ _jsx("div", {
20
- className: "bg-background-neutral-background p-24 w-[80vw]",
21
- children: /*#__PURE__*/ _jsx(Tabs, {
22
- defaultValue: "analytics",
23
- children: /*#__PURE__*/ _jsxs(TabsList, {
24
- className: "gap-12 border-b border-neutral-strong",
25
- children: [
26
- /*#__PURE__*/ _jsx(TabsTrigger, {
27
- value: "analytics",
28
- children: "Analytics"
29
- }),
30
- /*#__PURE__*/ _jsx(TabsTrigger, {
31
- value: "jobs",
32
- children: "Jobs"
33
- })
34
- ]
35
- })
36
- })
37
- })
38
- };
39
- export const Controlled = {
40
- args: {
41
- value: 'analytics',
42
- onValueChange: ()=>undefined
43
- },
44
- render: ()=>{
45
- const [value, setValue] = useState('analytics');
46
- return /*#__PURE__*/ _jsx("div", {
47
- className: "bg-background-neutral-background p-24 w-[80vw]",
48
- children: /*#__PURE__*/ _jsxs(Tabs, {
49
- value: value,
50
- onValueChange: setValue,
51
- children: [
52
- /*#__PURE__*/ _jsxs(TabsList, {
53
- className: "gap-12 border-b border-neutral-strong",
54
- children: [
55
- /*#__PURE__*/ _jsx(TabsTrigger, {
56
- value: "analytics",
57
- children: "Analytics"
58
- }),
59
- /*#__PURE__*/ _jsx(TabsTrigger, {
60
- value: "jobs",
61
- children: "Jobs"
62
- })
63
- ]
64
- }),
65
- /*#__PURE__*/ _jsxs(TabsContents, {
66
- children: [
67
- /*#__PURE__*/ _jsx(TabsContent, {
68
- value: "analytics",
69
- children: /*#__PURE__*/ _jsx("div", {
70
- className: "py-16",
71
- children: /*#__PURE__*/ _jsxs("p", {
72
- className: "text-foreground-neutral-base",
73
- children: [
74
- "Analytics content - Current value: ",
75
- value
76
- ]
77
- })
78
- })
79
- }),
80
- /*#__PURE__*/ _jsx(TabsContent, {
81
- value: "jobs",
82
- children: /*#__PURE__*/ _jsx("div", {
83
- className: "py-16",
84
- children: /*#__PURE__*/ _jsxs("p", {
85
- className: "text-foreground-neutral-base",
86
- children: [
87
- "Jobs content - Current value: ",
88
- value
89
- ]
90
- })
91
- })
92
- })
93
- ]
94
- })
95
- ]
96
- })
97
- });
98
- }
99
- };
100
- export const MultipleTabs = {
101
- args: {
102
- defaultValue: 'tab1'
103
- },
104
- render: ()=>/*#__PURE__*/ _jsx("div", {
105
- className: "bg-background-neutral-background p-24 w-[80vw]",
106
- children: /*#__PURE__*/ _jsxs(Tabs, {
107
- defaultValue: "tab1",
108
- children: [
109
- /*#__PURE__*/ _jsxs(TabsList, {
110
- className: "gap-12 border-b border-neutral-strong",
111
- children: [
112
- /*#__PURE__*/ _jsx(TabsTrigger, {
113
- value: "tab1",
114
- children: "Tab 1"
115
- }),
116
- /*#__PURE__*/ _jsx(TabsTrigger, {
117
- value: "tab2",
118
- children: "Tab 2"
119
- }),
120
- /*#__PURE__*/ _jsx(TabsTrigger, {
121
- value: "tab3",
122
- children: "Tab 3"
123
- }),
124
- /*#__PURE__*/ _jsx(TabsTrigger, {
125
- value: "tab4",
126
- children: "Tab 4"
127
- })
128
- ]
129
- }),
130
- /*#__PURE__*/ _jsxs(TabsContents, {
131
- children: [
132
- /*#__PURE__*/ _jsx(TabsContent, {
133
- value: "tab1",
134
- children: /*#__PURE__*/ _jsx("div", {
135
- className: "py-16",
136
- children: /*#__PURE__*/ _jsx("p", {
137
- className: "text-foreground-neutral-base",
138
- children: "Content for Tab 1"
139
- })
140
- })
141
- }),
142
- /*#__PURE__*/ _jsx(TabsContent, {
143
- value: "tab2",
144
- children: /*#__PURE__*/ _jsx("div", {
145
- className: "py-16",
146
- children: /*#__PURE__*/ _jsx("p", {
147
- className: "text-foreground-neutral-base",
148
- children: "Content for Tab 2"
149
- })
150
- })
151
- }),
152
- /*#__PURE__*/ _jsx(TabsContent, {
153
- value: "tab3",
154
- children: /*#__PURE__*/ _jsx("div", {
155
- className: "py-16",
156
- children: /*#__PURE__*/ _jsx("p", {
157
- className: "text-foreground-neutral-base",
158
- children: "Content for Tab 3"
159
- })
160
- })
161
- }),
162
- /*#__PURE__*/ _jsx(TabsContent, {
163
- value: "tab4",
164
- children: /*#__PURE__*/ _jsx("div", {
165
- className: "py-16",
166
- children: /*#__PURE__*/ _jsx("p", {
167
- className: "text-foreground-neutral-base",
168
- children: "Content for Tab 4"
169
- })
170
- })
171
- })
172
- ]
173
- })
174
- ]
175
- })
176
- })
177
- };
178
-
179
- //# sourceMappingURL=tabs.stories.js.map
@@ -1,339 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { argosScreenshot } from '@argos-ci/storybook/vitest';
3
- import { Code, Header } from '../../components/typography/index.js';
4
- import { Textarea } from './textarea.js';
5
- const meta = {
6
- title: 'Components/Textarea',
7
- component: Textarea,
8
- tags: [
9
- 'autodocs'
10
- ],
11
- argTypes: {
12
- placeholder: {
13
- control: 'text'
14
- },
15
- disabled: {
16
- control: 'boolean'
17
- },
18
- 'aria-invalid': {
19
- control: 'boolean'
20
- },
21
- rows: {
22
- control: 'number'
23
- },
24
- cols: {
25
- control: 'number'
26
- }
27
- },
28
- args: {
29
- placeholder: 'Type something…',
30
- disabled: false,
31
- 'aria-invalid': false,
32
- rows: 4
33
- }
34
- };
35
- export default meta;
36
- export const Default = {
37
- play: async (ctx)=>{
38
- await new Promise((resolve)=>setTimeout(resolve, 100));
39
- await argosScreenshot(ctx, 'Textarea Default');
40
- }
41
- };
42
- const variants = [
43
- 'base',
44
- 'component'
45
- ];
46
- const sizes = [
47
- 'base',
48
- 'small'
49
- ];
50
- export const States = {
51
- render: (args)=>/*#__PURE__*/ _jsx("div", {
52
- className: "flex flex-col gap-32",
53
- children: variants.map((variant)=>sizes.map((size)=>/*#__PURE__*/ _jsxs("div", {
54
- className: "flex flex-col gap-16",
55
- children: [
56
- /*#__PURE__*/ _jsxs(Header, {
57
- variant: "h3",
58
- children: [
59
- variant,
60
- " ",
61
- size
62
- ]
63
- }),
64
- /*#__PURE__*/ _jsxs("div", {
65
- className: "flex flex-col gap-8",
66
- children: [
67
- /*#__PURE__*/ _jsx(Code, {
68
- variant: "label",
69
- className: "text-foreground-neutral-subtle",
70
- children: "Default"
71
- }),
72
- /*#__PURE__*/ _jsx(Textarea, {
73
- ...args,
74
- variant: variant,
75
- size: size
76
- })
77
- ]
78
- }),
79
- /*#__PURE__*/ _jsxs("div", {
80
- className: "flex flex-col gap-8",
81
- children: [
82
- /*#__PURE__*/ _jsx(Code, {
83
- variant: "label",
84
- className: "text-foreground-neutral-subtle",
85
- children: "Hover"
86
- }),
87
- /*#__PURE__*/ _jsx(Textarea, {
88
- ...args,
89
- className: "hover",
90
- variant: variant,
91
- size: size
92
- })
93
- ]
94
- }),
95
- /*#__PURE__*/ _jsxs("div", {
96
- className: "flex flex-col gap-8",
97
- children: [
98
- /*#__PURE__*/ _jsx(Code, {
99
- variant: "label",
100
- className: "text-foreground-neutral-subtle",
101
- children: "Active"
102
- }),
103
- /*#__PURE__*/ _jsx(Textarea, {
104
- ...args,
105
- className: "active",
106
- defaultValue: "The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.",
107
- variant: variant,
108
- size: size
109
- })
110
- ]
111
- }),
112
- /*#__PURE__*/ _jsxs("div", {
113
- className: "flex flex-col gap-8",
114
- children: [
115
- /*#__PURE__*/ _jsx(Code, {
116
- variant: "label",
117
- className: "text-foreground-neutral-subtle",
118
- children: "Focus"
119
- }),
120
- /*#__PURE__*/ _jsx(Textarea, {
121
- ...args,
122
- className: "focus",
123
- variant: variant,
124
- size: size
125
- })
126
- ]
127
- }),
128
- /*#__PURE__*/ _jsxs("div", {
129
- className: "flex flex-col gap-8",
130
- children: [
131
- /*#__PURE__*/ _jsx(Code, {
132
- variant: "label",
133
- className: "text-foreground-neutral-subtle",
134
- children: "Disabled"
135
- }),
136
- /*#__PURE__*/ _jsx(Textarea, {
137
- ...args,
138
- disabled: true,
139
- variant: variant,
140
- size: size
141
- })
142
- ]
143
- }),
144
- /*#__PURE__*/ _jsxs("div", {
145
- className: "flex flex-col gap-8",
146
- children: [
147
- /*#__PURE__*/ _jsx(Code, {
148
- variant: "label",
149
- className: "text-foreground-neutral-subtle",
150
- children: "Invalid"
151
- }),
152
- /*#__PURE__*/ _jsx(Textarea, {
153
- ...args,
154
- "aria-invalid": true,
155
- variant: variant,
156
- size: size
157
- })
158
- ]
159
- })
160
- ]
161
- }, variant + size)))
162
- })
163
- };
164
- States.parameters = {
165
- pseudo: {
166
- hover: '.hover',
167
- active: '.active',
168
- focusVisible: '.focus'
169
- }
170
- };
171
- export const Sizes = {
172
- render: (args)=>/*#__PURE__*/ _jsxs("div", {
173
- className: "flex flex-col gap-32",
174
- children: [
175
- /*#__PURE__*/ _jsxs("div", {
176
- className: "flex flex-col gap-8",
177
- children: [
178
- /*#__PURE__*/ _jsx(Code, {
179
- variant: "label",
180
- className: "text-foreground-neutral-subtle",
181
- children: "Rows: 2"
182
- }),
183
- /*#__PURE__*/ _jsx(Textarea, {
184
- ...args,
185
- rows: 2
186
- })
187
- ]
188
- }),
189
- /*#__PURE__*/ _jsxs("div", {
190
- className: "flex flex-col gap-8",
191
- children: [
192
- /*#__PURE__*/ _jsx(Code, {
193
- variant: "label",
194
- className: "text-foreground-neutral-subtle",
195
- children: "Rows: 4 (default)"
196
- }),
197
- /*#__PURE__*/ _jsx(Textarea, {
198
- ...args,
199
- rows: 4
200
- })
201
- ]
202
- }),
203
- /*#__PURE__*/ _jsxs("div", {
204
- className: "flex flex-col gap-8",
205
- children: [
206
- /*#__PURE__*/ _jsx(Code, {
207
- variant: "label",
208
- className: "text-foreground-neutral-subtle",
209
- children: "Rows: 6"
210
- }),
211
- /*#__PURE__*/ _jsx(Textarea, {
212
- ...args,
213
- rows: 6
214
- })
215
- ]
216
- }),
217
- /*#__PURE__*/ _jsxs("div", {
218
- className: "flex flex-col gap-8",
219
- children: [
220
- /*#__PURE__*/ _jsx(Code, {
221
- variant: "label",
222
- className: "text-foreground-neutral-subtle",
223
- children: "Rows: 10"
224
- }),
225
- /*#__PURE__*/ _jsx(Textarea, {
226
- ...args,
227
- rows: 10
228
- })
229
- ]
230
- })
231
- ]
232
- })
233
- };
234
- export const DesignMock = {
235
- render: ()=>{
236
- const variants = [
237
- {
238
- key: 'base',
239
- label: 'Primary'
240
- },
241
- {
242
- key: 'component',
243
- label: 'Secondary'
244
- }
245
- ];
246
- const states = [
247
- {
248
- name: 'Default',
249
- props: {}
250
- },
251
- {
252
- name: 'Hover',
253
- props: {
254
- className: 'hover'
255
- }
256
- },
257
- {
258
- name: 'Focus',
259
- props: {
260
- className: 'focus'
261
- }
262
- },
263
- {
264
- name: 'Filled',
265
- props: {
266
- defaultValue: 'Placeholder'
267
- }
268
- },
269
- {
270
- name: 'Filled Hover',
271
- props: {
272
- defaultValue: 'Placeholder',
273
- className: 'hover'
274
- }
275
- },
276
- {
277
- name: 'Disabled',
278
- props: {
279
- disabled: true
280
- }
281
- },
282
- {
283
- name: 'Error',
284
- props: {
285
- 'aria-invalid': true
286
- }
287
- }
288
- ];
289
- return /*#__PURE__*/ _jsxs("div", {
290
- className: "flex flex-col gap-32 pb-64 pt-32 px-32",
291
- children: [
292
- /*#__PURE__*/ _jsx(Header, {
293
- variant: "h3",
294
- className: "text-foreground-neutral-subtle",
295
- children: "TEXT AREA"
296
- }),
297
- /*#__PURE__*/ _jsx("div", {
298
- className: "flex flex-row gap-32",
299
- children: variants.map((variant)=>/*#__PURE__*/ _jsx("div", {
300
- className: "flex flex-col gap-32",
301
- children: states.map((state)=>/*#__PURE__*/ _jsxs("div", {
302
- className: "flex flex-col gap-8",
303
- children: [
304
- /*#__PURE__*/ _jsxs(Code, {
305
- variant: "label",
306
- className: "text-foreground-neutral-subtle",
307
- children: [
308
- "Size=Base (32), State=",
309
- state.name,
310
- ", Color=",
311
- variant.label
312
- ]
313
- }),
314
- /*#__PURE__*/ _jsx("div", {
315
- className: "w-280",
316
- children: /*#__PURE__*/ _jsx(Textarea, {
317
- placeholder: "Placeholder",
318
- variant: variant.key,
319
- size: "base",
320
- rows: 2,
321
- ...state.props
322
- })
323
- })
324
- ]
325
- }, state.name))
326
- }, variant.key))
327
- })
328
- ]
329
- });
330
- }
331
- };
332
- DesignMock.parameters = {
333
- pseudo: {
334
- hover: '.hover',
335
- focusVisible: '.focus'
336
- }
337
- };
338
-
339
- //# sourceMappingURL=textarea.stories.js.map