@fpkit/acss 2.2.0 → 3.1.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 (81) hide show
  1. package/libs/chunk-5RAWNUVD.js +8 -0
  2. package/libs/chunk-5RAWNUVD.js.map +1 -0
  3. package/libs/{chunk-UJAQVHWC.js → chunk-CWRNJA4P.js} +2 -2
  4. package/libs/{chunk-R7NLLZU2.cjs → chunk-DYFAUAB7.cjs} +3 -3
  5. package/libs/chunk-NWJDAHP6.cjs +17 -0
  6. package/libs/chunk-NWJDAHP6.cjs.map +1 -0
  7. package/libs/components/breadcrumbs/breadcrumb.cjs +5 -5
  8. package/libs/components/breadcrumbs/breadcrumb.d.cts +2 -2
  9. package/libs/components/breadcrumbs/breadcrumb.d.ts +2 -2
  10. package/libs/components/breadcrumbs/breadcrumb.js +2 -2
  11. package/libs/components/flexbox/flex.css +1 -0
  12. package/libs/components/flexbox/flex.css.map +1 -0
  13. package/libs/components/flexbox/flex.min.css +3 -0
  14. package/libs/components/link/link.cjs +5 -5
  15. package/libs/components/link/link.css +1 -1
  16. package/libs/components/link/link.css.map +1 -1
  17. package/libs/components/link/link.d.cts +2 -131
  18. package/libs/components/link/link.d.ts +2 -131
  19. package/libs/components/link/link.js +1 -1
  20. package/libs/components/link/link.min.css +2 -2
  21. package/libs/components/nav/nav.css +1 -1
  22. package/libs/components/nav/nav.css.map +1 -1
  23. package/libs/components/nav/nav.min.css +2 -2
  24. package/libs/hooks.cjs +3 -3
  25. package/libs/hooks.d.cts +1 -1
  26. package/libs/hooks.d.ts +1 -1
  27. package/libs/hooks.js +2 -2
  28. package/libs/index.cjs +30 -29
  29. package/libs/index.cjs.map +1 -1
  30. package/libs/index.css +1 -1
  31. package/libs/index.css.map +1 -1
  32. package/libs/index.d.cts +246 -290
  33. package/libs/index.d.ts +246 -290
  34. package/libs/index.js +15 -15
  35. package/libs/index.js.map +1 -1
  36. package/libs/link-59ad884f.d.ts +371 -0
  37. package/package.json +2 -2
  38. package/src/components/flexbox/README.mdx +996 -0
  39. package/src/components/flexbox/flex.scss +847 -0
  40. package/src/components/flexbox/flex.stories.tsx +1233 -0
  41. package/src/components/flexbox/flex.test.tsx +689 -0
  42. package/src/components/flexbox/flex.tsx +484 -0
  43. package/src/components/flexbox/flex.types.ts +224 -0
  44. package/src/components/link/link.scss +4 -10
  45. package/src/components/link/link.tsx +18 -3
  46. package/src/components/nav/nav.scss +1 -1
  47. package/src/index.scss +1 -0
  48. package/src/index.ts +19 -2
  49. package/src/patterns/page/page-header.tsx +1 -3
  50. package/src/styles/flexbox/flex.css +736 -0
  51. package/src/styles/flexbox/flex.css.map +1 -0
  52. package/src/styles/index.css +739 -9
  53. package/src/styles/index.css.map +1 -1
  54. package/src/styles/link/link.css +2 -6
  55. package/src/styles/link/link.css.map +1 -1
  56. package/src/styles/nav/nav.css +3 -3
  57. package/libs/chunk-5PJYLVFY.cjs +0 -17
  58. package/libs/chunk-5PJYLVFY.cjs.map +0 -1
  59. package/libs/chunk-NNTBIHSD.js +0 -8
  60. package/libs/chunk-NNTBIHSD.js.map +0 -1
  61. package/libs/components/alert/alert.min.min.css +0 -2
  62. package/libs/components/badge/badge.min.min.css +0 -2
  63. package/libs/components/breadcrumbs/breadcrumb.min.min.css +0 -2
  64. package/libs/components/buttons/button.min.min.css +0 -2
  65. package/libs/components/cards/card-style.min.min.css +0 -2
  66. package/libs/components/cards/card.min.min.css +0 -2
  67. package/libs/components/details/details.min.min.css +0 -2
  68. package/libs/components/dialog/dialog.min.min.css +0 -2
  69. package/libs/components/form/form.min.min.css +0 -2
  70. package/libs/components/icons/icon.min.min.css +0 -2
  71. package/libs/components/images/img.min.min.css +0 -2
  72. package/libs/components/layout/landmarks.min.min.css +0 -2
  73. package/libs/components/link/link.min.min.css +0 -2
  74. package/libs/components/list/list.min.min.css +0 -2
  75. package/libs/components/nav/nav.min.min.css +0 -2
  76. package/libs/components/progress/progress.min.min.css +0 -2
  77. package/libs/components/styles/index.min.min.css +0 -2
  78. package/libs/components/tag/tag.min.min.css +0 -2
  79. package/libs/components/text-to-speech/text-to-speech.min.min.css +0 -2
  80. /package/libs/{chunk-UJAQVHWC.js.map → chunk-CWRNJA4P.js.map} +0 -0
  81. /package/libs/{chunk-R7NLLZU2.cjs.map → chunk-DYFAUAB7.cjs.map} +0 -0
package/libs/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  export { Button, ButtonProps } from './components/button.js';
2
2
  export { Card, Content as CardContent, Footer as CardFooter, CardProps, Title as CardTitle } from './components/card.js';
