@t3q-ui/design-system 1.66.1 → 1.66.3

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 (535) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +16 -0
  3. package/dist/components/_internal/cancelIcon.cjs +66 -0
  4. package/dist/components/_internal/cancelIcon.cjs.map +1 -0
  5. package/dist/components/_internal/cancelIcon.js +49 -0
  6. package/dist/components/_internal/cancelIcon.js.map +1 -0
  7. package/dist/components/_internal/floatingLabelOutline.cjs +118 -0
  8. package/dist/components/_internal/floatingLabelOutline.cjs.map +1 -0
  9. package/dist/components/_internal/floatingLabelOutline.js +118 -0
  10. package/dist/components/_internal/floatingLabelOutline.js.map +1 -0
  11. package/dist/components/_internal/labelPass.cjs +37 -0
  12. package/dist/components/_internal/labelPass.cjs.map +1 -0
  13. package/dist/components/_internal/labelPass.js +20 -0
  14. package/dist/components/_internal/labelPass.js.map +1 -0
  15. package/dist/components/_internal/useCopy.cjs +55 -0
  16. package/dist/components/_internal/useCopy.cjs.map +1 -0
  17. package/dist/components/_internal/useCopy.js +55 -0
  18. package/dist/components/_internal/useCopy.js.map +1 -0
  19. package/dist/components/_internal/useRestoreFocusToOpener.cjs +41 -0
  20. package/dist/components/_internal/useRestoreFocusToOpener.cjs.map +1 -0
  21. package/dist/components/_internal/useRestoreFocusToOpener.js +41 -0
  22. package/dist/components/_internal/useRestoreFocusToOpener.js.map +1 -0
  23. package/dist/components/accordion.cjs +115 -0
  24. package/dist/components/accordion.cjs.map +1 -0
  25. package/dist/components/accordion.js +97 -0
  26. package/dist/components/accordion.js.map +1 -0
  27. package/dist/components/agGridTable/context.cjs +20 -0
  28. package/dist/components/agGridTable/context.cjs.map +1 -0
  29. package/dist/components/agGridTable/context.js +20 -0
  30. package/dist/components/agGridTable/context.js.map +1 -0
  31. package/dist/components/agGridTable/helpers.ts/getSortedColumnState.cjs +13 -0
  32. package/dist/components/agGridTable/helpers.ts/getSortedColumnState.cjs.map +1 -0
  33. package/dist/components/agGridTable/helpers.ts/getSortedColumnState.js +13 -0
  34. package/dist/components/agGridTable/helpers.ts/getSortedColumnState.js.map +1 -0
  35. package/dist/components/agGridTable/index.cjs +539 -0
  36. package/dist/components/agGridTable/index.cjs.map +1 -0
  37. package/dist/components/agGridTable/index.js +539 -0
  38. package/dist/components/agGridTable/index.js.map +1 -0
  39. package/dist/components/agGridTable/localeText.cjs +581 -0
  40. package/dist/components/agGridTable/localeText.cjs.map +1 -0
  41. package/dist/components/agGridTable/localeText.js +581 -0
  42. package/dist/components/agGridTable/localeText.js.map +1 -0
  43. package/dist/components/alert.cjs +80 -0
  44. package/dist/components/alert.cjs.map +1 -0
  45. package/dist/components/alert.js +80 -0
  46. package/dist/components/alert.js.map +1 -0
  47. package/dist/components/alertDialog.cjs +160 -0
  48. package/dist/components/alertDialog.cjs.map +1 -0
  49. package/dist/components/alertDialog.js +142 -0
  50. package/dist/components/alertDialog.js.map +1 -0
  51. package/dist/components/badge.cjs +107 -0
  52. package/dist/components/badge.cjs.map +1 -0
  53. package/dist/components/badge.js +90 -0
  54. package/dist/components/badge.js.map +1 -0
  55. package/dist/components/breadcrumb.cjs +197 -0
  56. package/dist/components/breadcrumb.cjs.map +1 -0
  57. package/dist/components/breadcrumb.js +180 -0
  58. package/dist/components/breadcrumb.js.map +1 -0
  59. package/dist/components/button.cjs +198 -0
  60. package/dist/components/button.cjs.map +1 -0
  61. package/dist/components/button.js +181 -0
  62. package/dist/components/button.js.map +1 -0
  63. package/dist/components/calendar.cjs +386 -0
  64. package/dist/components/calendar.cjs.map +1 -0
  65. package/dist/components/calendar.js +369 -0
  66. package/dist/components/calendar.js.map +1 -0
  67. package/dist/components/card.cjs +92 -0
  68. package/dist/components/card.cjs.map +1 -0
  69. package/dist/components/card.js +92 -0
  70. package/dist/components/card.js.map +1 -0
  71. package/dist/components/chatComposer.cjs +196 -0
  72. package/dist/components/chatComposer.cjs.map +1 -0
  73. package/dist/components/chatComposer.js +179 -0
  74. package/dist/components/chatComposer.js.map +1 -0
  75. package/dist/components/chatHistory.cjs +333 -0
  76. package/dist/components/chatHistory.cjs.map +1 -0
  77. package/dist/components/chatHistory.js +316 -0
  78. package/dist/components/chatHistory.js.map +1 -0
  79. package/dist/components/chatMessage.cjs +203 -0
  80. package/dist/components/chatMessage.cjs.map +1 -0
  81. package/dist/components/chatMessage.js +186 -0
  82. package/dist/components/chatMessage.js.map +1 -0
  83. package/dist/components/checkbox.cjs +174 -0
  84. package/dist/components/checkbox.cjs.map +1 -0
  85. package/dist/components/checkbox.js +156 -0
  86. package/dist/components/checkbox.js.map +1 -0
  87. package/dist/components/checkboxSection.cjs +170 -0
  88. package/dist/components/checkboxSection.cjs.map +1 -0
  89. package/dist/components/checkboxSection.js +153 -0
  90. package/dist/components/checkboxSection.js.map +1 -0
  91. package/dist/components/columnFilter/ColumnFilter.cjs +421 -0
  92. package/dist/components/columnFilter/ColumnFilter.cjs.map +1 -0
  93. package/dist/components/columnFilter/ColumnFilter.js +404 -0
  94. package/dist/components/columnFilter/ColumnFilter.js.map +1 -0
  95. package/dist/components/columnFilter/ColumnFilterInput.cjs +788 -0
  96. package/dist/components/columnFilter/ColumnFilterInput.cjs.map +1 -0
  97. package/dist/components/columnFilter/ColumnFilterInput.js +771 -0
  98. package/dist/components/columnFilter/ColumnFilterInput.js.map +1 -0
  99. package/dist/components/columnFilter/ColumnFilterPopover.cjs +745 -0
  100. package/dist/components/columnFilter/ColumnFilterPopover.cjs.map +1 -0
  101. package/dist/components/columnFilter/ColumnFilterPopover.js +728 -0
  102. package/dist/components/columnFilter/ColumnFilterPopover.js.map +1 -0
  103. package/dist/components/columnFilter/ColumnFilterTag.cjs +175 -0
  104. package/dist/components/columnFilter/ColumnFilterTag.cjs.map +1 -0
  105. package/dist/components/columnFilter/ColumnFilterTag.js +158 -0
  106. package/dist/components/columnFilter/ColumnFilterTag.js.map +1 -0
  107. package/dist/components/columnFilter/types.cjs +57 -0
  108. package/dist/components/columnFilter/types.cjs.map +1 -0
  109. package/dist/components/columnFilter/types.js +57 -0
  110. package/dist/components/columnFilter/types.js.map +1 -0
  111. package/dist/components/columnVisibilityFilter.cjs +119 -0
  112. package/dist/components/columnVisibilityFilter.cjs.map +1 -0
  113. package/dist/components/columnVisibilityFilter.js +119 -0
  114. package/dist/components/columnVisibilityFilter.js.map +1 -0
  115. package/dist/components/command.cjs +165 -0
  116. package/dist/components/command.cjs.map +1 -0
  117. package/dist/components/command.js +148 -0
  118. package/dist/components/command.js.map +1 -0
  119. package/dist/components/datePicker.cjs +350 -0
  120. package/dist/components/datePicker.cjs.map +1 -0
  121. package/dist/components/datePicker.js +333 -0
  122. package/dist/components/datePicker.js.map +1 -0
  123. package/dist/components/datePresets.cjs +314 -0
  124. package/dist/components/datePresets.cjs.map +1 -0
  125. package/dist/components/datePresets.js +314 -0
  126. package/dist/components/datePresets.js.map +1 -0
  127. package/dist/components/dialog.cjs +182 -0
  128. package/dist/components/dialog.cjs.map +1 -0
  129. package/dist/components/dialog.js +164 -0
  130. package/dist/components/dialog.js.map +1 -0
  131. package/dist/components/drawer.cjs +184 -0
  132. package/dist/components/drawer.cjs.map +1 -0
  133. package/dist/components/drawer.js +166 -0
  134. package/dist/components/drawer.js.map +1 -0
  135. package/dist/components/dropdownMenu.cjs +177 -0
  136. package/dist/components/dropdownMenu.cjs.map +1 -0
  137. package/dist/components/dropdownMenu.js +159 -0
  138. package/dist/components/dropdownMenu.js.map +1 -0
  139. package/dist/components/emptyBoxIllustration.cjs +119 -0
  140. package/dist/components/emptyBoxIllustration.cjs.map +1 -0
  141. package/dist/components/emptyBoxIllustration.js +102 -0
  142. package/dist/components/emptyBoxIllustration.js.map +1 -0
  143. package/dist/components/eventList.cjs +49 -0
  144. package/dist/components/eventList.cjs.map +1 -0
  145. package/dist/components/eventList.js +49 -0
  146. package/dist/components/eventList.js.map +1 -0
  147. package/dist/components/form.cjs +260 -0
  148. package/dist/components/form.cjs.map +1 -0
  149. package/dist/components/form.js +243 -0
  150. package/dist/components/form.js.map +1 -0
  151. package/dist/components/iconButton.cjs +77 -0
  152. package/dist/components/iconButton.cjs.map +1 -0
  153. package/dist/components/iconButton.js +60 -0
  154. package/dist/components/iconButton.js.map +1 -0
  155. package/dist/components/iconSelect/icons.json.cjs +13 -0
  156. package/dist/components/iconSelect/icons.json.cjs.map +1 -0
  157. package/dist/components/iconSelect/icons.json.js +13 -0
  158. package/dist/components/iconSelect/icons.json.js.map +1 -0
  159. package/dist/components/iconSelect/index.cjs +170 -0
  160. package/dist/components/iconSelect/index.cjs.map +1 -0
  161. package/dist/components/iconSelect/index.js +170 -0
  162. package/dist/components/iconSelect/index.js.map +1 -0
  163. package/dist/components/label.cjs +30 -0
  164. package/dist/components/label.cjs.map +1 -0
  165. package/dist/components/label.js +13 -0
  166. package/dist/components/label.js.map +1 -0
  167. package/dist/components/lucideIcon.cjs +42 -0
  168. package/dist/components/lucideIcon.cjs.map +1 -0
  169. package/dist/components/lucideIcon.js +25 -0
  170. package/dist/components/lucideIcon.js.map +1 -0
  171. package/dist/components/metaItem.cjs +100 -0
  172. package/dist/components/metaItem.cjs.map +1 -0
  173. package/dist/components/metaItem.js +100 -0
  174. package/dist/components/metaItem.js.map +1 -0
  175. package/dist/components/multiSelect/multiSelect.cjs +125 -0
  176. package/dist/components/multiSelect/multiSelect.cjs.map +1 -0
  177. package/dist/components/multiSelect/multiSelect.js +107 -0
  178. package/dist/components/multiSelect/multiSelect.js.map +1 -0
  179. package/dist/components/multiSelect/multiSelectContent.cjs +119 -0
  180. package/dist/components/multiSelect/multiSelectContent.cjs.map +1 -0
  181. package/dist/components/multiSelect/multiSelectContent.js +101 -0
  182. package/dist/components/multiSelect/multiSelectContent.js.map +1 -0
  183. package/dist/components/multiSelect/multiSelectContext.cjs +32 -0
  184. package/dist/components/multiSelect/multiSelectContext.cjs.map +1 -0
  185. package/dist/components/multiSelect/multiSelectContext.js +15 -0
  186. package/dist/components/multiSelect/multiSelectContext.js.map +1 -0
  187. package/dist/components/multiSelect/multiSelectEmpty.cjs +47 -0
  188. package/dist/components/multiSelect/multiSelectEmpty.cjs.map +1 -0
  189. package/dist/components/multiSelect/multiSelectEmpty.js +30 -0
  190. package/dist/components/multiSelect/multiSelectEmpty.js.map +1 -0
  191. package/dist/components/multiSelect/multiSelectGroup.cjs +47 -0
  192. package/dist/components/multiSelect/multiSelectGroup.cjs.map +1 -0
  193. package/dist/components/multiSelect/multiSelectGroup.js +30 -0
  194. package/dist/components/multiSelect/multiSelectGroup.js.map +1 -0
  195. package/dist/components/multiSelect/multiSelectInput.cjs +73 -0
  196. package/dist/components/multiSelect/multiSelectInput.cjs.map +1 -0
  197. package/dist/components/multiSelect/multiSelectInput.js +56 -0
  198. package/dist/components/multiSelect/multiSelectInput.js.map +1 -0
  199. package/dist/components/multiSelect/multiSelectItem.cjs +129 -0
  200. package/dist/components/multiSelect/multiSelectItem.cjs.map +1 -0
  201. package/dist/components/multiSelect/multiSelectItem.js +112 -0
  202. package/dist/components/multiSelect/multiSelectItem.js.map +1 -0
  203. package/dist/components/multiSelect/multiSelectLoading.cjs +52 -0
  204. package/dist/components/multiSelect/multiSelectLoading.cjs.map +1 -0
  205. package/dist/components/multiSelect/multiSelectLoading.js +35 -0
  206. package/dist/components/multiSelect/multiSelectLoading.js.map +1 -0
  207. package/dist/components/multiSelect/multiSelectSeparator.cjs +42 -0
  208. package/dist/components/multiSelect/multiSelectSeparator.cjs.map +1 -0
  209. package/dist/components/multiSelect/multiSelectSeparator.js +25 -0
  210. package/dist/components/multiSelect/multiSelectSeparator.js.map +1 -0
  211. package/dist/components/multiSelect/multiSelectTrigger.cjs +306 -0
  212. package/dist/components/multiSelect/multiSelectTrigger.cjs.map +1 -0
  213. package/dist/components/multiSelect/multiSelectTrigger.js +288 -0
  214. package/dist/components/multiSelect/multiSelectTrigger.js.map +1 -0
  215. package/dist/components/pageHeader.cjs +161 -0
  216. package/dist/components/pageHeader.cjs.map +1 -0
  217. package/dist/components/pageHeader.js +161 -0
  218. package/dist/components/pageHeader.js.map +1 -0
  219. package/dist/components/pageHeaderRefreshButton.cjs +59 -0
  220. package/dist/components/pageHeaderRefreshButton.cjs.map +1 -0
  221. package/dist/components/pageHeaderRefreshButton.js +59 -0
  222. package/dist/components/pageHeaderRefreshButton.js.map +1 -0
  223. package/dist/components/pagination.cjs +264 -0
  224. package/dist/components/pagination.cjs.map +1 -0
  225. package/dist/components/pagination.js +247 -0
  226. package/dist/components/pagination.js.map +1 -0
  227. package/dist/components/panel.cjs +76 -0
  228. package/dist/components/panel.cjs.map +1 -0
  229. package/dist/components/panel.js +59 -0
  230. package/dist/components/panel.js.map +1 -0
  231. package/dist/components/parameterTable/ParameterTable.cjs +932 -0
  232. package/dist/components/parameterTable/ParameterTable.cjs.map +1 -0
  233. package/dist/components/parameterTable/ParameterTable.js +915 -0
  234. package/dist/components/parameterTable/ParameterTable.js.map +1 -0
  235. package/dist/components/parameterTable/ParameterTableRow.cjs +209 -0
  236. package/dist/components/parameterTable/ParameterTableRow.cjs.map +1 -0
  237. package/dist/components/parameterTable/ParameterTableRow.js +192 -0
  238. package/dist/components/parameterTable/ParameterTableRow.js.map +1 -0
  239. package/dist/components/parameterTable/cellSelection/clipboard.cjs +165 -0
  240. package/dist/components/parameterTable/cellSelection/clipboard.cjs.map +1 -0
  241. package/dist/components/parameterTable/cellSelection/clipboard.js +165 -0
  242. package/dist/components/parameterTable/cellSelection/clipboard.js.map +1 -0
  243. package/dist/components/parameterTable/cellSelection/types.cjs +20 -0
  244. package/dist/components/parameterTable/cellSelection/types.cjs.map +1 -0
  245. package/dist/components/parameterTable/cellSelection/types.js +20 -0
  246. package/dist/components/parameterTable/cellSelection/types.js.map +1 -0
  247. package/dist/components/parameterTable/types.cjs +15 -0
  248. package/dist/components/parameterTable/types.cjs.map +1 -0
  249. package/dist/components/parameterTable/types.js +15 -0
  250. package/dist/components/parameterTable/types.js.map +1 -0
  251. package/dist/components/popover.cjs +53 -0
  252. package/dist/components/popover.cjs.map +1 -0
  253. package/dist/components/popover.js +35 -0
  254. package/dist/components/popover.js.map +1 -0
  255. package/dist/components/progress.cjs +63 -0
  256. package/dist/components/progress.cjs.map +1 -0
  257. package/dist/components/progress.js +46 -0
  258. package/dist/components/progress.js.map +1 -0
  259. package/dist/components/radio.cjs +35 -0
  260. package/dist/components/radio.cjs.map +1 -0
  261. package/dist/components/radio.js +35 -0
  262. package/dist/components/radio.js.map +1 -0
  263. package/dist/components/radioGroup.cjs +73 -0
  264. package/dist/components/radioGroup.cjs.map +1 -0
  265. package/dist/components/radioGroup.js +56 -0
  266. package/dist/components/radioGroup.js.map +1 -0
  267. package/dist/components/radioSection.cjs +169 -0
  268. package/dist/components/radioSection.cjs.map +1 -0
  269. package/dist/components/radioSection.js +151 -0
  270. package/dist/components/radioSection.js.map +1 -0
  271. package/dist/components/range/range.cjs +132 -0
  272. package/dist/components/range/range.cjs.map +1 -0
  273. package/dist/components/range/range.js +115 -0
  274. package/dist/components/range/range.js.map +1 -0
  275. package/dist/components/range/rangeSlider.cjs +113 -0
  276. package/dist/components/range/rangeSlider.cjs.map +1 -0
  277. package/dist/components/range/rangeSlider.js +95 -0
  278. package/dist/components/range/rangeSlider.js.map +1 -0
  279. package/dist/components/range/ticks.cjs +90 -0
  280. package/dist/components/range/ticks.cjs.map +1 -0
  281. package/dist/components/range/ticks.js +90 -0
  282. package/dist/components/range/ticks.js.map +1 -0
  283. package/dist/components/range/useNumberInput.cjs +58 -0
  284. package/dist/components/range/useNumberInput.cjs.map +1 -0
  285. package/dist/components/range/useNumberInput.js +41 -0
  286. package/dist/components/range/useNumberInput.js.map +1 -0
  287. package/dist/components/range/useRangeValue.cjs +83 -0
  288. package/dist/components/range/useRangeValue.cjs.map +1 -0
  289. package/dist/components/range/useRangeValue.js +66 -0
  290. package/dist/components/range/useRangeValue.js.map +1 -0
  291. package/dist/components/select/select.cjs +86 -0
  292. package/dist/components/select/select.cjs.map +1 -0
  293. package/dist/components/select/select.js +68 -0
  294. package/dist/components/select/select.js.map +1 -0
  295. package/dist/components/select/selectContent.cjs +121 -0
  296. package/dist/components/select/selectContent.cjs.map +1 -0
  297. package/dist/components/select/selectContent.js +103 -0
  298. package/dist/components/select/selectContent.js.map +1 -0
  299. package/dist/components/select/selectContext.cjs +32 -0
  300. package/dist/components/select/selectContext.cjs.map +1 -0
  301. package/dist/components/select/selectContext.js +15 -0
  302. package/dist/components/select/selectContext.js.map +1 -0
  303. package/dist/components/select/selectEmpty.cjs +51 -0
  304. package/dist/components/select/selectEmpty.cjs.map +1 -0
  305. package/dist/components/select/selectEmpty.js +34 -0
  306. package/dist/components/select/selectEmpty.js.map +1 -0
  307. package/dist/components/select/selectGroup.cjs +47 -0
  308. package/dist/components/select/selectGroup.cjs.map +1 -0
  309. package/dist/components/select/selectGroup.js +30 -0
  310. package/dist/components/select/selectGroup.js.map +1 -0
  311. package/dist/components/select/selectInput.cjs +73 -0
  312. package/dist/components/select/selectInput.cjs.map +1 -0
  313. package/dist/components/select/selectInput.js +56 -0
  314. package/dist/components/select/selectInput.js.map +1 -0
  315. package/dist/components/select/selectItem.cjs +93 -0
  316. package/dist/components/select/selectItem.cjs.map +1 -0
  317. package/dist/components/select/selectItem.js +76 -0
  318. package/dist/components/select/selectItem.js.map +1 -0
  319. package/dist/components/select/selectItemContent.cjs +36 -0
  320. package/dist/components/select/selectItemContent.cjs.map +1 -0
  321. package/dist/components/select/selectItemContent.js +36 -0
  322. package/dist/components/select/selectItemContent.js.map +1 -0
  323. package/dist/components/select/selectLoading.cjs +52 -0
  324. package/dist/components/select/selectLoading.cjs.map +1 -0
  325. package/dist/components/select/selectLoading.js +35 -0
  326. package/dist/components/select/selectLoading.js.map +1 -0
  327. package/dist/components/select/selectRadioGroup.cjs +45 -0
  328. package/dist/components/select/selectRadioGroup.cjs.map +1 -0
  329. package/dist/components/select/selectRadioGroup.js +28 -0
  330. package/dist/components/select/selectRadioGroup.js.map +1 -0
  331. package/dist/components/select/selectRadioItem.cjs +113 -0
  332. package/dist/components/select/selectRadioItem.cjs.map +1 -0
  333. package/dist/components/select/selectRadioItem.js +96 -0
  334. package/dist/components/select/selectRadioItem.js.map +1 -0
  335. package/dist/components/select/selectSeparator.cjs +42 -0
  336. package/dist/components/select/selectSeparator.cjs.map +1 -0
  337. package/dist/components/select/selectSeparator.js +25 -0
  338. package/dist/components/select/selectSeparator.js.map +1 -0
  339. package/dist/components/select/selectTrigger.cjs +187 -0
  340. package/dist/components/select/selectTrigger.cjs.map +1 -0
  341. package/dist/components/select/selectTrigger.js +169 -0
  342. package/dist/components/select/selectTrigger.js.map +1 -0
  343. package/dist/components/select/selectValue.cjs +16 -0
  344. package/dist/components/select/selectValue.cjs.map +1 -0
  345. package/dist/components/select/selectValue.js +16 -0
  346. package/dist/components/select/selectValue.js.map +1 -0
  347. package/dist/components/separator.cjs +42 -0
  348. package/dist/components/separator.cjs.map +1 -0
  349. package/dist/components/separator.js +24 -0
  350. package/dist/components/separator.js.map +1 -0
  351. package/dist/components/sidebar/index.cjs +404 -0
  352. package/dist/components/sidebar/index.cjs.map +1 -0
  353. package/dist/components/sidebar/index.js +387 -0
  354. package/dist/components/sidebar/index.js.map +1 -0
  355. package/dist/components/skeleton/index.cjs +10 -0
  356. package/dist/components/skeleton/index.cjs.map +1 -0
  357. package/dist/components/skeleton/index.js +10 -0
  358. package/dist/components/skeleton/index.js.map +1 -0
  359. package/dist/components/skeleton/table.cjs +80 -0
  360. package/dist/components/skeleton/table.cjs.map +1 -0
  361. package/dist/components/skeleton/table.js +80 -0
  362. package/dist/components/skeleton/table.js.map +1 -0
  363. package/dist/components/spinner/index.cjs +103 -0
  364. package/dist/components/spinner/index.cjs.map +1 -0
  365. package/dist/components/spinner/index.js +103 -0
  366. package/dist/components/spinner/index.js.map +1 -0
  367. package/dist/components/spinner/spinner.json.cjs +40 -0
  368. package/dist/components/spinner/spinner.json.cjs.map +1 -0
  369. package/dist/components/spinner/spinner.json.js +40 -0
  370. package/dist/components/spinner/spinner.json.js.map +1 -0
  371. package/dist/components/stack/index.cjs +65 -0
  372. package/dist/components/stack/index.cjs.map +1 -0
  373. package/dist/components/stack/index.js +65 -0
  374. package/dist/components/stack/index.js.map +1 -0
  375. package/dist/components/switch.cjs +106 -0
  376. package/dist/components/switch.cjs.map +1 -0
  377. package/dist/components/switch.js +88 -0
  378. package/dist/components/switch.js.map +1 -0
  379. package/dist/components/switchSection.cjs +84 -0
  380. package/dist/components/switchSection.cjs.map +1 -0
  381. package/dist/components/switchSection.js +67 -0
  382. package/dist/components/switchSection.js.map +1 -0
  383. package/dist/components/table.cjs +268 -0
  384. package/dist/components/table.cjs.map +1 -0
  385. package/dist/{chunk-DWF6AFPQ.js → components/table.js} +37 -195
  386. package/dist/components/table.js.map +1 -0
  387. package/dist/components/tableFilter.cjs +423 -0
  388. package/dist/components/tableFilter.cjs.map +1 -0
  389. package/dist/components/tableFilter.js +423 -0
  390. package/dist/components/tableFilter.js.map +1 -0
  391. package/dist/components/tableFilterParts.cjs +232 -0
  392. package/dist/components/tableFilterParts.cjs.map +1 -0
  393. package/dist/components/tableFilterParts.js +215 -0
  394. package/dist/components/tableFilterParts.js.map +1 -0
  395. package/dist/components/tabs.cjs +133 -0
  396. package/dist/components/tabs.cjs.map +1 -0
  397. package/dist/components/tabs.js +115 -0
  398. package/dist/components/tabs.js.map +1 -0
  399. package/dist/components/tag.cjs +237 -0
  400. package/dist/components/tag.cjs.map +1 -0
  401. package/dist/components/tag.js +237 -0
  402. package/dist/components/tag.js.map +1 -0
  403. package/dist/components/textArea.cjs +223 -0
  404. package/dist/components/textArea.cjs.map +1 -0
  405. package/dist/components/textArea.js +206 -0
  406. package/dist/components/textArea.js.map +1 -0
  407. package/dist/components/textField.cjs +257 -0
  408. package/dist/components/textField.cjs.map +1 -0
  409. package/dist/components/textField.js +240 -0
  410. package/dist/components/textField.js.map +1 -0
  411. package/dist/components/themeProvider.cjs +106 -0
  412. package/dist/components/themeProvider.cjs.map +1 -0
  413. package/dist/components/themeProvider.js +89 -0
  414. package/dist/components/themeProvider.js.map +1 -0
  415. package/dist/components/timePicker.cjs +495 -0
  416. package/dist/components/timePicker.cjs.map +1 -0
  417. package/dist/components/timePicker.js +478 -0
  418. package/dist/components/timePicker.js.map +1 -0
  419. package/dist/components/toast.cjs +57 -0
  420. package/dist/components/toast.cjs.map +1 -0
  421. package/dist/components/toast.js +57 -0
  422. package/dist/components/toast.js.map +1 -0
  423. package/dist/components/toggleGroup.cjs +85 -0
  424. package/dist/components/toggleGroup.cjs.map +1 -0
  425. package/dist/components/toggleGroup.js +67 -0
  426. package/dist/components/toggleGroup.js.map +1 -0
  427. package/dist/components/tooltip.cjs +69 -0
  428. package/dist/components/tooltip.cjs.map +1 -0
  429. package/dist/components/tooltip.js +51 -0
  430. package/dist/components/tooltip.js.map +1 -0
  431. package/dist/design-system.css +536 -0
  432. package/dist/hooks/useFloatingLabel.cjs +82 -0
  433. package/dist/hooks/useFloatingLabel.cjs.map +1 -0
  434. package/dist/hooks/useFloatingLabel.js +65 -0
  435. package/dist/hooks/useFloatingLabel.js.map +1 -0
  436. package/dist/index.cjs +356 -10367
  437. package/dist/index.cjs.map +1 -1
  438. package/dist/index.js +353 -9673
  439. package/dist/index.js.map +1 -1
  440. package/dist/markdown/highlight.cjs +229 -0
  441. package/dist/markdown/highlight.cjs.map +1 -0
  442. package/dist/markdown/highlight.js +207 -0
  443. package/dist/markdown/highlight.js.map +1 -0
  444. package/dist/markdown/index.cjs +5 -440
  445. package/dist/markdown/index.cjs.map +1 -1
  446. package/dist/markdown/index.js +4 -432
  447. package/dist/markdown/index.js.map +1 -1
  448. package/dist/markdown/markdown.cjs +246 -0
  449. package/dist/markdown/markdown.cjs.map +1 -0
  450. package/dist/markdown/markdown.js +246 -0
  451. package/dist/markdown/markdown.js.map +1 -0
  452. package/dist/patterns/chatPage.cjs +356 -0
  453. package/dist/patterns/chatPage.cjs.map +1 -0
  454. package/dist/patterns/chatPage.js +356 -0
  455. package/dist/patterns/chatPage.js.map +1 -0
  456. package/dist/patterns/chatPanel.cjs +44 -0
  457. package/dist/patterns/chatPanel.cjs.map +1 -0
  458. package/dist/patterns/chatPanel.js +44 -0
  459. package/dist/patterns/chatPanel.js.map +1 -0
  460. package/dist/patterns/chatShell.cjs +321 -0
  461. package/dist/patterns/chatShell.cjs.map +1 -0
  462. package/dist/patterns/chatShell.js +321 -0
  463. package/dist/patterns/chatShell.js.map +1 -0
  464. package/dist/patterns/dashboardLayout.cjs +158 -0
  465. package/dist/patterns/dashboardLayout.cjs.map +1 -0
  466. package/dist/patterns/dashboardLayout.js +158 -0
  467. package/dist/patterns/dashboardLayout.js.map +1 -0
  468. package/dist/patterns/detailPage.cjs +144 -0
  469. package/dist/patterns/detailPage.cjs.map +1 -0
  470. package/dist/patterns/detailPage.js +144 -0
  471. package/dist/patterns/detailPage.js.map +1 -0
  472. package/dist/patterns/formDialog.cjs +58 -0
  473. package/dist/patterns/formDialog.cjs.map +1 -0
  474. package/dist/patterns/formDialog.js +58 -0
  475. package/dist/patterns/formDialog.js.map +1 -0
  476. package/dist/patterns/formDrawer.cjs +61 -0
  477. package/dist/patterns/formDrawer.cjs.map +1 -0
  478. package/dist/patterns/formDrawer.js +61 -0
  479. package/dist/patterns/formDrawer.js.map +1 -0
  480. package/dist/patterns/formPage.cjs +124 -0
  481. package/dist/patterns/formPage.cjs.map +1 -0
  482. package/dist/patterns/formPage.js +124 -0
  483. package/dist/patterns/formPage.js.map +1 -0
  484. package/dist/patterns/formShell.cjs +58 -0
  485. package/dist/patterns/formShell.cjs.map +1 -0
  486. package/dist/patterns/formShell.js +58 -0
  487. package/dist/patterns/formShell.js.map +1 -0
  488. package/dist/patterns/index.cjs +25 -1571
  489. package/dist/patterns/index.cjs.map +1 -1
  490. package/dist/patterns/index.js +24 -1556
  491. package/dist/patterns/index.js.map +1 -1
  492. package/dist/patterns/listPage.cjs +241 -0
  493. package/dist/patterns/listPage.cjs.map +1 -0
  494. package/dist/patterns/listPage.js +241 -0
  495. package/dist/patterns/listPage.js.map +1 -0
  496. package/dist/patterns/listPageRules.cjs +46 -0
  497. package/dist/patterns/listPageRules.cjs.map +1 -0
  498. package/dist/patterns/listPageRules.js +46 -0
  499. package/dist/patterns/listPageRules.js.map +1 -0
  500. package/dist/patterns/states.cjs +93 -0
  501. package/dist/patterns/states.cjs.map +1 -0
  502. package/dist/patterns/states.js +93 -0
  503. package/dist/patterns/states.js.map +1 -0
  504. package/dist/utils/cn.cjs +41 -0
  505. package/dist/utils/cn.cjs.map +1 -0
  506. package/dist/utils/cn.js +41 -0
  507. package/dist/utils/cn.js.map +1 -0
  508. package/dist/utils/columnWidths.cjs +37 -0
  509. package/dist/utils/columnWidths.cjs.map +1 -0
  510. package/dist/utils/columnWidths.js +37 -0
  511. package/dist/utils/columnWidths.js.map +1 -0
  512. package/dist/utils/message.cjs +11 -0
  513. package/dist/utils/message.cjs.map +1 -0
  514. package/dist/utils/message.js +11 -0
  515. package/dist/utils/message.js.map +1 -0
  516. package/dist/utils/sanitizeUserText.cjs +10 -0
  517. package/dist/utils/sanitizeUserText.cjs.map +1 -0
  518. package/dist/utils/sanitizeUserText.js +10 -0
  519. package/dist/utils/sanitizeUserText.js.map +1 -0
  520. package/dist/utils/word.cjs +14 -0
  521. package/dist/utils/word.cjs.map +1 -0
  522. package/dist/utils/word.js +14 -0
  523. package/dist/utils/word.js.map +1 -0
  524. package/package.json +4 -4
  525. package/dist/chunk-6YLIVCCY.js +0 -5671
  526. package/dist/chunk-6YLIVCCY.js.map +0 -1
  527. package/dist/chunk-DWF6AFPQ.js.map +0 -1
  528. package/dist/chunk-KDMSA5J3.cjs +0 -5831
  529. package/dist/chunk-KDMSA5J3.cjs.map +0 -1
  530. package/dist/chunk-OQOBPYZT.cjs +0 -443
  531. package/dist/chunk-OQOBPYZT.cjs.map +0 -1
  532. package/dist/index.css +0 -347
  533. package/dist/index.css.map +0 -1
  534. package/dist/patterns/index.css +0 -268
  535. package/dist/patterns/index.css.map +0 -1
