@misoto22/kioku-ui 0.0.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 (397) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +21 -0
  3. package/dist/Alert/Alert.d.ts +7 -0
  4. package/dist/Alert/Alert.doc.d.ts +11 -0
  5. package/dist/Alert/Alert.doc.js +15 -0
  6. package/dist/Alert/Alert.js +149 -0
  7. package/dist/Alert/index.d.ts +1 -0
  8. package/dist/Alert/index.js +2 -0
  9. package/dist/AsyncState/AsyncState.d.ts +30 -0
  10. package/dist/AsyncState/AsyncState.doc.d.ts +16 -0
  11. package/dist/AsyncState/AsyncState.doc.js +16 -0
  12. package/dist/AsyncState/AsyncState.js +36 -0
  13. package/dist/AsyncState/index.d.ts +1 -0
  14. package/dist/AsyncState/index.js +2 -0
  15. package/dist/Badge/Badge.d.ts +10 -0
  16. package/dist/Badge/Badge.doc.d.ts +11 -0
  17. package/dist/Badge/Badge.doc.js +12 -0
  18. package/dist/Badge/Badge.js +58 -0
  19. package/dist/Badge/index.d.ts +1 -0
  20. package/dist/Badge/index.js +2 -0
  21. package/dist/Button/Button.d.ts +18 -0
  22. package/dist/Button/Button.doc.d.ts +11 -0
  23. package/dist/Button/Button.doc.js +18 -0
  24. package/dist/Button/Button.js +151 -0
  25. package/dist/Button/index.d.ts +1 -0
  26. package/dist/Button/index.js +2 -0
  27. package/dist/Card/Card.d.ts +6 -0
  28. package/dist/Card/Card.doc.d.ts +11 -0
  29. package/dist/Card/Card.doc.js +15 -0
  30. package/dist/Card/Card.js +41 -0
  31. package/dist/Card/index.d.ts +1 -0
  32. package/dist/Card/index.js +2 -0
  33. package/dist/CardFooter/CardFooter.d.ts +3 -0
  34. package/dist/CardFooter/CardFooter.doc.d.ts +11 -0
  35. package/dist/CardFooter/CardFooter.doc.js +12 -0
  36. package/dist/CardFooter/CardFooter.js +16 -0
  37. package/dist/CardFooter/index.d.ts +1 -0
  38. package/dist/CardFooter/index.js +2 -0
  39. package/dist/CardHeader/CardHeader.d.ts +3 -0
  40. package/dist/CardHeader/CardHeader.doc.d.ts +11 -0
  41. package/dist/CardHeader/CardHeader.doc.js +12 -0
  42. package/dist/CardHeader/CardHeader.js +16 -0
  43. package/dist/CardHeader/index.d.ts +1 -0
  44. package/dist/CardHeader/index.js +2 -0
  45. package/dist/Center/Center.d.ts +3 -0
  46. package/dist/Center/Center.doc.d.ts +11 -0
  47. package/dist/Center/Center.doc.js +12 -0
  48. package/dist/Center/Center.js +15 -0
  49. package/dist/Center/index.d.ts +1 -0
  50. package/dist/Center/index.js +2 -0
  51. package/dist/Divider/Divider.d.ts +3 -0
  52. package/dist/Divider/Divider.doc.d.ts +11 -0
  53. package/dist/Divider/Divider.doc.js +12 -0
  54. package/dist/Divider/Divider.js +12 -0
  55. package/dist/Divider/index.d.ts +1 -0
  56. package/dist/Divider/index.js +2 -0
  57. package/dist/EmptyState/EmptyState.d.ts +11 -0
  58. package/dist/EmptyState/EmptyState.doc.d.ts +16 -0
  59. package/dist/EmptyState/EmptyState.doc.js +25 -0
  60. package/dist/EmptyState/EmptyState.js +55 -0
  61. package/dist/EmptyState/index.d.ts +1 -0
  62. package/dist/EmptyState/index.js +2 -0
  63. package/dist/Field/Field.d.ts +21 -0
  64. package/dist/Field/Field.doc.d.ts +16 -0
  65. package/dist/Field/Field.doc.js +28 -0
  66. package/dist/Field/Field.js +117 -0
  67. package/dist/Field/index.d.ts +1 -0
  68. package/dist/Field/index.js +2 -0
  69. package/dist/Grid/Grid.d.ts +7 -0
  70. package/dist/Grid/Grid.doc.d.ts +11 -0
  71. package/dist/Grid/Grid.doc.js +15 -0
  72. package/dist/Grid/Grid.js +76 -0
  73. package/dist/Grid/index.d.ts +1 -0
  74. package/dist/Grid/index.js +2 -0
  75. package/dist/Heading/Heading.d.ts +293 -0
  76. package/dist/Heading/Heading.doc.d.ts +16 -0
  77. package/dist/Heading/Heading.doc.js +19 -0
  78. package/dist/Heading/Heading.js +47 -0
  79. package/dist/Heading/index.d.ts +1 -0
  80. package/dist/Heading/index.js +2 -0
  81. package/dist/IconButton/IconButton.d.ts +9 -0
  82. package/dist/IconButton/IconButton.doc.d.ts +16 -0
  83. package/dist/IconButton/IconButton.doc.js +22 -0
  84. package/dist/IconButton/IconButton.js +11 -0
  85. package/dist/IconButton/index.d.ts +1 -0
  86. package/dist/IconButton/index.js +2 -0
  87. package/dist/MetricGrid/MetricGrid.d.ts +10 -0
  88. package/dist/MetricGrid/MetricGrid.doc.d.ts +12 -0
  89. package/dist/MetricGrid/MetricGrid.doc.js +13 -0
  90. package/dist/MetricGrid/MetricGrid.js +37 -0
  91. package/dist/MetricGrid/index.d.ts +1 -0
  92. package/dist/MetricGrid/index.js +2 -0
  93. package/dist/Section/Section.d.ts +6 -0
  94. package/dist/Section/Section.doc.d.ts +11 -0
  95. package/dist/Section/Section.doc.js +12 -0
  96. package/dist/Section/Section.js +49 -0
  97. package/dist/Section/index.d.ts +1 -0
  98. package/dist/Section/index.js +2 -0
  99. package/dist/SegmentedControl/SegmentedControl.d.ts +31 -0
  100. package/dist/SegmentedControl/SegmentedControl.doc.d.ts +16 -0
  101. package/dist/SegmentedControl/SegmentedControl.doc.js +34 -0
  102. package/dist/SegmentedControl/SegmentedControl.js +108 -0
  103. package/dist/SegmentedControl/index.d.ts +1 -0
  104. package/dist/SegmentedControl/index.js +2 -0
  105. package/dist/Skeleton/Skeleton.d.ts +5 -0
  106. package/dist/Skeleton/Skeleton.doc.d.ts +11 -0
  107. package/dist/Skeleton/Skeleton.doc.js +12 -0
  108. package/dist/Skeleton/Skeleton.js +20 -0
  109. package/dist/Skeleton/index.d.ts +1 -0
  110. package/dist/Skeleton/index.js +2 -0
  111. package/dist/Spinner/Spinner.d.ts +6 -0
  112. package/dist/Spinner/Spinner.doc.d.ts +12 -0
  113. package/dist/Spinner/Spinner.doc.js +13 -0
  114. package/dist/Spinner/Spinner.js +25 -0
  115. package/dist/Spinner/index.d.ts +1 -0
  116. package/dist/Spinner/index.js +2 -0
  117. package/dist/Stack/Stack.d.ts +7 -0
  118. package/dist/Stack/Stack.doc.d.ts +11 -0
  119. package/dist/Stack/Stack.doc.js +15 -0
  120. package/dist/Stack/Stack.js +77 -0
  121. package/dist/Stack/index.d.ts +1 -0
  122. package/dist/Stack/index.js +2 -0
  123. package/dist/StatusDot/StatusDot.d.ts +8 -0
  124. package/dist/StatusDot/StatusDot.doc.d.ts +16 -0
  125. package/dist/StatusDot/StatusDot.doc.js +16 -0
  126. package/dist/StatusDot/StatusDot.js +46 -0
  127. package/dist/StatusDot/index.d.ts +1 -0
  128. package/dist/StatusDot/index.js +2 -0
  129. package/dist/Table/Table.d.ts +20 -0
  130. package/dist/Table/Table.doc.d.ts +92 -0
  131. package/dist/Table/Table.doc.js +94 -0
  132. package/dist/Table/Table.js +205 -0
  133. package/dist/Table/index.d.ts +1 -0
  134. package/dist/Table/index.js +2 -0
  135. package/dist/Text/Text.d.ts +7 -0
  136. package/dist/Text/Text.doc.d.ts +11 -0
  137. package/dist/Text/Text.doc.js +15 -0
  138. package/dist/Text/Text.js +50 -0
  139. package/dist/Text/index.d.ts +1 -0
  140. package/dist/Text/index.js +2 -0
  141. package/dist/TextArea/TextArea.d.ts +16 -0
  142. package/dist/TextArea/TextArea.doc.d.ts +11 -0
  143. package/dist/TextArea/TextArea.doc.js +30 -0
  144. package/dist/TextArea/TextArea.js +47 -0
  145. package/dist/TextArea/index.d.ts +1 -0
  146. package/dist/TextArea/index.js +2 -0
  147. package/dist/TextInput/TextInput.d.ts +16 -0
  148. package/dist/TextInput/TextInput.doc.d.ts +11 -0
  149. package/dist/TextInput/TextInput.doc.js +30 -0
  150. package/dist/TextInput/TextInput.js +49 -0
  151. package/dist/TextInput/index.d.ts +1 -0
  152. package/dist/TextInput/index.js +2 -0
  153. package/dist/Toggle/Toggle.d.ts +16 -0
  154. package/dist/Toggle/Toggle.doc.d.ts +11 -0
  155. package/dist/Toggle/Toggle.doc.js +21 -0
  156. package/dist/Toggle/Toggle.js +64 -0
  157. package/dist/Toggle/index.d.ts +1 -0
  158. package/dist/Toggle/index.js +2 -0
  159. package/dist/VisuallyHidden/VisuallyHidden.d.ts +3 -0
  160. package/dist/VisuallyHidden/VisuallyHidden.doc.d.ts +11 -0
  161. package/dist/VisuallyHidden/VisuallyHidden.doc.js +12 -0
  162. package/dist/VisuallyHidden/VisuallyHidden.js +15 -0
  163. package/dist/VisuallyHidden/index.d.ts +1 -0
  164. package/dist/VisuallyHidden/index.js +2 -0
  165. package/dist/authoring.stylex.d.ts +75 -0
  166. package/dist/authoring.stylex.js +77 -0
  167. package/dist/components/Alert.d.ts +7 -0
  168. package/dist/components/Alert.doc.d.ts +11 -0
  169. package/dist/components/Alert.doc.js +15 -0
  170. package/dist/components/Alert.js +149 -0
  171. package/dist/components/AsyncState.d.ts +30 -0
  172. package/dist/components/AsyncState.doc.d.ts +16 -0
  173. package/dist/components/AsyncState.doc.js +16 -0
  174. package/dist/components/AsyncState.js +36 -0
  175. package/dist/components/Badge.d.ts +10 -0
  176. package/dist/components/Badge.doc.d.ts +11 -0
  177. package/dist/components/Badge.doc.js +12 -0
  178. package/dist/components/Badge.js +58 -0
  179. package/dist/components/Button.d.ts +18 -0
  180. package/dist/components/Button.doc.d.ts +11 -0
  181. package/dist/components/Button.doc.js +18 -0
  182. package/dist/components/Button.js +151 -0
  183. package/dist/components/Card.d.ts +6 -0
  184. package/dist/components/Card.doc.d.ts +11 -0
  185. package/dist/components/Card.doc.js +15 -0
  186. package/dist/components/Card.js +41 -0
  187. package/dist/components/CardFooter.d.ts +3 -0
  188. package/dist/components/CardFooter.doc.d.ts +11 -0
  189. package/dist/components/CardFooter.doc.js +12 -0
  190. package/dist/components/CardFooter.js +16 -0
  191. package/dist/components/CardHeader.d.ts +3 -0
  192. package/dist/components/CardHeader.doc.d.ts +11 -0
  193. package/dist/components/CardHeader.doc.js +12 -0
  194. package/dist/components/CardHeader.js +16 -0
  195. package/dist/components/Center.d.ts +3 -0
  196. package/dist/components/Center.doc.d.ts +11 -0
  197. package/dist/components/Center.doc.js +12 -0
  198. package/dist/components/Center.js +15 -0
  199. package/dist/components/Divider.d.ts +3 -0
  200. package/dist/components/Divider.doc.d.ts +11 -0
  201. package/dist/components/Divider.doc.js +12 -0
  202. package/dist/components/Divider.js +12 -0
  203. package/dist/components/EmptyState.d.ts +11 -0
  204. package/dist/components/EmptyState.doc.d.ts +16 -0
  205. package/dist/components/EmptyState.doc.js +25 -0
  206. package/dist/components/EmptyState.js +55 -0
  207. package/dist/components/Field.d.ts +21 -0
  208. package/dist/components/Field.doc.d.ts +16 -0
  209. package/dist/components/Field.doc.js +28 -0
  210. package/dist/components/Field.js +117 -0
  211. package/dist/components/Grid.d.ts +7 -0
  212. package/dist/components/Grid.doc.d.ts +11 -0
  213. package/dist/components/Grid.doc.js +15 -0
  214. package/dist/components/Grid.js +76 -0
  215. package/dist/components/Heading.d.ts +293 -0
  216. package/dist/components/Heading.doc.d.ts +16 -0
  217. package/dist/components/Heading.doc.js +19 -0
  218. package/dist/components/Heading.js +46 -0
  219. package/dist/components/IconButton.d.ts +9 -0
  220. package/dist/components/IconButton.doc.d.ts +16 -0
  221. package/dist/components/IconButton.doc.js +22 -0
  222. package/dist/components/IconButton.js +11 -0
  223. package/dist/components/MetricGrid.d.ts +10 -0
  224. package/dist/components/MetricGrid.doc.d.ts +12 -0
  225. package/dist/components/MetricGrid.doc.js +13 -0
  226. package/dist/components/MetricGrid.js +37 -0
  227. package/dist/components/Section.d.ts +6 -0
  228. package/dist/components/Section.doc.d.ts +11 -0
  229. package/dist/components/Section.doc.js +12 -0
  230. package/dist/components/Section.js +49 -0
  231. package/dist/components/SegmentedControl.d.ts +31 -0
  232. package/dist/components/SegmentedControl.doc.d.ts +16 -0
  233. package/dist/components/SegmentedControl.doc.js +34 -0
  234. package/dist/components/SegmentedControl.js +108 -0
  235. package/dist/components/Skeleton.d.ts +5 -0
  236. package/dist/components/Skeleton.doc.d.ts +11 -0
  237. package/dist/components/Skeleton.doc.js +12 -0
  238. package/dist/components/Skeleton.js +20 -0
  239. package/dist/components/Spinner.d.ts +6 -0
  240. package/dist/components/Spinner.doc.d.ts +12 -0
  241. package/dist/components/Spinner.doc.js +13 -0
  242. package/dist/components/Spinner.js +25 -0
  243. package/dist/components/Stack.d.ts +7 -0
  244. package/dist/components/Stack.doc.d.ts +11 -0
  245. package/dist/components/Stack.doc.js +15 -0
  246. package/dist/components/Stack.js +77 -0
  247. package/dist/components/StatusDot.d.ts +8 -0
  248. package/dist/components/StatusDot.doc.d.ts +16 -0
  249. package/dist/components/StatusDot.doc.js +16 -0
  250. package/dist/components/StatusDot.js +46 -0
  251. package/dist/components/Table.d.ts +20 -0
  252. package/dist/components/Table.doc.d.ts +92 -0
  253. package/dist/components/Table.doc.js +94 -0
  254. package/dist/components/Table.js +205 -0
  255. package/dist/components/Text.d.ts +7 -0
  256. package/dist/components/Text.doc.d.ts +11 -0
  257. package/dist/components/Text.doc.js +15 -0
  258. package/dist/components/Text.js +50 -0
  259. package/dist/components/TextArea.d.ts +16 -0
  260. package/dist/components/TextArea.doc.d.ts +11 -0
  261. package/dist/components/TextArea.doc.js +30 -0
  262. package/dist/components/TextArea.js +47 -0
  263. package/dist/components/TextInput.d.ts +16 -0
  264. package/dist/components/TextInput.doc.d.ts +11 -0
  265. package/dist/components/TextInput.doc.js +30 -0
  266. package/dist/components/TextInput.js +49 -0
  267. package/dist/components/Toggle.d.ts +16 -0
  268. package/dist/components/Toggle.doc.d.ts +11 -0
  269. package/dist/components/Toggle.doc.js +21 -0
  270. package/dist/components/Toggle.js +64 -0
  271. package/dist/components/VisuallyHidden.d.ts +3 -0
  272. package/dist/components/VisuallyHidden.doc.d.ts +11 -0
  273. package/dist/components/VisuallyHidden.doc.js +12 -0
  274. package/dist/components/VisuallyHidden.js +15 -0
  275. package/dist/components/index.d.ts +27 -0
  276. package/dist/components/index.js +28 -0
  277. package/dist/docs/index.d.ts +33 -0
  278. package/dist/docs/index.js +33 -0
  279. package/dist/docs/types.d.ts +15 -0
  280. package/dist/docs/types.js +25 -0
  281. package/dist/index.d.ts +31 -0
  282. package/dist/index.js +32 -0
  283. package/dist/navigation/LinkProvider.d.ts +9 -0
  284. package/dist/navigation/LinkProvider.doc.d.ts +27 -0
  285. package/dist/navigation/LinkProvider.doc.js +27 -0
  286. package/dist/navigation/LinkProvider.js +22 -0
  287. package/dist/navigation/index.d.ts +1 -0
  288. package/dist/navigation/index.js +2 -0
  289. package/dist/styles/global.stylex.d.ts +20 -0
  290. package/dist/styles/global.stylex.js +22 -0
  291. package/dist/styles/index.css +14 -0
  292. package/dist/styles/reset.css +35 -0
  293. package/dist/styles/stylex.css +212 -0
  294. package/dist/theme/Theme.d.ts +24 -0
  295. package/dist/theme/Theme.doc.d.ts +16 -0
  296. package/dist/theme/Theme.doc.js +27 -0
  297. package/dist/theme/Theme.js +110 -0
  298. package/dist/theme/index.d.ts +2 -0
  299. package/dist/theme/index.js +2 -0
  300. package/dist/tokens/contracts.d.ts +140 -0
  301. package/dist/tokens/contracts.js +102 -0
  302. package/package.json +93 -0
  303. package/src/Alert/Alert.doc.ts +21 -0
  304. package/src/Alert/Alert.tsx +129 -0
  305. package/src/Alert/index.ts +1 -0
  306. package/src/AsyncState/AsyncState.doc.ts +21 -0
  307. package/src/AsyncState/AsyncState.tsx +75 -0
  308. package/src/AsyncState/index.ts +5 -0
  309. package/src/Badge/Badge.doc.ts +15 -0
  310. package/src/Badge/Badge.tsx +58 -0
  311. package/src/Badge/index.ts +6 -0
  312. package/src/Button/Button.doc.ts +17 -0
  313. package/src/Button/Button.tsx +176 -0
  314. package/src/Button/index.ts +7 -0
  315. package/src/Card/Card.doc.ts +22 -0
  316. package/src/Card/Card.tsx +44 -0
  317. package/src/Card/index.ts +1 -0
  318. package/src/CardFooter/CardFooter.doc.ts +12 -0
  319. package/src/CardFooter/CardFooter.tsx +27 -0
  320. package/src/CardFooter/index.ts +1 -0
  321. package/src/CardHeader/CardHeader.doc.ts +12 -0
  322. package/src/CardHeader/CardHeader.tsx +27 -0
  323. package/src/CardHeader/index.ts +1 -0
  324. package/src/Center/Center.doc.ts +12 -0
  325. package/src/Center/Center.tsx +20 -0
  326. package/src/Center/index.ts +1 -0
  327. package/src/Divider/Divider.doc.ts +12 -0
  328. package/src/Divider/Divider.tsx +20 -0
  329. package/src/Divider/index.ts +1 -0
  330. package/src/EmptyState/EmptyState.doc.ts +31 -0
  331. package/src/EmptyState/EmptyState.tsx +87 -0
  332. package/src/EmptyState/index.ts +6 -0
  333. package/src/Field/Field.doc.ts +34 -0
  334. package/src/Field/Field.tsx +126 -0
  335. package/src/Field/index.ts +6 -0
  336. package/src/Grid/Grid.doc.ts +16 -0
  337. package/src/Grid/Grid.tsx +54 -0
  338. package/src/Grid/index.ts +1 -0
  339. package/src/Heading/Heading.doc.ts +26 -0
  340. package/src/Heading/Heading.tsx +48 -0
  341. package/src/Heading/index.ts +1 -0
  342. package/src/IconButton/IconButton.doc.ts +24 -0
  343. package/src/IconButton/IconButton.tsx +18 -0
  344. package/src/IconButton/index.ts +1 -0
  345. package/src/MetricGrid/MetricGrid.doc.ts +19 -0
  346. package/src/MetricGrid/MetricGrid.tsx +72 -0
  347. package/src/MetricGrid/index.ts +5 -0
  348. package/src/Section/Section.doc.ts +12 -0
  349. package/src/Section/Section.tsx +38 -0
  350. package/src/Section/index.ts +1 -0
  351. package/src/SegmentedControl/SegmentedControl.doc.ts +51 -0
  352. package/src/SegmentedControl/SegmentedControl.tsx +238 -0
  353. package/src/SegmentedControl/index.ts +5 -0
  354. package/src/Skeleton/Skeleton.doc.ts +15 -0
  355. package/src/Skeleton/Skeleton.tsx +45 -0
  356. package/src/Skeleton/index.ts +1 -0
  357. package/src/Spinner/Spinner.doc.ts +19 -0
  358. package/src/Spinner/Spinner.tsx +47 -0
  359. package/src/Spinner/index.ts +1 -0
  360. package/src/Stack/Stack.doc.ts +13 -0
  361. package/src/Stack/Stack.tsx +57 -0
  362. package/src/Stack/index.ts +1 -0
  363. package/src/StatusDot/StatusDot.doc.ts +23 -0
  364. package/src/StatusDot/StatusDot.tsx +35 -0
  365. package/src/StatusDot/index.ts +1 -0
  366. package/src/Table/Table.doc.ts +104 -0
  367. package/src/Table/Table.tsx +222 -0
  368. package/src/Table/index.ts +18 -0
  369. package/src/Text/Text.doc.ts +17 -0
  370. package/src/Text/Text.tsx +43 -0
  371. package/src/Text/index.ts +1 -0
  372. package/src/TextArea/TextArea.doc.ts +43 -0
  373. package/src/TextArea/TextArea.tsx +119 -0
  374. package/src/TextArea/index.ts +1 -0
  375. package/src/TextInput/TextInput.doc.ts +43 -0
  376. package/src/TextInput/TextInput.tsx +122 -0
  377. package/src/TextInput/index.ts +1 -0
  378. package/src/Toggle/Toggle.doc.ts +30 -0
  379. package/src/Toggle/Toggle.tsx +139 -0
  380. package/src/Toggle/index.ts +1 -0
  381. package/src/VisuallyHidden/VisuallyHidden.doc.ts +18 -0
  382. package/src/VisuallyHidden/VisuallyHidden.tsx +28 -0
  383. package/src/VisuallyHidden/index.ts +1 -0
  384. package/src/authoring.stylex.ts +76 -0
  385. package/src/docs/index.ts +122 -0
  386. package/src/docs/types.ts +51 -0
  387. package/src/index.ts +102 -0
  388. package/src/navigation/LinkProvider.doc.ts +32 -0
  389. package/src/navigation/LinkProvider.tsx +32 -0
  390. package/src/navigation/index.ts +7 -0
  391. package/src/styles/global.stylex.ts +23 -0
  392. package/src/styles/index.css +14 -0
  393. package/src/styles/reset.css +35 -0
  394. package/src/theme/Theme.doc.ts +38 -0
  395. package/src/theme/Theme.tsx +195 -0
  396. package/src/theme/index.ts +9 -0
  397. package/src/tokens/contracts.ts +210 -0
