@tcn/ui 0.17.0 → 0.18.1

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 (394) hide show
  1. package/AI_USAGE.md +59 -0
  2. package/CHANGELOG.md +1009 -0
  3. package/ai-docs/actions.md +43 -0
  4. package/ai-docs/decorators.md +34 -0
  5. package/ai-docs/feedback.md +31 -0
  6. package/ai-docs/form.md +58 -0
  7. package/ai-docs/inputs.md +71 -0
  8. package/ai-docs/layouts.md +76 -0
  9. package/ai-docs/mobile.md +34 -0
  10. package/ai-docs/navigation.md +48 -0
  11. package/ai-docs/overlay.md +58 -0
  12. package/ai-docs/stacks.md +59 -0
  13. package/ai-docs/surfaces.md +79 -0
  14. package/ai-docs/themes.md +47 -0
  15. package/ai-docs/tokens.md +35 -0
  16. package/ai-docs/typography.md +38 -0
  17. package/ai-docs/utils.md +51 -0
  18. package/dist/actions/index.d.ts +0 -1
  19. package/dist/actions/index.d.ts.map +1 -1
  20. package/dist/actions/index.js +6 -8
  21. package/dist/actions/index.js.map +1 -1
  22. package/dist/draggable.css +1 -1
  23. package/dist/draggable.module-DFYR5n3n.js +5 -0
  24. package/dist/draggable.module-DFYR5n3n.js.map +1 -0
  25. package/dist/field_set.css +1 -1
  26. package/dist/field_set.module-BpJTFCi4.js +5 -0
  27. package/dist/field_set.module-BpJTFCi4.js.map +1 -0
  28. package/dist/form/field/field.js +11 -10
  29. package/dist/form/field/field.js.map +1 -1
  30. package/dist/form/field_set/field_set.d.ts +6 -10
  31. package/dist/form/field_set/field_set.d.ts.map +1 -1
  32. package/dist/form/field_set/field_set.js +33 -61
  33. package/dist/form/field_set/field_set.js.map +1 -1
  34. package/dist/form/field_set/legend.d.ts +20 -0
  35. package/dist/form/field_set/legend.d.ts.map +1 -0
  36. package/dist/form/field_set/legend.js +28 -0
  37. package/dist/form/field_set/legend.js.map +1 -0
  38. package/dist/form/index.d.ts +2 -1
  39. package/dist/form/index.d.ts.map +1 -1
  40. package/dist/form/index.js +24 -22
  41. package/dist/form/index.js.map +1 -1
  42. package/dist/inputs/color_input/color_input.js +2 -3
  43. package/dist/inputs/color_input/color_input.js.map +1 -1
  44. package/dist/inputs/color_input/color_picker.js +11 -10
  45. package/dist/inputs/color_input/color_picker.js.map +1 -1
  46. package/dist/inputs/combo_box/combo_box.js +11 -10
  47. package/dist/inputs/combo_box/combo_box.js.map +1 -1
  48. package/dist/inputs/date_picker/date_picker.js +11 -10
  49. package/dist/inputs/date_picker/date_picker.js.map +1 -1
  50. package/dist/inputs/date_picker/date_picker_header.d.ts.map +1 -1
  51. package/dist/inputs/date_picker/date_picker_header.js +15 -14
  52. package/dist/inputs/date_picker/date_picker_header.js.map +1 -1
  53. package/dist/inputs/date_picker/date_picker_input.js +9 -9
  54. package/dist/inputs/date_picker/date_picker_time_selector.js +2 -3
  55. package/dist/inputs/date_picker/date_picker_time_selector.js.map +1 -1
  56. package/dist/inputs/date_picker/date_picker_year_input.js +2 -3
  57. package/dist/inputs/date_picker/date_picker_year_input.js.map +1 -1
  58. package/dist/inputs/date_picker/date_picker_year_selector.js +22 -22
  59. package/dist/inputs/date_picker/date_picker_year_selector.js.map +1 -1
  60. package/dist/inputs/mask_input/key_capture_input.js +21 -20
  61. package/dist/inputs/mask_input/key_capture_input.js.map +1 -1
  62. package/dist/inputs/mask_input/mask_input.js +18 -17
  63. package/dist/inputs/mask_input/mask_input.js.map +1 -1
  64. package/dist/inputs/multiselect/multiselect.js +11 -10
  65. package/dist/inputs/multiselect/multiselect.js.map +1 -1
  66. package/dist/inputs/multiselect/multiselect_inline_values.d.ts.map +1 -1
  67. package/dist/inputs/multiselect/multiselect_inline_values.js +15 -15
  68. package/dist/inputs/multiselect/multiselect_inline_values.js.map +1 -1
  69. package/dist/inputs/multiselect/multiselect_values.js +16 -17
  70. package/dist/inputs/multiselect/multiselect_values.js.map +1 -1
  71. package/dist/inputs/phone_number_input/phone_number_context.js +13 -12
  72. package/dist/inputs/phone_number_input/phone_number_context.js.map +1 -1
  73. package/dist/inputs/phone_number_input/phone_number_input_adapter.js +2 -3
  74. package/dist/inputs/phone_number_input/phone_number_input_adapter.js.map +1 -1
  75. package/dist/inputs/phone_number_input/sip_input.js +8 -9
  76. package/dist/inputs/phone_number_input/sip_input.js.map +1 -1
  77. package/dist/inputs/select/select.js +9 -9
  78. package/dist/inputs/slider/slider.js +21 -20
  79. package/dist/inputs/slider/slider.js.map +1 -1
  80. package/dist/inputs/suggestions/suggestion_list.js +9 -9
  81. package/dist/inputs/switch/switch.js +16 -15
  82. package/dist/inputs/switch/switch.js.map +1 -1
  83. package/dist/inputs/unit_input/unit_input.js +11 -10
  84. package/dist/inputs/unit_input/unit_input.js.map +1 -1
  85. package/dist/mobile/inputs/date_picker/mobile_date_picker_header.js +11 -10
  86. package/dist/mobile/inputs/date_picker/mobile_date_picker_header.js.map +1 -1
  87. package/dist/mobile/inputs/date_picker/mobile_date_picker_input.js +11 -10
  88. package/dist/mobile/inputs/date_picker/mobile_date_picker_input.js.map +1 -1
  89. package/dist/mobile/inputs/date_picker/mobile_date_picker_year_selector.js +11 -10
  90. package/dist/mobile/inputs/date_picker/mobile_date_picker_year_selector.js.map +1 -1
  91. package/dist/multiselect_values.css +1 -1
  92. package/dist/navigation/tabs/state/link/tab_link.js +11 -10
  93. package/dist/navigation/tabs/state/link/tab_link.js.map +1 -1
  94. package/dist/overlay/frame/frame.d.ts.map +1 -1
  95. package/dist/overlay/frame/frame.js +117 -76
  96. package/dist/overlay/frame/frame.js.map +1 -1
  97. package/dist/overlay/menu/menu.js +21 -20
  98. package/dist/overlay/menu/menu.js.map +1 -1
  99. package/dist/overlay/popper/base/dismissal_decorator.js +3 -3
  100. package/dist/overlay/popper/base/dismissal_decorator.js.map +1 -1
  101. package/dist/overlay/popper/context_popper.js +11 -10
  102. package/dist/overlay/popper/context_popper.js.map +1 -1
  103. package/dist/overlay/popper/element_popper.js +11 -10
  104. package/dist/overlay/popper/element_popper.js.map +1 -1
  105. package/dist/overlay/popper/legacy/popper.js +28 -27
  106. package/dist/overlay/popper/legacy/popper.js.map +1 -1
  107. package/dist/overlay/popper/preview_popper.js +11 -10
  108. package/dist/overlay/popper/preview_popper.js.map +1 -1
  109. package/dist/overlay/tethered/tethered.js +11 -10
  110. package/dist/overlay/tethered/tethered.js.map +1 -1
  111. package/dist/resizable.css +1 -1
  112. package/dist/resizable.module-ur5FBfxo.js +5 -0
  113. package/dist/resizable.module-ur5FBfxo.js.map +1 -0
  114. package/dist/resize_handle.css +1 -1
  115. package/dist/stacks/box/box.d.ts +14 -0
  116. package/dist/stacks/box/box.d.ts.map +1 -1
  117. package/dist/stacks/box/box.js +98 -99
  118. package/dist/stacks/box/box.js.map +1 -1
  119. package/dist/stacks/box/end_resize_handle.js +5 -5
  120. package/dist/stacks/box/end_resize_handle.js.map +1 -1
  121. package/dist/stacks/box/resize_handlers.d.ts.map +1 -1
  122. package/dist/stacks/box/resize_handlers.js +12 -12
  123. package/dist/stacks/box/resize_handlers.js.map +1 -1
  124. package/dist/stacks/box/start_resize_handle.js +7 -7
  125. package/dist/stacks/box/start_resize_handle.js.map +1 -1
  126. package/dist/stacks/box/types.d.ts +3 -2
  127. package/dist/stacks/box/types.d.ts.map +1 -1
  128. package/dist/stacks/h_collapsible_box.js +14 -13
  129. package/dist/stacks/h_collapsible_box.js.map +1 -1
  130. package/dist/stacks/v_collapsible_box.js +14 -13
  131. package/dist/stacks/v_collapsible_box.js.map +1 -1
  132. package/dist/surfaces/alert/alert.js +7 -8
  133. package/dist/surfaces/alert/alert.js.map +1 -1
  134. package/dist/themes/stories/button_showcase.d.ts.map +1 -1
  135. package/dist/themes/stories/controls_fieldset.d.ts.map +1 -1
  136. package/dist/themes/stories/menu_showcase.d.ts.map +1 -1
  137. package/dist/themes/themes/ergo/ergo_theme.css +1 -1
  138. package/dist/themes/themes/ergo/ergo_theme.d.ts.map +1 -1
  139. package/dist/themes/themes/ergo/ergo_theme.js +336 -294
  140. package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
  141. package/dist/themes/themes/ergo/parts/actions.css +1 -0
  142. package/dist/themes/themes/ergo/parts/base.css +1 -0
  143. package/dist/themes/themes/ergo/parts/form.css +1 -0
  144. package/dist/themes/themes/ergo/parts/inputs.css +1 -0
  145. package/dist/themes/themes/ergo/parts/navigation.css +1 -0
  146. package/dist/themes/themes/windows_98/windows_98.css +1 -1
  147. package/dist/themes/themes/windows_98/windows_98_theme.js +32 -43
  148. package/dist/themes/themes/windows_98/windows_98_theme.js.map +1 -1
  149. package/dist/utils/decorators/clone_with_decorator.d.ts +21 -0
  150. package/dist/utils/decorators/clone_with_decorator.d.ts.map +1 -0
  151. package/dist/utils/decorators/clone_with_decorator.js +16 -0
  152. package/dist/utils/decorators/clone_with_decorator.js.map +1 -0
  153. package/dist/utils/decorators/draggable/context.d.ts.map +1 -0
  154. package/dist/utils/decorators/draggable/context.js.map +1 -0
  155. package/dist/utils/{dnd/handle.d.ts → decorators/draggable/drag_handle.d.ts} +1 -1
  156. package/dist/utils/decorators/draggable/drag_handle.d.ts.map +1 -0
  157. package/dist/utils/{dnd/handle.js → decorators/draggable/drag_handle.js} +2 -2
  158. package/dist/utils/decorators/draggable/drag_handle.js.map +1 -0
  159. package/dist/utils/decorators/draggable/draggable.d.ts.map +1 -0
  160. package/dist/utils/{dnd → decorators}/draggable/draggable.js +3 -3
  161. package/dist/utils/decorators/draggable/draggable.js.map +1 -0
  162. package/dist/utils/decorators/draggable/index.d.ts +11 -0
  163. package/dist/utils/decorators/draggable/index.d.ts.map +1 -0
  164. package/dist/utils/decorators/draggable/index.js +14 -0
  165. package/dist/utils/{dnd → decorators/draggable}/types.d.ts +1 -1
  166. package/dist/utils/decorators/draggable/types.d.ts.map +1 -0
  167. package/dist/utils/{dnd/hooks → decorators/draggable}/use_drag_container.d.ts +2 -2
  168. package/dist/utils/decorators/draggable/use_drag_container.d.ts.map +1 -0
  169. package/dist/utils/decorators/draggable/use_drag_container.js.map +1 -0
  170. package/dist/utils/decorators/draggable/use_draggable.d.ts.map +1 -0
  171. package/dist/utils/decorators/draggable/use_draggable.js.map +1 -0
  172. package/dist/utils/decorators/index.d.ts +3 -0
  173. package/dist/utils/decorators/index.d.ts.map +1 -0
  174. package/dist/utils/decorators/index.js +27 -0
  175. package/dist/utils/decorators/index.js.map +1 -0
  176. package/dist/utils/decorators/resizable/context.d.ts.map +1 -0
  177. package/dist/utils/{resize → decorators/resizable}/context.js +1 -1
  178. package/dist/utils/decorators/resizable/context.js.map +1 -0
  179. package/dist/utils/decorators/resizable/handle_config.d.ts.map +1 -0
  180. package/dist/utils/decorators/resizable/handle_config.js +62 -0
  181. package/dist/utils/decorators/resizable/handle_config.js.map +1 -0
  182. package/dist/utils/decorators/resizable/index.d.ts.map +1 -0
  183. package/dist/utils/decorators/resizable/index.js.map +1 -0
  184. package/dist/utils/decorators/resizable/resizable.d.ts.map +1 -0
  185. package/dist/utils/{resize → decorators/resizable}/resizable.js +2 -2
  186. package/dist/utils/decorators/resizable/resizable.js.map +1 -0
  187. package/dist/utils/decorators/resizable/resize_handle.d.ts.map +1 -0
  188. package/dist/utils/{resize → decorators/resizable}/resize_handle.js +2 -2
  189. package/dist/utils/decorators/resizable/resize_handle.js.map +1 -0
  190. package/dist/utils/{resize → decorators/resizable}/resize_strategy.d.ts +1 -1
  191. package/dist/utils/decorators/resizable/resize_strategy.d.ts.map +1 -0
  192. package/dist/utils/decorators/resizable/resize_strategy.js.map +1 -0
  193. package/dist/utils/{resize → decorators/resizable}/types.d.ts +2 -2
  194. package/dist/utils/decorators/resizable/types.d.ts.map +1 -0
  195. package/dist/utils/hooks/labelled_by_context.d.ts +21 -0
  196. package/dist/utils/hooks/labelled_by_context.d.ts.map +1 -0
  197. package/dist/utils/hooks/labelled_by_context.js +12 -0
  198. package/dist/utils/hooks/labelled_by_context.js.map +1 -0
  199. package/dist/utils/index.d.ts +8 -8
  200. package/dist/utils/index.d.ts.map +1 -1
  201. package/dist/utils/index.js +44 -40
  202. package/dist/utils/index.js.map +1 -1
  203. package/dist/utils/listeners/click_away_listener.d.ts.map +1 -0
  204. package/dist/utils/{click_away_listener.js → listeners/click_away_listener.js} +1 -1
  205. package/dist/utils/listeners/click_away_listener.js.map +1 -0
  206. package/dist/utils/listeners/focus_redirect.d.ts.map +1 -0
  207. package/dist/utils/listeners/focus_redirect.js.map +1 -0
  208. package/dist/utils/listeners/index.d.ts +4 -0
  209. package/dist/utils/listeners/index.d.ts.map +1 -0
  210. package/dist/utils/listeners/index.js +10 -0
  211. package/dist/utils/listeners/index.js.map +1 -0
  212. package/dist/utils/listeners/mouse_leave_region.d.ts.map +1 -0
  213. package/dist/utils/listeners/mouse_leave_region.js.map +1 -0
  214. package/dist/utils/listeners/scroll_away_listener.d.ts.map +1 -0
  215. package/dist/utils/{scroll_away_listener.js → listeners/scroll_away_listener.js} +1 -1
  216. package/dist/utils/listeners/scroll_away_listener.js.map +1 -0
  217. package/dist/utils/system/index.d.ts +2 -0
  218. package/dist/utils/system/index.d.ts.map +1 -0
  219. package/dist/utils/system/index.js +2 -0
  220. package/dist/utils/system/index.js.map +1 -0
  221. package/dist/utils/system/variations.d.ts.map +1 -0
  222. package/dist/utils/system/variations.js +2 -0
  223. package/dist/utils/system/variations.js.map +1 -0
  224. package/dist/utils/types/sides.d.ts +3 -0
  225. package/dist/utils/types/sides.d.ts.map +1 -0
  226. package/package.json +7 -9
  227. package/src/actions/button/__stories__/button_group.stories.tsx +23 -24
  228. package/src/actions/index.ts +0 -1
  229. package/src/form/field/field.stories.tsx +2 -2
  230. package/src/form/field/h_field/h_field.stories.tsx +1 -1
  231. package/src/form/field/v_field/v_field.stories.tsx +1 -1
  232. package/src/form/field_set/field_set.module.css +0 -14
  233. package/src/form/field_set/field_set.stories.tsx +101 -1
  234. package/src/form/field_set/field_set.tsx +43 -57
  235. package/src/form/field_set/legend.tsx +44 -0
  236. package/src/form/index.ts +6 -1
  237. package/src/inputs/date_picker/date_picker_header.tsx +7 -5
  238. package/src/inputs/date_picker/date_picker_year_selector.tsx +5 -5
  239. package/src/inputs/multiselect/multiselect_inline_values.tsx +4 -3
  240. package/src/inputs/multiselect/multiselect_values.module.css +1 -0
  241. package/src/inputs/multiselect/multiselect_values.tsx +4 -4
  242. package/src/overlay/frame/frame.stories.tsx +2 -1
  243. package/src/overlay/frame/frame.tsx +68 -20
  244. package/src/overlay/popper/base/dismissal_decorator.tsx +3 -3
  245. package/src/overlay/popper/legacy/popper.stories.tsx +9 -2
  246. package/src/overlay/slide/slide.stories.tsx +1 -1
  247. package/src/stacks/box/box.tsx +29 -4
  248. package/src/stacks/box/end_resize_handle.tsx +1 -1
  249. package/src/stacks/box/resize_handlers.ts +1 -1
  250. package/src/stacks/box/start_resize_handle.tsx +1 -1
  251. package/src/stacks/box/types.ts +3 -2
  252. package/src/stacks/collapsible_box.stories.tsx +5 -5
  253. package/src/stacks/demo.stories.tsx +7 -7
  254. package/src/surfaces/page/page.stories.tsx +4 -4
  255. package/src/surfaces/window/window.stories.tsx +1 -1
  256. package/src/themes/stories/button_showcase.tsx +3 -1
  257. package/src/themes/stories/controls_fieldset.tsx +3 -1
  258. package/src/themes/stories/menu_showcase.tsx +3 -1
  259. package/src/themes/themes/ergo/INTERACTIVE.md +89 -0
  260. package/src/themes/themes/ergo/ROADMAP.md +116 -0
  261. package/src/themes/themes/ergo/ergo_theme.css +22 -717
  262. package/src/themes/themes/ergo/ergo_theme.ts +15 -1
  263. package/src/themes/themes/ergo/parts/actions.css +287 -0
  264. package/src/themes/themes/ergo/parts/base.css +62 -0
  265. package/src/themes/themes/ergo/parts/form.css +23 -0
  266. package/src/themes/themes/ergo/parts/inputs.css +252 -0
  267. package/src/themes/themes/ergo/parts/navigation.css +104 -0
  268. package/src/themes/themes/windows_98/windows_98.css +32 -43
  269. package/src/tokens/chip/chip.stories.tsx +5 -5
  270. package/src/utils/decorators/DECORATOR_PATTERN.md +86 -0
  271. package/src/utils/decorators/clone_with_decorator.ts +47 -0
  272. package/src/utils/{dnd → decorators/draggable}/__stories__/draggable.stories.tsx +7 -7
  273. package/src/utils/{dnd → decorators/draggable}/__stories__/use_draggable.stories.tsx +2 -2
  274. package/src/utils/{dnd/handle.tsx → decorators/draggable/drag_handle.tsx} +1 -1
  275. package/src/utils/{dnd → decorators}/draggable/draggable.tsx +2 -2
  276. package/src/utils/decorators/draggable/index.ts +15 -0
  277. package/src/utils/{dnd → decorators/draggable}/types.ts +1 -1
  278. package/src/utils/{dnd/hooks → decorators/draggable}/use_drag_container.ts +2 -2
  279. package/src/utils/decorators/index.ts +2 -0
  280. package/src/utils/{resize → decorators/resizable}/__stories__/resizable.stories.tsx +23 -23
  281. package/src/utils/{resize → decorators/resizable}/__tests__/handle_config.test.ts +19 -97
  282. package/src/utils/{resize → decorators/resizable}/__tests__/resize_strategy.test.ts +20 -20
  283. package/src/utils/{resize → decorators/resizable}/context.ts +1 -1
  284. package/src/utils/{resize → decorators/resizable}/handle_config.ts +7 -31
  285. package/src/utils/{resize → decorators/resizable}/resizable.tsx +1 -1
  286. package/src/utils/{resize → decorators/resizable}/resize_handle.module.css +1 -41
  287. package/src/utils/{resize → decorators/resizable}/resize_handle.tsx +1 -1
  288. package/src/utils/{resize → decorators/resizable}/resize_strategy.ts +1 -1
  289. package/src/utils/{resize → decorators/resizable}/types.ts +1 -7
  290. package/src/utils/hooks/labelled_by_context.ts +27 -0
  291. package/src/utils/index.ts +8 -8
  292. package/src/utils/{click_away_listener.tsx → listeners/click_away_listener.tsx} +1 -1
  293. package/src/utils/listeners/index.ts +3 -0
  294. package/src/utils/{scroll_away_listener.tsx → listeners/scroll_away_listener.tsx} +1 -1
  295. package/src/utils/system/index.ts +1 -0
  296. package/src/utils/types/sides.ts +2 -0
  297. package/dist/actions/button/slim_button/slim_button.d.ts +0 -9
  298. package/dist/actions/button/slim_button/slim_button.d.ts.map +0 -1
  299. package/dist/actions/button/slim_button/slim_button.js +0 -18
  300. package/dist/actions/button/slim_button/slim_button.js.map +0 -1
  301. package/dist/draggable.module-BgelQsuJ.js +0 -5
  302. package/dist/draggable.module-BgelQsuJ.js.map +0 -1
  303. package/dist/frame.css +0 -1
  304. package/dist/left_resize_handle.css +0 -1
  305. package/dist/resizable.module-I6iyBAvM.js +0 -5
  306. package/dist/resizable.module-I6iyBAvM.js.map +0 -1
  307. package/dist/right_resize_handle.css +0 -1
  308. package/dist/slim_button.css +0 -1
  309. package/dist/stacks/box/left_resize_handle.d.ts +0 -4
  310. package/dist/stacks/box/left_resize_handle.d.ts.map +0 -1
  311. package/dist/stacks/box/left_resize_handle.js +0 -36
  312. package/dist/stacks/box/left_resize_handle.js.map +0 -1
  313. package/dist/stacks/box/right_resize_handle.d.ts +0 -4
  314. package/dist/stacks/box/right_resize_handle.d.ts.map +0 -1
  315. package/dist/stacks/box/right_resize_handle.js +0 -36
  316. package/dist/stacks/box/right_resize_handle.js.map +0 -1
  317. package/dist/utils/click_away_listener.d.ts.map +0 -1
  318. package/dist/utils/click_away_listener.js.map +0 -1
  319. package/dist/utils/dnd/context.d.ts.map +0 -1
  320. package/dist/utils/dnd/context.js.map +0 -1
  321. package/dist/utils/dnd/draggable/draggable.d.ts.map +0 -1
  322. package/dist/utils/dnd/draggable/draggable.js.map +0 -1
  323. package/dist/utils/dnd/handle.d.ts.map +0 -1
  324. package/dist/utils/dnd/handle.js.map +0 -1
  325. package/dist/utils/dnd/hooks/use_drag_container.d.ts.map +0 -1
  326. package/dist/utils/dnd/hooks/use_drag_container.js.map +0 -1
  327. package/dist/utils/dnd/hooks/use_draggable.d.ts.map +0 -1
  328. package/dist/utils/dnd/hooks/use_draggable.js.map +0 -1
  329. package/dist/utils/dnd/types.d.ts.map +0 -1
  330. package/dist/utils/focus_redirect.d.ts.map +0 -1
  331. package/dist/utils/focus_redirect.js.map +0 -1
  332. package/dist/utils/mouse_leave_region.d.ts.map +0 -1
  333. package/dist/utils/mouse_leave_region.js.map +0 -1
  334. package/dist/utils/resize/context.d.ts.map +0 -1
  335. package/dist/utils/resize/context.js.map +0 -1
  336. package/dist/utils/resize/handle_config.d.ts.map +0 -1
  337. package/dist/utils/resize/handle_config.js +0 -85
  338. package/dist/utils/resize/handle_config.js.map +0 -1
  339. package/dist/utils/resize/index.d.ts.map +0 -1
  340. package/dist/utils/resize/resizable.d.ts.map +0 -1
  341. package/dist/utils/resize/resizable.js.map +0 -1
  342. package/dist/utils/resize/resize_handle.d.ts.map +0 -1
  343. package/dist/utils/resize/resize_handle.js.map +0 -1
  344. package/dist/utils/resize/resize_strategy.d.ts.map +0 -1
  345. package/dist/utils/resize/resize_strategy.js.map +0 -1
  346. package/dist/utils/resize/types.d.ts.map +0 -1
  347. package/dist/utils/scroll_away_listener.d.ts.map +0 -1
  348. package/dist/utils/scroll_away_listener.js.map +0 -1
  349. package/dist/utils/types/variations.d.ts.map +0 -1
  350. package/src/actions/button/__stories__/slim_button.stories.tsx +0 -274
  351. package/src/actions/button/slim_button/slim_button.module.css +0 -9
  352. package/src/actions/button/slim_button/slim_button.tsx +0 -26
  353. package/src/overlay/frame/frame.module.css +0 -5
  354. package/src/stacks/box/left_resize_handle.module.css +0 -12
  355. package/src/stacks/box/left_resize_handle.tsx +0 -39
  356. package/src/stacks/box/right_resize_handle.module.css +0 -12
  357. package/src/stacks/box/right_resize_handle.tsx +0 -38
  358. /package/dist/utils/{dnd → decorators/draggable}/context.d.ts +0 -0
  359. /package/dist/utils/{dnd → decorators/draggable}/context.js +0 -0
  360. /package/dist/utils/{dnd → decorators}/draggable/draggable.d.ts +0 -0
  361. /package/dist/utils/{resize → decorators/draggable}/index.js.map +0 -0
  362. /package/dist/utils/{dnd → decorators/draggable}/types.js +0 -0
  363. /package/dist/utils/{dnd → decorators/draggable}/types.js.map +0 -0
  364. /package/dist/utils/{dnd/hooks → decorators/draggable}/use_drag_container.js +0 -0
  365. /package/dist/utils/{dnd/hooks → decorators/draggable}/use_draggable.d.ts +0 -0
  366. /package/dist/utils/{dnd/hooks → decorators/draggable}/use_draggable.js +0 -0
  367. /package/dist/utils/{resize → decorators/resizable}/context.d.ts +0 -0
  368. /package/dist/utils/{resize → decorators/resizable}/handle_config.d.ts +0 -0
  369. /package/dist/utils/{resize → decorators/resizable}/index.d.ts +0 -0
  370. /package/dist/utils/{resize → decorators/resizable}/index.js +0 -0
  371. /package/dist/utils/{resize → decorators/resizable}/resizable.d.ts +0 -0
  372. /package/dist/utils/{resize → decorators/resizable}/resize_handle.d.ts +0 -0
  373. /package/dist/utils/{resize → decorators/resizable}/resize_strategy.js +0 -0
  374. /package/dist/utils/{resize → decorators/resizable}/types.js +0 -0
  375. /package/dist/utils/{resize → decorators/resizable}/types.js.map +0 -0
  376. /package/dist/utils/{click_away_listener.d.ts → listeners/click_away_listener.d.ts} +0 -0
  377. /package/dist/utils/{focus_redirect.d.ts → listeners/focus_redirect.d.ts} +0 -0
  378. /package/dist/utils/{focus_redirect.js → listeners/focus_redirect.js} +0 -0
  379. /package/dist/utils/{mouse_leave_region.d.ts → listeners/mouse_leave_region.d.ts} +0 -0
  380. /package/dist/utils/{mouse_leave_region.js → listeners/mouse_leave_region.js} +0 -0
  381. /package/dist/utils/{scroll_away_listener.d.ts → listeners/scroll_away_listener.d.ts} +0 -0
  382. /package/dist/utils/{types → system}/variations.d.ts +0 -0
  383. /package/src/utils/{dnd → decorators/draggable}/__stories__/draggable_stories.module.css +0 -0
  384. /package/src/utils/{dnd → decorators/draggable}/context.ts +0 -0
  385. /package/src/utils/{dnd → decorators}/draggable/draggable.module.css +0 -0
  386. /package/src/utils/{dnd/hooks → decorators/draggable}/use_draggable.ts +0 -0
  387. /package/src/utils/{resize → decorators/resizable}/__stories__/resizable_stories.module.css +0 -0
  388. /package/src/utils/{resize → decorators/resizable}/index.ts +0 -0
  389. /package/src/utils/{resize → decorators/resizable}/resizable.module.css +0 -0
  390. /package/src/utils/{click_away_listener.stories.tsx → listeners/click_away_listener.stories.tsx} +0 -0
  391. /package/src/utils/{focus_redirect.tsx → listeners/focus_redirect.tsx} +0 -0
  392. /package/src/utils/{mouse_leave_region.tsx → listeners/mouse_leave_region.tsx} +0 -0
  393. /package/src/utils/{scroll_away_listener.stories.tsx → listeners/scroll_away_listener.stories.tsx} +0 -0
  394. /package/src/utils/{types → system}/variations.ts +0 -0
