@fpkit/acss 0.5.11 → 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.
Files changed (312) hide show
  1. package/README.md +514 -18
  2. package/libs/chunk-23ANBDCR.js +8 -0
  3. package/libs/chunk-23ANBDCR.js.map +1 -0
  4. package/libs/chunk-2LTJ7HHX.cjs +18 -0
  5. package/libs/chunk-2LTJ7HHX.cjs.map +1 -0
  6. package/libs/chunk-2Y7W75TT.js +9 -0
  7. package/libs/chunk-2Y7W75TT.js.map +1 -0
  8. package/libs/chunk-3MKLDCKQ.cjs +31 -0
  9. package/libs/chunk-3MKLDCKQ.cjs.map +1 -0
  10. package/libs/chunk-5M57K4SW.js +8 -0
  11. package/libs/chunk-5M57K4SW.js.map +1 -0
  12. package/libs/chunk-5S4ORA4C.cjs +15 -0
  13. package/libs/chunk-5S4ORA4C.cjs.map +1 -0
  14. package/libs/chunk-772NRB75.js +9 -0
  15. package/libs/chunk-772NRB75.js.map +1 -0
  16. package/libs/chunk-AHDJGCG5.cjs +15 -0
  17. package/libs/chunk-AHDJGCG5.cjs.map +1 -0
  18. package/libs/chunk-B7F5FS6D.cjs +16 -0
  19. package/libs/chunk-B7F5FS6D.cjs.map +1 -0
  20. package/libs/chunk-BHRQBJRY.js +8 -0
  21. package/libs/chunk-BHRQBJRY.js.map +1 -0
  22. package/libs/chunk-D4YLRWAO.cjs +18 -0
  23. package/libs/chunk-D4YLRWAO.cjs.map +1 -0
  24. package/libs/chunk-ETFLFC2S.js +10 -0
  25. package/libs/chunk-ETFLFC2S.js.map +1 -0
  26. package/libs/chunk-G55UJ53G.cjs +16 -0
  27. package/libs/chunk-G55UJ53G.cjs.map +1 -0
  28. package/libs/chunk-GZ4QFPRY.js +9 -0
  29. package/libs/chunk-GZ4QFPRY.js.map +1 -0
  30. package/libs/chunk-IYUN2EW3.cjs +15 -0
  31. package/libs/chunk-IYUN2EW3.cjs.map +1 -0
  32. package/libs/chunk-J32EZPYD.cjs +15 -0
  33. package/libs/chunk-J32EZPYD.cjs.map +1 -0
  34. package/libs/chunk-JJ43O4Y5.js +8 -0
  35. package/libs/chunk-JJ43O4Y5.js.map +1 -0
  36. package/libs/chunk-KUKIVRC2.js +7 -0
  37. package/libs/chunk-KUKIVRC2.js.map +1 -0
  38. package/libs/chunk-L75OQKEI.cjs +13 -0
  39. package/libs/chunk-L75OQKEI.cjs.map +1 -0
  40. package/libs/chunk-LT5KZ2QW.cjs +22 -0
  41. package/libs/chunk-LT5KZ2QW.cjs.map +1 -0
  42. package/libs/chunk-M5RRNTVX.cjs +15 -0
  43. package/libs/chunk-M5RRNTVX.cjs.map +1 -0
  44. package/libs/chunk-NGTJDDFO.js +8 -0
  45. package/libs/chunk-NGTJDDFO.js.map +1 -0
  46. package/libs/chunk-OK5QEIMD.cjs +17 -0
  47. package/libs/chunk-OK5QEIMD.cjs.map +1 -0
  48. package/libs/chunk-P2DC76ZZ.cjs +18 -0
  49. package/libs/chunk-P2DC76ZZ.cjs.map +1 -0
  50. package/libs/chunk-P7TTEYCD.js +7 -0
  51. package/libs/chunk-P7TTEYCD.js.map +1 -0
  52. package/libs/chunk-PQ2K3BM6.cjs +17 -0
  53. package/libs/chunk-PQ2K3BM6.cjs.map +1 -0
  54. package/libs/chunk-QLZWHAMK.js +8 -0
  55. package/libs/chunk-QLZWHAMK.js.map +1 -0
  56. package/libs/chunk-RIVUMPOG.js +8 -0
  57. package/libs/chunk-RIVUMPOG.js.map +1 -0
  58. package/libs/chunk-ROZI23GS.cjs +15 -0
  59. package/libs/chunk-ROZI23GS.cjs.map +1 -0
  60. package/libs/chunk-S7BABR7Z.cjs +13 -0
  61. package/libs/chunk-S7BABR7Z.cjs.map +1 -0
  62. package/libs/chunk-SMYRLO3E.js +8 -0
  63. package/libs/chunk-SMYRLO3E.js.map +1 -0
  64. package/libs/chunk-TYRCEX2L.js +8 -0
  65. package/libs/chunk-TYRCEX2L.js.map +1 -0
  66. package/libs/chunk-VUH3FXGJ.js +11 -0
  67. package/libs/chunk-VUH3FXGJ.js.map +1 -0
  68. package/libs/chunk-XBA562WW.js +8 -0
  69. package/libs/chunk-XBA562WW.js.map +1 -0
  70. package/libs/chunk-XTQKWY7W.cjs +32 -0
  71. package/libs/chunk-XTQKWY7W.cjs.map +1 -0
  72. package/libs/chunk-ZANSFMTD.js +9 -0
  73. package/libs/chunk-ZANSFMTD.js.map +1 -0
  74. package/libs/component-props-a8a2f97e.d.ts +38 -0
  75. package/libs/components/alert/alert.css +1 -1
  76. package/libs/components/alert/alert.css.map +1 -1
  77. package/libs/components/alert/alert.min.css +2 -2
  78. package/libs/components/badge/badge.css +1 -1
  79. package/libs/components/badge/badge.css.map +1 -1
  80. package/libs/components/badge/badge.min.css +2 -2
  81. package/libs/components/breadcrumbs/breadcrumb.cjs +24 -0
  82. package/libs/components/breadcrumbs/breadcrumb.cjs.map +1 -0
  83. package/libs/components/breadcrumbs/breadcrumb.d.cts +290 -0
  84. package/libs/components/breadcrumbs/breadcrumb.d.ts +290 -0
  85. package/libs/components/breadcrumbs/breadcrumb.js +5 -0
  86. package/libs/components/breadcrumbs/breadcrumb.js.map +1 -0
  87. package/libs/components/button.cjs +19 -0
  88. package/libs/components/button.cjs.map +1 -0
  89. package/libs/components/button.d.cts +16 -0
  90. package/libs/components/button.d.ts +16 -0
  91. package/libs/components/button.js +4 -0
  92. package/libs/components/button.js.map +1 -0
  93. package/libs/components/buttons/button.css +1 -1
  94. package/libs/components/buttons/button.css.map +1 -1
  95. package/libs/components/buttons/button.min.css +2 -2
  96. package/libs/components/card.cjs +31 -0
  97. package/libs/components/card.cjs.map +1 -0
  98. package/libs/components/card.d.cts +302 -0
  99. package/libs/components/card.d.ts +302 -0
  100. package/libs/components/card.js +4 -0
  101. package/libs/components/card.js.map +1 -0
  102. package/libs/components/cards/card.css +1 -1
  103. package/libs/components/cards/card.css.map +1 -1
  104. package/libs/components/cards/card.min.css +2 -2
  105. package/libs/components/details/details.css +1 -1
  106. package/libs/components/details/details.css.map +1 -1
  107. package/libs/components/details/details.min.css +2 -2
  108. package/libs/components/dialog/dialog.cjs +22 -0
  109. package/libs/components/dialog/dialog.cjs.map +1 -0
  110. package/libs/components/dialog/dialog.css +1 -1
  111. package/libs/components/dialog/dialog.css.map +1 -1
  112. package/libs/components/dialog/dialog.d.cts +105 -0
  113. package/libs/components/dialog/dialog.d.ts +105 -0
  114. package/libs/components/dialog/dialog.js +7 -0
  115. package/libs/components/dialog/dialog.js.map +1 -0
  116. package/libs/components/dialog/dialog.min.css +2 -2
  117. package/libs/components/form/fields.cjs +19 -0
  118. package/libs/components/form/fields.cjs.map +1 -0
  119. package/libs/components/form/fields.d.cts +24 -0
  120. package/libs/components/form/fields.d.ts +24 -0
  121. package/libs/components/form/fields.js +4 -0
  122. package/libs/components/form/fields.js.map +1 -0
  123. package/libs/components/form/inputs.cjs +19 -0
  124. package/libs/components/form/inputs.cjs.map +1 -0
  125. package/libs/components/form/inputs.d.cts +2 -0
  126. package/libs/components/form/inputs.d.ts +2 -0
  127. package/libs/components/form/inputs.js +4 -0
  128. package/libs/components/form/inputs.js.map +1 -0
  129. package/libs/components/form/textarea.cjs +19 -0
  130. package/libs/components/form/textarea.cjs.map +1 -0
  131. package/libs/components/form/textarea.d.cts +29 -0
  132. package/libs/components/form/textarea.d.ts +29 -0
  133. package/libs/components/form/textarea.js +4 -0
  134. package/libs/components/form/textarea.js.map +1 -0
  135. package/libs/components/heading/heading.cjs +10 -0
  136. package/libs/components/heading/heading.cjs.map +1 -0
  137. package/libs/components/heading/heading.d.cts +3 -0
  138. package/libs/components/heading/heading.d.ts +3 -0
  139. package/libs/components/heading/heading.js +4 -0
  140. package/libs/components/heading/heading.js.map +1 -0
  141. package/libs/components/icons/icon.cjs +19 -0
  142. package/libs/components/icons/icon.cjs.map +1 -0
  143. package/libs/{icons-31ace3de.d.ts → components/icons/icon.d.cts} +151 -61
  144. package/libs/components/icons/icon.d.ts +445 -0
  145. package/libs/components/icons/icon.js +4 -0
  146. package/libs/components/icons/icon.js.map +1 -0
  147. package/libs/components/images/img.css +1 -1
  148. package/libs/components/images/img.css.map +1 -1
  149. package/libs/components/images/img.min.css +2 -2
  150. package/libs/components/link/link.cjs +19 -0
  151. package/libs/components/link/link.cjs.map +1 -0
  152. package/libs/components/link/link.d.cts +19 -0
  153. package/libs/components/link/link.d.ts +19 -0
  154. package/libs/components/link/link.js +4 -0
  155. package/libs/components/link/link.js.map +1 -0
  156. package/libs/components/list/list.cjs +23 -0
  157. package/libs/components/list/list.cjs.map +1 -0
  158. package/libs/components/list/list.d.cts +39 -0
  159. package/libs/components/list/list.d.ts +39 -0
  160. package/libs/components/list/list.js +4 -0
  161. package/libs/components/list/list.js.map +1 -0
  162. package/libs/components/modal.cjs +14 -0
  163. package/libs/components/modal.cjs.map +1 -0
  164. package/libs/components/modal.d.cts +35 -0
  165. package/libs/components/modal.d.ts +35 -0
  166. package/libs/components/modal.js +5 -0
  167. package/libs/components/modal.js.map +1 -0
  168. package/libs/components/nav/nav.cjs +28 -0
  169. package/libs/components/nav/nav.cjs.map +1 -0
  170. package/libs/components/nav/nav.d.cts +44 -0
  171. package/libs/components/nav/nav.d.ts +44 -0
  172. package/libs/components/nav/nav.js +5 -0
  173. package/libs/components/nav/nav.js.map +1 -0
  174. package/libs/components/popover/popover.cjs +23 -0
  175. package/libs/components/popover/popover.cjs.map +1 -0
  176. package/libs/components/popover/popover.d.cts +40 -0
  177. package/libs/components/popover/popover.d.ts +40 -0
  178. package/libs/components/popover/popover.js +4 -0
  179. package/libs/components/popover/popover.js.map +1 -0
  180. package/libs/components/tables/table.cjs +21 -0
  181. package/libs/components/tables/table.cjs.map +1 -0
  182. package/libs/components/tables/table.d.cts +36 -0
  183. package/libs/components/tables/table.d.ts +36 -0
  184. package/libs/components/tables/table.js +4 -0
  185. package/libs/components/tables/table.js.map +1 -0
  186. package/libs/components/text/text.cjs +23 -0
  187. package/libs/components/text/text.cjs.map +1 -0
  188. package/libs/components/text/text.d.cts +30 -0
  189. package/libs/components/text/text.d.ts +30 -0
  190. package/libs/components/text/text.js +4 -0
  191. package/libs/components/text/text.js.map +1 -0
  192. package/libs/heading-3648c538.d.ts +250 -0
  193. package/libs/hooks.cjs +7 -0
  194. package/libs/hooks.d.cts +5 -0
  195. package/libs/hooks.d.ts +5 -0
  196. package/libs/hooks.js +3 -0
  197. package/libs/icons.cjs +3 -2
  198. package/libs/icons.d.cts +3 -1
  199. package/libs/icons.d.ts +3 -1
  200. package/libs/icons.js +2 -1
  201. package/libs/index.cjs +174 -62
  202. package/libs/index.cjs.map +1 -1
  203. package/libs/index.css +1 -1
  204. package/libs/index.css.map +1 -1
  205. package/libs/index.d.cts +529 -446
  206. package/libs/index.d.ts +529 -446
  207. package/libs/index.js +36 -7
  208. package/libs/index.js.map +1 -1
  209. package/libs/inputs-f3a216db.d.ts +45 -0
  210. package/libs/ui-645f95b5.d.ts +285 -0
  211. package/package.json +2 -2
  212. package/src/components/README-UI.mdx +416 -0
  213. package/src/components/alert/ACCESSIBILITY.md +319 -0
  214. package/src/components/alert/README.mdx +475 -19
  215. package/src/components/alert/alert.scss +113 -6
  216. package/src/components/alert/alert.stories.tsx +372 -0
  217. package/src/components/alert/alert.test.tsx +762 -0
  218. package/src/components/alert/alert.tsx +331 -66
  219. package/src/components/alert/views/alert-actions.tsx +13 -0
  220. package/src/components/alert/views/alert-content.tsx +17 -0
  221. package/src/components/alert/views/alert-icon.tsx +53 -0
  222. package/src/components/alert/views/alert-screen-reader-text.tsx +30 -0
  223. package/src/components/alert/views/alert-title.tsx +23 -0
  224. package/src/components/alert/views/alert-view.tsx +158 -0
  225. package/src/components/alert/views/index.ts +12 -0
  226. package/src/components/badge/badge.mdx +186 -49
  227. package/src/components/badge/badge.scss +20 -2
  228. package/src/components/badge/badge.stories.tsx +160 -14
  229. package/src/components/badge/badge.test.tsx +179 -0
  230. package/src/components/badge/badge.tsx +97 -4
  231. package/src/components/breadcrumbs/README.mdx +364 -45
  232. package/src/components/breadcrumbs/__snapshots__/breadcrumb.test.tsx.snap +152 -0
  233. package/src/components/breadcrumbs/breadcrumb.stories.tsx +7 -3
  234. package/src/components/breadcrumbs/breadcrumb.test.tsx +490 -0
  235. package/src/components/breadcrumbs/breadcrumb.tsx +427 -170
  236. package/src/components/button.ts +2 -0
  237. package/src/components/buttons/button.scss +34 -31
  238. package/src/components/buttons/button.stories.tsx +35 -0
  239. package/src/components/card.ts +2 -0
  240. package/src/components/cards/README.mdx +657 -0
  241. package/src/components/cards/card.scss +22 -0
  242. package/src/components/cards/card.stories.tsx +167 -5
  243. package/src/components/cards/card.test.tsx +360 -20
  244. package/src/components/cards/card.tsx +200 -79
  245. package/src/components/cards/card.types.ts +135 -0
  246. package/src/components/cards/card.utils.ts +79 -0
  247. package/src/components/details/ACCESSIBILITY-REVIEW-LIVE.md +1050 -0
  248. package/src/components/details/ACCESSIBILITY-REVIEW.md +502 -0
  249. package/src/components/details/README.mdx +437 -69
  250. package/src/components/details/details.scss +16 -0
  251. package/src/components/details/details.test.tsx +385 -0
  252. package/src/components/details/details.tsx +101 -69
  253. package/src/components/details/details.types.ts +76 -0
  254. package/src/components/dialog/README.mdx +513 -110
  255. package/src/components/dialog/dialog-modal.tsx +79 -56
  256. package/src/components/dialog/dialog.scss +53 -3
  257. package/src/components/dialog/dialog.stories.tsx +10 -7
  258. package/src/components/dialog/dialog.test.tsx +450 -0
  259. package/src/components/dialog/dialog.tsx +69 -59
  260. package/src/components/dialog/dialog.types.ts +133 -0
  261. package/src/components/dialog/views/dialog-footer.tsx +54 -11
  262. package/src/components/dialog/views/dialog-header.tsx +20 -15
  263. package/src/components/heading/heading.stories.tsx +44 -4
  264. package/src/components/heading/heading.tsx +89 -23
  265. package/src/components/icons/README.mdx +332 -0
  266. package/src/components/icons/icon.stories.tsx +74 -1
  267. package/src/components/icons/icon.tsx +89 -1
  268. package/src/components/icons/types.ts +47 -0
  269. package/src/components/images/README.mdx +340 -24
  270. package/src/components/images/img.scss +19 -3
  271. package/src/components/images/img.stories.tsx +424 -15
  272. package/src/components/images/img.test.tsx +354 -25
  273. package/src/components/images/img.tsx +186 -63
  274. package/src/components/images/img.types.ts +211 -0
  275. package/src/components/modal.ts +1 -0
  276. package/src/components/title/MIGRATION.md +199 -0
  277. package/src/components/title/README.md +326 -0
  278. package/src/components/title/README.mdx +452 -0
  279. package/src/components/title/title.stories.tsx +393 -0
  280. package/src/components/title/title.test.tsx +251 -0
  281. package/src/components/title/title.tsx +219 -0
  282. package/src/components/ui.stories.tsx +894 -0
  283. package/src/components/ui.test.tsx +559 -0
  284. package/src/components/ui.tsx +266 -15
  285. package/src/components/word-count/README.md +240 -0
  286. package/src/hooks.ts +1 -0
  287. package/src/index.ts +51 -19
  288. package/src/sass/_properties.scss +1 -0
  289. package/src/styles/alert/alert.css +94 -4
  290. package/src/styles/alert/alert.css.map +1 -1
  291. package/src/styles/badge/badge.css +20 -2
  292. package/src/styles/badge/badge.css.map +1 -1
  293. package/src/styles/buttons/button.css +31 -31
  294. package/src/styles/buttons/button.css.map +1 -1
  295. package/src/styles/cards/card.css +16 -0
  296. package/src/styles/cards/card.css.map +1 -1
  297. package/src/styles/details/details.css +19 -0
  298. package/src/styles/details/details.css.map +1 -1
  299. package/src/styles/dialog/dialog.css +43 -2
  300. package/src/styles/dialog/dialog.css.map +1 -1
  301. package/src/styles/images/img.css +15 -3
  302. package/src/styles/images/img.css.map +1 -1
  303. package/src/styles/index.css +240 -43
  304. package/src/styles/index.css.map +1 -1
  305. package/src/test/setup.d.ts +9 -0
  306. package/src/test/setup.ts +53 -1
  307. package/libs/chunk-PWVRDQ3R.js +0 -8
  308. package/libs/chunk-PWVRDQ3R.js.map +0 -1
  309. package/libs/chunk-SVS4MX3U.cjs +0 -31
  310. package/libs/chunk-SVS4MX3U.cjs.map +0 -1
  311. package/src/components/cards/README.md +0 -80
  312. package/src/components/dialog/hooks/useClickOutside.ts +0 -33