@@ -0,0 +1,27 @@
1
+ import "../styles/stylex.css";
2
+ export const linkDoc = {
3
+ name: 'Link',
4
+ description: 'Renders a native anchor or delegates navigation to the nearest LinkProvider.',
5
+ props: [{
6
+ name: 'href',
7
+ description: 'Sets the navigation destination.'
8
+ }],
9
+ inheritedProps: ['AnchorHTMLAttributes<HTMLAnchorElement>'],
10
+ example: '<Link href="/records">Records</Link>',
11
+ storyId: 'core-link--default'
12
+ };
13
+ export const linkProviderDoc = {
14
+ name: 'LinkProvider',
15
+ description: 'Supplies an optional host-router renderer to descendant Link components.',
16
+ props: [{
17
+ name: 'children',
18
+ description: 'Supplies links that share the host navigation adapter.',
19
+ required: true
20
+ }, {
21
+ name: 'renderLink',
22
+ description: 'Renders links through the host application router.'
23
+ }],
24
+ inheritedProps: ['No inherited DOM attributes'],
25
+ example: '<LinkProvider renderLink={renderLink}><Link href="/records">Records</Link></LinkProvider>',
26
+ storyId: 'core-link-provider--default'
27
+ };
@@ -0,0 +1,22 @@
1
+ import { createContext, useContext } from 'react';
2
+ import "../styles/stylex.css";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ const LinkContext = createContext(undefined);
5
+ export function LinkProvider({
6
+ children,
7
+ renderLink
8
+ }) {
9
+ return /*#__PURE__*/_jsx(LinkContext, {
10
+ value: renderLink,
11
+ children: children
12
+ });
13
+ }
14
+ export function Link(props) {
15
+ const renderLink = useContext(LinkContext);
16
+ if (renderLink) {
17
+ return renderLink(props);
18
+ }
19
+ return /*#__PURE__*/_jsx("a", {
20
+ ...props
21
+ });
22
+ }
@@ -0,0 +1 @@
1
+ export { Link, LinkProvider, type LinkProps, type LinkProviderProps, type LinkRenderer, } from './LinkProvider.js';
@@ -0,0 +1,2 @@
1
+ import "../styles/stylex.css";
2
+ export { Link, LinkProvider } from './LinkProvider.js';
@@ -0,0 +1,20 @@
1
+ import * as stylex from '@stylexjs/stylex';
2
+ export declare const globalStyles: Readonly<{
3
+ readonly document: Readonly<{
4
+ readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
5
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
6
+ readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
7
+ readonly fontFeatureSettings: stylex.StyleXClassNameFor<"fontFeatureSettings", string>;
8
+ readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
9
+ readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
10
+ readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
11
+ }>;
12
+ readonly focusRing: Readonly<{
13
+ readonly ':focus-visible': stylex.StyleXClassNameFor<":focus-visible", {
14
+ readonly outlineColor: stylex.StyleXVar<string>;
15
+ readonly outlineOffset: stylex.StyleXVar<string>;
16
+ readonly outlineStyle: stylex.StyleXVar<string>;
17
+ readonly outlineWidth: stylex.StyleXVar<string>;
18
+ }>;
19
+ }>;
20
+ }>;
@@ -0,0 +1,22 @@
1
+ import * as stylex from '@stylexjs/stylex';
2
+ import { semanticTokens } from '../authoring.stylex.js';
3
+ import "./stylex.css";
4
+ export const globalStyles = {
5
+ document: {
6
+ kWkggS: "x1r2uulk",
7
+ kMwMTN: "x1y4yzzg",
8
+ kMv6JI: "xj0sio9",
9
+ kV0H8L: "xkcvkkb",
10
+ kGuDYH: "x1ti3rys",
11
+ k63SB2: "x1jcbhmk",
12
+ kLWn49: "x1ezks3f",
13
+ $$css: true
14
+ },
15
+ focusRing: {
16
+ kZs9gx: "x15meki4",
17
+ kiEn40: "xz32tfx",
18
+ k7shQP: "x1p22nma",
19
+ kPJHz1: "x17lds6u",
20
+ $$css: true
21
+ }
22
+ };
@@ -0,0 +1,14 @@
1
+ /* Lowest to highest priority: browser normalization, StyleX rules, global accessibility. */
2
+ @layer kioku-ui.reset, kioku-ui.stylex, kioku-ui.global;
3
+
4
+ @import './reset.css' layer(kioku-ui.reset);
5
+ @import './stylex.css' layer(kioku-ui.stylex);
6
+
7
+ @layer kioku-ui.global {
8
+ :focus-visible {
9
+ outline-color: var(--kioku-ui-color-focus);
10
+ outline-offset: var(--kioku-ui-focus-offset);
11
+ outline-style: var(--kioku-ui-border-style);
12
+ outline-width: var(--kioku-ui-focus-width);
13
+ }
14
+ }
@@ -0,0 +1,35 @@
1
+ *,
2
+ *::before,
3
+ *::after {
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ html {
8
+ -webkit-text-size-adjust: 100%;
9
+ text-size-adjust: 100%;
10
+ }
11
+
12
+ body {
13
+ min-height: 100%;
14
+ margin: 0;
15
+ font-family: inherit;
16
+ }
17
+
18
+ button,
19
+ input,
20
+ select,
21
+ textarea {
22
+ color: inherit;
23
+ font: inherit;
24
+ }
25
+
26
+ @media (prefers-reduced-motion: reduce) {
27
+ *,
28
+ *::before,
29
+ *::after {
30
+ scroll-behavior: auto !important;
31
+ animation-duration: 0.01ms !important;
32
+ animation-iteration-count: 1 !important;
33
+ transition-duration: 0.01ms !important;
34
+ }
35
+ }
@@ -0,0 +1,212 @@
1
+ @keyframes x1vfr86i-B{50%{background-color:var(--xu8qooe);}}
2
+ @keyframes x1fy8ia8-B{to{transform:rotate(360deg);}}
3
+ :root, .xrmadwz{--x1cq72ri:var(--kioku-ui-color-canvas);--xu8qooe:var(--kioku-ui-color-surface);--x14rudx0:var(--kioku-ui-color-surface-raised);--x194ig0k:var(--kioku-ui-color-surface-muted);--xfrcqq4:var(--kioku-ui-color-text);--x1de802z:var(--kioku-ui-color-text-secondary);--x1f22vz5:var(--kioku-ui-color-text-muted);--x1vmxqsc:var(--kioku-ui-color-text-on-accent);--x1bh700q:var(--kioku-ui-color-accent);--xa1h56u:var(--kioku-ui-color-accent-hover);--x3l7v5j:var(--kioku-ui-color-accent-active);--x1cxqvb6:var(--kioku-ui-color-overlay-hover);--x3mkrpc:var(--kioku-ui-color-overlay-active);--xfp4pro:var(--kioku-ui-color-disabled-surface);--x1cuz3ib:var(--kioku-ui-color-disabled-text);--x1doqpnu:var(--kioku-ui-color-focus);--xwf0as5:var(--kioku-ui-border-default);--x53p1qr:var(--kioku-ui-border-strong);--x113cbwm:var(--kioku-ui-border-interactive);--xfiqpwe:var(--kioku-ui-border-disabled);--xft28wq:var(--kioku-ui-border-width);--xeq3ive:var(--kioku-ui-border-style);--x1qb8v80:var(--kioku-ui-status-info-surface);--xm1gjpn:var(--kioku-ui-status-info-text);--xfs9e5l:var(--kioku-ui-status-success-surface);--xaqiz8e:var(--kioku-ui-status-success-text);--x10bscj6:var(--kioku-ui-status-warning-surface);--x18s4tcb:var(--kioku-ui-status-warning-text);--x9bkl3k:var(--kioku-ui-status-danger-surface);--xjxbi6p:var(--kioku-ui-status-danger-text);--xpsq03c:var(--kioku-ui-focus-width);--x1jr7oj0:var(--kioku-ui-focus-offset);--x1sq5zos:var(--kioku-ui-typography-font-family-body);--x1rfpocb:var(--kioku-ui-typography-font-family-heading);--xbiefh2:var(--kioku-ui-typography-font-family-display);--xxh3pa3:var(--kioku-ui-typography-font-family-mono);--x170l7ej:var(--kioku-ui-typography-font-feature-settings);--x1wkgbgz:var(--kioku-ui-typography-font-size-xs);--x1pipkt8:var(--kioku-ui-typography-font-size-sm);--xdc39sg:var(--kioku-ui-typography-font-size-md);--xkv0k7x:var(--kioku-ui-typography-font-size-lg);--x1wok735:var(--kioku-ui-typography-font-size-xl);--x1kkm6dc:var(--kioku-ui-typography-font-size2xl);--xtz9r7k:var(--kioku-ui-typography-font-weight-regular);--xuivm6y:var(--kioku-ui-typography-font-weight-medium);--x49sa2c:var(--kioku-ui-typography-font-weight-strong);--x13wxxvu:var(--kioku-ui-typography-line-height-body);--x11tbmtr:var(--kioku-ui-typography-line-height-heading);--xdjikt8:var(--kioku-ui-spacing-xs);--x5vtqbe:var(--kioku-ui-spacing-sm);--xpochg2:var(--kioku-ui-spacing-md);--xkgi81h:var(--kioku-ui-spacing-lg);--x3fz2am:var(--kioku-ui-spacing-xl);--x1xp2mai:var(--kioku-ui-spacing-2xl);--x1l7xjh:var(--kioku-ui-radius-inner);--x1g2gpfl:var(--kioku-ui-radius-element);--xucgv7m:var(--kioku-ui-radius-container);--xhhn8oy:var(--kioku-ui-radius-page);--xhr22cf:var(--kioku-ui-radius-full);--x8vzgg0:var(--kioku-ui-size-control-sm);--x2kaybk:var(--kioku-ui-size-control-md);--xtcwerp:var(--kioku-ui-size-control-lg);--x690rjz:var(--kioku-ui-size-hit-target);--xw7f8gl:var(--kioku-ui-elevation-low);--x1036efz:var(--kioku-ui-elevation-medium);--x1loblyq:var(--kioku-ui-elevation-high);--xp593nr:var(--kioku-ui-texture-grain);--x1hxkyqf:var(--kioku-ui-motion-duration-fast);--x10so70s:var(--kioku-ui-motion-duration-moderate);--x1db3u3v:var(--kioku-ui-motion-duration-slow);--x1sojct7:var(--kioku-ui-motion-easing-standard);--x149jslo:var(--kioku-ui-motion-easing-emphasized);}
4
+ .xkdpibf:not(#\#){margin:-1px}
5
+ .x1ghz6dp:not(#\#){margin:0}
6
+ .x1wib74s:not(#\#){padding:var(--x1xp2mai)}
7
+ .x167l562:not(#\#){padding:var(--x3fz2am)}
8
+ .x1tkv3ku:not(#\#){padding:var(--xdjikt8)}
9
+ .x1cfciu7:not(#\#){padding:var(--xkgi81h)}
10
+ .x14rluyd:not(#\#){padding:var(--xpochg2)}
11
+ .x9r1u3d:not(#\#):not(#\#){border-color:transparent}
12
+ .xkfpxyo:not(#\#):not(#\#){border-color:var(--x18s4tcb)}
13
+ .x2nywlj:not(#\#):not(#\#){border-color:var(--x194ig0k)}
14
+ .x10ghty7:not(#\#):not(#\#){border-color:var(--x1bh700q)}
15
+ .x1wxkff4:not(#\#):not(#\#){border-color:var(--x53p1qr)}
16
+ .x86rt86:not(#\#):not(#\#){border-color:var(--xaqiz8e)}
17
+ .x1lnk2a9:not(#\#):not(#\#){border-color:var(--xfiqpwe)}
18
+ .xcf5wgx:not(#\#):not(#\#){border-color:var(--xjxbi6p)}
19
+ .x124ze02:not(#\#):not(#\#){border-color:var(--xm1gjpn)}
20
+ .xilcjya:not(#\#):not(#\#){border-color:var(--xwf0as5)}
21
+ .x8kq9my:not(#\#):not(#\#){border-radius:var(--x1g2gpfl)}
22
+ .x1l6hjkl:not(#\#):not(#\#){border-radius:var(--x1l7xjh)}
23
+ .xnpwncj:not(#\#):not(#\#){border-radius:var(--xhr22cf)}
24
+ .x7xrhi9:not(#\#):not(#\#){border-radius:var(--xucgv7m)}
25
+ .xng3xce:not(#\#):not(#\#){border-style:none}
26
+ .x1jnjmdy:not(#\#):not(#\#){border-style:var(--xeq3ive)}
27
+ .xpxnlqs:not(#\#):not(#\#){border-width:var(--xft28wq)}
28
+ .x98rzlu:not(#\#):not(#\#){flex:1}
29
+ .xl3vxp:not(#\#):not(#\#){gap:var(--x1xp2mai)}
30
+ .x1ws3dqe:not(#\#):not(#\#){gap:var(--x3fz2am)}
31
+ .x1ap6kct:not(#\#):not(#\#){gap:var(--x5vtqbe)}
32
+ .x1iwn5ga:not(#\#):not(#\#){gap:var(--xdjikt8)}
33
+ .x4nws80:not(#\#):not(#\#){gap:var(--xkgi81h)}
34
+ .xtl099x:not(#\#):not(#\#){gap:var(--xpochg2)}
35
+ .x1suer1w:not(#\#):not(#\#){margin-inline:calc(-1 * var(--x3fz2am))}
36
+ .xb3r6kr:not(#\#):not(#\#){overflow:hidden}
37
+ .x3x1fh3:not(#\#):not(#\#){padding-block:var(--x1xp2mai)}
38
+ .x18wayz0:not(#\#):not(#\#){padding-block:var(--x3fz2am)}
39
+ .xoeao9w:not(#\#):not(#\#){padding-block:var(--x5vtqbe)}
40
+ .x10y07nz:not(#\#):not(#\#){padding-block:var(--xdjikt8)}
41
+ .x17uk85o:not(#\#):not(#\#){padding-block:var(--xkgi81h)}
42
+ .x1lr58ck:not(#\#):not(#\#){padding-block:var(--xpochg2)}
43
+ .xnjsko4:not(#\#):not(#\#){padding-inline:0}
44
+ .x92ksv2:not(#\#):not(#\#){padding-inline:var(--x3fz2am)}
45
+ .x1qtbwip:not(#\#):not(#\#){padding-inline:var(--x5vtqbe)}
46
+ .xov5yc9:not(#\#):not(#\#){padding-inline:var(--xdjikt8)}
47
+ .x1q83fih:not(#\#):not(#\#){padding-inline:var(--xkgi81h)}
48
+ .x1wkw8jr:not(#\#):not(#\#){padding-inline:var(--xpochg2)}
49
+ .x1be0cy8:hover:not(:disabled):not(:active):not(#\#):not(#\#){border-color:var(--x113cbwm)}
50
+ .x1u44if6:active:not(:disabled):not(#\#):not(#\#){border-color:var(--x113cbwm)}
51
+ .xn50xp2:focus-visible:not(#\#):not(#\#){border-color:var(--x113cbwm)}
52
+ .xyo1xaz:hover:not(:disabled):not(:read-only):not(:focus-visible):not(#\#):not(#\#){border-color:var(--x113cbwm)}
53
+ .x6v1che:active:not(:disabled):not(#\#):not(#\#){border-color:var(--x3l7v5j)}
54
+ .xnhf8v:active:not(:disabled):not(:read-only):not(:focus-visible):not(#\#):not(#\#){border-color:var(--x3l7v5j)}
55
+ .xx21tl2:hover:not(:disabled):not(:active):not(#\#):not(#\#){border-color:var(--xa1h56u)}
56
+ .x1r1toob:hover:not(:disabled):not(:read-only):not(:focus-visible):not(#\#):not(#\#){border-color:var(--xjxbi6p)}
57
+ .x1v4z90s:focus-visible:not(#\#):not(#\#){border-color:var(--xjxbi6p)}
58
+ .xgozkua:active:not(:disabled):not(:read-only):not(:focus-visible):not(#\#):not(#\#){border-color:var(--xjxbi6p)}
59
+ .x1oulntk:disabled:not(#\#):not(#\#){border-color:var(--xfiqpwe)}
60
+ .x1pha0wt:not(#\#):not(#\#):not(#\#){align-items:baseline}
61
+ .x6s0dn4:not(#\#):not(#\#):not(#\#){align-items:center}
62
+ .xuk3077:not(#\#):not(#\#):not(#\#){align-items:flex-end}
63
+ .x1cy8zhl:not(#\#):not(#\#):not(#\#){align-items:flex-start}
64
+ .x1qjc9v5:not(#\#):not(#\#):not(#\#){align-items:stretch}
65
+ .xpz12be:not(#\#):not(#\#):not(#\#){animation-direction:alternate}
66
+ .xslpo9u:not(#\#):not(#\#):not(#\#){animation-duration:var(--x1db3u3v)}
67
+ .xa4qsjk:not(#\#):not(#\#):not(#\#){animation-iteration-count:infinite}
68
+ .xpedhrg:not(#\#):not(#\#):not(#\#){animation-name:x1fy8ia8-B}
69
+ .x125lowv:not(#\#):not(#\#):not(#\#){animation-name:x1vfr86i-B}
70
+ .xsus3lq:not(#\#):not(#\#):not(#\#){animation-timing-function:var(--x1sojct7)}
71
+ .xjbqb8w:not(#\#):not(#\#):not(#\#){background-color:transparent}
72
+ .xqpqlc7:not(#\#):not(#\#):not(#\#){background-color:var(--x10bscj6)}
73
+ .x40o0ze:not(#\#):not(#\#):not(#\#){background-color:var(--x14rudx0)}
74
+ .xe2mao8:not(#\#):not(#\#):not(#\#){background-color:var(--x18s4tcb)}
75
+ .xavu78a:not(#\#):not(#\#):not(#\#){background-color:var(--x194ig0k)}
76
+ .x1j40q36:not(#\#):not(#\#):not(#\#){background-color:var(--x1bh700q)}
77
+ .x1r2uulk:not(#\#):not(#\#):not(#\#){background-color:var(--x1cq72ri)}
78
+ .xsq02lv:not(#\#):not(#\#):not(#\#){background-color:var(--x1cuz3ib)}
79
+ .x1760qql:not(#\#):not(#\#):not(#\#){background-color:var(--x1qb8v80)}
80
+ .x12uiudv:not(#\#):not(#\#):not(#\#){background-color:var(--x9bkl3k)}
81
+ .x1sm82us:not(#\#):not(#\#):not(#\#){background-color:var(--xaqiz8e)}
82
+ .x19blmh3:not(#\#):not(#\#):not(#\#){background-color:var(--xfp4pro)}
83
+ .xjdu3ya:not(#\#):not(#\#):not(#\#){background-color:var(--xfs9e5l)}
84
+ .xpqgouk:not(#\#):not(#\#):not(#\#){background-color:var(--xjxbi6p)}
85
+ .x18i8t7:not(#\#):not(#\#):not(#\#){background-color:var(--xm1gjpn)}
86
+ .x1ixvsy6:not(#\#):not(#\#):not(#\#){background-color:var(--xu8qooe)}
87
+ .x1mwwwfo:not(#\#):not(#\#):not(#\#){border-collapse:collapse}
88
+ .x1gnnqk1:not(#\#):not(#\#):not(#\#){box-shadow:none}
89
+ .x165nt33:not(#\#):not(#\#):not(#\#){box-shadow:var(--x1036efz)}
90
+ .x1elh21b:not(#\#):not(#\#):not(#\#){box-shadow:var(--xw7f8gl)}
91
+ .x9f619:not(#\#):not(#\#):not(#\#){box-sizing:border-box}
92
+ .x1hyvwdk:not(#\#):not(#\#):not(#\#){clip-path:inset(50%)}
93
+ .xeh89do:not(#\#):not(#\#):not(#\#){clip:rect(0 0 0 0)}
94
+ .x6rqny5:not(#\#):not(#\#):not(#\#){color:var(--x18s4tcb)}
95
+ .x17y7oyd:not(#\#):not(#\#):not(#\#){color:var(--x1de802z)}
96
+ .x1mgtvnk:not(#\#):not(#\#):not(#\#){color:var(--x1f22vz5)}
97
+ .x8ect3v:not(#\#):not(#\#):not(#\#){color:var(--x1vmxqsc)}
98
+ .xw2tli:not(#\#):not(#\#):not(#\#){color:var(--xaqiz8e)}
99
+ .x1y4yzzg:not(#\#):not(#\#):not(#\#){color:var(--xfrcqq4)}
100
+ .x8bm3zx:not(#\#):not(#\#):not(#\#){color:var(--xjxbi6p)}
101
+ .x1ursi0k:not(#\#):not(#\#):not(#\#){color:var(--xm1gjpn)}
102
+ .x19v85br:not(#\#):not(#\#):not(#\#){cursor:progress}
103
+ .x78zum5:not(#\#):not(#\#):not(#\#){display:flex}
104
+ .xrvj5dj:not(#\#):not(#\#):not(#\#){display:grid}
105
+ .x1rg5ohu:not(#\#):not(#\#):not(#\#){display:inline-block}
106
+ .x3nfvp2:not(#\#):not(#\#):not(#\#){display:inline-flex}
107
+ .xdt5ytf:not(#\#):not(#\#):not(#\#){flex-direction:column}
108
+ .x2lah0s:not(#\#):not(#\#):not(#\#){flex-shrink:0}
109
+ .x69it5h:not(#\#):not(#\#):not(#\#){font-family:var(--x1rfpocb)}
110
+ .xj0sio9:not(#\#):not(#\#):not(#\#){font-family:var(--x1sq5zos)}
111
+ .x13fdfvb:not(#\#):not(#\#):not(#\#){font-family:var(--xbiefh2)}
112
+ .xkcvkkb:not(#\#):not(#\#):not(#\#){font-feature-settings:var(--x170l7ej)}
113
+ .x18wzw5v:not(#\#):not(#\#):not(#\#){font-size:var(--x1kkm6dc)}
114
+ .xltg2ad:not(#\#):not(#\#):not(#\#){font-size:var(--x1pipkt8)}
115
+ .xnlz8j1:not(#\#):not(#\#):not(#\#){font-size:var(--x1wkgbgz)}
116
+ .xfuxfq0:not(#\#):not(#\#):not(#\#){font-size:var(--x1wok735)}
117
+ .x1ti3rys:not(#\#):not(#\#):not(#\#){font-size:var(--xdc39sg)}
118
+ .x1fkw5ar:not(#\#):not(#\#):not(#\#){font-size:var(--xkv0k7x)}
119
+ .x1it3fuk:not(#\#):not(#\#):not(#\#){font-synthesis:none}
120
+ .x1sa4947:not(#\#):not(#\#):not(#\#){font-weight:var(--x49sa2c)}
121
+ .x1jcbhmk:not(#\#):not(#\#):not(#\#){font-weight:var(--xtz9r7k)}
122
+ .x1m30uz7:not(#\#):not(#\#):not(#\#){font-weight:var(--xuivm6y)}
123
+ .x11klgcs:not(#\#):not(#\#):not(#\#){grid-template-columns:repeat(1,minmax(0,1fr))}
124
+ .xnby9oq:not(#\#):not(#\#):not(#\#){grid-template-columns:repeat(2,minmax(0,1fr))}
125
+ .x185a7wo:not(#\#):not(#\#):not(#\#){grid-template-columns:repeat(3,minmax(0,1fr))}
126
+ .x1sipb5g:not(#\#):not(#\#):not(#\#){grid-template-columns:repeat(4,minmax(0,1fr))}
127
+ .x1tyajke:not(#\#):not(#\#):not(#\#){grid-template-columns:repeat(auto-fit,minmax(min(100%,calc(var(--x1xp2mai) + var(--x1xp2mai) + var(--x1xp2mai) + var(--x1xp2mai) + var(--x1xp2mai) + var(--x1xp2mai) + var(--x1xp2mai) + var(--x1xp2mai))),1fr))}
128
+ .xl56j7k:not(#\#):not(#\#):not(#\#){justify-content:center}
129
+ .x13a6bvl:not(#\#):not(#\#):not(#\#){justify-content:flex-end}
130
+ .x1nhvcw1:not(#\#):not(#\#):not(#\#){justify-content:flex-start}
131
+ .x1qughib:not(#\#):not(#\#):not(#\#){justify-content:space-between}
132
+ .x1vslzj6:not(#\#):not(#\#):not(#\#){line-height:var(--x11tbmtr)}
133
+ .x1ezks3f:not(#\#):not(#\#):not(#\#){line-height:var(--x13wxxvu)}
134
+ .x10l6tqk:not(#\#):not(#\#):not(#\#){position:absolute}
135
+ .x1n2onr6:not(#\#):not(#\#):not(#\#){position:relative}
136
+ .x2b8uid:not(#\#):not(#\#):not(#\#){text-align:center}
137
+ .x1yc453h:not(#\#):not(#\#):not(#\#){text-align:start}
138
+ .x1elc2ff:not(#\#):not(#\#):not(#\#){transition-duration:var(--x1hxkyqf)}
139
+ .x15406qy:not(#\#):not(#\#):not(#\#){transition-property:background-color}
140
+ .xxjumz:not(#\#):not(#\#):not(#\#){transition-timing-function:var(--x1sojct7)}
141
+ .xuxw1ft:not(#\#):not(#\#):not(#\#){white-space:nowrap}
142
+ .x12y31ib:focus-within:not(:active):not(#\#):not(#\#):not(#\#){background-color:var(--x1cxqvb6)}
143
+ .x1975ut4:hover:not(:disabled):not(:active):not(#\#):not(#\#):not(#\#){background-color:var(--x1cxqvb6)}
144
+ .x1ipqx2d:hover:not(:disabled):not(#\#):not(#\#):not(#\#){background-color:var(--x1cxqvb6)}
145
+ .xx3trin:hover:not(:active):not(#\#):not(#\#):not(#\#){background-color:var(--x1cxqvb6)}
146
+ .xzpaccd:active:not(:disabled):not(#\#):not(#\#):not(#\#){background-color:var(--x3l7v5j)}
147
+ .xbo0ryh:active:not(:disabled):not(#\#):not(#\#):not(#\#){background-color:var(--x3mkrpc)}
148
+ .xahjstz:hover:not(:disabled):not(:active):not(#\#):not(#\#):not(#\#){background-color:var(--xa1h56u)}
149
+ .xszm2ej:hover:not(:disabled):not(#\#):not(#\#):not(#\#){background-image:linear-gradient(var(--x1cxqvb6),var(--x1cxqvb6))}
150
+ .xuc1b5w:hover:not(:disabled):not(:active):not(#\#):not(#\#):not(#\#){background-image:linear-gradient(var(--x1cxqvb6),var(--x1cxqvb6))}
151
+ .x1pg383a:active:not(:disabled):not(#\#):not(#\#):not(#\#){background-image:linear-gradient(var(--x3mkrpc),var(--x3mkrpc))}
152
+ .x17bc2d0:not(:last-child):not(#\#):not(#\#):not(#\#){border-inline-end-color:var(--xwf0as5)}
153
+ .x1f0nvx8:not(:last-child):not(#\#):not(#\#):not(#\#){border-inline-end-style:var(--xeq3ive)}
154
+ .x86nh4x:not(:last-child):not(#\#):not(#\#):not(#\#){border-inline-end-width:var(--xft28wq)}
155
+ .x15meki4:focus-visible:not(#\#):not(#\#):not(#\#){outline-color:var(--x1doqpnu)}
156
+ .xz32tfx:focus-visible:not(#\#):not(#\#):not(#\#){outline-offset:var(--x1jr7oj0)}
157
+ .x1p22nma:focus-visible:not(#\#):not(#\#):not(#\#){outline-style:var(--xeq3ive)}
158
+ .x17lds6u:focus-visible:not(#\#):not(#\#):not(#\#){outline-width:var(--xpsq03c)}
159
+ .x48zea8:disabled:not(#\#):not(#\#):not(#\#){background-color:var(--xfp4pro)}
160
+ .x609gy3:disabled:not(#\#):not(#\#):not(#\#){color:var(--x1cuz3ib)}
161
+ .x15nsxps:active:not(#\#):not(#\#):not(#\#){background-color:var(--x3mkrpc)}
162
+ @media (prefers-reduced-motion: reduce){.x1aquc0h.x1aquc0h:not(#\#):not(#\#):not(#\#){animation-name:none}}
163
+ .x1k3hjl9:not(#\#):not(#\#):not(#\#):not(#\#){border-bottom-color:var(--xwf0as5)}
164
+ .x1w5tod1:not(#\#):not(#\#):not(#\#):not(#\#){border-bottom-style:var(--xeq3ive)}
165
+ .xeq6m5c:not(#\#):not(#\#):not(#\#):not(#\#){border-bottom-width:var(--xft28wq)}
166
+ .x11a5md6:not(#\#):not(#\#):not(#\#):not(#\#){border-top-color:var(--x1bh700q)}
167
+ .x1pe616k:not(#\#):not(#\#):not(#\#):not(#\#){border-top-color:var(--xwf0as5)}
168
+ .x4tqos1:not(#\#):not(#\#):not(#\#):not(#\#){border-top-style:var(--xeq3ive)}
169
+ .xlyo07a:not(#\#):not(#\#):not(#\#):not(#\#){border-top-width:var(--xft28wq)}
170
+ .xjm9jq1:not(#\#):not(#\#):not(#\#):not(#\#){height:1px}
171
+ .xr8hsnb:not(#\#):not(#\#):not(#\#):not(#\#){height:var(--x2kaybk)}
172
+ .x1ieyhmn:not(#\#):not(#\#):not(#\#):not(#\#){height:var(--x5vtqbe)}
173
+ .x1vbl8lt:not(#\#):not(#\#):not(#\#):not(#\#){height:var(--x8vzgg0)}
174
+ .x7s8d8b:not(#\#):not(#\#):not(#\#):not(#\#){height:var(--xkgi81h)}
175
+ .x1t7hrd4:not(#\#):not(#\#):not(#\#):not(#\#){height:var(--xpochg2)}
176
+ .xscltuj:not(#\#):not(#\#):not(#\#):not(#\#){height:var(--xtcwerp)}
177
+ .x1yc2x4e:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:calc(-1 * var(--x3fz2am))}
178
+ .x5845i8:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:var(--x3fz2am)}
179
+ .x1sx9ztw:not(#\#):not(#\#):not(#\#):not(#\#){margin-top:calc(-1 * var(--x3fz2am))}
180
+ .x19a07bp:not(#\#):not(#\#):not(#\#):not(#\#){margin-top:var(--x3fz2am)}
181
+ .x6wfg6j:not(#\#):not(#\#):not(#\#):not(#\#){max-width:calc(var(--x1xp2mai) + var(--x1xp2mai) + var(--x1xp2mai) + var(--x1xp2mai) + var(--x1xp2mai) + var(--x1xp2mai) + var(--x1xp2mai) + var(--x1xp2mai) + var(--x1xp2mai) + var(--x1xp2mai))}
182
+ .x1edz59j:not(#\#):not(#\#):not(#\#):not(#\#){min-height:96px}
183
+ .xmm8wyw:not(#\#):not(#\#):not(#\#):not(#\#){min-height:var(--x2kaybk)}
184
+ .xq5j1ye:not(#\#):not(#\#):not(#\#):not(#\#){min-height:var(--x690rjz)}
185
+ .xeuugli:not(#\#):not(#\#):not(#\#):not(#\#){min-width:0}
186
+ .x16d7gm3:not(#\#):not(#\#):not(#\#):not(#\#){min-width:var(--x690rjz)}
187
+ .xh8yej3:not(#\#):not(#\#):not(#\#):not(#\#){width:100%}
188
+ .x1i1rx1s:not(#\#):not(#\#):not(#\#):not(#\#){width:1px}
189
+ .x4ml2zf:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--x2kaybk)}
190
+ .x1rcf1qu:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--x5vtqbe)}
191
+ .x9mi25i:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--x8vzgg0)}
192
+ .x1psh5v9:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--xkgi81h)}
193
+ .x1af11ui:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--xpochg2)}
194
+ .x1089um4:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--xtcwerp)}
195
+ .xrrqrn:not(:last-child):not(#\#):not(#\#):not(#\#):not(#\#){border-bottom-color:var(--xwf0as5)}
196
+ .xub24xa:not(:last-child):not(#\#):not(#\#):not(#\#):not(#\#){border-bottom-style:var(--xeq3ive)}
197
+ .xbg14n3:not(:last-child):not(#\#):not(#\#):not(#\#):not(#\#){border-bottom-width:var(--xft28wq)}
198
+ .xarstr8:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{inset:0}
199
+ .xz4fk4o:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{background-color:var(--xp593nr)}
200
+ .x1e4qbc8:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::placeholder{color:var(--x1f22vz5)}
201
+ .x1cpjm7i:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{content:""}
202
+ .x1s928wv:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{content:""}
203
+ .xfbisj7:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{inset-inline-start:50%}
204
+ .x74lcen:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E")}
205
+ .x2q1x1w:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{pointer-events:none}
206
+ .x1hmns74:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{position:absolute}
207
+ .x1j6awrg:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{position:absolute}
208
+ .xbnewub:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{transform:translate(-50%,-50%)}
209
+ .xitxdhh:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{z-index:1}
210
+ .x17f96yv:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{height:var(--x690rjz)}
211
+ .x1knuo7r:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{top:50%}
212
+ .x1o8qpxl:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{width:var(--x690rjz)}
@@ -0,0 +1,24 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type ThemeDefinition } from '../tokens/contracts.js';
3
+ export type Density = 'compact' | 'standard';
4
+ export interface ThemePersistence {
5
+ read(): string | undefined;
6
+ write(themeId: string): void;
7
+ readDensity?(): string | undefined;
8
+ writeDensity?(density: Density): void;
9
+ }
10
+ export interface ThemeProviderProps {
11
+ readonly children: ReactNode;
12
+ readonly defaultDensity?: Density;
13
+ readonly defaultThemeId: string;
14
+ readonly persistence?: ThemePersistence;
15
+ readonly themes: readonly ThemeDefinition[];
16
+ }
17
+ export interface ThemeContextValue {
18
+ readonly density: Density;
19
+ readonly setDensity: (density: Density) => void;
20
+ readonly setThemeId: (themeId: string) => void;
21
+ readonly theme: ThemeDefinition;
22
+ }
23
+ export declare function ThemeProvider({ children, defaultDensity, defaultThemeId, persistence, themes, }: ThemeProviderProps): import("react").JSX.Element;
24
+ export declare function useTheme(): ThemeContextValue;
@@ -0,0 +1,16 @@
1
+ export declare const themeProviderDoc: {
2
+ name: string;
3
+ description: string;
4
+ props: ({
5
+ name: string;
6
+ description: string;
7
+ required: true;
8
+ } | {
9
+ name: string;
10
+ description: string;
11
+ required?: undefined;
12
+ })[];
13
+ inheritedProps: string[];
14
+ example: string;
15
+ storyId: string;
16
+ };
@@ -0,0 +1,27 @@
1
+ import "../styles/stylex.css";
2
+ export const themeProviderDoc = {
3
+ name: 'ThemeProvider',
4
+ description: 'Applies one validated theme definition and exposes theme selection to descendants.',
5
+ props: [{
6
+ name: 'children',
7
+ description: 'Supplies the themed application subtree.',
8
+ required: true
9
+ }, {
10
+ name: 'defaultDensity',
11
+ description: 'Selects the initial spatial scale when persistence has no value.'
12
+ }, {
13
+ name: 'defaultThemeId',
14
+ description: 'Selects the initial theme when persistence has no value.',
15
+ required: true
16
+ }, {
17
+ name: 'persistence',
18
+ description: 'Reads and writes the selected theme through a host adapter.'
19
+ }, {
20
+ name: 'themes',
21
+ description: 'Supplies the complete set of valid theme definitions.',
22
+ required: true
23
+ }],
24
+ inheritedProps: ['No inherited DOM attributes'],
25
+ example: '<ThemeProvider defaultThemeId={hostDefaultThemeId} themes={hostThemes}>...</ThemeProvider>',
26
+ storyId: 'core-theme-provider--default'
27
+ };
@@ -0,0 +1,110 @@
1
+ import * as stylex from '@stylexjs/stylex';
2
+ import { createContext, useCallback, useContext, useMemo, useState } from 'react';
3
+ import { tokenCustomProperties, tokenNames, validateThemeDefinition } from '../tokens/contracts.js';
4
+ import { semanticTokens } from '../authoring.stylex.js';
5
+
6
+ /*
7
+ * Grain. Paper is never flat, and a flat fill is the strongest tell that a
8
+ * surface was generated rather than made. Drawn with feTurbulence, so nothing
9
+ * is fetched and nothing is stored, and masked rather than blended so the
10
+ * speckle takes the theme's own ink instead of a grey wash. A theme that wants
11
+ * none makes the colour transparent and pays nothing else.
12
+ *
13
+ * It sits above the content, where a printed texture sits. The stacking step
14
+ * is 1 rather than a nine-thousand, so a host's own layers still out-rank it.
15
+ */
16
+ import "../styles/stylex.css";
17
+ import { jsx as _jsx } from "react/jsx-runtime";
18
+ const grainMask = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E\")";
19
+ // StyleX emits semantic-token bridge variables for this generated scope. The
20
+ // host theme values live on ThemeProvider, so the scope must live there too.
21
+ const semanticTokenScopeClass = semanticTokens.__varGroupHash__;
22
+ const densities = ['compact', 'standard'];
23
+
24
+ // A theme pack fulfills the token contract twice, once per density. Density is
25
+ // therefore a root attribute rather than a token value: the pack's CSS decides
26
+ // what each step measures, and the library only says which one is selected.
27
+
28
+ const ThemeContext = createContext(undefined);
29
+ function validateThemes(themes) {
30
+ const themeIds = new Set();
31
+ for (const theme of themes) {
32
+ if (themeIds.has(theme.id)) {
33
+ throw new Error(`Duplicate theme ID: ${theme.id}`);
34
+ }
35
+ themeIds.add(theme.id);
36
+ const missingTokens = validateThemeDefinition(theme);
37
+ if (missingTokens.length > 0) {
38
+ throw new Error(`Theme "${theme.id}" is missing token roles: ${missingTokens.join(', ')}`);
39
+ }
40
+ }
41
+ }
42
+ function requiredDensity(density, fallback) {
43
+ return densities.includes(density) ? density : fallback;
44
+ }
45
+ function requiredTheme(themes, themeId) {
46
+ const theme = themes.find(({
47
+ id
48
+ }) => id === themeId);
49
+ if (!theme) {
50
+ throw new Error(`Unknown theme ID: ${themeId}`);
51
+ }
52
+ return theme;
53
+ }
54
+ function themeStyle(theme) {
55
+ return Object.fromEntries(tokenNames.map(tokenName => [tokenCustomProperties[tokenName], theme.tokens[tokenName]]));
56
+ }
57
+ export function ThemeProvider({
58
+ children,
59
+ defaultDensity = 'compact',
60
+ defaultThemeId,
61
+ persistence,
62
+ themes
63
+ }) {
64
+ validateThemes(themes);
65
+ const [themeId, setCurrentThemeId] = useState(() => persistence?.read() ?? defaultThemeId);
66
+ const theme = requiredTheme(themes, themeId);
67
+ const setThemeId = useCallback(nextThemeId => {
68
+ requiredTheme(themes, nextThemeId);
69
+ persistence?.write(nextThemeId);
70
+ setCurrentThemeId(nextThemeId);
71
+ }, [persistence, themes]);
72
+ const [density, setCurrentDensity] = useState(() => requiredDensity(persistence?.readDensity?.(), defaultDensity));
73
+ const setDensity = useCallback(nextDensity => {
74
+ const resolved = requiredDensity(nextDensity, defaultDensity);
75
+ persistence?.writeDensity?.(resolved);
76
+ setCurrentDensity(resolved);
77
+ }, [defaultDensity, persistence]);
78
+ const value = useMemo(() => ({
79
+ density,
80
+ setDensity,
81
+ setThemeId,
82
+ theme
83
+ }), [density, setDensity, setThemeId, theme]);
84
+ const {
85
+ className,
86
+ style
87
+ } = {
88
+ className: "xkcvkkb x1n2onr6 xz4fk4o x1s928wv xarstr8 x74lcen x2q1x1w x1j6awrg xitxdhh"
89
+ };
90
+ return /*#__PURE__*/_jsx(ThemeContext, {
91
+ value: value,
92
+ children: /*#__PURE__*/_jsx("div", {
93
+ className: [semanticTokenScopeClass, className].filter(Boolean).join(' '),
94
+ "data-density": density,
95
+ "data-theme": theme.id,
96
+ style: {
97
+ ...style,
98
+ ...themeStyle(theme)
99
+ },
100
+ children: children
101
+ })
102
+ });
103
+ }
104
+ export function useTheme() {
105
+ const theme = useContext(ThemeContext);
106
+ if (!theme) {
107
+ throw new Error('useTheme must be used within a ThemeProvider');
108
+ }
109
+ return theme;
110
+ }
@@ -0,0 +1,2 @@
1
+ export { ThemeProvider, useTheme, type Density, type ThemeContextValue, type ThemePersistence, type ThemeProviderProps, } from './Theme.js';
2
+ export type { ThemeDefinition } from '../tokens/contracts.js';
@@ -0,0 +1,2 @@
1
+ import "../styles/stylex.css";
2
+ export { ThemeProvider, useTheme } from './Theme.js';