@fpkit/acss 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/libs/{chunk-2NRIP6RB.cjs → chunk-2C3YLBWP.cjs} +3 -3
  2. package/libs/{chunk-NWJDAHP6.cjs → chunk-2GJHKWEK.cjs} +3 -3
  3. package/libs/{chunk-FVROL3V5.js → chunk-2JCDEC32.js} +3 -3
  4. package/libs/{chunk-IRLFZ3OL.js → chunk-3XJC4XUG.js} +2 -2
  5. package/libs/{chunk-23ANBDCR.js → chunk-4I5MF54P.js} +3 -3
  6. package/libs/chunk-4I5MF54P.js.map +1 -0
  7. package/libs/chunk-5CJPTDK3.cjs +31 -0
  8. package/libs/chunk-5CJPTDK3.cjs.map +1 -0
  9. package/libs/{chunk-E4OSROCA.cjs → chunk-5QSNJQVH.cjs} +3 -3
  10. package/libs/{chunk-O3JIHC5M.cjs → chunk-6BUJZ4DJ.cjs} +3 -3
  11. package/libs/{chunk-WXBFBWYF.cjs → chunk-AFINOD2L.cjs} +3 -3
  12. package/libs/{chunk-HRRHPLER.js → chunk-AWZLSWDO.js} +2 -2
  13. package/libs/chunk-DDSXKOUB.js +7 -0
  14. package/libs/chunk-DDSXKOUB.js.map +1 -0
  15. package/libs/{chunk-CWRNJA4P.js → chunk-DIJBIOFE.js} +3 -3
  16. package/libs/chunk-EJ6KYBFE.cjs +13 -0
  17. package/libs/chunk-EJ6KYBFE.cjs.map +1 -0
  18. package/libs/{chunk-GUJSMQ3V.cjs → chunk-EKJYOCLY.cjs} +3 -3
  19. package/libs/{chunk-X5RKCLDC.cjs → chunk-F64GE6RG.cjs} +4 -4
  20. package/libs/chunk-FMIM3332.js +8 -0
  21. package/libs/chunk-FMIM3332.js.map +1 -0
  22. package/libs/{chunk-5RAWNUVD.js → chunk-IBUTNPTQ.js} +2 -2
  23. package/libs/chunk-IWP4VJEP.cjs +18 -0
  24. package/libs/chunk-IWP4VJEP.cjs.map +1 -0
  25. package/libs/{chunk-ZFJ4U45S.js → chunk-KDMX3FAW.js} +2 -2
  26. package/libs/{chunk-DYFAUAB7.cjs → chunk-LXODKKA3.cjs} +4 -4
  27. package/libs/chunk-M7JLT62Q.js +9 -0
  28. package/libs/chunk-M7JLT62Q.js.map +1 -0
  29. package/libs/{chunk-IQ76HGVP.js → chunk-MBWI67UT.js} +2 -2
  30. package/libs/{chunk-O5XAJ7BY.cjs → chunk-NCGVF2QS.cjs} +4 -4
  31. package/libs/{chunk-W2UIN7EV.cjs → chunk-NPWHQVYB.cjs} +3 -3
  32. package/libs/{chunk-G55UJ53G.cjs → chunk-NZVSXRTB.cjs} +3 -3
  33. package/libs/chunk-NZVSXRTB.cjs.map +1 -0
  34. package/libs/{chunk-43TK2ICH.js → chunk-PMWL5XZ4.js} +3 -3
  35. package/libs/{chunk-KVKQLRJG.js → chunk-TF3GQKOY.js} +2 -2
  36. package/libs/chunk-TNEJXNZA.cjs +22 -0
  37. package/libs/chunk-TNEJXNZA.cjs.map +1 -0
  38. package/libs/{chunk-IEB64SWY.js → chunk-U5VA34SU.js} +2 -2
  39. package/libs/chunk-UGMP72J2.js +8 -0
  40. package/libs/chunk-UGMP72J2.js.map +1 -0
  41. package/libs/{chunk-MGPWZRBX.cjs → chunk-URBGDUFN.cjs} +6 -6
  42. package/libs/{chunk-QKHPHMG2.js → chunk-ZF6Y7W57.js} +5 -5
  43. package/libs/component-props-50e69975.d.ts +66 -0
  44. package/libs/components/box/box.css +1 -0
  45. package/libs/components/box/box.css.map +1 -0
  46. package/libs/components/box/box.min.css +3 -0
  47. package/libs/components/breadcrumbs/breadcrumb.cjs +6 -6
  48. package/libs/components/breadcrumbs/breadcrumb.js +3 -3
  49. package/libs/components/button.cjs +4 -4
  50. package/libs/components/button.d.cts +10 -3
  51. package/libs/components/button.d.ts +10 -3
  52. package/libs/components/button.js +2 -2
  53. package/libs/components/card.cjs +7 -7
  54. package/libs/components/card.d.cts +13 -85
  55. package/libs/components/card.d.ts +13 -85
  56. package/libs/components/card.js +2 -2
  57. package/libs/components/cards/card.css +1 -1
  58. package/libs/components/cards/card.css.map +1 -1
  59. package/libs/components/cards/card.min.css +2 -2
  60. package/libs/components/cluster/cluster.css +1 -0
  61. package/libs/components/cluster/cluster.css.map +1 -0
  62. package/libs/components/cluster/cluster.min.css +3 -0
  63. package/libs/components/dialog/dialog.cjs +7 -7
  64. package/libs/components/dialog/dialog.js +5 -5
  65. package/libs/components/form/fields.cjs +4 -4
  66. package/libs/components/form/fields.js +2 -2
  67. package/libs/components/form/textarea.cjs +4 -4
  68. package/libs/components/form/textarea.js +2 -2
  69. package/libs/components/grid/grid.css +1 -0
  70. package/libs/components/grid/grid.css.map +1 -0
  71. package/libs/components/grid/grid.min.css +3 -0
  72. package/libs/components/heading/heading.cjs +3 -3
  73. package/libs/components/heading/heading.js +2 -2
  74. package/libs/components/icons/icon.cjs +4 -4
  75. package/libs/components/icons/icon.d.cts +2 -2
  76. package/libs/components/icons/icon.d.ts +2 -2
  77. package/libs/components/icons/icon.js +2 -2
  78. package/libs/components/link/link.cjs +6 -6
  79. package/libs/components/link/link.js +2 -2
  80. package/libs/components/list/list.cjs +5 -5
  81. package/libs/components/list/list.js +2 -2
  82. package/libs/components/modal.cjs +4 -4
  83. package/libs/components/modal.d.cts +1 -1
  84. package/libs/components/modal.d.ts +1 -1
  85. package/libs/components/modal.js +3 -3
  86. package/libs/components/nav/nav.cjs +7 -7
  87. package/libs/components/nav/nav.js +3 -3
  88. package/libs/components/popover/popover.cjs +4 -4
  89. package/libs/components/popover/popover.d.cts +1 -1
  90. package/libs/components/popover/popover.d.ts +1 -1
  91. package/libs/components/popover/popover.js +1 -1
  92. package/libs/components/stack/stack.css +1 -0
  93. package/libs/components/stack/stack.css.map +1 -0
  94. package/libs/components/stack/stack.min.css +3 -0
  95. package/libs/components/tables/table.cjs +4 -4
  96. package/libs/components/tables/table.d.cts +2 -2
  97. package/libs/components/tables/table.d.ts +2 -2
  98. package/libs/components/tables/table.js +1 -1
  99. package/libs/components/text/text.cjs +5 -5
  100. package/libs/components/text/text.js +2 -2
  101. package/libs/hooks.cjs +4 -4
  102. package/libs/hooks.js +3 -3
  103. package/libs/{icons-287fce3a.d.ts → icons-df8e744f.d.ts} +1 -1
  104. package/libs/icons.cjs +3 -3
  105. package/libs/icons.d.cts +2 -2
  106. package/libs/icons.d.ts +2 -2
  107. package/libs/icons.js +2 -2
  108. package/libs/index.cjs +74 -73
  109. package/libs/index.cjs.map +1 -1
  110. package/libs/index.css +1 -1
  111. package/libs/index.css.map +1 -1
  112. package/libs/index.d.cts +925 -6
  113. package/libs/index.d.ts +925 -6
  114. package/libs/index.js +30 -30
  115. package/libs/index.js.map +1 -1
  116. package/package.json +2 -2
  117. package/src/App.tsx +1 -3
  118. package/src/components/alert/STYLES.mdx +790 -0
  119. package/src/components/badge/STYLES.mdx +610 -0
  120. package/src/components/box/README.mdx +401 -0
  121. package/src/components/box/STYLES.mdx +360 -0
  122. package/src/components/box/box.scss +245 -0
  123. package/src/components/box/box.stories.tsx +395 -0
  124. package/src/components/box/box.test.tsx +425 -0
  125. package/src/components/box/box.tsx +170 -0
  126. package/src/components/box/box.types.ts +166 -0
  127. package/src/components/breadcrumbs/STYLES.mdx +99 -0
  128. package/src/components/breadcrumbs/bc-item.tsx +0 -1
  129. package/src/components/buttons/STYLES.mdx +766 -0
  130. package/src/components/cards/STYLES.mdx +835 -0
  131. package/src/components/cards/card.scss +29 -21
  132. package/src/components/cards/card.tsx +13 -3
  133. package/src/components/cards/card.types.ts +13 -0
  134. package/src/components/cluster/README.mdx +595 -0
  135. package/src/components/cluster/STYLES.mdx +626 -0
  136. package/src/components/cluster/cluster.scss +86 -0
  137. package/src/components/cluster/cluster.stories.tsx +385 -0
  138. package/src/components/cluster/cluster.test.tsx +655 -0
  139. package/src/components/cluster/cluster.tsx +94 -0
  140. package/src/components/cluster/cluster.types.ts +75 -0
  141. package/src/components/details/STYLES.mdx +445 -0
  142. package/src/components/dialog/STYLES.mdx +888 -0
  143. package/src/components/flexbox/STYLES.mdx +857 -0
  144. package/src/components/flexbox/flex.stories.tsx +842 -141
  145. package/src/components/flexbox/flex.types.ts +25 -6
  146. package/src/components/form/STYLES.mdx +821 -0
  147. package/src/components/grid/README.mdx +709 -0
  148. package/src/components/grid/STYLES.mdx +785 -0
  149. package/src/components/grid/grid.scss +287 -0
  150. package/src/components/grid/grid.stories.tsx +486 -0
  151. package/src/components/grid/grid.test.tsx +981 -0
  152. package/src/components/grid/grid.tsx +222 -0
  153. package/src/components/grid/grid.types.ts +344 -0
  154. package/src/components/icons/STYLES.mdx +56 -0
  155. package/src/components/icons/components/arrow-right.tsx +0 -5
  156. package/src/components/images/STYLES.mdx +75 -0
  157. package/src/components/kit.tsx +8 -4
  158. package/src/components/layout/STYLES.mdx +556 -0
  159. package/src/components/link/STYLES.mdx +75 -0
  160. package/src/components/list/STYLES.mdx +631 -0
  161. package/src/components/nav/STYLES.mdx +460 -0
  162. package/src/components/popover/popover.tsx +1 -1
  163. package/src/components/progress/STYLES.mdx +64 -0
  164. package/src/components/stack/README.mdx +400 -0
  165. package/src/components/stack/STYLES.mdx +414 -0
  166. package/src/components/stack/stack.scss +109 -0
  167. package/src/components/stack/stack.stories.tsx +559 -0
  168. package/src/components/stack/stack.test.tsx +426 -0
  169. package/src/components/stack/stack.tsx +141 -0
  170. package/src/components/stack/stack.types.ts +133 -0
  171. package/src/components/tables/table-elements.tsx +1 -1
  172. package/src/components/tables/table.tsx +2 -2
  173. package/src/components/tag/STYLES.mdx +105 -0
  174. package/src/components/text-to-speech/STYLES.mdx +80 -0
  175. package/src/components/text-to-speech/TextToSpeech.tsx +0 -4
  176. package/src/components/text-to-speech/useTextToSpeech.tsx +2 -6
  177. package/src/components/ui.tsx +3 -3
  178. package/src/decorators/instructions.tsx +22 -18
  179. package/src/hooks/popover/popover.tsx +1 -1
  180. package/src/index.scss +5 -1
  181. package/src/index.ts +305 -12
  182. package/src/sass/GLOBALS-STYLES.md +631 -0
  183. package/src/sass/_globals.scss +45 -24
  184. package/src/styles/box/box.css +220 -0
  185. package/src/styles/box/box.css.map +1 -0
  186. package/src/styles/cards/card.css +22 -17
  187. package/src/styles/cards/card.css.map +1 -1
  188. package/src/styles/cluster/cluster.css +71 -0
  189. package/src/styles/cluster/cluster.css.map +1 -0
  190. package/src/styles/grid/grid.css +238 -0
  191. package/src/styles/grid/grid.css.map +1 -0
  192. package/src/styles/index.css +667 -49
  193. package/src/styles/index.css.map +1 -1
  194. package/src/styles/stack/stack.css +86 -0
  195. package/src/styles/stack/stack.css.map +1 -0
  196. package/src/types/component-props.ts +42 -13
  197. package/src/types/layout-primitives.ts +48 -0
  198. package/src/types/shared.ts +10 -26
  199. package/libs/chunk-23ANBDCR.js.map +0 -1
  200. package/libs/chunk-5QD3DWFI.js +0 -9
  201. package/libs/chunk-5QD3DWFI.js.map +0 -1
  202. package/libs/chunk-6WTC4JXH.cjs +0 -31
  203. package/libs/chunk-6WTC4JXH.cjs.map +0 -1
  204. package/libs/chunk-ENTCUJ3A.cjs +0 -13
  205. package/libs/chunk-ENTCUJ3A.cjs.map +0 -1
  206. package/libs/chunk-G55UJ53G.cjs.map +0 -1
  207. package/libs/chunk-HHLNOC5T.js +0 -7
  208. package/libs/chunk-HHLNOC5T.js.map +0 -1
  209. package/libs/chunk-KK47SYZI.js +0 -8
  210. package/libs/chunk-KK47SYZI.js.map +0 -1
  211. package/libs/chunk-US2I5GI7.cjs +0 -22
  212. package/libs/chunk-US2I5GI7.cjs.map +0 -1
  213. package/libs/chunk-W5TKWBFC.cjs +0 -18
  214. package/libs/chunk-W5TKWBFC.cjs.map +0 -1
  215. package/libs/chunk-Y2PFDELK.js +0 -8
  216. package/libs/chunk-Y2PFDELK.js.map +0 -1
  217. package/libs/component-props-67d978a2.d.ts +0 -38
  218. /package/libs/{chunk-2NRIP6RB.cjs.map → chunk-2C3YLBWP.cjs.map} +0 -0
  219. /package/libs/{chunk-NWJDAHP6.cjs.map → chunk-2GJHKWEK.cjs.map} +0 -0
  220. /package/libs/{chunk-FVROL3V5.js.map → chunk-2JCDEC32.js.map} +0 -0
  221. /package/libs/{chunk-IRLFZ3OL.js.map → chunk-3XJC4XUG.js.map} +0 -0
  222. /package/libs/{chunk-E4OSROCA.cjs.map → chunk-5QSNJQVH.cjs.map} +0 -0
  223. /package/libs/{chunk-O3JIHC5M.cjs.map → chunk-6BUJZ4DJ.cjs.map} +0 -0
  224. /package/libs/{chunk-WXBFBWYF.cjs.map → chunk-AFINOD2L.cjs.map} +0 -0
  225. /package/libs/{chunk-HRRHPLER.js.map → chunk-AWZLSWDO.js.map} +0 -0
  226. /package/libs/{chunk-CWRNJA4P.js.map → chunk-DIJBIOFE.js.map} +0 -0
  227. /package/libs/{chunk-GUJSMQ3V.cjs.map → chunk-EKJYOCLY.cjs.map} +0 -0
  228. /package/libs/{chunk-X5RKCLDC.cjs.map → chunk-F64GE6RG.cjs.map} +0 -0
  229. /package/libs/{chunk-5RAWNUVD.js.map → chunk-IBUTNPTQ.js.map} +0 -0
  230. /package/libs/{chunk-ZFJ4U45S.js.map → chunk-KDMX3FAW.js.map} +0 -0
  231. /package/libs/{chunk-DYFAUAB7.cjs.map → chunk-LXODKKA3.cjs.map} +0 -0
  232. /package/libs/{chunk-IQ76HGVP.js.map → chunk-MBWI67UT.js.map} +0 -0
  233. /package/libs/{chunk-O5XAJ7BY.cjs.map → chunk-NCGVF2QS.cjs.map} +0 -0
  234. /package/libs/{chunk-W2UIN7EV.cjs.map → chunk-NPWHQVYB.cjs.map} +0 -0
  235. /package/libs/{chunk-43TK2ICH.js.map → chunk-PMWL5XZ4.js.map} +0 -0
  236. /package/libs/{chunk-KVKQLRJG.js.map → chunk-TF3GQKOY.js.map} +0 -0
  237. /package/libs/{chunk-IEB64SWY.js.map → chunk-U5VA34SU.js.map} +0 -0
  238. /package/libs/{chunk-MGPWZRBX.cjs.map → chunk-URBGDUFN.cjs.map} +0 -0
  239. /package/libs/{chunk-QKHPHMG2.js.map → chunk-ZF6Y7W57.js.map} +0 -0