package/libs/index.d.cts CHANGED
@@ -1,73 +1,361 @@
1
- import { F as FP$1, C as ComponentProps$1 } from './icons-31ace3de.js';
2
- export { I as Icon } from './icons-31ace3de.js';
3
- import * as React from 'react';
4
- import React__default, { ReactNode, CSSProperties } from 'react';
1
+ export { Button, ButtonProps } from './components/button.cjs';
2
+ export { Card, Content as CardContent, Footer as CardFooter, CardProps, Title as CardTitle } from './components/card.cjs';
3
+ export { default as Field, FieldProps } from './components/form/fields.cjs';
4
+ export { F as Box, F as FP, I as Input, a as InputProps } from './inputs-f3a216db.js';
5
+ export { default as Icon, IconProps } from './components/icons/icon.cjs';
6
+ import React__default, { ReactNode } from 'react';
7
+ export { default as Link, LinkProps, default as To } from './components/link/link.cjs';
8
+ export { default as List, ListItemProps } from './components/list/list.cjs';
9
+ export { Modal, ModalProps } from './components/modal.cjs';
10
+ export { default as Popover, PopoverProps } from './components/popover/popover.cjs';
11
+ export { RenderTable as TBL, TableProps } from './components/tables/table.cjs';
12
+ export { Dialog } from './components/dialog/dialog.cjs';
13
+ import { U as UI } from './ui-645f95b5.js';
14
+ export { default as Nav, NavItem, NavItemProps, NavList, NavListProps, NavProps } from './components/nav/nav.cjs';
15
+ export { default as Text, TextProps } from './components/text/text.cjs';
16
+ export { b as Heading, H as HeadingLevel, T as Title, a as TitleProps } from './heading-3648c538.js';
17
+ export { default as Textarea, TextareaProps } from './components/form/textarea.cjs';
18
+ import { C as ComponentProps$1 } from './component-props-a8a2f97e.js';
19
+ export { default as Breadcrumb, BreadcrumbProps, CustomRoute, useBreadcrumbSegments } from './components/breadcrumbs/breadcrumb.cjs';
5
20
 
