@lateralus-ai/shipping-ui 1.0.4
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/README.md +108 -0
- package/dist/components/HelloWorld.d.ts +1 -0
- package/dist/components/InputPrompt.d.ts +20 -0
- package/dist/components/ModalPanel.d.ts +8 -0
- package/dist/components/PdfViewer/ImageViewer.d.ts +8 -0
- package/dist/components/PdfViewer/PdfViewer.d.ts +7 -0
- package/dist/components/PdfViewer/index.d.ts +2 -0
- package/dist/components/PdfViewer/usePageManagement.d.ts +5 -0
- package/dist/components/PdfViewer/usePanning.d.ts +15 -0
- package/dist/components/PdfViewer/useRefDimensions.d.ts +4 -0
- package/dist/components/PdfViewer/useRotation.d.ts +4 -0
- package/dist/components/PdfViewer/useZoom.d.ts +8 -0
- package/dist/components/Sidebar/Button.d.ts +7 -0
- package/dist/components/Sidebar/Container.d.ts +5 -0
- package/dist/components/Sidebar/Item.d.ts +9 -0
- package/dist/components/Sidebar/Layout.d.ts +7 -0
- package/dist/components/Sidebar/Provider.d.ts +14 -0
- package/dist/components/Sidebar/SecondaryItem.d.ts +9 -0
- package/dist/components/Sidebar/ToggleCollapseButton.d.ts +1 -0
- package/dist/components/Sidebar/index.d.ts +7 -0
- package/dist/components/icons/CloseSidebarIcon.d.ts +2 -0
- package/dist/components/icons/CloseSidebarMidIcon.d.ts +1 -0
- package/dist/components/icons/ExpandIcon.d.ts +3 -0
- package/dist/components/icons/SendArrowIcon.d.ts +4 -0
- package/dist/components/icons/SendArrowIconGreen.d.ts +4 -0
- package/dist/components/icons/XIcon.d.ts +3 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/index.cjs +30 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.esm.js +3671 -0
- package/dist/material-theme.d.ts +416 -0
- package/dist/stories/Buttons.d.ts +1 -0
- package/dist/stories/Checkbox.d.ts +1 -0
- package/dist/stories/ColorPalette.d.ts +1 -0
- package/dist/stories/Dropdowns.d.ts +1 -0
- package/dist/stories/InputPrompt.d.ts +1 -0
- package/dist/stories/Sidebar.d.ts +1 -0
- package/dist/stories/Typography.d.ts +1 -0
- package/dist/tailwind-theme.d.ts +197 -0
- package/dist/utils/cn.d.ts +7 -0
- package/package.json +88 -0
- package/src/components/HelloWorld.tsx +3 -0
- package/src/components/InputPrompt.tsx +96 -0
- package/src/components/ModalPanel.tsx +31 -0
- package/src/components/PdfViewer/ImageViewer.tsx +167 -0
- package/src/components/PdfViewer/PdfViewer.tsx +53 -0
- package/src/components/PdfViewer/index.ts +2 -0
- package/src/components/PdfViewer/usePageManagement.ts +14 -0
- package/src/components/PdfViewer/usePanning.ts +42 -0
- package/src/components/PdfViewer/useRefDimensions.ts +16 -0
- package/src/components/PdfViewer/useRotation.ts +13 -0
- package/src/components/PdfViewer/useZoom.ts +26 -0
- package/src/components/Sidebar/Button.tsx +20 -0
- package/src/components/Sidebar/Container.tsx +32 -0
- package/src/components/Sidebar/Item.tsx +39 -0
- package/src/components/Sidebar/Layout.tsx +23 -0
- package/src/components/Sidebar/Provider.tsx +47 -0
- package/src/components/Sidebar/SecondaryItem.tsx +39 -0
- package/src/components/Sidebar/ToggleCollapseButton.tsx +24 -0
- package/src/components/Sidebar/index.ts +7 -0
- package/src/components/icons/CloseSidebarIcon.tsx +19 -0
- package/src/components/icons/CloseSidebarMidIcon.tsx +19 -0
- package/src/components/icons/ExpandIcon.tsx +21 -0
- package/src/components/icons/SendArrowIcon.tsx +23 -0
- package/src/components/icons/SendArrowIconGreen.tsx +17 -0
- package/src/components/icons/XIcon.tsx +21 -0
- package/src/components/index.ts +3 -0
- package/src/index.ts +4 -0
- package/src/material-theme.ts +447 -0
- package/src/stories/Buttons.stories.tsx +15 -0
- package/src/stories/Buttons.tsx +52 -0
- package/src/stories/Checkbox.stories.tsx +15 -0
- package/src/stories/Checkbox.tsx +56 -0
- package/src/stories/ColorPalette.stories.tsx +15 -0
- package/src/stories/ColorPalette.tsx +72 -0
- package/src/stories/Dropdowns.stories.tsx +15 -0
- package/src/stories/Dropdowns.tsx +52 -0
- package/src/stories/InputPrompt.stories.tsx +15 -0
- package/src/stories/InputPrompt.tsx +63 -0
- package/src/stories/PDFViewer.stories.tsx +37 -0
- package/src/stories/Sidebar.stories.tsx +15 -0
- package/src/stories/Sidebar.tsx +94 -0
- package/src/stories/Typography.stories.tsx +15 -0
- package/src/stories/Typography.tsx +110 -0
- package/src/style.css +2 -0
- package/src/tailwind-theme.ts +219 -0
- package/src/utils/cn.ts +11 -0
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
export const materialTheme = {
|
|
2
|
+
button: {
|
|
3
|
+
defaultProps: {
|
|
4
|
+
className:
|
|
5
|
+
"items-center normal-case shadow-none hover:shadow-none text-caption-1 font-medium h-10 rounded-lg flex gap-2 px-3 truncate tracking-[0.16px] justify-center",
|
|
6
|
+
ripple: false,
|
|
7
|
+
color: "green",
|
|
8
|
+
},
|
|
9
|
+
styles: {
|
|
10
|
+
sizes: {
|
|
11
|
+
md: {
|
|
12
|
+
fontSize: "text-md",
|
|
13
|
+
className: "py-2",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
variants: {
|
|
17
|
+
filled: {
|
|
18
|
+
blue: {
|
|
19
|
+
color: "!text-white",
|
|
20
|
+
background: "bg-blue-400",
|
|
21
|
+
hover: "hover:bg-blue-500",
|
|
22
|
+
disabled:
|
|
23
|
+
"disabled:bg-blue-200 disabled:!text-blue-600 !opacity-100",
|
|
24
|
+
},
|
|
25
|
+
green: {
|
|
26
|
+
color: "!text-white",
|
|
27
|
+
background: "bg-green-600",
|
|
28
|
+
hover: "hover:bg-green-700",
|
|
29
|
+
disabled:
|
|
30
|
+
"disabled:bg-green-200 disabled:!text-green-600 !opacity-100",
|
|
31
|
+
},
|
|
32
|
+
red: {
|
|
33
|
+
color: "!text-white",
|
|
34
|
+
background: "bg-red-600",
|
|
35
|
+
hover: "hover:bg-red-700",
|
|
36
|
+
disabled: "disabled:bg-red-200 disabled:!text-red-600 !opacity-100",
|
|
37
|
+
},
|
|
38
|
+
gray: {
|
|
39
|
+
color: "text-black",
|
|
40
|
+
background: "bg-gray-50",
|
|
41
|
+
hover: "hover:bg-gray-100",
|
|
42
|
+
disabled:
|
|
43
|
+
"disabled:bg-gray-50 disabled:!text-gray-200 !opacity-100",
|
|
44
|
+
},
|
|
45
|
+
orange: {
|
|
46
|
+
color: "!text-orange-600",
|
|
47
|
+
background: "bg-orange-50",
|
|
48
|
+
hover: "hover:bg-orange-100",
|
|
49
|
+
disabled:
|
|
50
|
+
"disabled:bg-orange-50 disabled:!text-orange-200 !opacity-100",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
outlined: {
|
|
54
|
+
gray: {
|
|
55
|
+
background: "bg-white",
|
|
56
|
+
color: "text-gray-700 border-gray-100",
|
|
57
|
+
hover: "!text-gray-900 hover:bg-gray-100",
|
|
58
|
+
disabled: "disabled:text-gray-500",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
text: {
|
|
62
|
+
green: {
|
|
63
|
+
color: "!text-green-600",
|
|
64
|
+
hover: "hover:bg-gray-100",
|
|
65
|
+
disabled: "disabled:!text-gray-500",
|
|
66
|
+
},
|
|
67
|
+
gray: {
|
|
68
|
+
color: "!text-gray-700",
|
|
69
|
+
hover: "hover:bg-gray-100",
|
|
70
|
+
disabled: "disabled:!text-gray-500",
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
iconButton: {
|
|
77
|
+
defaultProps: {
|
|
78
|
+
className:
|
|
79
|
+
"items-center justify-center normal-case shadow-none hover:shadow-none text-caption-1 font-medium h-10 rounded-lg flex gap-2 px-3 truncate",
|
|
80
|
+
ripple: false,
|
|
81
|
+
color: "green",
|
|
82
|
+
},
|
|
83
|
+
styles: {
|
|
84
|
+
sizes: {
|
|
85
|
+
md: {
|
|
86
|
+
fontSize: "text-md",
|
|
87
|
+
className: "py-2",
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
variants: {
|
|
91
|
+
filled: {
|
|
92
|
+
blue: {
|
|
93
|
+
color: "!text-white",
|
|
94
|
+
background: "bg-blue-400",
|
|
95
|
+
hover: "hover:bg-blue-500",
|
|
96
|
+
disabled:
|
|
97
|
+
"disabled:bg-blue-200 disabled:!text-blue-600 !opacity-100",
|
|
98
|
+
},
|
|
99
|
+
green: {
|
|
100
|
+
color: "!text-white",
|
|
101
|
+
background: "bg-green-600",
|
|
102
|
+
hover: "hover:bg-green-700",
|
|
103
|
+
disabled:
|
|
104
|
+
"disabled:bg-green-200 disabled:!text-green-600 !opacity-100",
|
|
105
|
+
},
|
|
106
|
+
red: {
|
|
107
|
+
color: "!text-white",
|
|
108
|
+
background: "bg-red-600",
|
|
109
|
+
hover: "hover:bg-red-700",
|
|
110
|
+
disabled: "disabled:bg-red-200 disabled:!text-red-600 !opacity-100",
|
|
111
|
+
},
|
|
112
|
+
gray: {
|
|
113
|
+
color: "text-black",
|
|
114
|
+
background: "bg-gray-50",
|
|
115
|
+
hover: "hover:bg-gray-100",
|
|
116
|
+
disabled:
|
|
117
|
+
"disabled:bg-gray-50 disabled:!text-gray-200 !opacity-100",
|
|
118
|
+
},
|
|
119
|
+
orange: {
|
|
120
|
+
color: "!text-orange-600",
|
|
121
|
+
background: "bg-orange-50",
|
|
122
|
+
hover: "hover:bg-orange-100",
|
|
123
|
+
disabled:
|
|
124
|
+
"disabled:bg-orange-50 disabled:!text-orange-200 !opacity-100",
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
outlined: {
|
|
128
|
+
gray: {
|
|
129
|
+
background: "bg-white",
|
|
130
|
+
color: "text-gray-700 border-gray-100",
|
|
131
|
+
hover: "!text-gray-900 hover:bg-gray-100",
|
|
132
|
+
disabled: "disabled:text-gray-500",
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
text: {
|
|
136
|
+
green: {
|
|
137
|
+
color: "!text-green-600",
|
|
138
|
+
hover: "hover:bg-gray-100",
|
|
139
|
+
disabled: "disabled:!text-gray-500",
|
|
140
|
+
},
|
|
141
|
+
gray: {
|
|
142
|
+
color: "!text-gray-700",
|
|
143
|
+
hover: "hover:bg-gray-100",
|
|
144
|
+
disabled: "disabled:!text-gray-500",
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
progress: {
|
|
151
|
+
defaultProps: {
|
|
152
|
+
className: "bg-gray-100",
|
|
153
|
+
barProps: {
|
|
154
|
+
className: "transform transition-all duration-300",
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
styles: {
|
|
158
|
+
sizes: {
|
|
159
|
+
sm: {
|
|
160
|
+
container: {
|
|
161
|
+
initial: { height: "h-1" },
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
menu: {
|
|
168
|
+
styles: {
|
|
169
|
+
base: {
|
|
170
|
+
menu: {
|
|
171
|
+
border: "border border-gray-100",
|
|
172
|
+
borderRadius: "rounded-xl",
|
|
173
|
+
boxShadow: "shadow-sm",
|
|
174
|
+
p: "p-2",
|
|
175
|
+
},
|
|
176
|
+
item: {
|
|
177
|
+
initial: {
|
|
178
|
+
display:
|
|
179
|
+
"flex gap-2 items-center focus-within:outline-none text-gray-900",
|
|
180
|
+
bg: "hover:bg-gray-100",
|
|
181
|
+
p: "p-2",
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
dialog: {
|
|
188
|
+
defaultProps: {
|
|
189
|
+
size: "sm",
|
|
190
|
+
dismiss: {},
|
|
191
|
+
animate: {
|
|
192
|
+
mount: {},
|
|
193
|
+
unmount: {},
|
|
194
|
+
},
|
|
195
|
+
className: "",
|
|
196
|
+
},
|
|
197
|
+
valid: {
|
|
198
|
+
sizes: ["xs", "sm", "md", "lg", "xl", "xxl"],
|
|
199
|
+
},
|
|
200
|
+
styles: {
|
|
201
|
+
base: {
|
|
202
|
+
backdrop: {
|
|
203
|
+
width: "w-full",
|
|
204
|
+
display: "grid",
|
|
205
|
+
placeItems: "place-items-center",
|
|
206
|
+
position: "fixed",
|
|
207
|
+
top: 0,
|
|
208
|
+
left: 0,
|
|
209
|
+
height: "h-screen",
|
|
210
|
+
backgroundColor: "bg-[rgba(0,0,0,0.16)]",
|
|
211
|
+
backgroundOpacity: "bg-opacity-100",
|
|
212
|
+
backdropFilter: "backdrop-blur-none",
|
|
213
|
+
},
|
|
214
|
+
container: {
|
|
215
|
+
height: "h-[450px]",
|
|
216
|
+
position: "relative",
|
|
217
|
+
bg: "bg-white",
|
|
218
|
+
m: "m-4",
|
|
219
|
+
borderRadius: "rounded-xl",
|
|
220
|
+
boxShadow:
|
|
221
|
+
"shadow-[0px_2px_8px_0px_#00000029,0px_2px_2px_0px_#0000000A,0px_8px_8px_-8px_#0000000A]",
|
|
222
|
+
fontSmoothing: "antialiased",
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
sizes: {
|
|
226
|
+
sm: {
|
|
227
|
+
maxWidth: "!max-w-[550px]",
|
|
228
|
+
},
|
|
229
|
+
lg: {
|
|
230
|
+
maxWidth: "!max-w-[700px]",
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
dialogHeader: {
|
|
236
|
+
styles: {
|
|
237
|
+
base: {
|
|
238
|
+
display: "text-gray-900 font-normal",
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
checkbox: {
|
|
243
|
+
defaultProps: {
|
|
244
|
+
color: "custom",
|
|
245
|
+
ripple: false,
|
|
246
|
+
},
|
|
247
|
+
valid: {
|
|
248
|
+
colors: ["blue-gray", "gray", "red", "green", "custom"],
|
|
249
|
+
},
|
|
250
|
+
styles: {
|
|
251
|
+
base: {
|
|
252
|
+
root: {
|
|
253
|
+
display: "inline-flex",
|
|
254
|
+
alignItems: "items-center",
|
|
255
|
+
},
|
|
256
|
+
container: {
|
|
257
|
+
position: "relative",
|
|
258
|
+
display: "flex",
|
|
259
|
+
alignItems: "items-center",
|
|
260
|
+
cursor: "cursor-pointer",
|
|
261
|
+
p: "!p-0",
|
|
262
|
+
borderRadius: "rounded-full",
|
|
263
|
+
},
|
|
264
|
+
input: {
|
|
265
|
+
peer: "peer",
|
|
266
|
+
position: "relative",
|
|
267
|
+
appearance: "appearance-none",
|
|
268
|
+
width: "w-5",
|
|
269
|
+
height: "h-5",
|
|
270
|
+
borderWidth: "border-[1.5px]",
|
|
271
|
+
borderRadius: "rounded-md",
|
|
272
|
+
borderColor: "border-gray-100",
|
|
273
|
+
cursor: "cursor-pointer",
|
|
274
|
+
transition: "transition-all",
|
|
275
|
+
before: {
|
|
276
|
+
content: "before:content-['']",
|
|
277
|
+
display: "before:block",
|
|
278
|
+
bg: "before:bg-transparent",
|
|
279
|
+
width: "before:w-12",
|
|
280
|
+
height: "before:h-12",
|
|
281
|
+
borderRadius: "before:rounded-full",
|
|
282
|
+
position: "before:absolute",
|
|
283
|
+
opacity: "before:opacity-0 hover:before:opacity-10",
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
label: {
|
|
287
|
+
color: "text-gray-700",
|
|
288
|
+
fontWeight: "font-light",
|
|
289
|
+
userSelect: "select-none",
|
|
290
|
+
cursor: "cursor-pointer",
|
|
291
|
+
mt: "mt-px",
|
|
292
|
+
px: "px-2",
|
|
293
|
+
},
|
|
294
|
+
icon: {
|
|
295
|
+
display: "flex",
|
|
296
|
+
alignItems: "items-center",
|
|
297
|
+
justifyContent: "justify-center",
|
|
298
|
+
width: "w-5",
|
|
299
|
+
height: "h-5",
|
|
300
|
+
color: "text-green-600",
|
|
301
|
+
position: "absolute",
|
|
302
|
+
pointerEvents: "pointer-events-none",
|
|
303
|
+
opacity: "opacity-0 peer-checked:opacity-100",
|
|
304
|
+
transition: "transition-opacity",
|
|
305
|
+
},
|
|
306
|
+
disabled: {
|
|
307
|
+
opacity: "opacity-50",
|
|
308
|
+
pointerEvents: "pointer-events-none",
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
colors: {
|
|
312
|
+
custom: {
|
|
313
|
+
border: "checked:border-green-600",
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
},
|
|
318
|
+
popover: {
|
|
319
|
+
defaultProps: {
|
|
320
|
+
placement: "top",
|
|
321
|
+
offset: 5,
|
|
322
|
+
dismiss: {},
|
|
323
|
+
animate: {
|
|
324
|
+
unmount: {},
|
|
325
|
+
mount: {},
|
|
326
|
+
},
|
|
327
|
+
className: "",
|
|
328
|
+
},
|
|
329
|
+
styles: {
|
|
330
|
+
base: {
|
|
331
|
+
bg: "bg-white",
|
|
332
|
+
p: "p-4",
|
|
333
|
+
borderWidth: "border",
|
|
334
|
+
borderColor: "border-gray-200",
|
|
335
|
+
borderRadius: "rounded-lg",
|
|
336
|
+
boxShadow:
|
|
337
|
+
"[box-shadow:0px_2px_2px_0px_#0000000A,_0px_8px_8px_-8px_#0000000A]",
|
|
338
|
+
fontSize: "text-sm",
|
|
339
|
+
fontWeight: "font-normal",
|
|
340
|
+
color: "text-blue-gray-500",
|
|
341
|
+
outline: "focus:outline-none",
|
|
342
|
+
overflowWrap: "break-words",
|
|
343
|
+
whiteSpace: "whitespace-normal",
|
|
344
|
+
},
|
|
345
|
+
},
|
|
346
|
+
},
|
|
347
|
+
switch: {
|
|
348
|
+
defaultProps: {
|
|
349
|
+
color: "blue",
|
|
350
|
+
label: "",
|
|
351
|
+
ripple: true,
|
|
352
|
+
className: "",
|
|
353
|
+
disabled: false,
|
|
354
|
+
containerProps: undefined,
|
|
355
|
+
labelProps: undefined,
|
|
356
|
+
circleProps: undefined,
|
|
357
|
+
},
|
|
358
|
+
valid: {
|
|
359
|
+
colors: [
|
|
360
|
+
"blue-gray",
|
|
361
|
+
"gray",
|
|
362
|
+
"brown",
|
|
363
|
+
"deep-orange",
|
|
364
|
+
"orange",
|
|
365
|
+
"amber",
|
|
366
|
+
"yellow",
|
|
367
|
+
"lime",
|
|
368
|
+
"light-green",
|
|
369
|
+
"green",
|
|
370
|
+
"teal",
|
|
371
|
+
"cyan",
|
|
372
|
+
"light-blue",
|
|
373
|
+
"blue",
|
|
374
|
+
"indigo",
|
|
375
|
+
"deep-purple",
|
|
376
|
+
"purple",
|
|
377
|
+
"pink",
|
|
378
|
+
"red",
|
|
379
|
+
],
|
|
380
|
+
},
|
|
381
|
+
styles: {
|
|
382
|
+
base: {
|
|
383
|
+
input: {
|
|
384
|
+
background: "bg-gray-500",
|
|
385
|
+
},
|
|
386
|
+
circle: {
|
|
387
|
+
borderColor: "border-gray-500",
|
|
388
|
+
borderRadius: "rounded-full",
|
|
389
|
+
boxShadow: "shadow-md",
|
|
390
|
+
position: "absolute",
|
|
391
|
+
top: "top-2/4",
|
|
392
|
+
left: "-left-1",
|
|
393
|
+
transform: "-translate-y-2/4 peer-checked:translate-x-full",
|
|
394
|
+
transition: "transition-all duration-300",
|
|
395
|
+
cursor: "cursor-pointer",
|
|
396
|
+
before: {
|
|
397
|
+
content: "before:content['']",
|
|
398
|
+
display: "before:block",
|
|
399
|
+
bg: "before:bg-blue-gray-500",
|
|
400
|
+
width: "before:w-10",
|
|
401
|
+
height: "before:h-10",
|
|
402
|
+
borderRadius: "before:rounded-full",
|
|
403
|
+
position: "before:absolute",
|
|
404
|
+
top: "before:top-2/4",
|
|
405
|
+
left: "before:left-2/4",
|
|
406
|
+
transform: "before:-translate-y-2/4 before:-translate-x-2/4",
|
|
407
|
+
transition: "before:transition-opacity",
|
|
408
|
+
opacity: "before:opacity-0 hover:before:opacity-10",
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
ripple: {
|
|
412
|
+
display: "inline-block",
|
|
413
|
+
top: "top-2/4",
|
|
414
|
+
left: "left-2/4",
|
|
415
|
+
transform: "-translate-x-2/4 -translate-y-2/4",
|
|
416
|
+
p: "p-5",
|
|
417
|
+
borderRadius: "rounded-full",
|
|
418
|
+
},
|
|
419
|
+
label: {
|
|
420
|
+
color: "text-gray-700",
|
|
421
|
+
fontWeight: "font-light",
|
|
422
|
+
userSelect: "select-none",
|
|
423
|
+
cursor: "cursor-pointer",
|
|
424
|
+
mt: "mt-px",
|
|
425
|
+
ml: "ml-3",
|
|
426
|
+
mb: "mb-0",
|
|
427
|
+
},
|
|
428
|
+
disabled: {
|
|
429
|
+
opacity: "opacity-50",
|
|
430
|
+
pointerEvents: "pointer-events-none",
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
colors: {
|
|
434
|
+
gray: {
|
|
435
|
+
input: "checked:bg-blue-gray-100",
|
|
436
|
+
circle: "peer-checked:border-blue-gray-100",
|
|
437
|
+
before: "peer-checked:before:bg-gray-500",
|
|
438
|
+
},
|
|
439
|
+
green: {
|
|
440
|
+
input: "checked:bg-green-600",
|
|
441
|
+
circle: "peer-checked:border-green-600",
|
|
442
|
+
before: "peer-checked:before:bg-green-600",
|
|
443
|
+
},
|
|
444
|
+
},
|
|
445
|
+
},
|
|
446
|
+
},
|
|
447
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Buttons } from "./Buttons";
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Design System/Buttons",
|
|
6
|
+
component: Buttons,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "fullscreen",
|
|
9
|
+
},
|
|
10
|
+
} satisfies Meta<typeof Buttons>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Default: Story = {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Button, IconButton } from "@material-tailwind/react";
|
|
2
|
+
import { Icon } from "@iconify/react";
|
|
3
|
+
|
|
4
|
+
export const Buttons = () => (
|
|
5
|
+
<div className="p-8 grid gap-4">
|
|
6
|
+
<div className="flex gap-4">
|
|
7
|
+
<IconButton color="blue">
|
|
8
|
+
<Icon icon="lucide:ship" />
|
|
9
|
+
</IconButton>
|
|
10
|
+
|
|
11
|
+
<IconButton color="green">
|
|
12
|
+
<Icon icon="lucide:ship" />
|
|
13
|
+
</IconButton>
|
|
14
|
+
|
|
15
|
+
<IconButton color="gray" variant="text">
|
|
16
|
+
<Icon icon="lucide:ship" />
|
|
17
|
+
</IconButton>
|
|
18
|
+
|
|
19
|
+
<IconButton color="orange">
|
|
20
|
+
<Icon icon="lucide:ship" />
|
|
21
|
+
</IconButton>
|
|
22
|
+
|
|
23
|
+
<IconButton color="red">
|
|
24
|
+
<Icon icon="lucide:ship" />
|
|
25
|
+
</IconButton>
|
|
26
|
+
|
|
27
|
+
<IconButton variant="outlined" color="gray">
|
|
28
|
+
<Icon icon="lucide:ship" />
|
|
29
|
+
</IconButton>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div className="flex gap-4">
|
|
33
|
+
<Button color="blue" className="tracking-[0.16px]">
|
|
34
|
+
Lorem ipsum
|
|
35
|
+
</Button>
|
|
36
|
+
|
|
37
|
+
<Button color="green">Lorem ipsum</Button>
|
|
38
|
+
|
|
39
|
+
<Button color="gray" variant="text">
|
|
40
|
+
Lorem ipsum
|
|
41
|
+
</Button>
|
|
42
|
+
|
|
43
|
+
<Button color="orange">Lorem ipsum</Button>
|
|
44
|
+
|
|
45
|
+
<Button color="red">Lorem ipsum</Button>
|
|
46
|
+
|
|
47
|
+
<Button variant="outlined" color="gray">
|
|
48
|
+
Lorem ipsum
|
|
49
|
+
</Button>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { CheckboxItem } from "./Checkbox";
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Design System/CheckboxItem",
|
|
6
|
+
component: CheckboxItem,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "fullscreen",
|
|
9
|
+
},
|
|
10
|
+
} satisfies Meta<typeof CheckboxItem>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Default: Story = {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Checkbox } from "@material-tailwind/react";
|
|
2
|
+
import { Icon } from "@iconify/react";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
|
|
5
|
+
export const CheckboxItem = () => {
|
|
6
|
+
const [isChecked, setIsChecked] = useState(false);
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<div className="p-8 grid gap-4">
|
|
10
|
+
<div className="flex flex-col gap-2">
|
|
11
|
+
<div className="font-medium text-lg">Default</div>
|
|
12
|
+
<Checkbox
|
|
13
|
+
checked={isChecked}
|
|
14
|
+
icon={<Icon icon="lucide:check" className="w-3.5 h-3.5" />}
|
|
15
|
+
onChange={() => {
|
|
16
|
+
setIsChecked(!isChecked);
|
|
17
|
+
}}
|
|
18
|
+
containerProps={{
|
|
19
|
+
className: "pl-1 pr-2 pb-0 pt-1",
|
|
20
|
+
}}
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div className="flex flex-col gap-2">
|
|
25
|
+
<div className="font-medium text-lg">With label</div>
|
|
26
|
+
<Checkbox
|
|
27
|
+
label="Remember Me"
|
|
28
|
+
checked={isChecked}
|
|
29
|
+
icon={<Icon icon="lucide:check" className="w-3.5 h-3.5" />}
|
|
30
|
+
onChange={() => {
|
|
31
|
+
setIsChecked(!isChecked);
|
|
32
|
+
}}
|
|
33
|
+
containerProps={{
|
|
34
|
+
className: "pl-1 pr-2 pb-0 pt-1",
|
|
35
|
+
}}
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div className="flex flex-col gap-2">
|
|
40
|
+
<div className="font-medium text-lg">Disabled</div>
|
|
41
|
+
<Checkbox
|
|
42
|
+
label="Remember Me"
|
|
43
|
+
checked={isChecked}
|
|
44
|
+
disabled={true}
|
|
45
|
+
icon={<Icon icon="lucide:check" className="w-3.5 h-3.5" />}
|
|
46
|
+
onChange={() => {
|
|
47
|
+
setIsChecked(!isChecked);
|
|
48
|
+
}}
|
|
49
|
+
containerProps={{
|
|
50
|
+
className: "pl-1 pr-2 pb-0 pt-1",
|
|
51
|
+
}}
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { ColorPalette } from "./ColorPalette";
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Design System/Color Palette",
|
|
6
|
+
component: ColorPalette,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "fullscreen",
|
|
9
|
+
},
|
|
10
|
+
} satisfies Meta<typeof ColorPalette>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Default: Story = {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
const colorGroups = {
|
|
4
|
+
Gray: ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"],
|
|
5
|
+
Green: ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"],
|
|
6
|
+
Blue: ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"],
|
|
7
|
+
Red: ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"],
|
|
8
|
+
Orange: ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"],
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const ColorPalette = () => {
|
|
12
|
+
return (
|
|
13
|
+
<div className="p-8 space-y-8">
|
|
14
|
+
<h2 className="text-2xl font-bold mb-4">Color Palette</h2>
|
|
15
|
+
|
|
16
|
+
{Object.entries(colorGroups).map(([colorName, shades]) => (
|
|
17
|
+
<div key={colorName}>
|
|
18
|
+
<h3 className="text-lg font-semibold mb-4">{colorName}</h3>
|
|
19
|
+
<div className="grid grid-cols-10 gap-2">
|
|
20
|
+
{shades.map((shade) => {
|
|
21
|
+
const colorClass = `bg-${colorName.toLowerCase()}-${shade}`;
|
|
22
|
+
return (
|
|
23
|
+
<div key={shade} className="text-center">
|
|
24
|
+
<div
|
|
25
|
+
className={`${colorClass} h-20 rounded-md border border-gray-200`}
|
|
26
|
+
/>
|
|
27
|
+
<p className="text-xs mt-1">{shade}</p>
|
|
28
|
+
<p className="text-xs text-gray-500">
|
|
29
|
+
{colorName.toLowerCase()}-{shade}
|
|
30
|
+
</p>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
})}
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
))}
|
|
37
|
+
|
|
38
|
+
<div>
|
|
39
|
+
<h3 className="text-lg font-semibold mb-4">Special Colors</h3>
|
|
40
|
+
<div className="grid grid-cols-6 gap-4">
|
|
41
|
+
<div className="text-center">
|
|
42
|
+
<div className="bg-brand-purple h-20 rounded-md border border-gray-200" />
|
|
43
|
+
<p className="text-xs mt-1">Brand Purple</p>
|
|
44
|
+
<p className="text-xs text-gray-500">#ab68ff</p>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div>
|
|
50
|
+
<h3 className="text-lg font-semibold mb-4">CSS Variables</h3>
|
|
51
|
+
<div className="grid grid-cols-4 gap-4">
|
|
52
|
+
<div className="text-center">
|
|
53
|
+
<div className="bg-surface-primary h-20 rounded-md border border-gray-200" />
|
|
54
|
+
<p className="text-xs mt-1">Surface Primary</p>
|
|
55
|
+
</div>
|
|
56
|
+
<div className="text-center">
|
|
57
|
+
<div className="bg-surface-secondary h-20 rounded-md border border-gray-200" />
|
|
58
|
+
<p className="text-xs mt-1">Surface Secondary</p>
|
|
59
|
+
</div>
|
|
60
|
+
<div className="text-center">
|
|
61
|
+
<div className="bg-surface-tertiary h-20 rounded-md border border-gray-200" />
|
|
62
|
+
<p className="text-xs mt-1">Surface Tertiary</p>
|
|
63
|
+
</div>
|
|
64
|
+
<div className="text-center">
|
|
65
|
+
<div className="bg-surface-submit h-20 rounded-md border border-gray-200" />
|
|
66
|
+
<p className="text-xs mt-1">Surface Submit</p>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Dropdowns } from "./Dropdowns";
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Design System/Dropdowns",
|
|
6
|
+
component: Dropdowns,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "fullscreen",
|
|
9
|
+
},
|
|
10
|
+
} satisfies Meta<typeof Dropdowns>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Default: Story = {};
|