@ryuzaki13/react-foundation-ui 1.1.6 → 1.1.8

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 (245) hide show
  1. package/dist/advanced-search/index.js +136 -136
  2. package/dist/base-table/index.js +2 -2
  3. package/dist/chunks/{CalendarView-C0gJvre1.js → CalendarView-KCkhCtK-.js} +101 -101
  4. package/dist/chunks/{CalendarView-C0gJvre1.js.map → CalendarView-KCkhCtK-.js.map} +1 -1
  5. package/dist/chunks/SelectOptionContent-CI7wq9Oi.js +27 -0
  6. package/dist/chunks/SelectOptionContent-CI7wq9Oi.js.map +1 -0
  7. package/dist/chunks/{TextEditorLexicalClient-DYZ32dnX.js → TextEditorLexicalClient-DeBA6fQX.js} +157 -157
  8. package/dist/chunks/{TextEditorLexicalClient-DYZ32dnX.js.map → TextEditorLexicalClient-DeBA6fQX.js.map} +1 -1
  9. package/dist/chunks/{base-table-BXKFSgIk.js → base-table-Dv9i3CAT.js} +73 -73
  10. package/dist/chunks/{base-table-BXKFSgIk.js.map → base-table-Dv9i3CAT.js.map} +1 -1
  11. package/dist/chunks/{date-input-DKkW7_uw.js → date-input-DT9E8dhk.js} +44 -44
  12. package/dist/chunks/{date-input-DKkW7_uw.js.map → date-input-DT9E8dhk.js.map} +1 -1
  13. package/dist/chunks/{date-range-preset-select-UgsfaOeM.js → date-range-preset-select-BLnY47cv.js} +20 -20
  14. package/dist/chunks/{date-range-preset-select-UgsfaOeM.js.map → date-range-preset-select-BLnY47cv.js.map} +1 -1
  15. package/dist/chunks/{input-CZLUUggm.js → input-BCJfUdK_.js} +43 -43
  16. package/dist/chunks/{input-CZLUUggm.js.map → input-BCJfUdK_.js.map} +1 -1
  17. package/dist/chunks/{input-files-aB8iaqGk.js → input-files-Dcc5K-_1.js} +2 -2
  18. package/dist/chunks/{input-files-aB8iaqGk.js.map → input-files-Dcc5K-_1.js.map} +1 -1
  19. package/dist/chunks/{input-search-eMvnvgV0.js → input-search-B7HmrAM7.js} +2 -2
  20. package/dist/chunks/{input-search-eMvnvgV0.js.map → input-search-B7HmrAM7.js.map} +1 -1
  21. package/dist/chunks/misc-DIF5h9ba.js.map +1 -1
  22. package/dist/chunks/{multi-select-DaOKgHKE.js → multi-select-BCpRct-k.js} +105 -104
  23. package/dist/chunks/{multi-select-DaOKgHKE.js.map → multi-select-BCpRct-k.js.map} +1 -1
  24. package/dist/chunks/{picker-BZ05h_ZJ.js → picker-DTZk09Ag.js} +27 -27
  25. package/dist/chunks/{picker-BZ05h_ZJ.js.map → picker-DTZk09Ag.js.map} +1 -1
  26. package/dist/chunks/select-Bd48kVI3.js +328 -0
  27. package/dist/chunks/{select-Dj3FfpS0.js.map → select-Bd48kVI3.js.map} +1 -1
  28. package/dist/chunks/{table-BdpMzhLH.js → table-BtXVqa2I.js} +10 -10
  29. package/dist/chunks/{table-BdpMzhLH.js.map → table-BtXVqa2I.js.map} +1 -1
  30. package/dist/chunks/{table-column-interactions-6RGjmiI5.js → table-column-interactions-BGd5Lwy9.js} +19 -19
  31. package/dist/chunks/{table-column-interactions-6RGjmiI5.js.map → table-column-interactions-BGd5Lwy9.js.map} +1 -1
  32. package/dist/chunks/{useODataSelectBase-BxAvhDww.js → useODataSelectBase-wZ07hQFv.js} +10 -10
  33. package/dist/chunks/{useODataSelectBase-BxAvhDww.js.map → useODataSelectBase-wZ07hQFv.js.map} +1 -1
  34. package/dist/date-input/index.js +2 -2
  35. package/dist/date-range-preset-select/index.js +1 -1
  36. package/dist/date-time-input/index.js +41 -41
  37. package/dist/drop-zone/index.js +1 -1
  38. package/dist/errors/index.js +39 -39
  39. package/dist/image/index.js +2 -2
  40. package/dist/input/index.js +1 -1
  41. package/dist/input-date-time/index.js +1 -1
  42. package/dist/input-file/index.js +1 -1
  43. package/dist/input-files/index.js +1 -1
  44. package/dist/input-image/index.js +1 -1
  45. package/dist/input-search/index.js +1 -1
  46. package/dist/layout-picker/index.js +1 -1
  47. package/dist/multi-select/index.js +1 -1
  48. package/dist/notifications/index.js +26 -26
  49. package/dist/period-select/index.js +19 -19
  50. package/dist/picker/index.js +1 -1
  51. package/dist/preset-range-date-input/index.js +2 -2
  52. package/dist/preset-select/index.js +1 -1
  53. package/dist/select/index.js +1 -1
  54. package/dist/simple-table/index.js +1 -1
  55. package/dist/slider/index.js +312 -312
  56. package/dist/slider/index.js.map +1 -1
  57. package/dist/state-select/index.js +14 -14
  58. package/dist/styles.css +1 -1
  59. package/dist/table/index.js +1 -1
  60. package/dist/table-column-interactions/index.js +1 -1
  61. package/dist/tag-input/index.js +1 -1
  62. package/dist/text/index.js +10 -10
  63. package/dist/text-editor/index.js +1 -1
  64. package/dist/textarea/index.js +1 -1
  65. package/dist/tree-select/index.js +240 -239
  66. package/dist/tree-select/index.js.map +1 -1
  67. package/dist/tree-table/index.js +15 -15
  68. package/package.json +2 -1
  69. package/storybook-static/assets/{Badge-DTbZvGvY.js → Badge-Dn74JUF_.js} +1 -1
  70. package/storybook-static/assets/{Badge.stories-C0FRO6mR.js → Badge.stories-0f2dBkFF.js} +1 -1
  71. package/storybook-static/assets/{Button-CwOxcrRy.js → Button-C1TJgYBn.js} +1 -1
  72. package/storybook-static/assets/{Button-DBvM6sOi.js → Button-DDo_z6nQ.js} +1 -1
  73. package/storybook-static/assets/{Button.stories-wRxT1tys.js → Button.stories-CEhM2nmB.js} +1 -1
  74. package/storybook-static/assets/{CheckBox-6vNLr5mN.js → CheckBox-Brecn2Go.js} +1 -1
  75. package/storybook-static/assets/{CheckBox-B2PYacPl.js → CheckBox-Dou46_Q2.js} +1 -1
  76. package/storybook-static/assets/{CheckBox.stories-BsgDlKB1.js → CheckBox.stories-BX0rAtSE.js} +1 -1
  77. package/storybook-static/assets/{Color-KMSTOMOX-CSNKZs5h.js → Color-KMSTOMOX-BWvVg2h-.js} +1 -1
  78. package/storybook-static/assets/{ContextMenu-BrkKv7rm.js → ContextMenu-wm9Jh9ZJ.js} +1 -1
  79. package/storybook-static/assets/{ContextMenu.stories-Bu0PKs77.js → ContextMenu.stories-BNgeqlBC.js} +1 -1
  80. package/storybook-static/assets/{DateInput-Dk6Oy1Y5.js → DateInput-BvCdgET8.js} +1 -1
  81. package/storybook-static/assets/{DateInput-CpD5ET6Z.js → DateInput-C4POi6jK.js} +1 -1
  82. package/storybook-static/assets/{DateInput.stories-PxSyhXdr.js → DateInput.stories-Co44UsPz.js} +1 -1
  83. package/storybook-static/assets/{DateRangePresetSelect-DngfCkUZ.js → DateRangePresetSelect-CFRcBK8Q.js} +1 -1
  84. package/storybook-static/assets/{DateRangePresetSelect-Y_jVJn8B.js → DateRangePresetSelect-DS2LFGpx.js} +1 -1
  85. package/storybook-static/assets/{DateRangePresetSelect.stories-C8lPJh_i.js → DateRangePresetSelect.stories-Bw2wid1f.js} +1 -1
  86. package/storybook-static/assets/{Detail-VfH3Ddln.js → Detail-DRVWmbKj.js} +1 -1
  87. package/storybook-static/assets/{Detail.stories-HC_fB5JL.js → Detail.stories-DiPu8idx.js} +1 -1
  88. package/storybook-static/assets/{Dialog-BqF8Stct.js → Dialog-DWwwmwKU.js} +1 -1
  89. package/storybook-static/assets/{Dialog.stories-CZREWQ1k.js → Dialog.stories-H65hC3at.js} +1 -1
  90. package/storybook-static/assets/{Disclosure-DdQCtfOv.js → Disclosure-DXCJIvn2.js} +1 -1
  91. package/storybook-static/assets/{Disclosure.stories-BipF9KGl.js → Disclosure.stories-BtvyHQlf.js} +1 -1
  92. package/storybook-static/assets/{DocsRenderer-JROSPFPF-C_tirLBz.js → DocsRenderer-JROSPFPF-BIOn2Yw2.js} +2 -2
  93. package/storybook-static/assets/{DropZone-GYL3kQCI.js → DropZone-B5GgSTT6.js} +1 -1
  94. package/storybook-static/assets/{DropZone.stories-CruH4C9l.js → DropZone.stories-DXQz-psy.js} +1 -1
  95. package/storybook-static/assets/{DropdownMenu-E1ylGqL9.js → DropdownMenu-DiCKdtJQ.js} +1 -1
  96. package/storybook-static/assets/{ExpandableActionPanel.stories-BBsU-gui.js → ExpandableActionPanel.stories--iDMcu7P.js} +1 -1
  97. package/storybook-static/assets/{Flex-C6fgzqXv.js → Flex-COhmAKNn.js} +1 -1
  98. package/storybook-static/assets/{Flex-DMLdHG7d.js → Flex-Cl2bB8Po.js} +1 -1
  99. package/storybook-static/assets/{Flex.stories-CP5WdLD3.js → Flex.stories-DMuAAT19.js} +1 -1
  100. package/storybook-static/assets/{Grid-p6sY7en9.js → Grid-Df08ACJK.js} +1 -1
  101. package/storybook-static/assets/{Grid-DzBMbNYT.js → Grid-PM5n8eI2.js} +1 -1
  102. package/storybook-static/assets/{Grid.stories-rHEEhmA4.js → Grid.stories-Do5Od8Vw.js} +1 -1
  103. package/storybook-static/assets/{ImageCropper.stories-DXzbQ5FJ.js → ImageCropper.stories-EvtSYfKt.js} +1 -1
  104. package/storybook-static/assets/{ImageRenderer-CPYOOx0n.js → ImageRenderer-B2AC5NZh.js} +1 -1
  105. package/storybook-static/assets/{ImageRenderer.stories-B5a4BoWt.js → ImageRenderer.stories-DzFi_sDQ.js} +1 -1
  106. package/storybook-static/assets/{ImageView.stories-sTO611LR.js → ImageView.stories-B1g_OpL2.js} +1 -1
  107. package/storybook-static/assets/{ImageViewer.stories-CwIqVtTH.js → ImageViewer.stories-b0cFqboR.js} +2 -2
  108. package/storybook-static/assets/{ImageViewerRuntime-CkiRw9AS.js → ImageViewerRuntime-D_IBJyiC.js} +1 -1
  109. package/storybook-static/assets/{Input-Cgz-Bx_e.js → Input-CyGgeUCG.js} +1 -1
  110. package/storybook-static/assets/{Input-JhUvY-Jm.js → Input-y5ZPRO5m.js} +1 -1
  111. package/storybook-static/assets/{Input.stories-CZjEUeuS.js → Input.stories-Dhv3f6d7.js} +1 -1
  112. package/storybook-static/assets/{InputDateTime-BkN07v28.js → InputDateTime-ZXVROSAW.js} +1 -1
  113. package/storybook-static/assets/{InputDateTime.stories-DYM7WEl_.js → InputDateTime.stories-NMpK5Peb.js} +1 -1
  114. package/storybook-static/assets/{InputFile-C7jAf-Im.js → InputFile-BR2c0rNb.js} +1 -1
  115. package/storybook-static/assets/{InputFile.stories-D_etMzJL.js → InputFile.stories-BuNiPkPF.js} +1 -1
  116. package/storybook-static/assets/{InputFiles-CQ30jms7.js → InputFiles-BdhvE0kz.js} +1 -1
  117. package/storybook-static/assets/{InputFiles-DzpHx6LX.js → InputFiles-BlGer_7z.js} +1 -1
  118. package/storybook-static/assets/{InputFiles.stories-CAvuu19z.js → InputFiles.stories-BPGnbszv.js} +1 -1
  119. package/storybook-static/assets/{InputImage-CZQnxU3r.js → InputImage-zHzuV5NX.js} +1 -1
  120. package/storybook-static/assets/{InputImage.stories-CC5rWT7x.js → InputImage.stories-BXKgBMoQ.js} +1 -1
  121. package/storybook-static/assets/{LayoutPicker-Csk591Gq.js → LayoutPicker-L-0F9Vrb.js} +1 -1
  122. package/storybook-static/assets/{LayoutPicker.stories-HSzDTfbl.js → LayoutPicker.stories-s1valXGj.js} +1 -1
  123. package/storybook-static/assets/{Listbox-Cs3PEOu7.js → Listbox-YWvaCK77.js} +1 -1
  124. package/storybook-static/assets/{Listbox.stories-DKxQyANQ.js → Listbox.stories-BSJmd-mH.js} +1 -1
  125. package/storybook-static/assets/{Modal-D56cSUlx.js → Modal-CQW1mNSz.js} +1 -1
  126. package/storybook-static/assets/{Modal.stories-DBhh8Oex.js → Modal.stories-BEpdLX9t.js} +1 -1
  127. package/storybook-static/assets/{MultiSelect-hFHpaUjE.js → MultiSelect-DbjbyS6f.js} +1 -1
  128. package/storybook-static/assets/{MultiSelect-DfN6F5Zf.js → MultiSelect-HXlabU2B.js} +1 -1
  129. package/storybook-static/assets/{MultiSelect.stories-DdiJtud4.js → MultiSelect.stories-CflQTXbQ.js} +1 -1
  130. package/storybook-static/assets/{NotificationsHost-VRe_IYdJ.js → NotificationsHost-s71CKpxG.js} +1 -1
  131. package/storybook-static/assets/{NotificationsHost.stories-CgomuZqK.js → NotificationsHost.stories-Ovu7jDcj.js} +1 -1
  132. package/storybook-static/assets/{ODataMultiSelect-CaKU5cyu.js → ODataMultiSelect-B-u9xRiQ.js} +1 -1
  133. package/storybook-static/assets/{ODataMultiSelect.stories-BHHcSft9.js → ODataMultiSelect.stories-DajVZbpu.js} +1 -1
  134. package/storybook-static/assets/{ODataSelect-BT-YqgRv.js → ODataSelect-3wE4Syu-.js} +1 -1
  135. package/storybook-static/assets/{ODataSelect-B5Lo66gN.js → ODataSelect-DCGV65OH.js} +1 -1
  136. package/storybook-static/assets/{ODataSelect.stories-DhfSQYto.js → ODataSelect.stories-C4ymfrRw.js} +1 -1
  137. package/storybook-static/assets/{ODataTreeMultiSelect-mPwmusDm.js → ODataTreeMultiSelect-fFgkMoG7.js} +1 -1
  138. package/storybook-static/assets/{ODataTreeMultiSelect.stories-zU72m_nT.js → ODataTreeMultiSelect.stories-Ac6Y2rRQ.js} +1 -1
  139. package/storybook-static/assets/{ODataTreeSelect-HRpdPLA2.js → ODataTreeSelect-DHsV3AcR.js} +1 -1
  140. package/storybook-static/assets/{ODataTreeSelect.stories-BtSzrEr2.js → ODataTreeSelect.stories-Dfv4WQyR.js} +1 -1
  141. package/storybook-static/assets/{PeriodSelect-ZBGWb2Xt.js → PeriodSelect-DlcFkHM4.js} +1 -1
  142. package/storybook-static/assets/{PeriodSelect.stories-B0nOV7yZ.js → PeriodSelect.stories-DWwvypiE.js} +1 -1
  143. package/storybook-static/assets/{Popover-CuZWq4ir.js → Popover-CDhH2vdG.js} +1 -1
  144. package/storybook-static/assets/{Popover.stories-UomYS0vU.js → Popover.stories-DE7VCujJ.js} +1 -1
  145. package/storybook-static/assets/{PresetRangeDateInput-D3rjN3XZ.js → PresetRangeDateInput-CrsxXLDG.js} +1 -1
  146. package/storybook-static/assets/{PresetRangeDateInput.stories-wy7GVVdF.js → PresetRangeDateInput.stories-DEG3r-qf.js} +1 -1
  147. package/storybook-static/assets/{RadioButton-DPL0ufmD.js → RadioButton-C46MFmRl.js} +1 -1
  148. package/storybook-static/assets/{RadioButton.stories-DLzOE3FX.js → RadioButton.stories-C3--ehs5.js} +1 -1
  149. package/storybook-static/assets/{RadioGroup-BRuTj9Ey.js → RadioGroup-Cj_foF9x.js} +1 -1
  150. package/storybook-static/assets/{RadioGroup-jjU7Wc3l.js → RadioGroup-wy1BaQ9o.js} +1 -1
  151. package/storybook-static/assets/{RadioGroup.stories-Bbs7gPeI.js → RadioGroup.stories-Bi9_WOVj.js} +1 -1
  152. package/storybook-static/assets/{Select-DrdEDezx.js → Select-B36pVYvS.js} +1 -1
  153. package/storybook-static/assets/{Select-CSQfHGXO.js → Select-Bgg-NjIq.js} +1 -1
  154. package/storybook-static/assets/{Select.stories-B482Sdsv.js → Select.stories-Bl6_HqCh.js} +1 -1
  155. package/storybook-static/assets/{SelectOptionContent-KmIjKWiS.js → SelectOptionContent-CeSDFaTr.js} +1 -1
  156. package/storybook-static/assets/{SerializableSelect-RadwUlKf.js → SerializableSelect-CCcdn7s3.js} +1 -1
  157. package/storybook-static/assets/{SerializableSelect-Bt1FrgBB.js → SerializableSelect-EIZrsX_q.js} +1 -1
  158. package/storybook-static/assets/{SerializableSelect.stories-B_0no7si.js → SerializableSelect.stories-D85sap4g.js} +1 -1
  159. package/storybook-static/assets/{SingleDateTimeInput-DhyidxjF.js → SingleDateTimeInput-BJdvvXVc.js} +1 -1
  160. package/storybook-static/assets/{SingleDateTimeInput.stories-B61QM3vF.js → SingleDateTimeInput.stories-Cpq8DLvn.js} +1 -1
  161. package/storybook-static/assets/{Slider-DIH0-2GV.js → Slider-CqkHk2lK.js} +1 -1
  162. package/storybook-static/assets/{Slider.stories-DECV07rR.js → Slider.stories-DmW9jsnD.js} +1 -1
  163. package/storybook-static/assets/{SliderInput-B59f8oMg.js → SliderInput-DkekHTab.js} +1 -1
  164. package/storybook-static/assets/{SliderInput.stories-DLnxLEkD.js → SliderInput.stories-CqQh0HWR.js} +1 -1
  165. package/storybook-static/assets/{Sortable-B8WbzmlP.js → Sortable-BBYH-Tva.js} +1 -1
  166. package/storybook-static/assets/{Sortable.stories-DqUlCVvw.js → Sortable.stories-DjEGWs4-.js} +1 -1
  167. package/storybook-static/assets/{Splitter-C4yDAl_u.js → Splitter-G3aR-zi9.js} +1 -1
  168. package/storybook-static/assets/{Splitter.stories-CcgiUjmr.js → Splitter.stories-XKGTUPMP.js} +1 -1
  169. package/storybook-static/assets/{StateSelect-CV-8pxhw.js → StateSelect-DhzkYW8p.js} +1 -1
  170. package/storybook-static/assets/{StateSelect.stories-BK9ivlmG.js → StateSelect.stories-BAxN3YfG.js} +1 -1
  171. package/storybook-static/assets/{Switch-DE7nHbwh.js → Switch-NVpZLd3g.js} +1 -1
  172. package/storybook-static/assets/{Switch.stories-CMfzzp_X.js → Switch.stories-BBowyrzJ.js} +1 -1
  173. package/storybook-static/assets/{Table-C6MOZ4T6.js → Table-C9r-j5hO.js} +1 -1
  174. package/storybook-static/assets/{Table.stories-STJ__NxI.js → Table.stories-CkoEoxYB.js} +1 -1
  175. package/storybook-static/assets/{Tabs-CD1hcYPu.js → Tabs-tH37q7nI.js} +1 -1
  176. package/storybook-static/assets/{Tabs.stories-BvqssX2z.js → Tabs.stories-aIywaszH.js} +1 -1
  177. package/storybook-static/assets/{TagInput.stories-ma0idG2o.js → TagInput.stories-BX4XcJaC.js} +1 -1
  178. package/storybook-static/assets/{Textarea-Bg8GLfKh.js → Textarea-DDn4pvJF.js} +1 -1
  179. package/storybook-static/assets/{Textarea.stories-DFvplu2w.js → Textarea.stories-BZVZYh4p.js} +1 -1
  180. package/storybook-static/assets/{TimePanel-CZ-zOdHh.js → TimePanel-vKlzE6gd.js} +1 -1
  181. package/storybook-static/assets/{TimePanel.stories-DFH-UUBq.js → TimePanel.stories-BfdDWhtQ.js} +1 -1
  182. package/storybook-static/assets/{Toggle-CDPkOx6F.js → Toggle-DAb5_sHq.js} +1 -1
  183. package/storybook-static/assets/{Toggle.stories-Ccw3JBaV.js → Toggle.stories-Bp99WoMR.js} +1 -1
  184. package/storybook-static/assets/{TreeMultiSelect-cz0brPQw.js → TreeMultiSelect-CG09ybVB.js} +1 -1
  185. package/storybook-static/assets/{TreeMultiSelect-D-tS9rvA.js → TreeMultiSelect-CkNDwWuK.js} +1 -1
  186. package/storybook-static/assets/{TreeMultiSelect.stories-C92b10QI.js → TreeMultiSelect.stories-DE6tQFRY.js} +1 -1
  187. package/storybook-static/assets/{TreePickerBase-B39PMNf_.js → TreePickerBase-DhZ9tbrV.js} +1 -1
  188. package/storybook-static/assets/{TreeSelect-tdrV0FoI.js → TreeSelect-BYYl0yhs.js} +1 -1
  189. package/storybook-static/assets/{TreeSelect-CyHcbvrN.js → TreeSelect-D3tOqZzi.js} +1 -1
  190. package/storybook-static/assets/{TreeSelect.stories-C-7CmDg1.js → TreeSelect.stories-C56cleOX.js} +1 -1
  191. package/storybook-static/assets/{TreeTable-C_WN8FQo.js → TreeTable-CPctUXOv.js} +1 -1
  192. package/storybook-static/assets/{TreeTable.stories-DSkbQoFG.js → TreeTable.stories-D-R0a5NF.js} +1 -1
  193. package/storybook-static/assets/{WithTooltip-7X4HQR7L-Ccl2HZl-.js → WithTooltip-7X4HQR7L-DYINYmJM.js} +1 -1
  194. package/storybook-static/assets/{base-table-CB4WoiOm.js → base-table-CTBvWnIb.js} +1 -1
  195. package/storybook-static/assets/{blocks-xFhW5LuA.js → blocks-D2VXMZGt.js} +6 -6
  196. package/storybook-static/assets/{button-LL06NtwK.js → button-CofLsODD.js} +1 -1
  197. package/storybook-static/assets/{check-box-B2R83vBX.js → check-box-BUYji84r.js} +1 -1
  198. package/storybook-static/assets/{chunk-3LY4VQVK-CrLkroEp.js → chunk-3LY4VQVK-Dk0vkvRJ.js} +1 -1
  199. package/storybook-static/assets/{chunk-LITCR56V-CwP5uBgf.js → chunk-LITCR56V-DgP8YOaP.js} +1 -1
  200. package/storybook-static/assets/{contextMenu-C412_f6X.js → contextMenu-MmOUI04g.js} +1 -1
  201. package/storybook-static/assets/{error-CVV9NONe.js → error-D6G67nWf.js} +1 -1
  202. package/storybook-static/assets/{flex-BsIB-Bk2.js → flex-DEzwJFBs.js} +1 -1
  203. package/storybook-static/assets/{floating-ui.react-BUVR6RTk.js → floating-ui.react-DeHGyTLR.js} +1 -1
  204. package/storybook-static/assets/formatter-L2YTDE3Q-Cz7NqHTg.js +1 -0
  205. package/storybook-static/assets/{formatters-C2NH5oG9.js → formatters-DO-Bplkc.js} +1 -1
  206. package/storybook-static/assets/grid-CUgqbILF.js +1 -0
  207. package/storybook-static/assets/{hooks-B3VxCLy3.js → hooks-3gvuoU6a.js} +1 -1
  208. package/storybook-static/assets/{iframe-DflW120b.js → iframe-BlBhvHwk.js} +3 -3
  209. package/storybook-static/assets/{input-BaHg50eA.js → input-DM0LWdwF.js} +1 -1
  210. package/storybook-static/assets/{lucide-react-VWiBigaj.js → lucide-react-DMR456up.js} +1 -1
  211. package/storybook-static/assets/{mdx-react-shim-C4qR84IJ.js → mdx-react-shim-BXKB7xbF.js} +1 -1
  212. package/storybook-static/assets/{media-D0ZLoHC-.js → media-BZMZJXu3.js} +1 -1
  213. package/storybook-static/assets/misc-BElIqBdV.css +1 -0
  214. package/storybook-static/assets/{misc-C9Lkw27O.js → misc-_mjs2DH3.js} +1 -1
  215. package/storybook-static/assets/{notifications-vHR6fNDB.js → notifications-BxYiooNp.js} +1 -1
  216. package/storybook-static/assets/{odata-Fxs_Fy9_.js → odata-B4-s71TA.js} +1 -1
  217. package/storybook-static/assets/odata-service-BHLtW14i.js +1 -0
  218. package/storybook-static/assets/{odataStoryFixtures-B9hZmWqf.js → odataStoryFixtures-D5fZfJe7.js} +1 -1
  219. package/storybook-static/assets/{picker-Cv_Ql1NL.js → picker-RP6lU_O4.js} +1 -1
  220. package/storybook-static/assets/{popover-DrE0FDTT.js → popover-B40B8LiS.js} +1 -1
  221. package/storybook-static/assets/{preset-select-B31k-k9Y.js → preset-select-CH5-L7v5.js} +1 -1
  222. package/storybook-static/assets/{react-18-DHZovjkP.js → react-18-BGjST092.js} +1 -1
  223. package/storybook-static/assets/{react-DzyGsyH7.js → react-BRNfkHvq.js} +1 -1
  224. package/storybook-static/assets/{react-dom-CchAcezr.js → react-dom-Dymo4Ige.js} +1 -1
  225. package/storybook-static/assets/select-DDFRb6jY.js +1 -0
  226. package/storybook-static/assets/{slider-CjYK3ZGn.js → slider-CZr1wjo-.js} +1 -1
  227. package/storybook-static/assets/{sortable-BdcqlSP1.js → sortable-Do0zRVl3.js} +1 -1
  228. package/storybook-static/assets/{syntaxhighlighter-RTCFPKCB-7I_ZEDBS.js → syntaxhighlighter-RTCFPKCB-YpNtMx0l.js} +1 -1
  229. package/storybook-static/assets/{text-C1j_wRlP.js → text-BBt8S4hV.js} +1 -1
  230. package/storybook-static/assets/{theming-BBiKrPJV.js → theming-C9D6rg4N.js} +1 -1
  231. package/storybook-static/assets/ui-5r8X6Kmj.js +1 -0
  232. package/storybook-static/assets/{useODataSelectBase-CXv-4xSN.js → useODataSelectBase-Vi75dcI2.js} +1 -1
  233. package/storybook-static/assets/{useODataTreeData-DsCRTvwe.js → useODataTreeData-3VDV4NsS.js} +1 -1
  234. package/storybook-static/assets/{utils-G8NqhJFu.js → utils-De5IM4sM.js} +1 -1
  235. package/storybook-static/iframe.html +1 -1
  236. package/storybook-static/project.json +1 -1
  237. package/dist/chunks/SelectOptionContent-lfEtHXfO.js +0 -1132
  238. package/dist/chunks/SelectOptionContent-lfEtHXfO.js.map +0 -1
  239. package/dist/chunks/select-Dj3FfpS0.js +0 -327
  240. package/storybook-static/assets/formatter-L2YTDE3Q-B_BDMouG.js +0 -1
  241. package/storybook-static/assets/grid-g_iBhVr4.js +0 -1
  242. package/storybook-static/assets/misc-D9dXokhF.css +0 -1
  243. package/storybook-static/assets/odata-service-R4sN6H36.js +0 -1
  244. package/storybook-static/assets/select-DYPSEJF1.js +0 -1
  245. package/storybook-static/assets/ui-BdaKEyAd.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"input-CZLUUggm.js","names":[],"sources":["../../src/input/Input.module.scss","../../src/input/lib/useInputFieldIds.ts","../../src/input/Input.tsx","../../src/input/InputErrorComponent.tsx"],"sourcesContent":["@use \"@/styles/mixins\" as *;\n\n.controlLayout {\n\tposition: relative;\n\twidth: 100%;\n}\n\n.input {\n\theight: var(--control-height);\n\twidth: 100%;\n\tpadding: var(--space-xs) var(--space-sm);\n\tfont-size: var(--font-size-md);\n\n\t--ui-color: var(--content-0);\n\t--ui-color-hover: var(--content-0);\n\t--ui-color-active: var(--content-0);\n}\n\n.inputNumber {\n\tappearance: textfield;\n\t-moz-appearance: textfield;\n\n\t&::-webkit-inner-spin-button,\n\t&::-webkit-outer-spin-button {\n\t\t-webkit-appearance: none;\n\t\tmargin: 0;\n\t}\n}\n\n.controlWithEndAdornment {\n\tpadding-right: calc(var(--input-end-adornment-width, var(--control-height)) + var(--space-sm));\n}\n\n.controlEndAdornment {\n\tposition: absolute;\n\theight: 100%;\n\ttop: 0;\n\tright: 0;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: flex-end;\n\t// max-width: calc(100% - (var(--space-md) * 2));\n\tmax-width: calc(100% - var(--space-md));\n}\n\n.endAdornmentGroup {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: var(--space-xs);\n}\n\n.clearButton {\n\twidth: 1.75em;\n\theight: 1.75em;\n\tborder: none;\n\tbackground: transparent;\n\tcolor: var(--content-1);\n\ttransition:\n\t\tcolor var(--transition-fast) ease,\n\t\tbackground-color var(--transition-fast) ease;\n\n\t&:hover {\n\t\tcolor: var(--content-accent);\n\t\tbackground-color: var(--status-info-soft);\n\t}\n\n\t&:focus-visible {\n\t\t@include focusVisible;\n\t}\n\n\t&:disabled {\n\t\tpointer-events: none;\n\t\topacity: 0.25;\n\t}\n}\n\n.error {\n\tposition: absolute;\n\tz-index: 11;\n\tbottom: calc(var(--space-xs) * -1);\n\tleft: 0;\n\tright: 0;\n\ttransform: translateY(100%);\n\t// font-size: var(--font-size-sm);\n\tcolor: var(--status-error-on-fill);\n\tbackground: var(--status-error-fill);\n\tborder-radius: var(--radius-sm);\n\tpadding: var(--space-xs) var(--space-sm);\n\tbox-shadow: var(--shadow-sm);\n\topacity: 0.9;\n}\n","import { useId } from \"react\";\n\nexport interface UseInputFieldIdsOptions {\n\tid?: string;\n\thasLabel?: boolean;\n\thasDescription?: boolean;\n\thasError?: boolean;\n}\n\nexport interface InputFieldIds {\n\tcontrolId: string;\n\tlabelId?: string;\n\tdescriptionId?: string;\n\terrorId?: string;\n\tdescribedBy?: string;\n}\n\nexport function useInputFieldIds({ id: externalId, hasLabel, hasDescription, hasError }: UseInputFieldIdsOptions): InputFieldIds {\n\tconst autoId = useId();\n\tconst controlId = externalId ?? autoId;\n\tconst labelId = hasLabel ? `${controlId}-label` : undefined;\n\tconst descriptionId = hasDescription ? `${controlId}-description` : undefined;\n\tconst errorId = hasError ? `${controlId}-error` : undefined;\n\tconst describedBy = [descriptionId, errorId].filter(Boolean).join(\" \") || undefined;\n\n\treturn {\n\t\tcontrolId,\n\t\tlabelId,\n\t\tdescriptionId,\n\t\terrorId,\n\t\tdescribedBy\n\t};\n}\n","import React, { CSSProperties, InputHTMLAttributes, ReactNode, useEffect, useEffectEvent, useState } from \"react\";\n\nimport { toFiniteNumber } from \"@ryuzaki13/react-foundation-lib/formatters\";\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\nimport { XIcon } from \"lucide-react\";\n\nimport { UiBaseProps, UiSize } from \"../types\";\nimport uiStyles from \"../ui.module.scss\";\n\nimport styles from \"./Input.module.scss\";\nimport { useInputFieldIds } from \"./lib/useInputFieldIds\";\n\nexport interface InputUIProps extends Omit<UiBaseProps<never>, \"value\" | \"onChange\"> {\n\tclassName?: string;\n\terror?: string;\n\tcontrolId?: string;\n\tlabelId?: string;\n\tdescriptionId?: string;\n\terrorId?: string;\n\tchildren: React.ReactNode;\n}\n\nexport interface InputControlRenderProps {\n\tcontrolClassName?: string;\n}\n\nexport interface InputControlProps {\n\tclassName?: string;\n\tendAdornment?: ReactNode;\n\tendAdornmentClassName?: string;\n\tendAdornmentWidth?: string;\n\tchildren: (props: InputControlRenderProps) => ReactNode;\n}\n\nexport interface InputClearButtonProps {\n\tonClick?: () => void;\n\tdisabled?: boolean;\n\tclassName?: string;\n\tariaLabel?: string;\n}\n\nfunction InputLabel({ label, controlId, labelId }: { label: React.ReactNode; controlId?: string; labelId?: string }) {\n\treturn (\n\t\t<label id={labelId} htmlFor={controlId} className={uiStyles.uiLabel}>\n\t\t\t{label}\n\t\t</label>\n\t);\n}\n\nexport function InputUILoading({\n\tlabel,\n\tdescription,\n\tsize,\n\tdisabled,\n\tclassName\n}: Pick<InputUIProps, \"label\" | \"description\" | \"size\" | \"disabled\" | \"className\">) {\n\tconst { controlId, labelId, descriptionId } = useInputFieldIds({\n\t\thasLabel: label !== undefined && label !== null,\n\t\thasDescription: !!description\n\t});\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(uiStyles.uiElement, uiStyles.uiSizable, size && uiStyles[size as UiSize], uiStyles.disabled, className)}\n\t\t\taria-disabled={disabled || undefined}>\n\t\t\t{label && <InputLabel label={label} controlId={controlId} labelId={labelId} />}\n\t\t\t{description && (\n\t\t\t\t<p id={descriptionId} className={uiStyles.uiDescription}>\n\t\t\t\t\t{description}\n\t\t\t\t</p>\n\t\t\t)}\n\t\t\t<div className={cn(uiStyles.uiInputControlFake, \"skeletonLine\")} />\n\t\t</div>\n\t);\n}\n\n/**\n * Низкоуровневая оболочка поля ввода с общими элементами оформления.\n */\nexport function InputUI({\n\tlabel,\n\tdescription,\n\tdisabled,\n\tclassName,\n\terror,\n\tsize,\n\tcontrolId,\n\tlabelId,\n\tdescriptionId,\n\terrorId,\n\tchildren\n}: InputUIProps) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\tuiStyles.uiElement,\n\t\t\t\tuiStyles.uiSizable,\n\t\t\t\tsize && uiStyles[size as UiSize],\n\t\t\t\tdisabled && uiStyles.disabled,\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\taria-disabled={disabled || undefined}>\n\t\t\t{label && <InputLabel label={label} controlId={controlId} labelId={labelId} />}\n\t\t\t{description && (\n\t\t\t\t<p id={descriptionId} className={uiStyles.uiDescription}>\n\t\t\t\t\t{description}\n\t\t\t\t</p>\n\t\t\t)}\n\t\t\t<div className={styles.controlLayout}>\n\t\t\t\t{children}\n\n\t\t\t\t{error && (\n\t\t\t\t\t<p id={errorId} className={styles.error} role=\"alert\">\n\t\t\t\t\t\t{error}\n\t\t\t\t\t</p>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport function InputControl({ className, endAdornment, endAdornmentClassName, endAdornmentWidth, children }: InputControlProps) {\n\tconst hasEndAdornment = endAdornment !== undefined && endAdornment !== null;\n\tconst style =\n\t\thasEndAdornment && endAdornmentWidth ? ({ \"--input-end-adornment-width\": endAdornmentWidth } as CSSProperties) : undefined;\n\n\treturn (\n\t\t<div className={cn(styles.controlLayout, className)} style={style}>\n\t\t\t{children({ controlClassName: hasEndAdornment ? styles.controlWithEndAdornment : undefined })}\n\t\t\t{hasEndAdornment && <div className={cn(styles.controlEndAdornment, endAdornmentClassName)}>{endAdornment}</div>}\n\t\t</div>\n\t);\n}\n\nexport function InputClearButton({ onClick, disabled, className, ariaLabel = \"Очистить значение\" }: InputClearButtonProps) {\n\treturn (\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tdisabled={disabled || !onClick}\n\t\t\tclassName={cn(styles.clearButton, \"flexCenter radiusSm\", className)}\n\t\t\tonClick={onClick}\n\t\t\taria-label={ariaLabel}>\n\t\t\t<XIcon />\n\t\t</button>\n\t);\n}\n\nfunction resolveEndAdornmentWidth(hasAdornment: boolean, hasClearAction: boolean, explicitWidth?: string) {\n\tif (explicitWidth) {\n\t\treturn explicitWidth;\n\t}\n\n\tif (hasAdornment && hasClearAction) {\n\t\treturn \"calc((var(--control-height) * 2) + var(--space-xs))\";\n\t}\n\n\tif (hasAdornment || hasClearAction) {\n\t\treturn \"var(--control-height)\";\n\t}\n\n\treturn undefined;\n}\n\nfunction createEndAdornment({ endAdornment, onClear, disabled }: { endAdornment?: ReactNode; onClear?: () => void; disabled?: boolean }) {\n\tif ((endAdornment === undefined || endAdornment === null) && !onClear) {\n\t\treturn undefined;\n\t}\n\n\treturn (\n\t\t<div className={styles.endAdornmentGroup}>\n\t\t\t{endAdornment}\n\t\t\t{onClear && <InputClearButton onClick={onClear} disabled={disabled} />}\n\t\t</div>\n\t);\n}\n\nexport interface BaseInputProps<T extends number | string | undefined, V = T>\n\textends Omit<InputHTMLAttributes<HTMLInputElement>, \"size\" | \"value\" | \"type\" | \"defaultValue\" | \"onChange\">, UiBaseProps<T, V> {\n\tonClear?: () => void;\n\terror?: string;\n\tonClearError?: () => void;\n\tdefaultValue?: T;\n\tendAdornment?: ReactNode;\n\tendAdornmentClassName?: string;\n\tendAdornmentWidth?: string;\n}\n\nexport interface InputTextProps extends BaseInputProps<string> {\n\ttype?: \"email\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"url\";\n\n\t/**\n\t * Регулярное выражение для валидации всего введённого значения.\n\t * При несоответствии поле подсвечивается как невалидное, но текст не удаляется.\n\t * Пример: `/^\\d*$/`\n\t */\n\tallowedPattern?: RegExp;\n}\n\n/**\n * Базовое текстовое поле ввода для строковых значений.\n */\nexport function InputText({\n\tlabel,\n\tdescription,\n\tdisabled,\n\tclassName,\n\tonClear,\n\terror,\n\tonClearError,\n\tonChange,\n\tvalue,\n\tsize,\n\tallowedPattern,\n\tendAdornment,\n\tendAdornmentClassName,\n\tendAdornmentWidth,\n\ttype = \"text\",\n\t...props\n}: InputTextProps) {\n\tconst [internalInvalid, setInternalInvalid] = useState(false);\n\n\tconst handleInput = (e: React.ChangeEvent<HTMLInputElement>) => {\n\t\tconst newValue = e.target.value;\n\n\t\tif (allowedPattern !== undefined) {\n\t\t\tsetInternalInvalid(newValue !== \"\" && !allowedPattern.test(newValue));\n\t\t}\n\n\t\tonChange(newValue);\n\t\tif (error && onClearError) onClearError();\n\t};\n\n\tconst hasValue = Boolean(value && value.length > 0);\n\tconst visibleError = hasValue ? error : undefined;\n\tconst { controlId, labelId, descriptionId, errorId, describedBy } = useInputFieldIds({\n\t\tid: props.id,\n\t\thasLabel: label !== undefined && label !== null,\n\t\thasDescription: !!description,\n\t\thasError: !!visibleError\n\t});\n\tconst isInvalid = hasValue && (!!error || internalInvalid);\n\tconst resolvedEndAdornment = createEndAdornment({ endAdornment, onClear, disabled });\n\tconst hasCustomAdornment = endAdornment !== undefined && endAdornment !== null;\n\tconst resolvedEndAdornmentWidth = resolveEndAdornmentWidth(hasCustomAdornment, !!onClear, endAdornmentWidth);\n\n\treturn (\n\t\t<InputUI\n\t\t\tlabel={label}\n\t\t\tdescription={description}\n\t\t\tdisabled={disabled}\n\t\t\tclassName={className}\n\t\t\tsize={size}\n\t\t\terror={visibleError}\n\t\t\tcontrolId={controlId}\n\t\t\tlabelId={labelId}\n\t\t\tdescriptionId={descriptionId}\n\t\t\terrorId={errorId}>\n\t\t\t<InputControl\n\t\t\t\tendAdornment={resolvedEndAdornment}\n\t\t\t\tendAdornmentClassName={endAdornmentClassName}\n\t\t\t\tendAdornmentWidth={resolvedEndAdornmentWidth}>\n\t\t\t\t{({ controlClassName }) => (\n\t\t\t\t\t<input\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t\tid={controlId}\n\t\t\t\t\t\ttype={type}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\taria-invalid={isInvalid || undefined}\n\t\t\t\t\t\taria-labelledby={labelId}\n\t\t\t\t\t\taria-describedby={describedBy}\n\t\t\t\t\t\tdata-invalid={isInvalid ? \"\" : undefined}\n\t\t\t\t\t\tclassName={cn(uiStyles.uiInputControl, styles.input, controlClassName)}\n\t\t\t\t\t\tonChange={handleInput}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</InputControl>\n\t\t</InputUI>\n\t);\n}\n\n/**\n * Числовое поле ввода с нормализацией значения и защитой от промежуточного невалидного ввода.\n */\nexport function InputNumber({\n\tlabel,\n\tdescription,\n\tdisabled,\n\tclassName,\n\tonClear,\n\terror,\n\tonClearError,\n\tonChange,\n\tvalue,\n\tsize,\n\tendAdornment,\n\tendAdornmentClassName,\n\tendAdornmentWidth,\n\t...props\n}: BaseInputProps<number | undefined>) {\n\tconst inputProps = props as InputHTMLAttributes<HTMLInputElement>;\n\tconst { controlId, labelId, descriptionId, errorId, describedBy } = useInputFieldIds({\n\t\tid: props.id,\n\t\thasLabel: label !== undefined && label !== null,\n\t\thasDescription: !!description,\n\t\thasError: !!error\n\t});\n\n\tconst [rawValue, setRawValue] = useState<string>(() => String(value));\n\t// const [internalInvalid, setInternalInvalid] = useState(false);\n\n\tconst syncRawValue = useEffectEvent((nextRaw: string) => {\n\t\tsetRawValue(nextRaw);\n\t\t// setInternalInvalid(false);\n\t});\n\n\tuseEffect(() => {\n\t\tconst nextRaw = value !== undefined && typeof value === \"number\" && !isNaN(value) ? String(value) : \"\";\n\t\tsyncRawValue(nextRaw);\n\t}, [value]);\n\n\tconst handleClear = onClear\n\t\t? () => {\n\t\t\t\tsetRawValue(\"\");\n\t\t\t\t// setInternalInvalid(false);\n\t\t\t\tonClear();\n\t\t\t}\n\t\t: undefined;\n\n\tconst handleInput = (e: React.ChangeEvent<HTMLInputElement>) => {\n\t\tconst raw = e.target.value;\n\t\tsetRawValue(raw);\n\n\t\tconst parsed = toFiniteNumber(raw); // ?? value ?? 0;\n\n\t\tonChange(parsed);\n\t\tif (error && onClearError) onClearError();\n\t};\n\n\t// const isInvalid = !!error || internalInvalid;\n\tconst resolvedEndAdornment = createEndAdornment({ endAdornment, onClear: handleClear, disabled });\n\tconst hasCustomAdornment = endAdornment !== undefined && endAdornment !== null;\n\tconst resolvedEndAdornmentWidth = resolveEndAdornmentWidth(hasCustomAdornment, !!handleClear, endAdornmentWidth);\n\n\treturn (\n\t\t<InputUI\n\t\t\tlabel={label}\n\t\t\tdescription={description}\n\t\t\tdisabled={disabled}\n\t\t\tclassName={className}\n\t\t\tsize={size}\n\t\t\terror={error}\n\t\t\tcontrolId={controlId}\n\t\t\tlabelId={labelId}\n\t\t\tdescriptionId={descriptionId}\n\t\t\terrorId={errorId}>\n\t\t\t<InputControl\n\t\t\t\tendAdornment={resolvedEndAdornment}\n\t\t\t\tendAdornmentClassName={endAdornmentClassName}\n\t\t\t\tendAdornmentWidth={resolvedEndAdornmentWidth}>\n\t\t\t\t{({ controlClassName }) => (\n\t\t\t\t\t<input\n\t\t\t\t\t\t{...inputProps}\n\t\t\t\t\t\tid={controlId}\n\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\tinputMode=\"decimal\"\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tvalue={rawValue}\n\t\t\t\t\t\t// aria-invalid={isInvalid || undefined}\n\t\t\t\t\t\taria-labelledby={labelId}\n\t\t\t\t\t\taria-describedby={describedBy}\n\t\t\t\t\t\tclassName={cn(uiStyles.uiInputControl, styles.input, styles.inputNumber, controlClassName)}\n\t\t\t\t\t\tonChange={handleInput}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</InputControl>\n\t\t</InputUI>\n\t);\n}\n\n/**\n * Совместимый алиас для `InputText`.\n */\nexport const Input = InputText;\n","import styles from \"../ui.module.scss\";\n\ninterface InputErrorComponentProps {\n\ttext: string;\n}\n\nexport function InputErrorComponent({ text }: InputErrorComponentProps) {\n\treturn <div className={styles.uiErrorElement}>{text}</div>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;ACiBA,SAAgB,EAAiB,EAAE,IAAI,GAAY,aAAU,mBAAgB,eAAoD;CAChI,IAAM,IAAS,EAAM,GACf,IAAY,KAAc,GAC1B,IAAU,IAAW,GAAG,EAAU,UAAU,KAAA,GAC5C,IAAgB,IAAiB,GAAG,EAAU,gBAAgB,KAAA,GAC9D,IAAU,IAAW,GAAG,EAAU,UAAU,KAAA;CAGlD,OAAO;EACN;EACA;EACA;EACA;EACA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AA,KAAa,OAAO,KAAU,YAAY,CAAC,MAAM,CAAK,IAAI,OAAO,CAAK,IAAI,EAChF;CACrB,GAAG,CAAC,CAAK,CAAC;CAEV,IAAM,IAAc,UACX;EAGN,AAFA,EAAY,EAAE,GAEd,EAAQ;CACT,IACC,KAAA,GAEG,KAAe,MAA2C;EAC/D,IAAM,IAAM,EAAE,OAAO;EAMrB,AALA,EAAY,CAAG,GAIf,EAFe,EAAe,CAErB,CAAM,GACX,KAAS,KAAc,EAAa;CACzC;CAOA,OACC,kBAAC,GAAD;EACQ;EACM;EACH;EACC;EACL;EACC;EACI;EACF;EACM;EACN;YACT,kBAAC,GAAD;GACC,cAjB0B,EAAmB;IAAE;IAAc,SAAS;IAAa;GAAS,CAiB9E;GACS;GACvB,mBAjB+B,EADP,KAA+C,MACK,CAAC,CAAC,GAAa,CAiBxE;cACjB,EAAE,0BACH,kBAAC,SAAD;IACC,GAAI;IACJ,IAAI;IACJ,MAAK;IACL,WAAU;IACA;IACV,OAAO;IAEP,mBAAiB;IACjB,oBAAkB;IAClB,WAAW,EAAG,EAAS,gBAAgB,EAAO,OAAO,EAAO,aAAa,CAAgB;IACzF,UAAU;GACV,CAAA;EAEW,CAAA;CACN,CAAA;AAEX;AAKA,IAAa,IAAQ;;;ACzXrB,SAAgB,EAAoB,EAAE,WAAkC;CACvE,OAAO,kBAAC,OAAD;EAAK,WAAW,EAAO;YAAiB;CAAU,CAAA;AAC1D"}
