@lt-three/love3 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 (378) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +86 -2
  3. package/dist/native/analytics/animation.d.ts +4 -0
  4. package/dist/native/analytics/animation.js +6 -0
  5. package/dist/native/analytics/chart.types.d.ts +25 -0
  6. package/dist/native/analytics/chart.types.js +0 -0
  7. package/dist/native/analytics/line-chart.d.ts +4 -0
  8. package/dist/native/analytics/line-chart.ios.d.ts +4 -0
  9. package/dist/native/analytics/line-chart.ios.js +24 -0
  10. package/dist/native/analytics/line-chart.js +33 -0
  11. package/dist/native/analytics/metric-card.d.ts +10 -0
  12. package/dist/native/analytics/metric-card.js +29 -0
  13. package/dist/native/analytics/multi-line-chart.d.ts +17 -0
  14. package/dist/native/analytics/multi-line-chart.js +215 -0
  15. package/dist/native/analytics/pie-chart.d.ts +15 -0
  16. package/dist/native/analytics/pie-chart.ios.d.ts +4 -0
  17. package/dist/native/analytics/pie-chart.ios.js +24 -0
  18. package/dist/native/analytics/pie-chart.js +92 -0
  19. package/dist/native/analytics/single-number.d.ts +19 -0
  20. package/dist/native/analytics/single-number.js +101 -0
  21. package/dist/native/atom/avatar.d.ts +21 -0
  22. package/dist/native/atom/avatar.js +46 -0
  23. package/dist/native/atom/badge.d.ts +28 -0
  24. package/dist/native/atom/badge.js +51 -0
  25. package/dist/native/atom/button.d.ts +46 -0
  26. package/dist/native/atom/button.js +109 -0
  27. package/dist/native/atom/checkbox.d.ts +21 -0
  28. package/dist/native/atom/checkbox.js +47 -0
  29. package/dist/native/atom/colored-value.d.ts +12 -0
  30. package/dist/native/atom/colored-value.js +24 -0
  31. package/dist/native/atom/image.d.ts +21 -0
  32. package/dist/native/atom/image.js +72 -0
  33. package/dist/native/atom/label.d.ts +18 -0
  34. package/dist/native/atom/label.js +33 -0
  35. package/dist/native/atom/link.d.ts +18 -0
  36. package/dist/native/atom/link.js +25 -0
  37. package/dist/native/atom/readout.d.ts +22 -0
  38. package/dist/native/atom/readout.js +39 -0
  39. package/dist/native/atom/search-input.d.ts +12 -0
  40. package/dist/native/atom/search-input.js +36 -0
  41. package/dist/native/atom/select.d.ts +54 -0
  42. package/dist/native/atom/select.js +200 -0
  43. package/dist/native/atom/separator.d.ts +13 -0
  44. package/dist/native/atom/separator.js +17 -0
  45. package/dist/native/atom/skeleton.d.ts +12 -0
  46. package/dist/native/atom/skeleton.js +39 -0
  47. package/dist/native/atom/slider.d.ts +32 -0
  48. package/dist/native/atom/slider.js +75 -0
  49. package/dist/native/atom/spinner.d.ts +15 -0
  50. package/dist/native/atom/spinner.js +25 -0
  51. package/dist/native/atom/switch.d.ts +18 -0
  52. package/dist/native/atom/switch.js +52 -0
  53. package/dist/native/atom/symbol.d.ts +16 -0
  54. package/dist/native/atom/symbol.js +38 -0
  55. package/dist/native/atom/symbol.types.d.ts +25 -0
  56. package/dist/native/atom/symbol.types.js +49 -0
  57. package/dist/native/atom/text-field.d.ts +49 -0
  58. package/dist/native/atom/text-field.js +56 -0
  59. package/dist/native/atom/text.d.ts +2 -0
  60. package/dist/native/atom/text.js +3 -0
  61. package/dist/native/atom/theme-toggle.d.ts +21 -0
  62. package/dist/native/atom/theme-toggle.js +36 -0
  63. package/dist/native/atom/timezone-select.d.ts +16 -0
  64. package/dist/native/atom/timezone-select.js +28 -0
  65. package/dist/native/atom/typography.d.ts +13 -0
  66. package/dist/native/atom/typography.js +28 -0
  67. package/dist/native/base/button.d.ts +61 -0
  68. package/dist/native/base/button.js +92 -0
  69. package/dist/native/base/form.d.ts +72 -0
  70. package/dist/native/base/form.js +113 -0
  71. package/dist/native/base/glass-card.d.ts +15 -0
  72. package/dist/native/base/glass-card.js +38 -0
  73. package/dist/native/base/input.d.ts +29 -0
  74. package/dist/native/base/input.js +27 -0
  75. package/dist/native/base/sheet.d.ts +71 -0
  76. package/dist/native/base/sheet.js +187 -0
  77. package/dist/native/base/text.d.ts +14 -0
  78. package/dist/native/base/text.js +53 -0
  79. package/dist/native/form/checkbox.d.ts +13 -0
  80. package/dist/native/form/checkbox.js +55 -0
  81. package/dist/native/form/date-picker.d.ts +23 -0
  82. package/dist/native/form/date-picker.js +119 -0
  83. package/dist/native/form/form.d.ts +23 -0
  84. package/dist/native/form/form.js +45 -0
  85. package/dist/native/form/radio-group.d.ts +23 -0
  86. package/dist/native/form/radio-group.js +88 -0
  87. package/dist/native/form/select.d.ts +13 -0
  88. package/dist/native/form/select.js +45 -0
  89. package/dist/native/form/slider.d.ts +14 -0
  90. package/dist/native/form/slider.js +42 -0
  91. package/dist/native/form/switch.d.ts +9 -0
  92. package/dist/native/form/switch.js +59 -0
  93. package/dist/native/form/text-area.d.ts +11 -0
  94. package/dist/native/form/text-area.js +50 -0
  95. package/dist/native/form/text-input.d.ts +18 -0
  96. package/dist/native/form/text-input.js +90 -0
  97. package/dist/native/index.d.ts +1 -0
  98. package/dist/native/index.js +0 -0
  99. package/dist/native/layout/accordion.d.ts +25 -0
  100. package/dist/native/layout/accordion.js +54 -0
  101. package/dist/native/layout/card.d.ts +47 -0
  102. package/dist/native/layout/card.js +57 -0
  103. package/dist/native/layout/description.d.ts +16 -0
  104. package/dist/native/layout/description.js +32 -0
  105. package/dist/native/layout/error.d.ts +21 -0
  106. package/dist/native/layout/error.js +44 -0
  107. package/dist/native/layout/information.d.ts +25 -0
  108. package/dist/native/layout/information.js +35 -0
  109. package/dist/native/layout/locked.d.ts +38 -0
  110. package/dist/native/layout/locked.js +94 -0
  111. package/dist/native/layout/modal.d.ts +25 -0
  112. package/dist/native/layout/modal.js +93 -0
  113. package/dist/native/layout/not-found.d.ts +17 -0
  114. package/dist/native/layout/not-found.js +30 -0
  115. package/dist/native/layout/page-frame.d.ts +23 -0
  116. package/dist/native/layout/page-frame.js +46 -0
  117. package/dist/native/layout/panel.d.ts +18 -0
  118. package/dist/native/layout/panel.js +23 -0
  119. package/dist/native/layout/reorderable-list.d.ts +42 -0
  120. package/dist/native/layout/reorderable-list.js +52 -0
  121. package/dist/native/layout/sheet.d.ts +30 -0
  122. package/dist/native/layout/sheet.js +46 -0
  123. package/dist/native/layout/simple-dialog.d.ts +16 -0
  124. package/dist/native/layout/simple-dialog.js +20 -0
  125. package/dist/native/layout/simple-table.d.ts +50 -0
  126. package/dist/native/layout/simple-table.js +75 -0
  127. package/dist/native/layout/tab-bar.d.ts +33 -0
  128. package/dist/native/layout/tab-bar.js +48 -0
  129. package/dist/native/layout/tabs.d.ts +28 -0
  130. package/dist/native/layout/tabs.js +54 -0
  131. package/dist/native/layout/tuning-panel.d.ts +24 -0
  132. package/dist/native/layout/tuning-panel.js +246 -0
  133. package/dist/native/lib/autocomplete.d.ts +7 -0
  134. package/dist/native/lib/autocomplete.js +34 -0
  135. package/dist/native/lib/breakpoints.d.ts +14 -0
  136. package/dist/native/lib/breakpoints.js +17 -0
  137. package/dist/native/lib/chart-palette.d.ts +8 -0
  138. package/dist/native/lib/chart-palette.js +20 -0
  139. package/dist/native/lib/confirm.d.ts +49 -0
  140. package/dist/native/lib/confirm.js +70 -0
  141. package/dist/native/lib/control.d.ts +24 -0
  142. package/dist/native/lib/control.js +0 -0
  143. package/dist/native/lib/external-store.d.ts +17 -0
  144. package/dist/native/lib/external-store.js +30 -0
  145. package/dist/native/lib/keyboard.d.ts +15 -0
  146. package/dist/native/lib/keyboard.js +24 -0
  147. package/dist/native/lib/labels.d.ts +15 -0
  148. package/dist/native/lib/labels.js +17 -0
  149. package/dist/native/lib/loading.d.ts +10 -0
  150. package/dist/native/lib/loading.js +15 -0
  151. package/dist/native/lib/network.d.ts +12 -0
  152. package/dist/native/lib/network.js +21 -0
  153. package/dist/native/lib/scheme.d.ts +18 -0
  154. package/dist/native/lib/scheme.js +22 -0
  155. package/dist/native/lib/snackbar.d.ts +46 -0
  156. package/dist/native/lib/snackbar.js +60 -0
  157. package/dist/native/lib/theme.d.ts +34 -0
  158. package/dist/native/lib/theme.js +53 -0
  159. package/dist/native/lib/timezone.d.ts +26 -0
  160. package/dist/native/lib/timezone.js +95 -0
  161. package/dist/native/lib/token-color.d.ts +5 -0
  162. package/dist/native/lib/token-color.js +13 -0
  163. package/dist/native/lib/token-color.web.d.ts +4 -0
  164. package/dist/native/lib/token-color.web.js +7 -0
  165. package/dist/native/lib/tuning-context.d.ts +9 -0
  166. package/dist/native/lib/tuning-context.js +7 -0
  167. package/dist/native/lib/tuning.d.ts +24 -0
  168. package/dist/native/lib/tuning.js +42 -0
  169. package/dist/native/lib/typography.d.ts +10 -0
  170. package/dist/native/lib/typography.js +11 -0
  171. package/dist/native/lib/utils.d.ts +11 -0
  172. package/dist/native/lib/utils.js +21 -0
  173. package/dist/native/once/confirm.d.ts +7 -0
  174. package/dist/native/once/confirm.js +60 -0
  175. package/dist/native/once/error-boundary.d.ts +28 -0
  176. package/dist/native/once/error-boundary.js +55 -0
  177. package/dist/native/once/loading-lock.d.ts +8 -0
  178. package/dist/native/once/loading-lock.js +28 -0
  179. package/dist/native/once/offline-banner.d.ts +15 -0
  180. package/dist/native/once/offline-banner.js +35 -0
  181. package/dist/native/once/snackbar.d.ts +17 -0
  182. package/dist/native/once/snackbar.js +106 -0
  183. package/dist/native/styles.css +46 -0
  184. package/dist/shared/analytics.d.ts +71 -0
  185. package/dist/shared/analytics.js +0 -0
  186. package/dist/shared/button.d.ts +7 -0
  187. package/dist/shared/button.js +23 -0
  188. package/dist/shared/form.d.ts +45 -0
  189. package/dist/shared/form.js +46 -0
  190. package/dist/shared/index.d.ts +3 -0
  191. package/dist/shared/index.js +3 -0
  192. package/dist/tokens/contrast-pairs.d.ts +30 -0
  193. package/dist/tokens/contrast-pairs.js +404 -0
  194. package/dist/tokens/index.d.ts +6 -0
  195. package/dist/tokens/index.js +10 -0
  196. package/dist/tokens/styles.gen.css +250 -0
  197. package/dist/tokens/tokens.gen.d.ts +141 -0
  198. package/dist/tokens/tokens.gen.js +206 -0
  199. package/dist/tuning/catalog.d.ts +27 -0
  200. package/dist/tuning/catalog.gen.d.ts +4 -0
  201. package/dist/tuning/catalog.gen.js +397 -0
  202. package/dist/tuning/catalog.js +128 -0
  203. package/dist/tuning/color.d.ts +20 -0
  204. package/dist/tuning/color.js +80 -0
  205. package/dist/tuning/css.d.ts +35 -0
  206. package/dist/tuning/css.js +147 -0
  207. package/dist/tuning/index.d.ts +8 -0
  208. package/dist/tuning/index.js +9 -0
  209. package/dist/tuning/model.d.ts +33 -0
  210. package/dist/tuning/model.js +154 -0
  211. package/dist/tuning/native.d.ts +35 -0
  212. package/dist/tuning/native.js +80 -0
  213. package/dist/tuning/schema.d.ts +69 -0
  214. package/dist/tuning/schema.js +247 -0
  215. package/dist/tuning/types.d.ts +75 -0
  216. package/dist/tuning/types.js +39 -0
  217. package/dist/web/analytics/line-chart.d.ts +20 -0
  218. package/dist/web/analytics/line-chart.js +28 -0
  219. package/dist/web/analytics/metric-card.d.ts +18 -0
  220. package/dist/web/analytics/metric-card.js +40 -0
  221. package/dist/web/analytics/multi-line-chart.d.ts +39 -0
  222. package/dist/web/analytics/multi-line-chart.js +345 -0
  223. package/dist/web/atom/avatar.d.ts +11 -0
  224. package/dist/web/atom/avatar.js +24 -0
  225. package/dist/web/atom/badge.d.ts +2 -0
  226. package/dist/web/atom/badge.js +3 -0
  227. package/dist/web/atom/button.d.ts +23 -0
  228. package/dist/web/atom/button.js +35 -0
  229. package/dist/web/atom/checkbox.d.ts +19 -0
  230. package/dist/web/atom/checkbox.js +33 -0
  231. package/dist/web/atom/colored-value.d.ts +13 -0
  232. package/dist/web/atom/colored-value.js +24 -0
  233. package/dist/web/atom/help.d.ts +10 -0
  234. package/dist/web/atom/help.js +18 -0
  235. package/dist/web/atom/label.d.ts +2 -0
  236. package/dist/web/atom/label.js +3 -0
  237. package/dist/web/atom/segmented-control.d.ts +40 -0
  238. package/dist/web/atom/segmented-control.js +43 -0
  239. package/dist/web/atom/select.d.ts +43 -0
  240. package/dist/web/atom/select.js +93 -0
  241. package/dist/web/atom/separator.d.ts +2 -0
  242. package/dist/web/atom/separator.js +3 -0
  243. package/dist/web/atom/skeleton.d.ts +2 -0
  244. package/dist/web/atom/skeleton.js +3 -0
  245. package/dist/web/atom/slider.d.ts +33 -0
  246. package/dist/web/atom/slider.js +70 -0
  247. package/dist/web/atom/spinner.d.ts +8 -0
  248. package/dist/web/atom/spinner.js +14 -0
  249. package/dist/web/atom/switch.d.ts +11 -0
  250. package/dist/web/atom/switch.js +10 -0
  251. package/dist/web/atom/text-area.d.ts +22 -0
  252. package/dist/web/atom/text-area.js +26 -0
  253. package/dist/web/atom/text-field.d.ts +17 -0
  254. package/dist/web/atom/text-field.js +21 -0
  255. package/dist/web/atom/toggle-chip.d.ts +22 -0
  256. package/dist/web/atom/toggle-chip.js +28 -0
  257. package/dist/web/atom/tooltip.d.ts +23 -0
  258. package/dist/web/atom/tooltip.js +26 -0
  259. package/dist/web/atom/typography.d.ts +6 -0
  260. package/dist/web/atom/typography.js +23 -0
  261. package/dist/web/base/accordion.d.ts +9 -0
  262. package/dist/web/base/accordion.js +44 -0
  263. package/dist/web/base/alert.d.ts +11 -0
  264. package/dist/web/base/alert.js +37 -0
  265. package/dist/web/base/avatar.d.ts +8 -0
  266. package/dist/web/base/avatar.js +29 -0
  267. package/dist/web/base/badge.d.ts +12 -0
  268. package/dist/web/base/badge.js +26 -0
  269. package/dist/web/base/breadcrumb.d.ts +16 -0
  270. package/dist/web/base/breadcrumb.js +72 -0
  271. package/dist/web/base/button.d.ts +12 -0
  272. package/dist/web/base/button.js +47 -0
  273. package/dist/web/base/card.d.ts +19 -0
  274. package/dist/web/base/card.js +74 -0
  275. package/dist/web/base/checkbox.d.ts +6 -0
  276. package/dist/web/base/checkbox.js +21 -0
  277. package/dist/web/base/dialog.d.ts +20 -0
  278. package/dist/web/base/dialog.js +92 -0
  279. package/dist/web/base/dropdown-menu.d.ts +29 -0
  280. package/dist/web/base/dropdown-menu.js +125 -0
  281. package/dist/web/base/field.d.ts +27 -0
  282. package/dist/web/base/field.js +118 -0
  283. package/dist/web/base/form.d.ts +38 -0
  284. package/dist/web/base/form.js +110 -0
  285. package/dist/web/base/input.d.ts +9 -0
  286. package/dist/web/base/input.js +23 -0
  287. package/dist/web/base/label.d.ts +6 -0
  288. package/dist/web/base/label.js +15 -0
  289. package/dist/web/base/pagination.d.ts +34 -0
  290. package/dist/web/base/pagination.js +90 -0
  291. package/dist/web/base/popover.d.ts +11 -0
  292. package/dist/web/base/popover.js +37 -0
  293. package/dist/web/base/radio-group.d.ts +7 -0
  294. package/dist/web/base/radio-group.js +27 -0
  295. package/dist/web/base/scroll-area.d.ts +10 -0
  296. package/dist/web/base/scroll-area.js +41 -0
  297. package/dist/web/base/select.d.ts +17 -0
  298. package/dist/web/base/select.js +96 -0
  299. package/dist/web/base/separator.d.ts +6 -0
  300. package/dist/web/base/separator.js +17 -0
  301. package/dist/web/base/sheet.d.ts +19 -0
  302. package/dist/web/base/sheet.js +88 -0
  303. package/dist/web/base/skeleton.d.ts +5 -0
  304. package/dist/web/base/skeleton.js +14 -0
  305. package/dist/web/base/slider.d.ts +9 -0
  306. package/dist/web/base/slider.js +39 -0
  307. package/dist/web/base/sonner.d.ts +9 -0
  308. package/dist/web/base/sonner.js +25 -0
  309. package/dist/web/base/spinner.d.ts +5 -0
  310. package/dist/web/base/spinner.js +17 -0
  311. package/dist/web/base/switch.d.ts +6 -0
  312. package/dist/web/base/switch.js +19 -0
  313. package/dist/web/base/table.d.ts +14 -0
  314. package/dist/web/base/table.js +68 -0
  315. package/dist/web/base/tabs.d.ts +9 -0
  316. package/dist/web/base/tabs.js +36 -0
  317. package/dist/web/base/textarea.d.ts +9 -0
  318. package/dist/web/base/textarea.js +23 -0
  319. package/dist/web/base/tooltip.d.ts +9 -0
  320. package/dist/web/base/tooltip.js +36 -0
  321. package/dist/web/form/checkbox.d.ts +35 -0
  322. package/dist/web/form/checkbox.js +91 -0
  323. package/dist/web/form/radio-group.d.ts +24 -0
  324. package/dist/web/form/radio-group.js +75 -0
  325. package/dist/web/form/select.d.ts +16 -0
  326. package/dist/web/form/select.js +44 -0
  327. package/dist/web/form/slider.d.ts +19 -0
  328. package/dist/web/form/slider.js +51 -0
  329. package/dist/web/form/switch.d.ts +11 -0
  330. package/dist/web/form/switch.js +50 -0
  331. package/dist/web/form/text-area.d.ts +10 -0
  332. package/dist/web/form/text-area.js +31 -0
  333. package/dist/web/form/text-input.d.ts +10 -0
  334. package/dist/web/form/text-input.js +42 -0
  335. package/dist/web/index.d.ts +1 -0
  336. package/dist/web/index.js +0 -0
  337. package/dist/web/layout/accordion.d.ts +26 -0
  338. package/dist/web/layout/accordion.js +29 -0
  339. package/dist/web/layout/alert-modal.d.ts +41 -0
  340. package/dist/web/layout/alert-modal.js +71 -0
  341. package/dist/web/layout/card.d.ts +17 -0
  342. package/dist/web/layout/card.js +35 -0
  343. package/dist/web/layout/description.d.ts +12 -0
  344. package/dist/web/layout/description.js +20 -0
  345. package/dist/web/layout/information.d.ts +36 -0
  346. package/dist/web/layout/information.js +53 -0
  347. package/dist/web/layout/modal.d.ts +16 -0
  348. package/dist/web/layout/modal.js +37 -0
  349. package/dist/web/layout/page-frame.d.ts +37 -0
  350. package/dist/web/layout/page-frame.js +79 -0
  351. package/dist/web/layout/scroll-area.d.ts +10 -0
  352. package/dist/web/layout/scroll-area.js +13 -0
  353. package/dist/web/layout/sheet.d.ts +32 -0
  354. package/dist/web/layout/sheet.js +68 -0
  355. package/dist/web/layout/simple-dialog.d.ts +11 -0
  356. package/dist/web/layout/simple-dialog.js +24 -0
  357. package/dist/web/layout/simple-table.d.ts +49 -0
  358. package/dist/web/layout/simple-table.js +58 -0
  359. package/dist/web/layout/tabs.d.ts +26 -0
  360. package/dist/web/layout/tabs.js +42 -0
  361. package/dist/web/layout/titled-modal.d.ts +33 -0
  362. package/dist/web/layout/titled-modal.js +59 -0
  363. package/dist/web/lib/css-vars.d.ts +14 -0
  364. package/dist/web/lib/css-vars.js +18 -0
  365. package/dist/web/lib/dialog.d.ts +13 -0
  366. package/dist/web/lib/dialog.js +0 -0
  367. package/dist/web/lib/form.d.ts +2 -0
  368. package/dist/web/lib/form.js +3 -0
  369. package/dist/web/lib/labels.d.ts +27 -0
  370. package/dist/web/lib/labels.js +29 -0
  371. package/dist/web/lib/modal-open-focus.d.ts +17 -0
  372. package/dist/web/lib/modal-open-focus.js +44 -0
  373. package/dist/web/lib/restore-focus.d.ts +12 -0
  374. package/dist/web/lib/restore-focus.js +32 -0
  375. package/dist/web/lib/utils.d.ts +4 -0
  376. package/dist/web/lib/utils.js +10 -0
  377. package/dist/web/styles.css +162 -0
  378. package/package.json +205 -4