3
- import React, { ReactNode } from 'react';
3
+ import React$1, { ReactNode } from 'react';
4
4
  import { I as IconProps } from './icons-287fce3a.js';
5
5
  export { a as Icon, b as IconProps } from './icons-287fce3a.js';
6
6
  export { default as Field, FieldProps } from './components/form/fields.js';
7
7
  export { default as Input } from './components/form/inputs.js';
8
- export { default as Link, default as To } from './components/link/link.js';
9
- export { List } from './components/list/list.js';
8
+ export { _ as Link, L as LinkProps, _ as To } from './link-59ad884f.js';
9
+ export { default as List } from './components/list/list.js';
10
10
  export { Modal, ModalProps } from './components/modal.js';
11
11
  export { default as Popover, PopoverProps } from './components/popover/popover.js';
12
12
  export { RenderTable as TBL, TableProps } from './components/tables/table.js';
@@ -19,7 +19,7 @@ export { default as Textarea } from './components/form/textarea.js';
19
19
  import { C as ComponentProps$1 } from './component-props-67d978a2.js';
20
20
  export { default as Breadcrumb, BreadcrumbProps, CustomRoute, useBreadcrumbSegments } from './components/breadcrumbs/breadcrumb.js';
21
21
  export { I as InputProps, T as TextareaProps } from './form.types-d25ebfac.js';
22
- export { L as ListItemProps } from './list.types-d26de310.js';
22
+ export { L as ListItemProps, a as ListProps } from './list.types-d26de310.js';
23
23
 
24
24
  /**
25
25
  * Valid severity levels for alerts.
@@ -42,7 +42,7 @@ type AlertProps = {
42
42
  /**
43
43
  * The main message content.
44
44
  */
45
- children: React.ReactNode;
45
+ children: React$1.ReactNode;
46
46
  /**
47
47
  * Optional title for the alert.
48
48
  */
@@ -121,7 +121,7 @@ type AlertProps = {
121
121
  * </Alert>
122
122
  * ```
123
123
  */
124
- actions?: React.ReactNode;
124
+ actions?: React$1.ReactNode;
125
125
  /**
126
126
  * Whether to automatically focus the alert when it becomes visible.
127
127
  * Useful for critical alerts that require immediate attention.
@@ -173,8 +173,8 @@ type AlertProps = {
173
173
  * ```
174
174
  */
175
175
  contentType?: "text" | "node";
176
- } & Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "children">;
177
- declare const Alert: React.FC<AlertProps>;
176
+ } & Omit<React$1.HTMLAttributes<HTMLDivElement>, "title" | "children">;
177
+ declare const Alert: React$1.FC<AlertProps>;
178
178
 
179
179
  /**
180
180
  * Props for the Img component.
@@ -221,7 +221,7 @@ declare const Alert: React.FC<AlertProps>;
221
221
  *
222
222
  * @see https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html
223
223
  */