6
- type ButtonProps = Partial<React__default.ComponentProps<typeof FP$1>> & {
21
+ /**
22
+ * Props for the Img component.
23
+ *
24
+ * Extends native HTML img element attributes with additional functionality
25
+ * for responsive images, loading states, and error handling.
26
+ *
27
+ * ## Accessibility Guidelines (WCAG 2.1 AA)
28
+ *
29
+ * **Decorative Images:**
30
+ * Images that are purely visual decoration should have an empty alt attribute.
31
+ *
32
+ * @example
33
+ * ```tsx
34
+ * // ✅ Decorative image (border, background pattern, visual separator)
35
+ * <Img src="/decorative-border.png" alt="" />
36
+ * ```
37
+ *
38
+ * **Semantic Images:**
39
+ * Images that convey information or meaning must have descriptive alt text.
40
+ *
41
+ * @example
42
+ * ```tsx
43
+ * // ✅ Semantic image (charts, diagrams, photos with meaning)
44
+ * <Img
45
+ * src="/sales-chart.png"
46
+ * alt="Sales chart showing 30% growth in Q4 2024"
47
+ * />
48
+ * ```
49
+ *
50
+ * **Responsive Images:**
51
+ * Use srcset and sizes for responsive images to optimize performance.
52
+ *
53
+ * @example
54
+ * ```tsx
55
+ * // ✅ Responsive image with srcset
56
+ * <Img
57
+ * src="/photo.jpg"
58
+ * srcSet="/photo-320w.jpg 320w, /photo-640w.jpg 640w, /photo-1024w.jpg 1024w"
59
+ * sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw"
60
+ * alt="Team photo from annual conference"
61
+ * />
62
+ * ```
63
+ *
64
+ * @see https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html
65
+ */
66
+ interface ImgProps extends Omit<React__default.ImgHTMLAttributes<HTMLImageElement>, 'placeholder'> {
7
67
  /**
8
- * The button type
9
- * Required - 'button' | 'submit' | 'reset'
68
+ * The image source URL.
69
+ * @default '//'
10
70
  */
11
- type: 'button' | 'submit' | 'reset';
12
- };
13
- declare const Button: {
14
- ({ type, children, styles, disabled, classes, onPointerDown, onPointerOver, onPointerLeave, onClick, ...props }: ButtonProps): React__default.JSX.Element;
15
- displayName: string;
16
- };
17
-
18
- type CardProps = {
19
- elm?: 'div' | 'aside' | 'section' | 'article';
20
- title?: React__default.ReactNode;
21
- footer?: React__default.ReactNode;
22
- } & React__default.ComponentProps<typeof FP$1>;
23
- declare const Card: {
24
- ({ elm, styles, children, classes, id, ...props }: CardProps): React__default.JSX.Element;
25
- displayName: string;
26
- Title: {
27
- ({ children, className, styles, as, ...props }: React__default.PropsWithChildren<{
28
- className?: string | undefined;
29
- styles?: React__default.CSSProperties | undefined;
30
- as?: React__default.ElementType<any> | undefined;
31
- }>): React__default.JSX.Element;
32
- displayName: string;
33
- };
34
- Content: {
35
- ({ children, className, styles, ...props }: React__default.PropsWithChildren<{
36
- className?: string | undefined;
37
- styles?: React__default.CSSProperties | undefined;
38
- }>): React__default.JSX.Element;
39
- displayName: string;
40
- };
41
- Footer: {
42
- ({ children, className, styles, ...props }: React__default.PropsWithChildren<{
43
- className?: string | undefined;
44
- styles?: React__default.CSSProperties | undefined;
45
- }>): React__default.JSX.Element;
46
- displayName: string;
47
- };
48
- };
49
-
50
- type FieldProps = {
71
+ src?: string;
72
+ /**
73
+ * Alternative text for the image.
74
+ * - **Empty string (`""`)** for decorative images
75
+ * - **Descriptive text** for semantic images that convey meaning
76
+ *
77
+ * @example
78
+ * ```tsx
79
+ * // Decorative
80
+ * <Img src="/border.png" alt="" />
81
+ *
82
+ * // Semantic
83
+ * <Img src="/logo.png" alt="Company logo" />
84
+ * ```
85
+ */
86
+ alt?: string;
87
+ /**
88
+ * Width of the image in pixels.
89
+ * @default 480
90
+ */
91
+ width?: number | string;
92
+ /**
93
+ * Height of the image in pixels.
94
+ * When not provided, defaults to 'auto'.
95
+ */
96
+ height?: number | string;
51
97
  /**
52
- * The label content
98
+ * Inline styles to apply to the image.
53
99
  */
54
- label: React__default.ReactNode;
55
- children: React__default.ReactNode;
56
- } & React__default.ComponentProps<'label'> & Partial<React__default.ComponentProps<typeof FP$1>>;
100
+ styles?: React__default.CSSProperties;
101
+ /**
102
+ * Loading behavior for the image.
103
+ * - `"lazy"` (default): Defers loading until near viewport
104
+ * - `"eager"`: Loads immediately
105
+ *
106
+ * @default "lazy"
107
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#loading
108
+ */
109
+ loading?: 'eager' | 'lazy';
110
+ /**
111
+ * Fallback placeholder image URL to display on error.
112
+ * If not provided and image fails to load, a default placeholder is used.
113
+ *
114
+ * @example
115
+ * ```tsx
116
+ * <Img
117
+ * src="/photo.jpg"
118
+ * placeholder="/fallback.png"
119
+ * alt="User profile photo"
120
+ * />
121
+ * ```
122
+ */
123
+ placeholder?: string;
124
+ /**
125
+ * Hint for the browser to prioritize image fetching.
126
+ * - `"high"`: High priority (above-the-fold images)
127
+ * - `"low"` (default): Low priority
128
+ * - `"auto"`: Browser decides
129
+ *
130
+ * @default "low"
131
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#fetchpriority
132
+ */
133
+ fetchpriority?: 'high' | 'low' | 'auto';
134
+ /**
135
+ * Decoding hint for the browser.
136
+ * - `"async"`: Decode asynchronously (don't block rendering)
137
+ * - `"sync"`: Decode synchronously
138
+ * - `"auto"` (default): Browser decides
139
+ *
140
+ * @default "auto"
141
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#decoding
142
+ */
143
+ decoding?: 'sync' | 'async' | 'auto';
144
+ /**
145
+ * Responsive image sources with width descriptors.
146
+ * Allows browser to choose appropriate image based on viewport.
147
+ *
148
+ * @example
149
+ * ```tsx
150
+ * <Img
151
+ * src="/photo.jpg"
152
+ * srcSet="/photo-320w.jpg 320w, /photo-640w.jpg 640w"
153
+ * sizes="(max-width: 640px) 100vw, 640px"
154
+ * alt="Responsive image"
155
+ * />
156
+ * ```
157
+ *
158
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#srcset
159
+ */
160
+ srcSet?: string;
161
+ /**
162
+ * Media conditions for responsive image sizing.
163
+ * Works with srcSet to determine which image to load.
164
+ *
165
+ * @example
166
+ * ```tsx
167
+ * sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 800px"
168
+ * ```
169
+ *
170
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#sizes
171
+ */
172
+ sizes?: string;
173
+ /**
174
+ * Callback fired when the image fails to load.
175
+ * The default SVG placeholder is still applied after calling this handler.
176
+ * Call `event.preventDefault()` to prevent the default fallback behavior.
177
+ *
178
+ * @param event - The error event
179
+ *
180
+ * @example
181
+ * ```tsx
182
+ * // Log error and show default placeholder
183
+ * <Img
184
+ * src="/photo.jpg"
185
+ * onError={(e) => console.error('Image failed to load', e)}
186
+ * alt="Photo"
187
+ * />
188
+ *
189
+ * // Prevent default and use custom fallback
190
+ * <Img
191
+ * src="/photo.jpg"
192
+ * onError={(e) => {
193
+ * e.preventDefault()
194
+ * e.currentTarget.src = '/custom-fallback.jpg'
195
+ * }}
196
+ * alt="Photo"
197
+ * />
198
+ * ```
199
+ */
200
+ onError?: (event: React__default.SyntheticEvent<HTMLImageElement, Event>) => void;
201
+ /**
202
+ * Callback fired when the image successfully loads.
203
+ *
204
+ * @param event - The load event
205
+ *
206
+ * @example
207
+ * ```tsx
208
+ * <Img
209
+ * src="/photo.jpg"
210
+ * onLoad={(e) => console.log('Image loaded successfully')}
211
+ * alt="Photo"
212
+ * />
213
+ * ```
214
+ */
215
+ onLoad?: (event: React__default.SyntheticEvent<HTMLImageElement, Event>) => void;
216
+ }
217
+
57
218
  /**
58
- * Field component that renders a label and children wrapped in a div element.
59
- * @param labelFor Defines the for attribute of the label element
60
- * @param styles Custom styles to be applied to the component
61
- * @param label The label content
62
- * @param children The children to be rendered inside the component
63
- * @param props Additional props to be spread to the component
219
+ * Img - A semantic image component with accessibility and performance best practices.
220
+ *
221
+ * This component wraps the native `<img>` element with enhanced features:
222
+ * - **Responsive images** via optional srcset/sizes
223
+ * - **Lazy loading** by default for performance
224
+ * - **Error handling** with configurable fallback placeholders
225
+ * - **Type safety** with full TypeScript support
226
+ *
227
+ * ## Accessibility Patterns (WCAG 2.1 AA)
228
+ *
229
+ * ### Decorative Images
230
+ * Images that are purely visual decoration should use an empty alt attribute.
231
+ * These images are typically borders, patterns, or visual separators.
232
+ *
233
+ * @example
234
+ * ```tsx
235
+ * // ✅ GOOD: Decorative border image
236
+ * <Img src="/decorative-border.png" alt="" />
237
+ *
238
+ * // ✅ GOOD: Background pattern
239
+ * <Img src="/pattern.svg" alt="" loading="eager" />
240
+ * ```
241
+ *
242
+ * ### Semantic Images
243
+ * Images that convey information must have descriptive alt text that explains
244
+ * the content and purpose of the image.
245
+ *
246
+ * @example
247
+ * ```tsx
248
+ * // ✅ GOOD: Informative image with descriptive alt
249
+ * <Img
250
+ * src="/sales-chart.png"
251
+ * alt="Sales chart showing 30% revenue growth in Q4 2024"
252
+ * />
253
+ *
254
+ * // ✅ GOOD: Product photo with context
255
+ * <Img
256
+ * src="/laptop.jpg"
257
+ * alt="Silver MacBook Pro 14-inch on wooden desk"
258
+ * />
259
+ * ```
260
+ *
261
+ * ## Performance Optimization
262
+ *
263
+ * ### Lazy Loading
264
+ * By default, images use lazy loading to improve page load performance.
265
+ * Only use `loading="eager"` for above-the-fold images.
266
+ *
267
+ * @example
268
+ * ```tsx
269
+ * // ✅ GOOD: Lazy load below-the-fold image
270
+ * <Img src="/photo.jpg" alt="Photo" />
271
+ *
272
+ * // ✅ GOOD: Eager load hero image
273
+ * <Img
274
+ * src="/hero.jpg"
275
+ * alt="Hero banner"
276
+ * loading="eager"
277
+ * fetchpriority="high"
278
+ * />
279
+ * ```
280
+ *
281
+ * ### Responsive Images
282
+ * Use srcset and sizes for responsive images to serve appropriate image sizes
283
+ * based on viewport width, improving performance and bandwidth usage.
284
+ *
285
+ * @example
286
+ * ```tsx
287
+ * // ✅ GOOD: Responsive image with multiple sizes
288
+ * <Img
289
+ * src="/photo.jpg"
290
+ * srcSet="/photo-320w.jpg 320w, /photo-640w.jpg 640w, /photo-1024w.jpg 1024w"
291
+ * sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 800px"
292
+ * alt="Responsive image adapts to viewport"
293
+ * />
294
+ * ```
295
+ *
296
+ * ## Error Handling
297
+ *
298
+ * @example
299
+ * ```tsx
300
+ * // ✅ GOOD: Custom placeholder on error
301
+ * <Img
302
+ * src="/photo.jpg"
303
+ * placeholder="/fallback.png"
304
+ * alt="User profile photo"
305
+ * />
306
+ *
307
+ * // ✅ GOOD: Custom error handler
308
+ * <Img
309
+ * src="/photo.jpg"
310
+ * onError={(e) => {
311
+ * console.error('Image failed to load')
312
+ * logToAnalytics('image_error', { src: e.currentTarget.src })
313
+ * }}
314
+ * alt="Photo"
315
+ * />
316
+ * ```
317
+ *
318
+ * @param {ImgProps} props - Component props extending native img attributes
319
+ * @returns {React.ReactElement} Image element with enhanced functionality
320
+ *
321
+ * @see {@link ImgProps} for complete prop documentation
322
+ * @see https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html
64
323
  */