1
+ {"version":3,"file":"input-BCJfUdK_.js","names":[],"sources":["../../src/input/Input.module.scss","../../src/input/lib/useInputFieldIds.ts","../../src/input/Input.tsx","../../src/input/InputErrorComponent.tsx"],"sourcesContent":["@use \"@/styles/mixins\" as *;\n\n.controlLayout {\n\tposition: relative;\n\twidth: 100%;\n}\n\n.input {\n\theight: var(--control-height);\n\twidth: 100%;\n\tpadding: var(--space-xs) var(--space-sm);\n\tfont-size: var(--font-size-md);\n\n\t--ui-color: var(--content-0);\n\t--ui-color-hover: var(--content-0);\n\t--ui-color-active: var(--content-0);\n}\n\n.inputNumber {\n\tappearance: textfield;\n\t-moz-appearance: textfield;\n\n\t&::-webkit-inner-spin-button,\n\t&::-webkit-outer-spin-button {\n\t\t-webkit-appearance: none;\n\t\tmargin: 0;\n\t}\n}\n\n.controlWithEndAdornment {\n\tpadding-right: calc(var(--input-end-adornment-width, var(--control-height)) + var(--space-sm));\n}\n\n.controlEndAdornment {\n\tposition: absolute;\n\theight: 100%;\n\ttop: 0;\n\tright: 0;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: flex-end;\n\t// max-width: calc(100% - (var(--space-md) * 2));\n\tmax-width: calc(100% - var(--space-md));\n}\n\n.endAdornmentGroup {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: var(--space-xs);\n}\n\n.clearButton {\n\twidth: 1.75em;\n\theight: 1.75em;\n\tborder: none;\n\tbackground: transparent;\n\tcolor: var(--content-1);\n\ttransition:\n\t\tcolor var(--transition-fast) ease,\n\t\tbackground-color var(--transition-fast) ease;\n\n\t&:hover {\n\t\tcolor: var(--content-accent);\n\t\tbackground-color: var(--status-info-soft);\n\t}\n\n\t&:focus-visible {\n\t\t@include focusVisible;\n\t}\n\n\t&:disabled {\n\t\tpointer-events: none;\n\t\topacity: 0.25;\n\t}\n}\n\n.error {\n\tposition: absolute;\n\tz-index: 11;\n\tbottom: calc(var(--space-xs) * -1);\n\tleft: 0;\n\tright: 0;\n\ttransform: translateY(100%);\n\t// font-size: var(--font-size-sm);\n\tcolor: var(--status-error-on-fill);\n\tbackground: var(--status-error-fill);\n\tborder-radius: var(--radius-sm);\n\tpadding: var(--space-xs) var(--space-sm);\n\tbox-shadow: var(--shadow-sm);\n\topacity: 0.9;\n}\n","import { useId } from \"react\";\n\nexport interface UseInputFieldIdsOptions {\n\tid?: string;\n\thasLabel?: boolean;\n\thasDescription?: boolean;\n\thasError?: boolean;\n}\n\nexport interface InputFieldIds {\n\tcontrolId: string;\n\tlabelId?: string;\n\tdescriptionId?: string;\n\terrorId?: string;\n\tdescribedBy?: string;\n}\n\nexport function useInputFieldIds({ id: externalId, hasLabel, hasDescription, hasError }: UseInputFieldIdsOptions): InputFieldIds {\n\tconst autoId = useId();\n\tconst controlId = externalId ?? autoId;\n\tconst labelId = hasLabel ? `${controlId}-label` : undefined;\n\tconst descriptionId = hasDescription ? `${controlId}-description` : undefined;\n\tconst errorId = hasError ? `${controlId}-error` : undefined;\n\tconst describedBy = [descriptionId, errorId].filter(Boolean).join(\" \") || undefined;\n\n\treturn {\n\t\tcontrolId,\n\t\tlabelId,\n\t\tdescriptionId,\n\t\terrorId,\n\t\tdescribedBy\n\t};\n}\n","import React, { CSSProperties, InputHTMLAttributes, ReactNode, useEffect, useEffectEvent, useState } from \"react\";\n\nimport { toFiniteNumber } from \"@ryuzaki13/react-foundation-lib/formatters\";\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\nimport { XIcon } from \"lucide-react\";\n\nimport { UiBaseProps, UiSize } from \"../types\";\nimport uiStyles from \"../ui.module.scss\";\n\nimport styles from \"./Input.module.scss\";\nimport { useInputFieldIds } from \"./lib/useInputFieldIds\";\n\nexport interface InputUIProps extends Omit<UiBaseProps<never>, \"value\" | \"onChange\"> {\n\tclassName?: string;\n\terror?: string;\n\tcontrolId?: string;\n\tlabelId?: string;\n\tdescriptionId?: string;\n\terrorId?: string;\n\tchildren: React.ReactNode;\n}\n\nexport interface InputControlRenderProps {\n\tcontrolClassName?: string;\n}\n\nexport interface InputControlProps {\n\tclassName?: string;\n\tendAdornment?: ReactNode;\n\tendAdornmentClassName?: string;\n\tendAdornmentWidth?: string;\n\tchildren: (props: InputControlRenderProps) => ReactNode;\n}\n\nexport interface InputClearButtonProps {\n\tonClick?: () => void;\n\tdisabled?: boolean;\n\tclassName?: string;\n\tariaLabel?: string;\n}\n\nfunction InputLabel({ label, controlId, labelId }: { label: React.ReactNode; controlId?: string; labelId?: string }) {\n\treturn (\n\t\t<label id={labelId} htmlFor={controlId} className={uiStyles.uiLabel}>\n\t\t\t{label}\n\t\t</label>\n\t);\n}\n\nexport function InputUILoading({\n\tlabel,\n\tdescription,\n\tsize,\n\tdisabled,\n\tclassName\n}: Pick<InputUIProps, \"label\" | \"description\" | \"size\" | \"disabled\" | \"className\">) {\n\tconst { controlId, labelId, descriptionId } = useInputFieldIds({\n\t\thasLabel: label !== undefined && label !== null,\n\t\thasDescription: !!description\n\t});\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(uiStyles.uiElement, uiStyles.uiSizable, size && uiStyles[size as UiSize], uiStyles.disabled, className)}\n\t\t\taria-disabled={disabled || undefined}>\n\t\t\t{label && <InputLabel label={label} controlId={controlId} labelId={labelId} />}\n\t\t\t{description && (\n\t\t\t\t<p id={descriptionId} className={uiStyles.uiDescription}>\n\t\t\t\t\t{description}\n\t\t\t\t</p>\n\t\t\t)}\n\t\t\t<div className={cn(uiStyles.uiInputControlFake, \"skeletonLine\")} />\n\t\t</div>\n\t);\n}\n\n/**\n * Низкоуровневая оболочка поля ввода с общими элементами оформления.\n */\nexport function InputUI({\n\tlabel,\n\tdescription,\n\tdisabled,\n\tclassName,\n\terror,\n\tsize,\n\tcontrolId,\n\tlabelId,\n\tdescriptionId,\n\terrorId,\n\tchildren\n}: InputUIProps) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\tuiStyles.uiElement,\n\t\t\t\tuiStyles.uiSizable,\n\t\t\t\tsize && uiStyles[size as UiSize],\n\t\t\t\tdisabled && uiStyles.disabled,\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\taria-disabled={disabled || undefined}>\n\t\t\t{label && <InputLabel label={label} controlId={controlId} labelId={labelId} />}\n\t\t\t{description && (\n\t\t\t\t<p id={descriptionId} className={uiStyles.uiDescription}>\n\t\t\t\t\t{description}\n\t\t\t\t</p>\n\t\t\t)}\n\t\t\t<div className={styles.controlLayout}>\n\t\t\t\t{children}\n\n\t\t\t\t{error && (\n\t\t\t\t\t<p id={errorId} className={styles.error} role=\"alert\">\n\t\t\t\t\t\t{error}\n\t\t\t\t\t</p>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport function InputControl({ className, endAdornment, endAdornmentClassName, endAdornmentWidth, children }: InputControlProps) {\n\tconst hasEndAdornment = endAdornment !== undefined && endAdornment !== null;\n\tconst style =\n\t\thasEndAdornment && endAdornmentWidth ? ({ \"--input-end-adornment-width\": endAdornmentWidth } as CSSProperties) : undefined;\n\n\treturn (\n\t\t<div className={cn(styles.controlLayout, className)} style={style}>\n\t\t\t{children({ controlClassName: hasEndAdornment ? styles.controlWithEndAdornment : undefined })}\n\t\t\t{hasEndAdornment && <div className={cn(styles.controlEndAdornment, endAdornmentClassName)}>{endAdornment}</div>}\n\t\t</div>\n\t);\n}\n\nexport function InputClearButton({ onClick, disabled, className, ariaLabel = \"Очистить значение\" }: InputClearButtonProps) {\n\treturn (\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tdisabled={disabled || !onClick}\n\t\t\tclassName={cn(styles.clearButton, \"flexCenter radiusSm\", className)}\n\t\t\tonClick={onClick}\n\t\t\taria-label={ariaLabel}>\n\t\t\t<XIcon />\n\t\t</button>\n\t);\n}\n\nfunction resolveEndAdornmentWidth(hasAdornment: boolean, hasClearAction: boolean, explicitWidth?: string) {\n\tif (explicitWidth) {\n\t\treturn explicitWidth;\n\t}\n\n\tif (hasAdornment && hasClearAction) {\n\t\treturn \"calc((var(--control-height) * 2) + var(--space-xs))\";\n\t}\n\n\tif (hasAdornment || hasClearAction) {\n\t\treturn \"var(--control-height)\";\n\t}\n\n\treturn undefined;\n}\n\nfunction createEndAdornment({ endAdornment, onClear, disabled }: { endAdornment?: ReactNode; onClear?: () => void; disabled?: boolean }) {\n\tif ((endAdornment === undefined || endAdornment === null) && !onClear) {\n\t\treturn undefined;\n\t}\n\n\treturn (\n\t\t<div className={styles.endAdornmentGroup}>\n\t\t\t{endAdornment}\n\t\t\t{onClear && <InputClearButton onClick={onClear} disabled={disabled} />}\n\t\t</div>\n\t);\n}\n\nexport interface BaseInputProps<T extends number | string | undefined, V = T>\n\textends Omit<InputHTMLAttributes<HTMLInputElement>, \"size\" | \"value\" | \"type\" | \"defaultValue\" | \"onChange\">, UiBaseProps<T, V> {\n\tonClear?: () => void;\n\terror?: string;\n\tonClearError?: () => void;\n\tdefaultValue?: T;\n\tendAdornment?: ReactNode;\n\tendAdornmentClassName?: string;\n\tendAdornmentWidth?: string;\n}\n\nexport interface InputTextProps extends BaseInputProps<string> {\n\ttype?: \"email\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"url\";\n\n\t/**\n\t * Регулярное выражение для валидации всего введённого значения.\n\t * При несоответствии поле подсвечивается как невалидное, но текст не удаляется.\n\t * Пример: `/^\\d*$/`\n\t */\n\tallowedPattern?: RegExp;\n}\n\n/**\n * Базовое текстовое поле ввода для строковых значений.\n */\nexport function InputText({\n\tlabel,\n\tdescription,\n\tdisabled,\n\tclassName,\n\tonClear,\n\terror,\n\tonClearError,\n\tonChange,\n\tvalue,\n\tsize,\n\tallowedPattern,\n\tendAdornment,\n\tendAdornmentClassName,\n\tendAdornmentWidth,\n\ttype = \"text\",\n\t...props\n}: InputTextProps) {\n\tconst [internalInvalid, setInternalInvalid] = useState(false);\n\n\tconst handleInput = (e: React.ChangeEvent<HTMLInputElement>) => {\n\t\tconst newValue = e.target.value;\n\n\t\tif (allowedPattern !== undefined) {\n\t\t\tsetInternalInvalid(newValue !== \"\" && !allowedPattern.test(newValue));\n\t\t}\n\n\t\tonChange(newValue);\n\t\tif (error && onClearError) onClearError();\n\t};\n\n\tconst hasValue = Boolean(value && value.length > 0);\n\tconst visibleError = hasValue ? error : undefined;\n\tconst { controlId, labelId, descriptionId, errorId, describedBy } = useInputFieldIds({\n\t\tid: props.id,\n\t\thasLabel: label !== undefined && label !== null,\n\t\thasDescription: !!description,\n\t\thasError: !!visibleError\n\t});\n\tconst isInvalid = hasValue && (!!error || internalInvalid);\n\tconst resolvedEndAdornment = createEndAdornment({ endAdornment, onClear, disabled });\n\tconst hasCustomAdornment = endAdornment !== undefined && endAdornment !== null;\n\tconst resolvedEndAdornmentWidth = resolveEndAdornmentWidth(hasCustomAdornment, !!onClear, endAdornmentWidth);\n\n\treturn (\n\t\t<InputUI\n\t\t\tlabel={label}\n\t\t\tdescription={description}\n\t\t\tdisabled={disabled}\n\t\t\tclassName={className}\n\t\t\tsize={size}\n\t\t\terror={visibleError}\n\t\t\tcontrolId={controlId}\n\t\t\tlabelId={labelId}\n\t\t\tdescriptionId={descriptionId}\n\t\t\terrorId={errorId}>\n\t\t\t<InputControl\n\t\t\t\tendAdornment={resolvedEndAdornment}\n\t\t\t\tendAdornmentClassName={endAdornmentClassName}\n\t\t\t\tendAdornmentWidth={resolvedEndAdornmentWidth}>\n\t\t\t\t{({ controlClassName }) => (\n\t\t\t\t\t<input\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t\tid={controlId}\n\t\t\t\t\t\ttype={type}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\taria-invalid={isInvalid || undefined}\n\t\t\t\t\t\taria-labelledby={labelId}\n\t\t\t\t\t\taria-describedby={describedBy}\n\t\t\t\t\t\tdata-invalid={isInvalid ? \"\" : undefined}\n\t\t\t\t\t\tclassName={cn(uiStyles.uiInputControl, styles.input, controlClassName)}\n\t\t\t\t\t\tonChange={handleInput}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</InputControl>\n\t\t</InputUI>\n\t);\n}\n\n/**\n * Числовое поле ввода с нормализацией значения и защитой от промежуточного невалидного ввода.\n */\nexport function InputNumber({\n\tlabel,\n\tdescription,\n\tdisabled,\n\tclassName,\n\tonClear,\n\terror,\n\tonClearError,\n\tonChange,\n\tvalue,\n\tsize,\n\tendAdornment,\n\tendAdornmentClassName,\n\tendAdornmentWidth,\n\t...props\n}: BaseInputProps<number | undefined>) {\n\tconst inputProps = props as InputHTMLAttributes<HTMLInputElement>;\n\tconst { controlId, labelId, descriptionId, errorId, describedBy } = useInputFieldIds({\n\t\tid: props.id,\n\t\thasLabel: label !== undefined && label !== null,\n\t\thasDescription: !!description,\n\t\thasError: !!error\n\t});\n\n\tconst [rawValue, setRawValue] = useState<string>(() => String(value));\n\t// const [internalInvalid, setInternalInvalid] = useState(false);\n\n\tconst syncRawValue = useEffectEvent((nextRaw: string) => {\n\t\tsetRawValue(nextRaw);\n\t\t// setInternalInvalid(false);\n\t});\n\n\tuseEffect(() => {\n\t\tconst nextRaw = value !== undefined && typeof value === \"number\" && !isNaN(value) ? String(value) : \"\";\n\t\tsyncRawValue(nextRaw);\n\t}, [value]);\n\n\tconst handleClear = onClear\n\t\t? () => {\n\t\t\t\tsetRawValue(\"\");\n\t\t\t\t// setInternalInvalid(false);\n\t\t\t\tonClear();\n\t\t\t}\n\t\t: undefined;\n\n\tconst handleInput = (e: React.ChangeEvent<HTMLInputElement>) => {\n\t\tconst raw = e.target.value;\n\t\tsetRawValue(raw);\n\n\t\tconst parsed = toFiniteNumber(raw); // ?? value ?? 0;\n\n\t\tonChange(parsed);\n\t\tif (error && onClearError) onClearError();\n\t};\n\n\t// const isInvalid = !!error || internalInvalid;\n\tconst resolvedEndAdornment = createEndAdornment({ endAdornment, onClear: handleClear, disabled });\n\tconst hasCustomAdornment = endAdornment !== undefined && endAdornment !== null;\n\tconst resolvedEndAdornmentWidth = resolveEndAdornmentWidth(hasCustomAdornment, !!handleClear, endAdornmentWidth);\n\n\treturn (\n\t\t<InputUI\n\t\t\tlabel={label}\n\t\t\tdescription={description}\n\t\t\tdisabled={disabled}\n\t\t\tclassName={className}\n\t\t\tsize={size}\n\t\t\terror={error}\n\t\t\tcontrolId={controlId}\n\t\t\tlabelId={labelId}\n\t\t\tdescriptionId={descriptionId}\n\t\t\terrorId={errorId}>\n\t\t\t<InputControl\n\t\t\t\tendAdornment={resolvedEndAdornment}\n\t\t\t\tendAdornmentClassName={endAdornmentClassName}\n\t\t\t\tendAdornmentWidth={resolvedEndAdornmentWidth}>\n\t\t\t\t{({ controlClassName }) => (\n\t\t\t\t\t<input\n\t\t\t\t\t\t{...inputProps}\n\t\t\t\t\t\tid={controlId}\n\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\tinputMode=\"decimal\"\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tvalue={rawValue}\n\t\t\t\t\t\t// aria-invalid={isInvalid || undefined}\n\t\t\t\t\t\taria-labelledby={labelId}\n\t\t\t\t\t\taria-describedby={describedBy}\n\t\t\t\t\t\tclassName={cn(uiStyles.uiInputControl, styles.input, styles.inputNumber, controlClassName)}\n\t\t\t\t\t\tonChange={handleInput}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</InputControl>\n\t\t</InputUI>\n\t);\n}\n\n/**\n * Совместимый алиас для `InputText`.\n */\nexport const Input = InputText;\n","import styles from \"../ui.module.scss\";\n\ninterface InputErrorComponentProps {\n\ttext: string;\n}\n\nexport function InputErrorComponent({ text }: InputErrorComponentProps) {\n\treturn <div className={styles.uiErrorElement}>{text}</div>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;ACiBA,SAAgB,EAAiB,EAAE,IAAI,GAAY,aAAU,mBAAgB,eAAoD;CAChI,IAAM,IAAS,EAAM,GACf,IAAY,KAAc,GAC1B,IAAU,IAAW,GAAG,EAAU,UAAU,KAAA,GAC5C,IAAgB,IAAiB,GAAG,EAAU,gBAAgB,KAAA,GAC9D,IAAU,IAAW,GAAG,EAAU,UAAU,KAAA;CAGlD,OAAO;EACN;EACA;EACA;EACA;EACA,aAPmB,CAAC,GAAe,CAAO,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,KAAK,KAAA;CAQ1E;AACD;;;ACSA,SAAS,EAAW,EAAE,UAAO,cAAW,cAA6E;CACpH,OACC,kBAAC,SAAD;EAAO,IAAI;EAAS,SAAS;EAAW,WAAW,EAAS;YAC1D;CACK,CAAA;AAET;AAEA,SAAgB,EAAe,EAC9B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f,EAFe,EAAe,CAErB,CAAM,GACX,KAAS,KAAc,EAAa;CACzC;CAOA,OACC,kBAAC,GAAD;EACQ;EACM;EACH;EACC;EACL;EACC;EACI;EACF;EACM;EACN;YACT,kBAAC,GAAD;GACC,cAjB0B,EAAmB;IAAE;IAAc,SAAS;IAAa;GAAS,CAiB9E;GACS;GACvB,mBAjB+B,EADP,KAA+C,MACK,CAAC,CAAC,GAAa,CAiBxE;cACjB,EAAE,0BACH,kBAAC,SAAD;IACC,GAAI;IACJ,IAAI;IACJ,MAAK;IACL,WAAU;IACA;IACV,OAAO;IAEP,mBAAiB;IACjB,oBAAkB;IAClB,WAAW,EAAG,EAAS,gBAAgB,EAAO,OAAO,EAAO,aAAa,CAAgB;IACzF,UAAU;GACV,CAAA;EAEW,CAAA;CACN,CAAA;AAEX;AAKA,IAAa,IAAQ;;;ACzXrB,SAAgB,EAAoB,EAAE,WAAkC;CACvE,OAAO,kBAAC,OAAD;EAAK,WAAW,EAAO;YAAiB;CAAU,CAAA;AAC1D"}
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./ui.module-BisoTevy.js";
2
- import { i as t, l as n, s as r } from "./input-CZLUUggm.js";
2
+ import { i as t, l as n, s as r } from "./input-BCJfUdK_.js";
3
3
  import { useCallback as i, useRef as a } from "react";
4
4
  import { cn as o, handleKeyboardActivation as s } from "@ryuzaki13/react-foundation-lib/utils";
5
5
  import { XIcon as c } from "lucide-react";
@@ -138,4 +138,4 @@ function _(c) {
138
138
  //#endregion
139
139
  export { g as n, _ as t };
140
140
 
141
- //# sourceMappingURL=input-files-aB8iaqGk.js.map
141
+ //# sourceMappingURL=input-files-Dcc5K-_1.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-files-aB8iaqGk.js","names":[],"sources":["../../src/input-files/InputFiles.module.scss","../../src/input-files/InputFilesList.tsx","../../src/input-files/InputFiles.tsx"],"sourcesContent":["/* Контрол, имитирующий внешний вид InputText */\n.control {\n\theight: var(--control-height);\n\twidth: 100%;\n\tpadding: 0 var(--space-sm);\n\tfont-size: var(--font-size-md);\n\tcursor: pointer;\n\n\tdisplay: flex;\n\talign-items: center;\n}\n\n/* Скрытый нативный input[type=\"file\"] */\n.hiddenInput {\n\tposition: absolute;\n\twidth: 0;\n\theight: 0;\n\topacity: 0;\n\toverflow: hidden;\n\tpointer-events: none;\n}\n\n/* Список выбранных файлов */\n.fileList {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--space-xs);\n\tmargin-top: var(--space-xs);\n}\n\n/* Элемент списка — строка с именем файла и кнопкой удаления */\n.fileItem {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: var(--space-xs);\n\tpadding: var(--space-xs) var(--space-sm);\n\tbackground-color: var(--surface-2);\n\tborder-radius: var(--radius-sm);\n\t// font-size: var(--font-size-sm);\n}\n\n/* Имя файла — обрезка с троеточием */\n.fileItemName {\n\tflex: 1;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n/* Кнопка удаления файла из списка */\n.removeButton {\n\tflex-shrink: 0;\n\twidth: 1.25em;\n\theight: 1.25em;\n\tcolor: var(--content-2);\n\n\t&:hover {\n\t\tcolor: var(--content-accent);\n\t}\n}\n","import { useCallback } from \"react\";\n\nimport { ReadFileResult } from \"@ryuzaki13/react-foundation-lib/file\";\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\nimport { XIcon } from \"lucide-react\";\n\nimport styles from \"./InputFiles.module.scss\";\n\ninterface InputFilesListProps<TFile extends ReadFileResult> {\n\tfiles: TFile[];\n\tonChange: (files: TFile[]) => void;\n}\n\nexport function InputFilesList<TFile extends ReadFileResult>({ files, onChange }: InputFilesListProps<TFile>) {\n\tconst handleRemove = useCallback(\n\t\t(index: number) => {\n\t\t\tonChange(files.filter((_, i) => i !== index));\n\t\t},\n\t\t[files, onChange]\n\t);\n\n\tif (!files || !files.length) return null;\n\n\treturn (\n\t\t<ul className={styles.fileList}>\n\t\t\t{files.map((item, index) => (\n\t\t\t\t<li key={`${item.meta.name}-${item.meta.lastModified}`} className={styles.fileItem}>\n\t\t\t\t\t<span className={styles.fileItemName}>{item.meta.name}</span>\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName={cn(styles.removeButton, \"flexCenter\")}\n\t\t\t\t\t\tonClick={() => handleRemove(index)}\n\t\t\t\t\t\taria-label={`Удалить ${item.meta.name}`}>\n\t\t\t\t\t\t<XIcon />\n\t\t\t\t\t</button>\n\t\t\t\t</li>\n\t\t\t))}\n\t\t</ul>\n\t);\n}\n","import { useCallback, useRef } from \"react\";\n\nimport { assertValidAccept, assertValidAllowedMime, readFile, ReadFileError, ReadFileResult } from \"@ryuzaki13/react-foundation-lib/file\";\nimport { cn, handleKeyboardActivation } from \"@ryuzaki13/react-foundation-lib/utils\";\n\nimport { InputControl, InputUI, useInputFieldIds } from \"../input\";\nimport { UiBaseProps } from \"../types\";\nimport uiStyles from \"../ui.module.scss\";\n\nimport styles from \"./InputFiles.module.scss\";\nimport { InputFilesList } from \"./InputFilesList\";\n\ninterface InputFilesCommonProps extends Omit<UiBaseProps<undefined>, \"value\" | \"onChange\"> {\n\t/** Callback ошибки чтения файла */\n\tonReadError?: (error: ReadFileError) => void;\n\n\t/** HTML-атрибут accept для нативного input[type=\"file\"] (например `[\".pdf\", \".docx\"]`) */\n\taccept?: readonly string[];\n\t/** Список допустимых MIME-типов — передаётся в readFile */\n\tallowedMime?: readonly string[];\n\t/** Максимальный размер одного файла в байтах */\n\tmaxBytes?: number;\n\t/** Максимальное количество файлов. При достижении лимита input блокируется */\n\tmaxFiles?: number;\n\n\t/** Текст ошибки под полем */\n\terror?: string;\n\t/** Callback сброса ошибки */\n\tonClearError?: () => void;\n\t/** CSS-класс обёртки */\n\tclassName?: string;\n}\n\ntype InputFilesDataUrlResult = Extract<ReadFileResult, { mode: \"data-url\" }>;\ntype InputFilesArrayBufferResult = Extract<ReadFileResult, { mode: \"array-buffer\" }>;\n\n/**\n * Пропсы компонента InputFiles.\n *\n * Компонент предназначен для выбора нескольких файлов.\n * Выбранные файлы отображаются списком под полем ввода,\n * каждый с кнопкой удаления (крестик).\n *\n * В onChange передаётся обновлённый массив результатов readFile.\n */\nexport type InputFilesProps =\n\t| (InputFilesCommonProps & {\n\t\t\tvalue: InputFilesDataUrlResult[];\n\t\t\tonChange: (value: InputFilesDataUrlResult[]) => void;\n\t\t\t/** Режим чтения: \"data-url\" по умолчанию */\n\t\t\treadMode?: \"data-url\";\n\t })\n\t| (InputFilesCommonProps & {\n\t\t\tvalue: InputFilesArrayBufferResult[];\n\t\t\tonChange: (value: InputFilesArrayBufferResult[]) => void;\n\t\t\t/** Режим чтения файла как ArrayBuffer */\n\t\t\treadMode: \"array-buffer\";\n\t });\n\n/**\n * InputFiles — компонент выбора нескольких файлов.\n *\n * Поле стилизовано как InputText. При клике открывается нативный\n * диалог с multiple. Каждый выбранный файл читается через readFile\n * и добавляется в массив value.\n *\n * Список выбранных файлов отображается под полем.\n * Каждый файл можно удалить кнопкой «крестик».\n *\n * InputFiles типизирует массив по `readMode`.\n * Если `readMode` не задан или равен `\"data-url\"`, в `value` и `onChange`\n * используется массив объектов с `dataUrl`. Если `readMode` равен\n * `\"array-buffer\"`, используется массив объектов с `buffer`.\n */\nexport function InputFiles(props: InputFilesProps) {\n\tconst {\n\t\tvalue,\n\t\tonReadError,\n\t\taccept,\n\t\tallowedMime,\n\t\tmaxBytes,\n\t\tmaxFiles,\n\t\tlabel,\n\t\tdescription,\n\t\tplaceholder = \"Выберите файлы\",\n\t\tdisabled,\n\t\tsize,\n\t\terror,\n\t\tonClearError,\n\t\tclassName\n\t} = props;\n\n\tassertValidAllowedMime(allowedMime);\n\tassertValidAccept(accept);\n\n\t/** Реф на скрытый нативный input[type=\"file\"] */\n\tconst inputRef = useRef<HTMLInputElement>(null);\n\tconst { controlId, labelId, descriptionId, errorId, describedBy } = useInputFieldIds({\n\t\thasLabel: label !== undefined && label !== null,\n\t\thasDescription: !!description,\n\t\thasError: !!error\n\t});\n\n\t/** Достигнут ли лимит файлов */\n\tconst isLimitReached = typeof maxFiles === \"number\" && value.length >= maxFiles;\n\n\t/**\n\t * Обработчик выбора файлов из нативного диалога.\n\t * Каждый файл читается через readFile.\n\t * Успешно прочитанные файлы добавляются к текущему массиву value.\n\t */\n\tconst handleChange = useCallback(\n\t\tasync (e: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\tconst files = e.target.files;\n\t\t\tif (!files || files.length === 0) return;\n\n\t\t\tconst selectedFiles = Array.from(files);\n\n\t\t\t// Сбрасываем значение input чтобы можно было выбрать те же файлы повторно\n\t\t\te.target.value = \"\";\n\n\t\t\t// Сбрасываем ошибку при выборе новых файлов\n\t\t\tif (error && onClearError) onClearError();\n\n\t\t\t// Определяем сколько файлов можно ещё добавить\n\t\t\tconst remaining = typeof maxFiles === \"number\" ? maxFiles - value.length : selectedFiles.length;\n\t\t\tconst filesToProcess = selectedFiles.slice(0, remaining);\n\n\t\t\tif (props.readMode === \"array-buffer\") {\n\t\t\t\t// Читаем файлы как ArrayBuffer и сохраняем точный тип массива для потребителя.\n\t\t\t\tconst results: InputFilesArrayBufferResult[] = [];\n\n\t\t\t\tfor (const file of filesToProcess) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst result = await readFile(file, { allowedMime, maxBytes, mode: \"array-buffer\" });\n\t\t\t\t\t\tresults.push(result);\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\tif (err instanceof ReadFileError && onReadError) {\n\t\t\t\t\t\t\tonReadError(err);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (results.length > 0) {\n\t\t\t\t\tprops.onChange([...props.value, ...results]);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Читаем файлы как Data URL и сохраняем точный тип массива для потребителя.\n\t\t\tconst results: InputFilesDataUrlResult[] = [];\n\t\t\tfor (const file of filesToProcess) {\n\t\t\t\ttry {\n\t\t\t\t\tconst result = await readFile(file, { allowedMime, maxBytes });\n\t\t\t\t\tresults.push(result);\n\t\t\t\t} catch (err) {\n\t\t\t\t\tif (err instanceof ReadFileError && onReadError) {\n\t\t\t\t\t\tonReadError(err);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (results.length > 0) {\n\t\t\t\tprops.onChange([...props.value, ...results]);\n\t\t\t}\n\t\t},\n\t\t[props, maxFiles, value.length, allowedMime, maxBytes, onReadError, error, onClearError]\n\t);\n\n\t/** Клик по видимому контролу открывает нативный диалог */\n\tconst handleClick = useCallback(() => {\n\t\tinputRef.current?.click();\n\t}, []);\n\n\tconst filesList =\n\t\tprops.readMode === \"array-buffer\" ? (\n\t\t\t<InputFilesList files={props.value} onChange={props.onChange} />\n\t\t) : (\n\t\t\t<InputFilesList files={props.value} onChange={props.onChange} />\n\t\t);\n\n\treturn (\n\t\t<InputUI\n\t\t\tlabel={label}\n\t\t\tdescription={description}\n\t\t\tdisabled={disabled}\n\t\t\tclassName={className}\n\t\t\tsize={size}\n\t\t\terror={error}\n\t\t\tcontrolId={controlId}\n\t\t\tlabelId={labelId}\n\t\t\tdescriptionId={descriptionId}\n\t\t\terrorId={errorId}>\n\t\t\t<input\n\t\t\t\tref={inputRef}\n\t\t\t\tid={controlId}\n\t\t\t\ttype=\"file\"\n\t\t\t\taccept={(accept ?? allowedMime)?.join(\",\")}\n\t\t\t\tmultiple\n\t\t\t\tdisabled={disabled || isLimitReached}\n\t\t\t\tclassName={styles.hiddenInput}\n\t\t\t\tonChange={handleChange}\n\t\t\t\ttabIndex={-1}\n\t\t\t/>\n\n\t\t\t<InputControl>\n\t\t\t\t{() => (\n\t\t\t\t\t<div\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\ttabIndex={disabled || isLimitReached ? -1 : 0}\n\t\t\t\t\t\tonClick={handleClick}\n\t\t\t\t\t\tonKeyDown={(event) => handleKeyboardActivation(event, handleClick, { disabled: disabled || isLimitReached })}\n\t\t\t\t\t\tclassName={cn(uiStyles.uiInputControl, styles.control, !!error && \"invalid\")}\n\t\t\t\t\t\tdata-disabled={disabled || undefined}\n\t\t\t\t\t\taria-invalid={!!error || undefined}\n\t\t\t\t\t\taria-disabled={disabled || isLimitReached}\n\t\t\t\t\t\taria-labelledby={labelId}\n\t\t\t\t\t\taria-describedby={describedBy}>\n\t\t\t\t\t\t<span className={uiStyles.uiPlaceholder}>{isLimitReached ? `Максимум ${maxFiles} файлов` : placeholder}</span>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</InputControl>\n\n\t\t\t{/* Список выбранных файлов */}\n\t\t\t{filesList}\n\t\t</InputUI>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;ACaA,SAAgB,EAA6C,EAAE,UAAO,eAAwC;CAC7G,IAAM,IAAe,GACnB,MAAkB;EAClB,EAAS,EAAM,QAAQ,GAAG,MAAM,MAAM,CAAK,CAAC;CAC7C,GACA,CAAC,GAAO,CAAQ,CACjB;CAIA,OAFI,CAAC,KAAS,CAAC,EAAM,SAAe,OAGnC,kBAAC,MAAD;EAAI,WAAW,EAAO;YACpB,EAAM,KAAK,GAAM,MACjB,kBAAC,MAAD;GAAwD,WAAW,EAAO;aAA1E,CACC,kBAAC,QAAD;IAAM,WAAW,EAAO;cAAe,EAAK,KAAK;GAAW,CAAA,GAC5D,kBAAC,UAAD;IACC,MAAK;IACL,WAAW,EAAG,EAAO,cAAc,YAAY;IAC/C,eAAe,EAAa,CAAK;IACjC,cAAY,WAAW,EAAK,KAAK;cACjC,kBAAC,GAAD,CAAQ,CAAA;GACD,CAAA,CACL;KATK,GAAG,EAAK,KAAK,KAAK,GAAG,EAAK,KAAK,cASpC,CACJ;CACE,CAAA;AAEN;;;ACmCA,SAAgB,EAAW,GAAwB;CAClD,IAAM,EACL,UACA,gBACA,WACA,gBACA,aACA,aACA,UACA,gBACA,iBAAc,kBACd,aACA,SACA,UACA,iBACA,iBACG;CAGJ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;EAAU,EAAM;EAAQ;EAAa;EAAU;EAAa;EAAO;CAAY,CACxF,GAGM,IAAc,QAAkB;EACrC,EAAS,SAAS,MAAM;CACzB,GAAG,CAAC,CAAC,GAEC,KACL,EAAM,UACL,kBAAC,GAAD;EAAgB,OAAO,EAAM;EAAO,UAAU,EAAM;CAAW,CAAA;CAKjE,OACC,kBAAC,GAAD;EACQ;EACM;EACH;EACC;EACL;EACC;EACI;EACF;EACM;EACN;YAVV;GAWC,kBAAC,SAAD;IACC,KAAK;IACL,IAAI;IACJ,MAAK;IACL,SAAS,KAAU,EAAA,EAAc,KAAK,GAAG;IACzC,UAAA;IACA,UAAU,KAAY;IACtB,WAAW,EAAO;IAClB,UAAU;IACV,UAAU;GACV,CAAA;GAED,kBAAC,GAAD,EAAA,gBAEE,kBAAC,OAAD;IACC,MAAK;IACL,UAAU,KAAY,IAAiB,KAAK;IAC5C,SAAS;IACT,YAAY,MAAU,EAAyB,GAAO,GAAa,EAAE,UAAU,KAAY,EAAe,CAAC;IAC3G,WAAW,EAAG,EAAS,gBAAgB,EAAO,SAAS,CAAC,CAAC,KAAS,SAAS;IAC3E,iBAAe,KAAY,KAAA;IAC3B,gBAAc,CAAC,CAAC,KAAS,KAAA;IACzB,iBAAe,KAAY;IAC3B,mBAAiB;IACjB,oBAAkB;cAClB,kBAAC,QAAD;KAAM,WAAW,EAAS;eAAgB,IAAiB,YAAY,EAAS,WAAW;IAAkB,CAAA;GACzG,CAAA,EAEO,CAAA;GAGb;EACO;;AAEX"}
1
+ {"version":3,"file":"input-files-Dcc5K-_1.js","names":[],"sources":["../../src/input-files/InputFiles.module.scss","../../src/input-files/InputFilesList.tsx","../../src/input-files/InputFiles.tsx"],"sourcesContent":["/* Контрол, имитирующий внешний вид InputText */\n.control {\n\theight: var(--control-height);\n\twidth: 100%;\n\tpadding: 0 var(--space-sm);\n\tfont-size: var(--font-size-md);\n\tcursor: pointer;\n\n\tdisplay: flex;\n\talign-items: center;\n}\n\n/* Скрытый нативный input[type=\"file\"] */\n.hiddenInput {\n\tposition: absolute;\n\twidth: 0;\n\theight: 0;\n\topacity: 0;\n\toverflow: hidden;\n\tpointer-events: none;\n}\n\n/* Список выбранных файлов */\n.fileList {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--space-xs);\n\tmargin-top: var(--space-xs);\n}\n\n/* Элемент списка — строка с именем файла и кнопкой удаления */\n.fileItem {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: var(--space-xs);\n\tpadding: var(--space-xs) var(--space-sm);\n\tbackground-color: var(--surface-2);\n\tborder-radius: var(--radius-sm);\n\t// font-size: var(--font-size-sm);\n}\n\n/* Имя файла — обрезка с троеточием */\n.fileItemName {\n\tflex: 1;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n/* Кнопка удаления файла из списка */\n.removeButton {\n\tflex-shrink: 0;\n\twidth: 1.25em;\n\theight: 1.25em;\n\tcolor: var(--content-2);\n\n\t&:hover {\n\t\tcolor: var(--content-accent);\n\t}\n}\n","import { useCallback } from \"react\";\n\nimport { ReadFileResult } from \"@ryuzaki13/react-foundation-lib/file\";\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\nimport { XIcon } from \"lucide-react\";\n\nimport styles from \"./InputFiles.module.scss\";\n\ninterface InputFilesListProps<TFile extends ReadFileResult> {\n\tfiles: TFile[];\n\tonChange: (files: TFile[]) => void;\n}\n\nexport function InputFilesList<TFile extends ReadFileResult>({ files, onChange }: InputFilesListProps<TFile>) {\n\tconst handleRemove = useCallback(\n\t\t(index: number) => {\n\t\t\tonChange(files.filter((_, i) => i !== index));\n\t\t},\n\t\t[files, onChange]\n\t);\n\n\tif (!files || !files.length) return null;\n\n\treturn (\n\t\t<ul className={styles.fileList}>\n\t\t\t{files.map((item, index) => (\n\t\t\t\t<li key={`${item.meta.name}-${item.meta.lastModified}`} className={styles.fileItem}>\n\t\t\t\t\t<span className={styles.fileItemName}>{item.meta.name}</span>\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName={cn(styles.removeButton, \"flexCenter\")}\n\t\t\t\t\t\tonClick={() => handleRemove(index)}\n\t\t\t\t\t\taria-label={`Удалить ${item.meta.name}`}>\n\t\t\t\t\t\t<XIcon />\n\t\t\t\t\t</button>\n\t\t\t\t</li>\n\t\t\t))}\n\t\t</ul>\n\t);\n}\n","import { useCallback, useRef } from \"react\";\n\nimport { assertValidAccept, assertValidAllowedMime, readFile, ReadFileError, ReadFileResult } from \"@ryuzaki13/react-foundation-lib/file\";\nimport { cn, handleKeyboardActivation } from \"@ryuzaki13/react-foundation-lib/utils\";\n\nimport { InputControl, InputUI, useInputFieldIds } from \"../input\";\nimport { UiBaseProps } from \"../types\";\nimport uiStyles from \"../ui.module.scss\";\n\nimport styles from \"./InputFiles.module.scss\";\nimport { InputFilesList } from \"./InputFilesList\";\n\ninterface InputFilesCommonProps extends Omit<UiBaseProps<undefined>, \"value\" | \"onChange\"> {\n\t/** Callback ошибки чтения файла */\n\tonReadError?: (error: ReadFileError) => void;\n\n\t/** HTML-атрибут accept для нативного input[type=\"file\"] (например `[\".pdf\", \".docx\"]`) */\n\taccept?: readonly string[];\n\t/** Список допустимых MIME-типов — передаётся в readFile */\n\tallowedMime?: readonly string[];\n\t/** Максимальный размер одного файла в байтах */\n\tmaxBytes?: number;\n\t/** Максимальное количество файлов. При достижении лимита input блокируется */\n\tmaxFiles?: number;\n\n\t/** Текст ошибки под полем */\n\terror?: string;\n\t/** Callback сброса ошибки */\n\tonClearError?: () => void;\n\t/** CSS-класс обёртки */\n\tclassName?: string;\n}\n\ntype InputFilesDataUrlResult = Extract<ReadFileResult, { mode: \"data-url\" }>;\ntype InputFilesArrayBufferResult = Extract<ReadFileResult, { mode: \"array-buffer\" }>;\n\n/**\n * Пропсы компонента InputFiles.\n *\n * Компонент предназначен для выбора нескольких файлов.\n * Выбранные файлы отображаются списком под полем ввода,\n * каждый с кнопкой удаления (крестик).\n *\n * В onChange передаётся обновлённый массив результатов readFile.\n */\nexport type InputFilesProps =\n\t| (InputFilesCommonProps & {\n\t\t\tvalue: InputFilesDataUrlResult[];\n\t\t\tonChange: (value: InputFilesDataUrlResult[]) => void;\n\t\t\t/** Режим чтения: \"data-url\" по умолчанию */\n\t\t\treadMode?: \"data-url\";\n\t })\n\t| (InputFilesCommonProps & {\n\t\t\tvalue: InputFilesArrayBufferResult[];\n\t\t\tonChange: (value: InputFilesArrayBufferResult[]) => void;\n\t\t\t/** Режим чтения файла как ArrayBuffer */\n\t\t\treadMode: \"array-buffer\";\n\t });\n\n/**\n * InputFiles — компонент выбора нескольких файлов.\n *\n * Поле стилизовано как InputText. При клике открывается нативный\n * диалог с multiple. Каждый выбранный файл читается через readFile\n * и добавляется в массив value.\n *\n * Список выбранных файлов отображается под полем.\n * Каждый файл можно удалить кнопкой «крестик».\n *\n * InputFiles типизирует массив по `readMode`.\n * Если `readMode` не задан или равен `\"data-url\"`, в `value` и `onChange`\n * используется массив объектов с `dataUrl`. Если `readMode` равен\n * `\"array-buffer\"`, используется массив объектов с `buffer`.\n */\nexport function InputFiles(props: InputFilesProps) {\n\tconst {\n\t\tvalue,\n\t\tonReadError,\n\t\taccept,\n\t\tallowedMime,\n\t\tmaxBytes,\n\t\tmaxFiles,\n\t\tlabel,\n\t\tdescription,\n\t\tplaceholder = \"Выберите файлы\",\n\t\tdisabled,\n\t\tsize,\n\t\terror,\n\t\tonClearError,\n\t\tclassName\n\t} = props;\n\n\tassertValidAllowedMime(allowedMime);\n\tassertValidAccept(accept);\n\n\t/** Реф на скрытый нативный input[type=\"file\"] */\n\tconst inputRef = useRef<HTMLInputElement>(null);\n\tconst { controlId, labelId, descriptionId, errorId, describedBy } = useInputFieldIds({\n\t\thasLabel: label !== undefined && label !== null,\n\t\thasDescription: !!description,\n\t\thasError: !!error\n\t});\n\n\t/** Достигнут ли лимит файлов */\n\tconst isLimitReached = typeof maxFiles === \"number\" && value.length >= maxFiles;\n\n\t/**\n\t * Обработчик выбора файлов из нативного диалога.\n\t * Каждый файл читается через readFile.\n\t * Успешно прочитанные файлы добавляются к текущему массиву value.\n\t */\n\tconst handleChange = useCallback(\n\t\tasync (e: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\tconst files = e.target.files;\n\t\t\tif (!files || files.length === 0) return;\n\n\t\t\tconst selectedFiles = Array.from(files);\n\n\t\t\t// Сбрасываем значение input чтобы можно было выбрать те же файлы повторно\n\t\t\te.target.value = \"\";\n\n\t\t\t// Сбрасываем ошибку при выборе новых файлов\n\t\t\tif (error && onClearError) onClearError();\n\n\t\t\t// Определяем сколько файлов можно ещё добавить\n\t\t\tconst remaining = typeof maxFiles === \"number\" ? maxFiles - value.length : selectedFiles.length;\n\t\t\tconst filesToProcess = selectedFiles.slice(0, remaining);\n\n\t\t\tif (props.readMode === \"array-buffer\") {\n\t\t\t\t// Читаем файлы как ArrayBuffer и сохраняем точный тип массива для потребителя.\n\t\t\t\tconst results: InputFilesArrayBufferResult[] = [];\n\n\t\t\t\tfor (const file of filesToProcess) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst result = await readFile(file, { allowedMime, maxBytes, mode: \"array-buffer\" });\n\t\t\t\t\t\tresults.push(result);\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\tif (err instanceof ReadFileError && onReadError) {\n\t\t\t\t\t\t\tonReadError(err);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (results.length > 0) {\n\t\t\t\t\tprops.onChange([...props.value, ...results]);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Читаем файлы как Data URL и сохраняем точный тип массива для потребителя.\n\t\t\tconst results: InputFilesDataUrlResult[] = [];\n\t\t\tfor (const file of filesToProcess) {\n\t\t\t\ttry {\n\t\t\t\t\tconst result = await readFile(file, { allowedMime, maxBytes });\n\t\t\t\t\tresults.push(result);\n\t\t\t\t} catch (err) {\n\t\t\t\t\tif (err instanceof ReadFileError && onReadError) {\n\t\t\t\t\t\tonReadError(err);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (results.length > 0) {\n\t\t\t\tprops.onChange([...props.value, ...results]);\n\t\t\t}\n\t\t},\n\t\t[props, maxFiles, value.length, allowedMime, maxBytes, onReadError, error, onClearError]\n\t);\n\n\t/** Клик по видимому контролу открывает нативный диалог */\n\tconst handleClick = useCallback(() => {\n\t\tinputRef.current?.click();\n\t}, []);\n\n\tconst filesList =\n\t\tprops.readMode === \"array-buffer\" ? (\n\t\t\t<InputFilesList files={props.value} onChange={props.onChange} />\n\t\t) : (\n\t\t\t<InputFilesList files={props.value} onChange={props.onChange} />\n\t\t);\n\n\treturn (\n\t\t<InputUI\n\t\t\tlabel={label}\n\t\t\tdescription={description}\n\t\t\tdisabled={disabled}\n\t\t\tclassName={className}\n\t\t\tsize={size}\n\t\t\terror={error}\n\t\t\tcontrolId={controlId}\n\t\t\tlabelId={labelId}\n\t\t\tdescriptionId={descriptionId}\n\t\t\terrorId={errorId}>\n\t\t\t<input\n\t\t\t\tref={inputRef}\n\t\t\t\tid={controlId}\n\t\t\t\ttype=\"file\"\n\t\t\t\taccept={(accept ?? allowedMime)?.join(\",\")}\n\t\t\t\tmultiple\n\t\t\t\tdisabled={disabled || isLimitReached}\n\t\t\t\tclassName={styles.hiddenInput}\n\t\t\t\tonChange={handleChange}\n\t\t\t\ttabIndex={-1}\n\t\t\t/>\n\n\t\t\t<InputControl>\n\t\t\t\t{() => (\n\t\t\t\t\t<div\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\ttabIndex={disabled || isLimitReached ? -1 : 0}\n\t\t\t\t\t\tonClick={handleClick}\n\t\t\t\t\t\tonKeyDown={(event) => handleKeyboardActivation(event, handleClick, { disabled: disabled || isLimitReached })}\n\t\t\t\t\t\tclassName={cn(uiStyles.uiInputControl, styles.control, !!error && \"invalid\")}\n\t\t\t\t\t\tdata-disabled={disabled || undefined}\n\t\t\t\t\t\taria-invalid={!!error || undefined}\n\t\t\t\t\t\taria-disabled={disabled || isLimitReached}\n\t\t\t\t\t\taria-labelledby={labelId}\n\t\t\t\t\t\taria-describedby={describedBy}>\n\t\t\t\t\t\t<span className={uiStyles.uiPlaceholder}>{isLimitReached ? `Максимум ${maxFiles} файлов` : placeholder}</span>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</InputControl>\n\n\t\t\t{/* Список выбранных файлов */}\n\t\t\t{filesList}\n\t\t</InputUI>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;ACaA,SAAgB,EAA6C,EAAE,UAAO,eAAwC;CAC7G,IAAM,IAAe,GACnB,MAAkB;EAClB,EAAS,EAAM,QAAQ,GAAG,MAAM,MAAM,CAAK,CAAC;CAC7C,GACA,CAAC,GAAO,CAAQ,CACjB;CAIA,OAFI,CAAC,KAAS,CAAC,EAAM,SAAe,OAGnC,kBAAC,MAAD;EAAI,WAAW,EAAO;YACpB,EAAM,KAAK,GAAM,MACjB,kBAAC,MAAD;GAAwD,WAAW,EAAO;aAA1E,CACC,kBAAC,QAAD;IAAM,WAAW,EAAO;cAAe,EAAK,KAAK;GAAW,CAAA,GAC5D,kBAAC,UAAD;IACC,MAAK;IACL,WAAW,EAAG,EAAO,cAAc,YAAY;IAC/C,eAAe,EAAa,CAAK;IACjC,cAAY,WAAW,EAAK,KAAK;cACjC,kBAAC,GAAD,CAAQ,CAAA;GACD,CAAA,CACL;KATK,GAAG,EAAK,KAAK,KAAK,GAAG,EAAK,KAAK,cASpC,CACJ;CACE,CAAA;AAEN;;;ACmCA,SAAgB,EAAW,GAAwB;CAClD,IAAM,EACL,UACA,gBACA,WACA,gBACA,aACA,aACA,UACA,gBACA,iBAAc,kBACd,aACA,SACA,UACA,iBACA,iBACG;CAGJ,AADA,EAAuB,CAAW,GAClC,EAAkB,CAAM;CAGxB,IAAM,IAAW,EAAyB,IAAI,GACxC,EAAE,cAAW,YAAS,kBAAe,YAA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AAG,CAAC,CAAC,GAEC,KACL,EAAM,UACL,kBAAC,GAAD;EAAgB,OAAO,EAAM;EAAO,UAAU,EAAM;CAAW,CAAA;CAKjE,OACC,kBAAC,GAAD;EACQ;EACM;EACH;EACC;EACL;EACC;EACI;EACF;EACM;EACN;YAVV;GAWC,kBAAC,SAAD;IACC,KAAK;IACL,IAAI;IACJ,MAAK;IACL,SAAS,KAAU,EAAA,EAAc,KAAK,GAAG;IACzC,UAAA;IACA,UAAU,KAAY;IACtB,WAAW,EAAO;IAClB,UAAU;IACV,UAAU;GACV,CAAA;GAED,kBAAC,GAAD,EAAA,gBAEE,kBAAC,OAAD;IACC,MAAK;IACL,UAAU,KAAY,IAAiB,KAAK;IAC5C,SAAS;IACT,YAAY,MAAU,EAAyB,GAAO,GAAa,EAAE,UAAU,KAAY,EAAe,CAAC;IAC3G,WAAW,EAAG,EAAS,gBAAgB,EAAO,SAAS,CAAC,CAAC,KAAS,SAAS;IAC3E,iBAAe,KAAY,KAAA;IAC3B,gBAAc,CAAC,CAAC,KAAS,KAAA;IACzB,iBAAe,KAAY;IAC3B,mBAAiB;IACjB,oBAAkB;cAClB,kBAAC,QAAD;KAAM,WAAW,EAAS;eAAgB,IAAiB,YAAY,EAAS,WAAW;IAAkB,CAAA;GACzG,CAAA,EAEO,CAAA;GAGb;EACO;;AAEX"}
@@ -1,4 +1,4 @@
1
- import { n as e } from "./input-CZLUUggm.js";
1
+ import { n as e } from "./input-BCJfUdK_.js";
2
2
  import { useState as t } from "react";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  //#region src/input-search/InputSearch.tsx
@@ -27,4 +27,4 @@ function r({ onChange: r, ...i }) {
27
27
  //#endregion
28
28
  export { r as t };
29
29
 
30
- //# sourceMappingURL=input-search-eMvnvgV0.js.map
30
+ //# sourceMappingURL=input-search-B7HmrAM7.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-search-eMvnvgV0.js","names":[],"sources":["../../src/input-search/InputSearch.tsx"],"sourcesContent":["import React, { useState } from \"react\";\n\nimport { BaseInputProps, Input } from \"../input\";\n\ninterface SearchInputProps extends BaseInputProps<string> {\n\tonChange: (value: string) => void;\n}\n\nexport function InputSearch({ onChange, ...props }: SearchInputProps) {\n\tconst [searchTerm, setSearchTerm] = useState(() => props.defaultValue ?? props.value ?? \"\");\n\tconst [previousSearch, setPreviousSearch] = useState(() => props.defaultValue ?? props.value ?? \"\");\n\n\tconst handleSearch = (term: string) => {\n\t\tconst changedTerm = term.trim();\n\n\t\t// Проверяем, изменилось ли значение с предыдущего поиска\n\t\tif (changedTerm === previousSearch) return;\n\n\t\tsetPreviousSearch(changedTerm);\n\t\tonChange(changedTerm);\n\t};\n\n\tconst handleClear = () => {\n\t\tsetSearchTerm(\"\");\n\t\tsetPreviousSearch(\"\");\n\t\tonChange(\"\");\n\t};\n\n\tconst handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n\t\tif (event.key === \"Enter\") {\n\t\t\tevent.preventDefault();\n\t\t\thandleSearch(searchTerm);\n\t\t}\n\t};\n\n\tconst handleBlur = () => {\n\t\thandleSearch(searchTerm);\n\t};\n\n\tconst handleChange = (value: string) => {\n\t\tsetSearchTerm(value);\n\t\t// Не вызываем onSearch здесь - только по Enter/blur\n\t};\n\n\treturn (\n\t\t<Input {...props} value={searchTerm} onChange={handleChange} onKeyDown={handleKeyDown} onBlur={handleBlur} onClear={handleClear} />\n\t);\n}\n"],"mappings":";;;;AAQA,SAAgB,EAAY,EAAE,aAAU,GAAG,KAA2B;CACrE,IAAM,CAAC,GAAY,KAAiB,QAAe,EAAM,gBAAgB,EAAM,SAAS,EAAE,GACpF,CAAC,GAAgB,KAAqB,QAAe,EAAM,gBAAgB,EAAM,SAAS,EAAE,GAE5F,KAAgB,MAAiB;EACtC,IAAM,IAAc,EAAK,KAAK;EAG1B,MAAgB,MAEpB,EAAkB,CAAW,GAC7B,EAAS,CAAW;CACrB,GAEM,UAAoB;EAGzB,AAFA,EAAc,EAAE,GAChB,EAAkB,EAAE,GACpB,EAAS,EAAE;CACZ,GAEM,KAAiB,MAAiD;EACvE,AAAI,EAAM,QAAQ,YACjB,EAAM,eAAe,GACrB,EAAa,CAAU;CAEzB,GAEM,UAAmB;EACxB,EAAa,CAAU;CACxB,GAEM,KAAgB,MAAkB;EACvC,EAAc,CAAK;CAEpB;CAEA,OACC,kBAAC,GAAD;EAAO,GAAI;EAAO,OAAO;EAAY,UAAU;EAAc,WAAW;EAAe,QAAQ;EAAY,SAAS;CAAc,CAAA;AAEpI"}
1
+ {"version":3,"file":"input-search-B7HmrAM7.js","names":[],"sources":["../../src/input-search/InputSearch.tsx"],"sourcesContent":["import React, { useState } from \"react\";\n\nimport { BaseInputProps, Input } from \"../input\";\n\ninterface SearchInputProps extends BaseInputProps<string> {\n\tonChange: (value: string) => void;\n}\n\nexport function InputSearch({ onChange, ...props }: SearchInputProps) {\n\tconst [searchTerm, setSearchTerm] = useState(() => props.defaultValue ?? props.value ?? \"\");\n\tconst [previousSearch, setPreviousSearch] = useState(() => props.defaultValue ?? props.value ?? \"\");\n\n\tconst handleSearch = (term: string) => {\n\t\tconst changedTerm = term.trim();\n\n\t\t// Проверяем, изменилось ли значение с предыдущего поиска\n\t\tif (changedTerm === previousSearch) return;\n\n\t\tsetPreviousSearch(changedTerm);\n\t\tonChange(changedTerm);\n\t};\n\n\tconst handleClear = () => {\n\t\tsetSearchTerm(\"\");\n\t\tsetPreviousSearch(\"\");\n\t\tonChange(\"\");\n\t};\n\n\tconst handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n\t\tif (event.key === \"Enter\") {\n\t\t\tevent.preventDefault();\n\t\t\thandleSearch(searchTerm);\n\t\t}\n\t};\n\n\tconst handleBlur = () => {\n\t\thandleSearch(searchTerm);\n\t};\n\n\tconst handleChange = (value: string) => {\n\t\tsetSearchTerm(value);\n\t\t// Не вызываем onSearch здесь - только по Enter/blur\n\t};\n\n\treturn (\n\t\t<Input {...props} value={searchTerm} onChange={handleChange} onKeyDown={handleKeyDown} onBlur={handleBlur} onClear={handleClear} />\n\t);\n}\n"],"mappings":";;;;AAQA,SAAgB,EAAY,EAAE,aAAU,GAAG,KAA2B;CACrE,IAAM,CAAC,GAAY,KAAiB,QAAe,EAAM,gBAAgB,EAAM,SAAS,EAAE,GACpF,CAAC,GAAgB,KAAqB,QAAe,EAAM,gBAAgB,EAAM,SAAS,EAAE,GAE5F,KAAgB,MAAiB;EACtC,IAAM,IAAc,EAAK,KAAK;EAG1B,MAAgB,MAEpB,EAAkB,CAAW,GAC7B,EAAS,CAAW;CACrB,GAEM,UAAoB;EAGzB,AAFA,EAAc,EAAE,GAChB,EAAkB,EAAE,GACpB,EAAS,EAAE;CACZ,GAEM,KAAiB,MAAiD;EACvE,AAAI,EAAM,QAAQ,YACjB,EAAM,eAAe,GACrB,EAAa,CAAU;CAEzB,GAEM,UAAmB;EACxB,EAAa,CAAU;CACxB,GAEM,KAAgB,MAAkB;EACvC,EAAc,CAAK;CAEpB;CAEA,OACC,kBAAC,GAAD;EAAO,GAAI;EAAO,OAAO;EAAY,UAAU;EAAc,WAAW;EAAe,QAAQ;EAAY,SAAS;CAAc,CAAA;AAEpI"}
@@ -1 +1 @@
1
- {"version":3,"file":"misc-DIF5h9ba.js","names":[],"sources":["../../src/misc/AnimatedLogo.module.scss","../../src/misc/AnimatedLogo.tsx","../../src/misc/AnimatedLogoSegment.tsx","../../src/misc/CopyTextWrapper.tsx","../../src/misc/IconWrapper.module.scss","../../src/misc/IconWrapper.tsx","../../src/misc/LoadingMessage.module.scss","../../src/misc/Message.tsx","../../src/misc/LoadingMessage.tsx","../../src/misc/LazyDynamicComponent.tsx","../../src/misc/SkeletonLine.tsx","../../src/misc/LazyValue.tsx","../../src/misc/NoData.tsx","../../src/misc/Notice.tsx","../../src/misc/OneStepScroller.module.scss","../../src/misc/OneStepScroller.tsx","../../src/misc/Scrollable.tsx","../../src/misc/State.module.scss","../../src/misc/StateIcon.tsx","../../src/misc/StateWrapper.tsx"],"sourcesContent":[".logo {\n\tmax-width: 10em;\n\tmargin: var(--space-md) auto;\n\n\tsvg {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\theight: auto;\n\t}\n}\n\n.segment {\n\topacity: 0.22;\n\tanimation: pulseSteps 1.8s ease-in-out infinite;\n}\n\n@keyframes pulseSteps {\n\t0% {\n\t\topacity: 0.2;\n\t}\n\n\t35%,\n\t55% {\n\t\topacity: 1;\n\t}\n\n\t100% {\n\t\topacity: 0.2;\n\t}\n}\n\n@media (prefers-reduced-motion: reduce) {\n\t.segment {\n\t\tanimation: none;\n\t\topacity: 1;\n\t}\n}\n","import { type ComponentPropsWithoutRef, type ReactNode } from \"react\";\n\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\n\nimport styles from \"./AnimatedLogo.module.scss\";\n\ntype AnimatedLogoProps = Omit<ComponentPropsWithoutRef<\"div\">, \"children\"> & {\n\tchildren: ReactNode;\n};\n\n/**\n * Контейнер анимированного логотипа без брендовой SVG-разметки.\n * Host-проект передаёт собственный `svg`, а его визуальные части оборачивает в `AnimatedLogoSegment`.\n */\nexport function AnimatedLogo({ children, className, ...htmlProps }: AnimatedLogoProps) {\n\treturn (\n\t\t<div {...htmlProps} className={cn(styles.logo, className)}>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n","import { type ComponentPropsWithoutRef, type ReactNode } from \"react\";\n\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\n\nimport styles from \"./AnimatedLogo.module.scss\";\n\ntype AnimatedLogoSegmentProps = Omit<ComponentPropsWithoutRef<\"g\">, \"children\"> & {\n\tchildren: ReactNode;\n\torder: number;\n};\n\n/**\n * Анимирует одну смысловую часть host-логотипа и сдвигает её pulse относительно предыдущих частей.\n * `order` задаётся с нуля в визуальной последовательности сегментов и преобразуется в шаг задержки 200 мс.\n */\nexport function AnimatedLogoSegment({ children, className, order, style, ...svgGroupProps }: AnimatedLogoSegmentProps) {\n\treturn (\n\t\t<g {...svgGroupProps} className={cn(styles.segment, className)} style={{ ...style, animationDelay: `${order * 200}ms` }}>\n\t\t\t{children}\n\t\t</g>\n\t);\n}\n","import { Placement } from \"@floating-ui/react\";\nimport { useCopyElementTextWithFeedback } from \"@ryuzaki13/react-foundation-lib/copy\";\nimport { CheckCheckIcon, CopyIcon } from \"lucide-react\";\n\nimport { FloatingPopover } from \"../popover\";\n\ninterface CopyTextWrapperProps {\n\tchildren: React.ReactNode;\n\tposition?: Placement;\n\tshowOnHover?: boolean;\n\tclassName?: string;\n}\n\nexport const CopyTextWrapper: React.FC<CopyTextWrapperProps> = ({ children, position = \"top\", showOnHover = true, className }) => {\n\tconst { containerRef, copyElementText, isCopied } = useCopyElementTextWithFeedback<HTMLSpanElement>();\n\n\treturn (\n\t\t<span ref={containerRef} className={className}>\n\t\t\t{children}\n\t\t\t<FloatingPopover openOnHover={showOnHover} placement={position} content={isCopied ? \"Скопировано!\" : \"Копировать текст\"}>\n\t\t\t\t<button onClick={copyElementText} aria-label={isCopied ? \"Скопировано!\" : \"Копировать текст\"}>\n\t\t\t\t\t{isCopied ? <CheckCheckIcon className=\"block statusSuccess\" /> : <CopyIcon className=\"block statusInfo\" />}\n\t\t\t\t</button>\n\t\t\t</FloatingPopover>\n\t\t</span>\n\t);\n};\n",".wrapper {\n\twidth: var(--control-height);\n\theight: var(--control-height);\n\tmargin: auto;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n","import { ReactNode } from \"react\";\n\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\n\nimport styles from \"./IconWrapper.module.scss\";\n\ninterface IconWrapperProps {\n\tchildren: ReactNode;\n\tclassName?: string;\n}\n\nexport function IconWrapper({ className, children }: IconWrapperProps) {\n\treturn <div className={cn(styles.wrapper, className)}>{children}</div>;\n}\n",".componentLoader {\n\tmin-height: 10em;\n}\n","import { PropsWithChildren } from \"react\";\n\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\n\nimport { FlexCenter } from \"../flex\";\nimport { Text, TextColor } from \"../text\";\n\ninterface MessageProps extends PropsWithChildren {\n\tclassName?: string;\n\tcolor?: TextColor;\n\tminHeight?: string | number;\n\tuppercase?: boolean;\n}\n\nexport const Message: React.FC<MessageProps> = ({ className, children, color = \"muted\", minHeight, uppercase = true }) => (\n\t<FlexCenter className={cn(\"paddingMd textCenter\", className)} minHeight={minHeight}>\n\t\t<Text as=\"div\" weight=\"bold\" color={color} uppercase={uppercase}>\n\t\t\t{children}\n\t\t</Text>\n\t</FlexCenter>\n);\n","import { type ReactNode } from \"react\";\n\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\n\nimport styles from \"./LoadingMessage.module.scss\";\nimport { Message } from \"./Message\";\n\ntype LoadingMessageProps = {\n\tclassName?: string;\n\t/** Готовый брендовый знак, которым host-проект при необходимости дополняет сообщение о загрузке. */\n\tlogo?: ReactNode;\n\ttext?: string;\n};\n\nexport function LoadingMessage({ className, logo, text }: LoadingMessageProps) {\n\treturn (\n\t\t<Message className={cn(styles.componentLoader, logo ? undefined : \"skeletonLine\", className)}>\n\t\t\t{logo}\n\n\t\t\t{text || \"Загрузка...\"}\n\t\t</Message>\n\t);\n}\n","import { Suspense, useSyncExternalStore, type ComponentType, type ReactNode } from \"react\";\n\nimport { useLazyComponent } from \"@ryuzaki13/react-foundation-lib/hooks\";\n\nimport { LoadingMessage } from \"./LoadingMessage\";\n\ntype LazyDynamicComponentProps<T extends object> = {\n\timportFunc: () => Promise<Record<string, ComponentType<T>> | null>;\n\tcomponentName: string;\n\tcacheKey?: string;\n\tclientOnly?: boolean;\n\tfallback?: ReactNode;\n\tprops?: T;\n};\n\nconst subscribeClientOnlyMount = (onStoreChange: () => void) => {\n\tonStoreChange();\n\n\treturn () => undefined;\n};\n\nconst getClientSnapshot = () => true;\nconst getServerSnapshot = () => false;\n\n/**\n * Компонент ленивой загрузки динамически импортируемого React-компонента. Позволяет отложить загрузку тяжелых частей интерфейса до момента использования.\n */\nexport function LazyDynamicComponent<T extends object>({\n\tfallback,\n\timportFunc,\n\tcomponentName,\n\tclientOnly = false,\n\tcacheKey,\n\tprops\n}: LazyDynamicComponentProps<T>) {\n\tconst Component = useLazyComponent(importFunc, componentName, cacheKey);\n\tconst isClient = useSyncExternalStore(subscribeClientOnlyMount, getClientSnapshot, getServerSnapshot);\n\n\tconst fallbackNode = fallback ?? <LoadingMessage text=\"Ожидание компонента...\" />;\n\n\t// Client-only режим нужен для браузерных модулей, которые нельзя даже пытаться импортировать во время SSR.\n\tif (clientOnly && !isClient) return fallbackNode;\n\n\treturn (\n\t\t<Suspense fallback={fallbackNode}>\n\t\t\t{/* eslint-disable-next-line react-hooks/static-components */}\n\t\t\t<Component {...(props ?? ({} as T))} />\n\t\t</Suspense>\n\t);\n}\n","import React from \"react\";\n\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\n\nimport { PolymorphicComponent, PolymorphicComponentBaseProps } from \"../polymorphic\";\n\ntype SkeletonLineOwnProps<E extends React.ElementType = React.ElementType> = PolymorphicComponentBaseProps<E> & {\n\tclassName?: string;\n};\n\ntype SkeletonLineProps<E extends React.ElementType> = SkeletonLineOwnProps<E> &\n\tOmit<React.ComponentPropsWithRef<E>, keyof SkeletonLineOwnProps>;\n\nexport const SkeletonLine = <E extends React.ElementType>({ as, className, ...props }: SkeletonLineProps<E>) => {\n\tconst Component = as || \"div\";\n\n\treturn (\n\t\t<PolymorphicComponent\n\t\t\tas={Component as React.ElementType}\n\t\t\tclassName={cn(\"skeletonLine colorTransparent radiusSm\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n","import React from \"react\";\n\nimport { SkeletonLine } from \"./SkeletonLine\";\n\ninterface LazyValueProps {\n\tvalue: React.ReactNode;\n\tisLoading?: boolean;\n}\n\nexport function LazyValue({ value, isLoading }: LazyValueProps) {\n\treturn isLoading ? <SkeletonLine>Загрузка...</SkeletonLine> : (value ?? \"-\");\n}\n","import { Message } from \"./Message\";\n\ninterface NoDataProps {\n\tclassName?: string;\n\ttext?: string;\n\tminHeight?: string | number;\n}\n\nexport const NoData = ({ className, text, minHeight = \"5em\" }: NoDataProps) => {\n\treturn (\n\t\t<Message className={className} color=\"muted\" minHeight={minHeight}>\n\t\t\t{text || \"Нет данных\"}\n\t\t</Message>\n\t);\n};\n","import { PropsWithChildren } from \"react\";\n\nimport { Message } from \"./Message\";\n\ninterface NoticeProps extends PropsWithChildren {\n\tisError?: boolean;\n\tclassName?: string;\n}\n\nexport const Notice: React.FC<NoticeProps> = ({ className, isError, children }) => (\n\t<Message className={className} color={isError ? \"error\" : \"secondary\"}>\n\t\t{children}\n\t</Message>\n);\n",".oneStepScroller {\n\toverflow: hidden;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: var(--space-xs);\n\tmin-width: 0;\n}\n\n.ossViewport {\n\toverflow: hidden;\n\toutline: none;\n\tmin-width: 0;\n\tflex: 1 1 auto;\n}\n\n.ossScroller {\n\tdisplay: flex;\n\tflex-wrap: nowrap;\n\tgap: var(--space-sm);\n\talign-items: end;\n\toverflow-x: auto;\n\toverflow-y: hidden;\n\tscroll-behavior: smooth;\n\t-webkit-overflow-scrolling: touch;\n\tscrollbar-width: none; /* firefox */\n\n\t::-webkit-scrollbar {\n\t\theight: 0;\n\t}\n}\n\n.ossButton {\n\t// position: absolute;\n\ttop: 0;\n\tz-index: 10;\n\twidth: var(--control-height);\n\theight: 100%;\n\tflex: 0 0 var(--control-height);\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\t// border: var(--border);\n\tborder-radius: var(--radius-sm);\n\tcolor: var(--content-2);\n\t// background-color: var(--surface-0);\n\t// opacity: 0.75;\n\n\ttransition-property: opacity, color;\n\ttransition-duration: var(--transition-fast);\n\n\t&:hover {\n\t\topacity: 1;\n\t\tcolor: var(--content-0);\n\t}\n\n\t&:disabled {\n\t\topacity: 0.5;\n\t\tpointer-events: none;\n\t}\n\n\t// &.prev {\n\t// \tleft: 0;\n\t// }\n\n\t// &.next {\n\t// \tright: 0;\n\t// }\n}\n","import React, { useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\nimport { ChevronLeftIcon, ChevronRightIcon } from \"lucide-react\";\n\nimport styles from \"./OneStepScroller.module.scss\";\n\ninterface OneStepScrollerProps {\n\tchildren: React.ReactNode;\n\tclassName?: string;\n\t/**\n\t * CSS-селектор элементов, которые считаются \"шагами\" скролла.\n\t * По умолчанию используются прямые потомки скроллера.\n\t */\n\titemSelector?: string;\n\t/**\n\t * Дополнительный внутренний отступ (px) при прокрутке к фокусируемому элементу.\n\t */\n\tscrollPadding?: number;\n\t/**\n\t * Плавная прокрутка для кнопок и авто-доводки до видимости.\n\t */\n\tsmooth?: boolean;\n}\n\nconst EDGE_EPSILON_PX = 1;\n\nfunction maxScrollLeft(scroller: HTMLElement) {\n\treturn Math.max(0, scroller.scrollWidth - scroller.clientWidth);\n}\n\n/**\n * Горизонтальный скроллер \"по одному элементу\".\n *\n * Ожидает элементы фиксированной ширины (или близкой к фиксированной),\n * чтобы шаг скролла соответствовал ширине одного элемента.\n */\nexport const OneStepScroller: React.FC<OneStepScrollerProps> = ({\n\tchildren,\n\tclassName,\n\titemSelector,\n\tscrollPadding = 6,\n\tsmooth = true\n}) => {\n\tconst scrollerRef = useRef<HTMLDivElement | null>(null);\n\tconst rafIdRef = useRef<number | null>(null);\n\n\tconst [canScrollPrev, setCanScrollPrev] = useState(false);\n\tconst [canScrollNext, setCanScrollNext] = useState(false);\n\n\t/**\n\t * Получить список элементов-\"шагов\".\n\t *\n\t * Оптимизация: для дефолтного поведения используем `children` DOM-узла,\n\t * чтобы не выполнять `querySelectorAll` на каждый вызов.\n\t */\n\tconst getItems = useCallback((): HTMLElement[] => {\n\t\tconst scroller = scrollerRef.current;\n\t\tif (!scroller) return [];\n\n\t\tif (!itemSelector) {\n\t\t\treturn Array.from(scroller.children).filter((node): node is HTMLElement => node instanceof HTMLElement);\n\t\t}\n\n\t\treturn Array.from(scroller.querySelectorAll<HTMLElement>(itemSelector));\n\t}, [itemSelector]);\n\n\t/**\n\t * Найти \"элемент шага\" для произвольного target внутри скроллера.\n\t */\n\tconst findItemForTarget = useCallback(\n\t\t(target: HTMLElement): HTMLElement | null => {\n\t\t\tconst scroller = scrollerRef.current;\n\t\t\tif (!scroller) return null;\n\n\t\t\tif (itemSelector) {\n\t\t\t\tconst item = target.closest<HTMLElement>(itemSelector);\n\t\t\t\tif (item && scroller.contains(item)) return item;\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tlet node: HTMLElement | null = target;\n\t\t\twhile (node && node.parentElement && node.parentElement !== scroller) {\n\t\t\t\tnode = node.parentElement;\n\t\t\t}\n\n\t\t\tif (node && node.parentElement === scroller) return node;\n\t\t\treturn null;\n\t\t},\n\t\t[itemSelector]\n\t);\n\n\t/**\n\t * Обновить состояние кнопок \"назад/вперед\".\n\t * Состояние меняется только при реальном отличии, чтобы не триггерить\n\t * лишние перерисовки на каждом событии scroll.\n\t */\n\tconst updateScrollButtons = useCallback(() => {\n\t\tconst scroller = scrollerRef.current;\n\t\tif (!scroller) {\n\t\t\tsetCanScrollPrev(false);\n\t\t\tsetCanScrollNext(false);\n\t\t\treturn;\n\t\t}\n\n\t\tconst maxScrollLeft = Math.max(0, scroller.scrollWidth - scroller.clientWidth);\n\t\tconst current = Math.max(0, Math.min(scroller.scrollLeft, maxScrollLeft));\n\n\t\tconst nextCanScrollPrev = current > EDGE_EPSILON_PX;\n\t\tconst nextCanScrollNext = current < maxScrollLeft - EDGE_EPSILON_PX;\n\n\t\tsetCanScrollPrev((prev) => (prev === nextCanScrollPrev ? prev : nextCanScrollPrev));\n\t\tsetCanScrollNext((prev) => (prev === nextCanScrollNext ? prev : nextCanScrollNext));\n\t}, []);\n\n\t/**\n\t * Запланировать обновление кнопок в следующий animation frame.\n\t * Это снижает частоту вычислений при интенсивном scroll/resize.\n\t */\n\tconst scheduleUpdateScrollButtons = useCallback(() => {\n\t\tif (rafIdRef.current !== null) return;\n\n\t\trafIdRef.current = requestAnimationFrame(() => {\n\t\t\trafIdRef.current = null;\n\t\t\tupdateScrollButtons();\n\t\t});\n\t}, [updateScrollButtons]);\n\n\t/**\n\t * Прокрутка на N элементов (N может быть отрицательным).\n\t */\n\tconst scrollByItems = useCallback(\n\t\t(count: number) => {\n\t\t\tconst scroller = scrollerRef.current;\n\t\t\tif (!scroller) return;\n\n\t\t\tconst firstItem = getItems()[0];\n\t\t\tif (!firstItem) return;\n\n\t\t\tconst step = firstItem.getBoundingClientRect().width;\n\t\t\tif (!step) return;\n\n\t\t\tconst delta = Math.round(count * step);\n\t\t\tconst maxScrollLeft = Math.max(0, scroller.scrollWidth - scroller.clientWidth);\n\t\t\tconst target = Math.max(0, Math.min(scroller.scrollLeft + delta, maxScrollLeft));\n\n\t\t\tscroller.scrollTo({\n\t\t\t\tleft: target,\n\t\t\t\tbehavior: smooth ? \"smooth\" : \"auto\"\n\t\t\t});\n\t\t},\n\t\t[getItems, smooth]\n\t);\n\n\t/**\n\t * Гарантировать полную видимость элемента в пределах viewport скроллера.\n\t */\n\tconst ensureFullyVisible = useCallback(\n\t\t(el: HTMLElement) => {\n\t\t\tconst scroller = scrollerRef.current;\n\t\t\tif (!scroller) return;\n\n\t\t\tconst scrollerRect = scroller.getBoundingClientRect();\n\t\t\tconst elementRect = el.getBoundingClientRect();\n\n\t\t\tconst elementLeft = elementRect.left - scrollerRect.left + scroller.scrollLeft;\n\t\t\tconst elementRight = elementLeft + elementRect.width;\n\n\t\t\tconst visibleLeft = scroller.scrollLeft;\n\t\t\tconst visibleRight = scroller.scrollLeft + scroller.clientWidth;\n\n\t\t\tif (elementLeft >= visibleLeft + EDGE_EPSILON_PX && elementRight <= visibleRight - EDGE_EPSILON_PX) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet targetScrollLeft = scroller.scrollLeft;\n\t\t\tif (elementLeft < visibleLeft) {\n\t\t\t\ttargetScrollLeft = Math.max(0, elementLeft - scrollPadding);\n\t\t\t} else if (elementRight > visibleRight) {\n\t\t\t\ttargetScrollLeft = Math.min(maxScrollLeft(scroller), elementRight - scroller.clientWidth + scrollPadding);\n\t\t\t}\n\n\t\t\tscroller.scrollTo({\n\t\t\t\tleft: Math.round(targetScrollLeft),\n\t\t\t\tbehavior: smooth ? \"smooth\" : \"auto\"\n\t\t\t});\n\t\t},\n\t\t[scrollPadding, smooth]\n\t);\n\n\tuseEffect(() => {\n\t\tconst scroller = scrollerRef.current;\n\t\tif (!scroller) return;\n\n\t\tconst handleFocusIn = (event: FocusEvent) => {\n\t\t\tconst target = event.target;\n\t\t\tif (!(target instanceof HTMLElement)) return;\n\n\t\t\tconst item = findItemForTarget(target);\n\t\t\tif (item) ensureFullyVisible(item);\n\t\t};\n\n\t\tscroller.addEventListener(\"focusin\", handleFocusIn);\n\t\treturn () => scroller.removeEventListener(\"focusin\", handleFocusIn);\n\t}, [ensureFullyVisible, findItemForTarget]);\n\n\t/**\n\t * Наблюдаем только за размером скроллера и изменением его DOM-структуры.\n\t * Это дешевле, чем подписка ResizeObserver на каждый элемент + IntersectionObserver.\n\t */\n\tuseEffect(() => {\n\t\tconst scroller = scrollerRef.current;\n\t\tif (!scroller) return;\n\n\t\tconst onScroll = () => scheduleUpdateScrollButtons();\n\t\tscroller.addEventListener(\"scroll\", onScroll, { passive: true });\n\n\t\tlet resizeObserver: ResizeObserver | null = null;\n\t\tif (typeof ResizeObserver !== \"undefined\") {\n\t\t\tresizeObserver = new ResizeObserver(scheduleUpdateScrollButtons);\n\t\t\tresizeObserver.observe(scroller);\n\t\t}\n\n\t\tlet mutationObserver: MutationObserver | null = null;\n\t\tif (typeof MutationObserver !== \"undefined\") {\n\t\t\tmutationObserver = new MutationObserver(scheduleUpdateScrollButtons);\n\t\t\tmutationObserver.observe(scroller, {\n\t\t\t\tchildList: true,\n\t\t\t\tsubtree: false\n\t\t\t});\n\t\t}\n\n\t\tscheduleUpdateScrollButtons();\n\n\t\treturn () => {\n\t\t\tscroller.removeEventListener(\"scroll\", onScroll);\n\t\t\tresizeObserver?.disconnect();\n\t\t\tmutationObserver?.disconnect();\n\n\t\t\tif (rafIdRef.current !== null) {\n\t\t\t\tcancelAnimationFrame(rafIdRef.current);\n\t\t\t\trafIdRef.current = null;\n\t\t\t}\n\t\t};\n\t}, [scheduleUpdateScrollButtons]);\n\n\t/**\n\t * При изменении children просим пересчитать видимость кнопок.\n\t */\n\tuseEffect(() => {\n\t\tscheduleUpdateScrollButtons();\n\t}, [children, scheduleUpdateScrollButtons]);\n\n\tconst handlePrev = () => scrollByItems(-1);\n\tconst handleNext = () => scrollByItems(1);\n\n\t/**\n\t * Клавиатурная доступность: стрелки влево/вправо двигают на один шаг.\n\t */\n\tconst onWrapperKeyDown = (e: React.KeyboardEvent) => {\n\t\tif (e.key === \"ArrowLeft\") {\n\t\t\te.preventDefault();\n\t\t\thandlePrev();\n\t\t} else if (e.key === \"ArrowRight\") {\n\t\t\te.preventDefault();\n\t\t\thandleNext();\n\t\t}\n\t};\n\n\tconst hasScroll = canScrollPrev || canScrollNext;\n\n\treturn (\n\t\t<div className={cn(styles.oneStepScroller, className)} style={{ position: \"relative\" }}>\n\t\t\t{hasScroll && (\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\taria-label=\"Прокрутить шаг влево\"\n\t\t\t\t\tclassName={styles.ossButton}\n\t\t\t\t\tonClick={handlePrev}\n\t\t\t\t\tdisabled={!canScrollPrev}>\n\t\t\t\t\t<ChevronLeftIcon />\n\t\t\t\t</button>\n\t\t\t)}\n\n\t\t\t<div className={styles.ossViewport} onKeyDown={onWrapperKeyDown} role=\"group\" aria-label=\"Элементы прокрутки\">\n\t\t\t\t<div className={styles.ossScroller} ref={scrollerRef} aria-live=\"polite\">\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{hasScroll && (\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\taria-label=\"Прокрутить шаг вправо\"\n\t\t\t\t\tclassName={styles.ossButton}\n\t\t\t\t\tonClick={handleNext}\n\t\t\t\t\tdisabled={!canScrollNext}>\n\t\t\t\t\t<ChevronRightIcon />\n\t\t\t\t</button>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n","import { forwardRef, PropsWithChildren } from \"react\";\n\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\n\ninterface ScrollableProps extends PropsWithChildren {\n\tclassName?: string;\n\theight?: string | number;\n\tstable?: boolean;\n\toverscroll?: boolean;\n}\n\nexport const Scrollable = forwardRef<HTMLDivElement, ScrollableProps>(({ children, height, stable, overscroll, className }, ref) => {\n\treturn (\n\t\t<div ref={ref} className={cn(\"scrollable\", stable && \"stable\", overscroll && \"overscroll\", className)} style={{ height }}>\n\t\t\t{children}\n\t\t</div>\n\t);\n});\n\ninterface ScrollableBlockProps extends ScrollableProps {\n\tblockClassName?: string;\n}\n\nexport const ScrollableBlock = forwardRef<HTMLDivElement, ScrollableBlockProps>(({ blockClassName, ...props }, ref) => {\n\treturn (\n\t\t<div className={cn(blockClassName, \"overflowHidden w100 h100\")}>\n\t\t\t<Scrollable ref={ref} {...props} />\n\t\t</div>\n\t);\n});\n",".stateWrapper {\n\ttext-decoration: none;\n\tcolor: inherit;\n\tdisplay: block;\n\n\t// border: var(--border-width) solid var(--state-border-color, transparent);\n\tborder-left-style: solid;\n\tborder-left-color: var(--state-border-color, transparent);\n\tborder-left-width: 0.0625em; // 1px\n\tpadding-left: 0.25em; // 4px + 1px border\n\n\t&.status {\n\t\tborder-left-width: 0.3125em; // 5px\n\t\tpadding-left: 0;\n\n\t\t&.information {\n\t\t\tborder-left-color: var(--status-info-fill);\n\t\t}\n\n\t\t&.success {\n\t\t\tborder-left-color: var(--status-success-fill);\n\t\t}\n\n\t\t&.warning {\n\t\t\tborder-left-color: var(--status-warning-fill);\n\t\t}\n\n\t\t&.error {\n\t\t\tborder-left-color: var(--status-error-fill);\n\t\t}\n\t}\n}\n\n.state {\n\t&.information {\n\t\tcolor: var(--status-info-text);\n\n\t\tfill: var(--status-info-fill);\n\t\tstroke: var(--status-info-on-fill);\n\t}\n\n\t&.success {\n\t\tcolor: var(--status-success-text);\n\n\t\tfill: var(--status-success-fill);\n\t\tstroke: var(--status-success-on-fill);\n\t}\n\n\t&.warning {\n\t\tcolor: var(--status-warning-text);\n\n\t\tfill: var(--status-warning-fill);\n\t\tstroke: var(--status-warning-on-fill);\n\t\tstroke-width: 2px;\n\t}\n\n\t&.error {\n\t\tcolor: var(--status-error-text);\n\n\t\tfill: var(--status-error-fill);\n\t\tstroke: var(--status-error-on-fill);\n\t}\n}\n","import React from \"react\";\n\nimport { State } from \"@ryuzaki13/react-foundation-lib/types\";\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\nimport { CircleAlertIcon, CircleCheckIcon, CircleXIcon, InfoIcon } from \"lucide-react\";\n\nimport styles from \"./State.module.scss\";\n\ninterface StateIconProps {\n\tstate: State;\n\ttext: string;\n\tclassName?: string;\n}\n\nexport const StateIcon: React.FC<StateIconProps> = ({ state = \"none\", text, className }) => {\n\tconst renderIcon = () => {\n\t\tswitch (state) {\n\t\t\tcase \"error\":\n\t\t\t\treturn <ErrorIcon />;\n\t\t\tcase \"warning\":\n\t\t\t\treturn <WarningIcon />;\n\t\t\tcase \"success\":\n\t\t\t\treturn <SuccessIcon />;\n\t\t\tcase \"information\":\n\t\t\t\treturn <InformationIcon />;\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className={cn(\"flexCenter gapSm\", className)}>\n\t\t\t{renderIcon()}\n\t\t\t{text}\n\t\t</div>\n\t);\n};\n\ninterface RenderStateIconProps {\n\tstate?: State;\n}\n\nexport const RenderStateIcon: React.FC<RenderStateIconProps> = ({ state }) => {\n\tswitch (state) {\n\t\tcase \"error\":\n\t\t\treturn <ErrorIcon />;\n\t\tcase \"warning\":\n\t\t\treturn <WarningIcon />;\n\t\tcase \"success\":\n\t\t\treturn <SuccessIcon />;\n\t\tcase \"information\":\n\t\t\treturn <InformationIcon />;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n};\n\nexport const ErrorIcon = () => {\n\treturn <CircleXIcon className={cn(styles.state, styles.error)} />;\n};\nexport const WarningIcon = () => {\n\treturn <CircleAlertIcon className={cn(styles.state, styles.warning)} />;\n};\nexport const SuccessIcon = () => {\n\treturn <CircleCheckIcon className={cn(styles.state, styles.success)} />;\n};\nexport const InformationIcon = () => {\n\treturn <InfoIcon className={cn(styles.state, styles.information)} />;\n};\n","import React from \"react\";\n\nimport { State } from \"@ryuzaki13/react-foundation-lib/types\";\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\n\nimport { PolymorphicComponent, PolymorphicComponentBaseProps } from \"../polymorphic\";\n\nimport styles from \"./State.module.scss\";\n\ntype StateWrapperOwnProps<E extends React.ElementType = React.ElementType> = PolymorphicComponentBaseProps<E> & {\n\tstate?: State;\n\tclassName?: string;\n};\n\ntype StateWrapperProps<E extends React.ElementType> = StateWrapperOwnProps<E> &\n\tOmit<React.ComponentPropsWithRef<E>, keyof StateWrapperOwnProps>;\n\nexport function StateWrapper<E extends React.ElementType>({ as, state, className, ...props }: StateWrapperProps<E>) {\n\tconst status = state?.toLowerCase() ?? \"none\";\n\tconst statusClass = styles[status as keyof typeof styles];\n\tconst isStatused = status && status !== \"none\";\n\n\tconst Component = as || \"div\";\n\n\treturn (\n\t\t<PolymorphicComponent\n\t\t\tas={Component as React.ElementType}\n\t\t\tclassName={cn(styles.stateWrapper, isStatused && styles.status, statusClass, className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;ACcA,SAAgB,EAAa,EAAE,aAAU,cAAW,GAAG,KAAgC;CACtF,OACC,kBAAC,OAAD;EAAK,GAAI;EAAW,WAAW,EAAG,EAAO,MAAM,CAAS;EACtD;CACG,CAAA;AAEP;;;ACLA,SAAgB,EAAoB,EAAE,aAAU,cAA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A,GAEpD,UACL,kBAAC,GAAD,EAAiB,WAAW,EAAG,EAAO,OAAO,EAAO,OAAO,EAAI,CAAA,GAE1D,UACL,kBAAC,GAAD,EAAiB,WAAW,EAAG,EAAO,OAAO,EAAO,OAAO,EAAI,CAAA,GAE1D,UACL,kBAAC,GAAD,EAAU,WAAW,EAAG,EAAO,OAAO,EAAO,WAAW,EAAI,CAAA;;;AClDpE,SAAgB,EAA0C,EAAE,OAAI,UAAO,cAAW,GAAG,KAA+B;CACnH,IAAM,IAAS,GAAO,YAAY,KAAK,QACjC,IAAc,EAAO,IACrB,IAAa,KAAU,MAAW;CAIxC,OACC,kBAAC,GAAD;EACC,IAJgB,KAAM;EAKtB,WAAW,EAAG,EAAO,cAAc,KAAc,EAAO,QAAQ,GAAa,CAAS;EACtF,GAAI;CACJ,CAAA;AAEH"}
1
+ {"version":3,"file":"misc-DIF5h9ba.js","names":[],"sources":["../../src/misc/AnimatedLogo.module.scss","../../src/misc/AnimatedLogo.tsx","../../src/misc/AnimatedLogoSegment.tsx","../../src/misc/CopyTextWrapper.tsx","../../src/misc/IconWrapper.module.scss","../../src/misc/IconWrapper.tsx","../../src/misc/LoadingMessage.module.scss","../../src/misc/Message.tsx","../../src/misc/LoadingMessage.tsx","../../src/misc/LazyDynamicComponent.tsx","../../src/misc/SkeletonLine.tsx","../../src/misc/LazyValue.tsx","../../src/misc/NoData.tsx","../../src/misc/Notice.tsx","../../src/misc/OneStepScroller.module.scss","../../src/misc/OneStepScroller.tsx","../../src/misc/Scrollable.tsx","../../src/misc/State.module.scss","../../src/misc/StateIcon.tsx","../../src/misc/StateWrapper.tsx"],"sourcesContent":[".logo {\n\tsvg {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\theight: auto;\n\t}\n}\n\n.segment {\n\topacity: 0.2;\n\tanimation: pulseSteps 2s ease-in-out infinite;\n}\n\n@keyframes pulseSteps {\n\t0% {\n\t\topacity: 0.2;\n\t}\n\n\t35%,\n\t55% {\n\t\topacity: 1;\n\t}\n\n\t100% {\n\t\topacity: 0.2;\n\t}\n}\n\n@media (prefers-reduced-motion: reduce) {\n\t.segment {\n\t\tanimation: none;\n\t\topacity: 1;\n\t}\n}\n","import { type ComponentPropsWithoutRef, type ReactNode } from \"react\";\n\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\n\nimport styles from \"./AnimatedLogo.module.scss\";\n\ntype AnimatedLogoProps = Omit<ComponentPropsWithoutRef<\"div\">, \"children\"> & {\n\tchildren: ReactNode;\n};\n\n/**\n * Контейнер анимированного логотипа без брендовой SVG-разметки.\n * Host-проект передаёт собственный `svg`, а его визуальные части оборачивает в `AnimatedLogoSegment`.\n */\nexport function AnimatedLogo({ children, className, ...htmlProps }: AnimatedLogoProps) {\n\treturn (\n\t\t<div {...htmlProps} className={cn(styles.logo, className)}>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n","import { type ComponentPropsWithoutRef, type ReactNode } from \"react\";\n\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\n\nimport styles from \"./AnimatedLogo.module.scss\";\n\ntype AnimatedLogoSegmentProps = Omit<ComponentPropsWithoutRef<\"g\">, \"children\"> & {\n\tchildren: ReactNode;\n\torder: number;\n};\n\n/**\n * Анимирует одну смысловую часть host-логотипа и сдвигает её pulse относительно предыдущих частей.\n * `order` задаётся с нуля в визуальной последовательности сегментов и преобразуется в шаг задержки 200 мс.\n */\nexport function AnimatedLogoSegment({ children, className, order, style, ...svgGroupProps }: AnimatedLogoSegmentProps) {\n\treturn (\n\t\t<g {...svgGroupProps} className={cn(styles.segment, className)} style={{ ...style, animationDelay: `${order * 200}ms` }}>\n\t\t\t{children}\n\t\t</g>\n\t);\n}\n","import { Placement } from \"@floating-ui/react\";\nimport { useCopyElementTextWithFeedback } from \"@ryuzaki13/react-foundation-lib/copy\";\nimport { CheckCheckIcon, CopyIcon } from \"lucide-react\";\n\nimport { FloatingPopover } from \"../popover\";\n\ninterface CopyTextWrapperProps {\n\tchildren: React.ReactNode;\n\tposition?: Placement;\n\tshowOnHover?: boolean;\n\tclassName?: string;\n}\n\nexport const CopyTextWrapper: React.FC<CopyTextWrapperProps> = ({ children, position = \"top\", showOnHover = true, className }) => {\n\tconst { containerRef, copyElementText, isCopied } = useCopyElementTextWithFeedback<HTMLSpanElement>();\n\n\treturn (\n\t\t<span ref={containerRef} className={className}>\n\t\t\t{children}\n\t\t\t<FloatingPopover openOnHover={showOnHover} placement={position} content={isCopied ? \"Скопировано!\" : \"Копировать текст\"}>\n\t\t\t\t<button onClick={copyElementText} aria-label={isCopied ? \"Скопировано!\" : \"Копировать текст\"}>\n\t\t\t\t\t{isCopied ? <CheckCheckIcon className=\"block statusSuccess\" /> : <CopyIcon className=\"block statusInfo\" />}\n\t\t\t\t</button>\n\t\t\t</FloatingPopover>\n\t\t</span>\n\t);\n};\n",".wrapper {\n\twidth: var(--control-height);\n\theight: var(--control-height);\n\tmargin: auto;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n","import { ReactNode } from \"react\";\n\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\n\nimport styles from \"./IconWrapper.module.scss\";\n\ninterface IconWrapperProps {\n\tchildren: ReactNode;\n\tclassName?: string;\n}\n\nexport function IconWrapper({ className, children }: IconWrapperProps) {\n\treturn <div className={cn(styles.wrapper, className)}>{children}</div>;\n}\n",".componentLoader {\n\tmin-height: 10em;\n}\n","import { PropsWithChildren } from \"react\";\n\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\n\nimport { FlexCenter } from \"../flex\";\nimport { Text, TextColor } from \"../text\";\n\ninterface MessageProps extends PropsWithChildren {\n\tclassName?: string;\n\tcolor?: TextColor;\n\tminHeight?: string | number;\n\tuppercase?: boolean;\n}\n\nexport const Message: React.FC<MessageProps> = ({ className, children, color = \"muted\", minHeight, uppercase = true }) => (\n\t<FlexCenter className={cn(\"paddingMd textCenter\", className)} minHeight={minHeight}>\n\t\t<Text as=\"div\" weight=\"bold\" color={color} uppercase={uppercase}>\n\t\t\t{children}\n\t\t</Text>\n\t</FlexCenter>\n);\n","import { type ReactNode } from \"react\";\n\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\n\nimport styles from \"./LoadingMessage.module.scss\";\nimport { Message } from \"./Message\";\n\ntype LoadingMessageProps = {\n\tclassName?: string;\n\t/** Готовый брендовый знак, которым host-проект при необходимости дополняет сообщение о загрузке. */\n\tlogo?: ReactNode;\n\ttext?: string;\n};\n\nexport function LoadingMessage({ className, logo, text }: LoadingMessageProps) {\n\treturn (\n\t\t<Message className={cn(styles.componentLoader, logo ? undefined : \"skeletonLine\", className)}>\n\t\t\t{logo}\n\n\t\t\t{text || \"Загрузка...\"}\n\t\t</Message>\n\t);\n}\n","import { Suspense, useSyncExternalStore, type ComponentType, type ReactNode } from \"react\";\n\nimport { useLazyComponent } from \"@ryuzaki13/react-foundation-lib/hooks\";\n\nimport { LoadingMessage } from \"./LoadingMessage\";\n\ntype LazyDynamicComponentProps<T extends object> = {\n\timportFunc: () => Promise<Record<string, ComponentType<T>> | null>;\n\tcomponentName: string;\n\tcacheKey?: string;\n\tclientOnly?: boolean;\n\tfallback?: ReactNode;\n\tprops?: T;\n};\n\nconst subscribeClientOnlyMount = (onStoreChange: () => void) => {\n\tonStoreChange();\n\n\treturn () => undefined;\n};\n\nconst getClientSnapshot = () => true;\nconst getServerSnapshot = () => false;\n\n/**\n * Компонент ленивой загрузки динамически импортируемого React-компонента. Позволяет отложить загрузку тяжелых частей интерфейса до момента использования.\n */\nexport function LazyDynamicComponent<T extends object>({\n\tfallback,\n\timportFunc,\n\tcomponentName,\n\tclientOnly = false,\n\tcacheKey,\n\tprops\n}: LazyDynamicComponentProps<T>) {\n\tconst Component = useLazyComponent(importFunc, componentName, cacheKey);\n\tconst isClient = useSyncExternalStore(subscribeClientOnlyMount, getClientSnapshot, getServerSnapshot);\n\n\tconst fallbackNode = fallback ?? <LoadingMessage text=\"Ожидание компонента...\" />;\n\n\t// Client-only режим нужен для браузерных модулей, которые нельзя даже пытаться импортировать во время SSR.\n\tif (clientOnly && !isClient) return fallbackNode;\n\n\treturn (\n\t\t<Suspense fallback={fallbackNode}>\n\t\t\t{/* eslint-disable-next-line react-hooks/static-components */}\n\t\t\t<Component {...(props ?? ({} as T))} />\n\t\t</Suspense>\n\t);\n}\n","import React from \"react\";\n\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\n\nimport { PolymorphicComponent, PolymorphicComponentBaseProps } from \"../polymorphic\";\n\ntype SkeletonLineOwnProps<E extends React.ElementType = React.ElementType> = PolymorphicComponentBaseProps<E> & {\n\tclassName?: string;\n};\n\ntype SkeletonLineProps<E extends React.ElementType> = SkeletonLineOwnProps<E> &\n\tOmit<React.ComponentPropsWithRef<E>, keyof SkeletonLineOwnProps>;\n\nexport const SkeletonLine = <E extends React.ElementType>({ as, className, ...props }: SkeletonLineProps<E>) => {\n\tconst Component = as || \"div\";\n\n\treturn (\n\t\t<PolymorphicComponent\n\t\t\tas={Component as React.ElementType}\n\t\t\tclassName={cn(\"skeletonLine colorTransparent radiusSm\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n","import React from \"react\";\n\nimport { SkeletonLine } from \"./SkeletonLine\";\n\ninterface LazyValueProps {\n\tvalue: React.ReactNode;\n\tisLoading?: boolean;\n}\n\nexport function LazyValue({ value, isLoading }: LazyValueProps) {\n\treturn isLoading ? <SkeletonLine>Загрузка...</SkeletonLine> : (value ?? \"-\");\n}\n","import { Message } from \"./Message\";\n\ninterface NoDataProps {\n\tclassName?: string;\n\ttext?: string;\n\tminHeight?: string | number;\n}\n\nexport const NoData = ({ className, text, minHeight = \"5em\" }: NoDataProps) => {\n\treturn (\n\t\t<Message className={className} color=\"muted\" minHeight={minHeight}>\n\t\t\t{text || \"Нет данных\"}\n\t\t</Message>\n\t);\n};\n","import { PropsWithChildren } from \"react\";\n\nimport { Message } from \"./Message\";\n\ninterface NoticeProps extends PropsWithChildren {\n\tisError?: boolean;\n\tclassName?: string;\n}\n\nexport const Notice: React.FC<NoticeProps> = ({ className, isError, children }) => (\n\t<Message className={className} color={isError ? \"error\" : \"secondary\"}>\n\t\t{children}\n\t</Message>\n);\n",".oneStepScroller {\n\toverflow: hidden;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: var(--space-xs);\n\tmin-width: 0;\n}\n\n.ossViewport {\n\toverflow: hidden;\n\toutline: none;\n\tmin-width: 0;\n\tflex: 1 1 auto;\n}\n\n.ossScroller {\n\tdisplay: flex;\n\tflex-wrap: nowrap;\n\tgap: var(--space-sm);\n\talign-items: end;\n\toverflow-x: auto;\n\toverflow-y: hidden;\n\tscroll-behavior: smooth;\n\t-webkit-overflow-scrolling: touch;\n\tscrollbar-width: none; /* firefox */\n\n\t::-webkit-scrollbar {\n\t\theight: 0;\n\t}\n}\n\n.ossButton {\n\t// position: absolute;\n\ttop: 0;\n\tz-index: 10;\n\twidth: var(--control-height);\n\theight: 100%;\n\tflex: 0 0 var(--control-height);\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\t// border: var(--border);\n\tborder-radius: var(--radius-sm);\n\tcolor: var(--content-2);\n\t// background-color: var(--surface-0);\n\t// opacity: 0.75;\n\n\ttransition-property: opacity, color;\n\ttransition-duration: var(--transition-fast);\n\n\t&:hover {\n\t\topacity: 1;\n\t\tcolor: var(--content-0);\n\t}\n\n\t&:disabled {\n\t\topacity: 0.5;\n\t\tpointer-events: none;\n\t}\n\n\t// &.prev {\n\t// \tleft: 0;\n\t// }\n\n\t// &.next {\n\t// \tright: 0;\n\t// }\n}\n","import React, { useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\nimport { ChevronLeftIcon, ChevronRightIcon } from \"lucide-react\";\n\nimport styles from \"./OneStepScroller.module.scss\";\n\ninterface OneStepScrollerProps {\n\tchildren: React.ReactNode;\n\tclassName?: string;\n\t/**\n\t * CSS-селектор элементов, которые считаются \"шагами\" скролла.\n\t * По умолчанию используются прямые потомки скроллера.\n\t */\n\titemSelector?: string;\n\t/**\n\t * Дополнительный внутренний отступ (px) при прокрутке к фокусируемому элементу.\n\t */\n\tscrollPadding?: number;\n\t/**\n\t * Плавная прокрутка для кнопок и авто-доводки до видимости.\n\t */\n\tsmooth?: boolean;\n}\n\nconst EDGE_EPSILON_PX = 1;\n\nfunction maxScrollLeft(scroller: HTMLElement) {\n\treturn Math.max(0, scroller.scrollWidth - scroller.clientWidth);\n}\n\n/**\n * Горизонтальный скроллер \"по одному элементу\".\n *\n * Ожидает элементы фиксированной ширины (или близкой к фиксированной),\n * чтобы шаг скролла соответствовал ширине одного элемента.\n */\nexport const OneStepScroller: React.FC<OneStepScrollerProps> = ({\n\tchildren,\n\tclassName,\n\titemSelector,\n\tscrollPadding = 6,\n\tsmooth = true\n}) => {\n\tconst scrollerRef = useRef<HTMLDivElement | null>(null);\n\tconst rafIdRef = useRef<number | null>(null);\n\n\tconst [canScrollPrev, setCanScrollPrev] = useState(false);\n\tconst [canScrollNext, setCanScrollNext] = useState(false);\n\n\t/**\n\t * Получить список элементов-\"шагов\".\n\t *\n\t * Оптимизация: для дефолтного поведения используем `children` DOM-узла,\n\t * чтобы не выполнять `querySelectorAll` на каждый вызов.\n\t */\n\tconst getItems = useCallback((): HTMLElement[] => {\n\t\tconst scroller = scrollerRef.current;\n\t\tif (!scroller) return [];\n\n\t\tif (!itemSelector) {\n\t\t\treturn Array.from(scroller.children).filter((node): node is HTMLElement => node instanceof HTMLElement);\n\t\t}\n\n\t\treturn Array.from(scroller.querySelectorAll<HTMLElement>(itemSelector));\n\t}, [itemSelector]);\n\n\t/**\n\t * Найти \"элемент шага\" для произвольного target внутри скроллера.\n\t */\n\tconst findItemForTarget = useCallback(\n\t\t(target: HTMLElement): HTMLElement | null => {\n\t\t\tconst scroller = scrollerRef.current;\n\t\t\tif (!scroller) return null;\n\n\t\t\tif (itemSelector) {\n\t\t\t\tconst item = target.closest<HTMLElement>(itemSelector);\n\t\t\t\tif (item && scroller.contains(item)) return item;\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tlet node: HTMLElement | null = target;\n\t\t\twhile (node && node.parentElement && node.parentElement !== scroller) {\n\t\t\t\tnode = node.parentElement;\n\t\t\t}\n\n\t\t\tif (node && node.parentElement === scroller) return node;\n\t\t\treturn null;\n\t\t},\n\t\t[itemSelector]\n\t);\n\n\t/**\n\t * Обновить состояние кнопок \"назад/вперед\".\n\t * Состояние меняется только при реальном отличии, чтобы не триггерить\n\t * лишние перерисовки на каждом событии scroll.\n\t */\n\tconst updateScrollButtons = useCallback(() => {\n\t\tconst scroller = scrollerRef.current;\n\t\tif (!scroller) {\n\t\t\tsetCanScrollPrev(false);\n\t\t\tsetCanScrollNext(false);\n\t\t\treturn;\n\t\t}\n\n\t\tconst maxScrollLeft = Math.max(0, scroller.scrollWidth - scroller.clientWidth);\n\t\tconst current = Math.max(0, Math.min(scroller.scrollLeft, maxScrollLeft));\n\n\t\tconst nextCanScrollPrev = current > EDGE_EPSILON_PX;\n\t\tconst nextCanScrollNext = current < maxScrollLeft - EDGE_EPSILON_PX;\n\n\t\tsetCanScrollPrev((prev) => (prev === nextCanScrollPrev ? prev : nextCanScrollPrev));\n\t\tsetCanScrollNext((prev) => (prev === nextCanScrollNext ? prev : nextCanScrollNext));\n\t}, []);\n\n\t/**\n\t * Запланировать обновление кнопок в следующий animation frame.\n\t * Это снижает частоту вычислений при интенсивном scroll/resize.\n\t */\n\tconst scheduleUpdateScrollButtons = useCallback(() => {\n\t\tif (rafIdRef.current !== null) return;\n\n\t\trafIdRef.current = requestAnimationFrame(() => {\n\t\t\trafIdRef.current = null;\n\t\t\tupdateScrollButtons();\n\t\t});\n\t}, [updateScrollButtons]);\n\n\t/**\n\t * Прокрутка на N элементов (N может быть отрицательным).\n\t */\n\tconst scrollByItems = useCallback(\n\t\t(count: number) => {\n\t\t\tconst scroller = scrollerRef.current;\n\t\t\tif (!scroller) return;\n\n\t\t\tconst firstItem = getItems()[0];\n\t\t\tif (!firstItem) return;\n\n\t\t\tconst step = firstItem.getBoundingClientRect().width;\n\t\t\tif (!step) return;\n\n\t\t\tconst delta = Math.round(count * step);\n\t\t\tconst maxScrollLeft = Math.max(0, scroller.scrollWidth - scroller.clientWidth);\n\t\t\tconst target = Math.max(0, Math.min(scroller.scrollLeft + delta, maxScrollLeft));\n\n\t\t\tscroller.scrollTo({\n\t\t\t\tleft: target,\n\t\t\t\tbehavior: smooth ? \"smooth\" : \"auto\"\n\t\t\t});\n\t\t},\n\t\t[getItems, smooth]\n\t);\n\n\t/**\n\t * Гарантировать полную видимость элемента в пределах viewport скроллера.\n\t */\n\tconst ensureFullyVisible = useCallback(\n\t\t(el: HTMLElement) => {\n\t\t\tconst scroller = scrollerRef.current;\n\t\t\tif (!scroller) return;\n\n\t\t\tconst scrollerRect = scroller.getBoundingClientRect();\n\t\t\tconst elementRect = el.getBoundingClientRect();\n\n\t\t\tconst elementLeft = elementRect.left - scrollerRect.left + scroller.scrollLeft;\n\t\t\tconst elementRight = elementLeft + elementRect.width;\n\n\t\t\tconst visibleLeft = scroller.scrollLeft;\n\t\t\tconst visibleRight = scroller.scrollLeft + scroller.clientWidth;\n\n\t\t\tif (elementLeft >= visibleLeft + EDGE_EPSILON_PX && elementRight <= visibleRight - EDGE_EPSILON_PX) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet targetScrollLeft = scroller.scrollLeft;\n\t\t\tif (elementLeft < visibleLeft) {\n\t\t\t\ttargetScrollLeft = Math.max(0, elementLeft - scrollPadding);\n\t\t\t} else if (elementRight > visibleRight) {\n\t\t\t\ttargetScrollLeft = Math.min(maxScrollLeft(scroller), elementRight - scroller.clientWidth + scrollPadding);\n\t\t\t}\n\n\t\t\tscroller.scrollTo({\n\t\t\t\tleft: Math.round(targetScrollLeft),\n\t\t\t\tbehavior: smooth ? \"smooth\" : \"auto\"\n\t\t\t});\n\t\t},\n\t\t[scrollPadding, smooth]\n\t);\n\n\tuseEffect(() => {\n\t\tconst scroller = scrollerRef.current;\n\t\tif (!scroller) return;\n\n\t\tconst handleFocusIn = (event: FocusEvent) => {\n\t\t\tconst target = event.target;\n\t\t\tif (!(target instanceof HTMLElement)) return;\n\n\t\t\tconst item = findItemForTarget(target);\n\t\t\tif (item) ensureFullyVisible(item);\n\t\t};\n\n\t\tscroller.addEventListener(\"focusin\", handleFocusIn);\n\t\treturn () => scroller.removeEventListener(\"focusin\", handleFocusIn);\n\t}, [ensureFullyVisible, findItemForTarget]);\n\n\t/**\n\t * Наблюдаем только за размером скроллера и изменением его DOM-структуры.\n\t * Это дешевле, чем подписка ResizeObserver на каждый элемент + IntersectionObserver.\n\t */\n\tuseEffect(() => {\n\t\tconst scroller = scrollerRef.current;\n\t\tif (!scroller) return;\n\n\t\tconst onScroll = () => scheduleUpdateScrollButtons();\n\t\tscroller.addEventListener(\"scroll\", onScroll, { passive: true });\n\n\t\tlet resizeObserver: ResizeObserver | null = null;\n\t\tif (typeof ResizeObserver !== \"undefined\") {\n\t\t\tresizeObserver = new ResizeObserver(scheduleUpdateScrollButtons);\n\t\t\tresizeObserver.observe(scroller);\n\t\t}\n\n\t\tlet mutationObserver: MutationObserver | null = null;\n\t\tif (typeof MutationObserver !== \"undefined\") {\n\t\t\tmutationObserver = new MutationObserver(scheduleUpdateScrollButtons);\n\t\t\tmutationObserver.observe(scroller, {\n\t\t\t\tchildList: true,\n\t\t\t\tsubtree: false\n\t\t\t});\n\t\t}\n\n\t\tscheduleUpdateScrollButtons();\n\n\t\treturn () => {\n\t\t\tscroller.removeEventListener(\"scroll\", onScroll);\n\t\t\tresizeObserver?.disconnect();\n\t\t\tmutationObserver?.disconnect();\n\n\t\t\tif (rafIdRef.current !== null) {\n\t\t\t\tcancelAnimationFrame(rafIdRef.current);\n\t\t\t\trafIdRef.current = null;\n\t\t\t}\n\t\t};\n\t}, [scheduleUpdateScrollButtons]);\n\n\t/**\n\t * При изменении children просим пересчитать видимость кнопок.\n\t */\n\tuseEffect(() => {\n\t\tscheduleUpdateScrollButtons();\n\t}, [children, scheduleUpdateScrollButtons]);\n\n\tconst handlePrev = () => scrollByItems(-1);\n\tconst handleNext = () => scrollByItems(1);\n\n\t/**\n\t * Клавиатурная доступность: стрелки влево/вправо двигают на один шаг.\n\t */\n\tconst onWrapperKeyDown = (e: React.KeyboardEvent) => {\n\t\tif (e.key === \"ArrowLeft\") {\n\t\t\te.preventDefault();\n\t\t\thandlePrev();\n\t\t} else if (e.key === \"ArrowRight\") {\n\t\t\te.preventDefault();\n\t\t\thandleNext();\n\t\t}\n\t};\n\n\tconst hasScroll = canScrollPrev || canScrollNext;\n\n\treturn (\n\t\t<div className={cn(styles.oneStepScroller, className)} style={{ position: \"relative\" }}>\n\t\t\t{hasScroll && (\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\taria-label=\"Прокрутить шаг влево\"\n\t\t\t\t\tclassName={styles.ossButton}\n\t\t\t\t\tonClick={handlePrev}\n\t\t\t\t\tdisabled={!canScrollPrev}>\n\t\t\t\t\t<ChevronLeftIcon />\n\t\t\t\t</button>\n\t\t\t)}\n\n\t\t\t<div className={styles.ossViewport} onKeyDown={onWrapperKeyDown} role=\"group\" aria-label=\"Элементы прокрутки\">\n\t\t\t\t<div className={styles.ossScroller} ref={scrollerRef} aria-live=\"polite\">\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{hasScroll && (\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\taria-label=\"Прокрутить шаг вправо\"\n\t\t\t\t\tclassName={styles.ossButton}\n\t\t\t\t\tonClick={handleNext}\n\t\t\t\t\tdisabled={!canScrollNext}>\n\t\t\t\t\t<ChevronRightIcon />\n\t\t\t\t</button>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n","import { forwardRef, PropsWithChildren } from \"react\";\n\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\n\ninterface ScrollableProps extends PropsWithChildren {\n\tclassName?: string;\n\theight?: string | number;\n\tstable?: boolean;\n\toverscroll?: boolean;\n}\n\nexport const Scrollable = forwardRef<HTMLDivElement, ScrollableProps>(({ children, height, stable, overscroll, className }, ref) => {\n\treturn (\n\t\t<div ref={ref} className={cn(\"scrollable\", stable && \"stable\", overscroll && \"overscroll\", className)} style={{ height }}>\n\t\t\t{children}\n\t\t</div>\n\t);\n});\n\ninterface ScrollableBlockProps extends ScrollableProps {\n\tblockClassName?: string;\n}\n\nexport const ScrollableBlock = forwardRef<HTMLDivElement, ScrollableBlockProps>(({ blockClassName, ...props }, ref) => {\n\treturn (\n\t\t<div className={cn(blockClassName, \"overflowHidden w100 h100\")}>\n\t\t\t<Scrollable ref={ref} {...props} />\n\t\t</div>\n\t);\n});\n",".stateWrapper {\n\ttext-decoration: none;\n\tcolor: inherit;\n\tdisplay: block;\n\n\t// border: var(--border-width) solid var(--state-border-color, transparent);\n\tborder-left-style: solid;\n\tborder-left-color: var(--state-border-color, transparent);\n\tborder-left-width: 0.0625em; // 1px\n\tpadding-left: 0.25em; // 4px + 1px border\n\n\t&.status {\n\t\tborder-left-width: 0.3125em; // 5px\n\t\tpadding-left: 0;\n\n\t\t&.information {\n\t\t\tborder-left-color: var(--status-info-fill);\n\t\t}\n\n\t\t&.success {\n\t\t\tborder-left-color: var(--status-success-fill);\n\t\t}\n\n\t\t&.warning {\n\t\t\tborder-left-color: var(--status-warning-fill);\n\t\t}\n\n\t\t&.error {\n\t\t\tborder-left-color: var(--status-error-fill);\n\t\t}\n\t}\n}\n\n.state {\n\t&.information {\n\t\tcolor: var(--status-info-text);\n\n\t\tfill: var(--status-info-fill);\n\t\tstroke: var(--status-info-on-fill);\n\t}\n\n\t&.success {\n\t\tcolor: var(--status-success-text);\n\n\t\tfill: var(--status-success-fill);\n\t\tstroke: var(--status-success-on-fill);\n\t}\n\n\t&.warning {\n\t\tcolor: var(--status-warning-text);\n\n\t\tfill: var(--status-warning-fill);\n\t\tstroke: var(--status-warning-on-fill);\n\t\tstroke-width: 2px;\n\t}\n\n\t&.error {\n\t\tcolor: var(--status-error-text);\n\n\t\tfill: var(--status-error-fill);\n\t\tstroke: var(--status-error-on-fill);\n\t}\n}\n","import React from \"react\";\n\nimport { State } from \"@ryuzaki13/react-foundation-lib/types\";\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\nimport { CircleAlertIcon, CircleCheckIcon, CircleXIcon, InfoIcon } from \"lucide-react\";\n\nimport styles from \"./State.module.scss\";\n\ninterface StateIconProps {\n\tstate: State;\n\ttext: string;\n\tclassName?: string;\n}\n\nexport const StateIcon: React.FC<StateIconProps> = ({ state = \"none\", text, className }) => {\n\tconst renderIcon = () => {\n\t\tswitch (state) {\n\t\t\tcase \"error\":\n\t\t\t\treturn <ErrorIcon />;\n\t\t\tcase \"warning\":\n\t\t\t\treturn <WarningIcon />;\n\t\t\tcase \"success\":\n\t\t\t\treturn <SuccessIcon />;\n\t\t\tcase \"information\":\n\t\t\t\treturn <InformationIcon />;\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className={cn(\"flexCenter gapSm\", className)}>\n\t\t\t{renderIcon()}\n\t\t\t{text}\n\t\t</div>\n\t);\n};\n\ninterface RenderStateIconProps {\n\tstate?: State;\n}\n\nexport const RenderStateIcon: React.FC<RenderStateIconProps> = ({ state }) => {\n\tswitch (state) {\n\t\tcase \"error\":\n\t\t\treturn <ErrorIcon />;\n\t\tcase \"warning\":\n\t\t\treturn <WarningIcon />;\n\t\tcase \"success\":\n\t\t\treturn <SuccessIcon />;\n\t\tcase \"information\":\n\t\t\treturn <InformationIcon />;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n};\n\nexport const ErrorIcon = () => {\n\treturn <CircleXIcon className={cn(styles.state, styles.error)} />;\n};\nexport const WarningIcon = () => {\n\treturn <CircleAlertIcon className={cn(styles.state, styles.warning)} />;\n};\nexport const SuccessIcon = () => {\n\treturn <CircleCheckIcon className={cn(styles.state, styles.success)} />;\n};\nexport const InformationIcon = () => {\n\treturn <InfoIcon className={cn(styles.state, styles.information)} />;\n};\n","import React from \"react\";\n\nimport { State } from \"@ryuzaki13/react-foundation-lib/types\";\nimport { cn } from \"@ryuzaki13/react-foundation-lib/utils\";\n\nimport { PolymorphicComponent, PolymorphicComponentBaseProps } from \"../polymorphic\";\n\nimport styles from \"./State.module.scss\";\n\ntype StateWrapperOwnProps<E extends React.ElementType = React.ElementType> = PolymorphicComponentBaseProps<E> & {\n\tstate?: State;\n\tclassName?: string;\n};\n\ntype StateWrapperProps<E extends React.ElementType> = StateWrapperOwnProps<E> &\n\tOmit<React.ComponentPropsWithRef<E>, keyof StateWrapperOwnProps>;\n\nexport function StateWrapper<E extends React.ElementType>({ as, state, className, ...props }: StateWrapperProps<E>) {\n\tconst status = state?.toLowerCase() ?? \"none\";\n\tconst statusClass = styles[status as keyof typeof styles];\n\tconst isStatused = status && status !== \"none\";\n\n\tconst Component = as || \"div\";\n\n\treturn (\n\t\t<PolymorphicComponent\n\t\t\tas={Component as React.ElementType}\n\t\t\tclassName={cn(styles.stateWrapper, isStatused && styles.status, statusClass, className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;ACcA,SAAgB,EAAa,EAAE,aAAU,cAAW,GAAG,KAAgC;CACtF,OACC,kBAAC,OAAD;EAAK,GAAI;EAAW,WAAW,EAAG,EAAO,MAAM,CAAS;EACtD;CACG,CAAA;AAEP;;;ACLA,SAAgB,EAAoB,EAAE,aAAU,cAAW,UAAO,UAAO,GAAG,KAA2C;CACtH,OACC,kBAAC,KAAD;EAAG,GAAI;EAAe,WAAW,EAAG,EAAO,SAAS,CAAS;EAAG,OAAO;GAAE,GAAG;GAAO,gBAAgB,GAAG,IAAQ,IAAI;EAAI;EACpH;CACC,CAAA;AAEL;;;ACRA,IAAa,KAAmD,EAAE,aAAU,cAAW,OAAO,iBAAc,IAAM,mBAAgB;CACjI,IAAM,EAA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