@tcn/ui 0.13.1 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) hide show
  1. package/README.md +1 -1
  2. package/dist/{Color-6BZIO3FS-C9xkPWgz.js → Color-6BZIO3FS-CKNkzBV6.js} +2 -2
  3. package/dist/{Color-6BZIO3FS-C9xkPWgz.js.map → Color-6BZIO3FS-CKNkzBV6.js.map} +1 -1
  4. package/dist/{WithTooltip-65CFNBJE-DEnh547F.js → WithTooltip-65CFNBJE-Bgt57Jw2.js} +2 -2
  5. package/dist/WithTooltip-65CFNBJE-Bgt57Jw2.js.map +1 -0
  6. package/dist/actions/__docs__/components/showcase.js +1 -1
  7. package/dist/actions/button/button_group/button_group.d.ts +1 -0
  8. package/dist/actions/button/button_group/button_group.d.ts.map +1 -1
  9. package/dist/actions/button/button_group/button_group.js +33 -30
  10. package/dist/actions/button/button_group/button_group.js.map +1 -1
  11. package/dist/actions/types.js +2 -0
  12. package/dist/actions/types.js.map +1 -0
  13. package/dist/aside.css +1 -1
  14. package/dist/containers.css +1 -0
  15. package/dist/containers.module-DlGySre0.js +5 -0
  16. package/dist/containers.module-DlGySre0.js.map +1 -0
  17. package/dist/floating_action_button.css +1 -0
  18. package/dist/form/field/common/types.js +2 -0
  19. package/dist/form/field/common/types.js.map +1 -0
  20. package/dist/form/field_set/field_set.d.ts.map +1 -1
  21. package/dist/form/field_set/field_set.js +11 -11
  22. package/dist/form/field_set/field_set.js.map +1 -1
  23. package/dist/formatter-EIJCOSYU-ByaSCvt6.js +6 -0
  24. package/dist/formatter-EIJCOSYU-ByaSCvt6.js.map +1 -0
  25. package/dist/inputs/mask_input/mask_config.js +2 -0
  26. package/dist/inputs/mask_input/mask_config.js.map +1 -0
  27. package/dist/inputs/mask_input/mask_cursor.js +2 -0
  28. package/dist/inputs/mask_input/mask_cursor.js.map +1 -0
  29. package/dist/inputs/multiselect/multiselect_inline_values.js +9 -7
  30. package/dist/inputs/multiselect/multiselect_inline_values.js.map +1 -1
  31. package/dist/inputs/multiselect/multiselect_values.js +4 -2
  32. package/dist/inputs/multiselect/multiselect_values.js.map +1 -1
  33. package/dist/layouts/containers/rail.d.ts.map +1 -0
  34. package/dist/layouts/containers/rail.js +67 -0
  35. package/dist/layouts/containers/rail.js.map +1 -0
  36. package/dist/layouts/containers/scaffold.d.ts.map +1 -0
  37. package/dist/layouts/containers/scaffold.js +67 -0
  38. package/dist/layouts/containers/scaffold.js.map +1 -0
  39. package/dist/layouts/containers/side/side.d.ts.map +1 -0
  40. package/dist/layouts/containers/side/side.js +22 -0
  41. package/dist/layouts/containers/side/side.js.map +1 -0
  42. package/dist/layouts/containers/utility_strip/utility_strip.d.ts.map +1 -0
  43. package/dist/layouts/{rail → containers}/utility_strip/utility_strip.js +5 -5
  44. package/dist/layouts/containers/utility_strip/utility_strip.js.map +1 -0
  45. package/dist/layouts/index.d.ts +5 -8
  46. package/dist/layouts/index.d.ts.map +1 -1
  47. package/dist/layouts/index.js +36 -38
  48. package/dist/layouts/index.js.map +1 -1
  49. package/dist/layouts/section/detail.d.ts +4 -0
  50. package/dist/layouts/section/detail.d.ts.map +1 -0
  51. package/dist/layouts/section/detail.js +11 -0
  52. package/dist/layouts/section/detail.js.map +1 -0
  53. package/dist/layouts/section/heading.js +1 -1
  54. package/dist/layouts/section/index.d.ts +4 -0
  55. package/dist/layouts/section/index.d.ts.map +1 -0
  56. package/dist/layouts/section/index.js +9 -0
  57. package/dist/layouts/section/index.js.map +1 -0
  58. package/dist/layouts/section/section.js +1 -1
  59. package/dist/mobile/actions/button/mobile_button.d.ts +6 -0
  60. package/dist/mobile/actions/button/mobile_button.d.ts.map +1 -0
  61. package/dist/mobile/actions/button/mobile_button.js +21 -0
  62. package/dist/mobile/actions/button/mobile_button.js.map +1 -0
  63. package/dist/mobile/actions/floating_action_button/floating_action_button.d.ts +6 -0
  64. package/dist/mobile/actions/floating_action_button/floating_action_button.d.ts.map +1 -0
  65. package/dist/mobile/actions/floating_action_button/floating_action_button.js +20 -0
  66. package/dist/mobile/actions/floating_action_button/floating_action_button.js.map +1 -0
  67. package/dist/mobile/inputs/date_picker/mobile_date_picker.d.ts +17 -0
  68. package/dist/mobile/inputs/date_picker/mobile_date_picker.d.ts.map +1 -0
  69. package/dist/mobile/inputs/date_picker/mobile_date_picker.js +80 -0
  70. package/dist/mobile/inputs/date_picker/mobile_date_picker.js.map +1 -0
  71. package/dist/mobile/inputs/date_picker/mobile_date_picker_body.d.ts +7 -0
  72. package/dist/mobile/inputs/date_picker/mobile_date_picker_body.d.ts.map +1 -0
  73. package/dist/mobile/inputs/date_picker/mobile_date_picker_body.js +35 -0
  74. package/dist/mobile/inputs/date_picker/mobile_date_picker_body.js.map +1 -0
  75. package/dist/mobile/inputs/date_picker/mobile_date_picker_date.d.ts +8 -0
  76. package/dist/mobile/inputs/date_picker/mobile_date_picker_date.d.ts.map +1 -0
  77. package/dist/mobile/inputs/date_picker/mobile_date_picker_date.js +74 -0
  78. package/dist/mobile/inputs/date_picker/mobile_date_picker_date.js.map +1 -0
  79. package/dist/mobile/inputs/date_picker/mobile_date_picker_day.d.ts +6 -0
  80. package/dist/mobile/inputs/date_picker/mobile_date_picker_day.d.ts.map +1 -0
  81. package/dist/mobile/inputs/date_picker/mobile_date_picker_day.js +39 -0
  82. package/dist/mobile/inputs/date_picker/mobile_date_picker_day.js.map +1 -0
  83. package/dist/mobile/inputs/date_picker/mobile_date_picker_header.d.ts +9 -0
  84. package/dist/mobile/inputs/date_picker/mobile_date_picker_header.d.ts.map +1 -0
  85. package/dist/mobile/inputs/date_picker/mobile_date_picker_header.js +163 -0
  86. package/dist/mobile/inputs/date_picker/mobile_date_picker_header.js.map +1 -0
  87. package/dist/mobile/inputs/date_picker/mobile_date_picker_input.d.ts +9 -0
  88. package/dist/mobile/inputs/date_picker/mobile_date_picker_input.d.ts.map +1 -0
  89. package/dist/mobile/inputs/date_picker/mobile_date_picker_input.js +190 -0
  90. package/dist/mobile/inputs/date_picker/mobile_date_picker_input.js.map +1 -0
  91. package/dist/mobile/inputs/date_picker/mobile_date_picker_time_selector.d.ts +11 -0
  92. package/dist/mobile/inputs/date_picker/mobile_date_picker_time_selector.d.ts.map +1 -0
  93. package/dist/mobile/inputs/date_picker/mobile_date_picker_time_selector.js +50 -0
  94. package/dist/mobile/inputs/date_picker/mobile_date_picker_time_selector.js.map +1 -0
  95. package/dist/mobile/inputs/date_picker/mobile_date_picker_year_selector.d.ts +7 -0
  96. package/dist/mobile/inputs/date_picker/mobile_date_picker_year_selector.d.ts.map +1 -0
  97. package/dist/mobile/inputs/date_picker/mobile_date_picker_year_selector.js +109 -0
  98. package/dist/mobile/inputs/date_picker/mobile_date_picker_year_selector.js.map +1 -0
  99. package/dist/mobile/inputs/date_picker/mobile_overlay_header.d.ts +6 -0
  100. package/dist/mobile/inputs/date_picker/mobile_overlay_header.d.ts.map +1 -0
  101. package/dist/mobile/inputs/date_picker/mobile_overlay_header.js +34 -0
  102. package/dist/mobile/inputs/date_picker/mobile_overlay_header.js.map +1 -0
  103. package/dist/mobile/inputs/index.d.ts +5 -0
  104. package/dist/mobile/inputs/index.d.ts.map +1 -0
  105. package/dist/mobile/inputs/index.js +11 -0
  106. package/dist/mobile/inputs/index.js.map +1 -0
  107. package/dist/mobile/portal/mobile_portal.d.ts +5 -0
  108. package/dist/mobile/portal/mobile_portal.d.ts.map +1 -0
  109. package/dist/mobile/portal/mobile_portal.js +10 -0
  110. package/dist/mobile/portal/mobile_portal.js.map +1 -0
  111. package/dist/mobile/viewport/mobile_viewport.d.ts +21 -0
  112. package/dist/mobile/viewport/mobile_viewport.d.ts.map +1 -0
  113. package/dist/mobile/viewport/mobile_viewport.js +31 -0
  114. package/dist/mobile/viewport/mobile_viewport.js.map +1 -0
  115. package/dist/mobile_button.css +1 -0
  116. package/dist/mobile_date_picker.css +1 -0
  117. package/dist/mobile_date_picker_date.css +1 -0
  118. package/dist/mobile_date_picker_day.css +1 -0
  119. package/dist/mobile_date_picker_header.css +1 -0
  120. package/dist/mobile_date_picker_input.css +1 -0
  121. package/dist/mobile_date_picker_time_selector.css +1 -0
  122. package/dist/mobile_date_picker_year_selector.css +1 -0
  123. package/dist/mobile_overlay_header.css +1 -0
  124. package/dist/mobile_viewport.css +1 -0
  125. package/dist/navigation/tabs/state/link/use_tab_link.d.ts +2 -1
  126. package/dist/navigation/tabs/state/link/use_tab_link.d.ts.map +1 -1
  127. package/dist/navigation/tabs/state/link/use_tab_link.js.map +1 -1
  128. package/dist/overlay/tethered/types.js +2 -0
  129. package/dist/overlay/tethered/types.js.map +1 -0
  130. package/dist/panel.css +1 -1
  131. package/dist/phone_number_input.css +1 -1
  132. package/dist/section.css +1 -1
  133. package/dist/section.module-BXlxYmJK.js +5 -0
  134. package/dist/section.module-BXlxYmJK.js.map +1 -0
  135. package/dist/{showcase-y9D3_Y8T.js → showcase-DBFp_Epk.js} +94 -94
  136. package/dist/showcase-DBFp_Epk.js.map +1 -0
  137. package/dist/side.css +1 -1
  138. package/dist/stacks/box/handle_props.js +2 -0
  139. package/dist/stacks/box/handle_props.js.map +1 -0
  140. package/dist/stacks/box/types.js +2 -0
  141. package/dist/stacks/box/types.js.map +1 -0
  142. package/dist/surfaces/aside/aside.d.ts +1 -1
  143. package/dist/surfaces/aside/aside.d.ts.map +1 -1
  144. package/dist/surfaces/aside/aside.js +1 -1
  145. package/dist/surfaces/aside/aside.js.map +1 -1
  146. package/dist/surfaces/card/card.d.ts +1 -1
  147. package/dist/surfaces/card/card.d.ts.map +1 -1
  148. package/dist/surfaces/card/card.js +1 -1
  149. package/dist/surfaces/card/card.js.map +1 -1
  150. package/dist/surfaces/drawers/drawer.js +1 -1
  151. package/dist/surfaces/drawers/drawer.js.map +1 -1
  152. package/dist/surfaces/modal/modal.js +1 -1
  153. package/dist/surfaces/modal/modal.js.map +1 -1
  154. package/dist/surfaces/page/page.d.ts +1 -1
  155. package/dist/surfaces/page/page.d.ts.map +1 -1
  156. package/dist/surfaces/page/page.js +1 -1
  157. package/dist/surfaces/page/page.js.map +1 -1
  158. package/dist/surfaces/panel/panel.d.ts +1 -1
  159. package/dist/surfaces/panel/panel.d.ts.map +1 -1
  160. package/dist/surfaces/panel/panel.js +1 -1
  161. package/dist/surfaces/panel/panel.js.map +1 -1
  162. package/dist/surfaces/pop_confirm/pop_confirm.js +8 -9
  163. package/dist/surfaces/pop_confirm/pop_confirm.js.map +1 -1
  164. package/dist/surfaces/window/window.js +1 -1
  165. package/dist/surfaces/window/window.js.map +1 -1
  166. package/dist/{syntaxhighlighter-ED5Y7EFY-CqInEOwQ.js → syntaxhighlighter-ED5Y7EFY-B0ag_7lq.js} +2 -2
  167. package/dist/syntaxhighlighter-ED5Y7EFY-B0ag_7lq.js.map +1 -0
  168. package/dist/term.css +1 -0
  169. package/dist/themes/build_stylesheet.d.ts +2 -0
  170. package/dist/themes/build_stylesheet.d.ts.map +1 -0
  171. package/dist/themes/build_stylesheet.js +9 -0
  172. package/dist/themes/build_stylesheet.js.map +1 -0
  173. package/dist/themes/theme_variables.d.ts +7 -0
  174. package/dist/themes/theme_variables.d.ts.map +1 -1
  175. package/dist/themes/theme_variables.js +16 -9
  176. package/dist/themes/theme_variables.js.map +1 -1
  177. package/dist/themes/themes/ergo/ergo_theme.css +1 -1
  178. package/dist/themes/themes/ergo/ergo_theme.d.ts.map +1 -1
  179. package/dist/themes/themes/ergo/ergo_theme.js +314 -154
  180. package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
  181. package/dist/themes/themes/ergo/tokens/system_tokens.css +1 -0
  182. package/dist/themes/themes/ergo/tokens/theme_tokens.css +1 -0
  183. package/dist/tokens/index.d.ts +1 -0
  184. package/dist/tokens/index.d.ts.map +1 -1
  185. package/dist/tokens/index.js +4 -2
  186. package/dist/tokens/index.js.map +1 -1
  187. package/dist/tokens/key/key.d.ts +8 -1
  188. package/dist/tokens/key/key.d.ts.map +1 -1
  189. package/dist/tokens/key/key.js +20 -3
  190. package/dist/tokens/key/key.js.map +1 -1
  191. package/dist/tokens/term/term.d.ts +4 -0
  192. package/dist/tokens/term/term.d.ts.map +1 -0
  193. package/dist/tokens/term/term.js +20 -0
  194. package/dist/tokens/term/term.js.map +1 -0
  195. package/dist/tokens/value/value.d.ts +8 -1
  196. package/dist/tokens/value/value.d.ts.map +1 -1
  197. package/dist/tokens/value/value.js +23 -5
  198. package/dist/tokens/value/value.js.map +1 -1
  199. package/dist/utility_strip.css +1 -1
  200. package/dist/utils/calendar/calendar_date.js +2 -0
  201. package/dist/utils/calendar/calendar_date.js.map +1 -0
  202. package/dist/utils/dnd/types.js +2 -0
  203. package/dist/utils/dnd/types.js.map +1 -0
  204. package/dist/utils/types/variations.d.ts +1 -0
  205. package/dist/utils/types/variations.d.ts.map +1 -1
  206. package/dist/value.css +1 -0
  207. package/dist/value.module-DFaCouFD.js +5 -0
  208. package/dist/value.module-DFaCouFD.js.map +1 -0
  209. package/package.json +17 -16
  210. package/src/actions/button/button_group/button_group.tsx +18 -10
  211. package/src/form/field_set/field_set.tsx +4 -2
  212. package/src/inputs/phone_number_input/phone_number_input.module.css +7 -5
  213. package/src/layouts/__stories__/composed.stories.tsx +13 -8
  214. package/src/layouts/__stories__/composed_stories.module.css +1 -0
  215. package/src/layouts/__stories__/rail.stories.tsx +23 -25
  216. package/src/layouts/__stories__/scaffold.stories.tsx +21 -41
  217. package/src/layouts/__stories__/utils/layout_theme.css +0 -4
  218. package/src/layouts/__stories__/utils/layout_theme_provider.tsx +8 -1
  219. package/src/layouts/__stories__/utils.tsx +15 -29
  220. package/src/layouts/containers/containers.module.css +55 -0
  221. package/src/layouts/{rail → containers}/rail.tsx +15 -5
  222. package/src/layouts/{scaffold → containers}/scaffold.tsx +15 -5
  223. package/src/layouts/{rail → containers}/side/side.tsx +2 -1
  224. package/src/layouts/index.ts +6 -8
  225. package/src/layouts/section/__stories__/section.stories.tsx +79 -50
  226. package/src/layouts/section/detail.tsx +14 -0
  227. package/src/layouts/section/index.ts +3 -0
  228. package/src/layouts/section/section.module.css +0 -36
  229. package/src/mobile/actions/button/mobile_button.module.css +34 -0
  230. package/src/mobile/actions/button/mobile_button.stories.tsx +97 -0
  231. package/src/mobile/actions/button/mobile_button.tsx +26 -0
  232. package/src/mobile/actions/floating_action_button/floating_action_button.module.css +28 -0
  233. package/src/mobile/actions/floating_action_button/floating_action_button.stories.tsx +102 -0
  234. package/src/mobile/actions/floating_action_button/floating_action_button.tsx +25 -0
  235. package/src/mobile/inputs/date_picker/mobile_date_picker.module.css +22 -0
  236. package/src/mobile/inputs/date_picker/mobile_date_picker.tsx +118 -0
  237. package/src/mobile/inputs/date_picker/mobile_date_picker_body.tsx +57 -0
  238. package/src/mobile/inputs/date_picker/mobile_date_picker_date.module.css +80 -0
  239. package/src/mobile/inputs/date_picker/mobile_date_picker_date.tsx +102 -0
  240. package/src/mobile/inputs/date_picker/mobile_date_picker_day.module.css +6 -0
  241. package/src/mobile/inputs/date_picker/mobile_date_picker_day.tsx +40 -0
  242. package/src/mobile/inputs/date_picker/mobile_date_picker_header.module.css +21 -0
  243. package/src/mobile/inputs/date_picker/mobile_date_picker_header.tsx +180 -0
  244. package/src/mobile/inputs/date_picker/mobile_date_picker_input.module.css +13 -0
  245. package/src/mobile/inputs/date_picker/mobile_date_picker_input.stories.tsx +27 -0
  246. package/src/mobile/inputs/date_picker/mobile_date_picker_input.tsx +240 -0
  247. package/src/mobile/inputs/date_picker/mobile_date_picker_time_selector.module.css +7 -0
  248. package/src/mobile/inputs/date_picker/mobile_date_picker_time_selector.tsx +81 -0
  249. package/src/mobile/inputs/date_picker/mobile_date_picker_year_selector.module.css +55 -0
  250. package/src/mobile/inputs/date_picker/mobile_date_picker_year_selector.tsx +119 -0
  251. package/src/mobile/inputs/date_picker/mobile_overlay_header.module.css +5 -0
  252. package/src/mobile/inputs/date_picker/mobile_overlay_header.tsx +29 -0
  253. package/src/mobile/inputs/index.ts +4 -0
  254. package/src/mobile/portal/mobile_portal.tsx +14 -0
  255. package/src/mobile/viewport/mobile_viewport.module.css +23 -0
  256. package/src/mobile/viewport/mobile_viewport.tsx +80 -0
  257. package/src/navigation/tabs/state/link/use_tab_link.ts +1 -1
  258. package/src/overlay/slide/slide.stories.tsx +6 -9
  259. package/src/surfaces/aside/aside.module.css +1 -0
  260. package/src/surfaces/aside/aside.stories.tsx +24 -38
  261. package/src/surfaces/aside/aside.tsx +1 -1
  262. package/src/surfaces/card/card.stories.tsx +5 -7
  263. package/src/surfaces/card/card.tsx +1 -1
  264. package/src/surfaces/drawers/drawer.stories.tsx +10 -13
  265. package/src/surfaces/drawers/drawer.tsx +1 -1
  266. package/src/surfaces/modal/__stories__/modal.stories.tsx +10 -13
  267. package/src/surfaces/modal/modal.tsx +1 -1
  268. package/src/surfaces/page/page.stories.tsx +28 -32
  269. package/src/surfaces/page/page.tsx +1 -1
  270. package/src/surfaces/panel/__stories__/panel.stories.tsx +199 -66
  271. package/src/surfaces/panel/panel.module.css +1 -1
  272. package/src/surfaces/panel/panel.tsx +1 -1
  273. package/src/surfaces/pop_confirm/pop_confirm.stories.tsx +29 -37
  274. package/src/surfaces/tooltip/__stories__/tooltip.stories.tsx +8 -10
  275. package/src/surfaces/window/window.stories.tsx +6 -15
  276. package/src/surfaces/window/window.tsx +1 -1
  277. package/src/themes/build_stylesheet.ts +5 -0
  278. package/src/themes/theme_variables.ts +9 -0
  279. package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_tone_card.tsx +6 -8
  280. package/src/themes/themes/ergo/__stories__/material.stories.tsx +4 -6
  281. package/src/themes/themes/ergo/ergo_theme.css +208 -215
  282. package/src/themes/themes/ergo/ergo_theme.ts +4 -2
  283. package/src/themes/themes/ergo/tokens/system_tokens.css +68 -0
  284. package/src/themes/themes/ergo/tokens/theme_tokens.css +99 -0
  285. package/src/tokens/index.ts +1 -0
  286. package/src/tokens/key/key.tsx +23 -2
  287. package/src/tokens/term/term.module.css +14 -0
  288. package/src/tokens/term/term.stories.tsx +84 -0
  289. package/src/tokens/term/term.tsx +20 -0
  290. package/src/tokens/value/value.module.css +5 -0
  291. package/src/tokens/value/value.tsx +24 -2
  292. package/src/utils/types/variations.ts +1 -0
  293. package/tsconfig.json +5 -33
  294. package/dist/WithTooltip-65CFNBJE-DEnh547F.js.map +0 -1
  295. package/dist/body.css +0 -1
  296. package/dist/formatter-EIJCOSYU-DWmgEY3b.js +0 -6
  297. package/dist/formatter-EIJCOSYU-DWmgEY3b.js.map +0 -1
  298. package/dist/layouts/body/body.d.ts +0 -23
  299. package/dist/layouts/body/body.d.ts.map +0 -1
  300. package/dist/layouts/body/body.js +0 -20
  301. package/dist/layouts/body/body.js.map +0 -1
  302. package/dist/layouts/rail/rail.d.ts.map +0 -1
  303. package/dist/layouts/rail/rail.js +0 -55
  304. package/dist/layouts/rail/rail.js.map +0 -1
  305. package/dist/layouts/rail/side/side.d.ts.map +0 -1
  306. package/dist/layouts/rail/side/side.js +0 -21
  307. package/dist/layouts/rail/side/side.js.map +0 -1
  308. package/dist/layouts/rail/utility_strip/utility_strip.d.ts.map +0 -1
  309. package/dist/layouts/rail/utility_strip/utility_strip.js.map +0 -1
  310. package/dist/layouts/row/row.d.ts +0 -4
  311. package/dist/layouts/row/row.d.ts.map +0 -1
  312. package/dist/layouts/row/row.js +0 -11
  313. package/dist/layouts/row/row.js.map +0 -1
  314. package/dist/layouts/scaffold/scaffold.d.ts.map +0 -1
  315. package/dist/layouts/scaffold/scaffold.js +0 -55
  316. package/dist/layouts/scaffold/scaffold.js.map +0 -1
  317. package/dist/rail.css +0 -1
  318. package/dist/row.css +0 -1
  319. package/dist/scaffold.css +0 -1
  320. package/dist/section.module-0wyGkhDg.js +0 -5
  321. package/dist/section.module-0wyGkhDg.js.map +0 -1
  322. package/dist/showcase-y9D3_Y8T.js.map +0 -1
  323. package/dist/syntaxhighlighter-ED5Y7EFY-CqInEOwQ.js.map +0 -1
  324. package/src/layouts/body/body.module.css +0 -8
  325. package/src/layouts/body/body.tsx +0 -40
  326. package/src/layouts/rail/rail.module.css +0 -14
  327. package/src/layouts/row/row.module.css +0 -5
  328. package/src/layouts/row/row.tsx +0 -15
  329. package/src/layouts/scaffold/scaffold.module.css +0 -14
  330. /package/dist/layouts/{rail → containers}/rail.d.ts +0 -0
  331. /package/dist/layouts/{scaffold → containers}/scaffold.d.ts +0 -0
  332. /package/dist/layouts/{rail → containers}/side/side.d.ts +0 -0
  333. /package/dist/layouts/{rail → containers}/utility_strip/utility_strip.d.ts +0 -0
  334. /package/src/layouts/{rail → containers}/side/side.module.css +0 -0
  335. /package/src/layouts/{rail → containers}/utility_strip/utility_strip.module.css +0 -0
  336. /package/src/layouts/{rail → containers}/utility_strip/utility_strip.tsx +0 -0