@@ -7,8 +7,6 @@ import { removeUndefinedProperties } from '../utils/remove_undefined_properties.
7
7
  import { BottomResizeHandle } from './bottom_resize_handle.js';
8
8
  import { EndResizeHandle } from './end_resize_handle.js';
9
9
  import { HandleProps } from './handle_props.js';
10
- import { LeftResizeHandle } from './left_resize_handle.js';
11
- import { RightResizeHandle } from './right_resize_handle.js';
12
10
  import { StartResizeHandle } from './start_resize_handle.js';
13
11
  import { TopResizeHandle } from './top_resize_handle.js';
14
12
  import type {
@@ -43,20 +41,47 @@ export interface BoxProps<T extends HTMLElement = HTMLElement> extends HTMLAttri
43
41
  overflow?: React.CSSProperties['overflow'];
44
42
  overflowX?: React.CSSProperties['overflowX'];
45
43
  overflowY?: React.CSSProperties['overflowY'];
44
+ /** @deprecated Use Resizable + ResizeHandle instead */
46
45
  enableResizeOnTop?: boolean;
46
+ /** @deprecated Use Resizable + ResizeHandle instead */
47
47
  enableResizeOnEnd?: boolean;
48
+ /** @deprecated Use Resizable + ResizeHandle instead */
48
49
  enableResizeOnBottom?: boolean;
50
+ /** @deprecated Use Resizable + ResizeHandle instead */
49
51
  enableResizeOnStart?: boolean;
52
+ /** @deprecated Use Resizable + ResizeHandle instead */
50
53
  enableResizeOnLeft?: boolean;
54
+ /** @deprecated Use Resizable + ResizeHandle instead */
51
55
  enableResizeOnRight?: boolean;
56
+ /** @deprecated Use Resizable + ResizeHandle instead */
52
57
  horizontalHandleProps?: HandleProps;
58
+ /** @deprecated Use Resizable + ResizeHandle instead */
53
59
  verticalHandleProps?: HandleProps;
60
+ /** @deprecated Use Resizable + ResizeHandle instead */
54
61
  onWidthResize?: OnWidthResize;
62
+ /** @deprecated Use Resizable + ResizeHandle instead */
55
63
  onHeightResize?: OnHeightResize;
64
+ /** @deprecated Use Resizable + ResizeHandle instead */
56
65
  onWidthResizeEnd?: OnWidthResizeEnd;
66
+ /** @deprecated Use Resizable + ResizeHandle instead */
57
67
  onHeightResizeEnd?: OnHeightResizeEnd;
58
68
  }