@@ -0,0 +1,43 @@
1
+ import { cn } from "../lib/utils.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+
4
+ //#region src/web/atom/segmented-control.tsx
5
+ const SIZE = {
6
+ xs: "px-2 py-1 text-xs",
7
+ sm: "px-3 py-1.5 text-sm",
8
+ md: "px-4 py-[9px] text-base leading-[26px]"
9
+ };
10
+ /**
11
+ * 排他選択の横並び(タブ・モード選択・間隔選択・絞り込みの種別)。
12
+ *
13
+ * 選択中はインディゴ(action)塗り + 白文字になる(角丸は control の段)。
14
+ * `role="radiogroup"` を張り、各セグメントに `aria-checked` を付けるので、
15
+ * 使用側が aria を組み立てる必要はない。
16
+ *
17
+ * アプリ側で `.map` して `<button>` に三項の className を当てる形が
18
+ * 18 箇所書かれていた。仕切り線・選択時の見た目の切り替え・キーボード操作の扱いが
19
+ * 少しずつ違っていたため、1 つにまとめている。
20
+ */
21
+ function SegmentedControl({ value, onValueChange, options, variant = "joined", size = "sm", fill, className, "aria-label": ariaLabel }) {
22
+ return /* @__PURE__ */ jsx("div", {
23
+ role: "radiogroup",
24
+ "aria-label": ariaLabel,
25
+ className: cn("inline-flex", fill && "flex w-full", variant === "joined" && "border-input bg-card rounded-control border", variant === "separate" && "gap-1", className),
26
+ children: options.map((option) => {
27
+ const active = option.value === value;
28
+ return /* @__PURE__ */ jsx("button", {
29
+ type: "button",
30
+ role: "radio",
31
+ "aria-checked": active,
32
+ disabled: option.disabled,
33
+ "data-testid": option.testId,
34
+ onClick: () => onValueChange(option.value),
35
+ className: cn("cursor-pointer whitespace-nowrap transition-colors disabled:cursor-not-allowed disabled:opacity-50", SIZE[size], fill && "flex-1", variant === "joined" && "not-first:border-input not-first:border-l first:rounded-l-control last:rounded-r-control", variant === "separate" && "border-input bg-card rounded-control border", variant === "underline" && "border-b-2 border-transparent", variant === "solid" && "border-input bg-card not-first:-ml-px first:rounded-l-control last:rounded-r-control border", active ? variant === "underline" ? "border-action text-foreground font-medium" : cn("bg-action text-action-foreground", variant === "solid" && "border-action relative") : "text-muted-foreground hover:bg-accent hover:text-foreground"),
36
+ children: option.label
37
+ }, String(option.value));
38
+ })
39
+ });
40
+ }
41
+
42
+ //#endregion
43
+ export { SegmentedControl };
@@ -0,0 +1,43 @@
1
+ import { SelectTrigger } from "../base/select.js";
2
+ import { ComponentProps, ReactNode } from "react";
3
+ //#region src/web/atom/select.d.ts
4
+ export type SelectOption = {
5
+ value: string;
6
+ label: ReactNode;
7
+ /** テキスト検索用(label が ReactNode の場合に指定) */
8
+ textValue?: string;
9
+ };
10
+ export type SelectOptionGroup = {
11
+ label: ReactNode;
12
+ options: SelectOption[];
13
+ };
14
+ export type SelectProps = {
15
+ value: string;
16
+ onValueChange: (value: string) => void;
17
+ options: (SelectOption | SelectOptionGroup)[];
18
+ placeholder?: string;
19
+ label?: ReactNode;
20
+ required?: boolean;
21
+ description?: ReactNode;
22
+ helpText?: ReactNode;
23
+ className?: string;
24
+ wrapperClassName?: string;
25
+ disabled?: boolean;
26
+ size?: "xs" | "sm" | "default";
27
+ /** open 状態の制御 (インライン編集など) */
28
+ open?: boolean;
29
+ onOpenChange?: (open: boolean) => void;
30
+ /** Trigger 直接の DOM プロパティ (autoFocus・onBlur 等) */
31
+ triggerProps?: ComponentProps<typeof SelectTrigger>;
32
+ /** form 側でエラーを差し込むためのスロット */
33
+ errorSlot?: ReactNode;
34
+ invalid?: boolean;
35
+ /** DEV-E2E: e2e からトリガーボタンを特定するための ID */
36
+ "data-testid"?: string;
37
+ /** トリガーの DOM id。外側の `<label htmlFor>` と対応付けるときに使う。 */
38
+ id?: string;
39
+ /** 可視ラベルが無いときのアクセシブル名。`label` を渡す場合は不要。 */
40
+ "aria-label"?: string;
41
+ };
42
+ export declare function Select({ value, onValueChange, options, placeholder, label, required, description, helpText, className, wrapperClassName, disabled, size, open, onOpenChange, triggerProps, errorSlot, invalid, id, "aria-label": ariaLabel, "data-testid": testId }: SelectProps): import("react").JSX.Element;
43
+ //#endregion
@@ -0,0 +1,93 @@
1
+ import { cn } from "../lib/utils.js";
2
+ import { Label } from "../base/label.js";
3
+ import { Select as Select$1, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue } from "../base/select.js";
4
+ import { useId } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+
7
+ //#region src/web/atom/select.tsx
8
+ const EMPTY_SENTINEL = "__atom_select_empty__";
9
+ /**
10
+ * `""` を「選択肢としての空」ではなく「まだ選んでいない」として扱ってよいか。
11
+ *
12
+ * センチネルに置き換えると Radix は**値が選ばれている**と解釈するため、
13
+ * `<SelectValue placeholder>` が一切描画されない(選択肢に無い値なので中身も空になり、
14
+ * トリガーが**無言で空のボタン**になる)。空の選択肢を持たないときは、
15
+ * placeholder を自分で描いて「未選択」と分かる形にする。
16
+ */
17
+ function hasEmptyOption(options) {
18
+ return options.some((o) => isOptionGroup(o) ? o.options.some((x) => x.value === "") : o.value === "");
19
+ }
20
+ function toInternalValue(value) {
21
+ return value === "" ? EMPTY_SENTINEL : value;
22
+ }
23
+ function fromInternalValue(value) {
24
+ return value === EMPTY_SENTINEL ? "" : value;
25
+ }
26
+ function isOptionGroup(option) {
27
+ return "options" in option;
28
+ }
29
+ function renderOption(option) {
30
+ const v = toInternalValue(option.value);
31
+ return /* @__PURE__ */ jsx(SelectItem, {
32
+ value: v,
33
+ textValue: option.textValue,
34
+ children: option.label
35
+ }, v);
36
+ }
37
+ function Select({ value, onValueChange, options, placeholder, label, required, description, helpText, className, wrapperClassName, disabled, size = "default", open, onOpenChange, triggerProps, errorSlot, invalid, id, "aria-label": ariaLabel, "data-testid": testId }) {
38
+ const generatedId = useId();
39
+ const triggerId = id ?? generatedId;
40
+ const select = /* @__PURE__ */ jsxs(Select$1, {
41
+ value: toInternalValue(value),
42
+ onValueChange: (v) => onValueChange(fromInternalValue(v)),
43
+ disabled,
44
+ open,
45
+ onOpenChange,
46
+ children: [/* @__PURE__ */ jsx(SelectTrigger, {
47
+ id: triggerId,
48
+ size,
49
+ "aria-label": ariaLabel,
50
+ "aria-invalid": invalid,
51
+ "data-testid": testId,
52
+ ...triggerProps,
53
+ className: cn("w-full cursor-pointer", className, triggerProps?.className),
54
+ children: /* @__PURE__ */ jsx(SelectValue, {
55
+ placeholder,
56
+ children: value === "" && !hasEmptyOption(options) ? /* @__PURE__ */ jsx("span", {
57
+ className: "text-muted-foreground",
58
+ children: placeholder
59
+ }) : void 0
60
+ })
61
+ }), /* @__PURE__ */ jsx(SelectContent, { children: options.map((option) => isOptionGroup(option) ? /* @__PURE__ */ jsxs(SelectGroup, { children: [/* @__PURE__ */ jsx(SelectLabel, { children: option.label }), option.options.map(renderOption)] }, typeof option.label === "string" ? option.label : option.options.map((o) => o.value).join(",")) : renderOption(option)) })]
62
+ });
63
+ if (!label && !description && !errorSlot) return select;
64
+ return /* @__PURE__ */ jsxs("div", {
65
+ className: cn("flex flex-col gap-1.5", wrapperClassName),
66
+ children: [
67
+ label && /* @__PURE__ */ jsxs(Label, {
68
+ htmlFor: triggerId,
69
+ className: "font-semibold text-xs opacity-80 flex items-center gap-1",
70
+ children: [
71
+ /* @__PURE__ */ jsx("span", { children: label }),
72
+ required ? /* @__PURE__ */ jsx("span", {
73
+ className: "text-destructive",
74
+ children: "*"
75
+ }) : null,
76
+ helpText ? /* @__PURE__ */ jsx("span", {
77
+ className: "text-muted-foreground font-normal",
78
+ children: helpText
79
+ }) : null
80
+ ]
81
+ }),
82
+ select,
83
+ description && /* @__PURE__ */ jsx("p", {
84
+ className: "text-xs text-muted-foreground",
85
+ children: description
86
+ }),
87
+ errorSlot
88
+ ]
89
+ });
90
+ }
91
+
92
+ //#endregion
93
+ export { Select };
@@ -0,0 +1,2 @@
1
+ import { Separator } from "../base/separator.js";
2
+ export { Separator };
@@ -0,0 +1,3 @@
1
+ import { Separator } from "../base/separator.js";
2
+
3
+ export { Separator };
@@ -0,0 +1,2 @@
1
+ import { Skeleton } from "../base/skeleton.js";
2
+ export { Skeleton };
@@ -0,0 +1,3 @@
1
+ import { Skeleton } from "../base/skeleton.js";
2
+
3
+ export { Skeleton };
@@ -0,0 +1,33 @@
1
+ import { Slider as Slider$1 } from "../base/slider.js";
2
+ import { ComponentProps, ReactNode } from "react";
3
+ //#region src/web/atom/slider.d.ts
4
+ type CommonProps = {
5
+ label?: ReactNode;
6
+ required?: boolean;
7
+ description?: ReactNode;
8
+ helpText?: ReactNode;
9
+ className?: string;
10
+ wrapperClassName?: string;
11
+ errorSlot?: ReactNode;
12
+ invalid?: boolean;
13
+ disabled?: boolean;
14
+ min?: number;
15
+ max: number;
16
+ step?: number;
17
+ /** 値の右側に表示する整形済み文字列。指定が無ければ生の数値(範囲時は ` / ` 区切り)を表示 */
18
+ formattedValue?: ReactNode;
19
+ } & Omit<ComponentProps<typeof Slider$1>, "value" | "onValueChange" | "defaultValue" | "min" | "max" | "step" | "disabled" | "className">;
20
+ export type SliderProps = ({
21
+ value: number;
22
+ onValueChange: (value: number) => void;
23
+ } & CommonProps) | ({
24
+ value: number[];
25
+ onValueChange: (value: number[]) => void;
26
+ } & CommonProps);
27
+ /**
28
+ * 制御専用の Slider。単一値 (`number`) と範囲 (`number[]`) の両方を許容する。
29
+ * Radix Slider は内部的に `number[]` で扱うため、`number` 入力時はランタイムで配列化する。
30
+ */
31
+ export declare function Slider(props: SliderProps): import("react").JSX.Element;
32
+ //#endregion
33
+ export {};
@@ -0,0 +1,70 @@
1
+ import { cn } from "../lib/utils.js";
2
+ import { Label } from "../base/label.js";
3
+ import { Slider as Slider$1 } from "../base/slider.js";
4
+ import { useId } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+
7
+ //#region src/web/atom/slider.tsx
8
+ function isRange(props) {
9
+ return Array.isArray(props.value);
10
+ }
11
+ /**
12
+ * 制御専用の Slider。単一値 (`number`) と範囲 (`number[]`) の両方を許容する。
13
+ * Radix Slider は内部的に `number[]` で扱うため、`number` 入力時はランタイムで配列化する。
14
+ */
15
+ function Slider(props) {
16
+ const { label, required, description, helpText, className, wrapperClassName, errorSlot, invalid, "aria-invalid": ariaInvalid, min, max, step, disabled, formattedValue, value, onValueChange: _onValueChange, ...rest } = props;
17
+ const labelId = useId();
18
+ const sliderValue = Array.isArray(value) ? value : typeof value === "number" ? [value] : [];
19
+ const handleChange = (next) => {
20
+ if (isRange(props)) props.onValueChange(next);
21
+ else if (typeof next[0] === "number") props.onValueChange(next[0]);
22
+ };
23
+ const inlineDisplay = formattedValue ?? sliderValue.join(" / ");
24
+ return /* @__PURE__ */ jsxs("div", {
25
+ className: cn("flex flex-col gap-2", wrapperClassName),
26
+ children: [
27
+ (label || formattedValue !== void 0 || sliderValue.length > 0) && /* @__PURE__ */ jsxs("div", {
28
+ className: "flex items-baseline justify-between gap-2",
29
+ children: [label ? /* @__PURE__ */ jsxs(Label, {
30
+ id: labelId,
31
+ className: "font-semibold text-xs opacity-80 flex items-center gap-1",
32
+ children: [
33
+ /* @__PURE__ */ jsx("span", { children: label }),
34
+ required ? /* @__PURE__ */ jsx("span", {
35
+ className: "text-destructive",
36
+ children: "*"
37
+ }) : null,
38
+ helpText ? /* @__PURE__ */ jsx("span", {
39
+ className: "text-muted-foreground font-normal",
40
+ children: helpText
41
+ }) : null
42
+ ]
43
+ }) : /* @__PURE__ */ jsx("span", {}), /* @__PURE__ */ jsx("span", {
44
+ className: "text-muted-foreground text-sm font-mono tabular-nums",
45
+ children: inlineDisplay
46
+ })]
47
+ }),
48
+ /* @__PURE__ */ jsx(Slider$1, {
49
+ "aria-labelledby": label ? labelId : void 0,
50
+ ...rest,
51
+ "aria-invalid": invalid ?? ariaInvalid,
52
+ value: sliderValue,
53
+ onValueChange: handleChange,
54
+ min,
55
+ max,
56
+ step,
57
+ disabled,
58
+ className: cn("grow", className)
59
+ }),
60
+ description && /* @__PURE__ */ jsx("p", {
61
+ className: "text-xs text-muted-foreground",
62
+ children: description
63
+ }),
64
+ errorSlot
65
+ ]
66
+ });
67
+ }
68
+
69
+ //#endregion
70
+ export { Slider };
@@ -0,0 +1,8 @@
1
+ import { Spinner as Spinner$1 } from "../base/spinner.js";
2
+ import React from "react";
3
+ //#region src/web/atom/spinner.d.ts
4
+ export type SpinnerProps = React.ComponentProps<typeof Spinner$1> & {
5
+ full?: boolean;
6
+ };
7
+ export declare function Spinner({ full, ...props }: SpinnerProps): React.JSX.Element;
8
+ //#endregion
@@ -0,0 +1,14 @@
1
+ import { cn } from "../lib/utils.js";
2
+ import { Spinner as Spinner$1 } from "../base/spinner.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+
5
+ //#region src/web/atom/spinner.tsx
6
+ function Spinner({ full, ...props }) {
7
+ return /* @__PURE__ */ jsx("div", {
8
+ className: cn(full && "grow w-full h-full flex justify-center items-center"),
9
+ children: /* @__PURE__ */ jsx(Spinner$1, { ...props })
10
+ });
11
+ }
12
+
13
+ //#endregion
14
+ export { Spinner };
@@ -0,0 +1,11 @@
1
+ import { Switch as Switch$1 } from "../base/switch.js";
2
+ import { ComponentProps } from "react";
3
+ //#region src/web/atom/switch.d.ts
4
+ /**
5
+ * フォーム外で使える制御モードの Switch。
6
+ * `form/switch.tsx` は TanStack Form の field context に依存するため、
7
+ * 単独の ON/OFF トグルにはこちらを使う。
8
+ */
9
+ export type SwitchProps = ComponentProps<typeof Switch$1>;
10
+ export declare function Switch(props: SwitchProps): import("react").JSX.Element;
11
+ //#endregion
@@ -0,0 +1,10 @@
1
+ import { Switch as Switch$1 } from "../base/switch.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+
4
+ //#region src/web/atom/switch.tsx
5
+ function Switch(props) {
6
+ return /* @__PURE__ */ jsx(Switch$1, { ...props });
7
+ }
8
+
9
+ //#endregion
10
+ export { Switch };
@@ -0,0 +1,22 @@
1
+ import { textareaVariants } from "../base/textarea.js";
2
+ import { ComponentProps } from "react";
3
+ import { VariantProps } from "class-variance-authority";
4
+ //#region src/web/atom/text-area.d.ts
5
+ export type TextAreaProps = Omit<ComponentProps<"textarea">, "value" | "onChange"> & VariantProps<typeof textareaVariants> & {
6
+ value: string;
7
+ onValueChange: (value: string) => void;
8
+ };
9
+ /**
10
+ * 素の複数行入力。TanStack Form を使わない画面(設定・小さな編集欄・読み取り専用の
11
+ * 書き出し)から直接使う。`base/textarea` はアプリから直接 import しない決まりなので、
12
+ * その入口を担う。`atom/text-field` の複数行版。
13
+ *
14
+ * variant は `atom/text-field` と揃えてある:
15
+ * default … 1px の枠を持つ欄
16
+ * `<3` … 既存の行に添える下線だけの欄
17
+ * block … 枠を持たず本文に見える欄(常時編集できる行)
18
+ *
19
+ * フォーム統合が要るときは `form/text-area`(同じ `base/textarea` を内側で使っている)。
20
+ */
21
+ export declare function TextArea({ value, onValueChange, ...props }: TextAreaProps): import("react").JSX.Element;
22
+ //#endregion
@@ -0,0 +1,26 @@
1
+ import { Textarea } from "../base/textarea.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+
4
+ //#region src/web/atom/text-area.tsx
5
+ /**
6
+ * 素の複数行入力。TanStack Form を使わない画面(設定・小さな編集欄・読み取り専用の
7
+ * 書き出し)から直接使う。`base/textarea` はアプリから直接 import しない決まりなので、
8
+ * その入口を担う。`atom/text-field` の複数行版。
9
+ *
10
+ * variant は `atom/text-field` と揃えてある:
11
+ * default … 1px の枠を持つ欄
12
+ * `<3` … 既存の行に添える下線だけの欄
13
+ * block … 枠を持たず本文に見える欄(常時編集できる行)
14
+ *
15
+ * フォーム統合が要るときは `form/text-area`(同じ `base/textarea` を内側で使っている)。
16
+ */
17
+ function TextArea({ value, onValueChange, ...props }) {
18
+ return /* @__PURE__ */ jsx(Textarea, {
19
+ value,
20
+ onChange: (event) => onValueChange(event.target.value),
21
+ ...props
22
+ });
23
+ }
24
+
25
+ //#endregion
26
+ export { TextArea };
@@ -0,0 +1,17 @@
1
+ import { inputVariants } from "../base/input.js";
2
+ import { ComponentProps } from "react";
3
+ import { VariantProps } from "class-variance-authority";
4
+ //#region src/web/atom/text-field.d.ts
5
+ export type TextFieldProps = Omit<ComponentProps<"input">, "value" | "onChange"> & VariantProps<typeof inputVariants> & {
6
+ value: string;
7
+ onValueChange: (value: string) => void;
8
+ };
9
+ /**
10
+ * 素のテキスト入力。TanStack Form を使わない画面(設定・検索条件・小さな編集欄)から
11
+ * 直接使う。`base/input` はアプリから直接 import しない決まりなので、その入口を担う。
12
+ *
13
+ * フォーム統合が要るときは `form/text-input`(同じ `base/input` を内側で使っている)。
14
+ * native の `atom/text-field` と対になる。
15
+ */
16
+ export declare function TextField({ value, onValueChange, ...props }: TextFieldProps): import("react").JSX.Element;
17
+ //#endregion
@@ -0,0 +1,21 @@
1
+ import { Input } from "../base/input.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+
4
+ //#region src/web/atom/text-field.tsx
5
+ /**
6
+ * 素のテキスト入力。TanStack Form を使わない画面(設定・検索条件・小さな編集欄)から
7
+ * 直接使う。`base/input` はアプリから直接 import しない決まりなので、その入口を担う。
8
+ *
9
+ * フォーム統合が要るときは `form/text-input`(同じ `base/input` を内側で使っている)。
10
+ * native の `atom/text-field` と対になる。
11
+ */
12
+ function TextField({ value, onValueChange, ...props }) {
13
+ return /* @__PURE__ */ jsx(Input, {
14
+ value,
15
+ onChange: (event) => onValueChange(event.target.value),
16
+ ...props
17
+ });
18
+ }
19
+
20
+ //#endregion
21
+ export { TextField };
@@ -0,0 +1,22 @@
1
+ import { BadgeVariants } from "../base/badge.js";
2
+ import { ReactNode } from "react";
3
+ //#region src/web/atom/toggle-chip.d.ts
4
+ export type ToggleChipProps = {
5
+ children: ReactNode;
6
+ /** 選択されているか。選択時は `variant` が `default`(インディゴ塗り)になる。 */
7
+ pressed: boolean;
8
+ onPressedChange: (pressed: boolean) => void;
9
+ /** 非選択時の見た目(既定 `outline`)。 */
10
+ inactiveVariant?: BadgeVariants;
11
+ disabled?: boolean;
12
+ className?: string;
13
+ };
14
+ /**
15
+ * 押して選択を切り替える Badge。絞り込みのタグやアカウントの複数選択に使う。
16
+ *
17
+ * `<button>` で `Badge` を包む形はアプリ側で何度も書かれていたが、`type="button"` の
18
+ * 付け忘れや `aria-pressed` の欠落が起きやすい。押下状態の表現(インディゴ塗り)も
19
+ * design system 側で決めるべきものなので、1 つのコンポーネントにまとめている。
20
+ */
21
+ export declare function ToggleChip({ children, pressed, onPressedChange, inactiveVariant, disabled, className }: ToggleChipProps): import("react").JSX.Element;
22
+ //#endregion
@@ -0,0 +1,28 @@
1
+ import { cn } from "../lib/utils.js";
2
+ import { Badge } from "../base/badge.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+
5
+ //#region src/web/atom/toggle-chip.tsx
6
+ /**
7
+ * 押して選択を切り替える Badge。絞り込みのタグやアカウントの複数選択に使う。
8
+ *
9
+ * `<button>` で `Badge` を包む形はアプリ側で何度も書かれていたが、`type="button"` の
10
+ * 付け忘れや `aria-pressed` の欠落が起きやすい。押下状態の表現(インディゴ塗り)も
11
+ * design system 側で決めるべきものなので、1 つのコンポーネントにまとめている。
12
+ */
13
+ function ToggleChip({ children, pressed, onPressedChange, inactiveVariant = "outline", disabled, className }) {
14
+ return /* @__PURE__ */ jsx("button", {
15
+ type: "button",
16
+ "aria-pressed": pressed,
17
+ disabled,
18
+ onClick: () => onPressedChange(!pressed),
19
+ className: cn("shrink-0", disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer", className),
20
+ children: /* @__PURE__ */ jsx(Badge, {
21
+ variant: pressed ? "default" : inactiveVariant,
22
+ children
23
+ })
24
+ });
25
+ }
26
+
27
+ //#endregion
28
+ export { ToggleChip };
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ //#region src/web/atom/tooltip.d.ts
3
+ type Props = {
4
+ /**
5
+ * ツールチップの本文。falsy のときは、ツールチップを付けず子をそのまま描画する。
6
+ * 「ボタンが無効のときだけ理由を出す」のように、条件つきで有効にしやすい。
7
+ */
8
+ content?: React.ReactNode;
9
+ /**
10
+ * ホバーやフォーカスの対象になる要素。無効な要素は、フォーカスできる span で包んで扱う。
11
+ * `<button disabled>` を渡しても、ホバーとキーボードのフォーカスで本文が出る。
12
+ */
13
+ children: React.ReactNode;
14
+ side?: "top" | "right" | "bottom" | "left";
15
+ };
16
+ /**
17
+ * shadcn の Tooltip を包んだ軽い部品。「トリガーが無効(押せない)ときに理由を出す」用途を想定する。
18
+ *
19
+ * content が空のときは、ツールチップを付けず、子をそのまま描画する。
20
+ */
21
+ export declare function Tooltip({ content, children, side }: Props): React.JSX.Element;
22
+ //#endregion
23
+ export {};
@@ -0,0 +1,26 @@
1
+ import { Tooltip as Tooltip$1, TooltipContent, TooltipTrigger } from "../base/tooltip.js";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+
4
+ //#region src/web/atom/tooltip.tsx
5
+ /**
6
+ * shadcn の Tooltip を包んだ軽い部品。「トリガーが無効(押せない)ときに理由を出す」用途を想定する。
7
+ *
8
+ * content が空のときは、ツールチップを付けず、子をそのまま描画する。
9
+ */
10
+ function Tooltip({ content, children, side }) {
11
+ if (!content) return /* @__PURE__ */ jsx(Fragment, { children });
12
+ return /* @__PURE__ */ jsxs(Tooltip$1, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
13
+ asChild: true,
14
+ children: /* @__PURE__ */ jsx("span", {
15
+ tabIndex: 0,
16
+ className: "contents",
17
+ children
18
+ })
19
+ }), /* @__PURE__ */ jsx(TooltipContent, {
20
+ side,
21
+ children: content
22
+ })] });
23
+ }
24
+
25
+ //#endregion
26
+ export { Tooltip };
@@ -0,0 +1,6 @@
1
+ import { ComponentProps } from "react";
2
+ //#region src/web/atom/typography.d.ts
3
+ export declare function SectionTitle({ className, children, description, ...props }: ComponentProps<"p"> & {
4
+ description?: string;
5
+ }): import("react").JSX.Element;
6
+ //#endregion
@@ -0,0 +1,23 @@
1
+ import { cn } from "../lib/utils.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+
4
+ //#region src/web/atom/typography.tsx
5
+ function SectionTitle({ className, children, description, ...props }) {
6
+ return /* @__PURE__ */ jsxs("div", {
7
+ className: "flex flex-col gap-0.5",
8
+ children: [/* @__PURE__ */ jsx("div", {
9
+ className: "after:bg-action/70 relative py-2 pl-3 text-sm after:absolute after:inset-y-2 after:left-1 after:w-0.5",
10
+ children: /* @__PURE__ */ jsx("p", {
11
+ className: cn("font-semibold", className),
12
+ ...props,
13
+ children
14
+ })
15
+ }), description && /* @__PURE__ */ jsx("p", {
16
+ className: "text-muted-foreground text-sm",
17
+ children: description
18
+ })]
19
+ });
20
+ }
21
+
22
+ //#endregion
23
+ export { SectionTitle };
@@ -0,0 +1,9 @@
1
+ import * as React$1 from "react";
2
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
3
+ //#region src/web/base/accordion.d.ts
4
+ declare function Accordion({ ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Root>): React$1.JSX.Element;
5
+ declare function AccordionItem({ className, ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Item>): React$1.JSX.Element;
6
+ declare function AccordionTrigger({ className, children, ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Trigger>): React$1.JSX.Element;
7
+ declare function AccordionContent({ className, children, ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Content>): React$1.JSX.Element;
8
+ //#endregion
9
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
@@ -0,0 +1,44 @@
1
+ import { cn } from "../lib/utils.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { ChevronDownIcon } from "lucide-react";
4
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
5
+
6
+ //#region src/web/base/accordion.tsx
7
+ function Accordion({ ...props }) {
8
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Root, {
9
+ "data-slot": "accordion",
10
+ ...props
11
+ });
12
+ }
13
+ function AccordionItem({ className, ...props }) {
14
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Item, {
15
+ "data-slot": "accordion-item",
16
+ className: cn("border-b last:border-b-0", className),
17
+ ...props
18
+ });
19
+ }
20
+ function AccordionTrigger({ className, children, ...props }) {
21
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Header, {
22
+ className: "flex",
23
+ children: /* @__PURE__ */ jsxs(AccordionPrimitive.Trigger, {
24
+ "data-slot": "accordion-trigger",
25
+ className: cn(" flex flex-1 items-start justify-between gap-4 rounded-control py-3 text-left text-[13px] font-medium outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180", className),
26
+ ...props,
27
+ children: [children, /* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5" })]
28
+ })
29
+ });
30
+ }
31
+ function AccordionContent({ className, children, ...props }) {
32
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Content, {
33
+ "data-slot": "accordion-content",
34
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-[13px]",
35
+ ...props,
36
+ children: /* @__PURE__ */ jsx("div", {
37
+ className: cn("pt-0 pb-3", className),
38
+ children
39
+ })
40
+ });
41
+ }
42
+
43
+ //#endregion
44
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
@@ -0,0 +1,11 @@
1
+ import * as React$1 from "react";
2
+ import { VariantProps } from "class-variance-authority";
3
+ //#region src/web/base/alert.d.ts
4
+ declare const alertVariants: (props?: ({
5
+ variant?: "default" | "destructive" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare function Alert({ className, variant, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React$1.JSX.Element;
8
+ declare function AlertTitle({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
9
+ declare function AlertDescription({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
10
+ //#endregion
11
+ export { Alert, AlertDescription, AlertTitle };