224
- interface ImgProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'placeholder'> {
224
+ interface ImgProps extends Omit<React$1.ImgHTMLAttributes<HTMLImageElement>, 'placeholder'> {
225
225
  /**
226
226
  * The image source URL.
227
227
  * @default '//'
@@ -255,7 +255,7 @@ interface ImgProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'plac
255
255
  /**
256
256
  * Inline styles to apply to the image.
257
257
  */
258
- styles?: React.CSSProperties;
258
+ styles?: React$1.CSSProperties;
259
259
  /**
260
260
  * Loading behavior for the image.
261
261
  * - `"lazy"` (default): Defers loading until near viewport
@@ -355,7 +355,7 @@ interface ImgProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'plac
355
355
  * />
356
356
  * ```
357
357
  */
358
- onError?: (event: React.SyntheticEvent<HTMLImageElement, Event>) => void;
358
+ onError?: (event: React$1.SyntheticEvent<HTMLImageElement, Event>) => void;
359
359
  /**
360
360
  * Callback fired when the image successfully loads.
361
361
  *
@@ -370,7 +370,7 @@ interface ImgProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'plac
370
370
  * />
371
371
  * ```
372
372
  */
373
- onLoad?: (event: React.SyntheticEvent<HTMLImageElement, Event>) => void;
373
+ onLoad?: (event: React$1.SyntheticEvent<HTMLImageElement, Event>) => void;
374
374
  }
375
375
 
376
376
  /**
@@ -480,245 +480,10 @@ interface ImgProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'plac
480
480
  * @see https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html
481
481
  */
482
482
  declare const Img: {
483
- ({ src, alt, width, height, styles, loading, placeholder, fetchpriority, decoding, srcSet, sizes, onError, onLoad, ...props }: ImgProps): React.JSX.Element;
483
+ ({ src, alt, width, height, styles, loading, placeholder, fetchpriority, decoding, srcSet, sizes, onError, onLoad, ...props }: ImgProps): React$1.JSX.Element;
484
484
  displayName: string;
485
485
  };
486
486
 
487
- /**
488
- * Props for the Link component.
489
- *
490
- * The Link component renders accessible anchor elements with enhanced security,
491
- * styling variants, and WCAG 2.1 AA compliance. It supports both traditional
492
- * text links and button-styled links for call-to-action scenarios.
493
- *
494
- * ## Accessibility Considerations
495
- *
496
- * - External links automatically include `rel="noopener noreferrer"` for security
497
- * - Links should have descriptive text or `aria-label` for screen readers
498
- * - Focus indicators must meet WCAG 2.4.7 contrast requirements (3:1 minimum)
499
- * - Button-styled links maintain semantic `<a>` element for proper navigation
500
- *
501
- * @example
502
- * ```tsx
503
- * // Basic link
504
- * <Link href="/about">About Us</Link>
505
- *
506
- * // External link with prefetch
507
- * <Link href="https://example.com" target="_blank" prefetch>
508
- * Visit Example
509
- * </Link>
510
- *
511
- * // Button-styled link
512
- * <Link href="/signup" btnStyle="primary">
513
- * <b>Sign Up Now</b>
514
- * </Link>
515
- * ```
516
- */
517
- type LinkProps = {
518
- /**
519
- * The URL that the hyperlink points to.
520
- * Can be relative or absolute, internal or external.
521
- *
522
- * @example
523
- * ```tsx
524
- * href="/products"
525
- * href="https://example.com"
526
- * href="mailto:hello@example.com"
527
- * href="tel:+1234567890"
528
- * ```
529
- */
530
- href?: string;
531
- /**
532
- * Where to display the linked URL.
533
- *
534
- * - `_self` (default): Current browsing context
535
- * - `_blank`: New tab/window (automatically adds security attributes)
536
- * - `_parent`: Parent browsing context
537
- * - `_top`: Top-level browsing context
538
- *
539
- * Note: When `target="_blank"`, `rel="noopener noreferrer"` is automatically
540
- * added for security unless explicitly overridden.
541
- *
542
- * @example
543
- * ```tsx
544
- * target="_blank" // Opens in new tab with security
545
- * ```
546
- */
547
- target?: string;
548
- /**
549
- * Relationship between current document and linked URL.
550
- *
551
- * Common values:
552
- * - `noopener`: Prevents window.opener access (security)
553
- * - `noreferrer`: Prevents referrer header (privacy)
554
- * - `nofollow`: Hints search engines not to follow (SEO)
555
- * - `prefetch`: Hints to prefetch the resource (performance)
556
- *
557
- * Note: For `target="_blank"`, this component automatically merges
558
- * `noopener noreferrer` with any user-provided values for security.
559
- *
560
- * @example
561
- * ```tsx
562
- * rel="nofollow noopener"
563
- * rel="author"
564
- * ```
565
- */
566
- rel?: string;
567
- /**
568
- * Content to display inside the link.
569
- *
570
- * For accessibility, ensure link text is descriptive and meaningful.
571
- * Avoid generic text like "click here" or "read more" without context.
572
- *
573
- * @example
574
- * ```tsx
575
- * // ✅ Good: Descriptive link text
576
- * <Link href="/products">View all products</Link>
577
- *
578
- * // ❌ Bad: Generic link text without context
579
- * <Link href="/products">Click here</Link>
580
- *
581
- * // ✅ Good: Icon with accessible label
582
- * <Link href="/home" aria-label="Return to homepage">
583
- * <HomeIcon aria-hidden="true" />
584
- * </Link>
585
- * ```
586
- */
587
- children: React.ReactNode;
588
- /**
589
- * Inline CSS styles to apply to the link element.
590
- * Can be used to override CSS custom properties.
591
- *
592
- * @example
593
- * ```tsx
594
- * styles={{
595
- * '--link-color': '#ff0000',
596
- * '--link-decoration': 'underline',
597
- * }}
598
- * ```
599
- */
600
- styles?: React.CSSProperties;
601
- /**
602
- * Hints to the browser to prefetch the linked resource.
603
- *
604
- * When `true` and `target="_blank"`, adds `rel="prefetch"` along with
605
- * security attributes. This can improve perceived performance but should
606
- * be used judiciously as it consumes bandwidth.
607
- *
608
- * Note: Browser support varies. Modern browsers may ignore this hint.
609
- *
610
- * @default false
611
- * @example
612
- * ```tsx
613
- * <Link href="/next-page" prefetch>Next Page</Link>
614
- * ```
615
- */
616
- prefetch?: boolean;
617
- /**
618
- * Applies button-like styling to the link.
619
- *
620
- * When set, the link renders with button styling including padding,
621
- * borders, and hover effects while maintaining semantic anchor behavior.
622
- *
623
- * Common values:
624
- * - `"btn"`: Standard button styling
625
- * - `"pill"`: Rounded pill button styling
626
- *
627
- * Alternative: Wrap children in `<b>` or `<i>` tags for automatic styling:
628
- * - `<b>`: Applies button styling
629
- * - `<i>`: Applies pill styling
630
- *
631
- * @example
632
- * ```tsx
633
- * // Using btnStyle prop
634
- * <Link href="/signup" btnStyle="btn">Sign Up</Link>
635
- *
636
- * // Using child wrapper (automatic detection)
637
- * <Link href="/signup"><b>Sign Up</b></Link>
638
- * <Link href="/signup"><i>Pill Button</i></Link>
639
- * ```
640
- */
641
- btnStyle?: string;
642
- /**
643
- * Event handler called when the link is clicked or activated.
644
- *
645
- * **Recommended for most use cases**, especially analytics and tracking.
646
- * This event fires for:
647
- * - Mouse clicks
648
- * - Touch/tap interactions
649
- * - Keyboard activation (Enter key)
650
- * - Assistive technology activation
651
- *
652
- * Use `onClick` when you need to track ALL user activations, including
653
- * keyboard users. This ensures full accessibility coverage.
654
- *
655
- * @param event - The mouse event
656
- * @example
657
- * ```tsx
658
- * // ✅ RECOMMENDED: onClick tracks all activation methods
659
- * <Link
660
- * href="/products"
661
- * onClick={(e) => {
662
- * trackEvent('link_click', { href: '/products' });
663
- * }}
664
- * >
665
- * Products
666
- * </Link>
667
- * ```
668
- */
669
- onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
670
- /**
671
- * Event handler called when a pointer device button is pressed on the link.
672
- *
673
- * Use this for specific pointer interactions like:
674
- * - Drag-and-drop detection
675
- * - Touch gesture recognition
676
- * - Distinguishing input types (mouse vs touch vs pen)
677
- * - Providing early visual feedback before click completes
678
- *
679
- * **⚠️ Accessibility Note**: Unlike `onClick`, this does NOT fire for
680
- * keyboard activation (Enter key). If you need to track all user interactions
681
- * including keyboard users, use `onClick` instead.
682
- *
683
- * @param event - The pointer event
684
- * @example
685
- * ```tsx
686
- * // Use onPointerDown for pointer-specific interactions
687
- * <Link
688
- * href="/products"
689
- * onPointerDown={(e) => {
690
- * // Distinguish between mouse (2), touch (5), and pen (3)
691
- * console.log('Pointer type:', e.pointerType);
692
- * }}
693
- * >
694
- * Products
695
- * </Link>
696
- * ```
697
- *
698
- * @example
699
- * ```tsx
700
- * // ✅ Use both handlers together for comprehensive tracking
701
- * <Link
702
- * href="/products"
703
- * onClick={(e) => trackAllActivations(e)}
704
- * onPointerDown={(e) => provideFeedback(e)}
705
- * >
706
- * Products
707
- * </Link>
708
- * ```
709
- */
710
- onPointerDown?: (event: React.PointerEvent<HTMLAnchorElement>) => void;
711
- /**
712
- * Icon element to display in the link (used by IconLink).
713
- *
714
- * @example
715
- * ```tsx
716
- * <IconLink href="/home" icon={<HomeIcon />} />
717
- * ```
718
- */
719
- icon?: React.ReactNode;
720
- } & Omit<React.ComponentPropsWithoutRef<"a">, 'style'>;
721
-
722
487
  /**
723
488
  * Props for the TextToSpeechComponent.
724
489
  * @interface TextToSpeechComponentProps
@@ -737,7 +502,7 @@ interface TextToSpeechComponentProps {
737
502
  /** The language to be used for speech synthesis. */
738
503
  language?: string;
739
504
  /** Player label */
740
- label?: string | React.ReactNode;
505
+ label?: string | React$1.ReactNode;
741
506
  /** Callback function to be called when speech ends. */
742
507
  onEnd?: () => void;
743
508
  }