65
- declare const Field: {
66
- ({ label, labelFor, id, styles, classes, children, ...props }: FieldProps): React__default.JSX.Element;
324
+ declare const Img: {
325
+ ({ src, alt, width, height, styles, loading, placeholder, fetchpriority, decoding, srcSet, sizes, onError, onLoad, ...props }: ImgProps): React__default.JSX.Element;
67
326
  displayName: string;
68
327
  };
69
328
 
70
- type ComponentProps = React__default.ComponentProps<typeof FP$1>;
329
+ /**
330
+ * Props for the TextToSpeechComponent.
331
+ * @interface TextToSpeechComponentProps
332
+ */
333
+ interface TextToSpeechComponentProps {
334
+ /** Initial text to be spoken. Defaults to an empty string. */
335
+ initialText?: string;
336
+ /** Whether to show the text input field. Defaults to true. */
337
+ showTextInput?: boolean;
338
+ /** The voice to be used for speech synthesis. */
339
+ voice?: SpeechSynthesisVoice | undefined;
340
+ /** The pitch of the voice. Defaults to 1. */
341
+ pitch?: number;
342
+ /** The rate of speech. Defaults to 1. */
343
+ rate?: number;
344
+ /** The language to be used for speech synthesis. */
345
+ language?: string;
346
+ /** Player label */
347
+ label?: string | React__default.ReactNode;
348
+ /** Callback function to be called when speech ends. */
349
+ onEnd?: () => void;
350
+ }
351
+ /**
352
+ * A component that converts text to speech using the Web Speech API.
353
+ * @param {TextToSpeechComponentProps} props - The props for the component.
354
+ * @returns {JSX.Element} The rendered TextToSpeechComponent.
355
+ */
356
+ declare const TextToSpeech: React__default.FC<TextToSpeechComponentProps>;
357
+
358
+ type ComponentProps = React__default.ComponentProps<typeof UI>;
71
359
  /**
72
360
  * Renders children elements without any wrapping component.
73
361
  * Can be used as a placeholder when no semantic landmark is needed.
@@ -131,212 +419,93 @@ declare const Section: ({ id, children, styles, classes, ...props }: ComponentPr
131
419
  */
132
420
  declare const Article: ({ id, children, styles, classes, ...props }: ComponentProps) => React__default.JSX.Element;
133
421
 
134
- type ImageProps = React__default.ComponentProps<'img'> & React__default.ComponentProps<typeof FP$1>;
135
- declare const Img: {
136
- ({ src, alt, width, height, styles, loading, placeholder, fetchpriority, decoding, imgLoaded, imgError, ...props }: ImageProps): React__default.JSX.Element;
137
- displayName: string;
138
- };
139
-
140
- type PolymorphicRef<C extends React__default.ElementType> = React__default.ComponentPropsWithRef<C>['ref'];
141
- type AsProp<C extends React__default.ElementType> = {
142
- as?: C;
143
- };
144
- type PropsToOmit<C extends React__default.ElementType, P> = keyof (AsProp<C> & P);
145
- type PolymorphicComponentProp<C extends React__default.ElementType, Props = {}> = React__default.PropsWithChildren<Props & AsProp<C>> & Omit<React__default.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
146
- type PolymorphicComponentPropWithRef<C extends React__default.ElementType, Props = {}> = PolymorphicComponentProp<C, Props> & {
147
- ref?: PolymorphicRef<C>;
148
- };
149
- type FPProps<C extends React__default.ElementType> = PolymorphicComponentPropWithRef<C, {
150
- renderStyles?: boolean;
151
- styles?: React__default.CSSProperties;
152
- classes?: string;
153
- }>;
154
- type FPComponent = <C extends React__default.ElementType = 'span'>(props: FPProps<C>) => React__default.ReactElement | any;
155
- /**
156
- * FP component is a polymorphic component that renders an HTML element with optional styles.
157
- * @param {Object} props - Component props
158
- * @param {React.ElementType} props.as - The HTML element to render. Defaults to 'div'.
159
- * @param {boolean} props.renderStyles - Whether to render styles or not. Defaults to true.
160
- * @param {Object} props.styles - The styles to apply to the component.
161
- * @param {Object} props.defaultStyles - The default styles to apply to the component.
162
- * @param {React.ReactNode} props.children - The children to render inside the component.
163
- * @returns {React.ReactElement} - A React component that renders an HTML element with optional styles.
164
- */
165
- declare const FP: FPComponent;
166
-
167
- type InputProps = {
168
- /**
169
- * The type of the input.
170
- */
171
- type?: "text" | "password" | "email" | "number" | "tel" | "url" | "search";
172
- /**
173
- * Set the element as disabled
174
- */
175
- isDisabled?: boolean;
176
- } & React__default.ComponentProps<typeof FP>;
177
- declare const Input: {
178
- ({ type, name, value, placeholder, id, styles, classes, isDisabled, disabled, readonly, required, ref, onChange, onBlur, onPointerDown, ...props }: InputProps): JSX.Element;
179
- displayName: string;
180
- };
181
-
182
- type LinkProps = {
183
- href?: string;
184
- target?: string;
185
- rel?: string;
186
- children: React__default.ReactNode;
187
- styles?: React__default.CSSProperties;
188
- prefetch?: boolean;
189
- btnStyle?: string;
190
- onPointerDown?: (event: React__default.PointerEvent<HTMLAnchorElement>) => void;
191
- } & React__default.ComponentProps<typeof FP$1> & React__default.ComponentProps<"a">;
192
- declare const Link: {
193
- ({ href, target, rel, children, styles, prefetch, btnStyle, onPointerDown, ...props }: LinkProps): React__default.JSX.Element;
194
- displayName: string;
195
- };
196
-
197
- type ListProps = {
198
- /** Type of list to render (default: 'ul') */
199
- type?: 'ul' | 'ol' | 'dl';
200
- /** variant of list to render (default: 'none') */
201
- variant?: string;
202
- } & React.ComponentProps<typeof FP$1>;
203
- type ListItemProps = {
204
- /** Type of list item to render (default: 'li') */
205
- type?: 'li' | 'dt' | 'dd';
206
- } & React.ComponentProps<typeof FP$1>;
207
422
  /**
208
- * List component renders a list element with provided props
209
- * @param children - Child elements to render inside the list
210
- * @param classes - CSS classes to apply
211
- * @param type - Type of list element (default: 'ul')
212
- * @param variant - Variant for styling purposes
213
- * @param styles - Inline styles object
214
- * @param role - ARIA role
215
- * @param props - Additional props to pass to underlying element
423
+ * Props for the Badge component
424
+ *
425
+ * @property {React.ReactNode} children - Content to display inside the badge (typically numbers or short text)
426
+ * @property {string} [id] - Optional HTML id attribute for the badge element
427
+ * @property {React.CSSProperties} [styles] - Inline styles to apply to the badge
428
+ * @property {string} [classes] - CSS class names to apply to the badge
429
+ * @property {'rounded'} [variant] - Visual variant of the badge. Use 'rounded' for circular badges (fixed size with ellipsis for overflow)
430
+ * @property {string} [aria-label] - Accessible label for screen readers. Required for icon-only or number-only badges
431
+ * @property {'status' | 'note'} [role] - ARIA role for the badge. Defaults to 'status' for dynamic content
216
432
  */
217
- declare const List: {
218
- ({ children, classes, type, variant, styles, role, ...props }: ListProps): React.JSX.Element;
219
- displayName: string;
220
- ListItem: ({ type, id, styles, children, classes, ...props }: ListItemProps) => React.JSX.Element;
221
- };
222
-
223
- interface ModalProps extends ComponentProps$1 {
224
- /**
225
- * The child component/content for open button
226
- */
227
- openChild?: React__default.ReactNode;
228
- /**
229
- * The child component/content for close button
230
- */
231
- closeChild?: React__default.ReactNode;
232
- /**
233
- * The child component/content for modal header
234
- */
235
- modalHeader?: React__default.ReactNode;
433
+ type BadgeProps = {
236
434
  /**
237
- * The child component/content for modal footer
435
+ * Content to display inside the badge (typically numbers or short text)
238
436
  */
239
- modalFooter?: React__default.ReactNode;
437
+ children?: React__default.ReactNode;
240
438
  /**
241
- * The child component/content for modal body
439
+ * Visual variant of the badge
440
+ * - 'rounded': Circular badge style
242
441
  */
243
- children: React__default.ReactNode;
244
- /**
245
- * Open modal on mount when set to true
246
- */
247
- showOpen?: boolean;
248
- }
249
- declare const Modal: {
250
- ({ openChild, closeChild, modalHeader, modalFooter, children, showOpen, ...props }: ModalProps): React__default.JSX.Element;
251
- displayName: string;
252
- };
253
-
254
- type NavListProps = React__default.ComponentProps<typeof List> & {
255
- isBlock?: boolean;
256
- };
257
- type NavItemProps = React__default.ComponentProps<typeof List.ListItem>;
258
- type NavProps = React__default.ComponentProps<typeof FP$1>;
442
+ variant?: 'rounded';
443
+ } & React__default.ComponentProps<typeof UI>;
259
444
  /**
260
- * Renders a NavList component.
261
- * @param {Object} props - The props for the component.
262
- * @param {ReactNode} props.children - The child elements.
263
- * @param {Object} props - Additional props to spread to the List component.
264
- * @returns {JSX.Element} The rendered NavList component.
265
- */
266
- declare const NavList: ({ isBlock, children, ...props }: NavListProps) => React__default.JSX.Element;
267
- /**
268
- * Renders a NavItem component.
269
- * @param {Object} props - The props for the component.
270
- * @param {string} [props.id] - The id for the component.
271
- * @param {Object} [props.styles] - The styles for the component.
272
- * @param {string} [props.classes] - The classes for the component.
273
- * @param {ReactNode} props.children - The child elements.
274
- * @param {boolean} [props.inline=true] - Whether the item should display inline.
275
- * @param {Object} props - Additional props to spread to the ListItem component.
276
- * @returns {JSX.Element} The rendered NavItem component.
277
- */
278
- declare const NavItem: ({ id, styles, classes, children, ...props }: NavItemProps) => React__default.JSX.Element;
279
- /**
280
- * Renders a Nav component.
281
- * @param {Object} props - The props for the component.
282
- * @param {ReactNode} props.children - The child elements.
283
- * @param {Object} props - Additional props to spread to the UI component.
284
- * @returns {JSX.Element} The rendered Nav component.
285
- */
286
- declare const Nav: {
287
- ({ children, ...props }: NavProps): React__default.JSX.Element;
288
- displayName: string;
289
- List: ({ isBlock, children, ...props }: NavListProps) => React__default.JSX.Element;
290
- Item: ({ id, styles, classes, children, ...props }: NavItemProps) => React__default.JSX.Element;
291
- };
292
-
293
- /**
294
- * Interface for props accepted by the Popover component
445
+ * Badge - A small label component for displaying status, counts, or notifications
295
446
  *
296
- * @property {ReactNode} children - The content to show in the popover
297
- * @property {ReactNode} [content] - Optional alternative content for popover
298
- */
299
- type PopoverProps = {
300
- children: React__default.ReactNode;
301
- popoverTrigger: React__default.ReactNode;
302
- styles?: {};
303
- };
304
- /**
305
- * Popover component to display popover content.
447
+ * The Badge component is used to display supplementary information alongside other content,
448
+ * such as notification counts, status indicators, or labels. It renders as a semantic `<sup>`
449
+ * element with a nested `<span>` required for the component's styling architecture.
306
450
  *
307
- * @param props - The props for the component
308
- * @param props.children - The content to show in the popover
309
- * @param props.popoverTrigger - The element that triggers the popover on hover
451
+ * ## Styling Architecture
310
452
  *
311
- * @returns JSX.Element - The rendered JSX element for the Popover
312
- * @example - <Popover popoverTrigger={<button>Hover here</button>}>Popover content</Popover>
453
+ * The Badge uses a nested structure (`<sup><span>content</span></sup>`) which is required
454
+ * for the SCSS styling system. The outer `<sup>` element provides positioning context,
455
+ * while the inner `<span>` receives the visual styling (background, padding, border-radius).
313
456
  *
314
- * The component uses the usePopover hook to handle popover visibility and positioning.
457
+ * ## Rounded Variant Behavior
315
458
  *
316
- * It renders the triggerElement, and conditionally renders the popover content
317
- * positioned absolutely when visible.
459
+ * The `rounded` variant creates a perfect circular badge with fixed dimensions (1.5625rem).
460
+ * Content that exceeds the available space will be truncated with an ellipsis (...).
461
+ * **Best practice**: Format large numbers yourself (e.g., pass "99+" instead of "999").
318
462
  *
319
- * Inline styles handle visuals like background, border, padding, etc.
463
+ * ## Accessibility Considerations
320
464
  *
321
- * Transforms and opacity animate the enter/exit transition of the popover.
322
- */
323
- declare const Popover: {
324
- ({ children, popoverTrigger, styles, ...props }: PopoverProps): JSX.Element;
325
- displayName: string;
326
- styles: React__default.CSSProperties;
327
- };
328
-
329
- interface TableProps extends ComponentProps$1 {
330
- tblHead: React__default.ReactNode;
331
- tblBody: React__default.ReactNode;
332
- tblCaption?: React__default.ReactNode;
333
- }
334
- /**
335
- * Render the table placing `caption`, `thead` and `tbody` in the correct order
336
- * caption is optional
465
+ * - **Semantic HTML**: Uses `<sup>` (superscript) element for proper positioning context
466
+ * - **ARIA Role**: Defaults to `role="status"` for dynamic badges (e.g., unread counts)
467
+ * - **Accessible Names**: For icon-only or number-only badges, provide an `aria-label`
468
+ * to give context (e.g., "3 unread messages" instead of just "3")
469
+ * - **Live Regions**: The `role="status"` makes badges announce updates to screen readers
470
+ *
471
+ * @param {BadgeProps} props - Component props
472
+ * @returns {React.ReactElement} A Badge component
473
+ *
474
+ * @example
475
+ * // Basic badge with notification count
476
+ * <p>
477
+ * Messages
478
+ * <Badge aria-label="3 unread messages">3</Badge>
479
+ * </p>
480
+ *
481
+ * @example
482
+ * // Rounded badge variant (perfect circle)
483
+ * <p>
484
+ * Notifications
485
+ * <Badge variant="rounded" aria-label="99 or more notifications">99+</Badge>
486
+ * </p>
487
+ *
488
+ * @example
489
+ * // Status badge with custom styling
490
+ * <p>
491
+ * Active Users
492
+ * <Badge styles={{ backgroundColor: 'green', color: 'white' }}>21</Badge>
493
+ * </p>
494
+ *
495
+ * @example
496
+ * // ✅ GOOD: Accessible badge with descriptive label and formatted content
497
+ * <Badge variant="rounded" aria-label="12 items in cart">12</Badge>
498
+ *
499
+ * @example
500
+ * // ✅ GOOD: Large numbers formatted by developer
501
+ * <Badge variant="rounded" aria-label="More than 99 notifications">99+</Badge>
502
+ *
503
+ * @example
504
+ * // ❌ BAD: Number-only badge without context for screen readers
505
+ * <Badge>12</Badge>
337
506
  */
338
- declare const RenderTable: {
339
- ({ tblBody, tblCaption, tblHead }: TableProps): React__default.JSX.Element;
507
+ declare const Badge: {
508
+ ({ id, styles, classes, children, variant, ...props }: BadgeProps): React__default.JSX.Element;
340
509
  displayName: string;
341
510
  };
342
511
 
@@ -345,7 +514,7 @@ type TagProps = {
345
514
  elm?: 'span' | 'p';
346
515
  /** Aria role for the component - conditional */
347
516
  role: 'note' | 'status';
348
- } & React__default.ComponentProps<typeof FP$1>;
517
+ } & React__default.ComponentProps<typeof UI>;
349
518
  declare const Tag: {
350
519
  ({ elm, role, children, styles, ...props }: TagProps): React__default.JSX.Element;
351
520
  displayName: string;
@@ -376,211 +545,125 @@ declare const Table: {
376
545
  displayName: string;
377
546
  };
378
547
 
548
+ /**
549
+ * Props for the Details component.
550
+ *
551
+ * Combines native HTML details element props with custom styling and interaction handlers.
552
+ * The Details component uses the native `<details>` element for progressive disclosure,
553
+ * providing built-in keyboard support and semantic HTML.
554
+ *
555
+ * @example
556
+ * ```tsx
557
+ * <Details
558
+ * summary="Click to expand"
559
+ * icon={<ChevronIcon />}
560
+ * onToggle={(e) => console.log('Toggled:', e.currentTarget.open)}
561
+ * >
562
+ * <p>Hidden content revealed when opened</p>
563
+ * </Details>
564
+ * ```
565
+ */
379
566
  type DetailsProps = {
380
567
  /**
381
- * The summary text shown for the details.
382
- * Required.
568
+ * The summary text or element shown in the clickable header.
569
+ * This is always visible and acts as the toggle control.
570
+ *
571
+ * @required
572
+ * @example
573
+ * ```tsx
574
+ * summary="Shipping Information"
575
+ * // or
576
+ * summary={<><Icon /> Shipping Information</>}
577
+ * ```
383
578
  */
384
579
  summary: React__default.ReactNode;
385
580
  /**
386
- * The aria-label element for accessibility.
581
+ * Optional icon displayed before the summary text.
582
+ * Commonly used for chevron/arrow indicators.
583
+ *
584
+ * @example
585
+ * ```tsx
586
+ * icon={<ChevronDownIcon />}
587
+ * ```
387
588
  */
388
- ariaLabel: string;
389
- } & React__default.ComponentProps<"details"> & Partial<React__default.ComponentProps<typeof FP$1>>;
390
- /**3
391
- * Details component props interface.
392
- *
393
- * @param {React.CSSProperties} [styles] - CSS styles object.
394
- * @param {string} [classes] - Classnames string.
395
- * @param {boolean} [open] - Whether the details is open.
396
- * @param {(e: React.PointerEvent<HTMLDetailsElement>) => void} [onToggle] - onToggle callback.
397
- * @param {(e: React.PointerEvent<HTMLDetailsElement>) => void} [onPointerDown] - onPointerDown callback.
398
- * @param {ReactNode} children - The content inside the details.
399
- * @param {string} [ariaLabel] - aria-label for accessibility.
400
- * @param {React.Ref<any>} [ref] - Ref object.
401
- * @param {Object} props - Other props.
402
- */
403
- declare const Details: {
404
- ({ summary, icon, styles, classes, ariaLabel, name, open, onPointerDown, onToggle, children, ref, ...props }: DetailsProps): React__default.JSX.Element;
405
- displayName: string;
406
- };
407
-
408
- type InheritedProps = React__default.ComponentProps<typeof FP$1>;
409
- type TextElements = 'a' | 'b' | 'blockquote' | 'b' | 'blockquote' | 'cite' | 'code' | 'em' | 'i' | 'em' | 'i' | 'kbd' | 'mark' | 'p' | 's' | 'small' | 'span' | 'span' | 'strong' | 'mark' | 'p' | 's' | 'small' | 'span' | 'span' | 'strong' | 'sub' | 'sup' | 'time' | 'time' | 'u';
410
- type TextProps = {
589
+ icon?: React__default.ReactNode;
411
590
  /**
412
- * Text element to to use
413
- * Text element to to use
591
+ * Accessible label for screen readers.
592
+ * If not provided, the native `<details>` semantic will be used.
593
+ *
594
+ * Note: Native `<details>` elements are already semantic and announced properly
595
+ * by screen readers. Only provide this if you need to override the default behavior.
596
+ *
597
+ * @optional
598
+ * @example
599
+ * ```tsx
600
+ * ariaLabel="Product details section"
601
+ * ```
414
602
  */
415
- elm?: TextElements;
416
- /** Pass a text element or string */
417
- text?: string;
418
- } & InheritedProps;
419
- declare const Text: {
420
- ({ elm, id, text, styles, classes, children, ...props }: TextProps): React__default.JSX.Element;
421
- displayName: string;
422
- };
423
- type TitleProps$1 = {
603
+ ariaLabel?: string;
424
604
  /**
425
- * HTML headings
605
+ * Groups multiple details elements into an accordion where only one can be open.
606
+ * Multiple details elements with the same `name` will behave as a mutually exclusive group.
607
+ *
608
+ * @optional
609
+ * @example
610
+ * ```tsx
611
+ * <Details name="faq-accordion" summary="Question 1">...</Details>
612
+ * <Details name="faq-accordion" summary="Question 2">...</Details>
613
+ * ```
426
614
  */
427
- elm?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
428
- } & InheritedProps;
429
- declare const Title: {
430
- ({ elm, id, children, styles, classes, ...props }: TitleProps$1): React__default.JSX.Element;
431
- displayName: string;
432
- };
433
-
434
- type TextareaProps = React__default.ComponentProps<'textarea'> & React__default.ComponentProps<typeof FP$1>;
435
- /**
436
- * Textarea component.
437
- *
438
- * @param value - The value of the textarea.
439
- * @param rows - The number of rows.
440
- * @param cols - The number of columns.
441
- * @param id - The id of the textarea.
442
- * @param name - The name of the textarea.
443
- * @param required - Whether the textarea is required.
444
- * @param disabled - Whether the textarea is disabled.
445
- * @param readOnly - Whether the textarea is read only.
446
- * @param onBlur - Blur event handler.
447
- * @param onPointerDown - Pointer down event handler.
448
- * @param onChange - Change event handler.
449
- * @param ref - Ref for the textarea.
450
- * @param styles - Styles object for the textarea.
451
- * @param textareaRef - Ref specifically for the textarea element.
452
- * @param props - Other props.
453
- */
454
- declare const Textarea: {
455
- ({ id, classes, value, rows, cols, name, required, disabled, readOnly, onBlur, onPointerDown, onChange, ref, styles, placeholder, ...props }: TextareaProps): React__default.JSX.Element;
456
- displayName: string;
457
- };
458
-
459
- type TitleProps = {
460
- children: React__default.ReactNode;
461
- type: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
462
- ui?: string;
463
- } & React__default.ComponentProps<typeof FP$1>;
464
-
465
- type customRoute = {
466
- /** The path or id for routing */
467
- path?: string;
468
- /** The display name */
469
- name: string;
470
- /** The url if linking out */
471
- url?: string;
472
- };
473
- type BreadcrumbProps = {
474
- /** Array of custom route objects */
475
- routes?: customRoute[];
476
- /** Starting route node */
477
- startRoute?: React__default.ReactNode;
478
- startRouteUrl?: string;
479
- /** Spacer node between routes */
480
- spacer?: React__default.ReactNode;
481
- /** String representing current route */
482
- currentRoute?: string;
483
- /** Prefix breadcrumb aria-label - "prefix breadcrumb" */
484
- ariaLabelPrefix?: string;
485
- /** Truncate breadcrumb text after this length */
486
- truncateLength?: number;
487
- /** Link props for breadcrumb links */
488
- linkProps?: React__default.ComponentProps<typeof Link>;
489
- } & React__default.ComponentProps<typeof FP$1>;
490
- /**
491
- * Navigation component for breadcrumbs.
492
- *
493
- * @param props - Props for the navigation component.
494
- * @param props.startRoute - Starting route node. Default 'Home'.
495
- * @param props.currentRoute - String representing current route.
496
- * @param props.spacer - Spacer node between routes. Default '&#47;'.
497
- * @param props.routes - Array of custom route objects.
498
- * @param props.styles - Styles object for the nav.
499
- * @param props.id - Id for the nav.
500
- * @param props.classes - Class names for the nav.
501
- * @param props.children - Child components.
502
- */
503
- declare const Breadcrumb: {
504
- ({ startRoute, startRouteUrl, currentRoute, spacer, routes, styles, id, classes, ariaLabelPrefix, truncateLength, linkProps, ...props }: BreadcrumbProps): React__default.JSX.Element;
505
- displayName: string;
506
- Nav: ({ styles, id, classes, children, ...props }: React__default.ComponentProps<typeof FP$1>) => React__default.JSX.Element;
507
- List: ({ children, ...props }: React__default.ComponentProps<typeof FP$1>) => React__default.JSX.Element;
508
- Items: ({ styles, id, classes, children, ...props }: React__default.ComponentProps<typeof FP$1>) => React__default.JSX.Element;
509
- };
510
-
511
- /**
512
- * Props for the TextToSpeechComponent.
513
- * @interface TextToSpeechComponentProps
514
- */
515
- interface TextToSpeechComponentProps {
516
- /** Initial text to be spoken. Defaults to an empty string. */
517
- initialText?: string;
518
- /** Whether to show the text input field. Defaults to true. */
519
- showTextInput?: boolean;
520
- /** The voice to be used for speech synthesis. */
521
- voice?: SpeechSynthesisVoice | undefined;
522
- /** The pitch of the voice. Defaults to 1. */
523
- pitch?: number;
524
- /** The rate of speech. Defaults to 1. */
525
- rate?: number;
526
- /** The language to be used for speech synthesis. */
527
- language?: string;
528
- /** Player label */
529
- label?: string | React__default.ReactNode;
530
- /** Callback function to be called when speech ends. */
531
- onEnd?: () => void;
532
- }
533
- /**
534
- * A component that converts text to speech using the Web Speech API.
535
- * @param {TextToSpeechComponentProps} props - The props for the component.
536
- * @returns {JSX.Element} The rendered TextToSpeechComponent.
537
- */
538
- declare const TextToSpeech: React__default.FC<TextToSpeechComponentProps>;
615
+ name?: string;
616
+ } & React__default.ComponentProps<"details"> & Partial<React__default.ComponentProps<typeof UI>>;
539
617
 
540
618
  /**
541
- * Defines the props for the Dialog component.
542
- *
543
- * @property {boolean} [showDialog] - Determines whether the dialog should be shown.
544
- * @property {boolean} [isAlertDialog] - Determines whether the dialog should be displayed as an alert dialog.
545
- * @property {() => void} [onClose] - A callback function to be called when the dialog is closed.
546
- * @property {string} dialogTitle - The title of the dialog.
547
- * @property {string} [dialogLabel] - An optional label for the dialog.
548
- * @property {React.ReactNode} children - The content to be displayed inside the dialog.
549
- * @property {() => void | Promise<void>} [onConfirm] - A callback function to be called when the user confirms the dialog.
550
- * @property {string} [confirmLabel] - The label for the confirm button.
551
- * @property {string} [cancelLabel] - The label for the cancel button.
552
- * @property {string} [className] - An optional CSS class name to be applied to the dialog.
553
- * @property {CSSProperties} [styles] - Optional inline styles to be applied to the dialog.
554
- */
555
- type DialogModalProps = React__default.ComponentProps<typeof FP$1> & React__default.ComponentProps<"dialog"> & {
556
- dialogTitle: string;
557
- dialogLabel?: string;
558
- children: React__default.ReactNode;
559
- showDialog?: boolean;
560
- isAlertDialog?: boolean;
561
- onClose?: () => void;
562
- onConfirm?: () => void | Promise<void>;
563
- confirmLabel?: string;
564
- cancelLabel?: string;
565
- className?: string;
566
- hideFooter?: boolean;
567
- styles?: CSSProperties;
568
- };
569
- /**
570
- * Renders a dialog modal component with customizable content and behavior.
571
- *
572
- * @param showDialog - Determines whether the dialog should be shown.
573
- * @param isAlertDialog - Determines whether the dialog should be displayed as an alert dialog.
574
- * @param onClose - A callback function to be called when the dialog is closed.
575
- * @param dialogTitle - The title of the dialog.
576
- * @param dialogLabel - An optional label for the dialog.
577
- * @param children - The content to be displayed inside the dialog.
578
- * @param onConfirm - A callback function to be called when the user confirms the dialog.
579
- * @param confirmLabel - The label for the confirm button.
580
- * @param cancelLabel - The label for the cancel button.
581
- * @param className - An optional CSS class name to be applied to the dialog.
582
- * @param styles - Optional inline styles to be applied to the dialog.
619
+ * Details - A progressive disclosure component using native HTML `<details>` element.
620
+ *
621
+ * This component wraps the native `<details>` and `<summary>` elements to provide
622
+ * an accessible, semantic way to show and hide content. It supports accordion behavior
623
+ * through the `name` attribute and includes proper keyboard navigation out of the box.
624
+ *
625
+ * ## Key Features:
626
+ * - **Semantic HTML**: Uses native `<details>` for built-in accessibility
627
+ * - **Keyboard Support**: Space/Enter to toggle, fully accessible by default
628
+ * - **Accordion Mode**: Group multiple details with `name` for exclusive expansion
629
+ * - **Customizable**: Supports icons, custom styles, and event handlers
630
+ *
631
+ * ## Accessibility:
632
+ * - ✅ WCAG 2.1 AA compliant using semantic HTML
633
+ * - Native keyboard support (Space, Enter)
634
+ * - ✅ Screen reader compatible (announced as "disclosure" or "expandable")
635
+ * - ✅ Focus indicators automatically applied via CSS
636
+ * - ✅ `aria-expanded` managed automatically by browser
637
+ *
638
+ * @example
639
+ * ```tsx
640
+ * // Basic usage
641
+ * <Details summary="Click to expand">
642
+ * <p>Hidden content here</p>
643
+ * </Details>
644
+ * ```
645
+ *
646
+ * @example
647
+ * ```tsx
648
+ * // With icon and custom styling
649
+ * <Details
650
+ * summary="Shipping Information"
651
+ * icon={<ChevronDownIcon />}
652
+ * classes="custom-details"
653
+ * onToggle={(e) => console.log('Open:', e.currentTarget.open)}
654
+ * >
655
+ * <p>Ships within 2-3 business days</p>
656
+ * </Details>
657
+ * ```
658
+ *
659
+ * @example
660
+ * ```tsx
661
+ * // Accordion mode - only one open at a time
662
+ * <Details name="faq" summary="Question 1">Answer 1</Details>
663
+ * <Details name="faq" summary="Question 2">Answer 2</Details>
664
+ * <Details name="faq" summary="Question 3">Answer 3</Details>
665
+ * ```
583
666
  */
584
- declare const Dialog: React__default.FC<DialogModalProps>;
667
+ declare const Details: React__default.ForwardRefExoticComponent<Omit<DetailsProps, "ref"> & React__default.RefAttributes<HTMLDetailsElement>>;
585
668
 
586
- export { Article, Aside, FP as Box, Breadcrumb, Button, Caption, Card, Details, Dialog, FP, Field, Footer, Header, Img, Input, Landmarks, Link, List, Main, Modal, Nav, NavItem, NavItemProps, NavList, NavListProps, NavProps, Popover, Section, RenderTable as TBL, Table, Tag, TagProps, Tbody, Td, Text, TextProps, TextToSpeech, Textarea, TextareaProps, Thead, Title, TitleProps, Link as To, Tr };
669
+ export { Article, Aside, Badge, BadgeProps, Caption, ComponentProps$1 as ComponentProps, Details, Footer, Header, Img, ImgProps, Landmarks, Main, Section, Table, Tag, TagProps, Tbody, Td, TextToSpeech, Thead, Tr };