@fpkit/acss 3.5.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/alert/alert.css +1 -0
- package/libs/components/alert/alert.css.map +1 -0
- package/libs/components/alert/alert.min.css +3 -0
- package/libs/components/badge/badge.css +1 -0
- package/libs/components/badge/badge.css.map +1 -0
- package/libs/components/badge/badge.min.css +3 -0
- package/libs/components/box/box.css +1 -0
- package/libs/components/box/box.css.map +1 -0
- package/libs/components/box/box.min.css +3 -0
- package/libs/components/breadcrumbs/breadcrumb.css +1 -0
- package/libs/components/breadcrumbs/breadcrumb.css.map +1 -0
- package/libs/components/breadcrumbs/breadcrumb.min.css +3 -0
- package/libs/components/buttons/button.css +1 -0
- package/libs/components/buttons/button.css.map +1 -0
- package/libs/components/buttons/button.min.css +3 -0
- package/libs/components/cards/card-style.css +1 -0
- package/libs/components/cards/card-style.css.map +1 -0
- package/libs/components/cards/card-style.min.css +3 -0
- package/libs/components/cards/card.css +1 -0
- package/libs/components/cards/card.css.map +1 -0
- package/libs/components/cards/card.min.css +3 -0
- package/libs/components/cluster/cluster.css +1 -0
- package/libs/components/cluster/cluster.css.map +1 -0
- package/libs/components/cluster/cluster.min.css +3 -0
- package/libs/components/details/details.css +1 -0
- package/libs/components/details/details.css.map +1 -0
- package/libs/components/details/details.min.css +3 -0
- package/libs/components/dialog/dialog.cjs +4 -4
- package/libs/components/dialog/dialog.css +1 -0
- package/libs/components/dialog/dialog.css.map +1 -0
- package/libs/components/dialog/dialog.js +2 -2
- package/libs/components/dialog/dialog.min.css +3 -0
- package/libs/components/flexbox/flex.css +1 -0
- package/libs/components/flexbox/flex.css.map +1 -0
- package/libs/components/flexbox/flex.min.css +3 -0
- package/libs/components/form/form.css +1 -0
- package/libs/components/form/form.css.map +1 -0
- package/libs/components/form/form.min.css +3 -0
- package/libs/components/grid/grid.css +1 -0
- package/libs/components/grid/grid.css.map +1 -0
- package/libs/components/grid/grid.min.css +3 -0
- 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/icons/icon.css +1 -0
- package/libs/components/icons/icon.css.map +1 -0
- package/libs/components/icons/icon.min.css +3 -0
- package/libs/components/images/img.css +1 -0
- package/libs/components/images/img.css.map +1 -0
- package/libs/components/images/img.min.css +3 -0
- package/libs/components/layout/landmarks.css +1 -0
- package/libs/components/layout/landmarks.css.map +1 -0
- package/libs/components/layout/landmarks.min.css +3 -0
- package/libs/components/link/link.css +1 -0
- package/libs/components/link/link.css.map +1 -0
- package/libs/components/link/link.min.css +3 -0
- package/libs/components/list/list.css +1 -0
- package/libs/components/list/list.css.map +1 -0
- package/libs/components/list/list.min.css +3 -0
- package/libs/components/nav/nav.css +1 -0
- package/libs/components/nav/nav.css.map +1 -0
- package/libs/components/nav/nav.min.css +3 -0
- package/libs/components/progress/progress.css +1 -0
- package/libs/components/progress/progress.css.map +1 -0
- package/libs/components/progress/progress.min.css +3 -0
- package/libs/components/stack/stack.css +1 -0
- package/libs/components/stack/stack.css.map +1 -0
- package/libs/components/stack/stack.min.css +3 -0
- package/libs/components/styles/index.css +1 -0
- package/libs/components/styles/index.css.map +1 -0
- package/libs/components/styles/index.min.css +3 -0
- package/libs/components/tag/tag.css +1 -0
- package/libs/components/tag/tag.css.map +1 -0
- package/libs/components/tag/tag.min.css +3 -0
- package/libs/components/text-to-speech/text-to-speech.css +1 -0
- package/libs/components/text-to-speech/text-to-speech.css.map +1 -0
- package/libs/components/text-to-speech/text-to-speech.min.css +3 -0
- 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 +10 -10
- package/libs/index.cjs.map +1 -1
- package/libs/index.css +1 -0
- package/libs/index.css.map +1 -0
- package/libs/index.d.cts +25 -8
- package/libs/index.d.ts +25 -8
- package/libs/index.js +6 -6
- package/libs/index.js.map +1 -1
- 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 +1614 -8
- package/src/components/grid/grid.stories.tsx +130 -35
- package/src/components/row/row.stories.tsx +1 -1
- package/src/components/row/row.tsx +9 -0
- package/src/components/row/row.types.ts +24 -7
- 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.scss +122 -3
- package/src/sass/columns.stories.tsx +434 -10
- package/src/styles/index.css +533 -3
- 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
|
@@ -416,7 +416,7 @@ export const CustomGapSpacing: Story = {
|
|
|
416
416
|
};
|
|
417
417
|
|
|
418
418
|
/**
|
|
419
|
-
* Responsive behavior demonstration.
|
|
419
|
+
* Responsive behavior demonstration with actual responsive classes.
|
|
420
420
|
* Resize browser to see columns stack on mobile (< 768px) and spread on desktop.
|
|
421
421
|
*/
|
|
422
422
|
export const ResponsiveBehavior: Story = {
|
|
@@ -431,19 +431,24 @@ export const ResponsiveBehavior: Story = {
|
|
|
431
431
|
fontSize: "0.875rem",
|
|
432
432
|
}}
|
|
433
433
|
>
|
|
434
|
-
<strong>💡 Try this:</strong> Resize your browser or use DevTools responsive
|
|
435
|
-
|
|
436
|
-
<br />• <strong>
|
|
434
|
+
<strong>💡 Try this:</strong> Resize your browser or use DevTools responsive
|
|
435
|
+
mode.
|
|
436
|
+
<br />• <strong>Mobile (< 480px):</strong> 1 column (100% width)
|
|
437
|
+
<br />• <strong>Tablet (≥ 480px):</strong> 2 columns (50% width each)
|
|
438
|
+
<br />• <strong>Desktop (≥ 1024px):</strong> 3 columns (33.33% width each)
|
|
437
439
|
</div>
|
|
438
440
|
<div className="col-row">
|
|
439
|
-
<div className="col-4" style={demoCardStyle}>
|
|
440
|
-
Column 1<br
|
|
441
|
+
<div className="col-12 col-sm-6 col-lg-4" style={demoCardStyle}>
|
|
442
|
+
Column 1<br />
|
|
443
|
+
.col-12 .col-sm-6 .col-lg-4
|
|
441
444
|
</div>
|
|
442
|
-
<div className="col-4" style={demoCardStyle}>
|
|
443
|
-
Column 2<br
|
|
445
|
+
<div className="col-12 col-sm-6 col-lg-4" style={demoCardStyle}>
|
|
446
|
+
Column 2<br />
|
|
447
|
+
.col-12 .col-sm-6 .col-lg-4
|
|
444
448
|
</div>
|
|
445
|
-
<div className="col-4" style={demoCardStyle}>
|
|
446
|
-
Column 3<br
|
|
449
|
+
<div className="col-12 col-sm-6 col-lg-4" style={demoCardStyle}>
|
|
450
|
+
Column 3<br />
|
|
451
|
+
.col-12 .col-sm-6 .col-lg-4
|
|
447
452
|
</div>
|
|
448
453
|
</div>
|
|
449
454
|
</div>
|
|
@@ -454,3 +459,422 @@ export const ResponsiveBehavior: Story = {
|
|
|
454
459
|
},
|
|
455
460
|
},
|
|
456
461
|
};
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Demonstrates how a single element responds across breakpoints.
|
|
465
|
+
* Resize browser to see width change at 480px, 768px, and 1024px.
|
|
466
|
+
*/
|
|
467
|
+
export const ResponsiveBreakpoints: Story = {
|
|
468
|
+
render: () => (
|
|
469
|
+
<div style={{ maxWidth: "1200px", margin: "0 auto" }}>
|
|
470
|
+
<div
|
|
471
|
+
style={{
|
|
472
|
+
padding: "1rem",
|
|
473
|
+
backgroundColor: "#fef3c7",
|
|
474
|
+
borderRadius: "0.5rem",
|
|
475
|
+
marginBottom: "1rem",
|
|
476
|
+
fontSize: "0.875rem",
|
|
477
|
+
}}
|
|
478
|
+
>
|
|
479
|
+
<strong>💡 Resize to test:</strong>
|
|
480
|
+
<br />• <strong>Mobile (< 480px):</strong> 100% width (1 column)
|
|
481
|
+
<br />• <strong>Tablet (≥ 480px):</strong> 50% width (2 columns)
|
|
482
|
+
<br />• <strong>Desktop (≥ 1024px):</strong> 33.33% width (3 columns)
|
|
483
|
+
</div>
|
|
484
|
+
<div className="col-row">
|
|
485
|
+
<div
|
|
486
|
+
className="col-12 col-sm-6 col-lg-4"
|
|
487
|
+
style={{
|
|
488
|
+
...demoCardStyle,
|
|
489
|
+
minHeight: "100px",
|
|
490
|
+
display: "flex",
|
|
491
|
+
alignItems: "center",
|
|
492
|
+
justifyContent: "center",
|
|
493
|
+
}}
|
|
494
|
+
>
|
|
495
|
+
.col-12 .col-sm-6 .col-lg-4
|
|
496
|
+
<br />
|
|
497
|
+
<small>Resize to see me change!</small>
|
|
498
|
+
</div>
|
|
499
|
+
</div>
|
|
500
|
+
</div>
|
|
501
|
+
),
|
|
502
|
+
parameters: {
|
|
503
|
+
viewport: {
|
|
504
|
+
defaultViewport: "mobile1",
|
|
505
|
+
},
|
|
506
|
+
},
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Dashboard card grid that adapts across breakpoints.
|
|
511
|
+
* 1 column mobile, 2 columns tablet, 4 columns desktop.
|
|
512
|
+
*/
|
|
513
|
+
export const ResponsiveDashboard: Story = {
|
|
514
|
+
render: () => (
|
|
515
|
+
<div style={{ maxWidth: "1200px", margin: "0 auto" }}>
|
|
516
|
+
<h3 style={{ marginBottom: "1rem" }}>Responsive Dashboard</h3>
|
|
517
|
+
<div className="col-row">
|
|
518
|
+
{[
|
|
519
|
+
{ title: "Total Users", value: "1,234", color: "#dbeafe" },
|
|
520
|
+
{ title: "Revenue", value: "$12,345", color: "#fef3c7" },
|
|
521
|
+
{ title: "Conversions", value: "567", color: "#d1fae5" },
|
|
522
|
+
{ title: "Growth", value: "+23%", color: "#fce7f3" },
|
|
523
|
+
].map((card, i) => (
|
|
524
|
+
<div
|
|
525
|
+
key={i}
|
|
526
|
+
className="col-12 col-md-6 col-lg-3"
|
|
527
|
+
style={{
|
|
528
|
+
...demoCardStyle,
|
|
529
|
+
backgroundColor: card.color,
|
|
530
|
+
minHeight: "120px",
|
|
531
|
+
}}
|
|
532
|
+
>
|
|
533
|
+
<h4
|
|
534
|
+
style={{
|
|
535
|
+
margin: 0,
|
|
536
|
+
fontSize: "0.875rem",
|
|
537
|
+
color: "#6366f1",
|
|
538
|
+
fontWeight: "500",
|
|
539
|
+
}}
|
|
540
|
+
>
|
|
541
|
+
{card.title}
|
|
542
|
+
</h4>
|
|
543
|
+
<p
|
|
544
|
+
style={{
|
|
545
|
+
margin: "0.5rem 0 0",
|
|
546
|
+
fontSize: "1.5rem",
|
|
547
|
+
fontWeight: "bold",
|
|
548
|
+
}}
|
|
549
|
+
>
|
|
550
|
+
{card.value}
|
|
551
|
+
</p>
|
|
552
|
+
</div>
|
|
553
|
+
))}
|
|
554
|
+
</div>
|
|
555
|
+
<div
|
|
556
|
+
style={{
|
|
557
|
+
marginTop: "1rem",
|
|
558
|
+
fontSize: "0.875rem",
|
|
559
|
+
color: "#666",
|
|
560
|
+
}}
|
|
561
|
+
>
|
|
562
|
+
<strong>Layout:</strong> 1 col mobile → 2 col tablet → 4 col desktop
|
|
563
|
+
</div>
|
|
564
|
+
</div>
|
|
565
|
+
),
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Blog-style layout with sidebar that stacks on mobile.
|
|
570
|
+
*/
|
|
571
|
+
export const ResponsiveSidebarLayout: Story = {
|
|
572
|
+
render: () => (
|
|
573
|
+
<div style={{ maxWidth: "1200px", margin: "0 auto" }}>
|
|
574
|
+
<h3 style={{ marginBottom: "1rem" }}>Blog Sidebar Layout</h3>
|
|
575
|
+
<div className="col-row">
|
|
576
|
+
<div
|
|
577
|
+
className="col-12 col-md-8"
|
|
578
|
+
style={{
|
|
579
|
+
...demoCardStyle,
|
|
580
|
+
minHeight: "200px",
|
|
581
|
+
textAlign: "left",
|
|
582
|
+
}}
|
|
583
|
+
>
|
|
584
|
+
<h4 style={{ margin: "0 0 0.5rem", fontSize: "1.125rem" }}>
|
|
585
|
+
Main Content
|
|
586
|
+
</h4>
|
|
587
|
+
<p style={{ margin: 0, fontSize: "0.875rem" }}>
|
|
588
|
+
.col-12 .col-md-8
|
|
589
|
+
<br />
|
|
590
|
+
Full-width on mobile, 66.67% (8/12) on tablet+
|
|
591
|
+
</p>
|
|
592
|
+
</div>
|
|
593
|
+
<div
|
|
594
|
+
className="col-12 col-md-4"
|
|
595
|
+
style={{
|
|
596
|
+
...demoCardStyle,
|
|
597
|
+
backgroundColor: "#fef3c7",
|
|
598
|
+
minHeight: "200px",
|
|
599
|
+
textAlign: "left",
|
|
600
|
+
}}
|
|
601
|
+
>
|
|
602
|
+
<h4 style={{ margin: "0 0 0.5rem", fontSize: "1.125rem" }}>
|
|
603
|
+
Sidebar
|
|
604
|
+
</h4>
|
|
605
|
+
<p style={{ margin: 0, fontSize: "0.875rem" }}>
|
|
606
|
+
.col-12 .col-md-4
|
|
607
|
+
<br />
|
|
608
|
+
Full-width on mobile, 33.33% (4/12) on tablet+
|
|
609
|
+
</p>
|
|
610
|
+
</div>
|
|
611
|
+
</div>
|
|
612
|
+
</div>
|
|
613
|
+
),
|
|
614
|
+
};
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Product grid with progressive column counts.
|
|
618
|
+
* 1 column mobile, 2 columns tablet, 3 columns desktop.
|
|
619
|
+
*/
|
|
620
|
+
export const ResponsiveProductGrid: Story = {
|
|
621
|
+
render: () => (
|
|
622
|
+
<div style={{ maxWidth: "1200px", margin: "0 auto" }}>
|
|
623
|
+
<h3 style={{ marginBottom: "1rem" }}>Product Grid</h3>
|
|
624
|
+
<div className="col-row">
|
|
625
|
+
{Array.from({ length: 6 }, (_, i) => (
|
|
626
|
+
<div
|
|
627
|
+
key={i}
|
|
628
|
+
className="col-12 col-sm-6 col-lg-4"
|
|
629
|
+
style={demoCardStyle}
|
|
630
|
+
>
|
|
631
|
+
<div
|
|
632
|
+
style={{
|
|
633
|
+
height: "100px",
|
|
634
|
+
backgroundColor: "#e0e7ff",
|
|
635
|
+
borderRadius: "0.25rem",
|
|
636
|
+
marginBottom: "0.5rem",
|
|
637
|
+
display: "flex",
|
|
638
|
+
alignItems: "center",
|
|
639
|
+
justifyContent: "center",
|
|
640
|
+
fontSize: "2rem",
|
|
641
|
+
color: "#6366f1",
|
|
642
|
+
}}
|
|
643
|
+
>
|
|
644
|
+
{i + 1}
|
|
645
|
+
</div>
|
|
646
|
+
<h4 style={{ margin: 0, fontSize: "1rem" }}>Product {i + 1}</h4>
|
|
647
|
+
<p style={{ margin: "0.25rem 0", fontSize: "0.875rem", color: "#666" }}>
|
|
648
|
+
$29.99
|
|
649
|
+
</p>
|
|
650
|
+
</div>
|
|
651
|
+
))}
|
|
652
|
+
</div>
|
|
653
|
+
<div
|
|
654
|
+
style={{
|
|
655
|
+
marginTop: "1rem",
|
|
656
|
+
fontSize: "0.875rem",
|
|
657
|
+
color: "#666",
|
|
658
|
+
}}
|
|
659
|
+
>
|
|
660
|
+
<strong>Layout:</strong> 1 col mobile → 2 col tablet → 3 col desktop
|
|
661
|
+
</div>
|
|
662
|
+
</div>
|
|
663
|
+
),
|
|
664
|
+
};
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* Demonstrates responsive offsets for progressive centering.
|
|
668
|
+
*/
|
|
669
|
+
export const ResponsiveOffsets: Story = {
|
|
670
|
+
render: () => (
|
|
671
|
+
<div style={{ maxWidth: "1200px", margin: "0 auto" }}>
|
|
672
|
+
<h3 style={{ marginBottom: "1rem" }}>
|
|
673
|
+
Progressive Centering with Offsets
|
|
674
|
+
</h3>
|
|
675
|
+
<div className="col-row">
|
|
676
|
+
<div
|
|
677
|
+
className="col-10 col-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3"
|
|
678
|
+
style={{
|
|
679
|
+
...demoCardStyle,
|
|
680
|
+
textAlign: "left",
|
|
681
|
+
}}
|
|
682
|
+
>
|
|
683
|
+
<h4 style={{ margin: "0 0 0.5rem" }}>
|
|
684
|
+
Progressively Centered Content
|
|
685
|
+
</h4>
|
|
686
|
+
<p style={{ fontSize: "0.875rem", margin: "0.5rem 0 0" }}>
|
|
687
|
+
<strong>Mobile (< 480px):</strong> 100% width, no offset
|
|
688
|
+
<br />
|
|
689
|
+
<strong>Small (≥ 480px):</strong> 83.33% width (10/12), 8.33% left
|
|
690
|
+
margin
|
|
691
|
+
<br />
|
|
692
|
+
<strong>Tablet (≥ 768px):</strong> 66.67% width (8/12), 16.67% left
|
|
693
|
+
margin
|
|
694
|
+
<br />
|
|
695
|
+
<strong>Desktop (≥ 1024px):</strong> 50% width (6/12), 25% left margin
|
|
696
|
+
</p>
|
|
697
|
+
</div>
|
|
698
|
+
</div>
|
|
699
|
+
</div>
|
|
700
|
+
),
|
|
701
|
+
};
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Demonstrates visual reordering at different breakpoints.
|
|
705
|
+
* WARNING: Visual order doesn't change DOM order (accessibility concern).
|
|
706
|
+
*/
|
|
707
|
+
export const ResponsiveOrdering: Story = {
|
|
708
|
+
render: () => (
|
|
709
|
+
<div style={{ maxWidth: "1200px", margin: "0 auto" }}>
|
|
710
|
+
<div
|
|
711
|
+
style={{
|
|
712
|
+
padding: "1rem",
|
|
713
|
+
backgroundColor: "#fef3c7",
|
|
714
|
+
borderRadius: "0.5rem",
|
|
715
|
+
marginBottom: "1rem",
|
|
716
|
+
}}
|
|
717
|
+
>
|
|
718
|
+
<strong>⚠️ Accessibility Note:</strong> Visual order changes but DOM order
|
|
719
|
+
stays the same. Screen readers and keyboard navigation follow DOM order, not
|
|
720
|
+
visual order.
|
|
721
|
+
</div>
|
|
722
|
+
<h4 style={{ marginBottom: "0.5rem" }}>
|
|
723
|
+
Mobile: A → B → C (natural order)
|
|
724
|
+
</h4>
|
|
725
|
+
<h4 style={{ marginBottom: "1rem" }}>
|
|
726
|
+
Desktop: B → A → C (reordered visually)
|
|
727
|
+
</h4>
|
|
728
|
+
<div className="col-row">
|
|
729
|
+
<div
|
|
730
|
+
className="col-12 col-md-4 col-md-order-2"
|
|
731
|
+
style={{
|
|
732
|
+
...demoCardStyle,
|
|
733
|
+
backgroundColor: "#fecaca",
|
|
734
|
+
}}
|
|
735
|
+
>
|
|
736
|
+
<strong style={{ fontSize: "1.5rem" }}>A</strong>
|
|
737
|
+
<br />
|
|
738
|
+
DOM: 1st
|
|
739
|
+
<br />
|
|
740
|
+
Mobile: 1st
|
|
741
|
+
<br />
|
|
742
|
+
Desktop: 2nd (.col-md-order-2)
|
|
743
|
+
</div>
|
|
744
|
+
<div
|
|
745
|
+
className="col-12 col-md-4 col-md-order-first"
|
|
746
|
+
style={{
|
|
747
|
+
...demoCardStyle,
|
|
748
|
+
backgroundColor: "#bbf7d0",
|
|
749
|
+
}}
|
|
750
|
+
>
|
|
751
|
+
<strong style={{ fontSize: "1.5rem" }}>B</strong>
|
|
752
|
+
<br />
|
|
753
|
+
DOM: 2nd
|
|
754
|
+
<br />
|
|
755
|
+
Mobile: 2nd
|
|
756
|
+
<br />
|
|
757
|
+
Desktop: 1st (.col-md-order-first)
|
|
758
|
+
</div>
|
|
759
|
+
<div
|
|
760
|
+
className="col-12 col-md-4 col-md-order-last"
|
|
761
|
+
style={{
|
|
762
|
+
...demoCardStyle,
|
|
763
|
+
backgroundColor: "#bfdbfe",
|
|
764
|
+
}}
|
|
765
|
+
>
|
|
766
|
+
<strong style={{ fontSize: "1.5rem" }}>C</strong>
|
|
767
|
+
<br />
|
|
768
|
+
DOM: 3rd
|
|
769
|
+
<br />
|
|
770
|
+
Mobile: 3rd
|
|
771
|
+
<br />
|
|
772
|
+
Desktop: 3rd (.col-md-order-last)
|
|
773
|
+
</div>
|
|
774
|
+
</div>
|
|
775
|
+
</div>
|
|
776
|
+
),
|
|
777
|
+
};
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* Form with responsive multi-column layout.
|
|
781
|
+
*/
|
|
782
|
+
export const ResponsiveFormLayout: Story = {
|
|
783
|
+
render: () => (
|
|
784
|
+
<div style={{ maxWidth: "800px", margin: "0 auto" }}>
|
|
785
|
+
<h3 style={{ marginBottom: "1rem" }}>Responsive Form</h3>
|
|
786
|
+
<div className="col-row">
|
|
787
|
+
<div className="col-12 col-md-6">
|
|
788
|
+
<div style={{ marginBottom: "1rem" }}>
|
|
789
|
+
<label
|
|
790
|
+
style={{
|
|
791
|
+
display: "block",
|
|
792
|
+
marginBottom: "0.25rem",
|
|
793
|
+
fontWeight: "500",
|
|
794
|
+
}}
|
|
795
|
+
>
|
|
796
|
+
First Name
|
|
797
|
+
</label>
|
|
798
|
+
<input
|
|
799
|
+
type="text"
|
|
800
|
+
style={{
|
|
801
|
+
width: "100%",
|
|
802
|
+
padding: "0.5rem",
|
|
803
|
+
border: "1px solid #ccc",
|
|
804
|
+
borderRadius: "0.25rem",
|
|
805
|
+
}}
|
|
806
|
+
/>
|
|
807
|
+
</div>
|
|
808
|
+
</div>
|
|
809
|
+
<div className="col-12 col-md-6">
|
|
810
|
+
<div style={{ marginBottom: "1rem" }}>
|
|
811
|
+
<label
|
|
812
|
+
style={{
|
|
813
|
+
display: "block",
|
|
814
|
+
marginBottom: "0.25rem",
|
|
815
|
+
fontWeight: "500",
|
|
816
|
+
}}
|
|
817
|
+
>
|
|
818
|
+
Last Name
|
|
819
|
+
</label>
|
|
820
|
+
<input
|
|
821
|
+
type="text"
|
|
822
|
+
style={{
|
|
823
|
+
width: "100%",
|
|
824
|
+
padding: "0.5rem",
|
|
825
|
+
border: "1px solid #ccc",
|
|
826
|
+
borderRadius: "0.25rem",
|
|
827
|
+
}}
|
|
828
|
+
/>
|
|
829
|
+
</div>
|
|
830
|
+
</div>
|
|
831
|
+
<div className="col-12">
|
|
832
|
+
<div style={{ marginBottom: "1rem" }}>
|
|
833
|
+
<label
|
|
834
|
+
style={{
|
|
835
|
+
display: "block",
|
|
836
|
+
marginBottom: "0.25rem",
|
|
837
|
+
fontWeight: "500",
|
|
838
|
+
}}
|
|
839
|
+
>
|
|
840
|
+
Email
|
|
841
|
+
</label>
|
|
842
|
+
<input
|
|
843
|
+
type="email"
|
|
844
|
+
style={{
|
|
845
|
+
width: "100%",
|
|
846
|
+
padding: "0.5rem",
|
|
847
|
+
border: "1px solid #ccc",
|
|
848
|
+
borderRadius: "0.25rem",
|
|
849
|
+
}}
|
|
850
|
+
/>
|
|
851
|
+
</div>
|
|
852
|
+
</div>
|
|
853
|
+
<div className="col-12">
|
|
854
|
+
<button
|
|
855
|
+
style={{
|
|
856
|
+
padding: "0.5rem 1.5rem",
|
|
857
|
+
backgroundColor: "#6366f1",
|
|
858
|
+
color: "white",
|
|
859
|
+
border: "none",
|
|
860
|
+
borderRadius: "0.25rem",
|
|
861
|
+
fontWeight: "500",
|
|
862
|
+
cursor: "pointer",
|
|
863
|
+
}}
|
|
864
|
+
>
|
|
865
|
+
Submit
|
|
866
|
+
</button>
|
|
867
|
+
</div>
|
|
868
|
+
</div>
|
|
869
|
+
<div
|
|
870
|
+
style={{
|
|
871
|
+
marginTop: "1rem",
|
|
872
|
+
fontSize: "0.875rem",
|
|
873
|
+
color: "#666",
|
|
874
|
+
}}
|
|
875
|
+
>
|
|
876
|
+
<strong>Layout:</strong> Full-width mobile → 2-column tablet
|
|
877
|
+
</div>
|
|
878
|
+
</div>
|
|
879
|
+
),
|
|
880
|
+
};
|