@@ -746,22 +511,22 @@ interface TextToSpeechComponentProps {
746
511
  * @param {TextToSpeechComponentProps} props - The props for the component.
747
512
  * @returns {JSX.Element} The rendered TextToSpeechComponent.
748
513
  */
749
- declare const TextToSpeech: React.FC<TextToSpeechComponentProps>;
514
+ declare const TextToSpeech: React$1.FC<TextToSpeechComponentProps>;
750
515
 
751
- type ComponentProps = React.ComponentProps<typeof UI>;
516
+ type ComponentProps = React$1.ComponentProps<typeof UI>;
752
517
  /**
753
518
  * Renders children elements without any wrapping component.
754
519
  * Can be used as a placeholder when no semantic landmark is needed.
755
520
  */
756
521
  declare const Landmarks: {
757
- (children?: React.FC): React.JSX.Element;
522
+ (children?: React$1.FC): React$1.JSX.Element;
758
523
  displayName: string;
759
- Header: ({ id, children, headerBackground, styles, classes, ...props }: HeaderProps) => React.JSX.Element;
760
- Main: ({ id, children, styles, classes, ...props }: ComponentProps) => React.JSX.Element;
761
- Footer: ({ id, classes, children, styles, ...props }: ComponentProps) => React.JSX.Element;
762
- Aside: ({ id, children, styles, classes, ...props }: ComponentProps) => React.JSX.Element;
763
- Section: ({ id, children, styles, classes, ...props }: ComponentProps) => React.JSX.Element;
764
- Article: ({ id, children, styles, classes, ...props }: ComponentProps) => React.JSX.Element;
524
+ Header: ({ id, children, headerBackground, styles, classes, ...props }: HeaderProps) => React$1.JSX.Element;
525
+ Main: ({ id, children, styles, classes, ...props }: ComponentProps) => React$1.JSX.Element;
526
+ Footer: ({ id, classes, children, styles, ...props }: ComponentProps) => React$1.JSX.Element;
527
+ Aside: ({ id, children, styles, classes, ...props }: ComponentProps) => React$1.JSX.Element;
528
+ Section: ({ id, children, styles, classes, ...props }: ComponentProps) => React$1.JSX.Element;
529
+ Article: ({ id, children, styles, classes, ...props }: ComponentProps) => React$1.JSX.Element;
765
530
  };
766
531
  type HeaderProps = {
767
532
  headerBackground?: ReactNode;
@@ -775,7 +540,7 @@ type HeaderProps = {
775
540
  * @param styles - Optional styles object.
776
541
  * @param props - Other props.
777
542
  */
778
- declare const Header: ({ id, children, headerBackground, styles, classes, ...props }: HeaderProps) => React.JSX.Element;
543
+ declare const Header: ({ id, children, headerBackground, styles, classes, ...props }: HeaderProps) => React$1.JSX.Element;
779
544
  /**
780
545
  * Main component.
781
546
  *
@@ -785,7 +550,7 @@ declare const Header: ({ id, children, headerBackground, styles, classes, ...pro
785
550
  * @param styles - Optional styles object.
786
551
  * @param props - Other props.
787
552
  */
788
- declare const Main: ({ id, children, styles, classes, ...props }: ComponentProps) => React.JSX.Element;
553
+ declare const Main: ({ id, children, styles, classes, ...props }: ComponentProps) => React$1.JSX.Element;
789
554
  /**
790
555
  * Footer component that renders a footer element with a section element inside.
791
556
  * @param {ReactNode} children - Child elements to render inside the section element.
@@ -793,8 +558,8 @@ declare const Main: ({ id, children, styles, classes, ...props }: ComponentProps
793
558
  * @param props - Additional props to pass to the footer element.
794
559
  * @returns A React component that renders a footer element with a section element inside.
795
560
  */
796
- declare const Footer: ({ id, classes, children, styles, ...props }: ComponentProps) => React.JSX.Element;
797
- declare const Aside: ({ id, children, styles, classes, ...props }: ComponentProps) => React.JSX.Element;
561
+ declare const Footer: ({ id, classes, children, styles, ...props }: ComponentProps) => React$1.JSX.Element;
562
+ declare const Aside: ({ id, children, styles, classes, ...props }: ComponentProps) => React$1.JSX.Element;
798
563
  /**
799
564
  * Section component that renders a section element.
800
565
  *
@@ -802,7 +567,7 @@ declare const Aside: ({ id, children, styles, classes, ...props }: ComponentProp
802
567
  * @param styles - CSS styles to apply to the section.
803
568
  * @param props - Other props.
804
569
  */
805
- declare const Section: ({ id, children, styles, classes, ...props }: ComponentProps) => React.JSX.Element;
570
+ declare const Section: ({ id, children, styles, classes, ...props }: ComponentProps) => React$1.JSX.Element;
806
571
  /**
807
572
  * Article component renders an HTML <article> element.
808
573
  *
@@ -810,7 +575,198 @@ declare const Section: ({ id, children, styles, classes, ...props }: ComponentPr
810
575
  * @param styles - CSS styles to apply to the article.
811
576
  * @param props - Additional props to pass to the article element.
812
577
  */
813
- declare const Article: ({ id, children, styles, classes, ...props }: ComponentProps) => React.JSX.Element;
578
+ declare const Article: ({ id, children, styles, classes, ...props }: ComponentProps) => React$1.JSX.Element;
579
+
580
+ /**
581
+ * Type definitions for Flex container components
582
+ * Supports responsive flexbox layouts with CSS custom properties
583
+ */
584
+ /**
585
+ * Valid HTML elements for Flex container
586
+ * Restricted to semantic container elements only
587
+ */
588
+ type FlexContainerElement = "div" | "section" | "article" | "aside" | "main" | "header" | "footer" | "nav" | "ul" | "ol" | "dl" | "form" | "fieldset";
589
+ /**
590
+ * Valid HTML elements for Flex.Item
591
+ * Includes list item elements in addition to container elements
592
+ */
593
+ type FlexItemElement = FlexContainerElement | "li" | "dt" | "dd";
594
+ /**
595
+ * Flex container direction
596
+ */
597
+ type FlexDirection = "row" | "row-reverse" | "column" | "column-reverse";
598
+ /**
599
+ * Flex wrap behavior
600
+ */
601
+ type FlexWrap = "wrap" | "nowrap" | "wrap-reverse";
602
+ /**
603
+ * Flex justify-content alignment
604
+ */
605
+ type FlexJustify = "start" | "end" | "center" | "between" | "around" | "evenly";
606
+ /**
607
+ * Flex align-items alignment
608
+ */
609
+ type FlexAlign = "start" | "end" | "center" | "baseline" | "stretch";
610
+ /**
611
+ * Flex align-content alignment (multi-line)
612
+ */
613
+ type FlexAlignContent = "start" | "end" | "center" | "between" | "around" | "evenly" | "stretch";
614
+ /**
615
+ * Flex align-self alignment (individual items)
616
+ */
617
+ type FlexAlignSelf = "auto" | "start" | "end" | "center" | "baseline" | "stretch";
618
+ /**
619
+ * Gap size options
620
+ */
621
+ type FlexGap = "0" | "xs" | "sm" | "md" | "lg" | "xl";
622
+ /**
623
+ * Preset flex layout variants
624
+ */
625
+ type FlexVariant = "center" | "between" | "around" | "stack" | "spread";
626
+ /**
627
+ * Responsive flex properties for breakpoints
628
+ */
629
+ interface ResponsiveFlexProps {
630
+ /** Flex direction */
631
+ direction?: FlexDirection;
632
+ /** Flex wrap behavior */
633
+ wrap?: FlexWrap;
634
+ /** Gap between flex items */
635
+ gap?: FlexGap;
636
+ /** Row gap (vertical spacing) */
637
+ rowGap?: FlexGap;
638
+ /** Column gap (horizontal spacing) */
639
+ colGap?: FlexGap;
640
+ /** Justify content (main axis alignment) */
641
+ justify?: FlexJustify;
642
+ /** Align items (cross axis alignment) */
643
+ align?: FlexAlign;
644
+ /** Align content (multi-line alignment) */
645
+ alignContent?: FlexAlignContent;
646
+ }
647
+ /**
648
+ * Base Flex component props
649
+ *
650
+ * ## Semantic Elements Only
651
+ * The `as` prop is restricted to semantic container elements to ensure
652
+ * proper HTML structure and accessibility. Use only block-level container
653
+ * elements like div, section, article, or form elements.
654
+ *
655
+ * **Allowed elements**: div, section, article, aside, main, header, footer,
656
+ * nav, ul, ol, dl, form, fieldset
657
+ *
658
+ * **Not allowed**: span, a, button, input, or other inline/interactive elements
659
+ */
660
+ interface FlexProps extends ResponsiveFlexProps, Omit<React.HTMLAttributes<HTMLElement>, "className"> {
661
+ /** Preset layout variant */
662
+ variant?: FlexVariant;
663
+ /** Use inline-flex instead of flex */
664
+ inline?: boolean;
665
+ /**
666
+ * Element type to render as
667
+ * @remarks Restricted to semantic container elements only for proper HTML structure
668
+ */
669
+ as?: FlexContainerElement;
670
+ /** Additional CSS class names */
671
+ className?: string;
672
+ /** Inline styles and CSS custom properties */
673
+ styles?: React.CSSProperties;
674
+ /** Children elements */
675
+ children?: React.ReactNode;
676
+ /** Responsive props for small screens (≥30rem / 480px) */
677
+ sm?: ResponsiveFlexProps;
678
+ /** Responsive props for medium screens (≥48rem / 768px) */
679
+ md?: ResponsiveFlexProps;
680
+ /** Responsive props for large screens (≥62rem / 992px) */
681
+ lg?: ResponsiveFlexProps;
682
+ /** Responsive props for extra large screens (≥80rem / 1280px) */
683
+ xl?: ResponsiveFlexProps;
684
+ }
685
+ /**
686
+ * Flex.Item component props
687
+ *
688
+ * ## Semantic Elements
689
+ * The `as` prop accepts container elements plus list item elements (li, dt, dd)
690
+ * to support semantic list structures within flex containers.
691
+ *
692
+ * **Allowed elements**: div, section, article, aside, main, header, footer,
693
+ * nav, ul, ol, dl, form, fieldset, li, dt, dd
694
+ */
695
+ interface FlexItemProps extends Omit<React.HTMLAttributes<HTMLElement>, "className"> {
696
+ /** Flex grow factor */
697
+ grow?: 0 | 1;
698
+ /** Flex shrink factor */
699
+ shrink?: 0 | 1;
700
+ /** Flex basis */
701
+ basis?: "auto" | "0" | "full";
702
+ /** Flex shorthand: '1' | 'auto' | 'initial' | 'none' */
703
+ flex?: "1" | "auto" | "initial" | "none";
704
+ /** Align self (overrides parent align-items) */
705
+ alignSelf?: FlexAlignSelf;
706
+ /** Order of the flex item */
707
+ order?: "first" | "last" | "none";
708
+ /**
709
+ * Element type to render as
710
+ * @remarks Includes list item elements (li, dt, dd) in addition to container elements
711
+ */
712
+ as?: FlexItemElement;
713
+ /** Additional CSS class names */
714
+ className?: string;
715
+ /** Inline styles and CSS custom properties */
716
+ styles?: React.CSSProperties;
717
+ /** Children elements */
718
+ children?: React.ReactNode;
719
+ /** Responsive props for small screens (≥30rem / 480px) */
720
+ sm?: {
721
+ flex?: "1" | "auto" | "none";
722
+ };
723
+ /** Responsive props for medium screens (≥48rem / 768px) */
724
+ md?: {
725
+ flex?: "1" | "auto" | "none";
726
+ };
727
+ /** Responsive props for large screens (≥62rem / 992px) */
728
+ lg?: {
729
+ flex?: "1" | "auto" | "none";
730
+ };
731
+ /** Responsive props for extra large screens (≥80rem / 1280px) */
732
+ xl?: {
733
+ flex?: "1" | "auto" | "none";
734
+ };
735
+ }
736
+ /**
737
+ * Flex.Spacer component props
738
+ * Creates an auto-expanding spacer element (flex: 1)
739
+ *
740
+ * ## Semantic Elements Only
741
+ * The `as` prop is restricted to container elements. Spacers are purely
742
+ * presentational and should use non-semantic containers like div.
743
+ *
744
+ * **Allowed elements**: div, section, article, aside, main, header, footer,
745
+ * nav, ul, ol, dl, form, fieldset
746
+ */
747
+ interface FlexSpacerProps extends Omit<React.HTMLAttributes<HTMLElement>, "className"> {
748
+ /**
749
+ * Element type to render as
750
+ * @remarks Restricted to container elements. Default is 'div'.
751
+ */
752
+ as?: FlexContainerElement;
753
+ /** Additional CSS class names */
754
+ className?: string;
755
+ /** Inline styles and CSS custom properties */
756
+ styles?: React.CSSProperties;
757
+ }
758
+ /**
759
+ * Combined Flex component type with sub-components
760
+ */
761
+ type FlexComponent = React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLElement>> & {
762
+ Item: React.ForwardRefExoticComponent<FlexItemProps & React.RefAttributes<HTMLElement>>;
763
+ Spacer: React.ForwardRefExoticComponent<FlexSpacerProps & React.RefAttributes<HTMLElement>>;
764
+ };
765
+
766
+ /**
767
+ * Attach sub-components to Flex using compound component pattern
768
+ */
769
+ declare const Flex: FlexComponent;
814
770
 
815
771
  /**
816
772
  * Props for the Badge component
@@ -827,13 +783,13 @@ type BadgeProps = {
827
783
  /**
828
784
  * Content to display inside the badge (typically numbers or short text)
829
785
  */
830
- children?: React.ReactNode;
786
+ children?: React$1.ReactNode;
831
787
  /**
832
788
  * Visual variant of the badge
833
789
  * - 'rounded': Circular badge style
834
790
  */
835
791
  variant?: 'rounded';
836
- } & React.ComponentProps<typeof UI>;
792
+ } & React$1.ComponentProps<typeof UI>;
837
793
  /**
838
794
  * Badge - A small label component for displaying status, counts, or notifications
839
795
  *
@@ -898,7 +854,7 @@ type BadgeProps = {
898
854
  * <Badge>12</Badge>
899
855
  */
900
856
  declare const Badge: {
901
- ({ id, styles, classes, children, variant, ...props }: BadgeProps): React.JSX.Element;
857
+ ({ id, styles, classes, children, variant, ...props }: BadgeProps): React$1.JSX.Element;
902
858
  displayName: string;
903
859
  };
904
860
 
@@ -978,7 +934,7 @@ type TagProps = {
978
934
  * REQUIRED - Ensures tag has meaningful content for all users including screen reader users
979
935
  * Typically short text, version numbers, or status labels
980
936
  */
981
- children: React.ReactNode;
937
+ children: React$1.ReactNode;
982
938
  /**
983
939
  * Accessible label for screen readers
984
940
  * Provides additional context beyond visible text
@@ -1001,7 +957,7 @@ type TagProps = {
1001
957
  * - 'assertive': Announces immediately (use sparingly for critical updates)
1002
958
  */
1003
959
  'aria-live'?: 'off' | 'polite' | 'assertive';
1004
- } & Omit<React.ComponentProps<typeof UI>, 'as' | 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-live'>;
960
+ } & Omit<React$1.ComponentProps<typeof UI>, 'as' | 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-live'>;
1005
961
 