@@ -0,0 +1,9 @@
1
+ import { Section as r } from "./section.js";
2
+ import { Heading as f } from "./heading.js";
3
+ import { Detail as m } from "./detail.js";
4
+ export {
5
+ m as Detail,
6
+ f as Heading,
7
+ r as Section
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -2,7 +2,7 @@ import { jsx as m } from "react/jsx-runtime";
2
2
  import n from "react";
3
3
  import { clsx as f } from "clsx";
4
4
  import { VStack as a } from "../../stacks/v_stack.js";
5
- import { s as p } from "../../section.module-0wyGkhDg.js";
5
+ import { s as p } from "../../section.module-BXlxYmJK.js";
6
6
  const _ = n.forwardRef(function({ children: t, className: o, hAlign: r = "start", as: c = "section", style: s, ...e }, i) {
7
7
  return /* @__PURE__ */ m(
8
8
  a,
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { ButtonProps } from '../../../actions/button/button/button.js';
3
+ export interface MobileButtonProps extends ButtonProps {
4
+ }
5
+ export declare const MobileButton: React.ForwardRefExoticComponent<Omit<MobileButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+ //# sourceMappingURL=mobile_button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile_button.d.ts","sourceRoot":"","sources":["../../../../src/mobile/actions/button/mobile_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAGpF,MAAM,WAAW,iBAAkB,SAAQ,WAAW;CAAG;AAEzD,eAAO,MAAM,YAAY,0GAkBxB,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import l from "react";
3
+ import { clsx as e } from "clsx";
4
+ import { Button as u } from "../../../actions/button/button/button.js";
5
+ import '../../../mobile_button.css';const s = "_mobile-button_44bdeb0", r = "_mobile-button-text_4d530ed", n = { "mobile-button": s, "mobile-button-text": r }, _ = l.forwardRef(
6
+ function({ children: t, className: b, ...m }, i) {
7
+ return /* @__PURE__ */ o(
8
+ u,
9
+ {
10
+ ref: i,
11
+ className: e(n["mobile-button"], "tcn-mobile-button", b),
12
+ ...m,
13
+ children: typeof t == "string" ? /* @__PURE__ */ o("span", { className: e(n["mobile-button-text"], "tcn-mobile-button-text"), children: t }) : t
14
+ }
15
+ );
16
+ }
17
+ );
18
+ export {
19
+ _ as MobileButton
20
+ };
21
+ //# sourceMappingURL=mobile_button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile_button.js","sources":["../../../../src/mobile/actions/button/mobile_button.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport { Button, type ButtonProps } from '../../../actions/button/button/button.js';\nimport styles from './mobile_button.module.css';\n\nexport interface MobileButtonProps extends ButtonProps {}\n\nexport const MobileButton = React.forwardRef<HTMLButtonElement, MobileButtonProps>(\n function MobileButton({ children, className, ...props }, ref) {\n return (\n <Button\n ref={ref}\n className={clsx(styles['mobile-button'], 'tcn-mobile-button', className)}\n {...props}\n >\n {typeof children === 'string' ? (\n <span className={clsx(styles['mobile-button-text'], 'tcn-mobile-button-text')}>\n {children}\n </span>\n ) : (\n children\n )}\n </Button>\n );\n }\n);\n"],"names":["MobileButton","React","children","className","props","ref","jsx","Button","clsx","styles"],"mappings":";;;;4HAOaA,IAAeC,EAAM;AAAA,EAChC,SAAsB,EAAE,UAAAC,GAAU,WAAAC,GAAW,GAAGC,EAAA,GAASC,GAAK;AAC5D,WACE,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,KAAAF;AAAA,QACA,WAAWG,EAAKC,EAAO,eAAe,GAAG,qBAAqBN,CAAS;AAAA,QACtE,GAAGC;AAAA,QAEH,UAAA,OAAOF,KAAa,WACnB,gBAAAI,EAAC,QAAA,EAAK,WAAWE,EAAKC,EAAO,oBAAoB,GAAG,wBAAwB,GACzE,UAAAP,GACH,IAEAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;"}
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { ButtonProps } from '../../../actions/button/button/button.js';
3
+ export interface FloatingActionButtonProps extends ButtonProps {
4
+ }
5
+ export declare const FloatingActionButton: React.ForwardRefExoticComponent<Omit<FloatingActionButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+ //# sourceMappingURL=floating_action_button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"floating_action_button.d.ts","sourceRoot":"","sources":["../../../../src/mobile/actions/floating_action_button/floating_action_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAGpF,MAAM,WAAW,yBAA0B,SAAQ,WAAW;CAAG;AAEjE,eAAO,MAAM,oBAAoB,kHAiB/B,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ import c from "react";
3
+ import { clsx as s } from "clsx";
4
+ import { Button as i } from "../../../actions/button/button/button.js";
5
+ import '../../../floating_action_button.css';const m = "_fab_b64d221", e = { fab: m }, _ = c.forwardRef(function({ children: t, className: o, hierarchy: n = "secondary", ...r }, a) {
6
+ return /* @__PURE__ */ f(
7
+ i,
8
+ {
9
+ ref: a,
10
+ className: s(e.fab, "tcn-fab", o),
11
+ hierarchy: n,
12
+ ...r,
13
+ children: t
14
+ }
15
+ );
16
+ });
17
+ export {
18
+ _ as FloatingActionButton
19
+ };
20
+ //# sourceMappingURL=floating_action_button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"floating_action_button.js","sources":["../../../../src/mobile/actions/floating_action_button/floating_action_button.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport { Button, type ButtonProps } from '../../../actions/button/button/button.js';\nimport styles from './floating_action_button.module.css';\n\nexport interface FloatingActionButtonProps extends ButtonProps {}\n\nexport const FloatingActionButton = React.forwardRef<\n HTMLButtonElement,\n FloatingActionButtonProps\n>(function FloatingActionButton(\n { children, className, hierarchy = 'secondary', ...props },\n ref\n) {\n return (\n <Button\n ref={ref}\n className={clsx(styles.fab, 'tcn-fab', className)}\n hierarchy={hierarchy}\n {...props}\n >\n {children}\n </Button>\n );\n});\n"],"names":["FloatingActionButton","React","children","className","hierarchy","props","ref","jsx","Button","clsx","styles"],"mappings":";;;;0CAOaA,IAAuBC,EAAM,WAGxC,SACA,EAAE,UAAAC,GAAU,WAAAC,GAAW,WAAAC,IAAY,aAAa,GAAGC,EAAA,GACnDC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,WAAWG,EAAKC,EAAO,KAAK,WAAWP,CAAS;AAAA,MAChD,WAAAC;AAAA,MACC,GAAGC;AAAA,MAEH,UAAAH;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ import { DatePickerPresenter } from '../../../inputs/date_picker/date_picker_presenter.js';
3
+ export interface MobileDatePickerProps {
4
+ value: Date | null;
5
+ disabled?: boolean;
6
+ onChange?: (value: Date | null) => void;
7
+ onError?: (error: string | null) => void;
8
+ min?: Date | null;
9
+ max?: Date | null;
10
+ disabledDates?: Date[];
11
+ countryCode?: string;
12
+ renderActions?: (datePickerPresenter: DatePickerPresenter) => React.ReactNode;
13
+ selectMonthMessage?: string;
14
+ selectYearMessage?: string;
15
+ }
16
+ export declare const MobileDatePicker: React.ForwardRefExoticComponent<MobileDatePickerProps & React.RefAttributes<HTMLDivElement>>;
17
+ //# sourceMappingURL=mobile_date_picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile_date_picker.d.ts","sourceRoot":"","sources":["../../../../src/mobile/inputs/date_picker/mobile_date_picker.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAGjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAG3F,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACxC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,mBAAmB,EAAE,mBAAmB,KAAK,KAAK,CAAC,SAAS,CAAC;IAC9E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,gBAAgB,8FA6F3B,CAAC"}
@@ -0,0 +1,80 @@
1
+ import { jsx as r, jsxs as b } from "react/jsx-runtime";
2
+ import { useSignalValue as _, useSignalValueEffect as u } from "@tcn/state";
3
+ import { Spacer as B } from "../../../stacks/spacer.js";
4
+ import { VStack as a } from "../../../stacks/v_stack.js";
5
+ import { clsx as h } from "clsx";
6
+ import y, { useRef as R, useState as V, useLayoutEffect as o } from "react";
7
+ import { MobileDatePickerBody as j } from "./mobile_date_picker_body.js";
8
+ import { MobileDatePickerHeader as F } from "./mobile_date_picker_header.js";
9
+ import { DatePickerPresenter as I } from "../../../inputs/date_picker/date_picker_presenter.js";
10
+ import '../../../mobile_date_picker.css';const N = "_mobile-date-picker_a4f6410", Y = "_mobile-date-picker-box_d3c7945", k = { "mobile-date-picker": N, "mobile-date-picker-box": Y }, T = y.forwardRef(function({
11
+ value: t,
12
+ disabled: x,
13
+ onChange: c,
14
+ onError: s,
15
+ min: n = null,
16
+ max: m = null,
17
+ disabledDates: l,
18
+ countryCode: d = "en-US",
19
+ renderActions: f,
20
+ selectMonthMessage: D,
21
+ selectYearMessage: g
22
+ }, M) {
23
+ const p = R(!1), [e] = V(() => {
24
+ const i = /* @__PURE__ */ new Date(), w = t == null ? i.getFullYear() : t.getFullYear(), S = t == null ? i.getMonth() : t.getMonth();
25
+ return new I(t, w, S, !1);
26
+ }), P = _(e.stateBroadcast).error;
27
+ return u((i) => {
28
+ P !== i && s && s(i);
29
+ }, e.errorBroadcast), u((i) => {
30
+ p.current ? c && c(i) : p.current = !0;
31
+ }, e.valueBroadcast), o(() => {
32
+ e.initialize();
33
+ }, [e]), o(() => {
34
+ e.setMinDate(n);
35
+ }, [e, n]), o(() => {
36
+ e.setMaxDate(m);
37
+ }, [e, m]), o(() => {
38
+ l == null ? e.setDisabledDates([]) : e.setDisabledDates(l);
39
+ }, [e, l]), o(() => {
40
+ e.selectDate(t);
41
+ }, [e, t]), /* @__PURE__ */ r(
42
+ a,
43
+ {
44
+ ref: M,
45
+ width: "flex",
46
+ height: "flex",
47
+ className: h(k["mobile-date-picker"], "tcn-mobile-date-picker"),
48
+ tabIndex: 0,
49
+ children: /* @__PURE__ */ b(
50
+ a,
51
+ {
52
+ height: "flex",
53
+ width: "100%",
54
+ className: h(k["mobile-date-picker-box"], "tcn-mobile-date-picker-box"),
55
+ "data-is-disabled": x,
56
+ children: [
57
+ /* @__PURE__ */ b(a, { height: "auto", width: "100%", children: [
58
+ /* @__PURE__ */ r(
59
+ F,
60
+ {
61
+ selectMonthMessage: D,
62
+ selectYearMessage: g,
63
+ countryCode: d,
64
+ presenter: e
65
+ }
66
+ ),
67
+ /* @__PURE__ */ r(j, { countryCode: d, presenter: e })
68
+ ] }),
69
+ f && /* @__PURE__ */ r(a, { paddingInline: "8px", children: f(e) }),
70
+ /* @__PURE__ */ r(B, { height: "8px" })
71
+ ]
72
+ }
73
+ )
74
+ }
75
+ );
76
+ });
77
+ export {
78
+ T as MobileDatePicker
79
+ };
80
+ //# sourceMappingURL=mobile_date_picker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile_date_picker.js","sources":["../../../../src/mobile/inputs/date_picker/mobile_date_picker.tsx"],"sourcesContent":["import { useSignalValue, useSignalValueEffect } from '@tcn/state';\nimport { Spacer } from '../../../stacks/spacer.js';\nimport { VStack } from '../../../stacks/v_stack.js';\nimport { clsx } from 'clsx';\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport { MobileDatePickerBody } from './mobile_date_picker_body.js';\nimport { MobileDatePickerHeader } from './mobile_date_picker_header.js';\nimport { DatePickerPresenter } from '../../../inputs/date_picker/date_picker_presenter.js';\nimport styles from './mobile_date_picker.module.css';\n\nexport interface MobileDatePickerProps {\n value: Date | null;\n disabled?: boolean;\n onChange?: (value: Date | null) => void;\n onError?: (error: string | null) => void;\n min?: Date | null;\n max?: Date | null;\n disabledDates?: Date[];\n countryCode?: string;\n renderActions?: (datePickerPresenter: DatePickerPresenter) => React.ReactNode;\n selectMonthMessage?: string;\n selectYearMessage?: string;\n}\n\nexport const MobileDatePicker = React.forwardRef(function MobileDatePicker(\n {\n value,\n disabled,\n onChange,\n onError,\n min: minDate = null,\n max: maxDate = null,\n disabledDates,\n countryCode = 'en-US',\n renderActions,\n selectMonthMessage,\n selectYearMessage,\n }: MobileDatePickerProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const isMountedRef = useRef(false);\n const [presenter] = useState(() => {\n const today = new Date();\n\n const year = value == null ? today.getFullYear() : value.getFullYear();\n const month = value == null ? today.getMonth() : value.getMonth();\n\n return new DatePickerPresenter(value, year, month, false);\n });\n\n const state = useSignalValue(presenter.stateBroadcast);\n const error = state.error;\n\n useSignalValueEffect<string | null>(innerError => {\n error !== innerError && onError && onError(innerError);\n }, presenter.errorBroadcast);\n\n useSignalValueEffect<Date | null>(value => {\n if (isMountedRef.current) {\n onChange && onChange(value);\n } else {\n isMountedRef.current = true;\n }\n }, presenter.valueBroadcast);\n\n useLayoutEffect(() => {\n presenter.initialize();\n }, [presenter]);\n\n useLayoutEffect(() => {\n presenter.setMinDate(minDate);\n }, [presenter, minDate]);\n\n useLayoutEffect(() => {\n presenter.setMaxDate(maxDate);\n }, [presenter, maxDate]);\n\n useLayoutEffect(() => {\n if (disabledDates == null) {\n presenter.setDisabledDates([]);\n } else {\n presenter.setDisabledDates(disabledDates);\n }\n }, [presenter, disabledDates]);\n\n useLayoutEffect(() => {\n presenter.selectDate(value);\n }, [presenter, value]);\n\n return (\n <VStack\n ref={ref}\n width=\"flex\"\n height=\"flex\"\n className={clsx(styles['mobile-date-picker'], 'tcn-mobile-date-picker')}\n tabIndex={0}\n >\n <VStack\n height=\"flex\"\n width=\"100%\"\n className={clsx(styles['mobile-date-picker-box'], 'tcn-mobile-date-picker-box')}\n data-is-disabled={disabled}\n >\n <VStack height=\"auto\" width=\"100%\">\n <MobileDatePickerHeader\n selectMonthMessage={selectMonthMessage}\n selectYearMessage={selectYearMessage}\n countryCode={countryCode}\n presenter={presenter}\n />\n <MobileDatePickerBody countryCode={countryCode} presenter={presenter} />\n </VStack>\n {renderActions && <VStack paddingInline=\"8px\">{renderActions(presenter)}</VStack>}\n <Spacer height=\"8px\" />\n </VStack>\n </VStack>\n );\n});\n"],"names":["MobileDatePicker","React","value","disabled","onChange","onError","minDate","maxDate","disabledDates","countryCode","renderActions","selectMonthMessage","selectYearMessage","ref","isMountedRef","useRef","presenter","useState","today","year","month","DatePickerPresenter","error","useSignalValue","useSignalValueEffect","innerError","useLayoutEffect","jsx","VStack","clsx","styles","jsxs","MobileDatePickerHeader","MobileDatePickerBody","Spacer"],"mappings":";;;;;;;;;8IAwBaA,IAAmBC,EAAM,WAAW,SAC/C;AAAA,EACE,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,KAAKC,IAAU;AAAA,EACf,KAAKC,IAAU;AAAA,EACf,eAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,eAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,mBAAAC;AACF,GACAC,GACA;AACA,QAAMC,IAAeC,EAAO,EAAK,GAC3B,CAACC,CAAS,IAAIC,EAAS,MAAM;AACjC,UAAMC,wBAAY,KAAA,GAEZC,IAAOjB,KAAS,OAAOgB,EAAM,YAAA,IAAgBhB,EAAM,YAAA,GACnDkB,IAAQlB,KAAS,OAAOgB,EAAM,SAAA,IAAahB,EAAM,SAAA;AAEvD,WAAO,IAAImB,EAAoBnB,GAAOiB,GAAMC,GAAO,EAAK;AAAA,EAC1D,CAAC,GAGKE,IADQC,EAAeP,EAAU,cAAc,EACjC;AAEpB,SAAAQ,EAAoC,CAAAC,MAAc;AAChD,IAAAH,MAAUG,KAAcpB,KAAWA,EAAQoB,CAAU;AAAA,EACvD,GAAGT,EAAU,cAAc,GAE3BQ,EAAkC,CAAAtB,MAAS;AACzC,IAAIY,EAAa,UACfV,KAAYA,EAASF,CAAK,IAE1BY,EAAa,UAAU;AAAA,EAE3B,GAAGE,EAAU,cAAc,GAE3BU,EAAgB,MAAM;AACpB,IAAAV,EAAU,WAAA;AAAA,EACZ,GAAG,CAACA,CAAS,CAAC,GAEdU,EAAgB,MAAM;AACpB,IAAAV,EAAU,WAAWV,CAAO;AAAA,EAC9B,GAAG,CAACU,GAAWV,CAAO,CAAC,GAEvBoB,EAAgB,MAAM;AACpB,IAAAV,EAAU,WAAWT,CAAO;AAAA,EAC9B,GAAG,CAACS,GAAWT,CAAO,CAAC,GAEvBmB,EAAgB,MAAM;AACpB,IAAIlB,KAAiB,OACnBQ,EAAU,iBAAiB,EAAE,IAE7BA,EAAU,iBAAiBR,CAAa;AAAA,EAE5C,GAAG,CAACQ,GAAWR,CAAa,CAAC,GAE7BkB,EAAgB,MAAM;AACpB,IAAAV,EAAU,WAAWd,CAAK;AAAA,EAC5B,GAAG,CAACc,GAAWd,CAAK,CAAC,GAGnB,gBAAAyB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAf;AAAA,MACA,OAAM;AAAA,MACN,QAAO;AAAA,MACP,WAAWgB,EAAKC,EAAO,oBAAoB,GAAG,wBAAwB;AAAA,MACtE,UAAU;AAAA,MAEV,UAAA,gBAAAC;AAAA,QAACH;AAAA,QAAA;AAAA,UACC,QAAO;AAAA,UACP,OAAM;AAAA,UACN,WAAWC,EAAKC,EAAO,wBAAwB,GAAG,4BAA4B;AAAA,UAC9E,oBAAkB3B;AAAA,UAElB,UAAA;AAAA,YAAA,gBAAA4B,EAACH,GAAA,EAAO,QAAO,QAAO,OAAM,QAC1B,UAAA;AAAA,cAAA,gBAAAD;AAAA,gBAACK;AAAA,gBAAA;AAAA,kBACC,oBAAArB;AAAA,kBACA,mBAAAC;AAAA,kBACA,aAAAH;AAAA,kBACA,WAAAO;AAAA,gBAAA;AAAA,cAAA;AAAA,cAEF,gBAAAW,EAACM,GAAA,EAAqB,aAAAxB,GAA0B,WAAAO,EAAA,CAAsB;AAAA,YAAA,GACxE;AAAA,YACCN,KAAiB,gBAAAiB,EAACC,GAAA,EAAO,eAAc,OAAO,UAAAlB,EAAcM,CAAS,GAAE;AAAA,YACxE,gBAAAW,EAACO,GAAA,EAAO,QAAO,MAAA,CAAM;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACvB;AAAA,EAAA;AAGN,CAAC;"}
@@ -0,0 +1,7 @@
1
+ import { DatePickerPresenter } from '../../../inputs/date_picker/date_picker_presenter.js';
2
+ export interface MobileDatePickerBodyProps {
3
+ presenter: DatePickerPresenter;
4
+ countryCode: string;
5
+ }
6
+ export declare function MobileDatePickerBody({ presenter, countryCode, }: MobileDatePickerBodyProps): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=mobile_date_picker_body.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile_date_picker_body.d.ts","sourceRoot":"","sources":["../../../../src/mobile/inputs/date_picker/mobile_date_picker_body.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAEhG,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,WAAW,GACZ,EAAE,yBAAyB,2CAsC3B"}
@@ -0,0 +1,35 @@
1
+ import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
+ import s from "react";
3
+ import { useSignalValue as f } from "@tcn/state";
4
+ import { HStack as h } from "../../../stacks/h_stack.js";
5
+ import { Spacer as c } from "../../../stacks/spacer.js";
6
+ import { VStack as u } from "../../../stacks/v_stack.js";
7
+ import { MobileDatePickerDate as d } from "./mobile_date_picker_date.js";
8
+ import { MobileDatePickerDay as g } from "./mobile_date_picker_day.js";
9
+ function P({
10
+ presenter: i,
11
+ countryCode: l
12
+ }) {
13
+ const { visibleDates: o } = f(i.stateBroadcast), a = [];
14
+ for (let t = 0; t < o.length; t += 7)
15
+ a.push(o.slice(t, t + 7));
16
+ return /* @__PURE__ */ m(u, { height: "auto", width: "100%", className: "tcn-mobile-date-picker-body", children: [
17
+ /* @__PURE__ */ e(h, { height: "auto", width: "100%", children: new Array(7).fill(0).map((t, r) => /* @__PURE__ */ e(
18
+ g,
19
+ {
20
+ countryCode: l,
21
+ dayOfTheWeek: r
22
+ },
23
+ r
24
+ )) }),
25
+ /* @__PURE__ */ e(c, { height: "2px" }),
26
+ a.map((t, r) => /* @__PURE__ */ m(s.Fragment, { children: [
27
+ /* @__PURE__ */ e(h, { height: "auto", width: "100%", children: t.map((p, n) => /* @__PURE__ */ e(d, { date: p, presenter: i }, n)) }, r),
28
+ /* @__PURE__ */ e(c, { height: "1px" })
29
+ ] }, r))
30
+ ] });
31
+ }
32
+ export {
33
+ P as MobileDatePickerBody
34
+ };
35
+ //# sourceMappingURL=mobile_date_picker_body.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile_date_picker_body.js","sources":["../../../../src/mobile/inputs/date_picker/mobile_date_picker_body.tsx"],"sourcesContent":["import React from 'react';\nimport { useSignalValue } from '@tcn/state';\nimport { HStack } from '../../../stacks/h_stack.js';\nimport { Spacer } from '../../../stacks/spacer.js';\nimport { VStack } from '../../../stacks/v_stack.js';\nimport type { CalendarDate } from '../../../utils/calendar/calendar_date.js';\nimport { MobileDatePickerDate } from './mobile_date_picker_date.js';\nimport { MobileDatePickerDay } from './mobile_date_picker_day.js';\nimport type { DatePickerPresenter } from '../../../inputs/date_picker/date_picker_presenter.js';\n\nexport interface MobileDatePickerBodyProps {\n presenter: DatePickerPresenter;\n countryCode: string;\n}\n\nexport function MobileDatePickerBody({\n presenter,\n countryCode,\n}: MobileDatePickerBodyProps) {\n const { visibleDates } = useSignalValue(presenter.stateBroadcast);\n const rows: CalendarDate[][] = [];\n\n for (let i = 0; i < visibleDates.length; i += 7) {\n rows.push(visibleDates.slice(i, i + 7));\n }\n\n return (\n <VStack height=\"auto\" width=\"100%\" className=\"tcn-mobile-date-picker-body\">\n <HStack height=\"auto\" width=\"100%\">\n {new Array(7).fill(0).map((_, index) => {\n return (\n <MobileDatePickerDay\n key={index}\n countryCode={countryCode}\n dayOfTheWeek={index}\n />\n );\n })}\n </HStack>\n <Spacer height=\"2px\" />\n {rows.map((dates, index) => {\n return (\n <React.Fragment key={index}>\n <HStack key={index} height=\"auto\" width=\"100%\">\n {dates.map((date, index) => {\n return (\n <MobileDatePickerDate key={index} date={date} presenter={presenter} />\n );\n })}\n </HStack>\n <Spacer height=\"1px\" />\n </React.Fragment>\n );\n })}\n </VStack>\n );\n}\n"],"names":["MobileDatePickerBody","presenter","countryCode","visibleDates","useSignalValue","rows","i","VStack","jsx","HStack","_","index","MobileDatePickerDay","Spacer","dates","jsxs","React","date","MobileDatePickerDate"],"mappings":";;;;;;;;AAeO,SAASA,EAAqB;AAAA,EACnC,WAAAC;AAAA,EACA,aAAAC;AACF,GAA8B;AAC5B,QAAM,EAAE,cAAAC,EAAA,IAAiBC,EAAeH,EAAU,cAAc,GAC1DI,IAAyB,CAAA;AAE/B,WAASC,IAAI,GAAGA,IAAIH,EAAa,QAAQG,KAAK;AAC5C,IAAAD,EAAK,KAAKF,EAAa,MAAMG,GAAGA,IAAI,CAAC,CAAC;AAGxC,2BACGC,GAAA,EAAO,QAAO,QAAO,OAAM,QAAO,WAAU,+BAC3C,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAO,QAAO,QAAO,OAAM,QACzB,UAAA,IAAI,MAAM,CAAC,EAAE,KAAK,CAAC,EAAE,IAAI,CAACC,GAAGC,MAE1B,gBAAAH;AAAA,MAACI;AAAA,MAAA;AAAA,QAEC,aAAAV;AAAA,QACA,cAAcS;AAAA,MAAA;AAAA,MAFTA;AAAA,IAAA,CAKV,EAAA,CACH;AAAA,IACA,gBAAAH,EAACK,GAAA,EAAO,QAAO,MAAA,CAAM;AAAA,IACpBR,EAAK,IAAI,CAACS,GAAOH,MAEd,gBAAAI,EAACC,EAAM,UAAN,EACC,UAAA;AAAA,MAAA,gBAAAR,EAACC,GAAA,EAAmB,QAAO,QAAO,OAAM,QACrC,UAAAK,EAAM,IAAI,CAACG,GAAMN,MAEd,gBAAAH,EAACU,GAAA,EAAiC,MAAAD,GAAY,WAAAhB,EAAA,GAAnBU,CAAyC,CAEvE,KALUA,CAMb;AAAA,MACA,gBAAAH,EAACK,GAAA,EAAO,QAAO,MAAA,CAAM;AAAA,IAAA,EAAA,GARFF,CASrB,CAEH;AAAA,EAAA,GACH;AAEJ;"}
@@ -0,0 +1,8 @@
1
+ import { CalendarDate } from '../../../utils/calendar/calendar_date.js';
2
+ import { DatePickerPresenter } from '../../../inputs/date_picker/date_picker_presenter.js';
3
+ export interface MobileDatePickerDateProps {
4
+ date: CalendarDate;
5
+ presenter: DatePickerPresenter;
6
+ }
7
+ export declare function MobileDatePickerDate({ presenter, date: calendarDate, }: MobileDatePickerDateProps): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=mobile_date_picker_date.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile_date_picker_date.d.ts","sourceRoot":"","sources":["../../../../src/mobile/inputs/date_picker/mobile_date_picker_date.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAIhG,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,mBAAmB,CAAC;CAChC;AAED,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,IAAI,EAAE,YAAY,GACnB,EAAE,yBAAyB,2CAqF3B"}
@@ -0,0 +1,74 @@
1
+ import { jsx as a, jsxs as T } from "react/jsx-runtime";
2
+ import { useSignalValue as b } from "@tcn/state";
3
+ import { BodyText as w } from "../../../typography/body_text/body_text.js";
4
+ import "../../../typography/callout/callout.js";
5
+ import "../../../typography/caption/caption.js";
6
+ import "../../../typography/footnote/footnote.js";
7
+ import "../../../typography/headline/headline.js";
8
+ import "../../../typography/subheadline/subheadline.js";
9
+ import "../../../typography/title/title.js";
10
+ import { ZStack as M } from "../../../stacks/z_stack.js";
11
+ import { clsx as u } from "clsx";
12
+ import '../../../mobile_date_picker_date.css';const D = "_mobile-date-picker-date_96ddea0", B = "_mobile-date-picker-today_36627c6", k = { "mobile-date-picker-date": D, "mobile-date-picker-today": B };
13
+ function C({
14
+ presenter: i,
15
+ date: t
16
+ }) {
17
+ const {
18
+ visibleMonth: f,
19
+ disabledDates: S,
20
+ min: m,
21
+ max: d
22
+ } = b(i.stateBroadcast), o = b(i.valueBroadcast);
23
+ let r = -1 / 0, c = 1 / 0;
24
+ if (m != null) {
25
+ const e = new Date(m);
26
+ e.setHours(0, 0, 0, 0), r = e.getTime();
27
+ }
28
+ if (d != null) {
29
+ const e = new Date(d);
30
+ e.setHours(23, 59, 59, 999), c = e.getTime();
31
+ }
32
+ const s = /* @__PURE__ */ new Date(), l = new Date(
33
+ t.year,
34
+ t.month,
35
+ t.date
36
+ ).getTime(), g = f === t.month, n = o?.getMonth() === t.month && o.getFullYear() === t.year && o.getDate() === t.date, h = S.some(
37
+ (e) => e.getMonth() === t.month && e.getFullYear() === t.year && e.getDate() === t.date
38
+ ), p = l >= r && l < c, y = s.getMonth() === t.month && s.getFullYear() === t.year && s.getDate() === t.date;
39
+ function x() {
40
+ const e = new Date(t.year, t.month, t.date);
41
+ if (n && i.stateBroadcast.get().showTime) {
42
+ i.clear();
43
+ return;
44
+ }
45
+ i.selectDate(e);
46
+ }
47
+ return /* @__PURE__ */ a(
48
+ "button",
49
+ {
50
+ disabled: !g || h || !p,
51
+ className: u(k["mobile-date-picker-date"], "tcn-date-picker-date"),
52
+ onClick: x,
53
+ "data-is-within-month": String(g),
54
+ "data-is-selected": String(n),
55
+ "data-is-disabled": String(h),
56
+ "data-is-within-range": String(p),
57
+ "data-is-today": String(y),
58
+ children: /* @__PURE__ */ T(M, { height: "100%", children: [
59
+ /* @__PURE__ */ a(w, { children: String(t.date) }),
60
+ y && /* @__PURE__ */ a(
61
+ "div",
62
+ {
63
+ className: u(k["mobile-date-picker-today"], "tcn-date-picker-today"),
64
+ "data-is-selected": String(n)
65
+ }
66
+ )
67
+ ] })
68
+ }
69
+ );
70
+ }
71
+ export {
72
+ C as MobileDatePickerDate
73
+ };
74
+ //# sourceMappingURL=mobile_date_picker_date.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile_date_picker_date.js","sources":["../../../../src/mobile/inputs/date_picker/mobile_date_picker_date.tsx"],"sourcesContent":["import { useSignalValue } from '@tcn/state';\nimport { BodyText } from '../../../typography/index.js';\nimport { ZStack } from '../../../stacks/z_stack.js';\nimport type { CalendarDate } from '../../../utils/calendar/calendar_date.js';\nimport type { DatePickerPresenter } from '../../../inputs/date_picker/date_picker_presenter.js';\nimport styles from './mobile_date_picker_date.module.css';\nimport { clsx } from 'clsx';\n\nexport interface MobileDatePickerDateProps {\n date: CalendarDate;\n presenter: DatePickerPresenter;\n}\n\nexport function MobileDatePickerDate({\n presenter,\n date: calendarDate,\n}: MobileDatePickerDateProps) {\n const {\n visibleMonth,\n disabledDates,\n min: minDate,\n max: maxDate,\n } = useSignalValue(presenter.stateBroadcast);\n const selectedDate = useSignalValue(presenter.valueBroadcast);\n\n let minTime = -Infinity;\n let maxTime = Infinity;\n\n if (minDate != null) {\n const normalizedMinDate = new Date(minDate);\n normalizedMinDate.setHours(0, 0, 0, 0);\n minTime = normalizedMinDate.getTime();\n }\n\n if (maxDate != null) {\n const normalizedMaxDate = new Date(maxDate);\n normalizedMaxDate.setHours(23, 59, 59, 999);\n maxTime = normalizedMaxDate.getTime();\n }\n\n const date = new Date();\n\n const time = new Date(\n calendarDate.year,\n calendarDate.month,\n calendarDate.date\n ).getTime();\n\n const isWithinMonth = visibleMonth === calendarDate.month;\n\n const isSelected =\n selectedDate?.getMonth() === calendarDate.month &&\n selectedDate.getFullYear() === calendarDate.year &&\n selectedDate.getDate() === calendarDate.date;\n\n const isDisabled = disabledDates.some(\n d =>\n d.getMonth() === calendarDate.month &&\n d.getFullYear() === calendarDate.year &&\n d.getDate() === calendarDate.date\n );\n\n const isWithinRange = time >= minTime && time < maxTime;\n const isToday =\n date.getMonth() === calendarDate.month &&\n date.getFullYear() === calendarDate.year &&\n date.getDate() === calendarDate.date;\n\n function select() {\n const date = new Date(calendarDate.year, calendarDate.month, calendarDate.date);\n\n if (isSelected && presenter.stateBroadcast.get().showTime) {\n presenter.clear();\n return;\n }\n\n presenter.selectDate(date);\n }\n\n return (\n <button\n disabled={!isWithinMonth || isDisabled || !isWithinRange}\n className={clsx(styles['mobile-date-picker-date'], 'tcn-date-picker-date')}\n onClick={select}\n data-is-within-month={String(isWithinMonth)}\n data-is-selected={String(isSelected)}\n data-is-disabled={String(isDisabled)}\n data-is-within-range={String(isWithinRange)}\n data-is-today={String(isToday)}\n >\n <ZStack height=\"100%\">\n <BodyText>{String(calendarDate.date)}</BodyText>\n {isToday && (\n <div\n className={clsx(styles['mobile-date-picker-today'], 'tcn-date-picker-today')}\n data-is-selected={String(isSelected)}\n ></div>\n )}\n </ZStack>\n </button>\n );\n}\n"],"names":["MobileDatePickerDate","presenter","calendarDate","visibleMonth","disabledDates","minDate","maxDate","useSignalValue","selectedDate","minTime","maxTime","normalizedMinDate","normalizedMaxDate","date","time","isWithinMonth","isSelected","isDisabled","d","isWithinRange","isToday","select","jsx","clsx","styles","jsxs","ZStack","BodyText"],"mappings":";;;;;;;;;;;;AAaO,SAASA,EAAqB;AAAA,EACnC,WAAAC;AAAA,EACA,MAAMC;AACR,GAA8B;AAC5B,QAAM;AAAA,IACJ,cAAAC;AAAA,IACA,eAAAC;AAAA,IACA,KAAKC;AAAA,IACL,KAAKC;AAAA,EAAA,IACHC,EAAeN,EAAU,cAAc,GACrCO,IAAeD,EAAeN,EAAU,cAAc;AAE5D,MAAIQ,IAAU,QACVC,IAAU;AAEd,MAAIL,KAAW,MAAM;AACnB,UAAMM,IAAoB,IAAI,KAAKN,CAAO;AAC1C,IAAAM,EAAkB,SAAS,GAAG,GAAG,GAAG,CAAC,GACrCF,IAAUE,EAAkB,QAAA;AAAA,EAC9B;AAEA,MAAIL,KAAW,MAAM;AACnB,UAAMM,IAAoB,IAAI,KAAKN,CAAO;AAC1C,IAAAM,EAAkB,SAAS,IAAI,IAAI,IAAI,GAAG,GAC1CF,IAAUE,EAAkB,QAAA;AAAA,EAC9B;AAEA,QAAMC,wBAAW,KAAA,GAEXC,IAAO,IAAI;AAAA,IACfZ,EAAa;AAAA,IACbA,EAAa;AAAA,IACbA,EAAa;AAAA,EAAA,EACb,QAAA,GAEIa,IAAgBZ,MAAiBD,EAAa,OAE9Cc,IACJR,GAAc,SAAA,MAAeN,EAAa,SAC1CM,EAAa,YAAA,MAAkBN,EAAa,QAC5CM,EAAa,QAAA,MAAcN,EAAa,MAEpCe,IAAab,EAAc;AAAA,IAC/B,CAAAc,MACEA,EAAE,SAAA,MAAehB,EAAa,SAC9BgB,EAAE,YAAA,MAAkBhB,EAAa,QACjCgB,EAAE,QAAA,MAAchB,EAAa;AAAA,EAAA,GAG3BiB,IAAgBL,KAAQL,KAAWK,IAAOJ,GAC1CU,IACJP,EAAK,SAAA,MAAeX,EAAa,SACjCW,EAAK,YAAA,MAAkBX,EAAa,QACpCW,EAAK,QAAA,MAAcX,EAAa;AAElC,WAASmB,IAAS;AAChB,UAAMR,IAAO,IAAI,KAAKX,EAAa,MAAMA,EAAa,OAAOA,EAAa,IAAI;AAE9E,QAAIc,KAAcf,EAAU,eAAe,IAAA,EAAM,UAAU;AACzD,MAAAA,EAAU,MAAA;AACV;AAAA,IACF;AAEA,IAAAA,EAAU,WAAWY,CAAI;AAAA,EAC3B;AAEA,SACE,gBAAAS;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,UAAU,CAACP,KAAiBE,KAAc,CAACE;AAAA,MAC3C,WAAWI,EAAKC,EAAO,yBAAyB,GAAG,sBAAsB;AAAA,MACzE,SAASH;AAAA,MACT,wBAAsB,OAAON,CAAa;AAAA,MAC1C,oBAAkB,OAAOC,CAAU;AAAA,MACnC,oBAAkB,OAAOC,CAAU;AAAA,MACnC,wBAAsB,OAAOE,CAAa;AAAA,MAC1C,iBAAe,OAAOC,CAAO;AAAA,MAE7B,UAAA,gBAAAK,EAACC,GAAA,EAAO,QAAO,QACb,UAAA;AAAA,QAAA,gBAAAJ,EAACK,GAAA,EAAU,UAAA,OAAOzB,EAAa,IAAI,GAAE;AAAA,QACpCkB,KACC,gBAAAE;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWC,EAAKC,EAAO,0BAA0B,GAAG,uBAAuB;AAAA,YAC3E,oBAAkB,OAAOR,CAAU;AAAA,UAAA;AAAA,QAAA;AAAA,MACpC,EAAA,CAEL;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -0,0 +1,6 @@
1
+ export interface MobileDatePickerDayProps {
2
+ dayOfTheWeek: number;
3
+ countryCode: string;
4
+ }
5
+ export declare function MobileDatePickerDay({ dayOfTheWeek, countryCode, }: MobileDatePickerDayProps): import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=mobile_date_picker_day.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile_date_picker_day.d.ts","sourceRoot":"","sources":["../../../../src/mobile/inputs/date_picker/mobile_date_picker_day.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,YAAY,EACZ,WAAW,GACZ,EAAE,wBAAwB,2CAyB1B"}
@@ -0,0 +1,39 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import "../../../typography/body_text/body_text.js";
3
+ import "../../../typography/callout/callout.js";
4
+ import "../../../typography/caption/caption.js";
5
+ import "../../../typography/footnote/footnote.js";
6
+ import { Headline as c } from "../../../typography/headline/headline.js";
7
+ import "../../../typography/subheadline/subheadline.js";
8
+ import "../../../typography/title/title.js";
9
+ import { ZStack as p } from "../../../stacks/z_stack.js";
10
+ import { useMemo as s } from "react";
11
+ import { clsx as i } from "clsx";
12
+ import '../../../mobile_date_picker_day.css';const d = "_mobile-date-picker-day_562fbf3", o = { "mobile-date-picker-day": d };
13
+ function g({
14
+ dayOfTheWeek: r,
15
+ countryCode: t
16
+ }) {
17
+ const e = /* @__PURE__ */ new Date();
18
+ e.setDate(e.getDate() - e.getDay() + r);
19
+ const m = s(
20
+ () => new Intl.DateTimeFormat(t, { weekday: "short" }).format(e).toLocaleUpperCase(),
21
+ [t, e]
22
+ );
23
+ return /* @__PURE__ */ a(p, { className: i(o["mobile-date-picker-day"], "tcn-date-picker-day"), children: /* @__PURE__ */ a(
24
+ c,
25
+ {
26
+ size: "sm",
27
+ emphasis: "faint",
28
+ className: i(
29
+ o["mobile-date-picker-day-text"],
30
+ "tcn-date-picker-day-text"
31
+ ),
32
+ children: m[0]
33
+ }
34
+ ) });
35
+ }
36
+ export {
37
+ g as MobileDatePickerDay
38
+ };
39
+ //# sourceMappingURL=mobile_date_picker_day.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile_date_picker_day.js","sources":["../../../../src/mobile/inputs/date_picker/mobile_date_picker_day.tsx"],"sourcesContent":["import { Headline } from '../../../typography/index.js';\nimport { ZStack } from '../../../stacks/z_stack.js';\nimport { useMemo } from 'react';\nimport styles from './mobile_date_picker_day.module.css';\nimport { clsx } from 'clsx';\n\nexport interface MobileDatePickerDayProps {\n dayOfTheWeek: number;\n countryCode: string;\n}\n\nexport function MobileDatePickerDay({\n dayOfTheWeek,\n countryCode,\n}: MobileDatePickerDayProps) {\n const date = new Date();\n date.setDate(date.getDate() - date.getDay() + dayOfTheWeek);\n const weekdayName = useMemo(\n () =>\n new Intl.DateTimeFormat(countryCode, { weekday: 'short' })\n .format(date)\n .toLocaleUpperCase(),\n [countryCode, date]\n );\n\n return (\n <ZStack className={clsx(styles['mobile-date-picker-day'], 'tcn-date-picker-day')}>\n <Headline\n size=\"sm\"\n emphasis=\"faint\"\n className={clsx(\n styles['mobile-date-picker-day-text'],\n 'tcn-date-picker-day-text'\n )}\n >\n {weekdayName[0]}\n </Headline>\n </ZStack>\n );\n}\n"],"names":["MobileDatePickerDay","dayOfTheWeek","countryCode","date","weekdayName","useMemo","jsx","ZStack","clsx","styles","Headline"],"mappings":";;;;;;;;;;;;AAWO,SAASA,EAAoB;AAAA,EAClC,cAAAC;AAAA,EACA,aAAAC;AACF,GAA6B;AAC3B,QAAMC,wBAAW,KAAA;AACjB,EAAAA,EAAK,QAAQA,EAAK,QAAA,IAAYA,EAAK,OAAA,IAAWF,CAAY;AAC1D,QAAMG,IAAcC;AAAA,IAClB,MACE,IAAI,KAAK,eAAeH,GAAa,EAAE,SAAS,QAAA,CAAS,EACtD,OAAOC,CAAI,EACX,kBAAA;AAAA,IACL,CAACD,GAAaC,CAAI;AAAA,EAAA;AAGpB,SACE,gBAAAG,EAACC,KAAO,WAAWC,EAAKC,EAAO,wBAAwB,GAAG,qBAAqB,GAC7E,UAAA,gBAAAH;AAAA,IAACI;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAS;AAAA,MACT,WAAWF;AAAA,QACTC,EAAO,6BAA6B;AAAA,QACpC;AAAA,MAAA;AAAA,MAGD,YAAY,CAAC;AAAA,IAAA;AAAA,EAAA,GAElB;AAEJ;"}
@@ -0,0 +1,9 @@
1
+ import { DatePickerPresenter } from '../../../inputs/date_picker/date_picker_presenter.js';
2
+ export interface MobileDatePickerHeaderProps {
3
+ presenter: DatePickerPresenter;
4
+ countryCode: string;
5
+ selectMonthMessage?: string;
6
+ selectYearMessage?: string;
7
+ }
8
+ export declare function MobileDatePickerHeader({ presenter, countryCode, selectMonthMessage, selectYearMessage, }: MobileDatePickerHeaderProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=mobile_date_picker_header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile_date_picker_header.d.ts","sourceRoot":"","sources":["../../../../src/mobile/inputs/date_picker/mobile_date_picker_header.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAW3F,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,mBAAmB,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,WAAW,EACX,kBAAmC,EACnC,iBAAiC,GAClC,EAAE,2BAA2B,2CAsJ7B"}
@@ -0,0 +1,163 @@
1
+ import { jsxs as i, Fragment as I, jsx as e } from "react/jsx-runtime";
2
+ import { useSignalValue as L } from "@tcn/state";
3
+ import { HStack as M } from "../../../stacks/h_stack.js";
4
+ import { VStack as h } from "../../../stacks/v_stack.js";
5
+ import { Spacer as v } from "../../../stacks/spacer.js";
6
+ import { useState as k, useRef as d, useMemo as g } from "react";
7
+ import { getMonthsOfYear as w } from "../../../utils/calendar/get_months_of_year.js";
8
+ import { MobileDatePickerYearSelector as j } from "./mobile_date_picker_year_selector.js";
9
+ import { MobileButton as n } from "../../actions/button/mobile_button.js";
10
+ import { MobilePortal as x } from "../../portal/mobile_portal.js";
11
+ import { MobileOverlayHeader as O } from "./mobile_overlay_header.js";
12
+ import "../../../utils/click_away_listener.js";
13
+ import { FocusRedirect as q } from "../../../utils/focus_redirect.js";
14
+ import "../../../utils/scroll_away_listener.js";
15
+ import "../../../utils/hooks/use_resize_observer.js";
16
+ import "../../../utils/dnd/context.js";
17
+ import { clsx as z } from "clsx";
18
+ import "../../../draggable.module-BgelQsuJ.js";
19
+ import { ChevronLeftIcon as E } from "@tcn/icons/chevron_left_icon.js";
20
+ import { ChevronRightIcon as T } from "@tcn/icons/chevron_right_icon.js";
21
+ import '../../../mobile_date_picker_header.css';const W = "_mobile-date-picker-header_0678759", G = "_mobile-date-picker-overlay_d1d8dc4", J = "_mobile-month-list_1081f6a", Q = "_mobile-year-overlay_daba362", l = { "mobile-date-picker-header": W, "mobile-date-picker-overlay": G, "mobile-month-list": J, "mobile-year-overlay": Q };
22
+ function be({
23
+ presenter: r,
24
+ countryCode: a,
25
+ selectMonthMessage: R = "Select Month",
26
+ selectYearMessage: S = "Select Year"
27
+ }) {
28
+ const t = L(r.stateBroadcast), [Y, f] = k(!1), [D, p] = k(!1), u = d(null), b = d(null), y = d(null), N = g(() => w(a, "long"), [a]), _ = g(() => w(a, "short"), [a]);
29
+ function C(o) {
30
+ r.setVisibleMonth(Number(o));
31
+ }
32
+ function P() {
33
+ r.setVisibleMonth(t.visibleMonth - 1);
34
+ }
35
+ function V() {
36
+ r.setVisibleMonth(t.visibleMonth + 1);
37
+ }
38
+ function B() {
39
+ f(!0);
40
+ }
41
+ function c() {
42
+ f(!1), requestAnimationFrame(() => u.current?.focus());
43
+ }
44
+ function F() {
45
+ p(!0);
46
+ }
47
+ function s() {
48
+ p(!1), requestAnimationFrame(() => b.current?.focus());
49
+ }
50
+ function H(o) {
51
+ o.key === "Escape" && c();
52
+ }
53
+ function K(o) {
54
+ o.key === "Escape" && s();
55
+ }
56
+ function A() {
57
+ y.current?.focus();
58
+ }
59
+ return /* @__PURE__ */ i(I, { children: [
60
+ /* @__PURE__ */ i(
61
+ M,
62
+ {
63
+ className: z(
64
+ l["mobile-date-picker-header"],
65
+ "tcn-mobile-date-picker-header"
66
+ ),
67
+ minWidth: "35px",
68
+ width: "100%",
69
+ children: [
70
+ /* @__PURE__ */ e(
71
+ n,
72
+ {
73
+ disabled: !t.canNavigateToPreviousMonth,
74
+ hierarchy: "tertiary",
75
+ width: "auto",
76
+ onClick: P,
77
+ children: /* @__PURE__ */ e(E, { flipOnRtl: !0, size: "md" })
78
+ }
79
+ ),
80
+ /* @__PURE__ */ e(v, {}),
81
+ /* @__PURE__ */ i(M, { hAlign: "center", gap: "4px", width: "auto", children: [
82
+ /* @__PURE__ */ e(
83
+ n,
84
+ {
85
+ ref: u,
86
+ hierarchy: "tertiary",
87
+ width: "auto",
88
+ onClick: B,
89
+ children: _[t.visibleMonth]
90
+ }
91
+ ),
92
+ /* @__PURE__ */ e(
93
+ n,
94
+ {
95
+ ref: b,
96
+ hierarchy: "tertiary",
97
+ width: "auto",
98
+ onClick: F,
99
+ children: String(t.visibleYear)
100
+ }
101
+ )
102
+ ] }),
103
+ /* @__PURE__ */ e(v, {}),
104
+ /* @__PURE__ */ e(
105
+ n,
106
+ {
107
+ disabled: !t.canNavigateToNextMonth,
108
+ hierarchy: "tertiary",
109
+ width: "auto",
110
+ onClick: V,
111
+ children: /* @__PURE__ */ e(T, { flipOnRtl: !0, size: "md" })
112
+ }
113
+ )
114
+ ]
115
+ }
116
+ ),
117
+ Y && /* @__PURE__ */ e(x, { children: /* @__PURE__ */ i(
118
+ h,
119
+ {
120
+ className: l["mobile-date-picker-overlay"],
121
+ onKeyDown: H,
122
+ children: [
123
+ /* @__PURE__ */ e(O, { title: R, onClose: c }),
124
+ /* @__PURE__ */ i(
125
+ h,
126
+ {
127
+ ref: y,
128
+ tabIndex: 0,
129
+ padding: "16px",
130
+ gap: "8px",
131
+ height: "flex",
132
+ overflowY: "auto",
133
+ className: l["mobile-month-list"],
134
+ children: [
135
+ N.map((o, m) => /* @__PURE__ */ e(
136
+ n,
137
+ {
138
+ hierarchy: m === t.visibleMonth ? "primary" : "secondary",
139
+ width: "100%",
140
+ onClick: () => {
141
+ C(String(m)), c();
142
+ },
143
+ children: o
144
+ },
145
+ m
146
+ )),
147
+ /* @__PURE__ */ e(q, { onRedirect: A })
148
+ ]
149
+ }
150
+ )
151
+ ]
152
+ }
153
+ ) }),
154
+ D && /* @__PURE__ */ e(x, { children: /* @__PURE__ */ i(h, { className: l["mobile-year-overlay"], onKeyDown: K, children: [
155
+ /* @__PURE__ */ e(O, { title: S, onClose: s }),
156
+ /* @__PURE__ */ e(j, { presenter: r, onClose: s })
157
+ ] }) })
158
+ ] });
159
+ }
160
+ export {
161
+ be as MobileDatePickerHeader
162
+ };
163
+ //# sourceMappingURL=mobile_date_picker_header.js.map