@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.
Files changed (49) hide show
  1. package/libs/{chunk-URBGDUFN.cjs → chunk-75YQDONV.cjs} +3 -3
  2. package/libs/chunk-AOFQDQVS.cjs +17 -0
  3. package/libs/chunk-AOFQDQVS.cjs.map +1 -0
  4. package/libs/{chunk-ZF6Y7W57.js → chunk-G3TFKMWB.js} +2 -2
  5. package/libs/chunk-Q7OAQLUT.js +10 -0
  6. package/libs/chunk-Q7OAQLUT.js.map +1 -0
  7. package/libs/components/dialog/dialog.cjs +4 -4
  8. package/libs/components/dialog/dialog.js +2 -2
  9. package/libs/components/heading/heading.cjs +2 -2
  10. package/libs/components/heading/heading.d.cts +1 -1
  11. package/libs/components/heading/heading.d.ts +1 -1
  12. package/libs/components/heading/heading.js +1 -1
  13. package/libs/components/title/title.css +1 -0
  14. package/libs/components/title/title.css.map +1 -0
  15. package/libs/components/title/title.min.css +3 -0
  16. package/libs/{heading-7446cb46.d.ts → heading-81eef89a.d.ts} +42 -0
  17. package/libs/index.cjs +5 -5
  18. package/libs/index.css +1 -1
  19. package/libs/index.css.map +1 -1
  20. package/libs/index.d.cts +1 -1
  21. package/libs/index.d.ts +1 -1
  22. package/libs/index.js +2 -2
  23. package/package.json +2 -2
  24. package/src/components/box/box.stories.tsx +1 -1
  25. package/src/components/cluster/cluster.stories.tsx +1 -1
  26. package/src/components/col/README.mdx +233 -9
  27. package/src/components/col/STYLES.mdx +1380 -0
  28. package/src/components/col/col.stories.tsx +1 -1
  29. package/src/components/grid/grid.stories.tsx +130 -35
  30. package/src/components/row/row.stories.tsx +1 -1
  31. package/src/components/stack/stack.stories.tsx +219 -60
  32. package/src/components/title/README.mdx +87 -1
  33. package/src/components/title/STYLES.mdx +501 -0
  34. package/src/components/title/title.scss +51 -0
  35. package/src/components/title/title.stories.tsx +158 -0
  36. package/src/components/title/title.test.tsx +113 -0
  37. package/src/components/title/title.tsx +53 -1
  38. package/src/index.scss +1 -0
  39. package/src/sass/columns.stories.tsx +434 -10
  40. package/src/styles/index.css +74 -0
  41. package/src/styles/index.css.map +1 -1
  42. package/src/styles/title/title.css +75 -0
  43. package/src/styles/title/title.css.map +1 -0
  44. package/libs/chunk-2C3YLBWP.cjs +0 -17
  45. package/libs/chunk-2C3YLBWP.cjs.map +0 -1
  46. package/libs/chunk-KDMX3FAW.js +0 -10
  47. package/libs/chunk-KDMX3FAW.js.map +0 -1
  48. /package/libs/{chunk-URBGDUFN.cjs.map → chunk-75YQDONV.cjs.map} +0 -0
  49. /package/libs/{chunk-ZF6Y7W57.js.map → chunk-G3TFKMWB.js.map} +0 -0
@@ -297,21 +297,121 @@ fixed-width columns. This is different from `auto` which sizes to content.
297
297
 
298
298
  ### Responsive Columns
299
299
 
300
+ The Col component supports responsive utility classes for breakpoint-specific
301
+ widths. While the `span` prop is not responsive, you can use the `className`
302
+ prop with responsive utility classes.
303
+
304
+ **Basic Responsive Pattern:**
305
+
300
306
  ```jsx
301
307
  <Row gap="md">
302
308
  {/* Mobile: 100%, Tablet: 50%, Desktop: 33% */}
303
- <Col span={12} className="col-md-6 col-lg-4">
304
- Responsive column
309
+ <Col className="col-12 col-md-6 col-lg-4">Responsive column</Col>
310
+ <Col className="col-12 col-md-6 col-lg-4">Responsive column</Col>
311
+ <Col className="col-12 col-md-6 col-lg-4">Responsive column</Col>
312
+ </Row>
313
+ ```
314
+
315
+ **Layout Progression:**
316
+
317
+ ```
318
+ Mobile (< 768px): Tablet (≥ 768px): Desktop (≥ 1024px):
319
+ ┌─────────────┐ ┌──────┬──────┐ ┌────┬────┬────┐
320
+ │ Column 1 │ │ Col1 │ Col2 │ │ C1 │ C2 │ C3 │
321
+ ├─────────────┤ ├──────┼──────┤ └────┴────┴────┘
322
+ │ Column 2 │ │ Col3 │ │
323
+ ├─────────────┤ └──────┘
324
+ │ Column 3 │
325
+ └─────────────┘
326
+
327
+ 1 column 2 columns 3 columns
328
+ ```
329
+
330
+ **Dashboard Cards Example:**
331
+
332
+ ```jsx
333
+ <Row gap="lg" align="stretch">
334
+ {/* 1 col mobile, 2 col tablet, 4 col desktop */}
335
+ <Col className="col-12 col-md-6 col-lg-3">
336
+ <Card>
337
+ <h3>Total Users</h3>
338
+ <p>1,234</p>
339
+ </Card>
305
340
  </Col>
306
- <Col span={12} className="col-md-6 col-lg-4">
307
- Responsive column
341
+ <Col className="col-12 col-md-6 col-lg-3">
342
+ <Card>
343
+ <h3>Revenue</h3>
344
+ <p>$12,345</p>
345
+ </Card>
346
+ </Col>
347
+ <Col className="col-12 col-md-6 col-lg-3">
348
+ <Card>
349
+ <h3>Conversions</h3>
350
+ <p>567</p>
351
+ </Card>
308
352
  </Col>
309
- <Col span={12} className="col-md-6 col-lg-4">
310
- Responsive column
353
+ <Col className="col-12 col-md-6 col-lg-3">
354
+ <Card>
355
+ <h3>Growth</h3>
356
+ <p>+23%</p>
357
+ </Card>
311
358
  </Col>
312
359
  </Row>
313
360
  ```
314
361
 
362
+ **How it works:**
363
+
364
+ - **Mobile** (< 768px): `.col-12` applies → 100% width, cards stack vertically
365
+ - **Tablet** (≥ 768px): `.col-md-6` overrides → 50% width, 2 cards per row
366
+ - **Desktop** (≥ 1024px): `.col-lg-3` overrides → 25% width, 4 cards per row
367
+
368
+ **Available Responsive Utilities:**
369
+
370
+ | Utility Type | Classes | Example | Description |
371
+ | ---------------- | -------------------------------- | ------------------- | ---------------------------- |
372
+ | **Span** | `.col-{sm\|md\|lg}-{1-12}` | `.col-md-6` | Column width at breakpoint |
373
+ | **Auto-width** | `.col-{sm\|md\|lg}-auto` | `.col-md-auto` | Content-based width |
374
+ | **Flex-grow** | `.col-{sm\|md\|lg}-flex` | `.col-lg-flex` | Fill remaining space |
375
+ | **Offset** | `.col-{sm\|md\|lg}-offset-{0-11}` | `.col-md-offset-2` | Left margin push |
376
+ | **Order** | `.col-{sm\|md\|lg}-order-{first\|last\|0-12}` | `.col-lg-order-2` | Visual reordering |
377
+
378
+ **See [STYLES.mdx](./STYLES.mdx) for complete responsive utility reference.**
379
+
380
+ ### Responsive Props vs Classes
381
+
382
+ **Important Limitation:** The `span` prop is **not responsive**. It applies the same
383
+ width at all screen sizes.
384
+
385
+ **To create responsive layouts:**
386
+
387
+ - Use the `className` prop with responsive utility classes
388
+ - Combine base column class with breakpoint-specific overrides
389
+
390
+ **Example:**
391
+
392
+ ```jsx
393
+ // ❌ WRONG: span prop is not responsive
394
+ <Col span={12} md={6} lg={4}>
395
+ This won't work
396
+ </Col>
397
+
398
+ // ✅ CORRECT: Use className with responsive utilities
399
+ <Col className="col-12 col-md-6 col-lg-4">This works!</Col>
400
+
401
+ // ✅ ALSO CORRECT: Combine span prop (mobile) with responsive classes
402
+ <Col span={12} className="col-md-6 col-lg-4">
403
+ Mobile: span prop (100%), Tablet: .col-md-6, Desktop: .col-lg-4
404
+ </Col>
405
+ ```
406
+
407
+ **Best Practices:**
408
+
409
+ 1. **Simple Layouts:** Use `span` prop for non-responsive columns
410
+ 2. **Responsive Layouts:** Use `className` with `.col-{breakpoint}-*` classes
411
+ 3. **Hybrid:** Combine `span` for mobile base with responsive classes for larger
412
+ screens
413
+ 4. **Documentation:** See [STYLES.mdx](./STYLES.mdx) for complete class reference
414
+
315
415
  ### Semantic HTML
316
416
 