@@ -1,1558 +1,26 @@
1
- import { ChatMessage, Skeleton, EmptyBoxIllustration, Button, LucideIcon, ToggleGroup, ToggleGroupItem, PageHeader, Alert, AlertDescription, AgGridTable, getSortedColumnState, Pagination, Panel, Form, FormSectionLevelContext, FormFooter, Card, Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, DrawerBody, DrawerFooter, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, TooltipProvider, ChatHistory, TwoLineCellRenderer, Tooltip, TooltipTrigger, TooltipContent, ChatComposer, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator } from '../chunk-6YLIVCCY.js';
2
- import { cn, TablePagination, IconButton } from '../chunk-DWF6AFPQ.js';
3
- import { memo, useRef, useEffect, useMemo, useId, useState, useCallback, useLayoutEffect, isValidElement } from 'react';
4
- import { RotateCcw, X, PanelLeft, Plus, Search, TriangleAlert, ArrowDown, Ellipsis } from 'lucide-react';
5
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
-
7
- // src/patterns/listPageRules.ts
8
- function resolvePrimaryField(primaryField, hasRowClick) {
9
- if (primaryField !== void 0) return primaryField;
10
- return hasRowClick ? "name" : void 0;
11
- }
12
- function withPrimaryColumn(columns, primaryField) {
13
- if (!primaryField) return columns;
14
- return columns.map(
15
- (c) => c.field === primaryField && c.type == null ? { ...c, type: "primary" } : c
16
- );
17
- }
18
- function withSecondaryLine(columns, primaryField, secondaryField) {
19
- if (!primaryField || !secondaryField) return columns;
20
- return columns.map(
21
- (c) => c.field === primaryField && c.cellRenderer == null ? {
22
- ...c,
23
- cellRenderer: TwoLineCellRenderer,
24
- cellRendererParams: { ...c.cellRendererParams, secondaryField }
25
- } : c
26
- );
27
- }
28
- function activeRowClassRules(activeRowId, userRules) {
29
- if (activeRowId == null) return userRules;
30
- return {
31
- ...userRules,
32
- "ag-row-active": (p) => p.data?.id === activeRowId
33
- };
34
- }
35
- var showEmptyReset = (onResetFilters, filtersActive) => Boolean(onResetFilters) && filtersActive !== false;
36
- function splitEmptyText(text) {
37
- const t = text.trim();
38
- const m = /^(.*?[.!?。])\s+(\S[\s\S]*)$/.exec(t);
39
- const strip = (s) => s.replace(/[.。]$/, "");
40
- if (!m) return { title: strip(t) };
41
- return { title: strip(m[1]), description: m[2] };
42
- }
43
- function LoadingState({ className, lines = 3 }) {
44
- return /* @__PURE__ */ jsxs(
45
- "div",
46
- {
47
- role: "status",
48
- "aria-label": "\uBD88\uB7EC\uC624\uB294 \uC911",
49
- className: cn("flex flex-col gap-[12px]", className),
50
- children: [
51
- /* @__PURE__ */ jsx(Skeleton, { className: "h-[24px] w-[240px]" }),
52
- Array.from({ length: lines }, (_, i) => /* @__PURE__ */ jsx(Skeleton, { className: cn("h-[16px]", i % 2 ? "w-3/5" : "w-full") }, i))
53
- ]
54
- }
55
- );
56
- }
57
- function StateBox({
58
- role,
59
- className,
60
- icon,
61
- iconClassName,
62
- title,
63
- description,
64
- action
65
- }) {
66
- return /* @__PURE__ */ jsxs(
67
- "div",
68
- {
69
- role,
70
- className: cn(
71
- "flex flex-col items-center justify-center gap-[4px] text-center text-sys-text-subtler",
72
- className
73
- ),
74
- children: [
75
- /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cn("mb-[4px] flex text-sys-text-subtler", iconClassName), children: icon }),
76
- /* @__PURE__ */ jsx("span", { className: "text-h5 text-sys-text-main", children: title }),
77
- description ? /* @__PURE__ */ jsx("span", { className: "break-keep text-base-regular text-sys-text-subtle wrap-break-word", children: description }) : null,
78
- action ? /* @__PURE__ */ jsx("div", { className: "pointer-events-auto mt-[12px] flex gap-[8px]", children: action }) : null
79
- ]
80
- }
81
- );
82
- }
83
- function EmptyState({
84
- className,
85
- children,
86
- icon,
87
- title,
88
- description,
89
- action
90
- }) {
91
- return /* @__PURE__ */ jsx(
92
- StateBox,
93
- {
94
- role: "status",
95
- className,
96
- icon: icon ?? /* @__PURE__ */ jsx(EmptyBoxIllustration, {}),
97
- title: title ?? children,
98
- description,
99
- action
100
- }
101
- );
102
- }
103
- function ErrorState({
104
- className,
105
- title = "\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4",
106
- description,
107
- onRetry,
108
- retryLabel = "\uB2E4\uC2DC \uC2DC\uB3C4"
109
- }) {
110
- return /* @__PURE__ */ jsx(
111
- StateBox,
112
- {
113
- role: "alert",
114
- className,
115
- icon: /* @__PURE__ */ jsx(LucideIcon, { iconComponentName: "CircleAlert", size: 36 }),
116
- iconClassName: "text-danger30",
117
- title,
118
- description,
119
- action: onRetry ? /* @__PURE__ */ jsx(Button, { type: "button", variant: "primary", onClick: onRetry, children: retryLabel }) : null
120
- }
121
- );
122
- }
123
- var DETAIL_WIDTH = {
124
- small: "w-[360px]",
125
- medium: "w-[480px]"
1
+ "use client";
2
+ import { ListPage } from "./listPage.js";
3
+ import { DetailPage } from "./detailPage.js";
4
+ import { FormPage } from "./formPage.js";
5
+ import { FormDrawer } from "./formDrawer.js";
6
+ import { FormDialog } from "./formDialog.js";
7
+ import { DashboardLayout, DashboardPanel, DashboardSection } from "./dashboardLayout.js";
8
+ import { ChatPage } from "./chatPage.js";
9
+ import { ChatPanel } from "./chatPanel.js";
10
+ import { EmptyState, ErrorState, LoadingState } from "./states.js";
11
+ export {
12
+ ChatPage,
13
+ ChatPanel,
14
+ DashboardLayout,
15
+ DashboardPanel,
16
+ DashboardSection,
17
+ DetailPage,
18
+ EmptyState,
19
+ ErrorState,
20
+ FormDialog,
21
+ FormDrawer,
22
+ FormPage,
23
+ ListPage,
24
+ LoadingState
126
25
  };
127
- var QUICK_ALL = "__all__";
128
- var isEmptyContent = (v) => typeof v === "object" && v !== null && !Array.isArray(v) && !isValidElement(v) && "title" in v;
129
- function resolveEmptyContent(emptyState) {
130
- if (emptyState == null) return splitEmptyText("\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.");
131
- if (typeof emptyState === "string") return splitEmptyText(emptyState);
132
- if (isEmptyContent(emptyState)) return emptyState;
133
- return { children: emptyState };
134
- }
135
- function ListPage({
136
- title,
137
- description,
138
- titleRight,
139
- actions,
140
- filters,
141
- onResetFilters,
142
- columns,
143
- rows,
144
- loading,
145
- error,
146
- emptyState,
147
- pagination,
148
- filtersActive,
149
- primaryField,
150
- secondaryField,
151
- tableTitle,
152
- quickFilter,
153
- activeRowId,
154
- detail,
155
- onSortChange,
156
- onRowClick,
157
- tableProps
158
- }) {
159
- const onCloseRef = useRef(detail?.onClose);
160
- useEffect(() => {
161
- onCloseRef.current = detail?.onClose;
162
- }, [detail?.onClose]);
163
- const detailOpen = detail != null;
164
- useEffect(() => {
165
- if (!detailOpen) return;
166
- const onKey = (e) => {
167
- if (e.key !== "Escape" || e.defaultPrevented) return;
168
- const target = e.target;
169
- if (target?.closest?.('[role="dialog"],[role="alertdialog"]')) return;
170
- onCloseRef.current?.();
171
- };
172
- document.addEventListener("keydown", onKey);
173
- return () => document.removeEventListener("keydown", onKey);
174
- }, [detailOpen]);
175
- const resetButton = onResetFilters ? /* @__PURE__ */ jsxs(
176
- Button,
177
- {
178
- type: "button",
179
- variant: "secondaryOutline",
180
- onClick: onResetFilters,
181
- className: cn(filtersActive === false && "invisible"),
182
- "aria-hidden": filtersActive === false || void 0,
183
- children: [
184
- /* @__PURE__ */ jsx(RotateCcw, { size: 16, "aria-hidden": true }),
185
- "\uD544\uD130 \uCD08\uAE30\uD654"
186
- ]
187
- }
188
- ) : null;
189
- const hasCaption = tableTitle != null || quickFilter != null;
190
- const filterRow = filters || resetButton && !hasCaption ? /* @__PURE__ */ jsxs("div", { className: "flex w-full items-start gap-[8px]", children: [
191
- filters,
192
- !hasCaption ? resetButton : null
193
- ] }) : void 0;
194
- const hasRowClick = Boolean(onRowClick);
195
- const columnDefs = useMemo(() => {
196
- const primary = resolvePrimaryField(primaryField, hasRowClick || Boolean(secondaryField));
197
- return withSecondaryLine(withPrimaryColumn(columns, primary), primary, secondaryField);
198
- }, [columns, primaryField, hasRowClick, secondaryField]);
199
- const total = pagination?.total;
200
- const quickAllCount = quickFilter?.options.every((o) => o.count !== void 0) ? quickFilter.options.reduce((sum, o) => sum + (o.count ?? 0), 0) : void 0;
201
- const quickIsAll = (quickFilter?.value.length ?? 0) === 0;
202
- const quick = quickFilter ? /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-[8px]", children: [
203
- /* @__PURE__ */ jsx("span", { className: "text-small-regular font-medium text-sys-text-subtle", children: quickFilter.label }),
204
- /* @__PURE__ */ jsxs(
205
- ToggleGroup,
206
- {
207
- type: "multiple",
208
- variant: "outline",
209
- spacing: true,
210
- "aria-label": quickFilter.label,
211
- value: quickIsAll ? [QUICK_ALL] : quickFilter.value,
212
- onValueChange: (next) => {
213
- const pressedAll = next.includes(QUICK_ALL) && !quickIsAll;
214
- quickFilter.onChange(pressedAll ? [] : next.filter((v) => v !== QUICK_ALL));
215
- },
216
- children: [
217
- /* @__PURE__ */ jsx(ToggleGroupItem, { value: QUICK_ALL, count: quickAllCount, countVariant: "primary", children: "\uC804\uCCB4" }),
218
- quickFilter.options.map((o) => /* @__PURE__ */ jsx(
219
- ToggleGroupItem,
220
- {
221
- value: o.value,
222
- count: o.count,
223
- countVariant: o.countVariant,
224
- children: o.label
225
- },
226
- o.value
227
- ))
228
- ]
229
- }
230
- )
231
- ] }) : null;
232
- const caption = hasCaption ? /* @__PURE__ */ jsxs("div", { className: "mb-[8px] flex items-center justify-between gap-[8px]", children: [
233
- tableTitle != null || quick ? /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-[16px]", children: [
234
- tableTitle != null ? /* @__PURE__ */ jsx("h2", { className: "text-h6 text-sys-text-main", children: tableTitle }) : null,
235
- quick
236
- ] }) : /* @__PURE__ */ jsx("span", {}),
237
- /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-[16px]", children: [
238
- total != null && quickAllCount === void 0 ? /* @__PURE__ */ jsxs("span", { className: "text-small-regular text-sys-text-subtle", children: [
239
- "\uCD1D ",
240
- total.toLocaleString(),
241
- "\uAC1C"
242
- ] }) : null,
243
- resetButton
244
- ] })
245
- ] }) : null;
246
- const resetRef = useRef(onResetFilters);
247
- useEffect(() => {
248
- resetRef.current = onResetFilters;
249
- }, [onResetFilters]);
250
- const withReset = showEmptyReset(onResetFilters, filtersActive);
251
- const EmptyOverlay = useMemo(
252
- () => function ListPageEmptyOverlay() {
253
- const content = resolveEmptyContent(emptyState);
254
- return /* @__PURE__ */ jsx(
255
- EmptyState,
256
- {
257
- className: "pt-[32px] pb-[16px]",
258
- title: content.title,
259
- description: content.description ?? content.children,
260
- action: withReset && content.children == null ? /* @__PURE__ */ jsx(Button, { type: "button", variant: "secondaryLink", onClick: () => resetRef.current?.(), children: "\uD544\uD130 \uCD08\uAE30\uD654" }) : null
261
- }
262
- );
263
- },
264
- [emptyState, withReset]
265
- );
266
- const rowClassRules = useMemo(
267
- () => activeRowClassRules(activeRowId, tableProps?.rowClassRules),
268
- [activeRowId, tableProps?.rowClassRules]
269
- );
270
- return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
271
- /* @__PURE__ */ jsx(
272
- PageHeader,
273
- {
274
- title,
275
- description,
276
- titleRight,
277
- actions,
278
- bottomRight: filterRow
279
- }
280
- ),
281
- /* @__PURE__ */ jsx("section", { "aria-label": title, className: "px-[24px] py-[32px]", children: error ? /* @__PURE__ */ jsx(Alert, { variant: "danger", children: /* @__PURE__ */ jsx(AlertDescription, { children: error }) }) : (
282
- // 상세 패널(detail)이 있으면 표 쪽이 줄고 패널이 오른쪽에 나란히 선다 — 목록 맥락을 유지한 채 상세를 본다
283
- /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-[24px]", children: [
284
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
285
- caption,
286
- /* @__PURE__ */ jsx(
287
- AgGridTable,
288
- {
289
- rowData: rows,
290
- columnDefs,
291
- loading,
292
- noRowsOverlayComponent: EmptyOverlay,
293
- onSortChanged: onSortChange ? (e) => onSortChange(getSortedColumnState(e).value) : void 0,
294
- onRowClicked: onRowClick ? (e) => {
295
- if (e.data) onRowClick(e.data);
296
- } : void 0,
297
- domLayout: "autoHeight",
298
- ...secondaryField ? { rowHeight: 56 } : {},
299
- ...tableProps,
300
- rowClassRules
301
- }
302
- ),
303
- pagination ? /* @__PURE__ */ jsx(TablePagination, { children: /* @__PURE__ */ jsx(
304
- Pagination,
305
- {
306
- total: pagination.total,
307
- rowsPerPage: pagination.pageSize,
308
- page: pagination.page,
309
- onChange: pagination.onChange
310
- }
311
- ) }) : null
312
- ] }),
313
- detail ? (
314
- // 나란한 상세 패널: 제목·설명·닫기 → 본문 → (안내) → 버튼 줄. 스크롤해도 따라오게 sticky. Card 와 같은 테두리·라운드(그림자 없음).
315
- // <aside>(complementary) 는 다른 landmark 안에 둘 수 없으므로(axe landmark-complementary-is-top-level) 이름 있는 section — DetailPage 의 aside 와 같다
316
- /* @__PURE__ */ jsx(
317
- Panel,
318
- {
319
- title: detail.title,
320
- description: detail.description,
321
- padding: "large",
322
- titleRight: /* @__PURE__ */ jsx(
323
- IconButton,
324
- {
325
- type: "button",
326
- variant: "secondary",
327
- "aria-label": "\uB2EB\uAE30",
328
- onClick: detail.onClose,
329
- children: /* @__PURE__ */ jsx(X, { size: 20 })
330
- }
331
- ),
332
- note: detail.note,
333
- footer: detail.footer,
334
- className: cn("sticky top-[24px] shrink-0", DETAIL_WIDTH[detail.width ?? "medium"]),
335
- children: detail.children
336
- }
337
- )
338
- ) : null
339
- ] })
340
- ) })
341
- ] });
342
- }
343
- function MoreMenu({
344
- items,
345
- deleteAction
346
- }) {
347
- const triggerRef = useRef(null);
348
- const pendingRef = useRef(void 0);
349
- const select = (fn) => () => {
350
- pendingRef.current = fn;
351
- };
352
- return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
353
- /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { ref: triggerRef, variant: "secondary", "aria-label": "\uB354\uBCF4\uAE30", children: /* @__PURE__ */ jsx(Ellipsis, { size: 24 }) }) }),
354
- /* @__PURE__ */ jsxs(
355
- DropdownMenuContent,
356
- {
357
- align: "end",
358
- onCloseAutoFocus: (e) => {
359
- e.preventDefault();
360
- triggerRef.current?.focus();
361
- const fn = pendingRef.current;
362
- pendingRef.current = void 0;
363
- fn?.();
364
- },
365
- children: [
366
- items.map(({ children, onClick, disabled }, i) => /* @__PURE__ */ jsx(DropdownMenuItem, { disabled, onSelect: select(onClick), children }, i)),
367
- deleteAction && items.length ? /* @__PURE__ */ jsx(DropdownMenuSeparator, {}) : null,
368
- deleteAction ? /* @__PURE__ */ jsx(
369
- DropdownMenuItem,
370
- {
371
- variant: "danger",
372
- disabled: deleteAction.disabled,
373
- onSelect: select(deleteAction.onClick),
374
- children: deleteAction.children
375
- }
376
- ) : null
377
- ]
378
- }
379
- )
380
- ] });
381
- }
382
- function DetailPage({
383
- primaryAction,
384
- secondaryActions,
385
- deleteAction,
386
- actions,
387
- actionsNote,
388
- banner,
389
- loading,
390
- error,
391
- onRetry,
392
- notFound,
393
- aside,
394
- asideTitle = "\uAE30\uBCF8 \uC815\uBCF4",
395
- width = "full",
396
- children,
397
- ...header
398
- }) {
399
- let body;
400
- if (loading) {
401
- body = /* @__PURE__ */ jsx(LoadingState, {});
402
- } else if (error) {
403
- body = /* @__PURE__ */ jsx(ErrorState, { className: "py-[32px]", description: error, onRetry });
404
- } else if (notFound) {
405
- body = /* @__PURE__ */ jsx(
406
- EmptyState,
407
- {
408
- className: "py-[32px]",
409
- title: notFound === true ? "\uD56D\uBAA9\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." : notFound,
410
- description: notFound === true ? "\uC0AD\uC81C\uB418\uC5C8\uAC70\uB098 \uC8FC\uC18C\uAC00 \uC798\uBABB\uB418\uC5C8\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4." : void 0
411
- }
412
- );
413
- } else if (aside) {
414
- body = // 넓은 화면: 본문(남는 폭) + 패널 408(`--w-page-aside` — FormPage 검토 패널과 같은 폭, 2026-11-22. 그전엔 본문 2 : 패널 1 이라
415
- // 1440 폭에서 패널이 456px 로 폼과 달랐다). 좁은 화면: 세로로 쌓이고 패널은 본문 아래.
416
- // 나란히 놓는 조건은 **본문 칸 폭 896 이상**(@4xl, 아래 @container) 하나 — 화면 폭은 보지 않는다(FormPage 와 같은 규칙, 2026-11-22).
417
- // 화면 폭(xl 1280)으로 판정하던 때는 1279px 화면에서 자리가 1231px 남아도 패널이 내려갔고(조사한 서비스들은 900px 에서도 옆에 둔다),
418
- // 화면은 넓어도 칸이 좁으면(사이드바·분할 화면) 고정 폭 패널이 왼쪽 열을 눌렀다 — 800px 칸에서 왼쪽 320px, 표가 가로로 넘쳐 axe
419
- // scrollable-region-focusable. 896 이면 왼쪽 열이 최소 464px(표는 360px 까지 넘치지 않는다)
420
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-[24px] @4xl:grid-cols-[minmax(0,1fr)_var(--w-page-aside)] @4xl:items-start", children: [
421
- /* @__PURE__ */ jsx("div", { className: "min-w-0", children }),
422
- /* @__PURE__ */ jsx(Panel, { title: asideTitle, className: "@4xl:sticky @4xl:top-[24px]", children: /* @__PURE__ */ jsx("div", { className: "@container/aside", children: aside }) })
423
- ] });
424
- } else {
425
- body = children;
426
- }
427
- const VISIBLE_SECONDARY = 2;
428
- const visibleSecondary = secondaryActions?.slice(0, VISIBLE_SECONDARY) ?? [];
429
- const overflowSecondary = secondaryActions?.slice(VISIBLE_SECONDARY) ?? [];
430
- const primaryButton = primaryAction ? /* @__PURE__ */ jsx(Button, { type: "button", variant: "primaryBold", ...primaryAction }) : null;
431
- const moreMenu = (items) => items.length || deleteAction ? /* @__PURE__ */ jsx(MoreMenu, { items, deleteAction }) : null;
432
- const fullRow = /* @__PURE__ */ jsxs(Fragment, { children: [
433
- moreMenu(overflowSecondary),
434
- visibleSecondary.map((action, i) => /* @__PURE__ */ jsx(Button, { type: "button", variant: "secondary", ...action }, i)),
435
- primaryButton
436
- ] });
437
- const collapsedRow = /* @__PURE__ */ jsxs(Fragment, { children: [
438
- moreMenu(secondaryActions ?? []),
439
- primaryButton
440
- ] });
441
- const collapsible = Boolean(deleteAction || secondaryActions?.length);
442
- const note = actionsNote != null ? /* @__PURE__ */ jsx(
443
- "p",
444
- {
445
- "data-slot": "detail-actions-note",
446
- className: "mb-[8px] break-keep text-right text-small-regular text-sys-text-subtle wrap-break-word",
447
- children: actionsNote
448
- }
449
- ) : null;
450
- const actionRow = actions ? actions : collapsible ? /* @__PURE__ */ jsxs(Fragment, { children: [
451
- /* @__PURE__ */ jsx("div", { "data-slot": "detail-actions-full", className: "hidden items-center gap-[8px] @3xl:flex", children: fullRow }),
452
- /* @__PURE__ */ jsx("div", { "data-slot": "detail-actions-collapsed", className: "flex items-center gap-[8px] @3xl:hidden", children: collapsedRow })
453
- ] }) : primaryButton ? primaryButton : void 0;
454
- return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
455
- /* @__PURE__ */ jsx(PageHeader, { ...header, actions: actionRow }),
456
- /* @__PURE__ */ jsxs(
457
- "section",
458
- {
459
- "aria-label": header.title || "\uBCF8\uBB38",
460
- className: "flex flex-col gap-[24px] px-[24px] py-[24px]",
461
- children: [
462
- banner,
463
- /* @__PURE__ */ jsxs("div", { className: cn("@container w-full", width === "panel" && "mx-auto max-w-[900px]"), children: [
464
- note,
465
- body
466
- ] })
467
- ]
468
- }
469
- )
470
- ] });
471
- }
472
- function useFormShell({
473
- form,
474
- onSubmit,
475
- submitting,
476
- submitMode = "always"
477
- }) {
478
- const { isValid, isSubmitting } = form.formState;
479
- const busy = Boolean(submitting) || isSubmitting;
480
- const handleSubmit = form.handleSubmit((values) => onSubmit(values));
481
- return { busy, canSubmit: !busy && (submitMode === "always" || isValid), handleSubmit };
482
- }
483
- function FormError({ error, className }) {
484
- if (!error) return null;
485
- return /* @__PURE__ */ jsx(Alert, { variant: "danger", className, children: /* @__PURE__ */ jsx(AlertDescription, { children: error }) });
486
- }
487
- function FormActions({
488
- busy,
489
- canSubmit,
490
- onCancel,
491
- submitLabel = "\uC800\uC7A5",
492
- cancelLabel = "\uCDE8\uC18C",
493
- formId
494
- }) {
495
- return /* @__PURE__ */ jsxs(Fragment, { children: [
496
- onCancel ? /* @__PURE__ */ jsx(
497
- Button,
498
- {
499
- type: "button",
500
- variant: "secondaryOutline",
501
- onClick: onCancel,
502
- disabled: busy,
503
- form: formId,
504
- children: cancelLabel
505
- }
506
- ) : null,
507
- /* @__PURE__ */ jsx(
508
- Button,
509
- {
510
- type: "submit",
511
- variant: "primaryBold",
512
- loading: busy,
513
- disabled: !canSubmit,
514
- form: formId,
515
- children: submitLabel
516
- }
517
- )
518
- ] });
519
- }
520
- function FormPage({
521
- title,
522
- description,
523
- breadcrumb,
524
- titleRight,
525
- form,
526
- onSubmit,
527
- onCancel,
528
- submitLabel,
529
- cancelLabel,
530
- submitting,
531
- submitMode,
532
- error,
533
- requiredLegend,
534
- canvas = "plain",
535
- align = "start",
536
- aside,
537
- asideTitle = "\uAC80\uD1A0",
538
- children
539
- }) {
540
- const { busy, canSubmit, handleSubmit } = useFormShell({ form, onSubmit, submitting, submitMode });
541
- const formId = useId();
542
- const contentMaxWidth = aside ? "var(--max-w-page-content)" : "var(--max-w-form-control)";
543
- const actions = /* @__PURE__ */ jsx(
544
- FormActions,
545
- {
546
- busy,
547
- canSubmit,
548
- onCancel,
549
- submitLabel,
550
- cancelLabel,
551
- formId
552
- }
553
- );
554
- const body = /* @__PURE__ */ jsxs(Fragment, { children: [
555
- requiredLegend ? /* @__PURE__ */ jsxs("p", { className: "text-small-regular text-sys-text-subtle", children: [
556
- /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "text-danger30", children: "*" }),
557
- " ",
558
- "\uD45C\uC2DC\uB294 \uD544\uC218 \uC785\uB825 \uD56D\uBAA9\uC785\uB2C8\uB2E4"
559
- ] }) : null,
560
- /* @__PURE__ */ jsx(Form, { ...form, children: /* @__PURE__ */ jsxs("form", { id: formId, noValidate: true, onSubmit: handleSubmit, children: [
561
- /* @__PURE__ */ jsx(FormSectionLevelContext.Provider, { value: 2, children }),
562
- /* @__PURE__ */ jsx(FormError, { error, className: "mt-[24px]" }),
563
- aside ? null : /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
564
- FormFooter,
565
- {
566
- align: "end",
567
- className: "mt-[24px] border-t border-sys-divider-subtle pt-[16px]",
568
- children: /* @__PURE__ */ jsx("div", { className: "flex gap-[8px]", children: actions })
569
- }
570
- ) })
571
- ] }) })
572
- ] });
573
- const column = canvas === "subtle" ? (
574
- // 폼 전체를 흰 Card 하나로(섹션 사이 구분선은 그대로). 위 8px 는 첫 FormSection 의 pt-[16px] 과 더해 24
575
- /* @__PURE__ */ jsx(
576
- Card,
577
- {
578
- className: cn(
579
- "w-full max-w-[var(--max-w-form-control)] px-[24px] pb-[24px] pt-[8px]",
580
- align === "center" && !aside && "mx-auto"
581
- ),
582
- children: body
583
- }
584
- )
585
- ) : /* @__PURE__ */ jsx(
586
- "div",
587
- {
588
- className: cn(
589
- "w-full max-w-[var(--max-w-form-control)]",
590
- align === "center" && !aside && "mx-auto"
591
- ),
592
- children: body
593
- }
594
- );
595
- return (
596
- // subtle 의 캔버스 회색은 기존 토큰(grayscale20, 진단 18-A 의 f7 변형)을 쓴다 — 채택되면 전용 sys 토큰으로 올린다
597
- /* @__PURE__ */ jsxs("div", { className: cn("w-full", canvas === "subtle" && "bg-sys-background-hover"), children: [
598
- /* @__PURE__ */ jsx(
599
- PageHeader,
600
- {
601
- title,
602
- description,
603
- breadcrumb,
604
- titleRight,
605
- contentMaxWidth
606
- }
607
- ),
608
- /* @__PURE__ */ jsx("section", { "aria-label": title || "\uBCF8\uBB38", className: "px-[24px] py-[32px]", children: /* @__PURE__ */ jsx("div", { className: "@container mx-auto w-full", style: { maxWidth: contentMaxWidth }, children: aside ? (
609
- // 폼 열(최대 720px) + 검토 패널 408(`--w-page-aside`). 나란히 놓는 조건은 **본문 칸 폭 896 이상**(@4xl) 하나 — DetailPage aside 와 같은 규칙
610
- // (2026-11-22). 그전엔 화면 1280 이상(xl)이면 나란히였고 패널이 280px 까지 줄어 값이 말줄임으로 잘렸다(화면 1280 + 사이드바 240 →
611
- // 폼 688 · 패널 280). 이제 패널은 408 고정, 폼 열이 464~720 에서 줄고, 896 미만이면 패널이 폼 아래로.
612
- // <aside>(complementary) 는 다른 landmark 안에 둘 수 없으므로(axe) 이름 있는 section (DetailPage aside 와 같은 꼴)
613
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-[24px] @4xl:grid-cols-[minmax(0,var(--max-w-form-control))_var(--w-page-aside)] @4xl:items-start", children: [
614
- column,
615
- /* @__PURE__ */ jsxs(Panel, { title: asideTitle, className: "@4xl:sticky @4xl:top-[24px]", children: [
616
- /* @__PURE__ */ jsx("div", { className: "@container/aside", children: aside }),
617
- /* @__PURE__ */ jsx(
618
- "div",
619
- {
620
- "data-slot": "form-page-aside-actions",
621
- className: "mt-[16px] flex justify-end gap-[8px] border-t border-sys-divider-subtle pt-[16px]",
622
- children: actions
623
- }
624
- )
625
- ] })
626
- ] })
627
- ) : column }) })
628
- ] })
629
- );
630
- }
631
- function FormDrawer({
632
- open,
633
- onOpenChange,
634
- side,
635
- size,
636
- title,
637
- description,
638
- form,
639
- onSubmit,
640
- submitLabel,
641
- cancelLabel,
642
- submitting,
643
- error,
644
- submitMode,
645
- children
646
- }) {
647
- const { busy, canSubmit, handleSubmit } = useFormShell({ form, onSubmit, submitting, submitMode });
648
- const guardedOpenChange = (next) => {
649
- if (!next && busy) return;
650
- onOpenChange(next);
651
- };
652
- return /* @__PURE__ */ jsx(Drawer, { open, onOpenChange: guardedOpenChange, children: /* @__PURE__ */ jsxs(
653
- DrawerContent,
654
- {
655
- side,
656
- size,
657
- ...description ? {} : { "aria-describedby": void 0 },
658
- children: [
659
- /* @__PURE__ */ jsxs(DrawerHeader, { children: [
660
- /* @__PURE__ */ jsx(DrawerTitle, { children: title }),
661
- description ? /* @__PURE__ */ jsx(DrawerDescription, { children: description }) : null
662
- ] }),
663
- /* @__PURE__ */ jsx(Form, { ...form, children: /* @__PURE__ */ jsxs("form", { noValidate: true, onSubmit: handleSubmit, className: "flex min-h-0 flex-1 flex-col", children: [
664
- /* @__PURE__ */ jsxs(DrawerBody, { className: "px-[24px]", children: [
665
- children,
666
- /* @__PURE__ */ jsx(FormError, { error, className: "mt-[24px]" })
667
- ] }),
668
- /* @__PURE__ */ jsx(DrawerFooter, { children: /* @__PURE__ */ jsx(
669
- FormActions,
670
- {
671
- busy,
672
- canSubmit,
673
- onCancel: () => guardedOpenChange(false),
674
- submitLabel,
675
- cancelLabel
676
- }
677
- ) })
678
- ] }) })
679
- ]
680
- }
681
- ) });
682
- }
683
- function FormDialog({
684
- open,
685
- onOpenChange,
686
- width,
687
- title,
688
- description,
689
- form,
690
- onSubmit,
691
- submitLabel,
692
- cancelLabel,
693
- submitting,
694
- error,
695
- submitMode,
696
- children
697
- }) {
698
- const { busy, canSubmit, handleSubmit } = useFormShell({ form, onSubmit, submitting, submitMode });
699
- const guardedOpenChange = (next) => {
700
- if (!next && busy) return;
701
- onOpenChange(next);
702
- };
703
- return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: guardedOpenChange, children: /* @__PURE__ */ jsxs(
704
- DialogContent,
705
- {
706
- width,
707
- hideCloseButton: busy,
708
- ...description ? {} : { "aria-describedby": void 0 },
709
- children: [
710
- /* @__PURE__ */ jsxs(DialogHeader, { children: [
711
- /* @__PURE__ */ jsx(DialogTitle, { children: title }),
712
- description ? /* @__PURE__ */ jsx(DialogDescription, { children: description }) : null
713
- ] }),
714
- /* @__PURE__ */ jsx(Form, { ...form, children: /* @__PURE__ */ jsxs("form", { noValidate: true, onSubmit: handleSubmit, className: "flex flex-col gap-[16px]", children: [
715
- children,
716
- /* @__PURE__ */ jsx(FormError, { error }),
717
- /* @__PURE__ */ jsx(DialogFooter, { children: /* @__PURE__ */ jsx(
718
- FormActions,
719
- {
720
- busy,
721
- canSubmit,
722
- onCancel: () => guardedOpenChange(false),
723
- submitLabel,
724
- cancelLabel
725
- }
726
- ) })
727
- ] }) })
728
- ]
729
- }
730
- ) });
731
- }
732
- var TONE_TEXT = {
733
- default: "text-sys-text-main",
734
- warning: "text-warning40",
735
- danger: "text-danger30"
736
- };
737
- var TONE_BAR = { default: "bg-primary30", warning: "bg-warning30", danger: "bg-danger30" };
738
- function StatTile({
739
- label,
740
- value,
741
- caption,
742
- href,
743
- ratio,
744
- tone = "default",
745
- loading
746
- }) {
747
- const labelId = useId();
748
- const percent = ratio == null ? null : Math.round(Math.min(Math.max(ratio, 0), 1) * 100);
749
- return /* @__PURE__ */ jsxs(Card, { className: "relative gap-[4px] p-[16px]", children: [
750
- /* @__PURE__ */ jsx("span", { id: labelId, className: "text-h6 text-sys-text-subtle", children: href ? (
751
- // 타일 전체를 클릭 영역으로: 링크의 ::after 를 Card 크기로 늘린다
752
- /* @__PURE__ */ jsx(
753
- "a",
754
- {
755
- href,
756
- className: "after:absolute after:inset-0 after:rounded-medium focus-visible:outline-[2px] focus-visible:outline-sys-focus-ring-main",
757
- children: label
758
- }
759
- )
760
- ) : label }),
761
- loading ? /* @__PURE__ */ jsx(Skeleton, { role: "status", "aria-label": "\uBD88\uB7EC\uC624\uB294 \uC911", className: "h-[32px] w-[80px]" }) : /* @__PURE__ */ jsxs("span", { className: cn("flex items-center gap-[6px] text-h2", TONE_TEXT[tone]), children: [
762
- tone !== "default" ? /* @__PURE__ */ jsx(TriangleAlert, { "aria-hidden": true, size: 20, className: "shrink-0" }) : null,
763
- value
764
- ] }),
765
- percent != null && !loading ? /* @__PURE__ */ jsx(
766
- "div",
767
- {
768
- role: "progressbar",
769
- "aria-labelledby": labelId,
770
- "aria-valuemin": 0,
771
- "aria-valuemax": 100,
772
- "aria-valuenow": percent,
773
- className: "mt-[4px] h-[4px] w-full overflow-hidden rounded-full bg-secondary-o10",
774
- children: /* @__PURE__ */ jsx(
775
- "div",
776
- {
777
- className: cn("h-full rounded-full", TONE_BAR[tone]),
778
- style: { width: `${percent}%` }
779
- }
780
- )
781
- }
782
- ) : null,
783
- caption ? /* @__PURE__ */ jsx("span", { className: "text-small-regular text-sys-text-subtler", children: caption }) : null
784
- ] });
785
- }
786
- function DashboardLayout({
787
- actions,
788
- stats,
789
- loading,
790
- error,
791
- onRetry,
792
- empty,
793
- children,
794
- ...header
795
- }) {
796
- let body;
797
- if (error) body = /* @__PURE__ */ jsx(ErrorState, { className: "py-[32px]", description: error, onRetry });
798
- else if (empty)
799
- body = /* @__PURE__ */ jsx(EmptyState, { className: "py-[32px]", children: empty === true ? "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." : empty });
800
- else
801
- body = /* @__PURE__ */ jsxs(Fragment, { children: [
802
- stats?.length ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-[12px] xl:grid-cols-4", children: stats.map((stat, i) => /* @__PURE__ */ jsx(StatTile, { ...stat, loading }, i)) }) : null,
803
- children
804
- ] });
805
- return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
806
- /* @__PURE__ */ jsx(PageHeader, { ...header, actions }),
807
- /* @__PURE__ */ jsx(
808
- "section",
809
- {
810
- "aria-label": header.title || "\uBCF8\uBB38",
811
- className: "flex flex-col gap-[32px] px-[24px] py-[24px]",
812
- children: body
813
- }
814
- )
815
- ] });
816
- }
817
- function DashboardSection({ title, action, columns, children }) {
818
- const id = useId();
819
- return /* @__PURE__ */ jsxs("section", { "aria-labelledby": id, className: "flex flex-col gap-[16px]", children: [
820
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-[12px]", children: [
821
- /* @__PURE__ */ jsx("h2", { id, className: "text-h4 text-sys-text-main", children: title }),
822
- action
823
- ] }),
824
- columns ? (
825
- // 1px 간격 + 구분선 색 배경 = 칸 사이 가로·세로 구분선. 칸(DashboardPanel)은 자기 배경을 가진다
826
- // 2열에서 칸 수가 홀수면 마지막 칸이 두 열을 차지해 빈 칸이 생기지 않게 한다
827
- /* @__PURE__ */ jsx(
828
- Card,
829
- {
830
- className: cn(
831
- "grid grid-cols-1 gap-px overflow-hidden bg-sys-divider-subtler",
832
- columns === 2 && "xl:grid-cols-2 xl:[&>:last-child:nth-child(odd)]:col-span-2"
833
- ),
834
- children
835
- }
836
- )
837
- ) : children
838
- ] });
839
- }
840
- function DashboardPanel({
841
- title,
842
- value,
843
- unit,
844
- stats,
845
- loading,
846
- empty,
847
- children
848
- }) {
849
- let body = children;
850
- if (loading) body = /* @__PURE__ */ jsx(LoadingState, { lines: 2 });
851
- else if (empty)
852
- body = /* @__PURE__ */ jsx(EmptyState, { className: "py-[32px]", children: empty === true ? "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." : empty });
853
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[16px] bg-sys-background p-[24px]", children: [
854
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-end gap-[12px]", children: [
855
- /* @__PURE__ */ jsx("h3", { className: "text-h6 text-sys-text-subtle", children: title }),
856
- value !== void 0 && value !== null ? /* @__PURE__ */ jsxs("span", { className: "flex items-end gap-[2px]", children: [
857
- /* @__PURE__ */ jsx("span", { className: "text-h3 text-sys-text-main", children: value }),
858
- unit ? /* @__PURE__ */ jsx("span", { className: "text-base-regular text-sys-text-subtle", children: unit }) : null
859
- ] }) : null,
860
- stats?.map((stat, i) => /* @__PURE__ */ jsxs(
861
- "span",
862
- {
863
- className: "flex items-end gap-[4px] border-l border-sys-divider-subtler pl-[12px]",
864
- children: [
865
- /* @__PURE__ */ jsx("span", { className: "text-base-regular text-sys-text-subtle", children: stat.label }),
866
- /* @__PURE__ */ jsx("span", { className: "text-h5 text-sys-text-main", children: stat.value })
867
- ]
868
- },
869
- i
870
- ))
871
- ] }),
872
- body
873
- ] });
874
- }
875
- var useIsoLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
876
- var isEmpty = (content) => content == null || content === "" || content === false;
877
- var MessageRow = memo(function MessageRow2({
878
- item,
879
- streaming,
880
- canRegenerate,
881
- onRegenerate,
882
- onFeedback,
883
- headingLevel
884
- }) {
885
- const regenerate = onRegenerate ? () => onRegenerate(item.id) : void 0;
886
- return /* @__PURE__ */ jsx(
887
- ChatMessage,
888
- {
889
- from: item.role,
890
- headingLevel,
891
- pending: streaming && isEmpty(item.content),
892
- streaming,
893
- error: item.error,
894
- onRetry: item.error ? regenerate : void 0,
895
- attachments: item.attachments,
896
- sources: item.sources,
897
- meta: item.meta,
898
- actions: item.actions,
899
- copyText: item.copyText,
900
- onRegenerate: canRegenerate && !item.error ? regenerate : void 0,
901
- onFeedback: onFeedback ? (value) => onFeedback(item.id, value) : void 0,
902
- feedback: item.feedback,
903
- children: item.content
904
- }
905
- );
906
- });
907
- var STATUS = {
908
- generating: "\uC751\uB2F5\uC744 \uC0DD\uC131\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4",
909
- done: "\uC751\uB2F5\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4",
910
- stopped: "\uC751\uB2F5 \uC0DD\uC131\uC744 \uC911\uC9C0\uD588\uC2B5\uB2C8\uB2E4",
911
- failed: "\uC751\uB2F5\uC744 \uC0DD\uC131\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4"
912
- };
913
- function ChatHeader({ title, actions }) {
914
- if (title == null && !actions) return null;
915
- return /* @__PURE__ */ jsxs("header", { className: "flex shrink-0 items-center justify-between gap-[12px] border-b border-sys-divider-subtler bg-sys-background px-[16px] py-[8px]", children: [
916
- /* @__PURE__ */ jsx("div", { className: "flex min-w-0 items-center gap-[8px]", children: title != null ? /* @__PURE__ */ jsx("h2", { className: "truncate text-sys-text-main text-h5", children: title }) : null }),
917
- actions ? /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center gap-[8px]", children: actions }) : null
918
- ] });
919
- }
920
- function ChatConversation({
921
- variant,
922
- label,
923
- messages,
924
- streaming = false,
925
- onSend,
926
- onStop,
927
- onRegenerate,
928
- onFeedback,
929
- welcome,
930
- note,
931
- loading = false,
932
- error,
933
- onRetry,
934
- ...composerProps
935
- }) {
936
- const logRef = useRef(null);
937
- const endRef = useRef(null);
938
- const composerRef = useRef(null);
939
- const atBottomRef = useRef(true);
940
- const [atBottom, setAtBottom] = useState(true);
941
- const sentRef = useRef(false);
942
- const [ownHeight, setOwnHeight] = useState(true);
943
- const contentRef = useRef(null);
944
- const last = messages[messages.length - 1];
945
- const waiting = streaming && (last == null || last.role === "user");
946
- const lastFailed = Boolean(last?.error);
947
- const empty = messages.length === 0 && !waiting;
948
- const headingLevel = variant === "page" ? 2 : 3;
949
- const [announce, setAnnounce] = useState("");
950
- const [stopped, setStopped] = useState(false);
951
- const [prevStreaming, setPrevStreaming] = useState(streaming);
952
- if (prevStreaming !== streaming) {
953
- setPrevStreaming(streaming);
954
- setAnnounce(
955
- streaming ? STATUS.generating : stopped ? STATUS.stopped : lastFailed ? STATUS.failed : STATUS.done
956
- );
957
- if (streaming) setStopped(false);
958
- }
959
- useEffect(() => {
960
- const log = logRef.current;
961
- if (!log || typeof ResizeObserver === "undefined") return;
962
- const ro = new ResizeObserver(() => {
963
- const content = contentRef.current;
964
- setOwnHeight(
965
- log.scrollHeight > log.clientHeight + 1 || content != null && log.clientHeight > content.offsetHeight + 1
966
- );
967
- });
968
- ro.observe(log);
969
- if (contentRef.current) ro.observe(contentRef.current);
970
- return () => ro.disconnect();
971
- }, [empty, loading, error]);
972
- useEffect(() => {
973
- const el = endRef.current;
974
- const log = logRef.current;
975
- if (!el || !log || typeof IntersectionObserver === "undefined") return;
976
- const io = new IntersectionObserver(
977
- (entries) => {
978
- const visible = entries[entries.length - 1]?.isIntersecting ?? true;
979
- atBottomRef.current = visible;
980
- setAtBottom(visible);
981
- },
982
- { root: ownHeight ? log : null }
983
- );
984
- io.observe(el);
985
- return () => io.disconnect();
986
- }, [empty, loading, error, ownHeight]);
987
- const scrollToEnd = useCallback((moveDocument) => {
988
- const log = logRef.current;
989
- if (!log) return;
990
- if (log.scrollHeight > log.clientHeight + 1) log.scrollTop = log.scrollHeight;
991
- else if (moveDocument) endRef.current?.scrollIntoView({ block: "nearest" });
992
- }, []);
993
- useEffect(() => {
994
- const content = contentRef.current;
995
- const log = logRef.current;
996
- if (!content || !log || typeof ResizeObserver === "undefined") return;
997
- const ro = new ResizeObserver(() => {
998
- if (atBottomRef.current) scrollToEnd(sentRef.current);
999
- });
1000
- ro.observe(content);
1001
- ro.observe(log);
1002
- return () => ro.disconnect();
1003
- }, [empty, loading, error, scrollToEnd]);
1004
- const dockRef = useRef(null);
1005
- const dockTopRef = useRef(null);
1006
- const centered = empty && variant === "page";
1007
- useIsoLayoutEffect(() => {
1008
- const el = dockRef.current;
1009
- const from = dockTopRef.current;
1010
- if (!el || from == null || typeof el.animate !== "function") return;
1011
- if (window.matchMedia?.("(prefers-reduced-motion: reduce)").matches) return;
1012
- const delta = from - el.getBoundingClientRect().top;
1013
- if (Math.abs(delta) < 1) return;
1014
- el.animate([{ transform: `translateY(${delta}px)` }, { transform: "translateY(0)" }], {
1015
- // 0.15초 — 보내자마자 입력창이 제자리를 찾게 짧게(디자이너 지정 2026-11-18). 기록 바·옆 패널은 0.3초
1016
- duration: 150,
1017
- easing: "ease-in-out"
1018
- });
1019
- }, [centered]);
1020
- useIsoLayoutEffect(() => {
1021
- dockTopRef.current = dockRef.current?.getBoundingClientRect().top ?? null;
1022
- });
1023
- const send = (text) => {
1024
- dockTopRef.current = dockRef.current?.getBoundingClientRect().top ?? dockTopRef.current;
1025
- atBottomRef.current = true;
1026
- sentRef.current = true;
1027
- onSend(text);
1028
- };
1029
- const stop = onStop ? () => {
1030
- setStopped(true);
1031
- onStop();
1032
- } : void 0;
1033
- const composer = /* @__PURE__ */ jsx(
1034
- ChatComposer,
1035
- {
1036
- ref: composerRef,
1037
- ...composerProps,
1038
- onSubmit: send,
1039
- streaming,
1040
- onStop: stop
1041
- }
1042
- );
1043
- const noteLine = note ? /* @__PURE__ */ jsx("p", { className: "m-0 text-center text-small-regular-h text-sys-text-subtler", children: note }) : null;
1044
- const suggestions = welcome?.suggestions?.length ? /* @__PURE__ */ jsx("ul", { className: "m-0 flex list-none flex-wrap justify-center gap-[8px] p-0", children: welcome.suggestions.map((text) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
1045
- Button,
1046
- {
1047
- type: "button",
1048
- variant: "secondaryOutline",
1049
- shape: "rounded",
1050
- weight: "medium",
1051
- disabled: composerProps.disabled || streaming,
1052
- onClick: () => send(text),
1053
- children: text
1054
- }
1055
- ) }, text)) }) : null;
1056
- const greeting = welcome ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[8px] text-center", children: [
1057
- /* @__PURE__ */ jsx("p", { className: "m-0 text-h2 text-primary30", children: welcome.title }),
1058
- welcome.description ? /* @__PURE__ */ jsx("p", { className: "m-0 break-keep text-base-regular text-sys-text-subtle wrap-break-word", children: welcome.description }) : null
1059
- ] }) : null;
1060
- const status = /* @__PURE__ */ jsx("div", { role: "status", "aria-live": "polite", "aria-atomic": "true", className: "sr-only", children: announce });
1061
- if (loading || error) {
1062
- return /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [
1063
- /* @__PURE__ */ jsx("div", { className: "flex min-h-0 flex-1 items-center justify-center px-[24px] py-[32px]", children: loading ? /* @__PURE__ */ jsx(LoadingState, { className: "w-full max-w-[768px]", lines: 4 }) : /* @__PURE__ */ jsx(ErrorState, { title: "\uB300\uD654\uB97C \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4", description: error, onRetry }) }),
1064
- status
1065
- ] });
1066
- }
1067
- return /* @__PURE__ */ jsxs(
1068
- "div",
1069
- {
1070
- className: cn(
1071
- "flex min-h-0 flex-1 flex-col",
1072
- // 바탕 그라데이션 층이 이 상자 밖으로 내려가지 않게 쌓임 맥락을 만든다
1073
- empty && "relative isolate",
1074
- centered && "justify-center py-[32px]"
1075
- ),
1076
- children: [
1077
- empty ? (
1078
- // 빈 대화의 바탕 — PageHeader 와 같은 그라데이션 토큰을 절반 세기로(더 은은하게). 라이트·다크 모두 토큰을 따른다.
1079
- // 첫 메시지를 보내면 사라진다(대화 중에는 글 읽기에 방해가 되지 않게 흰 바탕)
1080
- /* @__PURE__ */ jsx(
1081
- "div",
1082
- {
1083
- "aria-hidden": true,
1084
- className: "pointer-events-none absolute inset-0 -z-10 bg-[image:var(--color-page-header-bg)] opacity-50"
1085
- }
1086
- )
1087
- ) : null,
1088
- /* @__PURE__ */ jsxs(
1089
- "div",
1090
- {
1091
- ref: logRef,
1092
- role: "log",
1093
- "aria-label": label,
1094
- "aria-live": "off",
1095
- tabIndex: empty ? void 0 : 0,
1096
- className: cn(
1097
- "outline-none focus-visible:ring-[2px] focus-visible:ring-inset focus-visible:ring-sys-focus-ring-main",
1098
- centered ? "shrink-0" : "min-h-0 flex-1 overflow-y-auto"
1099
- ),
1100
- children: [
1101
- empty ? /* @__PURE__ */ jsxs(
1102
- "div",
1103
- {
1104
- className: cn(
1105
- "flex flex-col items-center justify-center gap-[24px] px-[24px]",
1106
- centered ? "pb-[24px]" : "min-h-full py-[32px]"
1107
- ),
1108
- children: [
1109
- greeting,
1110
- suggestions
1111
- ]
1112
- }
1113
- ) : /* @__PURE__ */ jsxs(
1114
- "div",
1115
- {
1116
- ref: contentRef,
1117
- className: "mx-auto flex w-full max-w-[768px] flex-col gap-[24px] px-[24px] pt-[24px] pb-[32px]",
1118
- children: [
1119
- messages.map((item, i) => {
1120
- const isLast = i === messages.length - 1;
1121
- return /* @__PURE__ */ jsx(
1122
- MessageRow,
1123
- {
1124
- item,
1125
- streaming: streaming && isLast && item.role === "assistant",
1126
- canRegenerate: isLast && item.role === "assistant" && !streaming,
1127
- onRegenerate,
1128
- onFeedback,
1129
- headingLevel
1130
- },
1131
- item.id
1132
- );
1133
- }),
1134
- waiting ? /* @__PURE__ */ jsx(ChatMessage, { from: "assistant", pending: true, headingLevel }) : null
1135
- ]
1136
- }
1137
- ),
1138
- /* @__PURE__ */ jsx("div", { ref: endRef, "aria-hidden": true, className: "pointer-events-none -mt-[32px] h-[32px]" })
1139
- ]
1140
- }
1141
- ),
1142
- /* @__PURE__ */ jsx(
1143
- "div",
1144
- {
1145
- ref: dockRef,
1146
- className: cn(
1147
- "shrink-0 px-[24px]",
1148
- // 대화 중에는 아래로 지나가는 메시지를 가린다. 빈 대화는 지나갈 것이 없어 바탕 그라데이션이 비치게 둔다
1149
- !empty && "bg-sys-background",
1150
- // sticky 는 부모 높이가 없을 때만 — 높이가 있으면 입력창은 이미 맨 아래다. 늘 걸어 두면 잘라 내는(overflow) 조상이
1151
- // 대화보다 낮을 때(축소 미리보기 등) 그 조상 바닥에 맞춰 입력창이 위로 끌려 올라간다
1152
- !centered && "pb-[16px]",
1153
- !centered && !ownHeight && "sticky bottom-0"
1154
- ),
1155
- children: /* @__PURE__ */ jsxs("div", { className: "relative mx-auto flex w-full max-w-[768px] flex-col gap-[8px]", children: [
1156
- !atBottom && !empty ? /* @__PURE__ */ jsx(
1157
- IconButton,
1158
- {
1159
- variant: "outline",
1160
- shape: "rounded",
1161
- "aria-label": "\uB9E8 \uC544\uB798\uB85C \uC774\uB3D9",
1162
- className: "absolute -top-[12px] left-1/2 -translate-x-1/2 -translate-y-full bg-sys-background shadow-gray-small",
1163
- onClick: () => {
1164
- atBottomRef.current = true;
1165
- scrollToEnd(true);
1166
- composerRef.current?.focus();
1167
- },
1168
- children: /* @__PURE__ */ jsx(ArrowDown, { size: 20 })
1169
- }
1170
- ) : null,
1171
- composer,
1172
- noteLine
1173
- ] })
1174
- }
1175
- ),
1176
- status
1177
- ]
1178
- }
1179
- );
1180
- }
1181
- var SIDE_WIDTH = {
1182
- small: "w-[360px]",
1183
- medium: "w-[480px]"
1184
- };
1185
- var HISTORY_INLINE_MIN = 960;
1186
- var SIDE_INLINE_MIN = 1280;
1187
- var SLIDE = "duration-300 ease-in-out motion-reduce:transition-none";
1188
- function useWidth(ref) {
1189
- const [width, setWidth] = useState(Number.POSITIVE_INFINITY);
1190
- useEffect(() => {
1191
- const el = ref.current;
1192
- if (!el || typeof ResizeObserver === "undefined") return;
1193
- const ro = new ResizeObserver(([entry]) => {
1194
- if (entry) setWidth(entry.contentRect.width);
1195
- });
1196
- ro.observe(el);
1197
- return () => ro.disconnect();
1198
- }, [ref]);
1199
- return width;
1200
- }
1201
- function Brand({
1202
- heading = false,
1203
- logo,
1204
- title
1205
- }) {
1206
- const Root = heading ? "h1" : "div";
1207
- return /* @__PURE__ */ jsx(
1208
- Root,
1209
- {
1210
- "aria-hidden": heading ? void 0 : true,
1211
- className: "flex min-w-0 items-center text-h4 text-sys-text-main",
1212
- children: logo ? /* @__PURE__ */ jsxs(Fragment, { children: [
1213
- /* @__PURE__ */ jsx(
1214
- "span",
1215
- {
1216
- "aria-hidden": true,
1217
- className: "flex h-[32px] min-w-0 items-center overflow-clip [&_img]:max-h-[32px] [&_img]:object-contain [&_svg]:max-h-[32px]",
1218
- children: logo
1219
- }
1220
- ),
1221
- heading ? /* @__PURE__ */ jsx("span", { className: "sr-only", children: title }) : null
1222
- ] }) : (
1223
- // 말줄임된 제목 전체는 브라우저 기본 말풍선으로 본다 — 기록 줄(chatHistory)과 같은 방식
1224
- /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", title, children: title })
1225
- )
1226
- }
1227
- );
1228
- }
1229
- function IconAction({
1230
- label,
1231
- side,
1232
- children,
1233
- ...props
1234
- }) {
1235
- return /* @__PURE__ */ jsxs(Tooltip, { children: [
1236
- /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { "aria-label": label, ...props, children }) }),
1237
- /* @__PURE__ */ jsx(TooltipContent, { side, children: label })
1238
- ] });
1239
- }
1240
- function ChatPage({
1241
- title,
1242
- logo,
1243
- status,
1244
- titleRight,
1245
- actions,
1246
- history,
1247
- sidePanel,
1248
- ...shell
1249
- }) {
1250
- const rootRef = useRef(null);
1251
- const width = useWidth(rootRef);
1252
- const historyInline = width >= HISTORY_INLINE_MIN;
1253
- const sideInline = width >= SIDE_INLINE_MIN;
1254
- const [collapsed, setCollapsed] = useState(false);
1255
- const [drawerOpen, setDrawerOpen] = useState(false);
1256
- const [lastSide, setLastSide] = useState(sidePanel);
1257
- if (sidePanel && sidePanel !== lastSide) setLastSide(sidePanel);
1258
- const side = sidePanel ?? lastSide;
1259
- const sideOpen = Boolean(sidePanel);
1260
- const hasTopRow = !(history && historyInline) || Boolean(status || titleRight || actions);
1261
- const bodyRef = useRef(null);
1262
- const hasHistory = Boolean(history);
1263
- const focusSearchRef = useRef(false);
1264
- useEffect(() => {
1265
- const body = bodyRef.current;
1266
- if (!body) return;
1267
- body.toggleAttribute("inert", collapsed);
1268
- if (!collapsed && focusSearchRef.current) {
1269
- focusSearchRef.current = false;
1270
- body.querySelector('input[aria-label="\uB300\uD654 \uAC80\uC0C9"]')?.focus();
1271
- }
1272
- }, [collapsed, historyInline, hasHistory]);
1273
- return (
1274
- // PageHeader 와 같은 방식(기본 지연) — `actions` 에 넣은 Tooltip 도 이 안에서 동작한다
1275
- /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs("div", { ref: rootRef, className: "flex h-full min-h-0 w-full flex-col bg-sys-background", children: [
1276
- /* @__PURE__ */ jsxs("section", { "aria-label": title, className: "flex min-h-0 flex-1", children: [
1277
- history && historyInline ? (
1278
- // 기록 바: 접기·펴기는 바깥 폭만 280 ↔ 56(레일)으로 움직인다.
1279
- // overflow-clip — 잘린 내용에 포커스가 가도 상자가 옆으로 밀리지 않는다(hidden 은 스크롤된다)
1280
- /* @__PURE__ */ jsxs(
1281
- "div",
1282
- {
1283
- className: cn(
1284
- "flex shrink-0 flex-col gap-[12px] overflow-clip p-[12px] transition-[width]",
1285
- SLIDE,
1286
- collapsed ? "w-[56px]" : "w-[280px]"
1287
- ),
1288
- children: [
1289
- /* @__PURE__ */ jsxs("div", { className: "flex h-[32px] shrink-0 items-center", children: [
1290
- /* @__PURE__ */ jsx(
1291
- "div",
1292
- {
1293
- className: cn(
1294
- "min-w-0 flex-1 overflow-x-clip transition-opacity",
1295
- SLIDE,
1296
- collapsed ? "opacity-0" : "opacity-100"
1297
- ),
1298
- children: /* @__PURE__ */ jsx("div", { className: "w-[224px] pr-[8px] pl-[12px]", children: /* @__PURE__ */ jsx(Brand, { heading: true, logo, title }) })
1299
- }
1300
- ),
1301
- /* @__PURE__ */ jsx(
1302
- IconAction,
1303
- {
1304
- variant: "secondaryLink",
1305
- className: "shrink-0",
1306
- label: collapsed ? "\uB300\uD654 \uAE30\uB85D \uD3BC\uCE58\uAE30" : "\uB300\uD654 \uAE30\uB85D \uC811\uAE30",
1307
- side: collapsed ? "right" : "bottom",
1308
- "aria-expanded": !collapsed,
1309
- onClick: (e) => {
1310
- e.currentTarget.focus();
1311
- setCollapsed((v) => !v);
1312
- },
1313
- children: /* @__PURE__ */ jsx(PanelLeft, { size: 20 })
1314
- }
1315
- )
1316
- ] }),
1317
- /* @__PURE__ */ jsxs("div", { className: "relative flex min-h-0 flex-1", children: [
1318
- collapsed && (history.onNew || history.search) ? (
1319
- // 레일의 버튼들 — 접힌 동안에만 있다. 펼친 "새 대화"·검색창이 있던 높이에서 나타난다(버튼 32, 사이 12)
1320
- /* @__PURE__ */ jsxs("div", { className: "absolute top-[2px] left-0 flex flex-col gap-[12px] animate-[fade-in_300ms_ease-in-out] motion-reduce:animate-none", children: [
1321
- history.onNew ? /* @__PURE__ */ jsx(
1322
- IconAction,
1323
- {
1324
- variant: "primaryLink",
1325
- label: "\uC0C8 \uB300\uD654",
1326
- side: "right",
1327
- onClick: history.onNew,
1328
- children: /* @__PURE__ */ jsx(Plus, { size: 20 })
1329
- }
1330
- ) : null,
1331
- history.search ? /* @__PURE__ */ jsx(
1332
- IconAction,
1333
- {
1334
- variant: "secondaryLink",
1335
- label: "\uB300\uD654 \uAC80\uC0C9",
1336
- side: "right",
1337
- onClick: () => {
1338
- focusSearchRef.current = true;
1339
- setCollapsed(false);
1340
- },
1341
- children: /* @__PURE__ */ jsx(Search, { size: 20 })
1342
- }
1343
- ) : null
1344
- ] })
1345
- ) : null,
1346
- /* @__PURE__ */ jsx(
1347
- "div",
1348
- {
1349
- ref: bodyRef,
1350
- "aria-hidden": collapsed || void 0,
1351
- className: cn(
1352
- "flex w-[256px] shrink-0 flex-col",
1353
- SLIDE,
1354
- // visibility 는 숨길 때만 전환에 넣는다(흐려지는 동안 보이다가 끝에 숨는다). 펼칠 때는 바로 보여야 한다 —
1355
- // visibility 전환은 시작 순간에 아직 hidden 으로 계산돼서, 레일의 검색 버튼이 보내는 포커스가 검색창에 닿지 않는다
1356
- collapsed ? "invisible opacity-0 transition-[opacity,visibility]" : "visible opacity-100 transition-opacity"
1357
- ),
1358
- children: /* @__PURE__ */ jsx(ChatHistory, { ...history, className: "flex-1" })
1359
- }
1360
- )
1361
- ] })
1362
- ]
1363
- }
1364
- )
1365
- ) : null,
1366
- /* @__PURE__ */ jsxs(
1367
- "div",
1368
- {
1369
- className: cn(
1370
- "flex min-h-0 min-w-0 flex-1 flex-col",
1371
- history && historyInline && "border-l border-sys-divider-subtler"
1372
- ),
1373
- children: [
1374
- hasTopRow ? (
1375
- // 맨 위 줄: ChatConversation 의 형제라 로딩·오류 화면에서도 남는다. 아래에 선·배경을 두지 않는다 —
1376
- // 빈 대화의 바탕 그라데이션은 위쪽 끝색이 바탕색과 같아 이음매가 없다.
1377
- // 줄 높이는 32 — 36px 모델 선택은 위아래로 2px 씩 넘친다(Panel 제목 줄과 같은 방식)
1378
- /* @__PURE__ */ jsx("div", { className: "shrink-0 px-[12px] pt-[12px] pb-[8px]", children: /* @__PURE__ */ jsxs("div", { className: "flex h-[32px] items-center justify-between gap-[12px]", children: [
1379
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-[8px]", children: [
1380
- history && !historyInline ? (
1381
- // 넓은 화면의 접기 버튼과는 다른 요소다 — 폭이 960 을 넘나들면 버튼에 있던 포커스는 이어지지 않는다
1382
- // (다음 Tab 이 바로 이 버튼이라 따로 옮기지 않는다)
1383
- /* @__PURE__ */ jsx(
1384
- IconAction,
1385
- {
1386
- variant: "secondaryLink",
1387
- className: "shrink-0",
1388
- label: "\uB300\uD654 \uAE30\uB85D \uC5F4\uAE30",
1389
- side: "bottom",
1390
- "aria-expanded": drawerOpen,
1391
- onClick: (e) => {
1392
- e.currentTarget.focus();
1393
- setDrawerOpen(true);
1394
- },
1395
- children: /* @__PURE__ */ jsx(PanelLeft, { size: 20 })
1396
- }
1397
- )
1398
- ) : null,
1399
- history && historyInline ? null : history ? (
1400
- // 좁은 화면: 로고는 Drawer 안에 있고, 제목은 화면 밖 글자로 남긴다
1401
- /* @__PURE__ */ jsx("h1", { className: "sr-only", children: title })
1402
- ) : /* @__PURE__ */ jsx("div", { className: "min-w-0 pl-[4px]", children: /* @__PURE__ */ jsx(Brand, { heading: true, logo, title }) }),
1403
- status ? /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center", children: status }) : null
1404
- ] }),
1405
- titleRight || actions ? /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-[8px]", children: [
1406
- titleRight,
1407
- actions
1408
- ] }) : null
1409
- ] }) })
1410
- ) : null,
1411
- /* @__PURE__ */ jsx(ChatConversation, { variant: "page", label: `${title} \uB300\uD654`, ...shell })
1412
- ]
1413
- }
1414
- ),
1415
- sideInline ? (
1416
- // 열고 닫기는 기록 바와 같은 방식 — 바깥 폭만 0 ↔ 패널 폭으로 움직인다
1417
- /* @__PURE__ */ jsx(
1418
- "div",
1419
- {
1420
- className: cn(
1421
- "shrink-0 overflow-hidden transition-[width,visibility] duration-300 ease-in-out motion-reduce:transition-none",
1422
- sideOpen ? cn("visible", SIDE_WIDTH[side?.width ?? "medium"]) : "invisible w-0"
1423
- ),
1424
- onTransitionEnd: (e) => {
1425
- if (e.target === e.currentTarget && e.propertyName === "width" && !sidePanel)
1426
- setLastSide(void 0);
1427
- },
1428
- children: side ? (
1429
- // <aside> 는 다른 landmark 안에 둘 수 없어(axe landmark-complementary-is-top-level) 이름 있는 section(Panel) — ListPage 의 detail 과 같다
1430
- /* @__PURE__ */ jsx(
1431
- Panel,
1432
- {
1433
- appearance: "none",
1434
- padding: "large",
1435
- title: side.title,
1436
- description: side.description,
1437
- titleRight: /* @__PURE__ */ jsx(
1438
- IconButton,
1439
- {
1440
- type: "button",
1441
- variant: "secondary",
1442
- "aria-label": "\uB2EB\uAE30",
1443
- onClick: side.onClose,
1444
- children: /* @__PURE__ */ jsx(X, { size: 20 })
1445
- }
1446
- ),
1447
- footer: side.footer,
1448
- className: cn(
1449
- "h-full min-h-0 border-l border-sys-divider-subtler px-[24px] pt-[16px] pb-[24px]",
1450
- SIDE_WIDTH[side.width ?? "medium"]
1451
- ),
1452
- children: /* @__PURE__ */ jsx(
1453
- "div",
1454
- {
1455
- tabIndex: 0,
1456
- className: "-mx-[4px] min-h-0 flex-1 overflow-y-auto px-[4px] outline-none focus-visible:ring-[2px] focus-visible:ring-inset focus-visible:ring-sys-focus-ring-main",
1457
- children: side.children
1458
- }
1459
- )
1460
- }
1461
- )
1462
- ) : null
1463
- }
1464
- )
1465
- ) : null
1466
- ] }),
1467
- history && !historyInline ? /* @__PURE__ */ jsx(Drawer, { open: drawerOpen, onOpenChange: setDrawerOpen, children: /* @__PURE__ */ jsxs(DrawerContent, { side: "left", size: "small", children: [
1468
- /* @__PURE__ */ jsxs(DrawerHeader, { children: [
1469
- /* @__PURE__ */ jsx(DrawerTitle, { className: "sr-only", children: "\uB300\uD654 \uAE30\uB85D" }),
1470
- /* @__PURE__ */ jsx("div", { className: "flex h-[24px] min-w-0 items-center pr-[32px] pl-[12px]", children: /* @__PURE__ */ jsx(Brand, { logo, title }) })
1471
- ] }),
1472
- /* @__PURE__ */ jsx("div", { className: "flex min-h-0 flex-1 flex-col px-[24px] pb-[24px]", children: /* @__PURE__ */ jsx(
1473
- ChatHistory,
1474
- {
1475
- ...history,
1476
- className: "flex-1",
1477
- onSelect: (id) => {
1478
- history.onSelect(id);
1479
- setDrawerOpen(false);
1480
- },
1481
- onNew: history.onNew ? () => {
1482
- history.onNew?.();
1483
- setDrawerOpen(false);
1484
- } : void 0
1485
- }
1486
- ) })
1487
- ] }) }) : null,
1488
- side && !sideInline ? (
1489
- // 닫을 때 Drawer 를 지우지 않고 open 만 내린다 — 지우면 닫힘 애니메이션이 돌 틈 없이 바로 사라진다.
1490
- // 닫히는 동안에는 마지막으로 받은 패널(side)을 그대로 그린다
1491
- /* @__PURE__ */ jsx(
1492
- Drawer,
1493
- {
1494
- open: sideOpen,
1495
- onOpenChange: (open) => {
1496
- if (!open) sidePanel?.onClose();
1497
- },
1498
- children: /* @__PURE__ */ jsxs(
1499
- DrawerContent,
1500
- {
1501
- side: "right",
1502
- size: side.width ?? "medium",
1503
- onCloseAutoFocus: () => {
1504
- if (!sidePanel) setLastSide(void 0);
1505
- },
1506
- children: [
1507
- /* @__PURE__ */ jsxs(DrawerHeader, { children: [
1508
- /* @__PURE__ */ jsx(DrawerTitle, { children: side.title }),
1509
- side.description ? /* @__PURE__ */ jsx(DrawerDescription, { children: side.description }) : null
1510
- ] }),
1511
- /* @__PURE__ */ jsx(DrawerBody, { className: "px-[24px] pb-[24px]", children: side.children }),
1512
- side.footer ? /* @__PURE__ */ jsx(DrawerFooter, { children: side.footer }) : null
1513
- ]
1514
- }
1515
- )
1516
- }
1517
- )
1518
- ) : null
1519
- ] }) })
1520
- );
1521
- }
1522
- function ChatPanel({
1523
- title,
1524
- label = "AI \uB300\uD654",
1525
- actions,
1526
- onClose,
1527
- className,
1528
- ...shell
1529
- }) {
1530
- const name = typeof title === "string" ? title : label;
1531
- return (
1532
- // `actions` 에 Tooltip 을 단 아이콘 버튼을 넣어도 깨지지 않게 감싼다 — PageHeader·ChatPage 와 같은 방식(기본 지연)
1533
- /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(
1534
- "section",
1535
- {
1536
- "aria-label": name,
1537
- className: cn("flex h-full min-h-0 w-full flex-col bg-sys-background", className),
1538
- children: [
1539
- /* @__PURE__ */ jsx(
1540
- ChatHeader,
1541
- {
1542
- title,
1543
- actions: actions || onClose ? /* @__PURE__ */ jsxs(Fragment, { children: [
1544
- actions,
1545
- onClose ? /* @__PURE__ */ jsx(IconButton, { type: "button", variant: "secondary", "aria-label": "\uB2EB\uAE30", onClick: onClose, children: /* @__PURE__ */ jsx(X, { size: 20 }) }) : null
1546
- ] }) : null
1547
- }
1548
- ),
1549
- /* @__PURE__ */ jsx(ChatConversation, { variant: "panel", label: `${name} \uB300\uD654`, ...shell })
1550
- ]
1551
- }
1552
- ) })
1553
- );
1554
- }
1555
-
1556
- export { ChatPage, ChatPanel, DashboardLayout, DashboardPanel, DashboardSection, DetailPage, EmptyState, ErrorState, FormDialog, FormDrawer, FormPage, ListPage, LoadingState };
1557
26
  //# sourceMappingURL=index.js.map
1558
- //# sourceMappingURL=index.js.map