@common-origin/design-system 2.18.0 → 2.20.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 (291) hide show
  1. package/dist/client.js +1122 -785
  2. package/dist/client.js.map +1 -1
  3. package/dist/components/atoms/Avatar/Avatar.d.mts +8 -0
  4. package/dist/components/atoms/Avatar/Avatar.mjs +103 -0
  5. package/dist/components/atoms/Avatar/Avatar.mjs.map +1 -0
  6. package/dist/components/atoms/Avatar/index.d.mts +1 -0
  7. package/dist/components/atoms/Badge/Badge.d.mts +25 -0
  8. package/dist/components/atoms/Badge/Badge.mjs +98 -0
  9. package/dist/components/atoms/Badge/Badge.mjs.map +1 -0
  10. package/dist/components/atoms/Badge/index.d.mts +2 -0
  11. package/dist/components/atoms/Box/Box.d.mts +62 -0
  12. package/dist/components/atoms/Box/Box.mjs +246 -0
  13. package/dist/components/atoms/Box/Box.mjs.map +1 -0
  14. package/dist/components/atoms/Box/index.d.mts +1 -0
  15. package/dist/components/atoms/Button/Button.d.mts +40 -0
  16. package/dist/components/atoms/Button/Button.mjs +208 -0
  17. package/dist/components/atoms/Button/Button.mjs.map +1 -0
  18. package/dist/components/atoms/Button/index.d.mts +1 -0
  19. package/dist/components/atoms/CategoryBadge/CategoryBadge.d.mts +29 -0
  20. package/dist/components/atoms/CategoryBadge/CategoryBadge.mjs +29 -0
  21. package/dist/components/atoms/CategoryBadge/CategoryBadge.mjs.map +1 -0
  22. package/dist/components/atoms/CategoryBadge/index.d.mts +2 -0
  23. package/dist/components/atoms/CategoryLabel/CategoryLabel.d.mts +69 -0
  24. package/dist/components/atoms/CategoryLabel/CategoryLabel.mjs +151 -0
  25. package/dist/components/atoms/CategoryLabel/CategoryLabel.mjs.map +1 -0
  26. package/dist/components/atoms/CategoryLabel/index.d.mts +2 -0
  27. package/dist/components/atoms/Chip/BooleanChip.d.mts +28 -0
  28. package/dist/components/atoms/Chip/BooleanChip.mjs +76 -0
  29. package/dist/components/atoms/Chip/BooleanChip.mjs.map +1 -0
  30. package/dist/components/atoms/Chip/Chip.d.mts +37 -0
  31. package/dist/components/atoms/Chip/Chip.mjs +76 -0
  32. package/dist/components/atoms/Chip/Chip.mjs.map +1 -0
  33. package/dist/components/atoms/Chip/FilterChip.d.mts +13 -0
  34. package/dist/components/atoms/Chip/FilterChip.mjs +14 -0
  35. package/dist/components/atoms/Chip/FilterChip.mjs.map +1 -0
  36. package/dist/components/atoms/Chip/InputChip.d.mts +27 -0
  37. package/dist/components/atoms/Chip/InputChip.mjs +97 -0
  38. package/dist/components/atoms/Chip/InputChip.mjs.map +1 -0
  39. package/dist/components/atoms/Chip/index.d.mts +4 -0
  40. package/dist/components/atoms/Chip/shared/ChipBase.d.mts +12 -0
  41. package/dist/components/atoms/Chip/shared/ChipBase.mjs +45 -0
  42. package/dist/components/atoms/Chip/shared/ChipBase.mjs.map +1 -0
  43. package/dist/components/atoms/Chip/shared/types.d.mts +34 -0
  44. package/dist/components/atoms/Chip/shared/types.d.ts +3 -1
  45. package/dist/components/atoms/Chip/shared/utils.d.mts +10 -0
  46. package/dist/components/atoms/Chip/shared/utils.d.ts +2 -3
  47. package/dist/components/atoms/Chip/shared/utils.mjs +46 -0
  48. package/dist/components/atoms/Chip/shared/utils.mjs.map +1 -0
  49. package/dist/components/atoms/Container/Container.d.mts +6 -0
  50. package/dist/components/atoms/Container/Container.mjs +24 -0
  51. package/dist/components/atoms/Container/Container.mjs.map +1 -0
  52. package/dist/components/atoms/Container/index.d.mts +1 -0
  53. package/dist/components/atoms/DateFormatter/DateFormatter.d.mts +23 -0
  54. package/dist/components/atoms/DateFormatter/DateFormatter.mjs +64 -0
  55. package/dist/components/atoms/DateFormatter/DateFormatter.mjs.map +1 -0
  56. package/dist/components/atoms/DateFormatter/index.d.mts +1 -0
  57. package/dist/components/atoms/Divider/Divider.d.mts +30 -0
  58. package/dist/components/atoms/Divider/Divider.mjs +134 -0
  59. package/dist/components/atoms/Divider/Divider.mjs.map +1 -0
  60. package/dist/components/atoms/Divider/index.d.mts +1 -0
  61. package/dist/components/atoms/Icon/Icon.d.mts +22 -0
  62. package/dist/components/atoms/Icon/Icon.mjs +95 -0
  63. package/dist/components/atoms/Icon/Icon.mjs.map +1 -0
  64. package/dist/components/atoms/Icon/index.d.mts +1 -0
  65. package/dist/components/atoms/IconButton/IconButton.d.mts +14 -0
  66. package/dist/components/atoms/IconButton/IconButton.mjs +150 -0
  67. package/dist/components/atoms/IconButton/IconButton.mjs.map +1 -0
  68. package/dist/components/atoms/IconButton/index.d.mts +1 -0
  69. package/dist/components/atoms/MoneyDisplay/MoneyDisplay.d.mts +26 -0
  70. package/dist/components/atoms/MoneyDisplay/MoneyDisplay.mjs +126 -0
  71. package/dist/components/atoms/MoneyDisplay/MoneyDisplay.mjs.map +1 -0
  72. package/dist/components/atoms/MoneyDisplay/index.d.mts +2 -0
  73. package/dist/components/atoms/Picture/Picture.d.mts +12 -0
  74. package/dist/components/atoms/Picture/Picture.mjs +65 -0
  75. package/dist/components/atoms/Picture/Picture.mjs.map +1 -0
  76. package/dist/components/atoms/Picture/index.d.mts +1 -0
  77. package/dist/components/atoms/ProgressBar/ProgressBar.d.mts +21 -0
  78. package/dist/components/atoms/ProgressBar/ProgressBar.mjs +91 -0
  79. package/dist/components/atoms/ProgressBar/ProgressBar.mjs.map +1 -0
  80. package/dist/components/atoms/ProgressBar/index.d.mts +2 -0
  81. package/dist/components/atoms/Stack/Stack.d.mts +16 -0
  82. package/dist/components/atoms/Stack/Stack.mjs +71 -0
  83. package/dist/components/atoms/Stack/Stack.mjs.map +1 -0
  84. package/dist/components/atoms/Stack/index.d.mts +1 -0
  85. package/dist/components/atoms/StatusBadge/StatusBadge.d.mts +23 -0
  86. package/dist/components/atoms/StatusBadge/StatusBadge.mjs +18 -0
  87. package/dist/components/atoms/StatusBadge/StatusBadge.mjs.map +1 -0
  88. package/dist/components/atoms/StatusBadge/index.d.mts +2 -0
  89. package/dist/components/atoms/StatusLabel/StatusLabel.d.mts +17 -0
  90. package/dist/components/atoms/StatusLabel/StatusLabel.mjs +28 -0
  91. package/dist/components/atoms/StatusLabel/StatusLabel.mjs.map +1 -0
  92. package/dist/components/atoms/StatusLabel/StatusLabelBase.d.mts +49 -0
  93. package/dist/components/atoms/StatusLabel/StatusLabelBase.mjs +161 -0
  94. package/dist/components/atoms/StatusLabel/StatusLabelBase.mjs.map +1 -0
  95. package/dist/components/atoms/StatusLabel/index.d.mts +2 -0
  96. package/dist/components/atoms/Tag/Tag.d.mts +36 -0
  97. package/dist/components/atoms/Tag/Tag.mjs +115 -0
  98. package/dist/components/atoms/Tag/Tag.mjs.map +1 -0
  99. package/dist/components/atoms/Tag/index.d.mts +2 -0
  100. package/dist/components/atoms/Typography/Typography.d.mts +34 -0
  101. package/dist/components/atoms/Typography/Typography.mjs +139 -0
  102. package/dist/components/atoms/Typography/Typography.mjs.map +1 -0
  103. package/dist/components/atoms/Typography/index.d.mts +1 -0
  104. package/dist/components/atoms/index.d.mts +20 -0
  105. package/dist/components/index.d.mts +4 -0
  106. package/dist/components/layout/GridSystem/GridSystem.d.mts +58 -0
  107. package/dist/components/layout/GridSystem/GridSystem.mjs +221 -0
  108. package/dist/components/layout/GridSystem/GridSystem.mjs.map +1 -0
  109. package/dist/components/layout/GridSystem/index.d.mts +1 -0
  110. package/dist/components/layout/index.d.mts +1 -0
  111. package/dist/components/molecules/AccountCard/AccountCard.d.mts +44 -0
  112. package/dist/components/molecules/AccountCard/AccountCard.mjs +191 -0
  113. package/dist/components/molecules/AccountCard/AccountCard.mjs.map +1 -0
  114. package/dist/components/molecules/AccountCard/index.d.mts +2 -0
  115. package/dist/components/molecules/ActionSheet/ActionSheet.d.mts +111 -0
  116. package/dist/components/molecules/ActionSheet/ActionSheet.mjs +283 -0
  117. package/dist/components/molecules/ActionSheet/ActionSheet.mjs.map +1 -0
  118. package/dist/components/molecules/ActionSheet/index.d.mts +2 -0
  119. package/dist/components/molecules/AgentInput/AgentInput.d.mts +30 -0
  120. package/dist/components/molecules/AgentInput/AgentInput.mjs +735 -0
  121. package/dist/components/molecules/AgentInput/AgentInput.mjs.map +1 -0
  122. package/dist/components/molecules/AgentInput/agentInputSpeech.d.mts +43 -0
  123. package/dist/components/molecules/AgentInput/agentInputSpeech.mjs +49 -0
  124. package/dist/components/molecules/AgentInput/agentInputSpeech.mjs.map +1 -0
  125. package/dist/components/molecules/AgentInput/agentInputStateMachine.d.mts +29 -0
  126. package/dist/components/molecules/AgentInput/agentInputStateMachine.mjs +55 -0
  127. package/dist/components/molecules/AgentInput/agentInputStateMachine.mjs.map +1 -0
  128. package/dist/components/molecules/AgentInput/index.d.mts +3 -0
  129. package/dist/components/molecules/Alert/Alert.d.mts +68 -0
  130. package/dist/components/molecules/Alert/Alert.mjs +284 -0
  131. package/dist/components/molecules/Alert/Alert.mjs.map +1 -0
  132. package/dist/components/molecules/Alert/index.d.mts +1 -0
  133. package/dist/components/molecules/Breadcrumbs/Breadcrumbs.d.mts +16 -0
  134. package/dist/components/molecules/Breadcrumbs/Breadcrumbs.mjs +74 -0
  135. package/dist/components/molecules/Breadcrumbs/Breadcrumbs.mjs.map +1 -0
  136. package/dist/components/molecules/Breadcrumbs/index.d.mts +1 -0
  137. package/dist/components/molecules/CardLarge/CardLarge.d.mts +12 -0
  138. package/dist/components/molecules/CardLarge/CardLarge.mjs +75 -0
  139. package/dist/components/molecules/CardLarge/CardLarge.mjs.map +1 -0
  140. package/dist/components/molecules/CardLarge/index.d.mts +1 -0
  141. package/dist/components/molecules/CardSmall/CardSmall.d.mts +16 -0
  142. package/dist/components/molecules/CardSmall/CardSmall.mjs +73 -0
  143. package/dist/components/molecules/CardSmall/CardSmall.mjs.map +1 -0
  144. package/dist/components/molecules/CardSmall/index.d.mts +1 -0
  145. package/dist/components/molecules/Checkbox/Checkbox.d.mts +64 -0
  146. package/dist/components/molecules/Checkbox/Checkbox.mjs +139 -0
  147. package/dist/components/molecules/Checkbox/Checkbox.mjs.map +1 -0
  148. package/dist/components/molecules/Checkbox/SelectableInputBase.d.mts +40 -0
  149. package/dist/components/molecules/Checkbox/SelectableInputBase.mjs +99 -0
  150. package/dist/components/molecules/Checkbox/SelectableInputBase.mjs.map +1 -0
  151. package/dist/components/molecules/Checkbox/index.d.mts +3 -0
  152. package/dist/components/molecules/ChipGroup/ChipGroup.d.mts +7 -0
  153. package/dist/components/molecules/ChipGroup/ChipGroup.mjs +54 -0
  154. package/dist/components/molecules/ChipGroup/ChipGroup.mjs.map +1 -0
  155. package/dist/components/molecules/ChipGroup/index.d.mts +1 -0
  156. package/dist/components/molecules/CodeBlock/CodeBlock.d.mts +46 -0
  157. package/dist/components/molecules/CodeBlock/CodeBlock.mjs +231 -0
  158. package/dist/components/molecules/CodeBlock/CodeBlock.mjs.map +1 -0
  159. package/dist/components/molecules/CodeBlock/index.d.mts +1 -0
  160. package/dist/components/molecules/DateGroup/DateGroup.d.mts +37 -0
  161. package/dist/components/molecules/DateGroup/DateGroup.mjs +104 -0
  162. package/dist/components/molecules/DateGroup/DateGroup.mjs.map +1 -0
  163. package/dist/components/molecules/DateGroup/index.d.mts +2 -0
  164. package/dist/components/molecules/Dropdown/Dropdown.d.mts +27 -0
  165. package/dist/components/molecules/Dropdown/Dropdown.mjs +282 -0
  166. package/dist/components/molecules/Dropdown/Dropdown.mjs.map +1 -0
  167. package/dist/components/molecules/Dropdown/index.d.mts +1 -0
  168. package/dist/components/molecules/EmptyState/EmptyState.d.mts +32 -0
  169. package/dist/components/molecules/EmptyState/EmptyState.mjs +133 -0
  170. package/dist/components/molecules/EmptyState/EmptyState.mjs.map +1 -0
  171. package/dist/components/molecules/EmptyState/index.d.mts +2 -0
  172. package/dist/components/molecules/FeatureBlock/FeatureBlock.d.mts +14 -0
  173. package/dist/components/molecules/FeatureBlock/FeatureBlock.mjs +99 -0
  174. package/dist/components/molecules/FeatureBlock/FeatureBlock.mjs.map +1 -0
  175. package/dist/components/molecules/FeatureBlock/index.d.mts +1 -0
  176. package/dist/components/molecules/InlineAlert/InlineAlert.d.mts +54 -0
  177. package/dist/components/molecules/InlineAlert/InlineAlert.mjs +140 -0
  178. package/dist/components/molecules/InlineAlert/InlineAlert.mjs.map +1 -0
  179. package/dist/components/molecules/InlineAlert/index.d.mts +2 -0
  180. package/dist/components/molecules/List/List.d.mts +30 -0
  181. package/dist/components/molecules/List/List.mjs +45 -0
  182. package/dist/components/molecules/List/List.mjs.map +1 -0
  183. package/dist/components/molecules/List/ListContext.d.mts +6 -0
  184. package/dist/components/molecules/List/ListContext.mjs +11 -0
  185. package/dist/components/molecules/List/ListContext.mjs.map +1 -0
  186. package/dist/components/molecules/List/ListItem.d.mts +101 -0
  187. package/dist/components/molecules/List/ListItem.mjs +224 -0
  188. package/dist/components/molecules/List/ListItem.mjs.map +1 -0
  189. package/dist/components/molecules/List/index.d.mts +4 -0
  190. package/dist/components/molecules/Modal/Modal.d.mts +69 -0
  191. package/dist/components/molecules/Modal/Modal.mjs +259 -0
  192. package/dist/components/molecules/Modal/Modal.mjs.map +1 -0
  193. package/dist/components/molecules/Modal/index.d.mts +2 -0
  194. package/dist/components/molecules/NumberInput/NumberInput.d.mts +86 -0
  195. package/dist/components/molecules/NumberInput/NumberInput.mjs +268 -0
  196. package/dist/components/molecules/NumberInput/NumberInput.mjs.map +1 -0
  197. package/dist/components/molecules/NumberInput/index.d.mts +2 -0
  198. package/dist/components/molecules/PageTitle/PageTitle.d.mts +21 -0
  199. package/dist/components/molecules/PageTitle/PageTitle.mjs +77 -0
  200. package/dist/components/molecules/PageTitle/PageTitle.mjs.map +1 -0
  201. package/dist/components/molecules/PageTitle/index.d.mts +1 -0
  202. package/dist/components/molecules/PasswordField/PasswordField.d.mts +55 -0
  203. package/dist/components/molecules/PasswordField/PasswordField.mjs +146 -0
  204. package/dist/components/molecules/PasswordField/PasswordField.mjs.map +1 -0
  205. package/dist/components/molecules/PasswordField/index.d.mts +2 -0
  206. package/dist/components/molecules/SearchField/SearchField.d.mts +108 -0
  207. package/dist/components/molecules/SearchField/SearchField.mjs +340 -0
  208. package/dist/components/molecules/SearchField/SearchField.mjs.map +1 -0
  209. package/dist/components/molecules/SearchField/index.d.mts +2 -0
  210. package/dist/components/molecules/Sheet/Sheet.d.mts +96 -0
  211. package/dist/components/molecules/Sheet/Sheet.mjs +243 -0
  212. package/dist/components/molecules/Sheet/Sheet.mjs.map +1 -0
  213. package/dist/components/molecules/Sheet/index.d.mts +2 -0
  214. package/dist/components/molecules/Slider/Slider.d.mts +102 -0
  215. package/dist/components/molecules/Slider/Slider.mjs +462 -0
  216. package/dist/components/molecules/Slider/Slider.mjs.map +1 -0
  217. package/dist/components/molecules/Slider/index.d.mts +2 -0
  218. package/dist/components/molecules/TabBar/TabBar.d.mts +82 -0
  219. package/dist/components/molecules/TabBar/TabBar.mjs +213 -0
  220. package/dist/components/molecules/TabBar/TabBar.mjs.map +1 -0
  221. package/dist/components/molecules/TabBar/index.d.mts +2 -0
  222. package/dist/components/molecules/TextField/InputBase.d.mts +22 -0
  223. package/dist/components/molecules/TextField/InputBase.mjs +56 -0
  224. package/dist/components/molecules/TextField/InputBase.mjs.map +1 -0
  225. package/dist/components/molecules/TextField/TextField.d.mts +56 -0
  226. package/dist/components/molecules/TextField/TextField.mjs +115 -0
  227. package/dist/components/molecules/TextField/TextField.mjs.map +1 -0
  228. package/dist/components/molecules/TextField/index.d.mts +4 -0
  229. package/dist/components/molecules/TransactionListItem/TransactionListItem.d.mts +39 -0
  230. package/dist/components/molecules/TransactionListItem/TransactionListItem.mjs +224 -0
  231. package/dist/components/molecules/TransactionListItem/TransactionListItem.mjs.map +1 -0
  232. package/dist/components/molecules/TransactionListItem/index.d.mts +2 -0
  233. package/dist/components/molecules/index.d.mts +26 -0
  234. package/dist/data.js +261 -14
  235. package/dist/data.js.map +1 -1
  236. package/dist/index.d.mts +3 -0
  237. package/dist/index.mjs +55 -0
  238. package/dist/index.mjs.map +1 -0
  239. package/dist/lib/cssTokens.d.mts +14 -0
  240. package/dist/lib/cssTokens.d.ts +14 -0
  241. package/dist/lib/cssTokens.mjs +19 -0
  242. package/dist/lib/cssTokens.mjs.map +1 -0
  243. package/dist/lib/cssVariables.d.mts +15 -0
  244. package/dist/lib/cssVariables.d.ts +15 -0
  245. package/dist/lib/cssVariables.mjs +37 -0
  246. package/dist/lib/cssVariables.mjs.map +1 -0
  247. package/dist/lib/styleUtils.d.mts +42 -0
  248. package/dist/lib/styleUtils.d.ts +23 -0
  249. package/dist/lib/styleUtils.mjs +160 -0
  250. package/dist/lib/styleUtils.mjs.map +1 -0
  251. package/dist/lib/tokenAliases.d.mts +13 -0
  252. package/dist/lib/tokenAliases.d.ts +13 -0
  253. package/dist/lib/tokenAliases.mjs +121 -0
  254. package/dist/lib/tokenAliases.mjs.map +1 -0
  255. package/dist/lib/usePresence.d.mts +16 -0
  256. package/dist/lib/usePresence.mjs +50 -0
  257. package/dist/lib/usePresence.mjs.map +1 -0
  258. package/dist/{data.esm.js → styles/icons.json.mjs} +2 -1219
  259. package/dist/styles/icons.json.mjs.map +1 -0
  260. package/dist/styles/tokens.d.mts +3174 -0
  261. package/dist/styles/tokens.d.ts +3174 -0
  262. package/dist/styles/tokens.json +257 -12
  263. package/dist/{tokens/index.esm.js → styles/tokens.json.mjs} +259 -20
  264. package/dist/{tokens/index.esm.js.map → styles/tokens.json.mjs.map} +1 -1
  265. package/dist/tokens/index.js +261 -14
  266. package/dist/tokens/index.js.map +1 -1
  267. package/dist/tokens/index.mjs +1462 -0
  268. package/dist/tokens/index.mjs.map +1 -0
  269. package/dist/tokens/styles/tokens.d.mts +3174 -0
  270. package/dist/tokens/styles/tokens.d.ts +3174 -0
  271. package/dist/tokens/tokens.d.mts +4 -0
  272. package/dist/tokens/types/tokens.d.mts +6 -0
  273. package/dist/tokens/types/tokens.d.ts +3 -1204
  274. package/dist/tokens.css +710 -430
  275. package/dist/tokens.css.d.mts +4 -0
  276. package/dist/types/icons.d.mts +25 -0
  277. package/dist/types/icons.mjs +10 -0
  278. package/dist/types/icons.mjs.map +1 -0
  279. package/dist/types/index.d.mts +1 -0
  280. package/dist/types/tokens.d.mts +6 -0
  281. package/dist/types/tokens.d.ts +3 -1204
  282. package/dist/types/tokens.mjs +10 -0
  283. package/dist/types/tokens.mjs.map +1 -0
  284. package/dist/vendor/tslib/tslib.es6.mjs +99 -0
  285. package/dist/vendor/tslib/tslib.es6.mjs.map +1 -0
  286. package/package.json +29 -13
  287. package/dist/client.esm.js +0 -7952
  288. package/dist/client.esm.js.map +0 -1
  289. package/dist/data.esm.js.map +0 -1
  290. package/dist/index.esm.js +0 -8
  291. package/dist/index.esm.js.map +0 -1
