@shipfox/react-ui 0.4.0 → 0.5.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/.storybook/main.ts +20 -10
- package/.storybook/vitest.setup.ts +4 -0
- package/.turbo/turbo-build.log +2 -2
- package/.turbo/turbo-check.log +2 -2
- package/.turbo/turbo-type.log +1 -1
- package/CHANGELOG.md +7 -0
- package/README.md +40 -1
- package/argos.config.ts +33 -0
- package/dist/components/button/button-link.d.ts +14 -0
- package/dist/components/button/button-link.d.ts.map +1 -0
- package/dist/components/button/button-link.js +63 -0
- package/dist/components/button/button-link.js.map +1 -0
- package/dist/components/button/button-link.stories.js +127 -0
- package/dist/components/button/button-link.stories.js.map +1 -0
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +7 -6
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/button/button.stories.js +1 -13
- package/dist/components/button/button.stories.js.map +1 -1
- package/dist/components/button/icon-button.d.ts +14 -0
- package/dist/components/button/icon-button.d.ts.map +1 -0
- package/dist/components/button/icon-button.js +53 -0
- package/dist/components/button/icon-button.js.map +1 -0
- package/dist/components/button/icon-button.stories.js +254 -0
- package/dist/components/button/icon-button.stories.js.map +1 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.d.ts.map +1 -1
- package/dist/components/button/index.js +2 -0
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/code-block/code-content.d.ts.map +1 -1
- package/dist/components/code-block/code-content.js +2 -2
- package/dist/components/code-block/code-content.js.map +1 -1
- package/dist/components/icon/icon.d.ts +2 -0
- package/dist/components/icon/icon.d.ts.map +1 -1
- package/dist/components/icon/icon.js +4 -2
- package/dist/components/icon/icon.js.map +1 -1
- package/dist/onboarding/sign-in.stories.js +93 -0
- package/dist/onboarding/sign-in.stories.js.map +1 -0
- package/index.css +29 -3
- package/package.json +9 -1
- package/src/components/button/button-link.stories.tsx +86 -0
- package/src/components/button/button-link.tsx +76 -0
- package/src/components/button/button.stories.tsx +1 -7
- package/src/components/button/button.tsx +8 -6
- package/src/components/button/icon-button.stories.tsx +182 -0
- package/src/components/button/icon-button.tsx +69 -0
- package/src/components/button/index.ts +2 -0
- package/src/components/code-block/code-content.tsx +5 -2
- package/src/components/icon/icon.tsx +4 -0
- package/src/onboarding/sign-in.stories.tsx +73 -0
- package/vitest.config.ts +30 -3
|
@@ -0,0 +1,254 @@
|
|
|
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
|
+
|
|
254
|
+
//# sourceMappingURL=icon-button.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/button/icon-button.stories.tsx"],"sourcesContent":["import type {Meta, StoryObj} from '@storybook/react';\nimport {Code} from 'components/typography';\nimport {IconButton} from './icon-button';\n\nconst variantOptions = ['primary', 'transparent'] as const;\nconst sizeOptions = ['2xs', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst radiusOptions = ['rounded', 'full'] as const;\n\nconst meta = {\n title: 'Components/Button/IconButton',\n component: IconButton,\n tags: ['autodocs'],\n argTypes: {\n variant: {\n control: 'select',\n options: variantOptions,\n },\n size: {\n control: 'select',\n options: sizeOptions,\n },\n radius: {\n control: 'select',\n options: radiusOptions,\n },\n muted: {control: 'boolean'},\n asChild: {control: 'boolean'},\n },\n args: {\n icon: 'addLine',\n variant: 'primary',\n size: 'md',\n radius: 'rounded',\n muted: false,\n },\n} satisfies Meta<typeof IconButton>;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\nexport const Default: Story = {};\n\nexport const Variants: Story = {\n render: (args) => (\n <div className=\"flex flex-col gap-32\">\n {sizeOptions.map((size) => (\n <div key={size} className=\"flex flex-col gap-16\">\n <Code variant=\"label\" className=\"text-foreground-neutral-subtle\">\n Size: {size}\n </Code>\n {radiusOptions.map((radius) => (\n <table\n key={radius}\n className=\"w-fit border-separate border-spacing-x-32 border-spacing-y-16\"\n >\n <thead>\n <tr>\n <th>{radius}</th>\n <th>Default</th>\n <th>Hover</th>\n <th>Focus</th>\n <th>Disabled</th>\n </tr>\n </thead>\n <tbody>\n {variantOptions.map((variant) => (\n <tr key={variant}>\n <td>\n <Code variant=\"label\" className=\"text-foreground-neutral-subtle\">\n {variant}\n </Code>\n </td>\n <td>\n <IconButton\n {...args}\n icon=\"addLine\"\n aria-label=\"Add\"\n variant={variant}\n size={size}\n radius={radius}\n />\n </td>\n <td>\n <IconButton\n {...args}\n icon=\"addLine\"\n aria-label=\"Add\"\n variant={variant}\n className=\"hover\"\n size={size}\n radius={radius}\n />\n </td>\n <td>\n <IconButton\n {...args}\n icon=\"addLine\"\n aria-label=\"Add\"\n variant={variant}\n className=\"focus\"\n size={size}\n radius={radius}\n />\n </td>\n <td>\n <IconButton\n {...args}\n icon=\"addLine\"\n aria-label=\"Add\"\n variant={variant}\n disabled\n size={size}\n radius={radius}\n />\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n ))}\n </div>\n ))}\n </div>\n ),\n};\n\nVariants.parameters = {\n pseudo: {\n hover: '.hover',\n focusVisible: '.focus',\n },\n};\n\nexport const Muted: Story = {\n render: (args) => (\n <div className=\"flex flex-col gap-16\">\n <div className=\"flex gap-16 items-center\">\n <Code variant=\"label\">Normal:</Code>\n <IconButton {...args} icon=\"addLine\" aria-label=\"Add\" />\n <IconButton {...args} icon=\"addLine\" aria-label=\"Add\" variant=\"transparent\" />\n </div>\n <div className=\"flex gap-16 items-center\">\n <Code variant=\"label\">Muted:</Code>\n <IconButton {...args} icon=\"addLine\" aria-label=\"Add\" muted />\n <IconButton {...args} icon=\"addLine\" aria-label=\"Add\" variant=\"transparent\" muted />\n </div>\n </div>\n ),\n};\n\nexport const Sizes: Story = {\n render: ({children: _children, ...args}) => (\n <div className=\"flex flex-col gap-16\">\n <div className=\"flex gap-16 items-center\">\n <Code variant=\"label\">Rounded:</Code>\n {sizeOptions.map((size) => (\n <IconButton\n {...args}\n key={size}\n icon=\"addLine\"\n aria-label=\"Add\"\n size={size}\n radius=\"rounded\"\n />\n ))}\n </div>\n <div className=\"flex gap-16 items-center\">\n <Code variant=\"label\">Full:</Code>\n {sizeOptions.map((size) => (\n <IconButton\n {...args}\n key={size}\n icon=\"addLine\"\n aria-label=\"Add\"\n size={size}\n radius=\"full\"\n />\n ))}\n </div>\n </div>\n ),\n};\n"],"names":["Code","IconButton","variantOptions","sizeOptions","radiusOptions","meta","title","component","tags","argTypes","variant","control","options","size","radius","muted","asChild","args","icon","Default","Variants","render","div","className","map","table","thead","tr","th","tbody","td","aria-label","disabled","parameters","pseudo","hover","focusVisible","Muted","Sizes","children","_children","key"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/button/index.ts"],"sourcesContent":["export * from './button';\n"],"names":[],"mappings":"AAAA,cAAc,WAAW"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/button/index.ts"],"sourcesContent":["export * from './button';\nexport * from './button-link';\nexport * from './icon-button';\n"],"names":[],"mappings":"AAAA,cAAc,WAAW;AACzB,cAAc,gBAAgB;AAC9B,cAAc,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-content.d.ts","sourceRoot":"","sources":["../../../src/components/code-block/code-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,OAAO,CAAC;AAG1C,KAAK,gBAAgB,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,WAAmB,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"code-content.d.ts","sourceRoot":"","sources":["../../../src/components/code-block/code-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,OAAO,CAAC;AAG1C,KAAK,gBAAgB,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,WAAmB,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,2CA2ClB"}
|
|
@@ -18,10 +18,10 @@ export function CodeContent({ code, highlightedCode, isLoading, syntaxHighlighti
|
|
|
18
18
|
...props,
|
|
19
19
|
children: /*#__PURE__*/ _jsx("code", {
|
|
20
20
|
className: cn('w-full overflow-x-auto bg-transparent font-code text-xs leading-20 text-foreground-neutral-base', 'grid', lineNumbers && '[counter-reset:line] [counter-increment:line_0] [&_.line]:before:content-[counter(line)] [&_.line]:before:inline-block [&_.line]:before:[counter-increment:line] [&_.line]:before:w-16 [&_.line]:before:mr-16 [&_.line]:before:text-xs [&_.line]:before:text-right [&_.line]:before:text-foreground-neutral-subtle [&_.line]:before:font-code [&_.line]:before:select-none'),
|
|
21
|
-
children: lines.map((line)=>/*#__PURE__*/ _jsx("span", {
|
|
21
|
+
children: lines.map((line, index)=>/*#__PURE__*/ _jsx("span", {
|
|
22
22
|
className: "line px-12 w-full relative font-code text-xs leading-20",
|
|
23
23
|
children: line
|
|
24
|
-
}, line))
|
|
24
|
+
}, `${index}-${line}`))
|
|
25
25
|
})
|
|
26
26
|
});
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/code-block/code-content.tsx"],"sourcesContent":["import type {HTMLAttributes} from 'react';\nimport {cn} from 'utils/cn';\n\ntype CodeContentProps = HTMLAttributes<HTMLElement> & {\n code: string;\n highlightedCode?: string;\n isLoading: boolean;\n syntaxHighlighting: boolean;\n lineNumbers?: boolean;\n};\n\nexport function CodeContent({\n code,\n highlightedCode,\n isLoading,\n syntaxHighlighting,\n lineNumbers = false,\n className,\n ...props\n}: CodeContentProps) {\n const shouldShowHighlighted = syntaxHighlighting && !isLoading && highlightedCode;\n\n if (shouldShowHighlighted) {\n return (\n <div\n className={cn(\n 'shiki-override w-full overflow-x-auto font-code [&_pre]:m-0 [&_pre]:p-0 [&_pre]:bg-transparent [&_pre]:font-code [&_code]:font-code [&_code]:bg-transparent [&_code]:text-xs [&_code]:leading-20 [&_code]:text-foreground-neutral-base [&_code]:grid',\n lineNumbers &&\n '[&_code]:[counter-reset:line] [&_code]:[counter-increment:line_0] [&_.line]:before:content-[counter(line)] [&_.line]:before:inline-block [&_.line]:before:[counter-increment:line] [&_.line]:before:w-16 [&_.line]:before:mr-16 [&_.line]:before:text-xs [&_.line]:before:text-right [&_.line]:before:text-foreground-neutral-subtle [&_.line]:before:font-code [&_.line]:before:select-none',\n '[&_.line]:block [&_.line]:px-12 [&_.line]:w-full [&_.line]:relative [&_.line]:font-code [&_.line]:text-xs [&_.line]:leading-20 [&_.line]:min-h-[1.25rem]',\n className,\n )}\n // biome-ignore lint/security/noDangerouslySetInnerHtml: Shiki outputs HTML for syntax highlighting\n dangerouslySetInnerHTML={{__html: highlightedCode}}\n {...props}\n />\n );\n }\n\n const lines = code.split('\\n');\n\n return (\n <pre className={cn('m-0 p-0 bg-transparent font-code', className)} {...props}>\n <code\n className={cn(\n 'w-full overflow-x-auto bg-transparent font-code text-xs leading-20 text-foreground-neutral-base',\n 'grid',\n lineNumbers &&\n '[counter-reset:line] [counter-increment:line_0] [&_.line]:before:content-[counter(line)] [&_.line]:before:inline-block [&_.line]:before:[counter-increment:line] [&_.line]:before:w-16 [&_.line]:before:mr-16 [&_.line]:before:text-xs [&_.line]:before:text-right [&_.line]:before:text-foreground-neutral-subtle [&_.line]:before:font-code [&_.line]:before:select-none',\n )}\n >\n {lines.map((line) => (\n <span
|
|
1
|
+
{"version":3,"sources":["../../../src/components/code-block/code-content.tsx"],"sourcesContent":["import type {HTMLAttributes} from 'react';\nimport {cn} from 'utils/cn';\n\ntype CodeContentProps = HTMLAttributes<HTMLElement> & {\n code: string;\n highlightedCode?: string;\n isLoading: boolean;\n syntaxHighlighting: boolean;\n lineNumbers?: boolean;\n};\n\nexport function CodeContent({\n code,\n highlightedCode,\n isLoading,\n syntaxHighlighting,\n lineNumbers = false,\n className,\n ...props\n}: CodeContentProps) {\n const shouldShowHighlighted = syntaxHighlighting && !isLoading && highlightedCode;\n\n if (shouldShowHighlighted) {\n return (\n <div\n className={cn(\n 'shiki-override w-full overflow-x-auto font-code [&_pre]:m-0 [&_pre]:p-0 [&_pre]:bg-transparent [&_pre]:font-code [&_code]:font-code [&_code]:bg-transparent [&_code]:text-xs [&_code]:leading-20 [&_code]:text-foreground-neutral-base [&_code]:grid',\n lineNumbers &&\n '[&_code]:[counter-reset:line] [&_code]:[counter-increment:line_0] [&_.line]:before:content-[counter(line)] [&_.line]:before:inline-block [&_.line]:before:[counter-increment:line] [&_.line]:before:w-16 [&_.line]:before:mr-16 [&_.line]:before:text-xs [&_.line]:before:text-right [&_.line]:before:text-foreground-neutral-subtle [&_.line]:before:font-code [&_.line]:before:select-none',\n '[&_.line]:block [&_.line]:px-12 [&_.line]:w-full [&_.line]:relative [&_.line]:font-code [&_.line]:text-xs [&_.line]:leading-20 [&_.line]:min-h-[1.25rem]',\n className,\n )}\n // biome-ignore lint/security/noDangerouslySetInnerHtml: Shiki outputs HTML for syntax highlighting\n dangerouslySetInnerHTML={{__html: highlightedCode}}\n {...props}\n />\n );\n }\n\n const lines = code.split('\\n');\n\n return (\n <pre className={cn('m-0 p-0 bg-transparent font-code', className)} {...props}>\n <code\n className={cn(\n 'w-full overflow-x-auto bg-transparent font-code text-xs leading-20 text-foreground-neutral-base',\n 'grid',\n lineNumbers &&\n '[counter-reset:line] [counter-increment:line_0] [&_.line]:before:content-[counter(line)] [&_.line]:before:inline-block [&_.line]:before:[counter-increment:line] [&_.line]:before:w-16 [&_.line]:before:mr-16 [&_.line]:before:text-xs [&_.line]:before:text-right [&_.line]:before:text-foreground-neutral-subtle [&_.line]:before:font-code [&_.line]:before:select-none',\n )}\n >\n {lines.map((line, index) => (\n <span\n className=\"line px-12 w-full relative font-code text-xs leading-20\"\n key={`${index}-${line}`}\n >\n {line}\n </span>\n ))}\n </code>\n </pre>\n );\n}\n"],"names":["cn","CodeContent","code","highlightedCode","isLoading","syntaxHighlighting","lineNumbers","className","props","shouldShowHighlighted","div","dangerouslySetInnerHTML","__html","lines","split","pre","map","line","index","span"],"mappings":";AACA,SAAQA,EAAE,QAAO,WAAW;AAU5B,OAAO,SAASC,YAAY,EAC1BC,IAAI,EACJC,eAAe,EACfC,SAAS,EACTC,kBAAkB,EAClBC,cAAc,KAAK,EACnBC,SAAS,EACT,GAAGC,OACc;IACjB,MAAMC,wBAAwBJ,sBAAsB,CAACD,aAAaD;IAElE,IAAIM,uBAAuB;QACzB,qBACE,KAACC;YACCH,WAAWP,GACT,wPACAM,eACE,gYACF,4JACAC;YAEF,mGAAmG;YACnGI,yBAAyB;gBAACC,QAAQT;YAAe;YAChD,GAAGK,KAAK;;IAGf;IAEA,MAAMK,QAAQX,KAAKY,KAAK,CAAC;IAEzB,qBACE,KAACC;QAAIR,WAAWP,GAAG,oCAAoCO;QAAa,GAAGC,KAAK;kBAC1E,cAAA,KAACN;YACCK,WAAWP,GACT,mGACA,QACAM,eACE;sBAGHO,MAAMG,GAAG,CAAC,CAACC,MAAMC,sBAChB,KAACC;oBACCZ,WAAU;8BAGTU;mBAFI,GAAGC,MAAM,CAAC,EAAED,MAAM;;;AAQnC"}
|
|
@@ -27,6 +27,8 @@ declare const iconsMap: {
|
|
|
27
27
|
readonly money: RemixiconComponentType;
|
|
28
28
|
readonly homeSmile: RemixiconComponentType;
|
|
29
29
|
readonly copy: RemixiconComponentType;
|
|
30
|
+
readonly addLine: RemixiconComponentType;
|
|
31
|
+
readonly chevronRight: RemixiconComponentType;
|
|
30
32
|
};
|
|
31
33
|
export type IconName = keyof typeof iconsMap;
|
|
32
34
|
export declare const iconNames: IconName[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,sBAAsB,
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,sBAAsB,EAO3B,YAAY,EAOb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,OAAO,CAAC;AAC1C,OAAO,EACL,SAAS,EACT,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACX,UAAU,EACV,WAAW,EACX,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAElB,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B6C,CAAC;AAE5D,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,QAAQ,CAAC;AAC7C,eAAO,MAAM,SAAS,EAA4B,QAAQ,EAAE,CAAC;AAE7D,KAAK,aAAa,GAAG,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC;AACzD,KAAK,SAAS,GAAG;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAC,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;AAEhE,wBAAgB,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,KAAK,EAAC,EAAE,SAAS,2CAG/C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { RiCheckLine, RiCloseLine, RiFileCopyLine, RiGithubFill, RiGoogleFill, RiHomeSmileFill, RiImageAddFill, RiInformationFill, RiMicrosoftFill, RiMoneyDollarCircleLine, RiSubtractLine } from '@remixicon/react';
|
|
2
|
+
import { RiAddLine, RiArrowRightSLine, RiCheckLine, RiCloseLine, RiFileCopyLine, RiGithubFill, RiGoogleFill, RiHomeSmileFill, RiImageAddFill, RiInformationFill, RiMicrosoftFill, RiMoneyDollarCircleLine, RiSubtractLine } from '@remixicon/react';
|
|
3
3
|
import { BadgeIcon, CheckCircleSolidIcon, CircleDottedLineIcon, ComponentFillIcon, ComponentLineIcon, EllipseMiniSolidIcon, InfoTooltipFillIcon, ResizeIcon, ShipfoxLogo, SlackLogo, SpinnerIcon, StripeLogo, ThunderIcon, XCircleSolidIcon } from './custom/index.js';
|
|
4
4
|
const iconsMap = {
|
|
5
5
|
google: RiGoogleFill,
|
|
@@ -26,7 +26,9 @@ const iconsMap = {
|
|
|
26
26
|
info: RiInformationFill,
|
|
27
27
|
money: RiMoneyDollarCircleLine,
|
|
28
28
|
homeSmile: RiHomeSmileFill,
|
|
29
|
-
copy: RiFileCopyLine
|
|
29
|
+
copy: RiFileCopyLine,
|
|
30
|
+
addLine: RiAddLine,
|
|
31
|
+
chevronRight: RiArrowRightSLine
|
|
30
32
|
};
|
|
31
33
|
export const iconNames = Object.keys(iconsMap);
|
|
32
34
|
export function Icon({ name, ...props }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/icon/icon.tsx"],"sourcesContent":["import {\n type RemixiconComponentType,\n RiCheckLine,\n RiCloseLine,\n RiFileCopyLine,\n RiGithubFill,\n RiGoogleFill,\n RiHomeSmileFill,\n RiImageAddFill,\n RiInformationFill,\n RiMicrosoftFill,\n RiMoneyDollarCircleLine,\n RiSubtractLine,\n} from '@remixicon/react';\nimport type {ComponentProps} from 'react';\nimport {\n BadgeIcon,\n CheckCircleSolidIcon,\n CircleDottedLineIcon,\n ComponentFillIcon,\n ComponentLineIcon,\n EllipseMiniSolidIcon,\n InfoTooltipFillIcon,\n ResizeIcon,\n ShipfoxLogo,\n SlackLogo,\n SpinnerIcon,\n StripeLogo,\n ThunderIcon,\n XCircleSolidIcon,\n} from './custom';\n\nconst iconsMap = {\n google: RiGoogleFill,\n microsoft: RiMicrosoftFill,\n badge: BadgeIcon,\n checkCircleSolid: CheckCircleSolidIcon,\n circleDottedLine: CircleDottedLineIcon,\n componentFill: ComponentFillIcon,\n xCircleSolid: XCircleSolidIcon,\n thunder: ThunderIcon,\n resize: ResizeIcon,\n infoTooltipFill: InfoTooltipFillIcon,\n spinner: SpinnerIcon,\n ellipseMiniSolid: EllipseMiniSolidIcon,\n componentLine: ComponentLineIcon,\n imageAdd: RiImageAddFill,\n close: RiCloseLine,\n shipfox: ShipfoxLogo,\n slack: SlackLogo,\n stripe: StripeLogo,\n github: RiGithubFill,\n check: RiCheckLine,\n subtractLine: RiSubtractLine,\n info: RiInformationFill,\n money: RiMoneyDollarCircleLine,\n homeSmile: RiHomeSmileFill,\n copy: RiFileCopyLine,\n} as const satisfies Record<string, RemixiconComponentType>;\n\nexport type IconName = keyof typeof iconsMap;\nexport const iconNames = Object.keys(iconsMap) as IconName[];\n\ntype BaseIconProps = ComponentProps<typeof RiGoogleFill>;\ntype IconProps = {name: IconName} & Omit<BaseIconProps, 'name'>;\n\nexport function Icon({name, ...props}: IconProps) {\n const IconComponent = iconsMap[name];\n return <IconComponent {...props} />;\n}\n"],"names":["RiCheckLine","RiCloseLine","RiFileCopyLine","RiGithubFill","RiGoogleFill","RiHomeSmileFill","RiImageAddFill","RiInformationFill","RiMicrosoftFill","RiMoneyDollarCircleLine","RiSubtractLine","BadgeIcon","CheckCircleSolidIcon","CircleDottedLineIcon","ComponentFillIcon","ComponentLineIcon","EllipseMiniSolidIcon","InfoTooltipFillIcon","ResizeIcon","ShipfoxLogo","SlackLogo","SpinnerIcon","StripeLogo","ThunderIcon","XCircleSolidIcon","iconsMap","google","microsoft","badge","checkCircleSolid","circleDottedLine","componentFill","xCircleSolid","thunder","resize","infoTooltipFill","spinner","ellipseMiniSolid","componentLine","imageAdd","close","shipfox","slack","stripe","github","check","subtractLine","info","money","homeSmile","copy","iconNames","Object","keys","Icon","name","props","IconComponent"],"mappings":";AAAA,SAEEA,WAAW,EACXC,WAAW,EACXC,cAAc,EACdC,YAAY,EACZC,YAAY,EACZC,eAAe,EACfC,cAAc,EACdC,iBAAiB,EACjBC,eAAe,EACfC,uBAAuB,EACvBC,cAAc,QACT,mBAAmB;AAE1B,SACEC,SAAS,EACTC,oBAAoB,EACpBC,oBAAoB,EACpBC,iBAAiB,EACjBC,iBAAiB,EACjBC,oBAAoB,EACpBC,mBAAmB,EACnBC,UAAU,EACVC,WAAW,EACXC,SAAS,EACTC,WAAW,EACXC,UAAU,EACVC,WAAW,EACXC,gBAAgB,QACX,WAAW;AAElB,MAAMC,WAAW;IACfC,QAAQtB;IACRuB,WAAWnB;IACXoB,OAAOjB;IACPkB,kBAAkBjB;IAClBkB,kBAAkBjB;IAClBkB,eAAejB;IACfkB,cAAcR;IACdS,SAASV;IACTW,QAAQhB;IACRiB,iBAAiBlB;IACjBmB,SAASf;IACTgB,kBAAkBrB;IAClBsB,eAAevB;IACfwB,UAAUjC;IACVkC,OAAOvC;IACPwC,SAAStB;IACTuB,OAAOtB;IACPuB,QAAQrB;IACRsB,QAAQzC;IACR0C,OAAO7C;IACP8C,cAAcpC;IACdqC,MAAMxC;IACNyC,OAAOvC;IACPwC,WAAW5C;IACX6C,MAAMhD;
|
|
1
|
+
{"version":3,"sources":["../../../src/components/icon/icon.tsx"],"sourcesContent":["import {\n type RemixiconComponentType,\n RiAddLine,\n RiArrowRightSLine,\n RiCheckLine,\n RiCloseLine,\n RiFileCopyLine,\n RiGithubFill,\n RiGoogleFill,\n RiHomeSmileFill,\n RiImageAddFill,\n RiInformationFill,\n RiMicrosoftFill,\n RiMoneyDollarCircleLine,\n RiSubtractLine,\n} from '@remixicon/react';\nimport type {ComponentProps} from 'react';\nimport {\n BadgeIcon,\n CheckCircleSolidIcon,\n CircleDottedLineIcon,\n ComponentFillIcon,\n ComponentLineIcon,\n EllipseMiniSolidIcon,\n InfoTooltipFillIcon,\n ResizeIcon,\n ShipfoxLogo,\n SlackLogo,\n SpinnerIcon,\n StripeLogo,\n ThunderIcon,\n XCircleSolidIcon,\n} from './custom';\n\nconst iconsMap = {\n google: RiGoogleFill,\n microsoft: RiMicrosoftFill,\n badge: BadgeIcon,\n checkCircleSolid: CheckCircleSolidIcon,\n circleDottedLine: CircleDottedLineIcon,\n componentFill: ComponentFillIcon,\n xCircleSolid: XCircleSolidIcon,\n thunder: ThunderIcon,\n resize: ResizeIcon,\n infoTooltipFill: InfoTooltipFillIcon,\n spinner: SpinnerIcon,\n ellipseMiniSolid: EllipseMiniSolidIcon,\n componentLine: ComponentLineIcon,\n imageAdd: RiImageAddFill,\n close: RiCloseLine,\n shipfox: ShipfoxLogo,\n slack: SlackLogo,\n stripe: StripeLogo,\n github: RiGithubFill,\n check: RiCheckLine,\n subtractLine: RiSubtractLine,\n info: RiInformationFill,\n money: RiMoneyDollarCircleLine,\n homeSmile: RiHomeSmileFill,\n copy: RiFileCopyLine,\n addLine: RiAddLine,\n chevronRight: RiArrowRightSLine,\n} as const satisfies Record<string, RemixiconComponentType>;\n\nexport type IconName = keyof typeof iconsMap;\nexport const iconNames = Object.keys(iconsMap) as IconName[];\n\ntype BaseIconProps = ComponentProps<typeof RiGoogleFill>;\ntype IconProps = {name: IconName} & Omit<BaseIconProps, 'name'>;\n\nexport function Icon({name, ...props}: IconProps) {\n const IconComponent = iconsMap[name];\n return <IconComponent {...props} />;\n}\n"],"names":["RiAddLine","RiArrowRightSLine","RiCheckLine","RiCloseLine","RiFileCopyLine","RiGithubFill","RiGoogleFill","RiHomeSmileFill","RiImageAddFill","RiInformationFill","RiMicrosoftFill","RiMoneyDollarCircleLine","RiSubtractLine","BadgeIcon","CheckCircleSolidIcon","CircleDottedLineIcon","ComponentFillIcon","ComponentLineIcon","EllipseMiniSolidIcon","InfoTooltipFillIcon","ResizeIcon","ShipfoxLogo","SlackLogo","SpinnerIcon","StripeLogo","ThunderIcon","XCircleSolidIcon","iconsMap","google","microsoft","badge","checkCircleSolid","circleDottedLine","componentFill","xCircleSolid","thunder","resize","infoTooltipFill","spinner","ellipseMiniSolid","componentLine","imageAdd","close","shipfox","slack","stripe","github","check","subtractLine","info","money","homeSmile","copy","addLine","chevronRight","iconNames","Object","keys","Icon","name","props","IconComponent"],"mappings":";AAAA,SAEEA,SAAS,EACTC,iBAAiB,EACjBC,WAAW,EACXC,WAAW,EACXC,cAAc,EACdC,YAAY,EACZC,YAAY,EACZC,eAAe,EACfC,cAAc,EACdC,iBAAiB,EACjBC,eAAe,EACfC,uBAAuB,EACvBC,cAAc,QACT,mBAAmB;AAE1B,SACEC,SAAS,EACTC,oBAAoB,EACpBC,oBAAoB,EACpBC,iBAAiB,EACjBC,iBAAiB,EACjBC,oBAAoB,EACpBC,mBAAmB,EACnBC,UAAU,EACVC,WAAW,EACXC,SAAS,EACTC,WAAW,EACXC,UAAU,EACVC,WAAW,EACXC,gBAAgB,QACX,WAAW;AAElB,MAAMC,WAAW;IACfC,QAAQtB;IACRuB,WAAWnB;IACXoB,OAAOjB;IACPkB,kBAAkBjB;IAClBkB,kBAAkBjB;IAClBkB,eAAejB;IACfkB,cAAcR;IACdS,SAASV;IACTW,QAAQhB;IACRiB,iBAAiBlB;IACjBmB,SAASf;IACTgB,kBAAkBrB;IAClBsB,eAAevB;IACfwB,UAAUjC;IACVkC,OAAOvC;IACPwC,SAAStB;IACTuB,OAAOtB;IACPuB,QAAQrB;IACRsB,QAAQzC;IACR0C,OAAO7C;IACP8C,cAAcpC;IACdqC,MAAMxC;IACNyC,OAAOvC;IACPwC,WAAW5C;IACX6C,MAAMhD;IACNiD,SAASrD;IACTsD,cAAcrD;AAChB;AAGA,OAAO,MAAMsD,YAAYC,OAAOC,IAAI,CAAC9B,UAAwB;AAK7D,OAAO,SAAS+B,KAAK,EAACC,IAAI,EAAE,GAAGC,OAAiB;IAC9C,MAAMC,gBAAgBlC,QAAQ,CAACgC,KAAK;IACpC,qBAAO,KAACE;QAAe,GAAGD,KAAK;;AACjC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { argosScreenshot } from '@argos-ci/storybook/vitest';
|
|
3
|
+
import { Avatar } from '../components/avatar/index.js';
|
|
4
|
+
import { Button } from '../components/button/index.js';
|
|
5
|
+
import { Header, Text } from '../components/typography/index.js';
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Onboarding/Signin',
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen'
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
export const Default = {
|
|
14
|
+
play: async (ctx)=>{
|
|
15
|
+
await argosScreenshot(ctx, 'example-screenshot');
|
|
16
|
+
},
|
|
17
|
+
render: ()=>{
|
|
18
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
19
|
+
className: "flex min-h-screen items-center justify-center bg-background-subtle-base",
|
|
20
|
+
children: [
|
|
21
|
+
/*#__PURE__*/ _jsx("div", {
|
|
22
|
+
className: "pointer-events-none absolute left-1/2 top-0 -translate-x-1/2 -translate-y-[120px]",
|
|
23
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
24
|
+
className: "h-[332px] w-[800px] opacity-20",
|
|
25
|
+
style: {
|
|
26
|
+
backgroundImage: `radial-gradient(circle, rgba(255, 75, 0, 0.3) 1px, transparent 1px)`,
|
|
27
|
+
backgroundSize: '24px 24px',
|
|
28
|
+
backgroundPosition: '-80px 31px'
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
}),
|
|
32
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
33
|
+
className: "relative flex w-full max-w-[384px] flex-col items-center gap-32 px-24 pb-80 pt-24",
|
|
34
|
+
children: [
|
|
35
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
36
|
+
className: "flex flex-col items-center gap-16",
|
|
37
|
+
children: [
|
|
38
|
+
/*#__PURE__*/ _jsx(Avatar, {
|
|
39
|
+
content: "logo",
|
|
40
|
+
size: "xl",
|
|
41
|
+
radius: "rounded",
|
|
42
|
+
logoName: "shipfox"
|
|
43
|
+
}),
|
|
44
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
45
|
+
className: "flex min-w-[128px] flex-col items-center gap-4 text-center",
|
|
46
|
+
children: [
|
|
47
|
+
/*#__PURE__*/ _jsx(Header, {
|
|
48
|
+
variant: "h1",
|
|
49
|
+
className: "text-[28px] font-medium leading-[44px] text-foreground-neutral-base",
|
|
50
|
+
children: "Connect to Shipfox"
|
|
51
|
+
}),
|
|
52
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
53
|
+
size: "sm",
|
|
54
|
+
className: "text-sm font-normal leading-[24px] text-foreground-neutral-subtle",
|
|
55
|
+
children: "Log in to access Shipfox."
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
}),
|
|
61
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
62
|
+
className: "flex w-full flex-col gap-20",
|
|
63
|
+
children: [
|
|
64
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
65
|
+
variant: "primary",
|
|
66
|
+
size: "md",
|
|
67
|
+
iconLeft: "google",
|
|
68
|
+
className: "w-full",
|
|
69
|
+
children: "Continue with Google"
|
|
70
|
+
}),
|
|
71
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
72
|
+
variant: "primary",
|
|
73
|
+
size: "md",
|
|
74
|
+
iconLeft: "microsoft",
|
|
75
|
+
className: "w-full",
|
|
76
|
+
children: "Continue with Microsoft"
|
|
77
|
+
}),
|
|
78
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
79
|
+
variant: "transparent",
|
|
80
|
+
size: "md",
|
|
81
|
+
className: "w-full",
|
|
82
|
+
children: "Connect with Enterprise SSO"
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
})
|
|
88
|
+
]
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
//# sourceMappingURL=sign-in.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/onboarding/sign-in.stories.tsx"],"sourcesContent":["import {argosScreenshot} from '@argos-ci/storybook/vitest';\nimport type {Meta, StoryObj} from '@storybook/react';\nimport {Avatar} from 'components/avatar';\nimport {Button} from 'components/button';\nimport {Header, Text} from 'components/typography';\n\nconst meta = {\n title: 'Onboarding/Signin',\n parameters: {\n layout: 'fullscreen',\n },\n} satisfies Meta;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\nexport const Default: Story = {\n play: async (ctx) => {\n await argosScreenshot(ctx, 'example-screenshot');\n },\n render: () => {\n return (\n <div className=\"flex min-h-screen items-center justify-center bg-background-subtle-base\">\n {/* Background illustration - simplified decorative element */}\n <div className=\"pointer-events-none absolute left-1/2 top-0 -translate-x-1/2 -translate-y-[120px]\">\n <div\n className=\"h-[332px] w-[800px] opacity-20\"\n style={{\n backgroundImage: `radial-gradient(circle, rgba(255, 75, 0, 0.3) 1px, transparent 1px)`,\n backgroundSize: '24px 24px',\n backgroundPosition: '-80px 31px',\n }}\n />\n </div>\n\n {/* Main content */}\n <div className=\"relative flex w-full max-w-[384px] flex-col items-center gap-32 px-24 pb-80 pt-24\">\n {/* Logo and title section */}\n <div className=\"flex flex-col items-center gap-16\">\n <Avatar content=\"logo\" size=\"xl\" radius=\"rounded\" logoName=\"shipfox\" />\n <div className=\"flex min-w-[128px] flex-col items-center gap-4 text-center\">\n <Header\n variant=\"h1\"\n className=\"text-[28px] font-medium leading-[44px] text-foreground-neutral-base\"\n >\n Connect to Shipfox\n </Header>\n <Text\n size=\"sm\"\n className=\"text-sm font-normal leading-[24px] text-foreground-neutral-subtle\"\n >\n Log in to access Shipfox.\n </Text>\n </div>\n </div>\n\n {/* Action buttons */}\n <div className=\"flex w-full flex-col gap-20\">\n <Button variant=\"primary\" size=\"md\" iconLeft=\"google\" className=\"w-full\">\n Continue with Google\n </Button>\n <Button variant=\"primary\" size=\"md\" iconLeft=\"microsoft\" className=\"w-full\">\n Continue with Microsoft\n </Button>\n <Button variant=\"transparent\" size=\"md\" className=\"w-full\">\n Connect with Enterprise SSO\n </Button>\n </div>\n </div>\n </div>\n );\n },\n};\n"],"names":["argosScreenshot","Avatar","Button","Header","Text","meta","title","parameters","layout","Default","play","ctx","render","div","className","style","backgroundImage","backgroundSize","backgroundPosition","content","size","radius","logoName","variant","iconLeft"],"mappings":";AAAA,SAAQA,eAAe,QAAO,6BAA6B;AAE3D,SAAQC,MAAM,QAAO,oBAAoB;AACzC,SAAQC,MAAM,QAAO,oBAAoB;AACzC,SAAQC,MAAM,EAAEC,IAAI,QAAO,wBAAwB;AAEnD,MAAMC,OAAO;IACXC,OAAO;IACPC,YAAY;QACVC,QAAQ;IACV;AACF;AAEA,eAAeH,KAAK;AAGpB,OAAO,MAAMI,UAAiB;IAC5BC,MAAM,OAAOC;QACX,MAAMX,gBAAgBW,KAAK;IAC7B;IACAC,QAAQ;QACN,qBACE,MAACC;YAAIC,WAAU;;8BAEb,KAACD;oBAAIC,WAAU;8BACb,cAAA,KAACD;wBACCC,WAAU;wBACVC,OAAO;4BACLC,iBAAiB,CAAC,mEAAmE,CAAC;4BACtFC,gBAAgB;4BAChBC,oBAAoB;wBACtB;;;8BAKJ,MAACL;oBAAIC,WAAU;;sCAEb,MAACD;4BAAIC,WAAU;;8CACb,KAACb;oCAAOkB,SAAQ;oCAAOC,MAAK;oCAAKC,QAAO;oCAAUC,UAAS;;8CAC3D,MAACT;oCAAIC,WAAU;;sDACb,KAACX;4CACCoB,SAAQ;4CACRT,WAAU;sDACX;;sDAGD,KAACV;4CACCgB,MAAK;4CACLN,WAAU;sDACX;;;;;;sCAOL,MAACD;4BAAIC,WAAU;;8CACb,KAACZ;oCAAOqB,SAAQ;oCAAUH,MAAK;oCAAKI,UAAS;oCAASV,WAAU;8CAAS;;8CAGzE,KAACZ;oCAAOqB,SAAQ;oCAAUH,MAAK;oCAAKI,UAAS;oCAAYV,WAAU;8CAAS;;8CAG5E,KAACZ;oCAAOqB,SAAQ;oCAAcH,MAAK;oCAAKN,WAAU;8CAAS;;;;;;;;IAOrE;AACF,EAAE"}
|
package/index.css
CHANGED
|
@@ -198,14 +198,17 @@
|
|
|
198
198
|
--background-button-transparent-default: var(--color-alpha-white-0);
|
|
199
199
|
--background-button-neutral-hover: var(--color-neutral-100);
|
|
200
200
|
--background-button-danger-hover: var(--color-red-700);
|
|
201
|
+
--background-button-success-hover: var(--color-green-700);
|
|
201
202
|
--background-button-neutral-pressed: var(--color-neutral-200);
|
|
202
203
|
--background-button-neutral-default: var(--color-neutral-0);
|
|
203
|
-
--background-button-transparent-hover: var(--color-alpha-
|
|
204
|
+
--background-button-transparent-hover: var(--color-alpha-black-6);
|
|
204
205
|
--background-button-inverted-pressed: var(--color-neutral-600);
|
|
205
|
-
--background-button-transparent-pressed: var(--color-alpha-
|
|
206
|
+
--background-button-transparent-pressed: var(--color-alpha-black-10);
|
|
206
207
|
--background-button-danger-pressed: var(--color-red-800);
|
|
208
|
+
--background-button-success-pressed: var(--color-green-800);
|
|
207
209
|
--background-button-inverted-hover: var(--color-neutral-700);
|
|
208
210
|
--background-button-danger-default: var(--color-red-600);
|
|
211
|
+
--background-button-success-default: var(--color-green-600);
|
|
209
212
|
--background-button-inverted-default: var(--color-neutral-800);
|
|
210
213
|
|
|
211
214
|
/* Accent Background */
|
|
@@ -312,7 +315,7 @@
|
|
|
312
315
|
var(--color-alpha-black-8);
|
|
313
316
|
--shadow-button-neutral-focus:
|
|
314
317
|
0 -1px 0 0 var(--color-alpha-white-6), 0 0 0 1px var(--color-alpha-white-6), 0 0 0 1px
|
|
315
|
-
var(--color-
|
|
318
|
+
var(--color-alpha-black-8), 0 0 0 2px var(--color-alpha-white-88), 0 0 0 4px
|
|
316
319
|
var(--color-primary-500);
|
|
317
320
|
--shadow-button-danger:
|
|
318
321
|
0 -1px 0 0 var(--color-alpha-white-16), 0 0 0 1px var(--color-alpha-white-12), 0 0 0 1px
|
|
@@ -321,6 +324,14 @@
|
|
|
321
324
|
--shadow-button-danger-focus:
|
|
322
325
|
0 -1px 0 0 var(--color-alpha-white-16), 0 0 0 1px var(--color-alpha-white-12), 0 0 0 1px
|
|
323
326
|
var(--color-red-700), 0 0 0 2px var(--color-alpha-white-88), 0 0 0 4px var(--color-primary-500);
|
|
327
|
+
--shadow-button-success:
|
|
328
|
+
0 -1px 0 0 var(--color-alpha-white-16), 0 0 0 1px var(--color-alpha-white-12), 0 0 0 1px
|
|
329
|
+
var(--color-green-700), 0 0 1px 1.5px var(--color-alpha-black-24), 0 2px 2px 0
|
|
330
|
+
var(--color-alpha-black-24);
|
|
331
|
+
--shadow-button-success-focus:
|
|
332
|
+
0 -1px 0 0 var(--color-alpha-white-16), 0 0 0 1px var(--color-alpha-white-12), 0 0 0 1px
|
|
333
|
+
var(--color-green-700), 0 0 0 2px var(--color-alpha-white-88), 0 0 0 4px
|
|
334
|
+
var(--color-primary-500);
|
|
324
335
|
|
|
325
336
|
/* Checkbox */
|
|
326
337
|
/* Checkbox - Unchecked States */
|
|
@@ -392,14 +403,17 @@
|
|
|
392
403
|
--background-button-transparent-default: var(--color-alpha-white-0);
|
|
393
404
|
--background-button-neutral-hover: var(--color-alpha-white-8);
|
|
394
405
|
--background-button-danger-hover: var(--color-red-700);
|
|
406
|
+
--background-button-success-hover: var(--color-green-700);
|
|
395
407
|
--background-button-neutral-pressed: var(--color-alpha-white-12);
|
|
396
408
|
--background-button-neutral-default: var(--color-alpha-white-4);
|
|
397
409
|
--background-button-transparent-hover: var(--color-alpha-white-8);
|
|
398
410
|
--background-button-inverted-pressed: var(--color-neutral-400);
|
|
399
411
|
--background-button-transparent-pressed: var(--color-alpha-white-12);
|
|
400
412
|
--background-button-danger-pressed: var(--color-red-600);
|
|
413
|
+
--background-button-success-pressed: var(--color-green-600);
|
|
401
414
|
--background-button-inverted-hover: var(--color-neutral-500);
|
|
402
415
|
--background-button-danger-default: var(--color-red-800);
|
|
416
|
+
--background-button-success-default: var(--color-green-800);
|
|
403
417
|
--background-button-inverted-default: var(--color-neutral-600);
|
|
404
418
|
|
|
405
419
|
/* Accent Background */
|
|
@@ -513,6 +527,13 @@
|
|
|
513
527
|
--shadow-button-danger-focus:
|
|
514
528
|
0 -1px 0 0 var(--color-alpha-white-16), 0 0 0 1px var(--color-alpha-white-12), 0 0 0 1px
|
|
515
529
|
var(--color-red-700), 0 0 0 2px var(--color-neutral-950), 0 0 0 4px var(--color-primary-500);
|
|
530
|
+
--shadow-button-success:
|
|
531
|
+
0 -1px 0 0 var(--color-alpha-white-16), 0 0 0 1px var(--color-alpha-white-12), 0 0 0 1px
|
|
532
|
+
var(--color-green-700), 0 0 1px 1.5px var(--color-alpha-black-24), 0 2px 2px 0
|
|
533
|
+
var(--color-alpha-black-24);
|
|
534
|
+
--shadow-button-success-focus:
|
|
535
|
+
0 -1px 0 0 var(--color-alpha-white-16), 0 0 0 1px var(--color-alpha-white-12), 0 0 0 1px
|
|
536
|
+
var(--color-green-700), 0 0 0 2px var(--color-neutral-950), 0 0 0 4px var(--color-primary-500);
|
|
516
537
|
|
|
517
538
|
/* Checkbox */
|
|
518
539
|
/* Checkbox - Unchecked States */
|
|
@@ -727,14 +748,17 @@
|
|
|
727
748
|
--color-background-button-transparent-default: var(--background-button-transparent-default);
|
|
728
749
|
--color-background-button-neutral-hover: var(--background-button-neutral-hover);
|
|
729
750
|
--color-background-button-danger-hover: var(--background-button-danger-hover);
|
|
751
|
+
--color-background-button-success-hover: var(--background-button-success-hover);
|
|
730
752
|
--color-background-button-neutral-pressed: var(--background-button-neutral-pressed);
|
|
731
753
|
--color-background-button-neutral-default: var(--background-button-neutral-default);
|
|
732
754
|
--color-background-button-transparent-hover: var(--background-button-transparent-hover);
|
|
733
755
|
--color-background-button-inverted-pressed: var(--background-button-inverted-pressed);
|
|
734
756
|
--color-background-button-transparent-pressed: var(--background-button-transparent-pressed);
|
|
735
757
|
--color-background-button-danger-pressed: var(--background-button-danger-pressed);
|
|
758
|
+
--color-background-button-success-pressed: var(--background-button-success-pressed);
|
|
736
759
|
--color-background-button-inverted-hover: var(--background-button-inverted-hover);
|
|
737
760
|
--color-background-button-danger-default: var(--background-button-danger-default);
|
|
761
|
+
--color-background-button-success-default: var(--background-button-success-default);
|
|
738
762
|
--color-background-button-inverted-default: var(--background-button-inverted-default);
|
|
739
763
|
|
|
740
764
|
/* Theme tokens - accent background */
|
|
@@ -875,6 +899,8 @@
|
|
|
875
899
|
--shadow-button-neutral-focus: var(--shadow-button-neutral-focus);
|
|
876
900
|
--shadow-button-danger: var(--shadow-button-danger);
|
|
877
901
|
--shadow-button-danger-focus: var(--shadow-button-danger-focus);
|
|
902
|
+
--shadow-button-success: var(--shadow-button-success);
|
|
903
|
+
--shadow-button-success-focus: var(--shadow-button-success-focus);
|
|
878
904
|
|
|
879
905
|
/* Checkbox */
|
|
880
906
|
--color-checkbox-unchecked-bg: var(--checkbox-unchecked-bg);
|