@fpkit/acss 1.0.0 → 2.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.
- package/README.md +60 -0
- package/libs/{chunk-7XPFW7CB.js → chunk-43TK2ICH.js} +2 -2
- package/libs/chunk-5PJYLVFY.cjs +17 -0
- package/libs/chunk-5PJYLVFY.cjs.map +1 -0
- package/libs/chunk-E4OSROCA.cjs +17 -0
- package/libs/chunk-E4OSROCA.cjs.map +1 -0
- package/libs/chunk-KVKQLRJG.js +10 -0
- package/libs/chunk-KVKQLRJG.js.map +1 -0
- package/libs/{chunk-QVW6W76L.cjs → chunk-MGPWZRBX.cjs} +3 -3
- package/libs/chunk-NNTBIHSD.js +8 -0
- package/libs/chunk-NNTBIHSD.js.map +1 -0
- package/libs/{chunk-X3JCTEPD.js → chunk-QKHPHMG2.js} +2 -2
- package/libs/{chunk-T4T6GWYQ.cjs → chunk-R7NLLZU2.cjs} +3 -3
- package/libs/{chunk-X5LGFCWG.js → chunk-UJAQVHWC.js} +3 -3
- package/libs/{chunk-DKTHCQ5P.cjs → chunk-X5RKCLDC.cjs} +3 -3
- package/libs/components/breadcrumbs/breadcrumb.cjs +5 -5
- package/libs/components/breadcrumbs/breadcrumb.d.cts +1 -1
- package/libs/components/breadcrumbs/breadcrumb.d.ts +1 -1
- package/libs/components/breadcrumbs/breadcrumb.js +2 -2
- package/libs/components/button.cjs +3 -3
- package/libs/components/button.d.cts +1 -1
- package/libs/components/button.d.ts +1 -1
- package/libs/components/button.js +1 -1
- package/libs/components/dialog/dialog.cjs +4 -4
- package/libs/components/dialog/dialog.js +2 -2
- package/libs/components/icons/icon.d.cts +4 -445
- package/libs/components/icons/icon.d.ts +4 -445
- package/libs/components/link/link.cjs +11 -3
- package/libs/components/link/link.d.cts +131 -3
- package/libs/components/link/link.d.ts +131 -3
- package/libs/components/link/link.js +1 -1
- package/libs/components/modal.cjs +3 -3
- package/libs/components/modal.js +2 -2
- package/libs/hooks.cjs +3 -3
- package/libs/hooks.d.cts +1 -1
- package/libs/hooks.d.ts +1 -1
- package/libs/hooks.js +2 -2
- package/libs/icons-287fce3a.d.ts +445 -0
- package/libs/icons.d.cts +1 -1
- package/libs/icons.d.ts +1 -1
- package/libs/index.cjs +39 -34
- package/libs/index.cjs.map +1 -1
- package/libs/index.d.cts +395 -4
- package/libs/index.d.ts +395 -4
- package/libs/index.js +17 -15
- package/libs/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/alert/alert.tsx +2 -3
- package/src/components/breadcrumbs/breadcrumb.test.tsx +1 -2
- package/src/components/buttons/README.mdx +19 -9
- package/src/components/buttons/button.tsx +19 -15
- package/src/components/link/link.stories.tsx +205 -8
- package/src/components/link/link.test.tsx +1 -1
- package/src/components/link/link.tsx +22 -0
- package/src/components/link/link.types.ts +11 -3
- package/src/docs/fpkit-developer.mdx +131 -53
- package/src/index.ts +7 -1
- package/libs/chunk-33PNJ4LO.cjs +0 -15
- package/libs/chunk-33PNJ4LO.cjs.map +0 -1
- package/libs/chunk-GT77BX4L.cjs +0 -17
- package/libs/chunk-GT77BX4L.cjs.map +0 -1
- package/libs/chunk-OVWLQYMK.js +0 -10
- package/libs/chunk-OVWLQYMK.js.map +0 -1
- package/libs/chunk-UEPAWMDF.js +0 -8
- package/libs/chunk-UEPAWMDF.js.map +0 -1
- package/libs/link-5192f411.d.ts +0 -323
- /package/libs/{chunk-7XPFW7CB.js.map → chunk-43TK2ICH.js.map} +0 -0
- /package/libs/{chunk-QVW6W76L.cjs.map → chunk-MGPWZRBX.cjs.map} +0 -0
- /package/libs/{chunk-X3JCTEPD.js.map → chunk-QKHPHMG2.js.map} +0 -0
- /package/libs/{chunk-T4T6GWYQ.cjs.map → chunk-R7NLLZU2.cjs.map} +0 -0
- /package/libs/{chunk-X5LGFCWG.js.map → chunk-UJAQVHWC.js.map} +0 -0
- /package/libs/{chunk-DKTHCQ5P.cjs.map → chunk-X5RKCLDC.cjs.map} +0 -0
package/libs/index.d.cts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { Button, ButtonProps } from './components/button.cjs';
|
|
2
2
|
export { Card, Content as CardContent, Footer as CardFooter, CardProps, Title as CardTitle } from './components/card.cjs';
|
|
3
|
+
import React, { ReactNode } from 'react';
|
|
4
|
+
import { I as IconProps } from './icons-287fce3a.js';
|
|
5
|
+
export { a as Icon, b as IconProps } from './icons-287fce3a.js';
|
|
3
6
|
export { default as Field, FieldProps } from './components/form/fields.cjs';
|
|
4
7
|
export { default as Input } from './components/form/inputs.cjs';
|
|
5
|
-
export { default as
|
|
6
|
-
import React, { ReactNode } from 'react';
|
|
7
|
-
export { L as Link, a as LinkProps, L as To } from './link-5192f411.js';
|
|
8
|
+
export { default as Link, default as To } from './components/link/link.cjs';
|
|
8
9
|
export { List } from './components/list/list.cjs';
|
|
9
10
|
export { Modal, ModalProps } from './components/modal.cjs';
|
|
10
11
|
export { default as Popover, PopoverProps } from './components/popover/popover.cjs';
|
|
@@ -20,6 +21,161 @@ export { default as Breadcrumb, BreadcrumbProps, CustomRoute, useBreadcrumbSegme
|
|
|
20
21
|
export { I as InputProps, T as TextareaProps } from './form.types-d25ebfac.js';
|
|
21
22
|
export { L as ListItemProps } from './list.types-d26de310.js';
|
|
22
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Valid severity levels for alerts.
|
|
26
|
+
* Each severity has associated colors, icons, and ARIA attributes.
|
|
27
|
+
*/
|
|
28
|
+
type Severity = "default" | "info" | "success" | "warning" | "error";
|
|
29
|
+
/**
|
|
30
|
+
* Props for the Alert component.
|
|
31
|
+
*/
|
|
32
|
+
type AlertProps = {
|
|
33
|
+
/**
|
|
34
|
+
* Whether the alert is open.
|
|
35
|
+
*/
|
|
36
|
+
open: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* The severity level of the alert.
|
|
39
|
+
* @default "default"
|
|
40
|
+
*/
|
|
41
|
+
severity?: Severity;
|
|
42
|
+
/**
|
|
43
|
+
* The main message content.
|
|
44
|
+
*/
|
|
45
|
+
children: React.ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* Optional title for the alert.
|
|
48
|
+
*/
|
|
49
|
+
title?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the alert can be dismissed.
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
54
|
+
dismissible?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Callback when alert is dismissed.
|
|
57
|
+
*/
|
|
58
|
+
onDismiss?: () => void;
|
|
59
|
+
/**
|
|
60
|
+
* Size of the severity icon in pixels.
|
|
61
|
+
* Allows customization of icon size for different contexts.
|
|
62
|
+
* @default 24
|
|
63
|
+
* @example
|
|
64
|
+
* ```tsx
|
|
65
|
+
* <Alert iconSize={32} severity="error">Larger icon</Alert>
|
|
66
|
+
* <Alert iconSize={16} severity="info">Smaller icon</Alert>
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
iconSize?: number;
|
|
70
|
+
/**
|
|
71
|
+
* Whether to hide the severity icon.
|
|
72
|
+
* When true, only text content is displayed.
|
|
73
|
+
* @default false
|
|
74
|
+
*/
|
|
75
|
+
hideIcon?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Additional props to pass to the Icon component.
|
|
78
|
+
* Allows fine-grained control over icon appearance.
|
|
79
|
+
* @example
|
|
80
|
+
* ```tsx
|
|
81
|
+
* <Alert iconProps={{ className: 'custom-icon', 'aria-label': 'Custom' }}>
|
|
82
|
+
* Alert with custom icon props
|
|
83
|
+
* </Alert>
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
iconProps?: IconProps;
|
|
87
|
+
/**
|
|
88
|
+
* Duration in milliseconds before the alert automatically dismisses.
|
|
89
|
+
* Set to 0 or undefined to disable auto-dismiss.
|
|
90
|
+
* @default undefined
|
|
91
|
+
* @example
|
|
92
|
+
* ```tsx
|
|
93
|
+
* <Alert autoHideDuration={5000}>Success message</Alert>
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
autoHideDuration?: number;
|
|
97
|
+
/**
|
|
98
|
+
* Whether to pause auto-dismiss when the alert is hovered or focused.
|
|
99
|
+
* Complies with WCAG 2.2.1 (Timing Adjustable).
|
|
100
|
+
* @default true
|
|
101
|
+
*/
|
|
102
|
+
pauseOnHover?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Semantic heading level for the title (2-6).
|
|
105
|
+
* When undefined, uses <strong> element instead of heading.
|
|
106
|
+
* Use this to maintain proper heading hierarchy on the page.
|
|
107
|
+
* @default undefined
|
|
108
|
+
* @example
|
|
109
|
+
* ```tsx
|
|
110
|
+
* <Alert titleLevel={2} title="Section Alert">...</Alert>
|
|
111
|
+
* <Alert titleLevel={3} title="Subsection Alert">...</Alert>
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
titleLevel?: 2 | 3 | 4 | 5 | 6;
|
|
115
|
+
/**
|
|
116
|
+
* Custom action buttons to display in the alert.
|
|
117
|
+
* @example
|
|
118
|
+
* ```tsx
|
|
119
|
+
* <Alert actions={<><Button>Undo</Button><Button>Dismiss</Button></>}>
|
|
120
|
+
* File deleted
|
|
121
|
+
* </Alert>
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
actions?: React.ReactNode;
|
|
125
|
+
/**
|
|
126
|
+
* Whether to automatically focus the alert when it becomes visible.
|
|
127
|
+
* Useful for critical alerts that require immediate attention.
|
|
128
|
+
* @default false
|
|
129
|
+
*/
|
|
130
|
+
autoFocus?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Visual variant of the alert.
|
|
133
|
+
* - outlined: Border with lighter background (default)
|
|
134
|
+
* - filled: Solid colored background
|
|
135
|
+
* - soft: No border, subtle background
|
|
136
|
+
* @default "outlined"
|
|
137
|
+
*/
|
|
138
|
+
variant?: "outlined" | "filled" | "soft";
|
|
139
|
+
/**
|
|
140
|
+
* Content rendering mode for alert children.
|
|
141
|
+
* Determines how the children content is wrapped in the alert message area.
|
|
142
|
+
* - "text": Wraps children in a paragraph tag (default, for simple text content)
|
|
143
|
+
* - "node": Renders children directly without wrapper (for complex layouts, lists, or custom components)
|
|
144
|
+
* @default "text"
|
|
145
|
+
* @example Simple text content (uses default "text" mode)
|
|
146
|
+
* ```tsx
|
|
147
|
+
* <Alert severity="info">
|
|
148
|
+
* This is a simple text message that will be wrapped in a paragraph.
|
|
149
|
+
* </Alert>
|
|
150
|
+
* ```
|
|
151
|
+
* @example Complex content with list
|
|
152
|
+
* ```tsx
|
|
153
|
+
* <Alert severity="warning" contentType="node">
|
|
154
|
+
* <p>Please review the following items:</p>
|
|
155
|
+
* <ul>
|
|
156
|
+
* <li>Check your email settings</li>
|
|
157
|
+
* <li>Update your password</li>
|
|
158
|
+
* <li>Enable two-factor authentication</li>
|
|
159
|
+
* </ul>
|
|
160
|
+
* </Alert>
|
|
161
|
+
* ```
|
|
162
|
+
* @example Custom component layout
|
|
163
|
+
* ```tsx
|
|
164
|
+
* <Alert severity="success" contentType="node">
|
|
165
|
+
* <div className="custom-layout">
|
|
166
|
+
* <p>Operation completed successfully!</p>
|
|
167
|
+
* <div className="stats">
|
|
168
|
+
* <span>Items processed: 150</span>
|
|
169
|
+
* <span>Time elapsed: 2.5s</span>
|
|
170
|
+
* </div>
|
|
171
|
+
* </div>
|
|
172
|
+
* </Alert>
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
contentType?: "text" | "node";
|
|
176
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "children">;
|
|
177
|
+
declare const Alert: React.FC<AlertProps>;
|
|
178
|
+
|
|
23
179
|
/**
|
|
24
180
|
* Props for the Img component.
|
|
25
181
|
*
|
|
@@ -328,6 +484,241 @@ declare const Img: {
|
|
|
328
484
|
displayName: string;
|
|
329
485
|
};
|
|
330
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
|
+
|
|
331
722
|
/**
|
|
332
723
|
* Props for the TextToSpeechComponent.
|
|
333
724
|
* @interface TextToSpeechComponentProps
|
|
@@ -955,4 +1346,4 @@ type FPComponent = {
|
|
|
955
1346
|
*/
|
|
956
1347
|
declare const FP: FPComponent;
|
|
957
1348
|
|
|
958
|
-
export { Article, Aside, Badge, BadgeProps, FP as Box, Caption, ComponentProps$1 as ComponentProps, Details, FP, Footer, Header, Img, ImgProps, Landmarks, Main, Section, Table, Tag, TagProps, TagVariant, Tbody, Td, TextToSpeech, Thead, Tr };
|
|
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 };
|