package/dist/index.mjs ADDED
@@ -0,0 +1,55 @@
1
+ export { Avatar } from './components/atoms/Avatar/Avatar.mjs';
2
+ export { Badge } from './components/atoms/Badge/Badge.mjs';
3
+ export { Box } from './components/atoms/Box/Box.mjs';
4
+ export { Button } from './components/atoms/Button/Button.mjs';
5
+ export { CategoryBadge } from './components/atoms/CategoryBadge/CategoryBadge.mjs';
6
+ export { CategoryLabel } from './components/atoms/CategoryLabel/CategoryLabel.mjs';
7
+ export { Chip, LegacyChip } from './components/atoms/Chip/Chip.mjs';
8
+ export { InputChip } from './components/atoms/Chip/InputChip.mjs';
9
+ export { FilterChip } from './components/atoms/Chip/FilterChip.mjs';
10
+ export { BooleanChip } from './components/atoms/Chip/BooleanChip.mjs';
11
+ export { Container } from './components/atoms/Container/Container.mjs';
12
+ export { Picture } from './components/atoms/Picture/Picture.mjs';
13
+ export { DateFormatter } from './components/atoms/DateFormatter/DateFormatter.mjs';
14
+ export { Icon } from './components/atoms/Icon/Icon.mjs';
15
+ export { IconButton } from './components/atoms/IconButton/IconButton.mjs';
16
+ export { MoneyDisplay } from './components/atoms/MoneyDisplay/MoneyDisplay.mjs';
17
+ export { ProgressBar } from './components/atoms/ProgressBar/ProgressBar.mjs';
18
+ export { Divider } from './components/atoms/Divider/Divider.mjs';
19
+ export { Stack } from './components/atoms/Stack/Stack.mjs';
20
+ export { StatusBadge } from './components/atoms/StatusBadge/StatusBadge.mjs';
21
+ export { StatusLabel } from './components/atoms/StatusLabel/StatusLabel.mjs';
22
+ export { Tag } from './components/atoms/Tag/Tag.mjs';
23
+ export { Typography } from './components/atoms/Typography/Typography.mjs';
24
+ export { AccountCard } from './components/molecules/AccountCard/AccountCard.mjs';
25
+ export { ActionSheet } from './components/molecules/ActionSheet/ActionSheet.mjs';
26
+ export { AgentInput } from './components/molecules/AgentInput/AgentInput.mjs';
27
+ export { Alert } from './components/molecules/Alert/Alert.mjs';
28
+ export { InlineAlert } from './components/molecules/InlineAlert/InlineAlert.mjs';
29
+ export { Breadcrumbs } from './components/molecules/Breadcrumbs/Breadcrumbs.mjs';
30
+ export { CardSmall } from './components/molecules/CardSmall/CardSmall.mjs';
31
+ export { CardLarge } from './components/molecules/CardLarge/CardLarge.mjs';
32
+ export { Checkbox } from './components/molecules/Checkbox/Checkbox.mjs';
33
+ export { ChipGroup } from './components/molecules/ChipGroup/ChipGroup.mjs';
34
+ export { CodeBlock } from './components/molecules/CodeBlock/CodeBlock.mjs';
35
+ export { DateGroup } from './components/molecules/DateGroup/DateGroup.mjs';
36
+ export { EmptyState } from './components/molecules/EmptyState/EmptyState.mjs';
37
+ export { FeatureBlock } from './components/molecules/FeatureBlock/FeatureBlock.mjs';
38
+ export { Dropdown } from './components/molecules/Dropdown/Dropdown.mjs';
39
+ export { List } from './components/molecules/List/List.mjs';
40
+ export { ListItem } from './components/molecules/List/ListItem.mjs';
41
+ export { Modal } from './components/molecules/Modal/Modal.mjs';
42
+ export { NumberInput } from './components/molecules/NumberInput/NumberInput.mjs';
43
+ export { PageTitle } from './components/molecules/PageTitle/PageTitle.mjs';
44
+ export { PasswordField } from './components/molecules/PasswordField/PasswordField.mjs';
45
+ export { SearchField } from './components/molecules/SearchField/SearchField.mjs';
46
+ export { Sheet } from './components/molecules/Sheet/Sheet.mjs';
47
+ export { Slider } from './components/molecules/Slider/Slider.mjs';
48
+ export { TabBar } from './components/molecules/TabBar/TabBar.mjs';
49
+ export { TextField } from './components/molecules/TextField/TextField.mjs';
50
+ export { StyledInputBase, StyledTextAreaBase } from './components/molecules/TextField/InputBase.mjs';
51
+ export { TransactionListItem } from './components/molecules/TransactionListItem/TransactionListItem.mjs';
52
+ export { Grid, GridCol, ResponsiveGrid } from './components/layout/GridSystem/GridSystem.mjs';
53
+ export { tokens } from './types/tokens.mjs';
54
+ export { iconsData } from './types/icons.mjs';
55
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,14 @@
1
+ import type { Tokens } from '../styles/tokens.mjs';
2
+ /**
3
+ * The tokens as components read them (decision 0041): the same shape and type as `tokens.json`,
4
+ * with every value a CSS variable that falls back to the resolved value, so a region can change a
5
+ * token through tokens.css. Breakpoints stay values.
6
+ *
7
+ * Use the resolved values from `tokens.json` instead where a value is read as data rather than
8
+ * CSS, such as a duration parsed for a timer.
9
+ *
10
+ * Jest maps this module to `tokens.json` (jest.config.js), so unit tests assert resolved values;
11
+ * the browser specs check the variables.
12
+ */
13
+ declare const tokens: Tokens;
14
+ export default tokens;
@@ -0,0 +1,14 @@
1
+ import type { Tokens } from '../styles/tokens';
2
+ /**
3
+ * The tokens as components read them (decision 0041): the same shape and type as `tokens.json`,
4
+ * with every value a CSS variable that falls back to the resolved value, so a region can change a
5
+ * token through tokens.css. Breakpoints stay values.
6
+ *
7
+ * Use the resolved values from `tokens.json` instead where a value is read as data rather than
8
+ * CSS, such as a duration parsed for a timer.
9
+ *
10
+ * Jest maps this module to `tokens.json` (jest.config.js), so unit tests assert resolved values;
11
+ * the browser specs check the variables.
12
+ */
13
+ declare const tokens: Tokens;
14
+ export default tokens;
@@ -0,0 +1,19 @@
1
+ 'use client';
2
+ import tokensJson from '../styles/tokens.json.mjs';
3
+ import { withCssVariables } from './cssVariables.mjs';
4
+
5
+ /**
6
+ * The tokens as components read them (decision 0041): the same shape and type as `tokens.json`,
7
+ * with every value a CSS variable that falls back to the resolved value, so a region can change a
8
+ * token through tokens.css. Breakpoints stay values.
9
+ *
10
+ * Use the resolved values from `tokens.json` instead where a value is read as data rather than
11
+ * CSS, such as a duration parsed for a timer.
12
+ *
13
+ * Jest maps this module to `tokens.json` (jest.config.js), so unit tests assert resolved values;
14
+ * the browser specs check the variables.
15
+ */
16
+ var tokens = withCssVariables(tokensJson);
17
+
18
+ export { tokens as default };
19
+ //# sourceMappingURL=cssTokens.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cssTokens.mjs","sources":["../../src/lib/cssTokens.ts"],"sourcesContent":["import tokensJson from '../styles/tokens.json'\nimport type { Tokens } from '../styles/tokens'\nimport { withCssVariables } from './cssVariables'\n\n/**\n * The tokens as components read them (decision 0041): the same shape and type as `tokens.json`,\n * with every value a CSS variable that falls back to the resolved value, so a region can change a\n * token through tokens.css. Breakpoints stay values.\n *\n * Use the resolved values from `tokens.json` instead where a value is read as data rather than\n * CSS, such as a duration parsed for a timer.\n *\n * Jest maps this module to `tokens.json` (jest.config.js), so unit tests assert resolved values;\n * the browser specs check the variables.\n */\nconst tokens: Tokens = withCssVariables(tokensJson as Tokens)\n\nexport default tokens\n"],"names":["tokens","withCssVariables","tokensJson"],"mappings":";;;;AAIA;;;;;;;;;;AAUG;AACH,IAAMA,MAAM,GAAWC,gBAAgB,CAACC,UAAoB;;;;"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The CSS variable tokens.css declares for a token path: Style Dictionary's `name/kebab` with the
3
+ * `co` prefix. `semantic.color.text.default` is `--co-semantic-color-text-default`, and
4
+ * `semantic.border.focusOffset` is `--co-semantic-border-focus-offset`.
5
+ */
6
+ export declare function cssVariableName(path: string[]): string;
7
+ type Tree = {
8
+ [key: string]: string | Tree;
9
+ };
10
+ /**
11
+ * A copy of a token tree with the same shape, where every value reads its CSS variable and falls
12
+ * back to the resolved value: `var(--co-semantic-color-text-default, #212529)`.
13
+ */
14
+ export declare function withCssVariables<T extends Tree>(tree: T, path?: string[]): T;
15
+ export {};
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The CSS variable tokens.css declares for a token path: Style Dictionary's `name/kebab` with the
3
+ * `co` prefix. `semantic.color.text.default` is `--co-semantic-color-text-default`, and
4
+ * `semantic.border.focusOffset` is `--co-semantic-border-focus-offset`.
5
+ */
6
+ export declare function cssVariableName(path: string[]): string;
7
+ type Tree = {
8
+ [key: string]: string | Tree;
9
+ };
10
+ /**
11
+ * A copy of a token tree with the same shape, where every value reads its CSS variable and falls
12
+ * back to the resolved value: `var(--co-semantic-color-text-default, #212529)`.
13
+ */
14
+ export declare function withCssVariables<T extends Tree>(tree: T, path?: string[]): T;
15
+ export {};
@@ -0,0 +1,37 @@
1
+ 'use client';
2
+ import { __spreadArray } from '../vendor/tslib/tslib.es6.mjs';
3
+
4
+ // Components read tokens as CSS variables, with the resolved value as the fallback (decision 0041).
5
+ // A product that loads tokens.css can change a token for a region (a density or motion mode, a
6
+ // theme); one that doesn't renders exactly the resolved values.
7
+ /**
8
+ * The CSS variable tokens.css declares for a token path: Style Dictionary's `name/kebab` with the
9
+ * `co` prefix. `semantic.color.text.default` is `--co-semantic-color-text-default`, and
10
+ * `semantic.border.focusOffset` is `--co-semantic-border-focus-offset`.
11
+ */
12
+ function cssVariableName(path) {
13
+ return "--".concat(__spreadArray(['co'], path, true).join('-').replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase());
14
+ }
15
+ /** Breakpoints stay values: a CSS variable can't be used in a media query */
16
+ var keepsValue = function keepsValue(path) {
17
+ return path[1] === 'breakpoint';
18
+ };
19
+ /**
20
+ * A copy of a token tree with the same shape, where every value reads its CSS variable and falls
21
+ * back to the resolved value: `var(--co-semantic-color-text-default, #212529)`.
22
+ */
23
+ function withCssVariables(tree, path) {
24
+ if (path === void 0) {
25
+ path = [];
26
+ }
27
+ return Object.fromEntries(Object.entries(tree).map(function (_a) {
28
+ var key = _a[0],
29
+ value = _a[1];
30
+ var at = __spreadArray(__spreadArray([], path, true), [key], false);
31
+ if (typeof value !== 'string') return [key, withCssVariables(value, at)];
32
+ return [key, keepsValue(at) ? value : "var(".concat(cssVariableName(at), ", ").concat(value, ")")];
33
+ }));
34
+ }
35
+
36
+ export { cssVariableName, withCssVariables };
37
+ //# sourceMappingURL=cssVariables.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cssVariables.mjs","sources":["../../src/lib/cssVariables.ts"],"sourcesContent":["// Components read tokens as CSS variables, with the resolved value as the fallback (decision 0041).\n// A product that loads tokens.css can change a token for a region (a density or motion mode, a\n// theme); one that doesn't renders exactly the resolved values.\n\n/**\n * The CSS variable tokens.css declares for a token path: Style Dictionary's `name/kebab` with the\n * `co` prefix. `semantic.color.text.default` is `--co-semantic-color-text-default`, and\n * `semantic.border.focusOffset` is `--co-semantic-border-focus-offset`.\n */\nexport function cssVariableName(path: string[]): string {\n return `--${['co', ...path]\n .join('-')\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .toLowerCase()}`\n}\n\n/** Breakpoints stay values: a CSS variable can't be used in a media query */\nconst keepsValue = (path: string[]) => path[1] === 'breakpoint'\n\ntype Tree = { [key: string]: string | Tree }\n\n/**\n * A copy of a token tree with the same shape, where every value reads its CSS variable and falls\n * back to the resolved value: `var(--co-semantic-color-text-default, #212529)`.\n */\nexport function withCssVariables<T extends Tree>(tree: T, path: string[] = []): T {\n return Object.fromEntries(\n Object.entries(tree).map(([key, value]) => {\n const at = [...path, key]\n if (typeof value !== 'string') return [key, withCssVariables(value, at)]\n return [key, keepsValue(at) ? value : `var(${cssVariableName(at)}, ${value})`]\n })\n ) as T\n}\n"],"names":["cssVariableName","path","concat","__spreadArray","join","replace","toLowerCase","keepsValue","withCssVariables","tree","Object","fromEntries","entries","map","_a","key","value","at"],"mappings":";;;AAAA;AACA;AACA;AAEA;;;;AAIG;AAC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AAC,CAAA;AAChF,GAAC,CAAC,CACE,CAAA;AACR;;;;"}
@@ -0,0 +1,42 @@
1
+ export declare const breakpoints: {
2
+ xs: string;
3
+ sm: string;
4
+ md: string;
5
+ lg: string;
6
+ xl: string;
7
+ '2xl': string;
8
+ };
9
+ export declare const media: {
10
+ xs: string;
11
+ sm: string;
12
+ md: string;
13
+ lg: string;
14
+ xl: string;
15
+ '2xl': string;
16
+ };
17
+ export declare const forcedColors = "@media (forced-colors: active)";
18
+ /** A control's edge in forced colours, for a control that shows its edge with a fill alone. The
19
+ * border follows the text colour the browser picks: ButtonText, LinkText, or GrayText when disabled. */
20
+ export declare const forcedColorsEdge: string;
21
+ export declare const reducedMotion = "@media (prefers-reduced-motion: reduce)";
22
+ export declare const exitAnimation: import("styled-components").RuleSet<object>;
23
+ export declare const visuallyHidden: import("styled-components").RuleSet<object>;
24
+ export interface RowState {
25
+ background: string;
26
+ text?: string;
27
+ }
28
+ export declare const rowStates: Record<'unselected' | 'selected', Record<'rest' | 'hover' | 'pressed', RowState>>;
29
+ /**
30
+ * The background (and, when selected, text) of an interactive row in every state.
31
+ * - `focused`: keyboard focus that isn't DOM focus, such as a listbox option under
32
+ * aria-activedescendant. It shows the hover state.
33
+ * - `disabled`: shows the resting state, with no hover or press.
34
+ * - `textSelector`: a descendant to colour when the row's text isn't the row itself, for example
35
+ * text set by Typography. Pass it without `&`.
36
+ */
37
+ export declare const interactiveRow: ({ selected, focused, disabled, textSelector, }?: {
38
+ selected?: boolean;
39
+ focused?: boolean;
40
+ disabled?: boolean;
41
+ textSelector?: string;
42
+ }) => string;
@@ -14,6 +14,29 @@ export declare const media: {
14
14
  xl: string;
15
15
  '2xl': string;
16
16
  };