@@ -0,0 +1,460 @@
1
+ import { Meta } from "@storybook/addon-docs/blocks";
2
+
3
+ <Meta title="FP.REACT Components/Navigation/Styles" />
4
+
5
+ # Navigation Styles
6
+
7
+ Navigation component styling system with CSS custom properties for creating
8
+ flexible, responsive, and accessible navigation bars.
9
+
10
+ ## Overview
11
+
12
+ The fpkit navigation styling system provides flexible navigation components
13
+ using semantic `<nav>` elements or ARIA labels. Navigation supports horizontal
14
+ and vertical layouts, responsive behavior, and comprehensive keyboard
15
+ accessibility.
16
+
17
+ ### Key Features
18
+
19
+ - **Semantic HTML** - Uses `<nav>` element with proper ARIA labeling
20
+ - **Flexible layouts** - Horizontal (default) and vertical navigation
21
+ - **Responsive design** - Automatic mobile adaptation below 580px
22
+ - **List-based structure** - Semantic `<ul>`/`<li>` for nav items
23
+ - **Focus indicators** - WCAG 2.4.7 compliant focus states
24
+ - **Hover effects** - Visual feedback on navigation items
25
+ - **CSS custom properties** - Full theming control
26
+ - **Rem-based sizing** - All measurements use rem units (1rem = 16px)
27
+
28
+ ## CSS Custom Properties
29
+
30
+ ### Base Navigation Properties
31
+
32
+ ```css
33
+ nav {
34
+ /* Layout */
35
+ --nav-display: flex;
36
+ --nav-direction: row; /* row or column */
37
+ --nav-width: auto;
38
+ --nav-align: center; /* place-items value */
39
+ --nav-justify: space-between;
40
+
41
+ /* Colors */
42
+ --nav-bg: initial; /* Background color */
43
+ --nav-color: currentColor; /* Text color */
44
+
45
+ /* Spacing */
46
+ --nav-padding-inline: 1rem; /* Horizontal padding */
47
+ --nav-padding-block: 0; /* Vertical padding */
48
+ --nav-margin-inline: 0; /* Horizontal margin */
49
+ --nav-margin-block-end: 0; /* Bottom margin */
50
+ --nav-gap: 0; /* Gap between items */
51
+
52
+ /* Typography */
53
+ --nav-fs: 0.9rem; /* Font size (14.4px) */
54
+
55
+ /* Hover */
56
+ --nav-hover-bg: #e8e8e8; /* Hover background */
57
+
58
+ /* Height */
59
+ --nav-height: fit-content; /* Nav height */
60
+ }
61
+ ```
62
+
63
+ ### Focus Indicator Properties
64
+
65
+ ```css
66
+ nav {
67
+ /* Focus indicators (WCAG 2.4.7) */
68
+ --nav-focus-color: currentColor;
69
+ --nav-focus-width: 0.125rem; /* 2px */
70
+ --nav-focus-offset: 0.125rem; /* 2px */
71
+ --nav-focus-style: solid;
72
+ }
73
+ ```
74
+
75
+ ### Image/Logo Properties
76
+
77
+ ```css
78
+ nav img[alt] {
79
+ --nav-img-padding-inline: 0 var(--s1);
80
+ --nav-img-width: 3.6rem; /* 57.6px (or var(--brand-w)) */
81
+ }
82
+ ```
83
+
84
+ ## Navigation Structure
85
+
86
+ ### Basic Horizontal Navigation
87
+
88
+ ```html
89
+ <nav>
90
+ <ul>
91
+ <li><a href="/">Home</a></li>
92
+ <li><a href="/about">About</a></li>
93
+ <li><a href="/contact">Contact</a></li>
94
+ </ul>
95
+ </nav>
96
+ ```
97
+
98
+ ### Navigation with Logo
99
+
100
+ ```html
101
+ <nav>
102
+ <img src="/logo.svg" alt="Company Logo" />
103
+ <ul>
104
+ <li><a href="/">Home</a></li>
105
+ <li><a href="/about">About</a></li>
106
+ <li><a href="/contact">Contact</a></li>
107
+ </ul>
108
+ </nav>
109
+ ```
110
+
111
+ ### Navigation with Sections
112
+
113
+ ```html
114
+ <nav>
115
+ <section>
116
+ <img src="/logo.svg" alt="Logo" />
117
+ </section>
118
+ <ul>
119
+ <li><a href="/">Home</a></li>
120
+ <li><a href="/products">Products</a></li>
121
+ </ul>
122
+ <section>
123
+ <button type="button">Login</button>
124
+ </section>
125
+ </nav>
126
+ ```
127
+
128
+ ## Selectors
129
+
130
+ The navigation styles apply to multiple selectors:
131
+
132
+ ```css
133
+ /* Direct child nav of body */
134
+ body > nav {
135
+ /* styles */
136
+ }
137
+
138
+ /* ARIA labeled navbar */
139
+ [aria-label~="navbar"] {
140
+ /* styles */
141
+ }
142
+
143
+ /* Class-based navbar */
144
+ .navbar {
145
+ /* styles */
146
+ }
147
+ ```
148
+
149
+ **Usage:**
150
+
151
+ ```html
152
+ <!-- Semantic nav -->
153
+ <nav aria-label="Main navbar">...</nav>
154
+
155
+ <!-- ARIA label -->
156
+ <div aria-label="navbar">...</div>
157
+
158
+ <!-- Class-based -->
159
+ <div class="navbar">...</div>
160
+ ```
161
+
162
+ ## Layout Variants
163
+
164
+ ### Horizontal Navigation (Default)
165
+
166
+ ```html
167
+ <nav>
168
+ <ul>
169
+ <li><a href="/">Home</a></li>
170
+ <li><a href="/about">About</a></li>
171
+ </ul>
172
+ </nav>
173
+ ```
174
+
175
+ ### Vertical Navigation
176
+
177
+ ```html
178
+ <nav style="--nav-direction: column">
179
+ <ul>
180
+ <li><a href="/">Home</a></li>
181
+ <li><a href="/about">About</a></li>
182
+ </ul>
183
+ </nav>
184
+ ```
185
+
186
+ ### Vertical List in Horizontal Nav
187
+
188
+ ```html
189
+ <nav>
190
+ <ul data-list="block">
191
+ <li><a href="/">Home</a></li>
192
+ <li><a href="/about">About</a></li>
193
+ </ul>
194
+ </nav>
195
+ ```
196
+
197
+ **CSS:**
198
+
199
+ ```css
200
+ [data-list~="block"] {
201
+ --nav-direction: column;
202
+ }
203
+ ```
204
+
205
+ ## Responsive Behavior
206
+
207
+ ### Mobile Breakpoint
208
+
209
+ Below 580px, navbars automatically switch to column layout:
210
+
211
+ ```css
212
+ @media (max-width: 580px) {
213
+ body > nav,
214
+ [aria-label~="navbar"],
215
+ .navbar {
216
+ flex-direction: column;
217
+ height: fit-content;
218
+ min-height: fit-content;
219
+ padding-block: unset;
220
+ gap: 0.5rem;
221
+ }
222
+ }
223
+ ```
224
+
225
+ **Result:** Navigation items stack vertically on mobile devices.
226
+
227
+ ## Hover States
228
+
229
+ ### List Item Hover
230
+
231
+ ```css
232
+ nav ul > li:hover {
233
+ background-color: #e8e8e8; /* --nav-hover-bg */
234
+ }
235
+ ```
236
+
237
+ ### Exception for Images and Buttons
238
+
239
+ Items containing images or buttons don't show hover background:
240
+
241
+ ```css
242
+ nav ul > li:hover:has(img, button) {
243
+ background-color: transparent;
244
+ }
245
+ ```
246
+
247
+ ## Focus Indicators
248
+
249
+ ### Link Focus
250
+
251
+ ```css
252
+ nav a:focus,
253
+ nav a:focus-visible {
254
+ outline: 0.125rem solid currentColor;
255
+ outline-offset: 0.125rem;
256
+ }
257
+ ```
258
+
259
+ ### Button Focus
260
+
261
+ ```css
262
+ nav button:focus,
263
+ nav button:focus-visible {
264
+ outline: 0.125rem solid currentColor;
265
+ outline-offset: 0.125rem;
266
+ }
267
+ ```
268
+
269
+ ## Real-World Examples
270
+
271
+ ### Header Navigation
272
+
273
+ ```html
274
+ <nav style="--nav-bg: #333; --nav-color: white; --nav-padding-block: 1rem">
275
+ <section>
276
+ <img src="/logo.svg" alt="Brand" style="--nav-img-width: 4rem" />
277
+ </section>
278
+ <ul>
279
+ <li><a href="/">Home</a></li>
280
+ <li><a href="/products">Products</a></li>
281
+ <li><a href="/about">About</a></li>
282
+ </ul>
283
+ <section>
284
+ <button type="button">Sign In</button>
285
+ </section>
286
+ </nav>
287
+ ```
288
+
289
+ ### Sidebar Navigation
290
+
291
+ ```html
292
+ <nav
293
+ style="--nav-direction: column; --nav-align: flex-start; --nav-width: 15rem; min-height: 100vh; --nav-bg: #f5f5f5"
294
+ >
295
+ <ul style="width: 100%">
296
+ <li><a href="/dashboard">Dashboard</a></li>
297
+ <li><a href="/settings">Settings</a></li>
298
+ <li><a href="/profile">Profile</a></li>
299
+ </ul>
300
+ </nav>
301
+ ```
302
+
303
+ ### Navigation with Icons
304
+
305
+ ```html
306
+ <nav>
307
+ <ul style="--nav-gap: 1rem">
308
+ <li>
309
+ <a href="/">
310
+ <span aria-hidden="true">🏠</span>
311
+ <span>Home</span>
312
+ </a>
313
+ </li>
314
+ <li>
315
+ <a href="/search">
316
+ <span aria-hidden="true">🔍</span>
317
+ <span>Search</span>
318
+ </a>
319
+ </li>
320
+ </ul>
321
+ </nav>
322
+ ```
323
+
324
+ ### Navbar with Data Variant
325
+
326
+ ```html
327
+ <nav
328
+ data-variant="primary"
329
+ style="--nav-bg: #0066cc; --nav-color: white; --nav-fs: 1rem"
330
+ >
331
+ <ul>
332
+ <li><a href="/">Home</a></li>
333
+ <li><a href="/about">About</a></li>
334
+ </ul>
335
+ </nav>
336
+ ```
337
+
338
+ ### Navigation with Dropdown
339
+
340
+ ```html
341
+ <nav>
342
+ <ul>
343
+ <li><a href="/">Home</a></li>
344
+ <li style="position: relative">
345
+ <button type="button">Products</button>
346
+ <!-- Dropdown menu would go here -->
347
+ </li>
348
+ </ul>
349
+ </nav>
350
+ ```
351
+
352
+ ## Accessibility Considerations
353
+
354
+ ### ARIA Labeling
355
+
356
+ Always provide accessible labels:
357
+
358
+ ```html
359
+ <!-- Good: aria-label -->
360
+ <nav aria-label="Main navigation">...</nav>
361
+
362
+ <!-- Good: aria-labelledby -->
363
+ <nav aria-labelledby="nav-title">
364
+ <h2 id="nav-title">Main Navigation</h2>
365
+ ...
366
+ </nav>
367
+ ```
368
+
369
+ ### Keyboard Navigation
370
+
371
+ - **Tab** - Navigate through links/buttons
372
+ - **Shift+Tab** - Navigate backwards
373
+ - **Enter** - Activate link/button
374
+ - All interactive elements have visible focus indicators
375
+
376
+ ### Current Page Indication
377
+
378
+ Mark the current page for screen readers:
379
+
380
+ ```html
381
+ <nav aria-label="Main">
382
+ <ul>
383
+ <li><a href="/">Home</a></li>
384
+ <li><a href="/about" aria-current="page">About</a></li>
385
+ <li><a href="/contact">Contact</a></li>
386
+ </ul>
387
+ </nav>
388
+ ```
389
+
390
+ ### Skip Navigation Link
391
+
392
+ Provide skip link for keyboard users:
393
+
394
+ ```html
395
+ <a href="#main-content" class="skip-link">Skip to main content</a>
396
+ <nav aria-label="Main">...</nav>
397
+ <main id="main-content">...</main>
398
+ ```
399
+
400
+ ## CSS Variable Naming Convention
401
+
402
+ | Category | Variable Pattern | Example |
403
+ | -------------- | ------------------------ | ----------------------------------- |
404
+ | **Layout** | `--nav-{property}` | `--nav-display`, `--nav-direction` |
405
+ | **Colors** | `--nav-{property}` | `--nav-bg`, `--nav-color` |
406
+ | **Spacing** | `--nav-{spacing-type}` | `--nav-padding-inline`, `--nav-gap` |
407
+ | **Typography** | `--nav-fs` | `--nav-fs` |
408
+ | **Focus** | `--nav-focus-{property}` | `--nav-focus-color` |
409
+ | **Images** | `--nav-img-{property}` | `--nav-img-width` |
410
+
411
+ ## Browser Support
412
+
413
+ - **CSS Custom Properties:** All modern browsers
414
+ - **Flexbox:** All modern browsers
415
+ - **`:focus-visible`:** Chrome 86+, Firefox 85+, Safari 15.4+
416
+ - **`:has()` selector:** Chrome 105+, Firefox 121+, Safari 15.4+
417
+ - **Media queries:** All modern browsers
418
+
419
+ ## Performance Tips
420
+
421
+ Create reusable nav classes:
422
+
423
+ ```css
424
+ .nav-dark {
425
+ --nav-bg: #333;
426
+ --nav-color: white;
427
+ }
428
+
429
+ .nav-compact {
430
+ --nav-padding-inline: 0.5rem;
431
+ --nav-fs: 0.875rem;
432
+ }
433
+ ```
434
+
435
+ ## Migration from Other Systems
436
+
437
+ ### From Tailwind CSS
438
+
439
+ | Tailwind | fpkit Nav |
440
+ | -------------------------------- | -------------------------------------------- |
441
+ | `class="navbar"` | `<nav>` |
442
+ | `class="flex items-center"` | Automatic with `<nav>` |
443
+ | `class="space-x-4"` | `style="--nav-gap: 1rem"` |
444
+ | `class="bg-gray-800 text-white"` | `style="--nav-bg: #333; --nav-color: white"` |
445
+
446
+ ### From Bootstrap
447
+
448
+ | Bootstrap | fpkit Nav |
449
+ | ----------------------------- | -------------------------------------------- |
450
+ | `class="navbar"` | `<nav>` |
451
+ | `class="navbar-nav"` | `<ul>` inside `<nav>` |
452
+ | `class="navbar-dark bg-dark"` | `style="--nav-bg: #333; --nav-color: white"` |
453
+
454
+ ## Related Resources
455
+
456
+ - **React Component** - See README for React Nav component API
457
+ - **MDN: `<nav>` element** -
458
+ https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nav
459
+ - **W3C ARIA: Navigation Landmark** -
460
+ https://www.w3.org/WAI/ARIA/apg/patterns/landmarks/
@@ -10,7 +10,7 @@ import usePopover from '#hooks/popover/use-popover'
10
10
  export type PopoverProps = {
11
11
  children: React.ReactNode
12
12
  popoverTrigger: React.ReactNode
13
- styles?: {}
13
+ styles?: React.CSSProperties
14
14
  }