317
417
  ```jsx
@@ -441,9 +541,33 @@ Use responsive utility classes on Col for breakpoint-specific widths:
441
541
 
442
542
  **Available Breakpoints:**
443
543
 
444
- - `col-md-*` - Tablet and up (`≥768px`)
445
- - `col-lg-*` - Desktop and up (`≥992px`)
446
- - `col-xl-*` - Large desktop and up (`≥1280px`)
544
+ - `col-sm-*` - Large phones and up (`≥480px`)
545
+ - `col-md-*` - Tablets and up (`≥768px`)
546
+ - `col-lg-*` - Desktops and up (`≥1024px`)
547
+
548
+ ## Breakpoint Reference
549
+
550
+ The columns system uses mobile-first responsive breakpoints:
551
+
552
+ | Breakpoint | Variable | Min Width | Pixel Value | Target Devices | Utility Prefix |
553
+ | ------------- | ---------------------- | --------- | ----------- | ------------------------------ | ---------------- |
554
+ | **xs** (base) | `--col-breakpoint-xs` | `0rem` | 0px | Mobile portrait | (none - base classes) |
555
+ | **sm** | `--col-breakpoint-sm` | `30rem` | 480px | Mobile landscape, large phones | `.col-sm-*` |
556
+ | **md** | `--col-breakpoint-md` | `48rem` | 768px | Tablets, small laptops | `.col-md-*` |
557
+ | **lg** | `--col-breakpoint-lg` | `64rem` | 1024px | Desktops, large screens | `.col-lg-*` |
558
+
559
+ **Mobile-First Cascade:**
560
+
561
+ ```
562
+ Mobile (base) → Tablet (≥768px) → Desktop (≥1024px)
563
+ .col-12 .col-md-6 .col-lg-4
564
+ 100% width 50% width 33.33% width
565
+ ```
566
+
567
+ Classes cascade upward: `.col-sm-6` applies at sm (480px+), md (768px+), AND lg
568
+ (1024px+) unless overridden by `.col-md-*` or `.col-lg-*`.
569
+
570
+ **For complete CSS utility reference, see [STYLES.mdx](./STYLES.mdx).**
447
571
 
448
572
  ## Advanced Patterns
449
573
 
@@ -545,6 +669,106 @@ Use responsive utility classes on Col for breakpoint-specific widths:
545
669
  </Row>
546
670
  ```
547
671
 
672
+ ## Common Responsive Patterns
673
+
674
+ ### Blog Sidebar Layout
675
+
676
+ **Pattern:** Content stacks on mobile, sidebar appears on tablet+
677
+
678
+ ```jsx
679
+ <Row gap="lg">
680
+ <Col className="col-12 col-md-8">
681
+ <article>Main blog content...</article>
682
+ </Col>
683
+ <Col className="col-12 col-md-4">
684
+ <aside>Sidebar widgets...</aside>
685
+ </Col>
686
+ </Row>
687
+ ```
688
+
689
+ **Layout:**
690
+
691
+ ```
692
+ Mobile (< 768px): Desktop (≥ 768px):
693
+ ┌─────────────┐ ┌─────────┬───────┐
694
+ │ Content │ │ Content │ Side │
695
+ ├─────────────┤ │ │ bar │
696
+ │ Sidebar │ │ │ │
697
+ └─────────────┘ └─────────┴───────┘
698
+ ```
699
+
700
+ ### Product Grid
701
+
702
+ **Pattern:** Progressive grid (1 → 2 → 3 columns)
703
+
704
+ ```jsx
705
+ <Row gap="md">
706
+ {products.map((product) => (
707
+ <Col key={product.id} className="col-12 col-sm-6 col-lg-4">
708
+ <ProductCard product={product} />
709
+ </Col>
710
+ ))}
711
+ </Row>
712
+ ```
713
+
714
+ **Result:**
715
+
716
+ - Mobile (< 480px): 1 column
717
+ - Tablet (≥ 480px): 2 columns
718
+ - Desktop (≥ 1024px): 3 columns
719
+
720
+ ### Form Layout
721
+
722
+ **Pattern:** Full-width mobile, multi-column desktop
723
+
724
+ ```jsx
725
+ <Row gap="md">
726
+ <Col className="col-12 col-md-6">
727
+ <Field>
728
+ <FieldLabel htmlFor="firstName">First Name</FieldLabel>
729
+ <FieldInput id="firstName" />
730
+ </Field>
731
+ </Col>
732
+ <Col className="col-12 col-md-6">
733
+ <Field>
734
+ <FieldLabel htmlFor="lastName">Last Name</FieldLabel>
735
+ <FieldInput id="lastName" />
736
+ </Field>
737
+ </Col>
738
+ <Col className="col-12">
739
+ <Field>
740
+ <FieldLabel htmlFor="email">Email</FieldLabel>
741
+ <FieldInput id="email" type="email" />
742
+ </Field>
743
+ </Col>
744
+ <Col className="col-12">
745
+ <button type="submit">Submit</button>
746
+ </Col>
747
+ </Row>
748
+ ```
749
+
750
+ ### Centered Content with Progressive Margins
751
+
752
+ **Pattern:** Content gets narrower and more centered on larger screens
753
+
754
+ ```jsx
755
+ <Row>
756
+ <Col className="col-10 col-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3">
757
+ <article>
758
+ <h1>Article Title</h1>
759
+ <p>Progressively centered content...</p>
760
+ </article>
761
+ </Col>
762
+ </Row>
763
+ ```
764
+
765
+ **Result:**
766
+
767
+ - Mobile (< 480px): 100% width, no offset
768
+ - Small (≥ 480px): 83.33% width (10/12), 8.33% left margin
769
+ - Tablet (≥ 768px): 66.67% width (8/12), 16.67% left margin
770
+ - Desktop (≥ 1024px): 50% width (6/12), 25% left margin
771
+
548
772
  ## Related Components
549
773
 
550
774
  - **Row** - Flex container for Col components