17
+ export declare const forcedColors = "@media (forced-colors: active)";
18
+ /** A control's edge in forced colours, for a control that shows its edge with a fill alone. The
19
+ * border follows the text colour the browser picks: ButtonText, LinkText, or GrayText when disabled. */
20
+ export declare const forcedColorsEdge: string;
17
21
  export declare const reducedMotion = "@media (prefers-reduced-motion: reduce)";
18
22
  export declare const exitAnimation: import("styled-components").RuleSet<object>;
19
23
  export declare const visuallyHidden: import("styled-components").RuleSet<object>;
24
+ export interface RowState {
25
+ background: string;
26
+ text?: string;
27
+ }
28
+ export declare const rowStates: Record<'unselected' | 'selected', Record<'rest' | 'hover' | 'pressed', RowState>>;
29
+ /**
30
+ * The background (and, when selected, text) of an interactive row in every state.
31
+ * - `focused`: keyboard focus that isn't DOM focus, such as a listbox option under
32
+ * aria-activedescendant. It shows the hover state.
33
+ * - `disabled`: shows the resting state, with no hover or press.
34
+ * - `textSelector`: a descendant to colour when the row's text isn't the row itself, for example
35
+ * text set by Typography. Pass it without `&`.
36
+ */
37
+ export declare const interactiveRow: ({ selected, focused, disabled, textSelector, }?: {
38
+ selected?: boolean;
39
+ focused?: boolean;
40
+ disabled?: boolean;
41
+ textSelector?: string;
42
+ }) => string;
@@ -0,0 +1,160 @@
1
+ 'use client';
2
+ import { __makeTemplateObject } from '../vendor/tslib/tslib.es6.mjs';
3
+ import { keyframes, css } from 'styled-components';
4
+ import tokens from './cssTokens.mjs';
5
+
6
+ // Breakpoints from the semantic tokens (decision 0014)
7
+ var breakpoints = {
8
+ xs: tokens.semantic.breakpoint.xs,
9
+ sm: tokens.semantic.breakpoint.sm,
10
+ md: tokens.semantic.breakpoint.md,
11
+ lg: tokens.semantic.breakpoint.lg,
12
+ xl: tokens.semantic.breakpoint.xl,
13
+ '2xl': tokens.semantic.breakpoint['2xl']
14
+ };
15
+ // Media query helpers
16
+ var media = {
17
+ xs: "@media (min-width: ".concat(breakpoints.xs, ")"),
18
+ sm: "@media (min-width: ".concat(breakpoints.sm, ")"),
19
+ md: "@media (min-width: ".concat(breakpoints.md, ")"),
20
+ lg: "@media (min-width: ".concat(breakpoints.lg, ")"),
21
+ xl: "@media (min-width: ".concat(breakpoints.xl, ")"),
22
+ '2xl': "@media (min-width: ".concat(breakpoints['2xl'], ")")
23
+ };
24
+ // Windows Contrast Themes and other forced-colours modes (decision 0038). The browser swaps in
25
+ // the user's system colours, drops background colours and box-shadows, and keeps borders and
26
+ // outlines. Inside this query, give a control that shows its edge with a fill alone a border,
27
+ // and draw selected and checked states with system colours: ButtonText for control edges,
28
+ // Highlight and HighlightText for selected and checked, GrayText for disabled, CanvasText for
29
+ // content. Use forced-color-adjust: none only on a fill that carries state.
30
+ var forcedColors = '@media (forced-colors: active)';
31
+ /** A control's edge in forced colours, for a control that shows its edge with a fill alone. The
32
+ * border follows the text colour the browser picks: ButtonText, LinkText, or GrayText when disabled. */
33
+ var forcedColorsEdge = "".concat(forcedColors, " {\n border: ").concat(tokens.semantic.border.width.thin, " solid currentColor;\n}");
34
+ // Wrap fallbacks for people who ask for less motion (decision 0005): movement becomes
35
+ // an instant change or a simple fade. Colour and opacity transitions need no fallback.
36
+ var reducedMotion = '@media (prefers-reduced-motion: reduce)';
37
+ // No `from` keyframe: the fade starts from the element's current opacity, including a
38
+ // still-running entrance, so closing mid-entrance doesn't jump back to fully visible.
39
+ var fadeOut = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n to { opacity: 0; }\n"], ["\n to { opacity: 0; }\n"
40
+ // Exit for overlays that unmount (use with usePresence). Append `exitAnimation` to each of
41
+ // the element's `animation` declarations while it exits: the entrance stays in the list,
42
+ // so it isn't restarted, and the fade runs on top of it. A fade is already the
43
+ // reduced-motion form, so it needs no fallback of its own. While it fades, the backdrop
44
+ // still catches clicks (so they can't reach the page behind it) and the panel is inert.
45
+ // Exits accelerate: things leaving speed up as they go (decision 0037).
46
+ ])));
47
+ // Exit for overlays that unmount (use with usePresence). Append `exitAnimation` to each of
48
+ // the element's `animation` declarations while it exits: the entrance stays in the list,
49
+ // so it isn't restarted, and the fade runs on top of it. A fade is already the
50
+ // reduced-motion form, so it needs no fallback of its own. While it fades, the backdrop
51
+ // still catches clicks (so they can't reach the page behind it) and the panel is inert.
52
+ // Exits accelerate: things leaving speed up as they go (decision 0037).
53
+ var exitAnimation = css(templateObject_2 || (templateObject_2 = __makeTemplateObject([", ", " ", " ", " forwards"], [", ", " ", " ", " forwards"
54
+ // Content for screen readers only. The 1px size and -1px margin are part of the standard
55
+ // visually-hidden technique, not design values, so they aren't tokens.
56
+ ])), fadeOut, tokens.semantic.motion.duration.fast, tokens.semantic.motion.easing.accelerate);
57
+ // Content for screen readers only. The 1px size and -1px margin are part of the standard
58
+ // visually-hidden technique, not design values, so they aren't tokens.
59
+ var visuallyHidden = css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n"], ["\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n"
60
+ // One interaction pattern for rows and items: list items, menu and listbox options, sidebars
61
+ // (decision 0030). Unselected rows follow the naked Button's ladder; selected rows follow the
62
+ // light-blue selected ladder, with the text darkening with its fill (decision 0016). Unselected
63
+ // rows leave their text colour to the component, so a destructive row can stay red.
64
+ ])));
65
+ // One interaction pattern for rows and items: list items, menu and listbox options, sidebars
66
+ // (decision 0030). Unselected rows follow the naked Button's ladder; selected rows follow the
67
+ // light-blue selected ladder, with the text darkening with its fill (decision 0016). Unselected
68
+ // rows leave their text colour to the component, so a destructive row can stay red.
69
+ var _a = tokens.semantic.color,
70
+ rowFill = _a.fill,
71
+ rowText = _a.text;
72
+ var rowStates = {
73
+ unselected: {
74
+ rest: {
75
+ background: 'transparent'
76
+ },
77
+ hover: {
78
+ background: rowFill.muted
79
+ },
80
+ pressed: {
81
+ background: rowFill["default"]
82
+ }
83
+ },
84
+ selected: {
85
+ rest: {
86
+ background: rowFill['accent-muted'],
87
+ text: rowText.accent
88
+ },
89
+ hover: {
90
+ background: rowFill['accent-muted-hover'],
91
+ text: rowText['accent-hover']
92
+ },
93
+ pressed: {
94
+ background: rowFill['accent-muted-pressed'],
95
+ text: rowText['accent-pressed']
96
+ }
97
+ }
98
+ };
99
+ var rowDeclarations = function rowDeclarations(_a, textSelector) {
100
+ var background = _a.background,
101
+ text = _a.text;
102
+ if (!text) return "background-color: ".concat(background, ";");
103
+ return textSelector ? "background-color: ".concat(background, ";\n ").concat(textSelector, " { color: ").concat(text, "; }") : "background-color: ".concat(background, ";\n color: ").concat(text, ";");
104
+ };
105
+ /**
106
+ * The background (and, when selected, text) of an interactive row in every state.
107
+ * - `focused`: keyboard focus that isn't DOM focus, such as a listbox option under
108
+ * aria-activedescendant. It shows the hover state.
109
+ * - `disabled`: shows the resting state, with no hover or press.
110
+ * - `textSelector`: a descendant to colour when the row's text isn't the row itself, for example
111
+ * text set by Typography. Pass it without `&`.
112
+ */
113
+ var interactiveRow = function interactiveRow(_a) {
114
+ var _b = _a === void 0 ? {} : _a,
115
+ _c = _b.selected,
116
+ selected = _c === void 0 ? false : _c,
117
+ _d = _b.focused,
118
+ focused = _d === void 0 ? false : _d,
119
+ _e = _b.disabled,
120
+ disabled = _e === void 0 ? false : _e,
121
+ textSelector = _b.textSelector;
122
+ var states = selected ? rowStates.selected : rowStates.unselected;
123
+ if (disabled) return "".concat(rowDeclarations(states.rest, textSelector), "\n").concat(rowForcedColors({
124
+ selected: selected,
125
+ focused: focused,
126
+ disabled: disabled,
127
+ textSelector: textSelector
128
+ }));
129
+ return "\n ".concat(rowDeclarations(focused ? states.hover : states.rest, textSelector), "\n\n &:hover {\n ").concat(rowDeclarations(states.hover, textSelector), "\n }\n\n &:active {\n ").concat(rowDeclarations(states.pressed, textSelector), "\n }\n\n ").concat(rowForcedColors({
130
+ selected: selected,
131
+ focused: focused,
132
+ disabled: disabled,
133
+ textSelector: textSelector
134
+ }), "\n");
135
+ };
136
+ // Rows in forced colours (decision 0038): fills are dropped, so a selected row takes the system
137
+ // selection colours, and a hovered or keyboard-active row is outlined in Highlight.
138
+ var rowForcedColors = function rowForcedColors(_a) {
139
+ var selected = _a.selected,
140
+ focused = _a.focused,
141
+ disabled = _a.disabled,
142
+ textSelector = _a.textSelector;
143
+ var text = function text(color) {
144
+ return textSelector ? "color: ".concat(color, ";\n ").concat(textSelector, " { color: ").concat(color, "; }") : "color: ".concat(color, ";");
145
+ };
146
+ var hover = "outline: ".concat(tokens.semantic.border.width.thin, " solid Highlight;\n outline-offset: calc(-1 * ").concat(tokens.semantic.border.width.thin, ");");
147
+ // A row that doesn't respond (disabled, or not interactive at all) keeps its selection but has
148
+ // no hover outline. Disabled text is the component's to colour: callers also pass this for
149
+ // static rows, which must stay CanvasText.
150
+ // A selected row keeps forced-color-adjust: auto: the browser keeps system colours an author
151
+ // sets, so the row stays Highlight with HighlightText. Its descendants' own colours would be
152
+ // forced to CanvasText, so they inherit HighlightText, and anything drawn with a fill inside
153
+ // (a chip or tag as the row's badge) drops it and keeps its edge. The doubled class outranks
154
+ // the descendants' own rules.
155
+ return "".concat(forcedColors, " {\n ").concat(selected ? "background-color: Highlight;\n ".concat(text('HighlightText'), "\n && * {\n color: inherit;\n background-color: transparent;\n }") : '', "\n ").concat(!disabled && focused ? hover : '', "\n ").concat(disabled ? '' : "&:hover {\n ".concat(hover, "\n }"), "\n }");
156
+ };
157
+ var templateObject_1, templateObject_2, templateObject_3;
158
+
159
+ export { breakpoints, exitAnimation, forcedColors, forcedColorsEdge, interactiveRow, media, reducedMotion, rowStates, visuallyHidden };
160
+ //# sourceMappingURL=styleUtils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styleUtils.mjs","sources":["../../src/lib/styleUtils.ts"],"sourcesContent":["import { css, keyframes } from 'styled-components'\nimport tokens from './cssTokens'\n\n// Breakpoints from the semantic tokens (decision 0014)\nexport const breakpoints = {\n xs: tokens.semantic.breakpoint.xs,\n sm: tokens.semantic.breakpoint.sm,\n md: tokens.semantic.breakpoint.md,\n lg: tokens.semantic.breakpoint.lg,\n xl: tokens.semantic.breakpoint.xl,\n '2xl': tokens.semantic.breakpoint['2xl'],\n}\n\n// Media query helpers\nexport const media = {\n xs: `@media (min-width: ${breakpoints.xs})`,\n sm: `@media (min-width: ${breakpoints.sm})`,\n md: `@media (min-width: ${breakpoints.md})`,\n lg: `@media (min-width: ${breakpoints.lg})`,\n xl: `@media (min-width: ${breakpoints.xl})`,\n '2xl': `@media (min-width: ${breakpoints['2xl']})`,\n}\n\n// Windows Contrast Themes and other forced-colours modes (decision 0038). The browser swaps in\n// the user's system colours, drops background colours and box-shadows, and keeps borders and\n// outlines. Inside this query, give a control that shows its edge with a fill alone a border,\n// and draw selected and checked states with system colours: ButtonText for control edges,\n// Highlight and HighlightText for selected and checked, GrayText for disabled, CanvasText for\n// content. Use forced-color-adjust: none only on a fill that carries state.\nexport const forcedColors = '@media (forced-colors: active)'\n\n/** A control's edge in forced colours, for a control that shows its edge with a fill alone. The\n * border follows the text colour the browser picks: ButtonText, LinkText, or GrayText when disabled. */\nexport const forcedColorsEdge = `${forcedColors} {\n border: ${tokens.semantic.border.width.thin} solid currentColor;\n}`\n\n// Wrap fallbacks for people who ask for less motion (decision 0005): movement becomes\n// an instant change or a simple fade. Colour and opacity transitions need no fallback.\nexport const reducedMotion = '@media (prefers-reduced-motion: reduce)'\n\n// No `from` keyframe: the fade starts from the element's current opacity, including a\n// still-running entrance, so closing mid-entrance doesn't jump back to fully visible.\nconst fadeOut = keyframes`\n to { opacity: 0; }\n`\n\n// Exit for overlays that unmount (use with usePresence). Append `exitAnimation` to each of\n// the element's `animation` declarations while it exits: the entrance stays in the list,\n// so it isn't restarted, and the fade runs on top of it. A fade is already the\n// reduced-motion form, so it needs no fallback of its own. While it fades, the backdrop\n// still catches clicks (so they can't reach the page behind it) and the panel is inert.\n// Exits accelerate: things leaving speed up as they go (decision 0037).\nexport const exitAnimation = css`, ${fadeOut} ${tokens.semantic.motion.duration.fast} ${tokens.semantic.motion.easing.accelerate} forwards`\n\n// Content for screen readers only. The 1px size and -1px margin are part of the standard\n// visually-hidden technique, not design values, so they aren't tokens.\nexport const visuallyHidden = css`\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n`\n\n// One interaction pattern for rows and items: list items, menu and listbox options, sidebars\n// (decision 0030). Unselected rows follow the naked Button's ladder; selected rows follow the\n// light-blue selected ladder, with the text darkening with its fill (decision 0016). Unselected\n// rows leave their text colour to the component, so a destructive row can stay red.\nconst { fill: rowFill, text: rowText } = tokens.semantic.color\n\nexport interface RowState {\n background: string\n text?: string\n}\n\nexport const rowStates: Record<'unselected' | 'selected', Record<'rest' | 'hover' | 'pressed', RowState>> = {\n unselected: {\n rest: { background: 'transparent' },\n hover: { background: rowFill.muted },\n pressed: { background: rowFill.default },\n },\n selected: {\n rest: { background: rowFill['accent-muted'], text: rowText.accent },\n hover: { background: rowFill['accent-muted-hover'], text: rowText['accent-hover'] },\n pressed: { background: rowFill['accent-muted-pressed'], text: rowText['accent-pressed'] },\n },\n}\n\nconst rowDeclarations = ({ background, text }: RowState, textSelector?: string) => {\n if (!text) return `background-color: ${background};`\n return textSelector\n ? `background-color: ${background};\\n ${textSelector} { color: ${text}; }`\n : `background-color: ${background};\\n color: ${text};`\n}\n\n/**\n * The background (and, when selected, text) of an interactive row in every state.\n * - `focused`: keyboard focus that isn't DOM focus, such as a listbox option under\n * aria-activedescendant. It shows the hover state.\n * - `disabled`: shows the resting state, with no hover or press.\n * - `textSelector`: a descendant to colour when the row's text isn't the row itself, for example\n * text set by Typography. Pass it without `&`.\n */\nexport const interactiveRow = ({\n selected = false,\n focused = false,\n disabled = false,\n textSelector,\n}: {\n selected?: boolean\n focused?: boolean\n disabled?: boolean\n textSelector?: string\n} = {}) => {\n const states = selected ? rowStates.selected : rowStates.unselected\n if (disabled) return `${rowDeclarations(states.rest, textSelector)}\\n${rowForcedColors({ selected, focused, disabled, textSelector })}`\n return `\n ${rowDeclarations(focused ? states.hover : states.rest, textSelector)}\n\n &:hover {\n ${rowDeclarations(states.hover, textSelector)}\n }\n\n &:active {\n ${rowDeclarations(states.pressed, textSelector)}\n }\n\n ${rowForcedColors({ selected, focused, disabled, textSelector })}\n`\n}\n\n// Rows in forced colours (decision 0038): fills are dropped, so a selected row takes the system\n// selection colours, and a hovered or keyboard-active row is outlined in Highlight.\nconst rowForcedColors = ({\n selected,\n focused,\n disabled,\n textSelector,\n}: {\n selected: boolean\n focused: boolean\n disabled: boolean\n textSelector?: string\n}) => {\n const text = (color: string) => (textSelector ? `color: ${color};\\n ${textSelector} { color: ${color}; }` : `color: ${color};`)\n const hover = `outline: ${tokens.semantic.border.width.thin} solid Highlight;\\n outline-offset: calc(-1 * ${tokens.semantic.border.width.thin});`\n // A row that doesn't respond (disabled, or not interactive at all) keeps its selection but has\n // no hover outline. Disabled text is the component's to colour: callers also pass this for\n // static rows, which must stay CanvasText.\n // A selected row keeps forced-color-adjust: auto: the browser keeps system colours an author\n // sets, so the row stays Highlight with HighlightText. Its descendants' own colours would be\n // forced to CanvasText, so they inherit HighlightText, and anything drawn with a fill inside\n // (a chip or tag as the row's badge) drops it and keeps its edge. The doubled class outranks\n // the descendants' own rules.\n return `${forcedColors} {\n ${selected ? `background-color: Highlight;\\n ${text('HighlightText')}\\n && * {\\n color: inherit;\\n background-color: transparent;\\n }` : ''}\n ${!disabled && focused ? hover : ''}\n ${disabled ? '' : `&:hover {\\n ${hover}\\n }`}\n }`\n}\n"],"names":["breakpoints","xs","tokens","semantic","breakpoint","sm","md","lg","xl","media","concat","forcedColors","forcedColorsEdge","border","width","thin","reducedMotion","fadeOut","keyframes","templateObject_1","__makeTemplateObject","exitAnimation","css","templateObject_2","motion","duration","fast","easing","accelerate","visuallyHidden","_a","color","rowFill","fill","rowText","text","rowStates","unselected","rest","background","hover","muted","pressed","selected","accent","rowDeclarations","textSelector","interactiveRow","_b","_c","_d","focused","_e","disabled","states","rowForcedColors"],"mappings":";;;;;AAGA;AACO,IAAMA,WAAW,GAAG;AACzBC,EAAAA,EA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Ab,EAAA,CAAAa,QAAA;IACRQ,OAAO,GAAArB,EAAA,CAAAqB,OAAA;IACPE,QAAQ,GAAAvB,EAAA,CAAAuB,QAAA;IACRP,YAAY,GAAAhB,EAAA,CAAAgB,YAAA,CAAA;AAOZ,EAAA,IAAMX,IAAI,GAAG,SAAPA,IAAIA,CAAIJ,KAAa,EAAA;AAAK,IAAA,OAACe,YAAY,GAAG,SAAU,CAAApC,MAAA,CAAAqB,KAAK,EAAU,SAAA,CAAA,CAAArB,MAAA,CAAAoC,YAAY,EAAa,YAAA,CAAA,CAAApC,MAAA,CAAAqB,KAAK,EAAK,KAAA,CAAA,GAAG,SAAU,CAAArB,MAAA,CAAAqB,KAAK,EAAG,GAAA,CAAA,CAAA;GAAC,CAAA;AAClI,EAAA,IAAMS,KAAK,GAAG,WAAY,CAAA9B,MAAA,CAAAR,MAAM,CAACC,QAAQ,CAACU,MAAM,CAACC,KAAK,CAACC,IAAI,EAAsD,qDAAA,CAAA,CAAAL,MAAA,CAAAR,MAAM,CAACC,QAAQ,CAACU,MAAM,CAACC,KAAK,CAACC,IAAI,EAAA,IAAA,CAAI,CAAA;AACtJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,OAAO,UAAGJ,YAAY,EAAA,UAAA,CAAA,CAAAD,MAAA,CAClBiC,QAAQ,GAAG,oCAAqC,CAAAjC,MAAA,CAAAyB,IAAI,CAAC,eAAe,CAAC,qFAAkF,GAAG,EAAE,EAAA,QAAA,CAAA,CAAAzB,MAAA,CAC5J,CAAC2C,QAAQ,IAAIF,OAAO,GAAGX,KAAK,GAAG,EAAE,mBACjCa,QAAQ,GAAG,EAAE,GAAG,2BAAoBb,KAAK,EAAA,SAAA,CAAS,UACpD,CAAA;AACJ,CAAC,CAAA;;;;;"}
@@ -0,0 +1,13 @@
1
+ import type { Tokens } from '../types/tokens.mjs';
2
+ type Semantic = Tokens['semantic'];
3
+ /** Box's spacing props (`p`, `m`, `gap`…): the old layout scale's keys, read from `space`. */
4
+ export declare const spaceByLayoutKey: Record<keyof Semantic['spacing']['layout'], string>;
5
+ /** Box's `borderRadius` prop: the old radius keys, read from `radius`. */
6
+ export declare const radiusByKey: Record<keyof Semantic['border']['radius'], string>;
7
+ /** Box's `bg` prop: the old background keys, read from `surface` and `color.fill`. */
8
+ export declare const backgroundByKey: Record<keyof Semantic['color']['background'], string>;
9
+ /** Box's `color` prop: text colours, old and new keys. */
10
+ export declare const textColorByKey: Record<keyof Semantic['color']['text'], string>;
11
+ /** Box's border props: border colours, old and new keys. */
12
+ export declare const borderColorByKey: Record<keyof Semantic['color']['border'], string>;
13
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { Tokens } from '../types/tokens';
2
+ type Semantic = Tokens['semantic'];
3
+ /** Box's spacing props (`p`, `m`, `gap`…): the old layout scale's keys, read from `space`. */
4
+ export declare const spaceByLayoutKey: Record<keyof Semantic['spacing']['layout'], string>;
5
+ /** Box's `borderRadius` prop: the old radius keys, read from `radius`. */
6
+ export declare const radiusByKey: Record<keyof Semantic['border']['radius'], string>;
7
+ /** Box's `bg` prop: the old background keys, read from `surface` and `color.fill`. */
8
+ export declare const backgroundByKey: Record<keyof Semantic['color']['background'], string>;
9
+ /** Box's `color` prop: text colours, old and new keys. */
10
+ export declare const textColorByKey: Record<keyof Semantic['color']['text'], string>;
11
+ /** Box's border props: border colours, old and new keys. */
12
+ export declare const borderColorByKey: Record<keyof Semantic['color']['border'], string>;
13
+ export {};
@@ -0,0 +1,121 @@
1
+ 'use client';
2
+ import tokens from './cssTokens.mjs';
3
+
4
+ // Props whose values are token keys keep their published vocabulary in 2.x (P7), but read the
5
+ // semantic grammar's names (decision 0031, #189). Each map covers every key the prop type allows,
6
+ // so TypeScript fails here if a key is added without a mapping.
7
+ var semantic = tokens.semantic;
8
+ var color = semantic.color,
9
+ space = semantic.space,
10
+ radius = semantic.radius,
11
+ surface = semantic.surface;
12
+ /** Box's spacing props (`p`, `m`, `gap`…): the old layout scale's keys, read from `space`. */
13
+ var spaceByLayoutKey = {
14
+ none: space[0],
15
+ xs: space[100],
16
+ sm: space[200],
17
+ md: space[300],
18
+ lg: space[400],
19
+ xl: space[500],
20
+ '2xl': space[600],
21
+ '3xl': space[700],
22
+ '4xl': space[800],
23
+ '5xl': space[900],
24
+ '6xl': space[1000],
25
+ '7xl': space[1200],
26
+ '8xl': space[1400],
27
+ '9xl': space[1600],
28
+ '10xl': space[2000],
29
+ '11xl': space[2400],
30
+ // A keyword, not a step: it stays until the keyword question is settled (0031)
31
+ auto: semantic.spacing.layout.auto
32
+ };
33
+ /** Box's `borderRadius` prop: the old radius keys, read from `radius`. */
34
+ var radiusByKey = {
35
+ none: radius.none,
36
+ xs: radius.xs,
37
+ sm: radius.sm,
38
+ md: radius.md,
39
+ lg: radius.lg,
40
+ xl: radius.xl,
41
+ '2xl': radius['2xl'],
42
+ '3xl': radius['3xl'],
43
+ circle: radius.full
44
+ };
45
+ /** Box's `bg` prop: the old background keys, read from `surface` and `color.fill`. */
46
+ var backgroundByKey = {
47
+ "default": surface.base,
48
+ page: surface.base,
49
+ subtle: surface.raised,
50
+ overlay: surface.scrim,
51
+ emphasis: color.fill.emphasis,
52
+ 'emphasis-hover': color.fill['emphasis-hover'],
53
+ 'emphasis-active': color.fill['emphasis-pressed'],
54
+ surface: color.fill.muted,
55
+ inverse: color.fill.inverse,
56
+ interactive: color.fill.accent,
57
+ 'interactive-hover': color.fill['accent-hover'],
58
+ 'interactive-active': color.fill['accent-pressed'],
59
+ 'interactive-subtle': color.fill['accent-muted'],
60
+ 'interactive-subtle-hover': color.fill['accent-muted-hover'],
61
+ 'interactive-subtle-active': color.fill['accent-muted-pressed'],
62
+ error: color.fill.danger,
63
+ 'error-hover': color.fill['danger-hover'],
64
+ 'error-active': color.fill['danger-pressed'],
65
+ 'error-subtle': color.fill['danger-muted'],
66
+ success: color.fill.success,
67
+ 'success-subtle': color.fill['success-muted'],
68
+ warning: color.fill.warning,
69
+ 'warning-subtle': color.fill['warning-muted'],
70
+ disabled: color.fill.disabled,
71
+ neutral: color.fill["default"],
72
+ 'neutral-hover': color.fill['default-hover'],
73
+ 'neutral-active': color.fill['default-pressed'],
74
+ transparent: color.fill.none,
75
+ 'hover-overlay': color.fill['none-hover'],
76
+ 'active-overlay': color.fill['none-pressed'],
77
+ 'inverse-overlay': color.fill['inverse-none-hover'],
78
+ // Moved to the component tier (decision 0031 §6)
79
+ progressTrack: tokens.component.track.background
80
+ };
81
+ /** Box's `color` prop: text colours, old and new keys. */
82
+ var textColorByKey = {
83
+ "default": color.text["default"],
84
+ emphasis: color.text.emphasis,
85
+ inverse: color.text.inverse,
86
+ disabled: color.text.disabled,
87
+ success: color.text.success,
88
+ warning: color.text.warning,
89
+ muted: color.text.muted,
90
+ accent: color.text.accent,
91
+ 'accent-hover': color.text['accent-hover'],
92
+ 'accent-pressed': color.text['accent-pressed'],
93
+ danger: color.text.danger,
94
+ subdued: color.text.muted,
95
+ interactive: color.text.accent,
96
+ 'interactive-hover': color.text['accent-hover'],
97
+ 'interactive-active': color.text['accent-pressed'],
98
+ error: color.text.danger
99
+ };
100
+ /** Box's border props: border colours, old and new keys. */
101
+ var borderColorByKey = {
102
+ "default": color.border["default"],
103
+ success: color.border.success,
104
+ warning: color.border.warning,
105
+ none: color.border.none,
106
+ emphasis: color.border.emphasis,
107
+ input: color.border.input,
108
+ 'input-hover': color.border['input-hover'],
109
+ focus: color.border.focus,
110
+ accent: color.border.accent,
111
+ danger: color.border.danger,
112
+ subtle: color.border.emphasis,
113
+ control: color.border.input,
114
+ // `strong` split by use (0031); as a generic firm outline it is the hovered-input border
115
+ strong: color.border['input-hover'],
116
+ interactive: color.border.accent,
117
+ error: color.border.danger
118
+ };
119
+
120
+ export { backgroundByKey, borderColorByKey, radiusByKey, spaceByLayoutKey, textColorByKey };
121
+ //# sourceMappingURL=tokenAliases.mjs.map