1006
962
  /**
1007
963
  * Tag - A small inline label component for displaying status, versions, or environment indicators
@@ -1095,32 +1051,32 @@ type TagProps = {
1095
1051
  * <Tag role="status" variant="stable">v1.0</Tag>
1096
1052
  */
1097
1053
  declare const Tag: {
1098
- ({ elm, role, variant, children, styles, ...props }: TagProps): React.JSX.Element;
1054
+ ({ elm, role, variant, children, styles, ...props }: TagProps): React$1.JSX.Element;
1099
1055
  displayName: string;
1100
1056
  };
1101
1057
 
1102
1058
  declare const Caption: {
1103
- ({ children, ...props }: ComponentProps$1): React.JSX.Element;
1059
+ ({ children, ...props }: ComponentProps$1): React$1.JSX.Element;
1104
1060
  displayName: string;
1105
1061
  };
1106
1062
  declare const Thead: {
1107
- ({ children, ...props }: ComponentProps$1): React.JSX.Element;
1063
+ ({ children, ...props }: ComponentProps$1): React$1.JSX.Element;
1108
1064
  displayName: string;
1109
1065
  };
1110
1066
  declare const Tbody: {
1111
- ({ children, ...props }: ComponentProps$1): React.JSX.Element;
1067
+ ({ children, ...props }: ComponentProps$1): React$1.JSX.Element;
1112
1068
  displayName: string;
1113
1069
  };
1114
1070
  declare const Tr: {
1115
- ({ children, ...props }: ComponentProps$1): React.JSX.Element;
1071
+ ({ children, ...props }: ComponentProps$1): React$1.JSX.Element;
1116
1072
  displayName: string;
1117
1073
  };
1118
1074
  declare const Td: {
1119
- ({ children, ...props }: ComponentProps$1): React.JSX.Element;
1075
+ ({ children, ...props }: ComponentProps$1): React$1.JSX.Element;
1120
1076
  displayName: string;
1121
1077
  };
1122
1078
  declare const Table: {
1123
- ({ id, dataStyle, children, ...props }: ComponentProps$1): React.JSX.Element;
1079
+ ({ id, dataStyle, children, ...props }: ComponentProps$1): React$1.JSX.Element;
1124
1080
  displayName: string;
1125
1081
  };
1126
1082
 
@@ -1155,7 +1111,7 @@ type DetailsProps = {
1155
1111
  * summary={<><Icon /> Shipping Information</>}
1156
1112
  * ```
1157
1113
  */
1158
- summary: React.ReactNode;
1114
+ summary: React$1.ReactNode;
1159
1115
  /**
1160
1116
  * Optional icon displayed before the summary text.
1161
1117
  * Commonly used for chevron/arrow indicators.
@@ -1165,7 +1121,7 @@ type DetailsProps = {
1165
1121
  * icon={<ChevronDownIcon />}
1166
1122
  * ```
1167
1123
  */
1168
- icon?: React.ReactNode;
1124
+ icon?: React$1.ReactNode;
1169
1125
  /**
1170
1126
  * Accessible label for screen readers.
1171
1127
  * If not provided, the native `<details>` semantic will be used.
@@ -1192,7 +1148,7 @@ type DetailsProps = {
1192
1148
  * ```
1193
1149
  */
1194
1150
  name?: string;
1195
- } & React.ComponentProps<"details"> & Partial<React.ComponentProps<typeof UI>>;
1151
+ } & React$1.ComponentProps<"details"> & Partial<React$1.ComponentProps<typeof UI>>;
1196
1152
 
1197
1153
  /**
1198
1154
  * Details - A progressive disclosure component using native HTML `<details>` element.
@@ -1243,44 +1199,44 @@ type DetailsProps = {
1243
1199
  * <Details name="faq" summary="Question 3">Answer 3</Details>
1244
1200
  * ```
1245
1201
  */
1246
- declare const Details: React.ForwardRefExoticComponent<Omit<DetailsProps, "ref"> & React.RefAttributes<HTMLDetailsElement>>;
1202
+ declare const Details: React$1.ForwardRefExoticComponent<Omit<DetailsProps, "ref"> & React$1.RefAttributes<HTMLDetailsElement>>;
1247
1203
 
1248
1204
  /**
1249
1205
  * @deprecated This type is deprecated. Use `PolymorphicRef` from './ui.tsx' instead.
1250
1206
  * The UI component provides better type safety and accessibility features.
1251
1207
  */
1252
- type PolymorphicRef<C extends React.ElementType> = React.Ref<React.ElementRef<C>>;
1208
+ type PolymorphicRef<C extends React$1.ElementType> = React$1.Ref<React$1.ElementRef<C>>;
1253
1209
  /**
1254
1210
  * @deprecated This type is deprecated. Use `AsProp` from './ui.tsx' instead.
1255
1211
  * The UI component provides better type safety and accessibility features.
1256
1212
  */
1257
- type AsProp<C extends React.ElementType> = {
1213
+ type AsProp<C extends React$1.ElementType> = {
1258
1214
  as?: C;
1259
1215
  };
1260
1216
  /**
1261
1217
  * @deprecated This type is deprecated. Use `PropsToOmit` from './ui.tsx' instead.
1262
1218
  * The UI component provides better type safety and accessibility features.
1263
1219
  */
1264
- type PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);
1220
+ type PropsToOmit<C extends React$1.ElementType, P> = keyof (AsProp<C> & P);
1265
1221
  /**
1266
1222
  * @deprecated This type is deprecated. Use `PolymorphicComponentProp` from './ui.tsx' instead.
1267
1223
  * The UI component provides better type safety and accessibility features.
1268
1224
  */
1269
- type PolymorphicComponentProp<C extends React.ElementType, Props = {}> = React.PropsWithChildren<Props & AsProp<C>> & Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
1225
+ type PolymorphicComponentProp<C extends React$1.ElementType, Props = {}> = React$1.PropsWithChildren<Props & AsProp<C>> & Omit<React$1.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
1270
1226
  /**
1271
1227
  * @deprecated This type is deprecated. Use `PolymorphicComponentPropWithRef` from './ui.tsx' instead.
1272
1228
  * The UI component provides better type safety and accessibility features.
1273
1229
  */
1274
- type PolymorphicComponentPropWithRef<C extends React.ElementType, Props = {}> = PolymorphicComponentProp<C, Props> & {
1275
- ref?: PolymorphicRef<C> | React.ForwardedRef<React.ElementRef<C>>;
1230
+ type PolymorphicComponentPropWithRef<C extends React$1.ElementType, Props = {}> = PolymorphicComponentProp<C, Props> & {
1231
+ ref?: PolymorphicRef<C> | React$1.ForwardedRef<React$1.ElementRef<C>>;
1276
1232
  };
1277
1233
  /**
1278
1234
  * @deprecated This type is deprecated. Use `UIProps` from './ui.tsx' instead.
1279
1235
  * The UI component provides better type safety and accessibility features.
1280
1236
  */
1281
- type FPProps<C extends React.ElementType> = PolymorphicComponentPropWithRef<C, {
1237
+ type FPProps<C extends React$1.ElementType> = PolymorphicComponentPropWithRef<C, {
1282
1238
  renderStyles?: boolean;
1283
- styles?: React.CSSProperties;
1239
+ styles?: React$1.CSSProperties;
1284
1240
  classes?: string;
1285
1241
  }>;
1286
1242
  /**
@@ -1307,7 +1263,7 @@ type FPProps<C extends React.ElementType> = PolymorphicComponentPropWithRef<C, {
1307
1263
  * ```
1308
1264
  */
1309
1265
  type FPComponent = {
1310
- <C extends React.ElementType = 'span'>(props: FPProps<C>): React.ReactElement | null;
1266
+ <C extends React$1.ElementType = 'span'>(props: FPProps<C>): React$1.ReactElement | null;
1311
1267
  displayName?: string;
1312
1268
  };
1313
1269
  /**
@@ -1346,4 +1302,4 @@ type FPComponent = {
1346
1302
  */
1347
1303
  declare const FP: FPComponent;
1348
1304
 
1349
- export { Alert, AlertProps, Article, Aside, Badge, BadgeProps, FP as Box, Caption, ComponentProps$1 as ComponentProps, Details, FP, Footer, Header, Img, ImgProps, Landmarks, LinkProps, Main, Section, Table, Tag, TagProps, TagVariant, Tbody, Td, TextToSpeech, Thead, Tr, UI };
1305
+ export { Alert, AlertProps, Article, Aside, Badge, BadgeProps, FP as Box, Caption, ComponentProps$1 as ComponentProps, Details, FP, Flex, FlexAlign, FlexAlignContent, FlexAlignSelf, FlexContainerElement, FlexDirection, FlexGap, FlexItemElement, FlexItemProps, FlexJustify, FlexProps, FlexSpacerProps, FlexVariant, FlexWrap, Footer, Header, Img, ImgProps, Landmarks, Main, ResponsiveFlexProps, Section, Table, Tag, TagProps, TagVariant, Tbody, Td, TextToSpeech, Thead, Tr, UI };