@fpkit/acss 3.6.0 → 3.7.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/libs/{chunk-URBGDUFN.cjs → chunk-75YQDONV.cjs} +3 -3
- package/libs/chunk-AOFQDQVS.cjs +17 -0
- package/libs/chunk-AOFQDQVS.cjs.map +1 -0
- package/libs/{chunk-ZF6Y7W57.js → chunk-G3TFKMWB.js} +2 -2
- package/libs/chunk-Q7OAQLUT.js +10 -0
- package/libs/chunk-Q7OAQLUT.js.map +1 -0
- package/libs/components/dialog/dialog.cjs +4 -4
- package/libs/components/dialog/dialog.js +2 -2
- package/libs/components/heading/heading.cjs +2 -2
- package/libs/components/heading/heading.d.cts +1 -1
- package/libs/components/heading/heading.d.ts +1 -1
- package/libs/components/heading/heading.js +1 -1
- package/libs/components/title/title.css +1 -0
- package/libs/components/title/title.css.map +1 -0
- package/libs/components/title/title.min.css +3 -0
- package/libs/{heading-7446cb46.d.ts → heading-81eef89a.d.ts} +42 -0
- package/libs/index.cjs +5 -5
- package/libs/index.css +1 -1
- package/libs/index.css.map +1 -1
- package/libs/index.d.cts +1 -1
- package/libs/index.d.ts +1 -1
- package/libs/index.js +2 -2
- package/package.json +2 -2
- package/src/components/box/box.stories.tsx +1 -1
- package/src/components/cluster/cluster.stories.tsx +1 -1
- package/src/components/col/README.mdx +233 -9
- package/src/components/col/STYLES.mdx +1380 -0
- package/src/components/col/col.stories.tsx +1 -1
- package/src/components/grid/grid.stories.tsx +130 -35
- package/src/components/row/row.stories.tsx +1 -1
- package/src/components/stack/stack.stories.tsx +219 -60
- package/src/components/title/README.mdx +87 -1
- package/src/components/title/STYLES.mdx +501 -0
- package/src/components/title/title.scss +51 -0
- package/src/components/title/title.stories.tsx +158 -0
- package/src/components/title/title.test.tsx +113 -0
- package/src/components/title/title.tsx +53 -1
- package/src/index.scss +1 -0
- package/src/sass/columns.stories.tsx +434 -10
- package/src/styles/index.css +74 -0
- package/src/styles/index.css.map +1 -1
- package/src/styles/title/title.css +75 -0
- package/src/styles/title/title.css.map +1 -0
- package/libs/chunk-2C3YLBWP.cjs +0 -17
- package/libs/chunk-2C3YLBWP.cjs.map +0 -1
- package/libs/chunk-KDMX3FAW.js +0 -10
- package/libs/chunk-KDMX3FAW.js.map +0 -1
- /package/libs/{chunk-URBGDUFN.cjs.map → chunk-75YQDONV.cjs.map} +0 -0
- /package/libs/{chunk-ZF6Y7W57.js.map → chunk-G3TFKMWB.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import "./grid.scss";
|
|
|
7
7
|
const meta: Meta<typeof Grid> = {
|
|
8
8
|
title: "FP.React Components/Layout/Grid",
|
|
9
9
|
component: Grid,
|
|
10
|
-
tags: ["autodocs", "
|
|
10
|
+
tags: ["autodocs", "beta", "layout"],
|
|
11
11
|
parameters: {
|
|
12
12
|
docs: {
|
|
13
13
|
description: {
|
|
@@ -187,32 +187,71 @@ export const Dashboard: Story = {
|
|
|
187
187
|
render: () => (
|
|
188
188
|
<Grid columns={12} gap="md">
|
|
189
189
|
<GridItem span={12}>
|
|
190
|
-
<div
|
|
190
|
+
<div
|
|
191
|
+
style={{
|
|
192
|
+
padding: "1rem",
|
|
193
|
+
backgroundColor: "#0066cc",
|
|
194
|
+
color: "white",
|
|
195
|
+
borderRadius: "0.5rem",
|
|
196
|
+
}}
|
|
197
|
+
>
|
|
191
198
|
Header (Full Width)
|
|
192
199
|
</div>
|
|
193
200
|
</GridItem>
|
|
194
201
|
<GridItem span={4}>
|
|
195
|
-
<div
|
|
202
|
+
<div
|
|
203
|
+
style={{
|
|
204
|
+
padding: "1.5rem",
|
|
205
|
+
backgroundColor: "#f0f0f0",
|
|
206
|
+
borderRadius: "0.5rem",
|
|
207
|
+
minHeight: "15rem",
|
|
208
|
+
}}
|
|
209
|
+
>
|
|
196
210
|
Sidebar (4 cols)
|
|
197
211
|
</div>
|
|
198
212
|
</GridItem>
|
|
199
213
|
<GridItem span={8}>
|
|
200
|
-
<div
|
|
214
|
+
<div
|
|
215
|
+
style={{
|
|
216
|
+
padding: "1.5rem",
|
|
217
|
+
backgroundColor: "#e8f4f8",
|
|
218
|
+
borderRadius: "0.5rem",
|
|
219
|
+
minHeight: "15rem",
|
|
220
|
+
}}
|
|
221
|
+
>
|
|
201
222
|
Main Content (8 cols)
|
|
202
223
|
</div>
|
|
203
224
|
</GridItem>
|
|
204
225
|
<GridItem span={4}>
|
|
205
|
-
<div
|
|
226
|
+
<div
|
|
227
|
+
style={{
|
|
228
|
+
padding: "1rem",
|
|
229
|
+
backgroundColor: "#f0f0f0",
|
|
230
|
+
borderRadius: "0.5rem",
|
|
231
|
+
}}
|
|
232
|
+
>
|
|
206
233
|
Card 1
|
|
207
234
|
</div>
|
|
208
235
|
</GridItem>
|
|
209
236
|
<GridItem span={4}>
|
|
210
|
-
<div
|
|
237
|
+
<div
|
|
238
|
+
style={{
|
|
239
|
+
padding: "1rem",
|
|
240
|
+
backgroundColor: "#f0f0f0",
|
|
241
|
+
borderRadius: "0.5rem",
|
|
242
|
+
}}
|
|
243
|
+
>
|
|
211
244
|
Card 2
|
|
212
245
|
</div>
|
|
213
246
|
</GridItem>
|
|
214
247
|
<GridItem span={4}>
|
|
215
|
-
<div
|
|
248
|
+
<div
|
|
249
|
+
style={{
|
|
250
|
+
padding: "1rem",
|
|
251
|
+
backgroundColor: "#f0f0f0",
|
|
252
|
+
borderRadius: "0.5rem",
|
|
253
|
+
}}
|
|
254
|
+
>
|
|
216
255
|
Card 3
|
|
217
256
|
</div>
|
|
218
257
|
</GridItem>
|
|
@@ -229,7 +268,9 @@ export const GapSizes: Story = {
|
|
|
229
268
|
<div style={{ display: "flex", flexDirection: "column", gap: "2rem" }}>
|
|
230
269
|
{["xs", "sm", "md", "lg", "xl"].map((size) => (
|
|
231
270
|
<div key={size}>
|
|
232
|
-
<h4 style={{ margin: 0, marginBottom: "0.5rem" }}>
|
|
271
|
+
<h4 style={{ margin: 0, marginBottom: "0.5rem" }}>
|
|
272
|
+
Gap {size.toUpperCase()}
|
|
273
|
+
</h4>
|
|
233
274
|
<Grid columns={4} gap={size as SpacingScale}>
|
|
234
275
|
{[...Array(4)].map((_, i) => (
|
|
235
276
|
<div
|
|
@@ -305,16 +346,40 @@ export const RowSpan: Story = {
|
|
|
305
346
|
Tall Item (2 rows)
|
|
306
347
|
</div>
|
|
307
348
|
</GridItem>
|
|
308
|
-
<div
|
|
349
|
+
<div
|
|
350
|
+
style={{
|
|
351
|
+
padding: "1.5rem",
|
|
352
|
+
backgroundColor: "#f0f0f0",
|
|
353
|
+
borderRadius: "0.5rem",
|
|
354
|
+
}}
|
|
355
|
+
>
|
|
309
356
|
Item 2
|
|
310
357
|
</div>
|
|
311
|
-
<div
|
|
358
|
+
<div
|
|
359
|
+
style={{
|
|
360
|
+
padding: "1.5rem",
|
|
361
|
+
backgroundColor: "#f0f0f0",
|
|
362
|
+
borderRadius: "0.5rem",
|
|
363
|
+
}}
|
|
364
|
+
>
|
|
312
365
|
Item 3
|
|
313
366
|
</div>
|
|
314
|
-
<div
|
|
367
|
+
<div
|
|
368
|
+
style={{
|
|
369
|
+
padding: "1.5rem",
|
|
370
|
+
backgroundColor: "#f0f0f0",
|
|
371
|
+
borderRadius: "0.5rem",
|
|
372
|
+
}}
|
|
373
|
+
>
|
|
315
374
|
Item 4
|
|
316
375
|
</div>
|
|
317
|
-
<div
|
|
376
|
+
<div
|
|
377
|
+
style={{
|
|
378
|
+
padding: "1.5rem",
|
|
379
|
+
backgroundColor: "#f0f0f0",
|
|
380
|
+
borderRadius: "0.5rem",
|
|
381
|
+
}}
|
|
382
|
+
>
|
|
318
383
|
Item 5
|
|
319
384
|
</div>
|
|
320
385
|
</Grid>
|
|
@@ -329,7 +394,9 @@ export const Alignment: Story = {
|
|
|
329
394
|
render: () => (
|
|
330
395
|
<div style={{ display: "flex", flexDirection: "column", gap: "2rem" }}>
|
|
331
396
|
<div>
|
|
332
|
-
<h4 style={{ margin: 0, marginBottom: "0.5rem" }}>
|
|
397
|
+
<h4 style={{ margin: 0, marginBottom: "0.5rem" }}>
|
|
398
|
+
Justify Items: Center
|
|
399
|
+
</h4>
|
|
333
400
|
<Grid columns={3} gap="md" justifyItems="center">
|
|
334
401
|
{[...Array(3)].map((_, i) => (
|
|
335
402
|
<div
|
|
@@ -348,8 +415,15 @@ export const Alignment: Story = {
|
|
|
348
415
|
</Grid>
|
|
349
416
|
</div>
|
|
350
417
|
<div>
|
|
351
|
-
<h4 style={{ margin: 0, marginBottom: "0.5rem" }}>
|
|
352
|
-
|
|
418
|
+
<h4 style={{ margin: 0, marginBottom: "0.5rem" }}>
|
|
419
|
+
Align Items: Center
|
|
420
|
+
</h4>
|
|
421
|
+
<Grid
|
|
422
|
+
columns={3}
|
|
423
|
+
gap="md"
|
|
424
|
+
alignItems="center"
|
|
425
|
+
styles={{ minHeight: "10rem" }}
|
|
426
|
+
>
|
|
353
427
|
{[...Array(3)].map((_, i) => (
|
|
354
428
|
<div
|
|
355
429
|
key={i}
|
|
@@ -378,8 +452,13 @@ export const ColumnCounts: Story = {
|
|
|
378
452
|
<div style={{ display: "flex", flexDirection: "column", gap: "2rem" }}>
|
|
379
453
|
{[1, 2, 3, 4, 5, 6].map((cols) => (
|
|
380
454
|
<div key={cols}>
|
|
381
|
-
<h4 style={{ margin: 0, marginBottom: "0.5rem" }}>
|
|
382
|
-
|
|
455
|
+
<h4 style={{ margin: 0, marginBottom: "0.5rem" }}>
|
|
456
|
+
{cols} Column{cols > 1 ? "s" : ""}
|
|
457
|
+
</h4>
|
|
458
|
+
<Grid
|
|
459
|
+
columns={cols as 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12}
|
|
460
|
+
gap="sm"
|
|
461
|
+
>
|
|
383
462
|
{[...Array(cols)].map((_, i) => (
|
|
384
463
|
<div
|
|
385
464
|
key={i}
|
|
@@ -408,7 +487,9 @@ export const ColumnCounts: Story = {
|
|
|
408
487
|
export const FormLayout: Story = {
|
|
409
488
|
render: () => (
|
|
410
489
|
<Grid columns={2} gap="md" styles={{ maxWidth: "40rem" }}>
|
|
411
|
-
<label htmlFor="name" style={{ alignSelf: "center", fontWeight: "500" }}>
|
|
490
|
+
<label htmlFor="name" style={{ alignSelf: "center", fontWeight: "500" }}>
|
|
491
|
+
Name
|
|
492
|
+
</label>
|
|
412
493
|
<input
|
|
413
494
|
id="name"
|
|
414
495
|
type="text"
|
|
@@ -419,7 +500,9 @@ export const FormLayout: Story = {
|
|
|
419
500
|
borderRadius: "0.25rem",
|
|
420
501
|
}}
|
|
421
502
|
/>
|
|
422
|
-
<label htmlFor="email" style={{ alignSelf: "center", fontWeight: "500" }}>
|
|
503
|
+
<label htmlFor="email" style={{ alignSelf: "center", fontWeight: "500" }}>
|
|
504
|
+
Email
|
|
505
|
+
</label>
|
|
423
506
|
<input
|
|
424
507
|
id="email"
|
|
425
508
|
type="email"
|
|
@@ -430,7 +513,12 @@ export const FormLayout: Story = {
|
|
|
430
513
|
borderRadius: "0.25rem",
|
|
431
514
|
}}
|
|
432
515
|
/>
|
|
433
|
-
<label
|
|
516
|
+
<label
|
|
517
|
+
htmlFor="message"
|
|
518
|
+
style={{ alignSelf: "start", fontWeight: "500", paddingTop: "0.5rem" }}
|
|
519
|
+
>
|
|
520
|
+
Message
|
|
521
|
+
</label>
|
|
434
522
|
<textarea
|
|
435
523
|
id="message"
|
|
436
524
|
rows={4}
|
|
@@ -466,21 +554,28 @@ export const FormLayout: Story = {
|
|
|
466
554
|
*/
|
|
467
555
|
export const SemanticList: Story = {
|
|
468
556
|
render: () => (
|
|
469
|
-
<Grid
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
557
|
+
<Grid
|
|
558
|
+
as="ul"
|
|
559
|
+
columns={3}
|
|
560
|
+
gap="md"
|
|
561
|
+
styles={{ listStyle: "none", padding: 0 }}
|
|
562
|
+
>
|
|
563
|
+
{["Item 1", "Item 2", "Item 3", "Item 4", "Item 5", "Item 6"].map(
|
|
564
|
+
(item) => (
|
|
565
|
+
<GridItem
|
|
566
|
+
as="li"
|
|
567
|
+
key={item}
|
|
568
|
+
styles={{
|
|
569
|
+
padding: "1.5rem",
|
|
570
|
+
backgroundColor: "#f8f9fa",
|
|
571
|
+
border: "1px solid #e0e0e0",
|
|
572
|
+
borderRadius: "0.25rem",
|
|
573
|
+
}}
|
|
574
|
+
>
|
|
575
|
+
{item}
|
|
576
|
+
</GridItem>
|
|
577
|
+
)
|
|
578
|
+
)}
|
|
484
579
|
</Grid>
|
|
485
580
|
),
|
|
486
581
|
};
|