15
15
 
16
16
  export const defaultStyles = {
@@ -0,0 +1,64 @@
1
+ import { Meta } from "@storybook/addon-docs/blocks";
2
+
3
+ <Meta title="FP.REACT Components/Progress/Styles" />
4
+
5
+ # Progress Bar Styles
6
+
7
+ Native HTML5 progress bar styling with cross-browser support and CSS custom
8
+ properties.
9
+
10
+ ## Overview
11
+
12
+ The fpkit progress system provides styling for native `<progress>` elements with
13
+ vendor-specific pseudo-elements for cross-browser compatibility.
14
+
15
+ ### Key Features
16
+
17
+ - **Native HTML5** - Uses `<progress>` element
18
+ - **Cross-browser support** - Vendor prefix handling
19
+ - **Indeterminate state** - Loading indicator support
20
+ - **CSS custom properties** - Customizable colors and dimensions
21
+ - **Rem-based sizing** - All measurements use rem units (1rem = 16px)
22
+
23
+ ## CSS Custom Properties
24
+
25
+ ```css
26
+ progress {
27
+ --progress-width: 100%;
28
+ --progress-height: 1rem; /* 16px */
29
+ --progress-bg: #cccccc;
30
+ --progress-color: rgb(71, 71, 245);
31
+ --progress-accent-color: var(--progress-color);
32
+ }
33
+ ```
34
+
35
+ ## Basic Usage
36
+
37
+ ### Determinate Progress
38
+
39
+ ```html
40
+ <progress value="70" max="100">70%</progress>
41
+ ```
42
+
43
+ ### Indeterminate (Loading)
44
+
45
+ ```html
46
+ <progress aria-busy="true"></progress>
47
+ ```
48
+
49
+ ## Customization
50
+
51
+ ```html
52
+ <progress
53
+ value="50"
54
+ max="100"
55
+ style="--progress-accent-color: green; --progress-height: 1.5rem"
56
+ >
57
+ 50%
58
+ </progress>
59
+ ```
60
+
61
+ ## Related Resources
62
+
63
+ - **MDN: Progress** -
64
+ https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress