@namroodinc/liquid-editorial 0.0.0-stage → 0.1.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 (354) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +67 -2
  3. package/dist/chunks/Icon-CGY1FNXT.js +77 -0
  4. package/dist/chunks/Icon-CGY1FNXT.js.map +1 -0
  5. package/dist/chunks/Icon-CWsA1W83.cjs +2 -0
  6. package/dist/chunks/Icon-CWsA1W83.cjs.map +1 -0
  7. package/dist/components/AssetGrid/index.cjs +2 -0
  8. package/dist/components/AssetGrid/index.cjs.map +1 -0
  9. package/dist/components/AssetGrid/index.d.cts +54 -0
  10. package/dist/components/AssetGrid/index.d.cts.map +1 -0
  11. package/dist/components/AssetGrid/index.d.ts +54 -0
  12. package/dist/components/AssetGrid/index.d.ts.map +1 -0
  13. package/dist/components/AssetGrid/index.js +137 -0
  14. package/dist/components/AssetGrid/index.js.map +1 -0
  15. package/dist/components/AssetGrid/style.css +196 -0
  16. package/dist/components/Avatar/index.cjs +2 -0
  17. package/dist/components/Avatar/index.cjs.map +1 -0
  18. package/dist/components/Avatar/index.d.cts +24 -0
  19. package/dist/components/Avatar/index.d.cts.map +1 -0
  20. package/dist/components/Avatar/index.d.ts +24 -0
  21. package/dist/components/Avatar/index.d.ts.map +1 -0
  22. package/dist/components/Avatar/index.js +43 -0
  23. package/dist/components/Avatar/index.js.map +1 -0
  24. package/dist/components/Avatar/style.css +70 -0
  25. package/dist/components/Badge/index.cjs +2 -0
  26. package/dist/components/Badge/index.cjs.map +1 -0
  27. package/dist/components/Badge/index.d.cts +25 -0
  28. package/dist/components/Badge/index.d.cts.map +1 -0
  29. package/dist/components/Badge/index.d.ts +25 -0
  30. package/dist/components/Badge/index.d.ts.map +1 -0
  31. package/dist/components/Badge/index.js +28 -0
  32. package/dist/components/Badge/index.js.map +1 -0
  33. package/dist/components/Badge/style.css +103 -0
  34. package/dist/components/Board/index.cjs +2 -0
  35. package/dist/components/Board/index.cjs.map +1 -0
  36. package/dist/components/Board/index.d.cts +62 -0
  37. package/dist/components/Board/index.d.cts.map +1 -0
  38. package/dist/components/Board/index.d.ts +62 -0
  39. package/dist/components/Board/index.d.ts.map +1 -0
  40. package/dist/components/Board/index.js +227 -0
  41. package/dist/components/Board/index.js.map +1 -0
  42. package/dist/components/Board/style.css +145 -0
  43. package/dist/components/Button/index.cjs +2 -0
  44. package/dist/components/Button/index.cjs.map +1 -0
  45. package/dist/components/Button/index.d.cts +22 -0
  46. package/dist/components/Button/index.d.cts.map +1 -0
  47. package/dist/components/Button/index.d.ts +22 -0
  48. package/dist/components/Button/index.d.ts.map +1 -0
  49. package/dist/components/Button/index.js +37 -0
  50. package/dist/components/Button/index.js.map +1 -0
  51. package/dist/components/Button/style.css +139 -0
  52. package/dist/components/ButtonGroup/index.cjs +2 -0
  53. package/dist/components/ButtonGroup/index.cjs.map +1 -0
  54. package/dist/components/ButtonGroup/index.d.cts +17 -0
  55. package/dist/components/ButtonGroup/index.d.cts.map +1 -0
  56. package/dist/components/ButtonGroup/index.d.ts +17 -0
  57. package/dist/components/ButtonGroup/index.d.ts.map +1 -0
  58. package/dist/components/ButtonGroup/index.js +18 -0
  59. package/dist/components/ButtonGroup/index.js.map +1 -0
  60. package/dist/components/ButtonGroup/style.css +66 -0
  61. package/dist/components/Choice/index.cjs +2 -0
  62. package/dist/components/Choice/index.cjs.map +1 -0
  63. package/dist/components/Choice/index.d.cts +25 -0
  64. package/dist/components/Choice/index.d.cts.map +1 -0
  65. package/dist/components/Choice/index.d.ts +25 -0
  66. package/dist/components/Choice/index.d.ts.map +1 -0
  67. package/dist/components/Choice/index.js +58 -0
  68. package/dist/components/Choice/index.js.map +1 -0
  69. package/dist/components/Choice/style.css +96 -0
  70. package/dist/components/Container/index.cjs +2 -0
  71. package/dist/components/Container/index.cjs.map +1 -0
  72. package/dist/components/Container/index.d.cts +19 -0
  73. package/dist/components/Container/index.d.cts.map +1 -0
  74. package/dist/components/Container/index.d.ts +19 -0
  75. package/dist/components/Container/index.d.ts.map +1 -0
  76. package/dist/components/Container/index.js +20 -0
  77. package/dist/components/Container/index.js.map +1 -0
  78. package/dist/components/Container/style.css +41 -0
  79. package/dist/components/DatePicker/index.cjs +2 -0
  80. package/dist/components/DatePicker/index.cjs.map +1 -0
  81. package/dist/components/DatePicker/index.d.cts +57 -0
  82. package/dist/components/DatePicker/index.d.cts.map +1 -0
  83. package/dist/components/DatePicker/index.d.ts +57 -0
  84. package/dist/components/DatePicker/index.d.ts.map +1 -0
  85. package/dist/components/DatePicker/index.js +248 -0
  86. package/dist/components/DatePicker/index.js.map +1 -0
  87. package/dist/components/DatePicker/style.css +149 -0
  88. package/dist/components/Drawer/index.cjs +2 -0
  89. package/dist/components/Drawer/index.cjs.map +1 -0
  90. package/dist/components/Drawer/index.d.cts +23 -0
  91. package/dist/components/Drawer/index.d.cts.map +1 -0
  92. package/dist/components/Drawer/index.d.ts +23 -0
  93. package/dist/components/Drawer/index.d.ts.map +1 -0
  94. package/dist/components/Drawer/index.js +85 -0
  95. package/dist/components/Drawer/index.js.map +1 -0
  96. package/dist/components/Drawer/style.css +147 -0
  97. package/dist/components/EntryPicker/index.cjs +2 -0
  98. package/dist/components/EntryPicker/index.cjs.map +1 -0
  99. package/dist/components/EntryPicker/index.d.cts +36 -0
  100. package/dist/components/EntryPicker/index.d.cts.map +1 -0
  101. package/dist/components/EntryPicker/index.d.ts +36 -0
  102. package/dist/components/EntryPicker/index.d.ts.map +1 -0
  103. package/dist/components/EntryPicker/index.js +178 -0
  104. package/dist/components/EntryPicker/index.js.map +1 -0
  105. package/dist/components/EntryPicker/style.css +162 -0
  106. package/dist/components/Field/index.cjs +2 -0
  107. package/dist/components/Field/index.cjs.map +1 -0
  108. package/dist/components/Field/index.d.cts +19 -0
  109. package/dist/components/Field/index.d.cts.map +1 -0
  110. package/dist/components/Field/index.d.ts +19 -0
  111. package/dist/components/Field/index.d.ts.map +1 -0
  112. package/dist/components/Field/index.js +41 -0
  113. package/dist/components/Field/index.js.map +1 -0
  114. package/dist/components/Field/style.css +100 -0
  115. package/dist/components/FieldAffix/index.cjs +2 -0
  116. package/dist/components/FieldAffix/index.cjs.map +1 -0
  117. package/dist/components/FieldAffix/index.d.cts +19 -0
  118. package/dist/components/FieldAffix/index.d.cts.map +1 -0
  119. package/dist/components/FieldAffix/index.d.ts +19 -0
  120. package/dist/components/FieldAffix/index.d.ts.map +1 -0
  121. package/dist/components/FieldAffix/index.js +45 -0
  122. package/dist/components/FieldAffix/index.js.map +1 -0
  123. package/dist/components/FieldAffix/style.css +54 -0
  124. package/dist/components/Grid/index.cjs +2 -0
  125. package/dist/components/Grid/index.cjs.map +1 -0
  126. package/dist/components/Grid/index.d.cts +44 -0
  127. package/dist/components/Grid/index.d.cts.map +1 -0
  128. package/dist/components/Grid/index.d.ts +44 -0
  129. package/dist/components/Grid/index.d.ts.map +1 -0
  130. package/dist/components/Grid/index.js +49 -0
  131. package/dist/components/Grid/index.js.map +1 -0
  132. package/dist/components/Grid/style.css +226 -0
  133. package/dist/components/Icon/icons.d.cts +64 -0
  134. package/dist/components/Icon/icons.d.cts.map +1 -0
  135. package/dist/components/Icon/icons.d.ts +64 -0
  136. package/dist/components/Icon/icons.d.ts.map +1 -0
  137. package/dist/components/Icon/index.cjs +1 -0
  138. package/dist/components/Icon/index.d.cts +15 -0
  139. package/dist/components/Icon/index.d.cts.map +1 -0
  140. package/dist/components/Icon/index.d.ts +15 -0
  141. package/dist/components/Icon/index.d.ts.map +1 -0
  142. package/dist/components/Icon/index.js +1 -0
  143. package/dist/components/Icon/style.css +10 -0
  144. package/dist/components/ImageCropper/index.cjs +2 -0
  145. package/dist/components/ImageCropper/index.cjs.map +1 -0
  146. package/dist/components/ImageCropper/index.d.cts +66 -0
  147. package/dist/components/ImageCropper/index.d.cts.map +1 -0
  148. package/dist/components/ImageCropper/index.d.ts +66 -0
  149. package/dist/components/ImageCropper/index.d.ts.map +1 -0
  150. package/dist/components/ImageCropper/index.js +263 -0
  151. package/dist/components/ImageCropper/index.js.map +1 -0
  152. package/dist/components/ImageCropper/style.css +160 -0
  153. package/dist/components/Menu/index.cjs +2 -0
  154. package/dist/components/Menu/index.cjs.map +1 -0
  155. package/dist/components/Menu/index.d.cts +35 -0
  156. package/dist/components/Menu/index.d.cts.map +1 -0
  157. package/dist/components/Menu/index.d.ts +35 -0
  158. package/dist/components/Menu/index.d.ts.map +1 -0
  159. package/dist/components/Menu/index.js +110 -0
  160. package/dist/components/Menu/index.js.map +1 -0
  161. package/dist/components/Menu/style.css +87 -0
  162. package/dist/components/Modal/index.cjs +2 -0
  163. package/dist/components/Modal/index.cjs.map +1 -0
  164. package/dist/components/Modal/index.d.cts +19 -0
  165. package/dist/components/Modal/index.d.cts.map +1 -0
  166. package/dist/components/Modal/index.d.ts +19 -0
  167. package/dist/components/Modal/index.d.ts.map +1 -0
  168. package/dist/components/Modal/index.js +84 -0
  169. package/dist/components/Modal/index.js.map +1 -0
  170. package/dist/components/Modal/style.css +106 -0
  171. package/dist/components/NumberField/index.cjs +2 -0
  172. package/dist/components/NumberField/index.cjs.map +1 -0
  173. package/dist/components/NumberField/index.d.cts +50 -0
  174. package/dist/components/NumberField/index.d.cts.map +1 -0
  175. package/dist/components/NumberField/index.d.ts +50 -0
  176. package/dist/components/NumberField/index.d.ts.map +1 -0
  177. package/dist/components/NumberField/index.js +124 -0
  178. package/dist/components/NumberField/index.js.map +1 -0
  179. package/dist/components/NumberField/style.css +85 -0
  180. package/dist/components/Popover/index.cjs +2 -0
  181. package/dist/components/Popover/index.cjs.map +1 -0
  182. package/dist/components/Popover/index.d.cts +28 -0
  183. package/dist/components/Popover/index.d.cts.map +1 -0
  184. package/dist/components/Popover/index.d.ts +28 -0
  185. package/dist/components/Popover/index.d.ts.map +1 -0
  186. package/dist/components/Popover/index.js +52 -0
  187. package/dist/components/Popover/index.js.map +1 -0
  188. package/dist/components/Popover/style.css +23 -0
  189. package/dist/components/RichTextEditor/index.cjs +2 -0
  190. package/dist/components/RichTextEditor/index.cjs.map +1 -0
  191. package/dist/components/RichTextEditor/index.d.cts +23 -0
  192. package/dist/components/RichTextEditor/index.d.cts.map +1 -0
  193. package/dist/components/RichTextEditor/index.d.ts +23 -0
  194. package/dist/components/RichTextEditor/index.d.ts.map +1 -0
  195. package/dist/components/RichTextEditor/index.js +175 -0
  196. package/dist/components/RichTextEditor/index.js.map +1 -0
  197. package/dist/components/RichTextEditor/style.css +136 -0
  198. package/dist/components/SearchField/index.cjs +2 -0
  199. package/dist/components/SearchField/index.cjs.map +1 -0
  200. package/dist/components/SearchField/index.d.cts +11 -0
  201. package/dist/components/SearchField/index.d.cts.map +1 -0
  202. package/dist/components/SearchField/index.d.ts +11 -0
  203. package/dist/components/SearchField/index.d.ts.map +1 -0
  204. package/dist/components/SearchField/index.js +49 -0
  205. package/dist/components/SearchField/index.js.map +1 -0
  206. package/dist/components/SearchField/style.css +27 -0
  207. package/dist/components/Select/index.cjs +2 -0
  208. package/dist/components/Select/index.cjs.map +1 -0
  209. package/dist/components/Select/index.d.cts +26 -0
  210. package/dist/components/Select/index.d.cts.map +1 -0
  211. package/dist/components/Select/index.d.ts +26 -0
  212. package/dist/components/Select/index.d.ts.map +1 -0
  213. package/dist/components/Select/index.js +129 -0
  214. package/dist/components/Select/index.js.map +1 -0
  215. package/dist/components/Select/style.css +88 -0
  216. package/dist/components/SelectionCard/index.cjs +2 -0
  217. package/dist/components/SelectionCard/index.cjs.map +1 -0
  218. package/dist/components/SelectionCard/index.d.cts +32 -0
  219. package/dist/components/SelectionCard/index.d.cts.map +1 -0
  220. package/dist/components/SelectionCard/index.d.ts +32 -0
  221. package/dist/components/SelectionCard/index.d.ts.map +1 -0
  222. package/dist/components/SelectionCard/index.js +71 -0
  223. package/dist/components/SelectionCard/index.js.map +1 -0
  224. package/dist/components/SelectionCard/style.css +133 -0
  225. package/dist/components/SideNav/index.cjs +2 -0
  226. package/dist/components/SideNav/index.cjs.map +1 -0
  227. package/dist/components/SideNav/index.d.cts +58 -0
  228. package/dist/components/SideNav/index.d.cts.map +1 -0
  229. package/dist/components/SideNav/index.d.ts +58 -0
  230. package/dist/components/SideNav/index.d.ts.map +1 -0
  231. package/dist/components/SideNav/index.js +113 -0
  232. package/dist/components/SideNav/index.js.map +1 -0
  233. package/dist/components/SideNav/style.css +184 -0
  234. package/dist/components/Skeleton/index.cjs +2 -0
  235. package/dist/components/Skeleton/index.cjs.map +1 -0
  236. package/dist/components/Skeleton/index.d.cts +21 -0
  237. package/dist/components/Skeleton/index.d.cts.map +1 -0
  238. package/dist/components/Skeleton/index.d.ts +21 -0
  239. package/dist/components/Skeleton/index.d.ts.map +1 -0
  240. package/dist/components/Skeleton/index.js +31 -0
  241. package/dist/components/Skeleton/index.js.map +1 -0
  242. package/dist/components/Skeleton/style.css +55 -0
  243. package/dist/components/Slider/index.cjs +2 -0
  244. package/dist/components/Slider/index.cjs.map +1 -0
  245. package/dist/components/Slider/index.d.cts +40 -0
  246. package/dist/components/Slider/index.d.cts.map +1 -0
  247. package/dist/components/Slider/index.d.ts +40 -0
  248. package/dist/components/Slider/index.d.ts.map +1 -0
  249. package/dist/components/Slider/index.js +117 -0
  250. package/dist/components/Slider/index.js.map +1 -0
  251. package/dist/components/Slider/style.css +156 -0
  252. package/dist/components/SortableList/index.cjs +2 -0
  253. package/dist/components/SortableList/index.cjs.map +1 -0
  254. package/dist/components/SortableList/index.d.cts +27 -0
  255. package/dist/components/SortableList/index.d.cts.map +1 -0
  256. package/dist/components/SortableList/index.d.ts +27 -0
  257. package/dist/components/SortableList/index.d.ts.map +1 -0
  258. package/dist/components/SortableList/index.js +85 -0
  259. package/dist/components/SortableList/index.js.map +1 -0
  260. package/dist/components/SortableList/style.css +71 -0
  261. package/dist/components/Stepper/index.cjs +2 -0
  262. package/dist/components/Stepper/index.cjs.map +1 -0
  263. package/dist/components/Stepper/index.d.cts +32 -0
  264. package/dist/components/Stepper/index.d.cts.map +1 -0
  265. package/dist/components/Stepper/index.d.ts +32 -0
  266. package/dist/components/Stepper/index.d.ts.map +1 -0
  267. package/dist/components/Stepper/index.js +69 -0
  268. package/dist/components/Stepper/index.js.map +1 -0
  269. package/dist/components/Stepper/style.css +154 -0
  270. package/dist/components/SubNav/index.cjs +2 -0
  271. package/dist/components/SubNav/index.cjs.map +1 -0
  272. package/dist/components/SubNav/index.d.cts +31 -0
  273. package/dist/components/SubNav/index.d.cts.map +1 -0
  274. package/dist/components/SubNav/index.d.ts +31 -0
  275. package/dist/components/SubNav/index.d.ts.map +1 -0
  276. package/dist/components/SubNav/index.js +62 -0
  277. package/dist/components/SubNav/index.js.map +1 -0
  278. package/dist/components/SubNav/style.css +86 -0
  279. package/dist/components/Switch/index.cjs +2 -0
  280. package/dist/components/Switch/index.cjs.map +1 -0
  281. package/dist/components/Switch/index.d.cts +12 -0
  282. package/dist/components/Switch/index.d.cts.map +1 -0
  283. package/dist/components/Switch/index.d.ts +12 -0
  284. package/dist/components/Switch/index.d.ts.map +1 -0
  285. package/dist/components/Switch/index.js +37 -0
  286. package/dist/components/Switch/index.js.map +1 -0
  287. package/dist/components/Switch/style.css +65 -0
  288. package/dist/components/Table/index.cjs +2 -0
  289. package/dist/components/Table/index.cjs.map +1 -0
  290. package/dist/components/Table/index.d.cts +54 -0
  291. package/dist/components/Table/index.d.cts.map +1 -0
  292. package/dist/components/Table/index.d.ts +54 -0
  293. package/dist/components/Table/index.d.ts.map +1 -0
  294. package/dist/components/Table/index.js +102 -0
  295. package/dist/components/Table/index.js.map +1 -0
  296. package/dist/components/Table/style.css +122 -0
  297. package/dist/components/TagsInput/index.cjs +2 -0
  298. package/dist/components/TagsInput/index.cjs.map +1 -0
  299. package/dist/components/TagsInput/index.d.cts +22 -0
  300. package/dist/components/TagsInput/index.d.cts.map +1 -0
  301. package/dist/components/TagsInput/index.d.ts +22 -0
  302. package/dist/components/TagsInput/index.d.ts.map +1 -0
  303. package/dist/components/TagsInput/index.js +60 -0
  304. package/dist/components/TagsInput/index.js.map +1 -0
  305. package/dist/components/TagsInput/style.css +83 -0
  306. package/dist/components/TextField/index.cjs +2 -0
  307. package/dist/components/TextField/index.cjs.map +1 -0
  308. package/dist/components/TextField/index.d.cts +11 -0
  309. package/dist/components/TextField/index.d.cts.map +1 -0
  310. package/dist/components/TextField/index.d.ts +11 -0
  311. package/dist/components/TextField/index.d.ts.map +1 -0
  312. package/dist/components/TextField/index.js +29 -0
  313. package/dist/components/TextField/index.js.map +1 -0
  314. package/dist/components/TextField/style.css +1 -0
  315. package/dist/components/Time/index.cjs +2 -0
  316. package/dist/components/Time/index.cjs.map +1 -0
  317. package/dist/components/Time/index.d.cts +35 -0
  318. package/dist/components/Time/index.d.cts.map +1 -0
  319. package/dist/components/Time/index.d.ts +35 -0
  320. package/dist/components/Time/index.d.ts.map +1 -0
  321. package/dist/components/Time/index.js +98 -0
  322. package/dist/components/Time/index.js.map +1 -0
  323. package/dist/components/Time/style.css +30 -0
  324. package/dist/components/Toast/index.cjs +2 -0
  325. package/dist/components/Toast/index.cjs.map +1 -0
  326. package/dist/components/Toast/index.d.cts +30 -0
  327. package/dist/components/Toast/index.d.cts.map +1 -0
  328. package/dist/components/Toast/index.d.ts +30 -0
  329. package/dist/components/Toast/index.d.ts.map +1 -0
  330. package/dist/components/Toast/index.js +96 -0
  331. package/dist/components/Toast/index.js.map +1 -0
  332. package/dist/components/Toast/style.css +80 -0
  333. package/dist/components/TopNav/index.cjs +2 -0
  334. package/dist/components/TopNav/index.cjs.map +1 -0
  335. package/dist/components/TopNav/index.d.cts +28 -0
  336. package/dist/components/TopNav/index.d.cts.map +1 -0
  337. package/dist/components/TopNav/index.d.ts +28 -0
  338. package/dist/components/TopNav/index.d.ts.map +1 -0
  339. package/dist/components/TopNav/index.js +45 -0
  340. package/dist/components/TopNav/index.js.map +1 -0
  341. package/dist/components/TopNav/style.css +80 -0
  342. package/dist/index.cjs +1 -0
  343. package/dist/index.d.cts +77 -0
  344. package/dist/index.d.cts.map +1 -0
  345. package/dist/index.d.ts +77 -0
  346. package/dist/index.d.ts.map +1 -0
  347. package/dist/index.js +38 -0
  348. package/dist/reset.css +15 -0
  349. package/dist/reset.css.d.ts +2 -0
  350. package/dist/styles.css +39 -0
  351. package/dist/styles.css.d.ts +2 -0
  352. package/dist/tokens.css +457 -0
  353. package/dist/tokens.css.d.ts +2 -0
  354. package/package.json +130 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,oBAAoB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,aAAa,CAAC;AAErB,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACnF,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IACjE,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mEAAmE;IACnE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,2GAsCjB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { type ButtonHTMLAttributes, type ReactNode } from "react";
2
+ import type { IconName } from "../Icon/icons.js";
3
+ export type ButtonVariant = "primary" | "neutral" | "danger" | "active" | "simple";
4
+ export type ButtonSize = "sm" | "md" | "lg";
5
+ export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "disabled"> {
6
+ variant?: ButtonVariant;
7
+ size?: ButtonSize;
8
+ iconStart?: IconName;
9
+ iconEnd?: IconName;
10
+ /** Square, height-sized button. Requires `aria-label`. */
11
+ isIconOnly?: boolean;
12
+ isDisabled?: boolean;
13
+ /** Label stays, spinner replaces `iconStart`, press is blocked. */
14
+ isPending?: boolean;
15
+ children?: ReactNode;
16
+ }
17
+ /**
18
+ * Every action the user can take. One primary per view; a sixth variant is a
19
+ * conversation, not a prop.
20
+ */
21
+ export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,oBAAoB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,aAAa,CAAC;AAErB,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACnF,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IACjE,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mEAAmE;IACnE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,2GAsCjB,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { t as e } from "../../chunks/Icon-CGY1FNXT.js";
2
+ import { forwardRef as t } from "react";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ //#region src/components/Button/index.tsx
5
+ var i = t(function({ variant: t = "neutral", size: i = "md", iconStart: a, iconEnd: o, isIconOnly: s = !1, isDisabled: c = !1, isPending: l = !1, className: u, children: d, type: f = "button", ...p }, m) {
6
+ let h = i === "lg" ? 20 : 16;
7
+ return /* @__PURE__ */ r("button", {
8
+ ref: m,
9
+ type: f,
10
+ disabled: c || l,
11
+ "data-variant": t,
12
+ "data-size": i,
13
+ "data-icon-only": s || void 0,
14
+ "data-pending": l || void 0,
15
+ className: ["ds-button", u].filter(Boolean).join(" "),
16
+ ...p,
17
+ children: [
18
+ l ? /* @__PURE__ */ n(e, {
19
+ name: "spinner",
20
+ size: h,
21
+ className: "ds-button__spinner"
22
+ }) : a && /* @__PURE__ */ n(e, {
23
+ name: a,
24
+ size: h
25
+ }),
26
+ !s && d,
27
+ o && !s && /* @__PURE__ */ n(e, {
28
+ name: o,
29
+ size: h
30
+ })
31
+ ]
32
+ });
33
+ });
34
+ //#endregion
35
+ export { i as Button };
36
+
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["Icon","Button","forwardRef","rest","glyph","size","isDisabled","isPending","variant","isIconOnly","className","iconStart","children","iconEnd"],"sources":["../../../src/components/Button/index.tsx"],"sourcesContent":["import { forwardRef, type ButtonHTMLAttributes, type ReactNode } from \"react\";\nimport { Icon } from \"../Icon\";\nimport type { IconName } from \"../Icon/icons\";\nimport \"./style.css\";\n\nexport type ButtonVariant = \"primary\" | \"neutral\" | \"danger\" | \"active\" | \"simple\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"disabled\"> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n iconStart?: IconName;\n iconEnd?: IconName;\n /** Square, height-sized button. Requires `aria-label`. */\n isIconOnly?: boolean;\n isDisabled?: boolean;\n /** Label stays, spinner replaces `iconStart`, press is blocked. */\n isPending?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Every action the user can take. One primary per view; a sixth variant is a\n * conversation, not a prop.\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant = \"neutral\",\n size = \"md\",\n iconStart,\n iconEnd,\n isIconOnly = false,\n isDisabled = false,\n isPending = false,\n className,\n children,\n type = \"button\",\n ...rest\n },\n ref,\n) {\n const glyph = size === \"lg\" ? 20 : 16;\n return (\n <button\n ref={ref}\n type={type}\n disabled={isDisabled || isPending}\n data-variant={variant}\n data-size={size}\n data-icon-only={isIconOnly || undefined}\n data-pending={isPending || undefined}\n className={[\"ds-button\", className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {isPending ? (\n <Icon name=\"spinner\" size={glyph} className=\"ds-button__spinner\" />\n ) : (\n iconStart && <Icon name={iconStart} size={glyph} />\n )}\n {!isIconOnly && children}\n {iconEnd && !isIconOnly && <Icon name={iconEnd} size={glyph} />}\n </button>\n );\n});\n"],"mappings":";;;;AA0BA,IAAaC,IAASC,EAA2C,SAC/D,EACE,aAAU,WACV,UAAO,MACP,cACA,YACA,gBAAa,IACb,gBAAa,IACb,eAAY,IACZ,cACA,aACA,UAAO,UACP,GAAGC,KAEL,GACA;CACA,IAAMC,IAAQC,MAAS,OAAO,KAAK;CACnC,OACE,kBAAC,UAAD;EACO;EACC;EACN,UAAUC,KAAcC;EACxB,gBAAcC;EACd,aAAWH;EACX,kBAAgBI,KAAc,KAAA;EAC9B,gBAAcF,KAAa,KAAA;EAC3B,WAAW,CAAC,aAAaG,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAC5D,GAAIP;EATN,UAAA;GAWGI,IACC,kBAACP,GAAD;IAAM,MAAK;IAAU,MAAMI;IAAO,WAAU;GAAsB,CAAA,IAElEO,KAAa,kBAACX,GAAD;IAAM,MAAMW;IAAW,MAAMP;GAAQ,CAAA;GAEnD,CAACK,KAAcG;GACfC,KAAW,CAACJ,KAAc,kBAACT,GAAD;IAAM,MAAMa;IAAS,MAAMT;GAAQ,CAAA;EACxD;;AAEZ,CAAC"}
@@ -0,0 +1,139 @@
1
+ @layer components {
2
+ .ds-button {
3
+ display: inline-flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ gap: var(--space-2);
7
+ border: var(--control-border-width) solid var(--control-border-color);
8
+ border-radius: var(--radius-md);
9
+ font-family: var(--font-sans);
10
+ font-weight: var(--font-weight-semibold);
11
+ line-height: var(--line-height-tight);
12
+ text-decoration: none;
13
+ cursor: pointer;
14
+ transition: background-color var(--duration-fast) var(--ease-standard);
15
+ }
16
+
17
+ /* Sizes — only height, padding and type size change. */
18
+ .ds-button[data-size="sm"] {
19
+ height: var(--field-height-sm);
20
+ padding: var(--space-1) var(--space-3);
21
+ font-size: var(--font-size-sm);
22
+ }
23
+
24
+ .ds-button[data-size="md"] {
25
+ height: var(--field-height-md);
26
+ padding: var(--space-2) var(--space-4);
27
+ font-size: var(--font-size-sm);
28
+ }
29
+
30
+ .ds-button[data-size="lg"] {
31
+ height: var(--field-height-lg);
32
+ padding: var(--space-3) var(--space-5);
33
+ font-size: var(--font-size-md);
34
+ }
35
+
36
+ .ds-button[data-icon-only] {
37
+ padding: 0;
38
+ aspect-ratio: 1;
39
+ }
40
+
41
+ /* Variants — state moves on the fill only. */
42
+ .ds-button[data-variant="primary"] {
43
+ background: var(--color-primary);
44
+ color: var(--color-text-on-solid);
45
+ }
46
+
47
+ .ds-button[data-variant="primary"]:hover:not(:disabled) {
48
+ background: var(--color-primary-hover);
49
+ }
50
+
51
+ .ds-button[data-variant="primary"]:active:not(:disabled) {
52
+ background: var(--color-primary-pressed);
53
+ }
54
+
55
+ .ds-button[data-variant="neutral"] {
56
+ background: var(--color-surface);
57
+ color: var(--color-text);
58
+ }
59
+
60
+ .ds-button[data-variant="neutral"]:hover:not(:disabled) {
61
+ background: var(--field-hover);
62
+ }
63
+
64
+ .ds-button[data-variant="neutral"]:active:not(:disabled) {
65
+ background: var(--field-pressed);
66
+ }
67
+
68
+ .ds-button[data-variant="danger"] {
69
+ background: var(--color-danger);
70
+ color: var(--color-text-on-solid);
71
+ }
72
+
73
+ .ds-button[data-variant="danger"]:hover:not(:disabled) {
74
+ background: var(--color-danger-hover, var(--color-danger));
75
+ }
76
+
77
+ .ds-button[data-variant="danger"]:active:not(:disabled) {
78
+ background: var(--color-danger-pressed, var(--color-danger));
79
+ }
80
+
81
+ .ds-button[data-variant="active"] {
82
+ background: var(--color-primary-soft);
83
+ color: var(--color-primary-text);
84
+ border-color: var(--color-primary);
85
+ }
86
+
87
+ .ds-button[data-variant="active"]:hover:not(:disabled) {
88
+ background: var(--color-primary-soft-hover);
89
+ }
90
+
91
+ .ds-button[data-variant="active"]:active:not(:disabled) {
92
+ background: var(--color-primary-soft-pressed);
93
+ }
94
+
95
+ .ds-button[data-variant="simple"] {
96
+ background: transparent;
97
+ border-color: transparent;
98
+ color: var(--color-text-muted);
99
+ font-weight: var(--font-weight-regular);
100
+ }
101
+
102
+ .ds-button[data-variant="simple"]:hover:not(:disabled) {
103
+ background: var(--field-hover);
104
+ }
105
+
106
+ .ds-button[data-variant="simple"]:active:not(:disabled) {
107
+ background: var(--field-pressed);
108
+ }
109
+
110
+ .ds-button:focus-visible {
111
+ outline: var(--control-border-width) solid var(--color-focus);
112
+ outline-offset: 2px;
113
+ }
114
+
115
+ .ds-button:disabled {
116
+ opacity: 45%;
117
+ cursor: not-allowed;
118
+ }
119
+
120
+ .ds-button[data-pending] {
121
+ cursor: progress;
122
+ }
123
+
124
+ .ds-button__spinner {
125
+ animation: ds-spin 900ms linear infinite;
126
+ }
127
+
128
+ @keyframes ds-spin {
129
+ to {
130
+ transform: rotate(360deg);
131
+ }
132
+ }
133
+
134
+ @media (prefers-reduced-motion: reduce) {
135
+ .ds-button__spinner {
136
+ animation-duration: 2400ms;
137
+ }
138
+ }
139
+ }
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime");var n=(0,e.forwardRef)(function({isAttached:e=!0,orientation:n=`horizontal`,className:r,children:i,...a},o){return(0,t.jsx)(`div`,{ref:o,role:`group`,"data-attached":e,"data-orientation":n,className:[`ds-button-group`,r].filter(Boolean).join(` `),...a,children:i})});exports.ButtonGroup=n;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["forwardRef","react","react_jsx_runtime","ButtonGroup","rest","isAttached","orientation","className"],"sources":["../../../src/components/ButtonGroup/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport \"./style.css\";\n\nexport type ButtonGroupOrientation = \"horizontal\" | \"vertical\";\n\nexport interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {\n /** Attached segments read as one control; spaced reads as related actions. */\n isAttached?: boolean;\n orientation?: ButtonGroupOrientation;\n /** Required when the group itself carries the meaning (e.g. a view switcher). */\n \"aria-label\"?: string;\n children?: ReactNode;\n}\n\n/**\n * A row of `Button`s that belong to one decision. Mark the current segment with\n * `variant=\"active\"` and `aria-pressed` — the group adds no selection state of\n * its own, so it stays a layout contract rather than a second control API.\n */\nexport const ButtonGroup = forwardRef<HTMLDivElement, ButtonGroupProps>(\n function ButtonGroup(\n { isAttached = true, orientation = \"horizontal\", className, children, ...rest },\n ref,\n ) {\n return (\n <div\n ref={ref}\n role=\"group\"\n data-attached={isAttached}\n data-orientation={orientation}\n className={[\"ds-button-group\", className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {children}\n </div>\n );\n },\n);\n"],"mappings":"A,yHAmBA,IAAaG,GAAA,EAAcH,EAAAA,WAAAA,CACzB,SACE,CAAE,aAAa,GAAM,cAAc,aAAc,YAAW,WAAU,GAAGI,GACzE,EACA,CACA,OACE,EAAAF,EAAA,IAAA,CAAC,MAAD,CACO,MACL,KAAK,QACL,gBAAeG,EACf,mBAAkBC,EAClB,UAAW,CAAC,kBAAmBC,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAClE,GAAIH,EAEH,UACE,CAAA,CAET,CACF,E"}
@@ -0,0 +1,17 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+ export type ButtonGroupOrientation = "horizontal" | "vertical";
3
+ export interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {
4
+ /** Attached segments read as one control; spaced reads as related actions. */
5
+ isAttached?: boolean;
6
+ orientation?: ButtonGroupOrientation;
7
+ /** Required when the group itself carries the meaning (e.g. a view switcher). */
8
+ "aria-label"?: string;
9
+ children?: ReactNode;
10
+ }
11
+ /**
12
+ * A row of `Button`s that belong to one decision. Mark the current segment with
13
+ * `variant="active"` and `aria-pressed` — the group adds no selection state of
14
+ * its own, so it stays a layout contract rather than a second control API.
15
+ */
16
+ export declare const ButtonGroup: import("react").ForwardRefExoticComponent<ButtonGroupProps & import("react").RefAttributes<HTMLDivElement>>;
17
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonGroup/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,aAAa,CAAC;AAErB,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG,UAAU,CAAC;AAE/D,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACtE,8EAA8E;IAC9E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,sBAAsB,CAAC;IACrC,iFAAiF;IACjF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,6GAkBvB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+ export type ButtonGroupOrientation = "horizontal" | "vertical";
3
+ export interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {
4
+ /** Attached segments read as one control; spaced reads as related actions. */
5
+ isAttached?: boolean;
6
+ orientation?: ButtonGroupOrientation;
7
+ /** Required when the group itself carries the meaning (e.g. a view switcher). */
8
+ "aria-label"?: string;
9
+ children?: ReactNode;
10
+ }
11
+ /**
12
+ * A row of `Button`s that belong to one decision. Mark the current segment with
13
+ * `variant="active"` and `aria-pressed` — the group adds no selection state of
14
+ * its own, so it stays a layout contract rather than a second control API.
15
+ */
16
+ export declare const ButtonGroup: import("react").ForwardRefExoticComponent<ButtonGroupProps & import("react").RefAttributes<HTMLDivElement>>;
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonGroup/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,aAAa,CAAC;AAErB,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG,UAAU,CAAC;AAE/D,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACtE,8EAA8E;IAC9E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,sBAAsB,CAAC;IACrC,iFAAiF;IACjF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,6GAkBvB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { forwardRef as e } from "react";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ //#region src/components/ButtonGroup/index.tsx
4
+ var n = e(function({ isAttached: e = !0, orientation: n = "horizontal", className: r, children: i, ...a }, o) {
5
+ return /* @__PURE__ */ t("div", {
6
+ ref: o,
7
+ role: "group",
8
+ "data-attached": e,
9
+ "data-orientation": n,
10
+ className: ["ds-button-group", r].filter(Boolean).join(" "),
11
+ ...a,
12
+ children: i
13
+ });
14
+ });
15
+ //#endregion
16
+ export { n as ButtonGroup };
17
+
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["ButtonGroup","forwardRef","rest","isAttached","orientation","className"],"sources":["../../../src/components/ButtonGroup/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport \"./style.css\";\n\nexport type ButtonGroupOrientation = \"horizontal\" | \"vertical\";\n\nexport interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {\n /** Attached segments read as one control; spaced reads as related actions. */\n isAttached?: boolean;\n orientation?: ButtonGroupOrientation;\n /** Required when the group itself carries the meaning (e.g. a view switcher). */\n \"aria-label\"?: string;\n children?: ReactNode;\n}\n\n/**\n * A row of `Button`s that belong to one decision. Mark the current segment with\n * `variant=\"active\"` and `aria-pressed` — the group adds no selection state of\n * its own, so it stays a layout contract rather than a second control API.\n */\nexport const ButtonGroup = forwardRef<HTMLDivElement, ButtonGroupProps>(\n function ButtonGroup(\n { isAttached = true, orientation = \"horizontal\", className, children, ...rest },\n ref,\n ) {\n return (\n <div\n ref={ref}\n role=\"group\"\n data-attached={isAttached}\n data-orientation={orientation}\n className={[\"ds-button-group\", className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {children}\n </div>\n );\n },\n);\n"],"mappings":";;;AAmBA,IAAaA,IAAcC,EACzB,SACE,EAAE,gBAAa,IAAM,iBAAc,cAAc,cAAW,aAAU,GAAGC,KACzE,GACA;CACA,OACE,kBAAC,OAAD;EACO;EACL,MAAK;EACL,iBAAeC;EACf,oBAAkBC;EAClB,WAAW,CAAC,mBAAmBC,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAClE,GAAIH;EAEH;CACE,CAAA;AAET,CACF"}
@@ -0,0 +1,66 @@
1
+ @layer components {
2
+ .ds-button-group {
3
+ display: inline-flex;
4
+ align-items: stretch;
5
+ align-self: start;
6
+ width: fit-content;
7
+ /* The group is the container; its children give up their outer geometry. */
8
+ border-radius: var(--radius-md);
9
+ }
10
+
11
+ /* Collapse the doubled 2px control strokes into one shared rule. */
12
+ .ds-button-group > .ds-button + .ds-button {
13
+ margin-inline-start: calc(-1 * var(--control-border-width));
14
+ }
15
+
16
+ .ds-button-group > .ds-button {
17
+ border-radius: 0;
18
+ }
19
+
20
+ .ds-button-group > .ds-button:first-child {
21
+ border-start-start-radius: var(--radius-md);
22
+ border-end-start-radius: var(--radius-md);
23
+ }
24
+
25
+ .ds-button-group > .ds-button:last-child {
26
+ border-start-end-radius: var(--radius-md);
27
+ border-end-end-radius: var(--radius-md);
28
+ }
29
+
30
+ /* A selected or focused segment owns the full stroke it shares. */
31
+ .ds-button-group > .ds-button:hover:not(:disabled),
32
+ .ds-button-group > .ds-button:focus-visible,
33
+ .ds-button-group > .ds-button[data-variant="active"],
34
+ .ds-button-group > .ds-button[data-variant="primary"],
35
+ .ds-button-group > .ds-button[data-variant="danger"] {
36
+ position: relative;
37
+ z-index: 1;
38
+ }
39
+
40
+ .ds-button-group[data-orientation="vertical"] {
41
+ flex-direction: column;
42
+ }
43
+
44
+ .ds-button-group[data-orientation="vertical"] > .ds-button + .ds-button {
45
+ margin-inline-start: 0;
46
+ margin-block-start: calc(-1 * var(--control-border-width));
47
+ }
48
+
49
+ .ds-button-group[data-orientation="vertical"] > .ds-button:first-child {
50
+ border-radius: var(--radius-md) var(--radius-md) 0 0;
51
+ }
52
+
53
+ .ds-button-group[data-orientation="vertical"] > .ds-button:last-child {
54
+ border-radius: 0 0 var(--radius-md) var(--radius-md);
55
+ }
56
+
57
+ /* Spaced: related actions that are not one control. */
58
+ .ds-button-group[data-attached="false"] {
59
+ gap: var(--space-2);
60
+ }
61
+
62
+ .ds-button-group[data-attached="false"] > .ds-button {
63
+ border-radius: var(--radius-md);
64
+ margin: 0;
65
+ }
66
+ }
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../Grid/index.cjs");let t=require("react"),n=require("react/jsx-runtime");var r=(0,t.forwardRef)(function({isIndeterminate:e=!1,className:r,children:i,...a},o){let s=(0,t.useRef)(null);return(0,t.useEffect)(()=>{s.current&&(s.current.indeterminate=e)},[e]),(0,n.jsxs)(`label`,{className:[`ds-choice`,r].filter(Boolean).join(` `),children:[(0,n.jsx)(`input`,{type:`checkbox`,className:`ds-choice__control`,"data-kind":`checkbox`,ref:e=>{s.current=e,typeof o==`function`?o(e):o&&(o.current=e)},...a}),i&&(0,n.jsx)(`span`,{className:`ds-choice__label`,children:i})]})}),i=(0,t.forwardRef)(function({className:e,children:t,...r},i){return(0,n.jsxs)(`label`,{className:[`ds-choice`,e].filter(Boolean).join(` `),children:[(0,n.jsx)(`input`,{ref:i,type:`radio`,className:`ds-choice__control`,"data-kind":`radio`,...r}),t&&(0,n.jsx)(`span`,{className:`ds-choice__label`,children:t})]})});function a({label:t,columns:r=1,children:i}){return(0,n.jsxs)(`fieldset`,{className:`ds-choice-group`,children:[(0,n.jsx)(`legend`,{className:`ds-choice-group__label`,children:t}),r===1?(0,n.jsx)(e.Stack,{gap:`sm`,children:i}):(0,n.jsx)(e.Grid,{columns:r,gap:`sm`,children:i})]})}exports.Checkbox=r,exports.ChoiceGroup=a,exports.Radio=i;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["forwardRef","useRef","Stack","Grid","require_components_Grid_index","react","react_jsx_runtime","Checkbox","rest","inner","isIndeterminate","className","node","ref","children","Radio","ChoiceGroup","label","columns"],"sources":["../../../src/components/Choice/index.tsx"],"sourcesContent":["import { forwardRef, useEffect, useRef, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { Grid, Stack } from \"../Grid\";\nimport \"./style.css\";\n\nexport interface CheckboxProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"type\" | \"size\"> {\n /** Display state only — clicking an indeterminate box selects all. */\n isIndeterminate?: boolean;\n children?: ReactNode;\n}\n\n/** An independent yes/no. 20px box at every size, in every context. */\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(function Checkbox(\n { isIndeterminate = false, className, children, ...rest },\n ref,\n) {\n const inner = useRef<HTMLInputElement | null>(null);\n\n useEffect(() => {\n if (inner.current) inner.current.indeterminate = isIndeterminate;\n }, [isIndeterminate]);\n\n return (\n <label className={[\"ds-choice\", className].filter(Boolean).join(\" \")}>\n <input\n type=\"checkbox\"\n className=\"ds-choice__control\"\n data-kind=\"checkbox\"\n ref={(node) => {\n inner.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) ref.current = node;\n }}\n {...rest}\n />\n {children && <span className=\"ds-choice__label\">{children}</span>}\n </label>\n );\n});\n\nexport interface RadioProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"type\" | \"size\"> {\n children?: ReactNode;\n}\n\n/** One of two or more mutually exclusive choices, all of them visible. */\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(function Radio(\n { className, children, ...rest },\n ref,\n) {\n return (\n <label className={[\"ds-choice\", className].filter(Boolean).join(\" \")}>\n <input\n ref={ref}\n type=\"radio\"\n className=\"ds-choice__control\"\n data-kind=\"radio\"\n {...rest}\n />\n {children && <span className=\"ds-choice__label\">{children}</span>}\n </label>\n );\n});\n\nexport interface ChoiceGroupProps {\n label: string;\n /**\n * Run a long list in columns instead of one stack. Steps down to a single\n * column inside a narrow container.\n */\n columns?: 1 | 2 | 3;\n children: ReactNode;\n}\n\n/** A set of checkboxes or radios under one group label, spaced by Stack or Grid. */\nexport function ChoiceGroup({ label, columns = 1, children }: ChoiceGroupProps) {\n return (\n <fieldset className=\"ds-choice-group\">\n <legend className=\"ds-choice-group__label\">{label}</legend>\n {columns === 1 ? (\n <Stack gap=\"sm\">{children}</Stack>\n ) : (\n <Grid columns={columns} gap=\"sm\">\n {children}\n </Grid>\n )}\n </fieldset>\n );\n}\n"],"mappings":"A,8JAYA,IAAaO,GAAA,EAAWP,EAAAA,WAAAA,CAA4C,SAClE,CAAE,kBAAkB,GAAO,YAAW,WAAU,GAAGQ,GACnD,EACA,CACA,IAAMC,GAAA,EAAQR,EAAAA,OAAAA,CAAgC,IAAI,EAMlD,OAJA,EAAAI,EAAA,UAAA,KAAgB,CACVI,EAAM,UAAS,EAAM,QAAQ,cAAgBC,EACnD,EAAG,CAACA,CAAe,CAAC,GAGlB,EAAAJ,EAAA,KAAA,CAAC,QAAD,CAAO,UAAW,CAAC,YAAaK,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAAnE,SAAA,EACE,EAAAL,EAAA,IAAA,CAAC,QAAD,CACE,KAAK,WACL,UAAU,qBACV,YAAU,WACV,IAAM,GAAS,CACb,EAAM,QAAUM,EACZ,OAAOC,GAAQ,WAAYA,EAAID,CAAI,EAC9BC,IAAK,EAAI,QAAUD,EAC9B,EACA,GAAIJ,CACL,CAAA,EACAM,IAAY,EAAAR,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,mBAAoB,UAAe,CAAA,CAC3D,C,EAEX,CAAC,EAQYS,GAAA,EAAQf,EAAAA,WAAAA,CAAyC,SAC5D,CAAE,YAAW,WAAU,GAAGQ,GAC1B,EACA,CACA,OACE,EAAAF,EAAA,KAAA,CAAC,QAAD,CAAO,UAAW,CAAC,YAAaK,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAAnE,SAAA,EACE,EAAAL,EAAA,IAAA,CAAC,QAAD,CACO,MACL,KAAK,QACL,UAAU,qBACV,YAAU,QACV,GAAIE,CACL,CAAA,EACAM,IAAY,EAAAR,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,mBAAoB,UAAe,CAAA,CAC3D,C,EAEX,CAAC,EAaD,SAAgBU,EAAY,CAAE,QAAO,UAAU,EAAG,YAA8B,CAC9E,OACE,EAAAV,EAAA,KAAA,CAAC,WAAD,CAAU,UAAU,kBAApB,SAAA,EACE,EAAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,UAAU,yBAA0B,SAAAW,CAAc,CAAA,EACzDC,IAAY,GACX,EAAAZ,EAAA,IAAA,CAACJ,EAAAA,MAAD,CAAO,IAAI,KAAM,UAAgB,CAAA,GAEjC,EAAAI,EAAA,IAAA,CAACH,EAAAA,KAAD,CAAe,UAAS,IAAI,KACzB,UACG,CAAA,CAEA,C,EAEd,C"}
@@ -0,0 +1,25 @@
1
+ import { type InputHTMLAttributes, type ReactNode } from "react";
2
+ export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
3
+ /** Display state only — clicking an indeterminate box selects all. */
4
+ isIndeterminate?: boolean;
5
+ children?: ReactNode;
6
+ }
7
+ /** An independent yes/no. 20px box at every size, in every context. */
8
+ export declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
9
+ export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
10
+ children?: ReactNode;
11
+ }
12
+ /** One of two or more mutually exclusive choices, all of them visible. */
13
+ export declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HTMLInputElement>>;
14
+ export interface ChoiceGroupProps {
15
+ label: string;
16
+ /**
17
+ * Run a long list in columns instead of one stack. Steps down to a single
18
+ * column inside a narrow container.
19
+ */
20
+ columns?: 1 | 2 | 3;
21
+ children: ReactNode;
22
+ }
23
+ /** A set of checkboxes or radios under one group label, spaced by Stack or Grid. */
24
+ export declare function ChoiceGroup({ label, columns, children }: ChoiceGroupProps): import("react").JSX.Element;
25
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Choice/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEhG,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpE,sEAAsE;IACtE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,uEAAuE;AACvE,eAAO,MAAM,QAAQ,4GA0BnB,CAAC;AAEH,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,0EAA0E;AAC1E,eAAO,MAAM,KAAK,yGAgBhB,CAAC;AAEH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,oFAAoF;AACpF,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,OAAW,EAAE,QAAQ,EAAE,EAAE,gBAAgB,+BAa7E"}
@@ -0,0 +1,25 @@
1
+ import { type InputHTMLAttributes, type ReactNode } from "react";
2
+ export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
3
+ /** Display state only — clicking an indeterminate box selects all. */
4
+ isIndeterminate?: boolean;
5
+ children?: ReactNode;
6
+ }
7
+ /** An independent yes/no. 20px box at every size, in every context. */
8
+ export declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
9
+ export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
10
+ children?: ReactNode;
11
+ }
12
+ /** One of two or more mutually exclusive choices, all of them visible. */
13
+ export declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HTMLInputElement>>;
14
+ export interface ChoiceGroupProps {
15
+ label: string;
16
+ /**
17
+ * Run a long list in columns instead of one stack. Steps down to a single
18
+ * column inside a narrow container.
19
+ */
20
+ columns?: 1 | 2 | 3;
21
+ children: ReactNode;
22
+ }
23
+ /** A set of checkboxes or radios under one group label, spaced by Stack or Grid. */
24
+ export declare function ChoiceGroup({ label, columns, children }: ChoiceGroupProps): import("react").JSX.Element;
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Choice/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEhG,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpE,sEAAsE;IACtE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,uEAAuE;AACvE,eAAO,MAAM,QAAQ,4GA0BnB,CAAC;AAEH,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,0EAA0E;AAC1E,eAAO,MAAM,KAAK,yGAgBhB,CAAC;AAEH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,oFAAoF;AACpF,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,OAAW,EAAE,QAAQ,EAAE,EAAE,gBAAgB,+BAa7E"}
@@ -0,0 +1,58 @@
1
+ import { Grid as e, Stack as t } from "../Grid/index.js";
2
+ import { forwardRef as n, useEffect as r, useRef as i } from "react";
3
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
4
+ //#region src/components/Choice/index.tsx
5
+ var s = n(function({ isIndeterminate: e = !1, className: t, children: n, ...s }, c) {
6
+ let l = i(null);
7
+ return r(() => {
8
+ l.current && (l.current.indeterminate = e);
9
+ }, [e]), /* @__PURE__ */ o("label", {
10
+ className: ["ds-choice", t].filter(Boolean).join(" "),
11
+ children: [/* @__PURE__ */ a("input", {
12
+ type: "checkbox",
13
+ className: "ds-choice__control",
14
+ "data-kind": "checkbox",
15
+ ref: (e) => {
16
+ l.current = e, typeof c == "function" ? c(e) : c && (c.current = e);
17
+ },
18
+ ...s
19
+ }), n && /* @__PURE__ */ a("span", {
20
+ className: "ds-choice__label",
21
+ children: n
22
+ })]
23
+ });
24
+ }), c = n(function({ className: e, children: t, ...n }, r) {
25
+ return /* @__PURE__ */ o("label", {
26
+ className: ["ds-choice", e].filter(Boolean).join(" "),
27
+ children: [/* @__PURE__ */ a("input", {
28
+ ref: r,
29
+ type: "radio",
30
+ className: "ds-choice__control",
31
+ "data-kind": "radio",
32
+ ...n
33
+ }), t && /* @__PURE__ */ a("span", {
34
+ className: "ds-choice__label",
35
+ children: t
36
+ })]
37
+ });
38
+ });
39
+ function l({ label: n, columns: r = 1, children: i }) {
40
+ return /* @__PURE__ */ o("fieldset", {
41
+ className: "ds-choice-group",
42
+ children: [/* @__PURE__ */ a("legend", {
43
+ className: "ds-choice-group__label",
44
+ children: n
45
+ }), r === 1 ? /* @__PURE__ */ a(t, {
46
+ gap: "sm",
47
+ children: i
48
+ }) : /* @__PURE__ */ a(e, {
49
+ columns: r,
50
+ gap: "sm",
51
+ children: i
52
+ })]
53
+ });
54
+ }
55
+ //#endregion
56
+ export { s as Checkbox, l as ChoiceGroup, c as Radio };
57
+
58
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["Checkbox","forwardRef","rest","inner","useRef","useEffect","isIndeterminate","className","node","ref","children","Radio","ChoiceGroup","label","columns","Stack","Grid"],"sources":["../../../src/components/Choice/index.tsx"],"sourcesContent":["import { forwardRef, useEffect, useRef, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { Grid, Stack } from \"../Grid\";\nimport \"./style.css\";\n\nexport interface CheckboxProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"type\" | \"size\"> {\n /** Display state only — clicking an indeterminate box selects all. */\n isIndeterminate?: boolean;\n children?: ReactNode;\n}\n\n/** An independent yes/no. 20px box at every size, in every context. */\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(function Checkbox(\n { isIndeterminate = false, className, children, ...rest },\n ref,\n) {\n const inner = useRef<HTMLInputElement | null>(null);\n\n useEffect(() => {\n if (inner.current) inner.current.indeterminate = isIndeterminate;\n }, [isIndeterminate]);\n\n return (\n <label className={[\"ds-choice\", className].filter(Boolean).join(\" \")}>\n <input\n type=\"checkbox\"\n className=\"ds-choice__control\"\n data-kind=\"checkbox\"\n ref={(node) => {\n inner.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) ref.current = node;\n }}\n {...rest}\n />\n {children && <span className=\"ds-choice__label\">{children}</span>}\n </label>\n );\n});\n\nexport interface RadioProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"type\" | \"size\"> {\n children?: ReactNode;\n}\n\n/** One of two or more mutually exclusive choices, all of them visible. */\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(function Radio(\n { className, children, ...rest },\n ref,\n) {\n return (\n <label className={[\"ds-choice\", className].filter(Boolean).join(\" \")}>\n <input\n ref={ref}\n type=\"radio\"\n className=\"ds-choice__control\"\n data-kind=\"radio\"\n {...rest}\n />\n {children && <span className=\"ds-choice__label\">{children}</span>}\n </label>\n );\n});\n\nexport interface ChoiceGroupProps {\n label: string;\n /**\n * Run a long list in columns instead of one stack. Steps down to a single\n * column inside a narrow container.\n */\n columns?: 1 | 2 | 3;\n children: ReactNode;\n}\n\n/** A set of checkboxes or radios under one group label, spaced by Stack or Grid. */\nexport function ChoiceGroup({ label, columns = 1, children }: ChoiceGroupProps) {\n return (\n <fieldset className=\"ds-choice-group\">\n <legend className=\"ds-choice-group__label\">{label}</legend>\n {columns === 1 ? (\n <Stack gap=\"sm\">{children}</Stack>\n ) : (\n <Grid columns={columns} gap=\"sm\">\n {children}\n </Grid>\n )}\n </fieldset>\n );\n}\n"],"mappings":";;;;AAYA,IAAaA,IAAWC,EAA4C,SAClE,EAAE,qBAAkB,IAAO,cAAW,aAAU,GAAGC,KACnD,GACA;CACA,IAAMC,IAAQC,EAAgC,IAAI;CAMlD,OAJAC,QAAgB;EACd,AAAIF,EAAM,YAAS,EAAM,QAAQ,gBAAgBG;CACnD,GAAG,CAACA,CAAe,CAAC,GAGlB,kBAAC,SAAD;EAAO,WAAW,CAAC,aAAaC,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAAnE,UAAA,CACE,kBAAC,SAAD;GACE,MAAK;GACL,WAAU;GACV,aAAU;GACV,MAAM,MAAS;IAEb,AADA,EAAM,UAAUC,GACZ,OAAOC,KAAQ,aAAYA,EAAID,CAAI,IAC9BC,MAAK,EAAI,UAAUD;GAC9B;GACA,GAAIN;EACL,CAAA,GACAQ,KAAY,kBAAC,QAAD;GAAM,WAAU;GAAoB;EAAe,CAAA,CAC3D;;AAEX,CAAC,GAQYC,IAAQV,EAAyC,SAC5D,EAAE,cAAW,aAAU,GAAGC,KAC1B,GACA;CACA,OACE,kBAAC,SAAD;EAAO,WAAW,CAAC,aAAaK,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAAnE,UAAA,CACE,kBAAC,SAAD;GACO;GACL,MAAK;GACL,WAAU;GACV,aAAU;GACV,GAAIL;EACL,CAAA,GACAQ,KAAY,kBAAC,QAAD;GAAM,WAAU;GAAoB;EAAe,CAAA,CAC3D;;AAEX,CAAC;AAaD,SAAgBE,EAAY,EAAE,UAAO,aAAU,GAAG,eAA8B;CAC9E,OACE,kBAAC,YAAD;EAAU,WAAU;EAApB,UAAA,CACE,kBAAC,UAAD;GAAQ,WAAU;GAA0B,UAAAC;EAAc,CAAA,GACzDC,MAAY,IACX,kBAACC,GAAD;GAAO,KAAI;GAAM;EAAgB,CAAA,IAEjC,kBAACC,GAAD;GAAe;GAAS,KAAI;GACzB;EACG,CAAA,CAEA;;AAEd"}
@@ -0,0 +1,96 @@
1
+ @layer components {
2
+ .ds-choice {
3
+ display: inline-flex;
4
+ align-items: start;
5
+ gap: 10px;
6
+ font-size: var(--font-size-md);
7
+ line-height: var(--line-height-body);
8
+ cursor: pointer;
9
+ }
10
+
11
+ .ds-choice__control {
12
+ appearance: none;
13
+ flex: none;
14
+ inline-size: var(--icon-md);
15
+ block-size: var(--icon-md);
16
+ margin: 0;
17
+ margin-block-start: calc((1lh - var(--icon-md)) / 2);
18
+ border: var(--control-border-width) solid var(--control-border-color);
19
+ background: var(--color-surface);
20
+ cursor: pointer;
21
+ display: grid;
22
+ place-content: center;
23
+ transition: background-color var(--duration-fast) var(--ease-standard);
24
+ }
25
+
26
+ .ds-choice__control[data-kind="checkbox"] {
27
+ border-radius: var(--field-radius);
28
+ }
29
+
30
+ .ds-choice__control[data-kind="radio"] {
31
+ border-radius: var(--radius-pill);
32
+ }
33
+
34
+ .ds-choice__control:hover:not(:disabled) {
35
+ background: var(--field-hover);
36
+ }
37
+
38
+ .ds-choice__control:focus-visible {
39
+ outline: var(--control-border-width) solid var(--color-focus);
40
+ outline-offset: 2px;
41
+ }
42
+
43
+ /* Checked checkbox: filled box, tick in the on-solid colour. */
44
+ .ds-choice__control[data-kind="checkbox"]:checked,
45
+ .ds-choice__control[data-kind="checkbox"]:indeterminate {
46
+ background: var(--color-primary);
47
+ }
48
+
49
+ .ds-choice__control[data-kind="checkbox"]:checked::before {
50
+ content: "";
51
+ inline-size: 13px;
52
+ block-size: 13px;
53
+ background: var(--color-text-on-solid);
54
+ clip-path: polygon(14% 47%, 0 61%, 40% 100%, 100% 22%, 85% 10%, 38% 71%);
55
+ }
56
+
57
+ .ds-choice__control[data-kind="checkbox"]:indeterminate::before {
58
+ content: "";
59
+ inline-size: 10px;
60
+ block-size: 2px;
61
+ background: var(--color-text-on-solid);
62
+ }
63
+
64
+ /* Selected radio: surface fill keeps, dot sits inside. */
65
+ .ds-choice__control[data-kind="radio"]:checked::before {
66
+ content: "";
67
+ inline-size: var(--space-2);
68
+ block-size: var(--space-2);
69
+ border-radius: var(--radius-pill);
70
+ background: var(--color-primary);
71
+ }
72
+
73
+ .ds-choice__control[aria-invalid="true"] {
74
+ border-color: var(--color-danger);
75
+ }
76
+
77
+ .ds-choice:has(.ds-choice__control:disabled) {
78
+ cursor: not-allowed;
79
+ opacity: 45%;
80
+ }
81
+
82
+ /* Spacing comes from the Stack or Grid inside. */
83
+ .ds-choice-group {
84
+ margin: 0;
85
+ padding: 0;
86
+ border: 0;
87
+ min-inline-size: 0;
88
+ }
89
+
90
+ .ds-choice-group__label {
91
+ padding: 0;
92
+ margin-block-end: var(--space-1);
93
+ font-size: var(--font-size-sm);
94
+ font-weight: var(--font-weight-semibold);
95
+ }
96
+ }
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime");var n=(0,e.forwardRef)(function({width:e=`lg`,padded:n=!0,center:r=!0,as:i=`div`,className:a,...o},s){return(0,t.jsx)(i,{ref:s,className:[`ds-container`,`ds-container--${e}`,n?`ds-container--padded`:null,r?`ds-container--center`:null,a].filter(Boolean).join(` `),...o})});exports.Container=n;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["forwardRef","react","react_jsx_runtime","Container","Tag","rest","width","padded","center","className"],"sources":["../../../src/components/Container/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes } from \"react\";\nimport \"./style.css\";\n\n/** The house measure scale. `full` is \"as wide as the slot allows\". */\nexport type ContainerWidth = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\";\n\nexport interface ContainerProps extends HTMLAttributes<HTMLDivElement> {\n /** Reading width. `sm` for a form, `md` for prose, `lg` for a page body. */\n width?: ContainerWidth;\n /** Gutters either side. Off inside a surface that already has padding. */\n padded?: boolean;\n /** Centre the measure in its slot. On by default. */\n center?: boolean;\n as?: \"div\" | \"main\" | \"section\" | \"article\" | \"header\" | \"footer\";\n}\n\n/**\n * Holds content to one of the system's widths and — because it declares a\n * size container — lets everything inside respond to the measure it was given\n * rather than to the window.\n */\nexport const Container = forwardRef<HTMLDivElement, ContainerProps>(function Container(\n { width = \"lg\", padded = true, center = true, as: Tag = \"div\", className, ...rest },\n ref,\n) {\n return (\n <Tag\n ref={ref as never}\n className={[\n \"ds-container\",\n `ds-container--${width}`,\n padded ? \"ds-container--padded\" : null,\n center ? \"ds-container--center\" : null,\n className,\n ]\n .filter(Boolean)\n .join(\" \")}\n {...rest}\n />\n );\n});\n"],"mappings":"A,yHAqBA,IAAaG,GAAA,EAAYH,EAAAA,WAAAA,CAA2C,SAClE,CAAE,QAAQ,KAAM,SAAS,GAAM,SAAS,GAAM,GAAII,EAAM,MAAO,YAAW,GAAGC,GAC7E,EACA,CACA,OACE,EAAAH,EAAA,IAAA,CAACE,EAAD,CACO,MACL,UAAW,CACT,eACA,iBAAiBE,IACjBC,EAAS,uBAAyB,KAClCC,EAAS,uBAAyB,KAClCC,CACF,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG,EACX,GAAIJ,CACL,CAAA,CAEL,CAAC,E"}
@@ -0,0 +1,19 @@
1
+ import { type HTMLAttributes } from "react";
2
+ /** The house measure scale. `full` is "as wide as the slot allows". */
3
+ export type ContainerWidth = "xs" | "sm" | "md" | "lg" | "xl" | "full";
4
+ export interface ContainerProps extends HTMLAttributes<HTMLDivElement> {
5
+ /** Reading width. `sm` for a form, `md` for prose, `lg` for a page body. */
6
+ width?: ContainerWidth;
7
+ /** Gutters either side. Off inside a surface that already has padding. */
8
+ padded?: boolean;
9
+ /** Centre the measure in its slot. On by default. */
10
+ center?: boolean;
11
+ as?: "div" | "main" | "section" | "article" | "header" | "footer";
12
+ }
13
+ /**
14
+ * Holds content to one of the system's widths and — because it declares a
15
+ * size container — lets everything inside respond to the measure it was given
16
+ * rather than to the window.
17
+ */
18
+ export declare const Container: import("react").ForwardRefExoticComponent<ContainerProps & import("react").RefAttributes<HTMLDivElement>>;
19
+ //# sourceMappingURL=index.d.cts.map