@fpkit/acss 0.5.12 → 0.5.13
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 +89 -0
- package/libs/{chunk-DV56L5YX.cjs → chunk-2LTJ7HHX.cjs} +4 -4
- package/libs/{chunk-EQ67LF46.js → chunk-2Y7W75TT.js} +3 -3
- package/libs/{chunk-KKLTUJFB.cjs → chunk-3MKLDCKQ.cjs} +5 -5
- package/libs/chunk-3MKLDCKQ.cjs.map +1 -0
- package/libs/{chunk-X3EVB7VS.cjs → chunk-5S4ORA4C.cjs} +3 -3
- package/libs/{chunk-O6QZBB6G.js → chunk-772NRB75.js} +5 -5
- package/libs/chunk-772NRB75.js.map +1 -0
- package/libs/{chunk-6BVXFW7U.cjs → chunk-AHDJGCG5.cjs} +3 -3
- package/libs/{chunk-E3XP6BEX.cjs → chunk-B7F5FS6D.cjs} +3 -3
- package/libs/chunk-D4YLRWAO.cjs +18 -0
- package/libs/chunk-D4YLRWAO.cjs.map +1 -0
- package/libs/chunk-ETFLFC2S.js +10 -0
- package/libs/chunk-ETFLFC2S.js.map +1 -0
- package/libs/chunk-GZ4QFPRY.js +9 -0
- package/libs/chunk-GZ4QFPRY.js.map +1 -0
- package/libs/{chunk-LHVJKDMA.cjs → chunk-J32EZPYD.cjs} +3 -3
- package/libs/chunk-JJ43O4Y5.js +8 -0
- package/libs/chunk-JJ43O4Y5.js.map +1 -0
- package/libs/chunk-KUKIVRC2.js +7 -0
- package/libs/chunk-KUKIVRC2.js.map +1 -0
- package/libs/chunk-L75OQKEI.cjs +13 -0
- package/libs/chunk-L75OQKEI.cjs.map +1 -0
- package/libs/{chunk-LL7HTLMS.cjs → chunk-M5RRNTVX.cjs} +3 -3
- package/libs/{chunk-LIQJ7ZZR.js → chunk-NGTJDDFO.js} +2 -2
- package/libs/chunk-OK5QEIMD.cjs +17 -0
- package/libs/chunk-OK5QEIMD.cjs.map +1 -0
- package/libs/chunk-P2DC76ZZ.cjs +18 -0
- package/libs/chunk-P2DC76ZZ.cjs.map +1 -0
- package/libs/chunk-PQ2K3BM6.cjs +17 -0
- package/libs/chunk-PQ2K3BM6.cjs.map +1 -0
- package/libs/{chunk-QCMV4VQZ.js → chunk-QLZWHAMK.js} +2 -2
- package/libs/{chunk-BIP2NY53.js → chunk-RIVUMPOG.js} +2 -2
- package/libs/{chunk-ICCKQ2GC.cjs → chunk-ROZI23GS.cjs} +4 -4
- package/libs/{chunk-NHYXGV3L.js → chunk-SMYRLO3E.js} +2 -2
- package/libs/{chunk-5ZM4XL44.js → chunk-TYRCEX2L.js} +2 -2
- package/libs/chunk-VUH3FXGJ.js +11 -0
- package/libs/chunk-VUH3FXGJ.js.map +1 -0
- package/libs/{chunk-PPOOBUOS.js → chunk-XBA562WW.js} +2 -2
- package/libs/{chunk-QVV34QEH.cjs → chunk-XTQKWY7W.cjs} +3 -3
- package/libs/{chunk-YWOYVRFT.js → chunk-ZANSFMTD.js} +3 -3
- package/libs/components/alert/alert.css +1 -1
- package/libs/components/alert/alert.css.map +1 -1
- package/libs/components/alert/alert.min.css +2 -2
- package/libs/components/badge/badge.css +1 -1
- package/libs/components/badge/badge.css.map +1 -1
- package/libs/components/badge/badge.min.css +2 -2
- package/libs/components/breadcrumbs/breadcrumb.cjs +9 -5
- package/libs/components/breadcrumbs/breadcrumb.d.cts +271 -32
- package/libs/components/breadcrumbs/breadcrumb.d.ts +271 -32
- package/libs/components/breadcrumbs/breadcrumb.js +3 -3
- package/libs/components/button.cjs +4 -4
- package/libs/components/button.d.cts +2 -2
- package/libs/components/button.d.ts +2 -2
- package/libs/components/button.js +2 -2
- package/libs/components/buttons/button.css +1 -1
- package/libs/components/buttons/button.css.map +1 -1
- package/libs/components/buttons/button.min.css +2 -2
- package/libs/components/card.cjs +7 -7
- package/libs/components/card.d.cts +277 -33
- package/libs/components/card.d.ts +277 -33
- package/libs/components/card.js +2 -2
- package/libs/components/cards/card.css +1 -1
- package/libs/components/cards/card.css.map +1 -1
- package/libs/components/cards/card.min.css +2 -2
- package/libs/components/details/details.css +1 -1
- package/libs/components/details/details.css.map +1 -1
- package/libs/components/details/details.min.css +2 -2
- package/libs/components/dialog/dialog.cjs +7 -7
- package/libs/components/dialog/dialog.css +1 -1
- package/libs/components/dialog/dialog.css.map +1 -1
- package/libs/components/dialog/dialog.d.cts +88 -34
- package/libs/components/dialog/dialog.d.ts +88 -34
- package/libs/components/dialog/dialog.js +5 -5
- package/libs/components/dialog/dialog.min.css +2 -2
- package/libs/components/form/fields.cjs +4 -4
- package/libs/components/form/fields.d.cts +2 -2
- package/libs/components/form/fields.d.ts +2 -2
- package/libs/components/form/fields.js +2 -2
- package/libs/components/form/textarea.cjs +4 -4
- package/libs/components/form/textarea.d.cts +2 -2
- package/libs/components/form/textarea.d.ts +2 -2
- package/libs/components/form/textarea.js +2 -2
- package/libs/components/heading/heading.cjs +3 -3
- package/libs/components/heading/heading.d.cts +3 -14
- package/libs/components/heading/heading.d.ts +3 -14
- package/libs/components/heading/heading.js +2 -2
- package/libs/components/icons/icon.cjs +4 -4
- package/libs/components/icons/icon.d.cts +148 -4
- package/libs/components/icons/icon.d.ts +148 -4
- package/libs/components/icons/icon.js +2 -2
- package/libs/components/images/img.css +1 -1
- package/libs/components/images/img.css.map +1 -1
- package/libs/components/images/img.min.css +2 -2
- package/libs/components/link/link.cjs +4 -4
- package/libs/components/link/link.d.cts +2 -2
- package/libs/components/link/link.d.ts +2 -2
- package/libs/components/link/link.js +2 -2
- package/libs/components/list/list.cjs +5 -5
- package/libs/components/list/list.d.cts +3 -3
- package/libs/components/list/list.d.ts +3 -3
- package/libs/components/list/list.js +2 -2
- package/libs/components/modal.cjs +4 -4
- package/libs/components/modal.js +3 -3
- package/libs/components/nav/nav.cjs +7 -7
- package/libs/components/nav/nav.d.cts +2 -2
- package/libs/components/nav/nav.d.ts +2 -2
- package/libs/components/nav/nav.js +3 -3
- package/libs/components/text/text.cjs +5 -5
- package/libs/components/text/text.d.cts +2 -2
- package/libs/components/text/text.d.ts +2 -2
- package/libs/components/text/text.js +2 -2
- package/libs/heading-3648c538.d.ts +250 -0
- package/libs/hooks.cjs +7 -0
- package/libs/hooks.d.cts +5 -0
- package/libs/hooks.d.ts +5 -0
- package/libs/hooks.js +3 -0
- package/libs/icons.cjs +3 -3
- package/libs/icons.d.cts +1 -1
- package/libs/icons.d.ts +1 -1
- package/libs/icons.js +2 -2
- package/libs/index.cjs +112 -91
- package/libs/index.cjs.map +1 -1
- package/libs/index.css +1 -1
- package/libs/index.css.map +1 -1
- package/libs/index.d.cts +515 -31
- package/libs/index.d.ts +515 -31
- package/libs/index.js +31 -19
- package/libs/index.js.map +1 -1
- package/libs/ui-645f95b5.d.ts +285 -0
- package/package.json +2 -83
- package/src/components/README-UI.mdx +416 -0
- package/src/components/alert/ACCESSIBILITY.md +319 -0
- package/src/components/alert/README.mdx +475 -19
- package/src/components/alert/alert.scss +113 -6
- package/src/components/alert/alert.stories.tsx +372 -0
- package/src/components/alert/alert.test.tsx +762 -0
- package/src/components/alert/alert.tsx +331 -66
- package/src/components/alert/views/alert-actions.tsx +13 -0
- package/src/components/alert/views/alert-content.tsx +17 -0
- package/src/components/alert/views/alert-icon.tsx +53 -0
- package/src/components/alert/views/alert-screen-reader-text.tsx +30 -0
- package/src/components/alert/views/alert-title.tsx +23 -0
- package/src/components/alert/views/alert-view.tsx +158 -0
- package/src/components/alert/views/index.ts +12 -0
- package/src/components/badge/badge.mdx +186 -49
- package/src/components/badge/badge.scss +20 -2
- package/src/components/badge/badge.stories.tsx +160 -14
- package/src/components/badge/badge.test.tsx +179 -0
- package/src/components/badge/badge.tsx +97 -4
- package/src/components/breadcrumbs/README.mdx +364 -45
- package/src/components/breadcrumbs/__snapshots__/breadcrumb.test.tsx.snap +152 -0
- package/src/components/breadcrumbs/breadcrumb.stories.tsx +7 -3
- package/src/components/breadcrumbs/breadcrumb.test.tsx +490 -0
- package/src/components/breadcrumbs/breadcrumb.tsx +427 -170
- package/src/components/buttons/button.scss +34 -31
- package/src/components/buttons/button.stories.tsx +35 -0
- package/src/components/cards/README.mdx +657 -0
- package/src/components/cards/card.scss +22 -0
- package/src/components/cards/card.stories.tsx +167 -5
- package/src/components/cards/card.test.tsx +360 -20
- package/src/components/cards/card.tsx +200 -79
- package/src/components/cards/card.types.ts +135 -0
- package/src/components/cards/card.utils.ts +79 -0
- package/src/components/details/ACCESSIBILITY-REVIEW-LIVE.md +1050 -0
- package/src/components/details/ACCESSIBILITY-REVIEW.md +502 -0
- package/src/components/details/README.mdx +437 -69
- package/src/components/details/details.scss +16 -7
- package/src/components/details/details.test.tsx +385 -0
- package/src/components/details/details.tsx +101 -69
- package/src/components/details/details.types.ts +76 -0
- package/src/components/dialog/README.mdx +513 -110
- package/src/components/dialog/dialog-modal.tsx +79 -56
- package/src/components/dialog/dialog.scss +53 -3
- package/src/components/dialog/dialog.stories.tsx +10 -7
- package/src/components/dialog/dialog.test.tsx +450 -0
- package/src/components/dialog/dialog.tsx +69 -59
- package/src/components/dialog/dialog.types.ts +133 -0
- package/src/components/dialog/views/dialog-footer.tsx +54 -11
- package/src/components/dialog/views/dialog-header.tsx +20 -15
- package/src/components/heading/heading.stories.tsx +44 -4
- package/src/components/heading/heading.tsx +89 -23
- package/src/components/icons/README.mdx +332 -0
- package/src/components/icons/icon.stories.tsx +74 -1
- package/src/components/icons/icon.tsx +89 -1
- package/src/components/icons/types.ts +47 -0
- package/src/components/images/README.mdx +340 -24
- package/src/components/images/img.scss +19 -3
- package/src/components/images/img.stories.tsx +424 -15
- package/src/components/images/img.test.tsx +354 -25
- package/src/components/images/img.tsx +186 -63
- package/src/components/images/img.types.ts +211 -0
- package/src/components/title/MIGRATION.md +199 -0
- package/src/components/title/README.md +326 -0
- package/src/components/title/README.mdx +452 -0
- package/src/components/title/title.stories.tsx +393 -0
- package/src/components/title/title.test.tsx +251 -0
- package/src/components/title/title.tsx +219 -0
- package/src/components/ui.stories.tsx +894 -0
- package/src/components/ui.test.tsx +559 -0
- package/src/components/ui.tsx +266 -15
- package/src/components/word-count/README.md +240 -0
- package/src/hooks.ts +1 -0
- package/src/index.ts +10 -2
- package/src/sass/_properties.scss +1 -0
- package/src/styles/alert/alert.css +94 -4
- package/src/styles/alert/alert.css.map +1 -1
- package/src/styles/badge/badge.css +20 -2
- package/src/styles/badge/badge.css.map +1 -1
- package/src/styles/buttons/button.css +31 -31
- package/src/styles/buttons/button.css.map +1 -1
- package/src/styles/cards/card.css +16 -0
- package/src/styles/cards/card.css.map +1 -1
- package/src/styles/details/details.css +19 -8
- package/src/styles/details/details.css.map +1 -1
- package/src/styles/dialog/dialog.css +43 -2
- package/src/styles/dialog/dialog.css.map +1 -1
- package/src/styles/images/img.css +15 -3
- package/src/styles/images/img.css.map +1 -1
- package/src/styles/index.css +240 -51
- package/src/styles/index.css.map +1 -1
- package/src/test/setup.d.ts +9 -0
- package/src/test/setup.ts +53 -1
- package/libs/chunk-6TE5QEVE.cjs +0 -13
- package/libs/chunk-6TE5QEVE.cjs.map +0 -1
- package/libs/chunk-7K76RW2A.cjs +0 -18
- package/libs/chunk-7K76RW2A.cjs.map +0 -1
- package/libs/chunk-BSPKFLO4.js +0 -8
- package/libs/chunk-BSPKFLO4.js.map +0 -1
- package/libs/chunk-BV5CLH44.cjs +0 -18
- package/libs/chunk-BV5CLH44.cjs.map +0 -1
- package/libs/chunk-DKGJHKGW.js +0 -9
- package/libs/chunk-DKGJHKGW.js.map +0 -1
- package/libs/chunk-ECLD37WN.cjs +0 -16
- package/libs/chunk-ECLD37WN.cjs.map +0 -1
- package/libs/chunk-HYBZBN4G.js +0 -8
- package/libs/chunk-HYBZBN4G.js.map +0 -1
- package/libs/chunk-KKLTUJFB.cjs.map +0 -1
- package/libs/chunk-M5QL5TAE.cjs +0 -14
- package/libs/chunk-M5QL5TAE.cjs.map +0 -1
- package/libs/chunk-NE6YXTMC.js +0 -7
- package/libs/chunk-NE6YXTMC.js.map +0 -1
- package/libs/chunk-O6QZBB6G.js.map +0 -1
- package/libs/chunk-SXVZSWX6.js +0 -11
- package/libs/chunk-SXVZSWX6.js.map +0 -1
- package/libs/ui-9a6f9f8d.d.ts +0 -24
- package/src/components/cards/README.md +0 -80
- package/src/components/dialog/hooks/useClickOutside.ts +0 -33
- /package/libs/{chunk-DV56L5YX.cjs.map → chunk-2LTJ7HHX.cjs.map} +0 -0
- /package/libs/{chunk-EQ67LF46.js.map → chunk-2Y7W75TT.js.map} +0 -0
- /package/libs/{chunk-X3EVB7VS.cjs.map → chunk-5S4ORA4C.cjs.map} +0 -0
- /package/libs/{chunk-6BVXFW7U.cjs.map → chunk-AHDJGCG5.cjs.map} +0 -0
- /package/libs/{chunk-E3XP6BEX.cjs.map → chunk-B7F5FS6D.cjs.map} +0 -0
- /package/libs/{chunk-LHVJKDMA.cjs.map → chunk-J32EZPYD.cjs.map} +0 -0
- /package/libs/{chunk-LL7HTLMS.cjs.map → chunk-M5RRNTVX.cjs.map} +0 -0
- /package/libs/{chunk-LIQJ7ZZR.js.map → chunk-NGTJDDFO.js.map} +0 -0
- /package/libs/{chunk-QCMV4VQZ.js.map → chunk-QLZWHAMK.js.map} +0 -0
- /package/libs/{chunk-BIP2NY53.js.map → chunk-RIVUMPOG.js.map} +0 -0
- /package/libs/{chunk-ICCKQ2GC.cjs.map → chunk-ROZI23GS.cjs.map} +0 -0
- /package/libs/{chunk-NHYXGV3L.js.map → chunk-SMYRLO3E.js.map} +0 -0
- /package/libs/{chunk-5ZM4XL44.js.map → chunk-TYRCEX2L.js.map} +0 -0
- /package/libs/{chunk-PPOOBUOS.js.map → chunk-XBA562WW.js.map} +0 -0
- /package/libs/{chunk-QVV34QEH.cjs.map → chunk-XTQKWY7W.cjs.map} +0 -0
- /package/libs/{chunk-YWOYVRFT.js.map → chunk-ZANSFMTD.js.map} +0 -0
|
@@ -1,51 +1,105 @@
|
|
|
1
|
-
import React__default, { CSSProperties } from 'react';
|
|
2
|
-
import { F as FP } from '../../ui-9a6f9f8d.js';
|
|
1
|
+
import React__default, { ReactNode, CSSProperties } from 'react';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
|
-
*
|
|
4
|
+
* Base properties shared by all dialog variants.
|
|
6
5
|
*
|
|
7
|
-
* @property {
|
|
8
|
-
* @property {
|
|
9
|
-
* @property {
|
|
10
|
-
* @property {string}
|
|
11
|
-
* @property {
|
|
12
|
-
* @property {React.ReactNode} children - The content to be displayed inside the dialog.
|
|
13
|
-
* @property {() => void | Promise<void>} [onConfirm] - A callback function to be called when the user confirms the dialog.
|
|
14
|
-
* @property {string} [confirmLabel] - The label for the confirm button.
|
|
15
|
-
* @property {string} [cancelLabel] - The label for the cancel button.
|
|
16
|
-
* @property {string} [className] - An optional CSS class name to be applied to the dialog.
|
|
17
|
-
* @property {CSSProperties} [styles] - Optional inline styles to be applied to the dialog.
|
|
6
|
+
* @property {string} dialogTitle - The title displayed in the dialog header
|
|
7
|
+
* @property {string} [dialogLabel] - Optional accessible label for the dialog (aria-label)
|
|
8
|
+
* @property {ReactNode} children - Content to be displayed inside the dialog body
|
|
9
|
+
* @property {string} [className] - Additional CSS classes to apply to the dialog
|
|
10
|
+
* @property {CSSProperties} [styles] - Inline styles to apply to the dialog element
|
|
18
11
|
*/
|
|
19
|
-
|
|
12
|
+
interface BaseDialogProps {
|
|
13
|
+
/** The title displayed in the dialog header */
|
|
20
14
|
dialogTitle: string;
|
|
15
|
+
/** Optional accessible label for the dialog (aria-label) */
|
|
21
16
|
dialogLabel?: string;
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
/** Content to be displayed inside the dialog body */
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
/** Additional CSS classes to apply to the dialog */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Inline styles to apply to the dialog element */
|
|
22
|
+
styles?: CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Props for the controlled Dialog component.
|
|
26
|
+
* Use this when you want to manage dialog state externally.
|
|
27
|
+
*
|
|
28
|
+
* @extends BaseDialogProps
|
|
29
|
+
* @property {boolean} isOpen - Controls whether the dialog is currently open
|
|
30
|
+
* @property {(open: boolean) => void} onOpenChange - Callback fired when dialog open state should change
|
|
31
|
+
* @property {boolean} [isAlertDialog=false] - If true, renders as non-modal inline alert using dialog.show()
|
|
32
|
+
* @property {() => void} [onClose] - Deprecated: Use onOpenChange instead. Called when dialog closes.
|
|
33
|
+
* @property {() => void | Promise<void>} [onConfirm] - Callback fired when confirm button is clicked
|
|
34
|
+
* @property {string} [confirmLabel="Confirm"] - Text label for the confirm button
|
|
35
|
+
* @property {string} [cancelLabel="Cancel"] - Text label for the cancel button
|
|
36
|
+
* @property {boolean} [hideFooter=false] - If true, hides the dialog footer with action buttons
|
|
37
|
+
*/
|
|
38
|
+
interface DialogProps extends BaseDialogProps {
|
|
39
|
+
/** Controls whether the dialog is currently open (controlled component) */
|
|
40
|
+
isOpen: boolean;
|
|
41
|
+
/** Callback fired when dialog open state should change */
|
|
42
|
+
onOpenChange: (open: boolean) => void;
|
|
43
|
+
/** If true, renders as non-modal inline alert using dialog.show() instead of dialog.showModal() */
|
|
24
44
|
isAlertDialog?: boolean;
|
|
45
|
+
/** @deprecated Use onOpenChange instead. Called when dialog closes. */
|
|
25
46
|
onClose?: () => void;
|
|
47
|
+
/** Callback fired when confirm button is clicked */
|
|
26
48
|
onConfirm?: () => void | Promise<void>;
|
|
49
|
+
/** Text label for the confirm button */
|
|
27
50
|
confirmLabel?: string;
|
|
51
|
+
/** Text label for the cancel button */
|
|
28
52
|
cancelLabel?: string;
|
|
29
|
-
|
|
53
|
+
/** If true, hides the dialog footer with action buttons */
|
|
30
54
|
hideFooter?: boolean;
|
|
31
|
-
|
|
32
|
-
|
|
55
|
+
}
|
|
56
|
+
|
|
33
57
|
/**
|
|
34
|
-
*
|
|
58
|
+
* A controlled dialog component that supports both modal and non-modal (inline alert) modes.
|
|
59
|
+
*
|
|
60
|
+
* **Modal Dialog** (default): Uses native `<dialog>` element with `.showModal()` which provides:
|
|
61
|
+
* - Automatic focus trap (Tab cycles within dialog)
|
|
62
|
+
* - Escape key closes dialog (native behavior)
|
|
63
|
+
* - Backdrop overlay with click-to-close
|
|
64
|
+
* - Inert background (page content becomes non-interactive)
|
|
65
|
+
*
|
|
66
|
+
* **Inline Alert Dialog** (`isAlertDialog={true}`): Uses `.show()` for non-modal inline alerts:
|
|
67
|
+
* - No focus trap (page remains interactive)
|
|
68
|
+
* - No escape key behavior
|
|
69
|
+
* - Positioned inline in page flow
|
|
70
|
+
* - User must explicitly close with button
|
|
71
|
+
*
|
|
72
|
+
* @component
|
|
73
|
+
* @example
|
|
74
|
+
* ```tsx
|
|
75
|
+
* // Controlled usage
|
|
76
|
+
* const [open, setOpen] = useState(false);
|
|
77
|
+
* <Dialog
|
|
78
|
+
* isOpen={open}
|
|
79
|
+
* onOpenChange={setOpen}
|
|
80
|
+
* dialogTitle="Confirm Delete"
|
|
81
|
+
* >
|
|
82
|
+
* Are you sure you want to delete this item?
|
|
83
|
+
* </Dialog>
|
|
84
|
+
* ```
|
|
35
85
|
*
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
38
|
-
* @param
|
|
39
|
-
* @param dialogTitle - The title
|
|
40
|
-
* @param
|
|
41
|
-
* @param
|
|
42
|
-
* @param
|
|
43
|
-
* @param
|
|
44
|
-
* @param
|
|
45
|
-
* @param
|
|
46
|
-
* @param
|
|
86
|
+
* @param {DialogProps} props - Component props
|
|
87
|
+
* @param {boolean} props.isOpen - Controls whether the dialog is currently open
|
|
88
|
+
* @param {(open: boolean) => void} props.onOpenChange - Callback fired when dialog open state changes
|
|
89
|
+
* @param {string} props.dialogTitle - The title displayed in the dialog header
|
|
90
|
+
* @param {boolean} [props.isAlertDialog=false] - If true, renders as non-modal inline alert
|
|
91
|
+
* @param {() => void} [props.onClose] - Deprecated: Use onOpenChange. Called when dialog closes.
|
|
92
|
+
* @param {ReactNode} props.children - Content to display inside the dialog body
|
|
93
|
+
* @param {() => void | Promise<void>} [props.onConfirm] - Callback fired when confirm button is clicked
|
|
94
|
+
* @param {string} [props.confirmLabel="Confirm"] - Text label for confirm button
|
|
95
|
+
* @param {string} [props.cancelLabel="Cancel"] - Text label for cancel button
|
|
96
|
+
* @param {boolean} [props.hideFooter=false] - If true, hides the footer with action buttons
|
|
97
|
+
* @param {string} [props.className] - Additional CSS classes to apply
|
|
98
|
+
* @param {string} [props.dialogLabel] - Optional aria-label for the dialog
|
|
99
|
+
* @param {CSSProperties} [props.styles] - Inline styles to apply to dialog element
|
|
100
|
+
* @returns {JSX.Element} A controlled dialog component
|
|
47
101
|
*/
|
|
48
|
-
declare const Dialog: React__default.FC<
|
|
49
|
-
declare const _default: React__default.NamedExoticComponent<
|
|
102
|
+
declare const Dialog: React__default.FC<DialogProps>;
|
|
103
|
+
declare const _default: React__default.NamedExoticComponent<DialogProps>;
|
|
50
104
|
|
|
51
105
|
export { Dialog, _default as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { a as Dialog, b as default } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
1
|
+
export { a as Dialog, b as default } from '../../chunk-VUH3FXGJ.js';
|
|
2
|
+
import '../../chunk-ETFLFC2S.js';
|
|
3
|
+
import '../../chunk-772NRB75.js';
|
|
4
|
+
import '../../chunk-QLZWHAMK.js';
|
|
5
|
+
import '../../chunk-KUKIVRC2.js';
|
|
6
6
|
//# sourceMappingURL=out.js.map
|
|
7
7
|
//# sourceMappingURL=dialog.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
:root{--dialog-min-w: max(20rem, 80%);--dialog-gap: 0.625rem;--dialog-border-color: lightgray;--dialog-border-width: thin;--dialog-border-style: solid;--dialog-border-radius: var(--border-radius);--dialog-padding: 1.5rem;--dialog-padding-inline: 1rem;--dialog-close-color: gray;--dialog-button-bg: transparent;--dialog-button-border: transparent thin solid;--dialog-button-hover-bg: whitesmoke;--dialog-display: flex;--dialog-flex-direction: column}dialog{width:var(--dialog-min-w);min-width:var(--min-w);gap:var(--dialog-gap);border:var(--dialog-border-color) var(--dialog-border-width) solid;border-radius:var(--dialog-border-radius);padding:var(--dialog-padding);padding-block-start:
|
|
1
|
+
:root{--dialog-min-w: max(20rem, 80%);--dialog-gap: 0.625rem;--dialog-border-color: lightgray;--dialog-border-width: thin;--dialog-border-style: solid;--dialog-border-radius: var(--border-radius);--dialog-padding: 1.5rem;--dialog-padding-inline: 1rem;--dialog-close-color: gray;--dialog-button-bg: transparent;--dialog-button-border: transparent thin solid;--dialog-button-hover-bg: whitesmoke;--dialog-display: flex;--dialog-flex-direction: column;--dialog-focus-color: #0066cc;--dialog-focus-width: 0.125rem;--dialog-focus-offset: 0.125rem;--dialog-focus-outline: var(--dialog-focus-width) solid var(--dialog-focus-color)}@media(prefers-contrast: high){:root{--dialog-border-color: currentColor;--dialog-border-width: 0.125rem;--dialog-close-color: currentColor;--dialog-button-border: currentColor 0.125rem solid;--dialog-focus-width: 0.1875rem}}dialog{width:var(--dialog-min-w);min-width:var(--min-w);gap:var(--dialog-gap);border:var(--dialog-border-color) var(--dialog-border-width) solid;border-radius:var(--dialog-border-radius);padding:var(--dialog-padding);padding-block-start:var(--dialog-padding)}dialog:focus-visible{outline:var(--dialog-focus-outline);outline-offset:var(--dialog-focus-offset)}dialog[open]{display:var(--dialog-display);flex-direction:var(--dialog-flex-direction);gap:var(--dialog-gap)}dialog section{width:100%;display:flex;justify-content:start;gap:var(--dialog-gap);flex-direction:var(--dialog-flex-direction);margin-block-start:0;--sect-y: 0}.dialog-header{display:flex;justify-content:space-between;align-items:center;width:100%;min-width:100%}.dialog-header h3{margin-block-start:0;margin-block-end:0}.dialog-header .dialog-close{margin-block-end:0}.dialog-header button[type=button]{background-color:var(--dialog-button-bg);border:var(--dialog-button-border);cursor:pointer}.dialog-header button[type=button]:hover{border-color:var(--dialog-close-color);background-color:var(--dialog-button-hover-bg)}.dialog-header button[type=button]:focus-visible{outline:var(--dialog-focus-outline);outline-offset:var(--dialog-focus-offset);border-color:var(--dialog-focus-color);background-color:var(--dialog-button-hover-bg)}.dialog-header button[type=button]:focus:not(:focus-visible){outline:none}.alert-dialog-actions,.dialog-footer{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:var(--dialog-footer-justify, flex-end);gap:var(--dialog-gap);width:100%}.alert-dialog-actions button:focus-visible,.dialog-footer button:focus-visible{outline:var(--dialog-focus-outline);outline-offset:var(--dialog-focus-offset)}.alert-dialog-actions button:focus:not(:focus-visible),.dialog-footer button:focus:not(:focus-visible){outline:none}
|
|
2
2
|
|
|
3
|
-
/*# sourceMappingURL=data:application/json;base64,
|
|
3
|
+
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL2RpYWxvZy9kaWFsb2cuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUNFLCtCQUFBLENBQ0Esc0JBQUEsQ0FDQSxnQ0FBQSxDQUNBLDJCQUFBLENBQ0EsNEJBQUEsQ0FDQSw0Q0FBQSxDQUNBLHdCQUFBLENBQ0EsNkJBQUEsQ0FDQSwwQkFBQSxDQUNBLCtCQUFBLENBQ0EsOENBQUEsQ0FDQSxvQ0FBQSxDQUNBLHNCQUFBLENBQ0EsK0JBQUEsQ0FHQSw2QkFBQSxDQUNBLDhCQUFBLENBQ0EsK0JBQUEsQ0FDQSxpRkFBQSxDQUlGLCtCQUNFLE1BQ0UsbUNBQUEsQ0FDQSwrQkFBQSxDQUNBLGtDQUFBLENBQ0EsbURBQUEsQ0FDQSwrQkFBQSxDQUFBLENBSUosT0FDRSx5QkFBQSxDQUNBLHNCQUFBLENBQ0EscUJBQUEsQ0FDQSxrRUFBQSxDQUNBLHlDQUFBLENBQ0EsNkJBQUEsQ0FDQSx5Q0FBQSxDQUdBLHFCQUNFLG1DQUFBLENBQ0EseUNBQUEsQ0FHRixhQUNFLDZCQUFBLENBQ0EsMkNBQUEsQ0FDQSxxQkFBQSxDQUdGLGVBQ0UsVUFBQSxDQUNBLFlBQUEsQ0FDQSxxQkFBQSxDQUNBLHFCQUFBLENBQ0EsMkNBQUEsQ0FDQSxvQkFBQSxDQUNBLFdBQUEsQ0FJSixlQUNFLFlBQUEsQ0FDQSw2QkFBQSxDQUNBLGtCQUFBLENBQ0EsVUFBQSxDQUNBLGNBQUEsQ0FFQSxrQkFDRSxvQkFBQSxDQUNBLGtCQUFBLENBR0YsNkJBQ0Usa0JBQUEsQ0FHRixtQ0FDRSx3Q0FBQSxDQUNBLGtDQUFBLENBQ0EsY0FBQSxDQUVBLHlDQUNFLHNDQUFBLENBQ0EsOENBQUEsQ0FJRixpREFDRSxtQ0FBQSxDQUNBLHlDQUFBLENBQ0Esc0NBQUEsQ0FDQSw4Q0FBQSxDQUlGLDZEQUNFLFlBQUEsQ0FLTixxQ0FFRSxZQUFBLENBQ0Esa0JBQUEsQ0FDQSxjQUFBLENBQ0Esc0RBQUEsQ0FDQSxxQkFBQSxDQUNBLFVBQUEsQ0FHQSwrRUFDRSxtQ0FBQSxDQUNBLHlDQUFBLENBR0YsdUdBQ0UsWUFBQSIsImZpbGUiOiJkaWFsb2cubWluLmNzcyJ9 */
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
5
|
+
var chunkAHDJGCG5_cjs = require('../../chunk-AHDJGCG5.cjs');
|
|
6
|
+
require('../../chunk-L75OQKEI.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, 'Field', {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkAHDJGCG5_cjs.a; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, 'default', {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkAHDJGCG5_cjs.b; }
|
|
17
17
|
});
|
|
18
18
|
//# sourceMappingURL=out.js.map
|
|
19
19
|
//# sourceMappingURL=fields.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { U as UI } from '../../ui-645f95b5.js';
|
|
3
3
|
|
|
4
4
|
type FieldProps = {
|
|
5
5
|
/**
|
|
@@ -7,7 +7,7 @@ type FieldProps = {
|
|
|
7
7
|
*/
|
|
8
8
|
label: React__default.ReactNode;
|
|
9
9
|
children: React__default.ReactNode;
|
|
10
|
-
} & React__default.ComponentProps<'label'> & Partial<React__default.ComponentProps<typeof
|
|
10
|
+
} & React__default.ComponentProps<'label'> & Partial<React__default.ComponentProps<typeof UI>>;
|
|
11
11
|
/**
|
|
12
12
|
* Field component that renders a label and children wrapped in a div element.
|
|
13
13
|
* @param labelFor Defines the for attribute of the label element
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { U as UI } from '../../ui-645f95b5.js';
|
|
3
3
|
|
|
4
4
|
type FieldProps = {
|
|
5
5
|
/**
|
|
@@ -7,7 +7,7 @@ type FieldProps = {
|
|
|
7
7
|
*/
|
|
8
8
|
label: React__default.ReactNode;
|
|
9
9
|
children: React__default.ReactNode;
|
|
10
|
-
} & React__default.ComponentProps<'label'> & Partial<React__default.ComponentProps<typeof
|
|
10
|
+
} & React__default.ComponentProps<'label'> & Partial<React__default.ComponentProps<typeof UI>>;
|
|
11
11
|
/**
|
|
12
12
|
* Field component that renders a label and children wrapped in a div element.
|
|
13
13
|
* @param labelFor Defines the for attribute of the label element
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as Field, b as default } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { a as Field, b as default } from '../../chunk-RIVUMPOG.js';
|
|
2
|
+
import '../../chunk-KUKIVRC2.js';
|
|
3
3
|
//# sourceMappingURL=out.js.map
|
|
4
4
|
//# sourceMappingURL=fields.js.map
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
5
|
+
var chunkM5RRNTVX_cjs = require('../../chunk-M5RRNTVX.cjs');
|
|
6
|
+
require('../../chunk-L75OQKEI.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, 'Textarea', {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkM5RRNTVX_cjs.a; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, 'default', {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkM5RRNTVX_cjs.b; }
|
|
17
17
|
});
|
|
18
18
|
//# sourceMappingURL=out.js.map
|
|
19
19
|
//# sourceMappingURL=textarea.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { U as UI } from '../../ui-645f95b5.js';
|
|
3
3
|
|
|
4
|
-
type TextareaProps = React__default.ComponentProps<'textarea'> & React__default.ComponentProps<typeof
|
|
4
|
+
type TextareaProps = React__default.ComponentProps<'textarea'> & React__default.ComponentProps<typeof UI>;
|
|
5
5
|
/**
|
|
6
6
|
* Textarea component.
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { U as UI } from '../../ui-645f95b5.js';
|
|
3
3
|
|
|
4
|
-
type TextareaProps = React__default.ComponentProps<'textarea'> & React__default.ComponentProps<typeof
|
|
4
|
+
type TextareaProps = React__default.ComponentProps<'textarea'> & React__default.ComponentProps<typeof UI>;
|
|
5
5
|
/**
|
|
6
6
|
* Textarea component.
|
|
7
7
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as Textarea, b as default } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { a as Textarea, b as default } from '../../chunk-XBA562WW.js';
|
|
2
|
+
import '../../chunk-KUKIVRC2.js';
|
|
3
3
|
//# sourceMappingURL=out.js.map
|
|
4
4
|
//# sourceMappingURL=textarea.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
3
|
+
var chunkPQ2K3BM6_cjs = require('../../chunk-PQ2K3BM6.cjs');
|
|
4
|
+
require('../../chunk-L75OQKEI.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
module.exports =
|
|
8
|
+
module.exports = chunkPQ2K3BM6_cjs.b;
|
|
9
9
|
//# sourceMappingURL=out.js.map
|
|
10
10
|
//# sourceMappingURL=heading.cjs.map
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
type TitleProps = {
|
|
5
|
-
children: React__default.ReactNode;
|
|
6
|
-
type: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
7
|
-
ui?: string;
|
|
8
|
-
} & React__default.ComponentProps<typeof FP>;
|
|
9
|
-
declare const Heading: {
|
|
10
|
-
({ type, id, styles, ui, children, ...props }: TitleProps): React__default.JSX.Element;
|
|
11
|
-
displayName: string;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export { TitleProps, Heading as default };
|
|
1
|
+
import 'react';
|
|
2
|
+
export { c as TitleProps, b as default } from '../../heading-3648c538.js';
|
|
3
|
+
import '../../ui-645f95b5.js';
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
type TitleProps = {
|
|
5
|
-
children: React__default.ReactNode;
|
|
6
|
-
type: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
7
|
-
ui?: string;
|
|
8
|
-
} & React__default.ComponentProps<typeof FP>;
|
|
9
|
-
declare const Heading: {
|
|
10
|
-
({ type, id, styles, ui, children, ...props }: TitleProps): React__default.JSX.Element;
|
|
11
|
-
displayName: string;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export { TitleProps, Heading as default };
|
|
1
|
+
import 'react';
|
|
2
|
+
export { c as TitleProps, b as default } from '../../heading-3648c538.js';
|
|
3
|
+
import '../../ui-645f95b5.js';
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
5
|
+
var chunk3MKLDCKQ_cjs = require('../../chunk-3MKLDCKQ.cjs');
|
|
6
|
+
require('../../chunk-L75OQKEI.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, 'Icon', {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunk3MKLDCKQ_cjs.a; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, 'default', {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunk3MKLDCKQ_cjs.b; }
|
|
17
17
|
});
|
|
18
18
|
//# sourceMappingURL=out.js.map
|
|
19
19
|
//# sourceMappingURL=icon.cjs.map
|
|
@@ -1,15 +1,62 @@
|
|
|
1
1
|
import { C as ComponentProps } from '../../component-props-a8a2f97e.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { U as UI } from '../../ui-645f95b5.js';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Props for individual icon SVG components (e.g., Icon.Code, Icon.Home).
|
|
7
|
+
*
|
|
8
|
+
* These props control the visual presentation of SVG icons. Icon components
|
|
9
|
+
* are decorative by default and should be wrapped in the `Icon` container
|
|
10
|
+
* component which handles accessibility concerns.
|
|
11
|
+
*
|
|
12
|
+
* @property {string} [fill] - SVG fill color (CSS color value)
|
|
13
|
+
* @property {number} [size] - Icon size in pixels (sets both width and height)
|
|
14
|
+
* @property {string} [strokeColor] - SVG stroke color (CSS color value)
|
|
15
|
+
* @property {string} [strokeWidth] - SVG stroke width (e.g., '2px', '1.5')
|
|
16
|
+
* @property {string} [role] - ARIA role (use 'img' for semantic icons)
|
|
17
|
+
* @property {string} [aria-label] - Accessible label for standalone icons
|
|
18
|
+
* @property {boolean} [aria-hidden] - Hide from screen readers (default: true via Icon wrapper)
|
|
19
|
+
* @property {string} [alt] - @deprecated Use aria-label instead. Legacy prop for accessible label.
|
|
20
|
+
* @property {number} [width] - Explicit width in pixels (overrides size)
|
|
21
|
+
* @property {number} [height] - Explicit height in pixels (overrides size)
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* // Decorative icon with custom styling
|
|
26
|
+
* <Icon>
|
|
27
|
+
* <Icon.Code size={24} fill="blue" />
|
|
28
|
+
* View Code
|
|
29
|
+
* </Icon>
|
|
30
|
+
*
|
|
31
|
+
* // Standalone semantic icon
|
|
32
|
+
* <Icon aria-hidden={false} aria-label="Code snippet">
|
|
33
|
+
* <Icon.Code size={20} />
|
|
34
|
+
* </Icon>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
5
37
|
interface IconProps$1 extends Partial<ComponentProps> {
|
|
38
|
+
/** SVG fill color */
|
|
6
39
|
fill?: string;
|
|
40
|
+
/** Icon size in pixels (sets both width and height) */
|
|
7
41
|
size?: number;
|
|
42
|
+
/** SVG stroke color */
|
|
8
43
|
strokeColor?: string;
|
|
44
|
+
/** SVG stroke width */
|
|
9
45
|
strokeWidth?: string;
|
|
46
|
+
/** ARIA role (use 'img' for semantic icons) */
|
|
10
47
|
role?: string;
|
|
48
|
+
/** Accessible label (required for standalone icons) */
|
|
49
|
+
'aria-label'?: string;
|
|
50
|
+
/** Hide from screen readers (default: true) */
|
|
51
|
+
'aria-hidden'?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated Use aria-label instead. This prop exists for backward compatibility.
|
|
54
|
+
* The alt attribute is only valid for img elements, not SVG.
|
|
55
|
+
*/
|
|
11
56
|
alt?: string;
|
|
57
|
+
/** Explicit width in pixels */
|
|
12
58
|
width?: number;
|
|
59
|
+
/** Explicit height in pixels */
|
|
13
60
|
height?: number;
|
|
14
61
|
}
|
|
15
62
|
|
|
@@ -18,9 +65,91 @@ declare namespace Star {
|
|
|
18
65
|
var displayName: string;
|
|
19
66
|
}
|
|
20
67
|
|
|
21
|
-
type IconProps = React__default.ComponentProps<typeof
|
|
68
|
+
type IconProps = React__default.ComponentProps<typeof UI> & {
|
|
69
|
+
/**
|
|
70
|
+
* Controls screen reader visibility.
|
|
71
|
+
* - `true` (default): Hides icon from screen readers (decorative icon)
|
|
72
|
+
* - `false`: Makes icon visible to screen readers (semantic icon)
|
|
73
|
+
*
|
|
74
|
+
* **When to use decorative (aria-hidden="true", default):**
|
|
75
|
+
* - Icon accompanies visible text (e.g., button with icon + label)
|
|
76
|
+
* - Icon is purely visual decoration
|
|
77
|
+
*
|
|
78
|
+
* **When to use semantic (aria-hidden="false"):**
|
|
79
|
+
* - Icon is the only content (e.g., icon-only button)
|
|
80
|
+
* - Must provide `aria-label` or `aria-labelledby` for accessible name
|
|
81
|
+
*
|
|
82
|
+
* @default true
|
|
83
|
+
* @see https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html
|
|
84
|
+
*/
|
|
85
|
+
"aria-hidden"?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Accessible label for semantic icons.
|
|
88
|
+
* Required when icon is standalone (not accompanied by visible text).
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```tsx
|
|
92
|
+
* // ✅ GOOD: Icon-only button with accessible name
|
|
93
|
+
* <button>
|
|
94
|
+
* <Icon aria-hidden={false} aria-label="Close dialog">
|
|
95
|
+
* <Icon.Remove />
|
|
96
|
+
* </Icon>
|
|
97
|
+
* </button>
|
|
98
|
+
*
|
|
99
|
+
* // ✅ GOOD: Icon with visible text (default decorative)
|
|
100
|
+
* <button>
|
|
101
|
+
* <Icon><Icon.Add /></Icon>
|
|
102
|
+
* Add Item
|
|
103
|
+
* </button>
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
"aria-label"?: string;
|
|
107
|
+
/**
|
|
108
|
+
* Semantic role override.
|
|
109
|
+
* Use `role="img"` when icon conveys meaning and is not decorative.
|
|
110
|
+
*
|
|
111
|
+
* @default undefined (no role for decorative icons)
|
|
112
|
+
*/
|
|
113
|
+
role?: string;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Icon wrapper component that enforces accessibility best practices.
|
|
117
|
+
*
|
|
118
|
+
* **Default behavior (decorative icon):**
|
|
119
|
+
* - Hidden from screen readers (`aria-hidden="true"`)
|
|
120
|
+
* - Used when icon accompanies visible text
|
|
121
|
+
*
|
|
122
|
+
* **Semantic icon pattern:**
|
|
123
|
+
* - Set `aria-hidden={false}` to expose to screen readers
|
|
124
|
+
* - Must provide `aria-label` for accessible name
|
|
125
|
+
* - Consider `role="img"` for complex SVG icons
|
|
126
|
+
*
|
|
127
|
+
* @param {IconProps} props - Component props
|
|
128
|
+
* @returns {React.ReactElement} Accessible icon wrapper
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* // ✅ Decorative icon with text (default)
|
|
132
|
+
* <button>
|
|
133
|
+
* <Icon><Icon.Save /></Icon>
|
|
134
|
+
* Save Changes
|
|
135
|
+
* </button>
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* // ✅ Semantic icon-only button
|
|
139
|
+
* <button aria-label="Close dialog">
|
|
140
|
+
* <Icon aria-hidden={false}>
|
|
141
|
+
* <Icon.Remove />
|
|
142
|
+
* </Icon>
|
|
143
|
+
* </button>
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* // ❌ BAD: Icon-only button without accessible name
|
|
147
|
+
* <button>
|
|
148
|
+
* <Icon><Icon.Remove /></Icon>
|
|
149
|
+
* </button>
|
|
150
|
+
*/
|
|
22
151
|
declare const Icon: {
|
|
23
|
-
({ id, classes, children, styles, ...props }: IconProps): React__default.JSX.Element;
|
|
152
|
+
({ id, classes, children, styles, "aria-hidden": ariaHidden, "aria-label": ariaLabel, role, ...props }: IconProps): React__default.JSX.Element;
|
|
24
153
|
displayName: string;
|
|
25
154
|
Add: {
|
|
26
155
|
({ fill, size, role, alt, ...props }: Pick<IconProps$1, "role" | "fill" | "alt" | "size" | "styles" | "strokeColor">): JSX.Element;
|
|
@@ -233,7 +362,22 @@ declare const Icon: {
|
|
|
233
362
|
display: string;
|
|
234
363
|
alignItems: string;
|
|
235
364
|
width: string;
|
|
236
|
-
};
|
|
365
|
+
}; /**
|
|
366
|
+
* Controls screen reader visibility.
|
|
367
|
+
* - `true` (default): Hides icon from screen readers (decorative icon)
|
|
368
|
+
* - `false`: Makes icon visible to screen readers (semantic icon)
|
|
369
|
+
*
|
|
370
|
+
* **When to use decorative (aria-hidden="true", default):**
|
|
371
|
+
* - Icon accompanies visible text (e.g., button with icon + label)
|
|
372
|
+
* - Icon is purely visual decoration
|
|
373
|
+
*
|
|
374
|
+
* **When to use semantic (aria-hidden="false"):**
|
|
375
|
+
* - Icon is the only content (e.g., icon-only button)
|
|
376
|
+
* - Must provide `aria-label` or `aria-labelledby` for accessible name
|
|
377
|
+
*
|
|
378
|
+
* @default true
|
|
379
|
+
* @see https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html
|
|
380
|
+
*/
|
|
237
381
|
};
|
|
238
382
|
StopSolid: {
|
|
239
383
|
({ strokeColor, styles, size, role, alt, ...props }: Pick<IconProps$1, "role" | "fill" | "alt" | "size" | "styles" | "strokeColor">): React__default.JSX.Element;
|