59
69
 
70
+ /** Union of deprecated resize-related prop names on BoxProps. Useful for Omit<BoxProps, DeprecatedBoxResizeProps>. */
71
+ export type DeprecatedBoxResizeProps =
72
+ | 'enableResizeOnTop'
73
+ | 'enableResizeOnEnd'
74
+ | 'enableResizeOnBottom'
75
+ | 'enableResizeOnStart'
76
+ | 'enableResizeOnLeft'
77
+ | 'enableResizeOnRight'
78
+ | 'horizontalHandleProps'
79
+ | 'verticalHandleProps'
80
+ | 'onWidthResize'
81
+ | 'onHeightResize'
82
+ | 'onWidthResizeEnd'
83
+ | 'onHeightResizeEnd';
84
+
60
85
  export const Box = React.forwardRef<HTMLElement, BoxProps>(function Box(
61
86
  {
62
87
  style,
@@ -206,7 +231,7 @@ export const Box = React.forwardRef<HTMLElement, BoxProps>(function Box(
206
231
  />
207
232
  )}
208
233
  {enableResizeOnLeft && (
209
- <LeftResizeHandle
234
+ <StartResizeHandle
210
235
  onWidthResize={onWidthResize}
211
236
  onWidthResizeEnd={onWidthResizeEnd}
212
237
  targetRef={boxRef}
@@ -214,7 +239,7 @@ export const Box = React.forwardRef<HTMLElement, BoxProps>(function Box(
214
239
  />
215
240
  )}
216
241
  {enableResizeOnRight && (
217
- <RightResizeHandle
242
+ <EndResizeHandle
218
243
  onWidthResize={onWidthResize}
219
244
  onWidthResizeEnd={onWidthResizeEnd}
220
245
  targetRef={boxRef}
@@ -15,7 +15,7 @@ export function EndResizeHandle({
15
15
  targetRef,
16
16
  onWidthResize,
17
17
  onWidthResizeEnd,
18
- 'right'
18
+ 'end'
19
19
  );
20
20
  const offset = handleProps?.offset ? handleProps.offset : -8;
21
21
 
@@ -19,7 +19,7 @@ export function createHorizontalResizeHandler(
19
19
  targetRef: React.MutableRefObject<HTMLElement | null>,
20
20
  onWidthResize?: OnWidthResize,
21
21
  onWidthResizeEnd?: (width: number, origin: WidthResizeOrigin) => void,
22
- origin: WidthResizeOrigin = 'right',
22
+ origin: WidthResizeOrigin = 'end',
23
23
  invert = false,
24
24
  disableDirection = false
25
25
  ) {
@@ -16,7 +16,7 @@ export function StartResizeHandle({
16
16
  targetRef,
17
17
  onWidthResize,
18
18
  onWidthResizeEnd,
19
- 'left',
19
+ 'start',
20
20
  true
21
21
  );
22
22
 
@@ -1,7 +1,8 @@
1
1
  import type { HandleProps } from './handle_props.js';
2
+ import type { HorizontalSide, VerticalSide } from '../../utils/types/sides.js';
2
3
 
3
- export type WidthResizeOrigin = 'left' | 'right';
4
- export type HeightResizeOrigin = 'top' | 'bottom';
4
+ export type WidthResizeOrigin = HorizontalSide;
5
+ export type HeightResizeOrigin = VerticalSide;
5
6
 
6
7
  export interface BaseOnResizePayload<
7
8
  Origin extends WidthResizeOrigin | HeightResizeOrigin,
@@ -1,7 +1,7 @@
1
1
  import { ChevronLeftIcon as ChevronLeft } from '@tcn/icons/chevron_left_icon.js';
2
2
  import { PlusIcon as Plus } from '@tcn/icons/plus_icon.js';
3
3
  import React from 'react';
4
- import { Button, SlimButton } from '../actions/index.js';
4
+ import { Button } from '../actions/index.js';
5
5
  import { Title } from '../typography/index.js';
6
6
  import { HCollapsibleBox } from './h_collapsible_box.js';
7
7
  import { HStack } from './h_stack.js';
@@ -26,14 +26,14 @@ function MyPanel() {
26
26
  return (
27
27
  <VStack height="100%" vAlign="start" style={{ backgroundColor: 'white' }}>
28
28
  <HStack padding="8px">
29
- <SlimButton hierarchy="tertiary">
29
+ <Button utility hierarchy="tertiary">
30
30
  <ChevronLeft size="lg" />
31
- </SlimButton>
31
+ </Button>
32
32
  <Title emphasis="strong">Foo</Title>
33
33
  <Spacer />
34
- <SlimButton size="md" hierarchy="primary">
34
+ <Button utility size="md" hierarchy="primary">
35
35
  <Plus />
36
- </SlimButton>
36
+ </Button>
37
37
  </HStack>
38
38
  </VStack>
39
39
  );
@@ -6,7 +6,7 @@ import { BodyText, Headline, Subheadline, Title } from '../typography/index.js';
6
6
  import { MoreHorizontalIcon } from '@tcn/icons/more_horizontal_icon.js';
7
7
  import { PlayFilledIcon } from '@tcn/icons/play_filled_icon.js';
8
8
  import { ShuffleIcon } from '@tcn/icons/shuffle_icon.js';
9
- import { Button, SlimButton } from '../actions/index.js';
9
+ import { Button } from '../actions/index.js';
10
10
  import { CloudDownloadIcon } from '@tcn/icons/cloud_download_icon.js';
11
11
  import { Spacer } from './spacer.js';
12
12
  import styles from './demo.module.css';
@@ -28,9 +28,9 @@ export function Track() {
28
28
  </HStack>
29
29
  <HStack width="auto" gap="8px">
30
30
  <BodyText>2:00</BodyText>
31
- <SlimButton hierarchy="tertiary" gap="4px">
31
+ <Button utility hierarchy="tertiary" gap="4px">
32
32
  <MoreHorizontalIcon size="lg" />
33
- </SlimButton>
33
+ </Button>
34
34
  </HStack>
35
35
  </HStack>
36
36
  );
@@ -83,12 +83,12 @@ export function Playing() {
83
83
  </Button>
84
84
  <Spacer />
85
85
  <HStack width="auto" gap="8px">
86
- <SlimButton hierarchy="secondary" gap="4px">
86
+ <Button utility hierarchy="secondary" gap="4px">
87
87
  <CloudDownloadIcon size="lg" />
88
- </SlimButton>
89
- <SlimButton hierarchy="secondary" gap="4px">
88
+ </Button>
89
+ <Button utility hierarchy="secondary" gap="4px">
90
90
  <MoreHorizontalIcon size="lg" />
91
- </SlimButton>
91
+ </Button>
92
92
  </HStack>
93
93
  </HStack>
94
94
  </VStack>
@@ -10,8 +10,8 @@ import { ZStack } from '../../stacks/z_stack.js';
10
10
  import { Panel } from '../panel/panel.js';
11
11
  import { Card } from '../card/card.js';
12
12
  import { SBContent } from '../../layouts/__stories__/utils.js';
13
- import { Resizable } from '../../utils/resize/resizable.js';
14
- import { ResizeHandle } from '../../utils/resize/resize_handle.js';
13
+ import { Resizable } from '../../utils/decorators/resizable/resizable.js';
14
+ import { ResizeHandle } from '../../utils/decorators/resizable/resize_handle.js';
15
15
 
16
16
  export default {
17
17
  title: 'Surfaces/Page',
@@ -137,12 +137,12 @@ export const ResizableSecondaryColumn = () => {
137
137
  </Header>
138
138
  <Scaffold>
139
139
  <Detail>
140
- <BodyText>Drag the left edge to resize this column.</BodyText>
140
+ <BodyText>Drag the start edge to resize this column.</BodyText>
141
141
  </Detail>
142
142
  </Scaffold>
143
143
  </Panel>
144
144
  </Column>
145
- <ResizeHandle position="left" />
145
+ <ResizeHandle position="start" />
146
146
  </Resizable>
147
147
  </Columns>
148
148
  </Page>
@@ -6,7 +6,7 @@ import { Spacer } from '../../stacks/spacer.js';
6
6
  import { Button } from '../../actions/index.js';
7
7
  import { CrossIcon } from '@tcn/icons/cross_icon.js';
8
8
  import { ZStack } from '../../stacks/z_stack.js';
9
- import { DragHandle } from '../../utils/dnd/handle.js';
9
+ import { DragHandle } from '../../utils/decorators/draggable/drag_handle.js';
10
10
  import { BugIcon } from '@tcn/icons/bug_icon.js';
11
11
 
12
12
  export default {
@@ -7,11 +7,13 @@ import { VStack } from '../../stacks/v_stack.js';
7
7
  import { Spacer } from '../../stacks/spacer.js';
8
8
  import { Field } from '../../form/field/field.js';
9
9
  import { FieldSet } from '../../form/field_set/field_set.js';
10
+ import { Legend } from '../../form/field_set/legend.js';
10
11
  import { BodyText } from '../../typography/index.js';
11
12
 
12
13
  export function ButtonShowcase() {
13
14
  return (
14
- <FieldSet legend="Button Showcase">
15
+ <FieldSet>
16
+ <Legend>Button Showcase</Legend>
15
17
  {/* Basic Buttons */}
16
18
  <Field label="Basic Buttons">
17
19
  <HStack width="400px" gap="8px">
@@ -21,6 +21,7 @@ import { HStack } from '../../stacks/h_stack.js';
21
21
  import { Spacer } from '../../stacks/spacer.js';
22
22
  import { Field } from '../../form/field/field.js';
23
23
  import { FieldSet } from '../../form/field_set/field_set.js';
24
+ import { Legend } from '../../form/field_set/legend.js';
24
25
 
25
26
  export function ControlsFieldSet() {
26
27
  const [disabled, setDisabled] = useState<boolean>(false);
@@ -49,7 +50,8 @@ export function ControlsFieldSet() {
49
50
  <Switch checked={disabled} onChange={setDisabled} />
50
51
  </Field>
51
52
  <Spacer height="8px" />
52
- <FieldSet legend="Inputs">
53
+ <FieldSet>
54
+ <Legend>Inputs</Legend>
53
55
  <Field label="Input">
54
56
  <Input disabled={disabled} />
55
57
  </Field>
@@ -18,6 +18,7 @@ import { Spacer } from '../../stacks/spacer.js';
18
18
  import { ZStack } from '../../stacks/z_stack.js';
19
19
  import { Field } from '../../form/field/field.js';
20
20
  import { FieldSet } from '../../form/field_set/field_set.js';
21
+ import { Legend } from '../../form/field_set/legend.js';
21
22
  import { BodyText } from '../../typography/index.js';
22
23
  import { Checkbox } from '../../inputs/index.js';
23
24
  import { Divider } from '../../layouts/divider/divider.js';
@@ -117,7 +118,8 @@ export function MenuShowcase() {
117
118
  };
118
119
 
119
120
  return (
120
- <FieldSet legend="Menu Showcase">
121
+ <FieldSet>
122
+ <Legend>Menu Showcase</Legend>
121
123
  {/* Basic Dropdown Menus */}
122
124
  <Field label="Basic Dropdown Menus">
123
125
  <VStack gap="8px" hAlign="end">
@@ -0,0 +1,89 @@
1
+ # `.tcn-interactive` — The Interaction State Primitive
2
+
3
+ ## What it is
4
+
5
+ `.tcn-interactive` is a CSS class that provides the foundational interaction state system for all clickable/tappable elements. It is an atomic theme concept — alongside material, surface, and elevation — that doesn't define what something looks like, but how something responds to user interaction.
6
+
7
+ ## What it provides
8
+
9
+ ### CSS custom properties (state vocabulary)
10
+
11
+ These variables form the "interaction vocabulary" that all interactive components share:
12
+
13
+ | Variable | Purpose |
14
+ |----------|---------|
15
+ | `--ink` | Text/foreground color (defaults to `--on-material`) |
16
+ | `--act` | Action accent color (defaults to `--action`) |
17
+ | `--mat` | Background/material color (defaults to `--material`) |
18
+ | `--act-down` | Active/pressed state — darkened material (`black 12%` mix) |
19
+ | `--act-raised` | Hover state — action tinted into material (`--act 12%` mix) |
20
+ | `--act-focus` | Focus state — stronger action tint (`--act 16%` mix) |
21
+ | `--act-drag` | Drag state — strongest action tint (`--act 24%` mix) |
22
+
23
+ ### Presentational defaults
24
+
25
+ | Property | Value | Why |
26
+ |----------|-------|-----|
27
+ | `cursor` | `pointer` | Signals clickability |
28
+ | `user-select` | `none` | Prevents accidental text selection during interaction |
29
+ | `background` | `var(--mat)` | Material background |
30
+ | `color` | `var(--ink)` | Foreground color |
31
+ | `transition` | `background 0.1s, color 0.1s` | Smooth state changes |
32
+
33
+ ### Pseudo-state mapping
34
+
35
+ | State | Selector | Background |
36
+ |-------|----------|------------|
37
+ | Focus | `:focus-visible`, `[data-focus-visible]` | `--act-focus` + 2px outline |
38
+ | Hover | `:hover`, `[data-hover]` | `--act-raised` |
39
+ | Active | `:active`, `[data-active]` | `--act-down` |
40
+ | Disabled | `[data-is-disabled="true"]` | `pointer-events: none` |
41
+
42
+ The `data-*` attribute selectors exist alongside pseudo-classes so that components can programmatically force states (e.g., showing a hover state in Storybook without actual mouse interaction).
43
+
44
+ ## Why we have it
45
+
46
+ Without `.tcn-interactive`, every clickable component would need to independently implement:
47
+ - Its own hover/focus/active/disabled background logic
48
+ - Its own color-mixing math for state changes
49
+ - Its own transition timing
50
+
51
+ By centralizing this in a single class, components opt into a consistent interaction model. A button, a toggle, a tab item, and a list item all respond to hover/focus/active in the same way — the only difference is what `--act`, `--mat`, and `--ink` resolve to in context.
52
+
53
+ This is what makes the "material system" work: a button inside a modal header automatically picks up the header's `--material` and `--on-material`, and the interactive states remix those colors correctly. No component needs to know what surface it's sitting on.
54
+
55
+ ## Which components apply it
56
+
57
+ | Component | File | Additional classes |
58
+ |-----------|------|--------------------|
59
+ | `BaseButton` | `actions/button/base_button/base_button.tsx` | `.tcn-base-button` |
60
+ | `TabItem` | `navigation/tabs/primitives/tabs_list.tsx` | `.tcn-tab-item` |
61
+ | `Item` (list) | `layouts/list/item.tsx` | `.tcn-item` |
62
+
63
+ All button variants (`Button`, `Toggle`, `MobileButton`) inherit `.tcn-interactive` through `BaseButton`. This means the class is active on every button, toggle, tab, and list item in the system.
64
+
65
+ ## How components customize it
66
+
67
+ Components override the vocabulary variables rather than the properties:
68
+
69
+ ```css
70
+ /* Button sets --mat and --ink based on hierarchy */
71
+ .tcn-button[data-hierarchy="primary"] {
72
+ --mat: var(--tcn-button-color, var(--btn-primary));
73
+ --ink: var(--tcn-button-text-color, var(--btn-on-primary));
74
+ }
75
+
76
+ /* Toggle overrides for selected state */
77
+ .tcn-toggle[data-is-selected="true"] {
78
+ --mat: var(--tcn-button-color, var(--tgl-true));
79
+ --ink: var(--tcn-button-text-color, var(--ergo-white));
80
+ }
81
+
82
+ /* Tab item overrides for selected state */
83
+ .tcn-tab-item[data-is-selected="true"] {
84
+ --mat: var(--tcn-button-color, var(--material));
85
+ --ink: var(--tcn-button-text-color, var(--ergo-primary));
86
+ }
87
+ ```
88
+
89
+ Because the state backgrounds (`--act-raised`, `--act-down`, `--act-focus`) are computed from `--mat` and `--act` via `color-mix()`, changing the input variables automatically produces correct state colors for any context.
@@ -0,0 +1,116 @@
1
+ # Ergo Theme — Part File Cascade
2
+
3
+ Tracks the split of the monolithic `ergo_theme.css` into modular part files loaded in a strict cascade order via `buildStyleSheet()`.
4
+
5
+ ## Load Order & Status
6
+
7
+ | # | File | Status | Contains |
8
+ |---|------|--------|----------|
9
+ | 1 | `tokens/theme_tokens.css` | Done | Ergo palette, spacing, sizing, shape tokens |
10
+ | 2 | `tokens/system_tokens.css` | Done | Blackcat system tokens (maps palette to semantics) |
11
+ | 3 | `parts/base.css` | Done | `.tcn-theme-root`, `.tcn-interactive`, `.material` |
12
+ | 4 | `parts/actions.css` | Done | `.tcn-base-button`, `.tcn-button`, `.tcn-toggle`, `.tcn-fab`, `.tcn-mobile-button`, `.tcn-button-group`, `.tcn-select-group` |
13
+ | 5 | `parts/inputs.css` | Done | `.tcn-entry`, `.tcn-control`, `.tcn-input`, `.tcn-textarea`, `.tcn-control-set`, `.tcn-checkbox`, `.tcn-switch-wrapper`, `.tcn-slider`, `.tcn-radio-label`, `.tcn-select-selected-label`, `.tcn-multiselect-*` |
14
+ | 6 | `parts/form.css` | Done | `.tcn-field-set`, `.tcn-field-set-legend` |
15
+ | 7 | `parts/navigation.css` | Done | `.tcn-tabs-bar`, `.tcn-tabs-list`, `.tcn-tab-item` (default + inline variants) |
16
+ | 8 | `parts/tokens_display.css` | TODO | `.tcn-chip`, `.tcn-datum`, `.tcn-key`, `.tcn-value`, `.tcn-term` |
17
+ | 9 | `parts/decorators.css` | TODO | `.tcn-draggable`, `.tcn-drag-handle`, `.tcn-resize-handle` (new theme coverage) |
18
+ | 10 | `parts/layouts.css` | TODO | `.tcn-scaffold`, `.tcn-header`, `.tcn-footer`, `.tcn-utility-bar`, `.tcn-utility-strip`, `.tcn-bar`, `.tcn-group`, `.tcn-section`, `.tcn-heading`, `.tcn-detail`, `.tcn-caret`, `.tcn-columns`, `.tcn-rows`, `.tcn-divider-line` |
19
+ | 11 | `parts/table.css` | TODO | `.tcn-table`, `.tcn-thead`, `.tcn-tbody`, `.tcn-tfoot`, `.tcn-tr`, `.tcn-td`, `.tcn-th` |
20
+ | 12 | `parts/overlay.css` | TODO | `.tcn-tethered`, `.tcn-tooltip`, `.tcn-frame-dialog`, `.tcn-frame-veil` |
21
+ | 13 | `parts/surfaces.css` | TODO | `.tcn-page`, `.tcn-panel`, `.tcn-aside`, `.tcn-card`, `.tcn-modal`, `.tcn-drawer`, `.tcn-window`, `.tcn-pop-confirm`, `.tcn-confirm`, `.tcn-list`, `.tcn-item` |
22
+ | 14 | `parts/typography.css` | TODO | `.tcn-body-text`, `.tcn-headline`, `.tcn-title`, etc. (`[data-emphasis="faint"]`) |
23
+
24
+ > Once all parts are extracted, `ergo_theme.css` is deleted and this file may be renamed to `LAYERS.md`.
25
+
26
+ ## Dependency Chain
27
+
28
+ Each layer can reference CSS custom properties and class behaviors defined in layers above it. Reverse references (later layer depending on an earlier one's internals) are not allowed.
29
+
30
+ ```
31
+ tokens/theme_tokens.css
32
+ Defines: --ergo-* palette, spacing, sizing, shape
33
+ Depends on: nothing
34
+
35
+ tokens/system_tokens.css
36
+ Defines: --font-*, --gap-*, --padding-*, --status-color-*, --action-severity-*, --*-color-*
37
+ Depends on: theme_tokens (references --ergo-* variables)
38
+
39
+ parts/base.css
40
+ Defines: --action, --on-action, --material, --on-material (on .tcn-theme-root)
41
+ --ink, --act, --mat, --act-down, --act-raised, --act-focus, --act-drag (on .tcn-interactive)
42
+ .material background/color
43
+ Depends on: theme_tokens (--ergo-primary, --ergo-white, --ergo-accent-blue)
44
+ system_tokens (--font-family, --font-color)
45
+
46
+ parts/actions.css
47
+ Defines: --btn-*, --tgl-* button/toggle sizing and color system
48
+ Depends on: base (--action, --on-action, --material, --on-material, --ink, --act, --mat)
49
+ theme_tokens (--ergo-shape-radius-medium, severity colors)
50
+ system_tokens (--padding-small, --action-severity-*)
51
+
52
+ parts/navigation.css
53
+ Defines: tab indicator positioning, variant styles
54
+ Depends on: base (--material, --on-material, interactive vocabulary)
55
+ actions (uses --mat, --ink, --act from interactive chain)
56
+ theme_tokens (--ergo-primary, --ergo-accent-blue, --ergo-material-divider)
57
+
58
+ parts/inputs.css
59
+ Defines: form control chrome (border, focus, disabled states), multiselect containers
60
+ Depends on: base (--action, --material, --act, --mat)
61
+ theme_tokens (--ergo-grey, --ergo-sizing-action-md, --ergo-shape-radius-medium, --ergo-primary)
62
+ system_tokens (--ergo-text-size-input, --gap-small)
63
+
64
+ parts/form.css
65
+ Defines: field-set layout, legend chrome, disabled entry within field-set
66
+ Depends on: theme_tokens (--ergo-sizing-bar-md, --ergo-material-divider, --ergo-material-disabled-outline, --ergo-text-color-disabled-outline)
67
+ system_tokens (--gap-medium, --padding-medium)
68
+
69
+ parts/tokens_display.css
70
+ Defines: chip, datum, key/value/term display atoms
71
+ Depends on: base (--action, --on-material)
72
+ theme_tokens (--ergo-primary, --ergo-accent-blue, status colors)
73
+
74
+ parts/decorators.css
75
+ Defines: drag handle cursors, resize handle indicators
76
+ Depends on: theme_tokens (--ergo-grey-light, --ergo-grey-dark, --ergo-shape-radius-medium)
77
+ Note: must precede layouts and surfaces since handles appear inside both
78
+
79
+ parts/layouts.css
80
+ Defines: scaffold structure, section nesting depth system, bar/group dividers, columns/rows, caret, divider-line
81
+ Depends on: base (--material, --on-material)
82
+ theme_tokens (--ergo-sizing-bar-*, --ergo-material-border, section depth colors)
83
+ system_tokens (--padding-*, --gap-*)
84
+
85
+ parts/table.css
86
+ Defines: table chrome (header/body/footer colors, alternating rows, sticky borders)
87
+ Depends on: base (--material, --on-material, --action, --on-action)
88
+ theme_tokens (--ergo-white, --ergo-accent-blue-light, --ergo-grey)
89
+ system_tokens (--padding-medium)
90
+ layouts (inherits --pad-inline concept from scaffold/surface context)
91
+
92
+ parts/overlay.css
93
+ Defines: tethered positioning, tooltip chrome, frame-dialog border, veil backdrop
94
+ Depends on: base (--material, --on-material)
95
+ theme_tokens (--ergo-secondary-dark, --ergo-shape-triangle-medium)
96
+ system_tokens (--padding-medium)
97
+
98
+ parts/surfaces.css — LAST
99
+ Defines: page/panel/card/modal/drawer/window/pop-confirm composition
100
+ Depends on: ALL previous layers
101
+ Note: surfaces are the final composition layer. They set --material, --on-material,
102
+ --divide-header, --pad-inline for their children (scaffold, sections, inputs,
103
+ actions). This is why surfaces must be last — they orchestrate all other layers.
104
+ ```
105
+
106
+ ### Why this order matters
107
+
108
+ The cascade within `@layer tcn-theme` is determined by declaration order. Later declarations win on conflicts for equal specificity. This means:
109
+
110
+ 1. **Tokens first** — everything references them, nothing references back
111
+ 2. **Base before actions** — actions use `--ink`, `--act`, `--mat` defined by `.tcn-interactive` in base
112
+ 3. **Actions before navigation** — tabs extend the interactive/action vocabulary
113
+ 4. **Inputs independent** — form controls don't depend on actions or navigation
114
+ 5. **Decorators before layouts/surfaces** — handles appear inside both; their base styles must exist first
115
+ 6. **Layouts before surfaces** — surfaces set `--pad-inline`, `--divide-header` that scaffold/section read; layout structure rules must exist for surfaces to override them
116
+ 7. **Surfaces last** — they compose everything: inputs inside cards, actions inside modals, layout slots inside panels. Surface-specific overrides (e.g., `.tcn-card .tcn-section`) must win over base layout rules