@ryuzaki13/react-foundation-ui 1.1.5 → 1.1.7
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.
- package/dist/chunks/misc-DIF5h9ba.js.map +1 -1
- package/dist/period-select/PeriodSelect.d.ts +8 -2
- package/dist/period-select/PeriodSelect.d.ts.map +1 -1
- package/dist/period-select/index.js +66 -51
- package/dist/period-select/index.js.map +1 -1
- package/dist/period-select/lib/periodSelect.d.ts +12 -2
- package/dist/period-select/lib/periodSelect.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/storybook-static/assets/{Badge-BTAE-Cu0.js → Badge-Dn74JUF_.js} +1 -1
- package/storybook-static/assets/{Badge.stories-BfCBagHU.js → Badge.stories-0f2dBkFF.js} +1 -1
- package/storybook-static/assets/{Button-COr8ZnBZ.js → Button-C1TJgYBn.js} +1 -1
- package/storybook-static/assets/{Button-D0l3oLtE.js → Button-DDo_z6nQ.js} +1 -1
- package/storybook-static/assets/{Button.stories-DilF6LrK.js → Button.stories-CEhM2nmB.js} +1 -1
- package/storybook-static/assets/{CheckBox-C8vS8vJo.js → CheckBox-Brecn2Go.js} +1 -1
- package/storybook-static/assets/{CheckBox-d9nyYsIy.js → CheckBox-Dou46_Q2.js} +1 -1
- package/storybook-static/assets/{CheckBox.stories-B07ze4Wr.js → CheckBox.stories-BX0rAtSE.js} +1 -1
- package/storybook-static/assets/{Color-KMSTOMOX-Bzsd_5QQ.js → Color-KMSTOMOX-BWvVg2h-.js} +1 -1
- package/storybook-static/assets/{ContextMenu-D7IPfGtH.js → ContextMenu-wm9Jh9ZJ.js} +1 -1
- package/storybook-static/assets/{ContextMenu.stories-EmxBfTnl.js → ContextMenu.stories-BNgeqlBC.js} +1 -1
- package/storybook-static/assets/{DateInput-CP4Pxdvs.js → DateInput-BvCdgET8.js} +1 -1
- package/storybook-static/assets/{DateInput-Crs5GWnG.js → DateInput-C4POi6jK.js} +1 -1
- package/storybook-static/assets/{DateInput.stories-BLCS9iRX.js → DateInput.stories-Co44UsPz.js} +1 -1
- package/storybook-static/assets/{DateRangePresetSelect-Csbfuey7.js → DateRangePresetSelect-CFRcBK8Q.js} +1 -1
- package/storybook-static/assets/{DateRangePresetSelect-J-WzYVkt.js → DateRangePresetSelect-DS2LFGpx.js} +1 -1
- package/storybook-static/assets/{DateRangePresetSelect.stories-BhFL1OaP.js → DateRangePresetSelect.stories-Bw2wid1f.js} +1 -1
- package/storybook-static/assets/{Detail-DglfYNE2.js → Detail-DRVWmbKj.js} +1 -1
- package/storybook-static/assets/{Detail.stories-0IivH1cQ.js → Detail.stories-DiPu8idx.js} +1 -1
- package/storybook-static/assets/{Dialog-D0joa64s.js → Dialog-DWwwmwKU.js} +1 -1
- package/storybook-static/assets/{Dialog.stories-CTfN45UP.js → Dialog.stories-H65hC3at.js} +1 -1
- package/storybook-static/assets/{Disclosure-rdSQS8P7.js → Disclosure-DXCJIvn2.js} +1 -1
- package/storybook-static/assets/{Disclosure.stories-5BgYi8uF.js → Disclosure.stories-BtvyHQlf.js} +1 -1
- package/storybook-static/assets/{DocsRenderer-JROSPFPF-BJkHjLCZ.js → DocsRenderer-JROSPFPF-BIOn2Yw2.js} +2 -2
- package/storybook-static/assets/{DropZone-BM1NLuA0.js → DropZone-B5GgSTT6.js} +1 -1
- package/storybook-static/assets/{DropZone.stories-DrPDxIBC.js → DropZone.stories-DXQz-psy.js} +1 -1
- package/storybook-static/assets/{DropdownMenu-shJr746W.js → DropdownMenu-DiCKdtJQ.js} +1 -1
- package/storybook-static/assets/{ExpandableActionPanel.stories-TtfzEN4C.js → ExpandableActionPanel.stories--iDMcu7P.js} +1 -1
- package/storybook-static/assets/{Flex-5o7k9tUR.js → Flex-COhmAKNn.js} +1 -1
- package/storybook-static/assets/{Flex-BkWF7h5z.js → Flex-Cl2bB8Po.js} +1 -1
- package/storybook-static/assets/{Flex.stories-C1XJ44EO.js → Flex.stories-DMuAAT19.js} +1 -1
- package/storybook-static/assets/{Grid-CdI_y4yl.js → Grid-Df08ACJK.js} +1 -1
- package/storybook-static/assets/{Grid-BXz1CwFq.js → Grid-PM5n8eI2.js} +1 -1
- package/storybook-static/assets/{Grid.stories-EsSWnusY.js → Grid.stories-Do5Od8Vw.js} +1 -1
- package/storybook-static/assets/{ImageCropper.stories-BYg2ptRF.js → ImageCropper.stories-EvtSYfKt.js} +1 -1
- package/storybook-static/assets/{ImageRenderer-DAdVVRDG.js → ImageRenderer-B2AC5NZh.js} +1 -1
- package/storybook-static/assets/{ImageRenderer.stories-nYsBLQRc.js → ImageRenderer.stories-DzFi_sDQ.js} +1 -1
- package/storybook-static/assets/{ImageView.stories-BuexvCt7.js → ImageView.stories-B1g_OpL2.js} +1 -1
- package/storybook-static/assets/{ImageViewer.stories-C2rTyKj7.js → ImageViewer.stories-b0cFqboR.js} +2 -2
- package/storybook-static/assets/{ImageViewerRuntime-F7Qkt8r6.js → ImageViewerRuntime-D_IBJyiC.js} +1 -1
- package/storybook-static/assets/{Input-B2CGKwD9.js → Input-CyGgeUCG.js} +1 -1
- package/storybook-static/assets/{Input-Ny_qDcq6.js → Input-y5ZPRO5m.js} +1 -1
- package/storybook-static/assets/{Input.stories-I9DUZ8AK.js → Input.stories-Dhv3f6d7.js} +1 -1
- package/storybook-static/assets/{InputDateTime-WZ2-rOQX.js → InputDateTime-ZXVROSAW.js} +1 -1
- package/storybook-static/assets/{InputDateTime.stories-CQTdSUz9.js → InputDateTime.stories-NMpK5Peb.js} +1 -1
- package/storybook-static/assets/{InputFile-Dai1MtLc.js → InputFile-BR2c0rNb.js} +1 -1
- package/storybook-static/assets/{InputFile.stories-C5xJSqnv.js → InputFile.stories-BuNiPkPF.js} +1 -1
- package/storybook-static/assets/{InputFiles-DjdQ7Z-d.js → InputFiles-BdhvE0kz.js} +1 -1
- package/storybook-static/assets/{InputFiles-dasytOC9.js → InputFiles-BlGer_7z.js} +1 -1
- package/storybook-static/assets/{InputFiles.stories-D10tTtI-.js → InputFiles.stories-BPGnbszv.js} +1 -1
- package/storybook-static/assets/{InputImage-RkEq2Brn.js → InputImage-zHzuV5NX.js} +1 -1
- package/storybook-static/assets/{InputImage.stories-B1YNcZ6A.js → InputImage.stories-BXKgBMoQ.js} +1 -1
- package/storybook-static/assets/{LayoutPicker-CnVEWDPg.js → LayoutPicker-L-0F9Vrb.js} +1 -1
- package/storybook-static/assets/{LayoutPicker.stories-C_Imtvkh.js → LayoutPicker.stories-s1valXGj.js} +1 -1
- package/storybook-static/assets/{Listbox-thRqniZv.js → Listbox-YWvaCK77.js} +1 -1
- package/storybook-static/assets/{Listbox.stories-DoZDFQfn.js → Listbox.stories-BSJmd-mH.js} +1 -1
- package/storybook-static/assets/{Modal-Dj0-wAgD.js → Modal-CQW1mNSz.js} +1 -1
- package/storybook-static/assets/{Modal.stories-D4X-fefE.js → Modal.stories-BEpdLX9t.js} +1 -1
- package/storybook-static/assets/{MultiSelect-BvVNwbrA.js → MultiSelect-DbjbyS6f.js} +1 -1
- package/storybook-static/assets/{MultiSelect-s-wvj6n5.js → MultiSelect-HXlabU2B.js} +1 -1
- package/storybook-static/assets/{MultiSelect.stories-0yA0f5-c.js → MultiSelect.stories-CflQTXbQ.js} +1 -1
- package/storybook-static/assets/{NotificationsHost-Bi0Tp6sW.js → NotificationsHost-s71CKpxG.js} +1 -1
- package/storybook-static/assets/{NotificationsHost.stories-B3QdYoD0.js → NotificationsHost.stories-Ovu7jDcj.js} +1 -1
- package/storybook-static/assets/{ODataMultiSelect-hks0ZQrT.js → ODataMultiSelect-B-u9xRiQ.js} +1 -1
- package/storybook-static/assets/{ODataMultiSelect.stories-D5N-uBqS.js → ODataMultiSelect.stories-DajVZbpu.js} +1 -1
- package/storybook-static/assets/{ODataSelect-BhCR9HGn.js → ODataSelect-3wE4Syu-.js} +1 -1
- package/storybook-static/assets/{ODataSelect-CQ8bUpd5.js → ODataSelect-DCGV65OH.js} +1 -1
- package/storybook-static/assets/{ODataSelect.stories-BBAdmYae.js → ODataSelect.stories-C4ymfrRw.js} +1 -1
- package/storybook-static/assets/{ODataTreeMultiSelect-DNBatq4h.js → ODataTreeMultiSelect-fFgkMoG7.js} +1 -1
- package/storybook-static/assets/{ODataTreeMultiSelect.stories-BtKl_ASP.js → ODataTreeMultiSelect.stories-Ac6Y2rRQ.js} +1 -1
- package/storybook-static/assets/{ODataTreeSelect-DyHbGnJH.js → ODataTreeSelect-DHsV3AcR.js} +1 -1
- package/storybook-static/assets/{ODataTreeSelect.stories-CG4AfZLd.js → ODataTreeSelect.stories-Dfv4WQyR.js} +1 -1
- package/storybook-static/assets/PeriodSelect-DlcFkHM4.js +51 -0
- package/storybook-static/assets/PeriodSelect.stories-DWwvypiE.js +47 -0
- package/storybook-static/assets/{Popover-CMZ3UnB3.js → Popover-CDhH2vdG.js} +1 -1
- package/storybook-static/assets/{Popover.stories-BypMyp_9.js → Popover.stories-DE7VCujJ.js} +1 -1
- package/storybook-static/assets/{PresetRangeDateInput-CPodYJSD.js → PresetRangeDateInput-CrsxXLDG.js} +1 -1
- package/storybook-static/assets/{PresetRangeDateInput.stories-qdPO2Oz-.js → PresetRangeDateInput.stories-DEG3r-qf.js} +1 -1
- package/storybook-static/assets/{RadioButton-Ch1qnDnT.js → RadioButton-C46MFmRl.js} +1 -1
- package/storybook-static/assets/{RadioButton.stories-Bxs1aUdB.js → RadioButton.stories-C3--ehs5.js} +1 -1
- package/storybook-static/assets/{RadioGroup-Do88BbGS.js → RadioGroup-Cj_foF9x.js} +1 -1
- package/storybook-static/assets/{RadioGroup-DVDuj2J-.js → RadioGroup-wy1BaQ9o.js} +1 -1
- package/storybook-static/assets/{RadioGroup.stories-Vt66-Caq.js → RadioGroup.stories-Bi9_WOVj.js} +1 -1
- package/storybook-static/assets/{Select-COpg8sSQ.js → Select-B36pVYvS.js} +1 -1
- package/storybook-static/assets/{Select-q_XrayeK.js → Select-Bgg-NjIq.js} +1 -1
- package/storybook-static/assets/{Select.stories-7BhfKWNg.js → Select.stories-Bl6_HqCh.js} +1 -1
- package/storybook-static/assets/{SelectOptionContent-BbWkG0Cj.js → SelectOptionContent-CeSDFaTr.js} +1 -1
- package/storybook-static/assets/{SerializableSelect-BVqRKICZ.js → SerializableSelect-CCcdn7s3.js} +1 -1
- package/storybook-static/assets/{SerializableSelect-4ijwdqn7.js → SerializableSelect-EIZrsX_q.js} +1 -1
- package/storybook-static/assets/{SerializableSelect.stories-CNCW7ySW.js → SerializableSelect.stories-D85sap4g.js} +1 -1
- package/storybook-static/assets/{SingleDateTimeInput-ktOvdlgM.js → SingleDateTimeInput-BJdvvXVc.js} +1 -1
- package/storybook-static/assets/{SingleDateTimeInput.stories-B1sVehuC.js → SingleDateTimeInput.stories-Cpq8DLvn.js} +1 -1
- package/storybook-static/assets/{Slider-BwzMyRGn.js → Slider-CqkHk2lK.js} +1 -1
- package/storybook-static/assets/{Slider.stories-BA5faG4z.js → Slider.stories-DmW9jsnD.js} +1 -1
- package/storybook-static/assets/{SliderInput-BMMXEBJZ.js → SliderInput-DkekHTab.js} +1 -1
- package/storybook-static/assets/{SliderInput.stories-DSEiXNpJ.js → SliderInput.stories-CqQh0HWR.js} +1 -1
- package/storybook-static/assets/{Sortable-BojJGp_6.js → Sortable-BBYH-Tva.js} +1 -1
- package/storybook-static/assets/{Sortable.stories-DPzKTc1m.js → Sortable.stories-DjEGWs4-.js} +1 -1
- package/storybook-static/assets/{Splitter-4L-UBcBS.js → Splitter-G3aR-zi9.js} +1 -1
- package/storybook-static/assets/{Splitter.stories-DS-CWey5.js → Splitter.stories-XKGTUPMP.js} +1 -1
- package/storybook-static/assets/{StateSelect-h7zV-q7S.js → StateSelect-DhzkYW8p.js} +1 -1
- package/storybook-static/assets/{StateSelect.stories-DlCmcleb.js → StateSelect.stories-BAxN3YfG.js} +1 -1
- package/storybook-static/assets/{Switch-D7cJWIpv.js → Switch-NVpZLd3g.js} +1 -1
- package/storybook-static/assets/{Switch.stories-BUNj3c7I.js → Switch.stories-BBowyrzJ.js} +1 -1
- package/storybook-static/assets/{Table-Djwn-kmo.js → Table-C9r-j5hO.js} +1 -1
- package/storybook-static/assets/{Table.stories-6o57WDBN.js → Table.stories-CkoEoxYB.js} +1 -1
- package/storybook-static/assets/{Tabs-BEDGo6Dt.js → Tabs-tH37q7nI.js} +1 -1
- package/storybook-static/assets/{Tabs.stories-D6jsxqio.js → Tabs.stories-aIywaszH.js} +1 -1
- package/storybook-static/assets/{TagInput.stories-Detqw-BO.js → TagInput.stories-BX4XcJaC.js} +1 -1
- package/storybook-static/assets/{Textarea-e1rqwdS0.js → Textarea-DDn4pvJF.js} +1 -1
- package/storybook-static/assets/{Textarea.stories-CYNlkru_.js → Textarea.stories-BZVZYh4p.js} +1 -1
- package/storybook-static/assets/{TimePanel-BzwAMpxA.js → TimePanel-vKlzE6gd.js} +1 -1
- package/storybook-static/assets/{TimePanel.stories-BKtxxbV9.js → TimePanel.stories-BfdDWhtQ.js} +1 -1
- package/storybook-static/assets/{Toggle-CFY-QWG0.js → Toggle-DAb5_sHq.js} +1 -1
- package/storybook-static/assets/{Toggle.stories-CN4EtvMk.js → Toggle.stories-Bp99WoMR.js} +1 -1
- package/storybook-static/assets/{TreeMultiSelect-C6LC0B_t.js → TreeMultiSelect-CG09ybVB.js} +1 -1
- package/storybook-static/assets/{TreeMultiSelect-XcdSsZbx.js → TreeMultiSelect-CkNDwWuK.js} +1 -1
- package/storybook-static/assets/{TreeMultiSelect.stories-BPSHj5Oz.js → TreeMultiSelect.stories-DE6tQFRY.js} +1 -1
- package/storybook-static/assets/{TreePickerBase-DLRPlLkL.js → TreePickerBase-DhZ9tbrV.js} +1 -1
- package/storybook-static/assets/{TreeSelect-BHQFUR9I.js → TreeSelect-BYYl0yhs.js} +1 -1
- package/storybook-static/assets/{TreeSelect-Cgscw1vO.js → TreeSelect-D3tOqZzi.js} +1 -1
- package/storybook-static/assets/{TreeSelect.stories-BxaBjBhQ.js → TreeSelect.stories-C56cleOX.js} +1 -1
- package/storybook-static/assets/{TreeTable-CrO1q-bb.js → TreeTable-CPctUXOv.js} +1 -1
- package/storybook-static/assets/{TreeTable.stories-Cbw3al7a.js → TreeTable.stories-D-R0a5NF.js} +1 -1
- package/storybook-static/assets/{WithTooltip-7X4HQR7L-DX5OwBGJ.js → WithTooltip-7X4HQR7L-DYINYmJM.js} +1 -1
- package/storybook-static/assets/{base-table-BOoR-jrw.js → base-table-CTBvWnIb.js} +1 -1
- package/storybook-static/assets/{blocks-CWdkXPAf.js → blocks-D2VXMZGt.js} +6 -6
- package/storybook-static/assets/{button-y1pwsTgq.js → button-CofLsODD.js} +1 -1
- package/storybook-static/assets/{check-box-KzIumHeK.js → check-box-BUYji84r.js} +1 -1
- package/storybook-static/assets/{chunk-3LY4VQVK-DgGt6GC4.js → chunk-3LY4VQVK-Dk0vkvRJ.js} +1 -1
- package/storybook-static/assets/{chunk-LITCR56V-DaMBGWjn.js → chunk-LITCR56V-DgP8YOaP.js} +1 -1
- package/storybook-static/assets/{contextMenu-TVGY1zYp.js → contextMenu-MmOUI04g.js} +1 -1
- package/storybook-static/assets/{error-BPBoLmDN.js → error-D6G67nWf.js} +1 -1
- package/storybook-static/assets/{flex-D9b-dBgG.js → flex-DEzwJFBs.js} +1 -1
- package/storybook-static/assets/{floating-ui.react-D3mIqn3s.js → floating-ui.react-DeHGyTLR.js} +1 -1
- package/storybook-static/assets/formatter-L2YTDE3Q-Cz7NqHTg.js +1 -0
- package/storybook-static/assets/{formatters-D0zSsBW1.js → formatters-DO-Bplkc.js} +1 -1
- package/storybook-static/assets/grid-CUgqbILF.js +1 -0
- package/storybook-static/assets/{hooks-DhYf_owN.js → hooks-3gvuoU6a.js} +1 -1
- package/storybook-static/assets/{iframe-m0QwbmMJ.js → iframe-BlBhvHwk.js} +3 -3
- package/storybook-static/assets/{input-BZBDl16m.js → input-DM0LWdwF.js} +1 -1
- package/storybook-static/assets/{lucide-react-CLUPuimx.js → lucide-react-DMR456up.js} +1 -1
- package/storybook-static/assets/{mdx-react-shim-CmEvmtFH.js → mdx-react-shim-BXKB7xbF.js} +1 -1
- package/storybook-static/assets/{media-CjQdA2Mv.js → media-BZMZJXu3.js} +1 -1
- package/storybook-static/assets/misc-BElIqBdV.css +1 -0
- package/storybook-static/assets/{misc-BPMpbj-u.js → misc-_mjs2DH3.js} +1 -1
- package/storybook-static/assets/{notifications-DcYI6zTi.js → notifications-BxYiooNp.js} +1 -1
- package/storybook-static/assets/{odata-ypqfpogF.js → odata-B4-s71TA.js} +1 -1
- package/storybook-static/assets/odata-service-BHLtW14i.js +1 -0
- package/storybook-static/assets/{odataStoryFixtures-Dz9x9V3d.js → odataStoryFixtures-D5fZfJe7.js} +1 -1
- package/storybook-static/assets/{picker-DDeo_PCY.js → picker-RP6lU_O4.js} +1 -1
- package/storybook-static/assets/{popover-CbcUGKOy.js → popover-B40B8LiS.js} +1 -1
- package/storybook-static/assets/{preset-select-BBA7ffCG.js → preset-select-CH5-L7v5.js} +1 -1
- package/storybook-static/assets/{react-18-CEpEuDLi.js → react-18-BGjST092.js} +1 -1
- package/storybook-static/assets/{react-Dlj91pfF.js → react-BRNfkHvq.js} +1 -1
- package/storybook-static/assets/{react-dom-6vmLvsDt.js → react-dom-Dymo4Ige.js} +1 -1
- package/storybook-static/assets/select-DDFRb6jY.js +1 -0
- package/storybook-static/assets/{slider-C92y_ac7.js → slider-CZr1wjo-.js} +1 -1
- package/storybook-static/assets/{sortable-CVw4tyjV.js → sortable-Do0zRVl3.js} +1 -1
- package/storybook-static/assets/{syntaxhighlighter-RTCFPKCB-Dq_L5d9h.js → syntaxhighlighter-RTCFPKCB-YpNtMx0l.js} +1 -1
- package/storybook-static/assets/{text-Cg4cjrW7.js → text-BBt8S4hV.js} +1 -1
- package/storybook-static/assets/{theming-CQoZ5-v_.js → theming-C9D6rg4N.js} +1 -1
- package/storybook-static/assets/ui-5r8X6Kmj.js +1 -0
- package/storybook-static/assets/{useODataSelectBase-K7wnoQzR.js → useODataSelectBase-Vi75dcI2.js} +1 -1
- package/storybook-static/assets/{useODataTreeData-DFvQ7a3D.js → useODataTreeData-3VDV4NsS.js} +1 -1
- package/storybook-static/assets/{utils-CV_FgKe9.js → utils-De5IM4sM.js} +1 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.json +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/assets/PeriodSelect-BfQge37Z.js +0 -35
- package/storybook-static/assets/PeriodSelect.stories-CPzb6u_X.js +0 -23
- package/storybook-static/assets/formatter-L2YTDE3Q-Dx2lRR9t.js +0 -1
- package/storybook-static/assets/grid-CiXWA2Qm.js +0 -1
- package/storybook-static/assets/misc-D9dXokhF.css +0 -1
- package/storybook-static/assets/odata-service-CwyYgqal.js +0 -1
- package/storybook-static/assets/select-BOHTwP2D.js +0 -1
- package/storybook-static/assets/ui-Dj5Iqdsg.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,i as t}from"./preload-helper-B45gAKPr.js";import{C as n}from"./iframe-m0QwbmMJ.js";import{t as r}from"./react-dom-6vmLvsDt.js";import{t as i}from"./jsx-runtime-BBQGix-2.js";import{a,i as o}from"./utils-CV_FgKe9.js";import{a as s,f as c,h as l,p as u,r as d,u as f}from"./floating-ui.react-D3mIqn3s.js";import{a as p,i as m,n as h,o as g,s as _,t as v}from"./error-BPBoLmDN.js";import{n as y,t as b}from"./ui.module-wFHXkJzp.js";import{a as x,n as S,t as C}from"./react-Dlj91pfF.js";function w(e,t){if(e){if(typeof e==`function`){e(t);return}e.current=t}}function T(e,t){return n=>{e?.(n),!n.defaultPrevented&&t(n)}}function E(e,t){return n=>{e?.(n),!n.defaultPrevented&&t(n)}}var D=t((()=>{}));function O(){let e=(0,k.useContext)(A);if(!e)throw h({hookName:`useMenuContext`,providerName:`MenuRoot`});return e}var k,A,j=t((()=>{k=e(n(),1),v(),A=(0,k.createContext)(null)})),M,N,ee=t((()=>{M=e(n(),1),D(),j(),N=({children:e})=>{let{mode:t,open:n,registerTriggerElement:r,onTriggerContextMenu:i,onTriggerKeyDown:a}=O();if(t!==`contextmenu`)throw Error(`ContextMenu.Trigger must be used within <ContextMenu>`);return(0,M.cloneElement)(e,{ref:t=>{let n=e.props.ref;w(n,t),r(t)},"aria-haspopup":`menu`,"aria-expanded":n,onContextMenu:T(e.props.onContextMenu,i),onKeyDown:E(e.props.onKeyDown,a)})},N.__docgenInfo={description:``,methods:[],displayName:`ContextMenuTrigger`,props:{children:{required:!0,tsType:{name:`ReactReactElement`,raw:`React.ReactElement<React.HTMLAttributes<HTMLElement> & { ref?: React.Ref<HTMLElement> }>`,elements:[{name:`intersection`,raw:`React.HTMLAttributes<HTMLElement> & { ref?: React.Ref<HTMLElement> }`,elements:[{name:`ReactHTMLAttributes`,raw:`React.HTMLAttributes<HTMLElement>`,elements:[{name:`HTMLElement`}]},{name:`signature`,type:`object`,raw:`{ ref?: React.Ref<HTMLElement> }`,signature:{properties:[{key:`ref`,value:{name:`ReactRef`,raw:`React.Ref<HTMLElement>`,elements:[{name:`HTMLElement`}],required:!1}}]}}]}]},description:``}}}})),te,ne,re,ie,ae,oe,se,ce,le,ue,de,fe,pe,me,P,F,I=t((()=>{te=`nPfxbm`,ne=`T8GF31`,re=`XM9raj`,ie=`JY0XKk`,ae=`Jj7pGe`,oe=`o7v3XA`,se=`f9wo9l`,ce=`_9IPwGF`,le=`CAmmlz`,ue=`_5KEBWR`,de=`L28onY`,fe=`Pg-1Y3`,pe=`ObIrS2`,me=`_0jf5vt`,P=`zKwsQF`,F={menuPanel:te,menuScroller:ne,menuItem:re,menuItemIcon:ie,menuItemText:ae,menuItemHotKey:oe,radialPanel:se,radialRing:ce,radialCenterButton:le,radialCenterButtonText:ue,radialItems:de,radialItemSlot:fe,radialItem:pe,radialItemIcon:me,radialItemText:P}})),L,he,R,z,ge=t((()=>{L=e(n(),1),p(),o(),C(),he=e(r(),1),I(),j(),R=i(),z=({children:e,className:t,closeOnOutside:n=!0,closeOnEscape:r=!0,disableOutsideClick:i=!1,restoreFocus:o=!0})=>{let{open:s,floatingStyles:c,floatingRef:l,triggerRef:u,setFloating:d,closeMenu:f}=O(),p=(0,L.useCallback)(()=>{let e=l.current;return e?Array.from(e.querySelectorAll(`[data-menu-item="true"]:not([data-disabled="true"])`)):[]},[l]);_({active:s,initialFocus:e=>p()[0]??e,restoreFocus:o,restoreFocusTarget:()=>u.current,containerRef:l}),m({active:s,enabled:r,onDismiss:f,containerRef:l});let h=(0,L.useCallback)(()=>{!s||i||n&&f()},[s,i,n,f]);g([l,u],h);let v=(0,L.useCallback)(e=>{let t=p();if(t.length===0)return;let n=document.activeElement,r=n?t.indexOf(n):-1;if(e.key===`ArrowDown`){e.preventDefault(),t[r>=0?(r+1)%t.length:0]?.focus();return}if(e.key===`ArrowUp`){e.preventDefault(),t[r>=0?(r-1+t.length)%t.length:t.length-1]?.focus();return}if(e.key===`Home`){e.preventDefault(),t[0]?.focus();return}e.key===`End`&&(e.preventDefault(),t[t.length-1]?.focus())},[p]);return typeof document>`u`?null:(0,he.createPortal)((0,R.jsx)(x,{children:s&&(0,R.jsx)(S.div,{ref:d,style:c,role:`menu`,tabIndex:-1,className:a(F.menuPanel,t),onKeyDown:v,initial:{opacity:0,scale:.96,y:-2},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.96,y:-2},transition:{duration:.14,ease:`easeOut`},children:(0,R.jsx)(`div`,{className:a(F.menuScroller,`scrollable`),children:typeof e==`function`?e({closeMenu:f}):e})})}),document.body)}})),_e,B,ve=t((()=>{n(),o(),b(),_e=i(),B=({children:e,className:t})=>(0,_e.jsx)(`div`,{className:a(y.uiPopupGroupLabel,t),children:e}),B.__docgenInfo={description:``,methods:[],displayName:`MenuGroupLabel`,props:{children:{required:!0,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},className:{required:!1,tsType:{name:`string`},description:``}}}})),ye,V,H,be=t((()=>{ye=e(n(),1),o(),b(),I(),j(),V=i(),H=({children:e,icon:t,hotKey:n,className:r,disabled:i,href:o,target:s,rel:c,closeOnSelect:l=!0,onSelect:u})=>{let{closeMenu:d}=O(),f=(0,ye.useCallback)(e=>{if(i){e.preventDefault(),e.stopPropagation();return}u?.(e),!e.defaultPrevented&&l&&d()},[i,u,l,d]),p=a(y.uiPopupOption,F.menuItem,r);return o?(0,V.jsxs)(`a`,{href:o,target:s,rel:c,role:`menuitem`,tabIndex:-1,"aria-disabled":i,"data-menu-item":`true`,"data-disabled":i?`true`:void 0,"data-ui":`context-menu-item`,"data-action":`select-context-menu-item`,className:p,onClick:f,children:[t&&(0,V.jsx)(`span`,{className:a(y.uiPopupOptionIcon,F.menuItemIcon),children:t}),(0,V.jsx)(`span`,{className:a(y.uiOptionText,F.menuItemText),children:e}),n&&(0,V.jsx)(`kbd`,{className:a(y.keyboard,F.menuItemHotKey),children:n})]}):(0,V.jsxs)(`button`,{type:`button`,role:`menuitem`,tabIndex:-1,disabled:i,"data-menu-item":`true`,"data-disabled":i?`true`:void 0,"data-ui":`context-menu-item`,"data-action":`select-context-menu-item`,className:p,onClick:f,children:[t&&(0,V.jsx)(`span`,{className:a(y.uiPopupOptionIcon,F.menuItemIcon),children:t}),(0,V.jsx)(`span`,{className:a(y.uiOptionText,F.menuItemText),children:e}),n&&(0,V.jsx)(`kbd`,{className:a(y.keyboard,F.menuItemHotKey),children:n})]})},H.__docgenInfo={description:``,methods:[],displayName:`MenuItem`,props:{children:{required:!0,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},icon:{required:!1,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},hotKey:{required:!1,tsType:{name:`string`},description:``},className:{required:!1,tsType:{name:`string`},description:``},disabled:{required:!1,tsType:{name:`boolean`},description:``},href:{required:!1,tsType:{name:`string`},description:``},target:{required:!1,tsType:{name:`string`},description:``},rel:{required:!1,tsType:{name:`string`},description:``},closeOnSelect:{required:!1,tsType:{name:`boolean`},description:``,defaultValue:{value:`true`,computed:!1}},onSelect:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(event: React.MouseEvent<HTMLElement>) => void`,signature:{arguments:[{type:{name:`ReactMouseEvent`,raw:`React.MouseEvent<HTMLElement>`,elements:[{name:`HTMLElement`}]},name:`event`}],return:{name:`void`}}},description:``}}}}));function xe(e){return{x:e.clientX,y:e.clientY}}function Se(e){return{x:e.left+e.width/2,y:e.top+e.height/2}}function Ce(e,t){return{contextElement:t??void 0,getBoundingClientRect:()=>({x:e.x,y:e.y,top:e.y,left:e.x,bottom:e.y,right:e.x,width:0,height:0,toJSON:()=>{}})}}function we(e){return{open:!0,source:e.source,anchor:e.anchor}}function U(e){return!e.open&&e.anchor===null?e:{open:!1,source:null,anchor:null}}var Te,Ee=t((()=>{Te={open:!1,source:null,anchor:null}})),W,De,G,Oe=t((()=>{W=e(n(),1),d(),Ee(),j(),De=i(),G=({children:e,mode:t,placement:n=t===`click`?`bottom-start`:`right-start`,open:r,defaultOpen:i,onOpenChange:a})=>{let[o,d]=(0,W.useState)(Te),[p,m]=(0,W.useState)(i??!1),h=r!==void 0,g=h?r:p,_=(0,W.useRef)(null),{refs:v,floatingStyles:y,update:b}=s({placement:n,strategy:t===`contextmenu`?`fixed`:`absolute`,transform:!1,middleware:[c(6),f({padding:8}),u({padding:8})],whileElementsMounted:l}),x=(0,W.useCallback)(e=>{h||m(e),a?.(e),e||d(e=>U(e))},[h,a]),S=(0,W.useCallback)(()=>{x(!1)},[x]);(0,W.useEffect)(()=>{g||d(e=>U(e))},[g]);let C=(0,W.useCallback)((e,t)=>{v.setReference(e),d(we({source:t,anchor:{type:`element`,element:e}})),x(!0)},[v,x]),w=(0,W.useCallback)((e,t,n)=>{v.setReference(Ce(e,n)),d(we({source:t,anchor:{type:`point`,point:e,contextElement:n}})),x(!0),b()},[v,x,b]),T=(0,W.useCallback)(e=>{_.current=e,t===`click`&&v.setReference(e)},[t,v]),E=(0,W.useCallback)(e=>{if(t!==`click`)return;let n=e.currentTarget;if(g&&o.anchor?.type===`element`&&o.anchor.element===n){S();return}C(n,`click`)},[t,g,o.anchor,S,C]),D=(0,W.useCallback)(e=>{if(t!==`contextmenu`)return;e.preventDefault();let n=e.currentTarget,r=xe(e);w(r,`contextmenu`,n)},[t,w]),O=(0,W.useCallback)(e=>{if(!(e.key===`ContextMenu`||e.shiftKey&&e.key===`F10`))return;e.preventDefault();let n=e.currentTarget;if(t===`click`){C(n,`keyboard`);return}let r=Se(n.getBoundingClientRect());w(r,`keyboard`,n)},[t,C,w]),k=g&&o.anchor!==null,j=(0,W.useMemo)(()=>o.anchor?o.anchor.type===`point`?o.anchor.point:Se(o.anchor.element.getBoundingClientRect()):null,[o.anchor]),M=(0,W.useMemo)(()=>({mode:t,open:k,openSource:o.source,anchorPoint:j,floatingStyles:y,floatingRef:v.floating,triggerRef:_,setFloating:v.setFloating,registerTriggerElement:T,onTriggerClick:E,onTriggerContextMenu:D,onTriggerKeyDown:O,closeMenu:S}),[t,k,o.source,j,y,v.floating,v.setFloating,T,E,D,O,S]);return(0,De.jsx)(A.Provider,{value:M,children:e})},G.__docgenInfo={description:``,methods:[],displayName:`MenuRoot`,props:{children:{required:!0,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},mode:{required:!0,tsType:{name:`union`,raw:`"click" | "contextmenu"`,elements:[{name:`literal`,value:`"click"`},{name:`literal`,value:`"contextmenu"`}]},description:``},placement:{required:!1,tsType:{name:`Placement`},description:``,defaultValue:{value:`mode === "click" ? "bottom-start" : "right-start"`,computed:!1}},open:{required:!1,tsType:{name:`boolean`},description:``},defaultOpen:{required:!1,tsType:{name:`boolean`},description:``},onOpenChange:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(open: boolean) => void`,signature:{arguments:[{type:{name:`boolean`},name:`open`}],return:{name:`void`}}},description:``}}}})),ke,K,Ae=t((()=>{n(),o(),b(),ke=i(),K=({className:e})=>(0,ke.jsx)(`div`,{role:`separator`,className:a(y.uiPopupOptionSeparator,e)}),K.__docgenInfo={description:``,methods:[],displayName:`MenuSeparator`,props:{className:{required:!1,tsType:{name:`string`},description:``}}}}));function je(e,t,n){return n<t?t:Math.min(Math.max(e,t),n)}var q,Me,J,Ne,Pe=t((()=>{q=e(n(),1),p(),o(),C(),Me=e(r(),1),I(),j(),J=i(),Ne=({children:e,className:t,closeOnOutside:n=!0,closeOnEscape:r=!0,disableOutsideClick:i=!1,restoreFocus:o=!0,radius:s=76,itemSize:c=64,closeLabel:l=`Закрыть`})=>{let{open:u,anchorPoint:d,floatingRef:f,triggerRef:p,setFloating:h,closeMenu:v}=O(),y=typeof e==`function`?e({closeMenu:v}):e,b=(0,q.useMemo)(()=>q.Children.toArray(y),[y]),C=b.length,w=s*2+c,T=(0,q.useMemo)(()=>{if(typeof window>`u`||!d)return null;let e=w/2+8;return{x:je(d.x,e,window.innerWidth-e),y:je(d.y,e,window.innerHeight-e)}},[d,w]),E=(0,q.useCallback)(()=>{let e=f.current;return e?Array.from(e.querySelectorAll(`[data-menu-item="true"]:not([data-disabled="true"])`)):[]},[f]);_({active:u,initialFocus:e=>E()[0]??e,restoreFocus:o,restoreFocusTarget:()=>p.current,containerRef:f}),(0,q.useEffect)(()=>{if(!u||!d)return;let e=0;return e=window.requestAnimationFrame(()=>{(E()[0]??f.current)?.focus()}),()=>window.cancelAnimationFrame(e)},[u,d,E,f]),m({active:u,enabled:r,onDismiss:v,containerRef:f});let D=(0,q.useCallback)(()=>{!u||i||n&&v()},[u,i,n,v]);g([f,p],D);let k=(0,q.useCallback)(e=>{let t=E();if(t.length===0)return;let n=document.activeElement,r=n?t.indexOf(n):-1;if(e.key===`ArrowRight`||e.key===`ArrowDown`){e.preventDefault(),t[r>=0?(r+1)%t.length:0]?.focus();return}if(e.key===`ArrowLeft`||e.key===`ArrowUp`){e.preventDefault(),t[r>=0?(r-1+t.length)%t.length:t.length-1]?.focus();return}if(e.key===`Home`){e.preventDefault(),t[0]?.focus();return}e.key===`End`&&(e.preventDefault(),t[t.length-1]?.focus())},[E]);return typeof document>`u`?null:(0,Me.createPortal)((0,J.jsx)(x,{children:u&&T&&(0,J.jsxs)(S.div,{ref:h,style:{"--radial-panel-size":`${w}px`,"--radial-radius":`${s}px`,"--radial-item-size":`${c}px`,left:T.x-w/2,top:T.y-w/2,transformOrigin:`center`},role:`menu`,tabIndex:-1,className:a(F.radialPanel,t),onKeyDown:k,initial:{opacity:0,scale:.78},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.78},transition:{duration:.16,ease:`easeOut`},children:[(0,J.jsx)(`div`,{className:F.radialRing,"aria-hidden":`true`}),(0,J.jsx)(`button`,{type:`button`,role:`menuitem`,className:F.radialCenterButton,"aria-label":l,"data-menu-item":`true`,"data-radial-close":`true`,onClick:v,children:(0,J.jsx)(`span`,{className:F.radialCenterButtonText,children:l})}),(0,J.jsx)(`div`,{className:F.radialItems,children:b.map((e,t)=>{let n=C>0?-90+360/C*t:-90;return(0,J.jsx)(`div`,{className:F.radialItemSlot,style:{"--radial-item-angle":`${n}deg`},children:e},t)})})]})}),document.body)}})),Fe,Y,X,Ie=t((()=>{Fe=e(n(),1),o(),I(),j(),Y=i(),X=({children:e,icon:t,className:n,disabled:r,closeOnSelect:i=!0,onSelect:o})=>{let{closeMenu:s}=O(),c=(0,Fe.useCallback)(e=>{if(r){e.preventDefault(),e.stopPropagation();return}o?.(e),!e.defaultPrevented&&i&&s()},[r,o,i,s]);return(0,Y.jsxs)(`button`,{type:`button`,role:`menuitem`,tabIndex:-1,disabled:r,"aria-disabled":r,"data-menu-item":`true`,"data-disabled":r?`true`:void 0,"data-ui":`radial-menu-item`,"data-action":`select-radial-menu-item`,className:a(F.radialItem,n),onClick:c,children:[t&&(0,Y.jsx)(`span`,{className:F.radialItemIcon,children:t}),(0,Y.jsx)(`span`,{className:F.radialItemText,children:e})]})},X.__docgenInfo={description:``,methods:[],displayName:`RadialMenuItem`,props:{children:{required:!0,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},icon:{required:!1,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},className:{required:!1,tsType:{name:`string`},description:``},disabled:{required:!1,tsType:{name:`boolean`},description:``},closeOnSelect:{required:!1,tsType:{name:`boolean`},description:``,defaultValue:{value:`true`,computed:!1}},onSelect:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(event: React.MouseEvent<HTMLButtonElement>) => void`,signature:{arguments:[{type:{name:`ReactMouseEvent`,raw:`React.MouseEvent<HTMLButtonElement>`,elements:[{name:`HTMLButtonElement`}]},name:`event`}],return:{name:`void`}}},description:``}}}})),Le,Z,Re,ze=t((()=>{n(),ee(),ge(),ve(),be(),Oe(),Ae(),Pe(),Ie(),Le=i(),Z=({children:e,placement:t,open:n,defaultOpen:r,onOpenChange:i})=>(0,Le.jsx)(G,{mode:`contextmenu`,placement:t,open:n,defaultOpen:r,onOpenChange:i,children:e}),Re=Object.assign(Z,{Trigger:N,Content:z,RadialContent:Ne,Item:H,RadialItem:X,Separator:K,GroupLabel:B}),Z.__docgenInfo={description:``,methods:[],displayName:`ContextMenuRoot`,props:{children:{required:!0,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},placement:{required:!1,tsType:{name:`Placement`},description:``},open:{required:!1,tsType:{name:`boolean`},description:``},defaultOpen:{required:!1,tsType:{name:`boolean`},description:``},onOpenChange:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(open: boolean) => void`,signature:{arguments:[{type:{name:`boolean`},name:`open`}],return:{name:`void`}}},description:``}}}})),Be,Q,Ve=t((()=>{Be=e(n(),1),D(),j(),Q=({children:e})=>{let{mode:t,open:n,registerTriggerElement:r,onTriggerClick:i,onTriggerKeyDown:a}=O();if(t!==`click`)throw Error(`DropdownMenu.Trigger must be used within <DropdownMenu>`);return(0,Be.cloneElement)(e,{ref:t=>{let n=e.props.ref;w(n,t),r(t)},"aria-haspopup":`menu`,"aria-expanded":n,onClick:T(e.props.onClick,i),onKeyDown:E(e.props.onKeyDown,a)})},Q.__docgenInfo={description:``,methods:[],displayName:`DropdownMenuTrigger`,props:{children:{required:!0,tsType:{name:`ReactReactElement`,raw:`React.ReactElement<React.HTMLAttributes<HTMLElement> & { ref?: React.Ref<HTMLElement> }>`,elements:[{name:`intersection`,raw:`React.HTMLAttributes<HTMLElement> & { ref?: React.Ref<HTMLElement> }`,elements:[{name:`ReactHTMLAttributes`,raw:`React.HTMLAttributes<HTMLElement>`,elements:[{name:`HTMLElement`}]},{name:`signature`,type:`object`,raw:`{ ref?: React.Ref<HTMLElement> }`,signature:{properties:[{key:`ref`,value:{name:`ReactRef`,raw:`React.Ref<HTMLElement>`,elements:[{name:`HTMLElement`}],required:!1}}]}}]}]},description:``}}}})),He,$,Ue,We=t((()=>{n(),Ve(),ge(),ve(),be(),Oe(),Ae(),He=i(),$=({children:e,placement:t,open:n,defaultOpen:r,onOpenChange:i})=>(0,He.jsx)(G,{mode:`click`,placement:t,open:n,defaultOpen:r,onOpenChange:i,children:e}),Ue=Object.assign($,{Trigger:Q,Content:z,Item:H,Separator:K,GroupLabel:B}),$.__docgenInfo={description:``,methods:[],displayName:`DropdownMenuRoot`,props:{children:{required:!0,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},placement:{required:!1,tsType:{name:`Placement`},description:``},open:{required:!1,tsType:{name:`boolean`},description:``},defaultOpen:{required:!1,tsType:{name:`boolean`},description:``},onOpenChange:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(open: boolean) => void`,signature:{arguments:[{type:{name:`boolean`},name:`open`}],return:{name:`void`}}},description:``}}}}));export{ze as i,We as n,Re as r,Ue as t};
|
|
1
|
+
import{c as e,i as t}from"./preload-helper-B45gAKPr.js";import{C as n}from"./iframe-BlBhvHwk.js";import{t as r}from"./react-dom-Dymo4Ige.js";import{t as i}from"./jsx-runtime-BBQGix-2.js";import{a,i as o}from"./utils-De5IM4sM.js";import{a as s,f as c,h as l,p as u,r as d,u as f}from"./floating-ui.react-DeHGyTLR.js";import{a as p,i as m,n as h,o as g,s as _,t as v}from"./error-D6G67nWf.js";import{n as y,t as b}from"./ui.module-wFHXkJzp.js";import{a as x,n as S,t as C}from"./react-BRNfkHvq.js";function w(e,t){if(e){if(typeof e==`function`){e(t);return}e.current=t}}function T(e,t){return n=>{e?.(n),!n.defaultPrevented&&t(n)}}function E(e,t){return n=>{e?.(n),!n.defaultPrevented&&t(n)}}var D=t((()=>{}));function O(){let e=(0,k.useContext)(A);if(!e)throw h({hookName:`useMenuContext`,providerName:`MenuRoot`});return e}var k,A,j=t((()=>{k=e(n(),1),v(),A=(0,k.createContext)(null)})),M,N,ee=t((()=>{M=e(n(),1),D(),j(),N=({children:e})=>{let{mode:t,open:n,registerTriggerElement:r,onTriggerContextMenu:i,onTriggerKeyDown:a}=O();if(t!==`contextmenu`)throw Error(`ContextMenu.Trigger must be used within <ContextMenu>`);return(0,M.cloneElement)(e,{ref:t=>{let n=e.props.ref;w(n,t),r(t)},"aria-haspopup":`menu`,"aria-expanded":n,onContextMenu:T(e.props.onContextMenu,i),onKeyDown:E(e.props.onKeyDown,a)})},N.__docgenInfo={description:``,methods:[],displayName:`ContextMenuTrigger`,props:{children:{required:!0,tsType:{name:`ReactReactElement`,raw:`React.ReactElement<React.HTMLAttributes<HTMLElement> & { ref?: React.Ref<HTMLElement> }>`,elements:[{name:`intersection`,raw:`React.HTMLAttributes<HTMLElement> & { ref?: React.Ref<HTMLElement> }`,elements:[{name:`ReactHTMLAttributes`,raw:`React.HTMLAttributes<HTMLElement>`,elements:[{name:`HTMLElement`}]},{name:`signature`,type:`object`,raw:`{ ref?: React.Ref<HTMLElement> }`,signature:{properties:[{key:`ref`,value:{name:`ReactRef`,raw:`React.Ref<HTMLElement>`,elements:[{name:`HTMLElement`}],required:!1}}]}}]}]},description:``}}}})),te,ne,re,ie,ae,oe,se,ce,le,ue,de,fe,pe,me,P,F,I=t((()=>{te=`nPfxbm`,ne=`T8GF31`,re=`XM9raj`,ie=`JY0XKk`,ae=`Jj7pGe`,oe=`o7v3XA`,se=`f9wo9l`,ce=`_9IPwGF`,le=`CAmmlz`,ue=`_5KEBWR`,de=`L28onY`,fe=`Pg-1Y3`,pe=`ObIrS2`,me=`_0jf5vt`,P=`zKwsQF`,F={menuPanel:te,menuScroller:ne,menuItem:re,menuItemIcon:ie,menuItemText:ae,menuItemHotKey:oe,radialPanel:se,radialRing:ce,radialCenterButton:le,radialCenterButtonText:ue,radialItems:de,radialItemSlot:fe,radialItem:pe,radialItemIcon:me,radialItemText:P}})),L,he,R,z,ge=t((()=>{L=e(n(),1),p(),o(),C(),he=e(r(),1),I(),j(),R=i(),z=({children:e,className:t,closeOnOutside:n=!0,closeOnEscape:r=!0,disableOutsideClick:i=!1,restoreFocus:o=!0})=>{let{open:s,floatingStyles:c,floatingRef:l,triggerRef:u,setFloating:d,closeMenu:f}=O(),p=(0,L.useCallback)(()=>{let e=l.current;return e?Array.from(e.querySelectorAll(`[data-menu-item="true"]:not([data-disabled="true"])`)):[]},[l]);_({active:s,initialFocus:e=>p()[0]??e,restoreFocus:o,restoreFocusTarget:()=>u.current,containerRef:l}),m({active:s,enabled:r,onDismiss:f,containerRef:l});let h=(0,L.useCallback)(()=>{!s||i||n&&f()},[s,i,n,f]);g([l,u],h);let v=(0,L.useCallback)(e=>{let t=p();if(t.length===0)return;let n=document.activeElement,r=n?t.indexOf(n):-1;if(e.key===`ArrowDown`){e.preventDefault(),t[r>=0?(r+1)%t.length:0]?.focus();return}if(e.key===`ArrowUp`){e.preventDefault(),t[r>=0?(r-1+t.length)%t.length:t.length-1]?.focus();return}if(e.key===`Home`){e.preventDefault(),t[0]?.focus();return}e.key===`End`&&(e.preventDefault(),t[t.length-1]?.focus())},[p]);return typeof document>`u`?null:(0,he.createPortal)((0,R.jsx)(x,{children:s&&(0,R.jsx)(S.div,{ref:d,style:c,role:`menu`,tabIndex:-1,className:a(F.menuPanel,t),onKeyDown:v,initial:{opacity:0,scale:.96,y:-2},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.96,y:-2},transition:{duration:.14,ease:`easeOut`},children:(0,R.jsx)(`div`,{className:a(F.menuScroller,`scrollable`),children:typeof e==`function`?e({closeMenu:f}):e})})}),document.body)}})),_e,B,ve=t((()=>{n(),o(),b(),_e=i(),B=({children:e,className:t})=>(0,_e.jsx)(`div`,{className:a(y.uiPopupGroupLabel,t),children:e}),B.__docgenInfo={description:``,methods:[],displayName:`MenuGroupLabel`,props:{children:{required:!0,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},className:{required:!1,tsType:{name:`string`},description:``}}}})),ye,V,H,be=t((()=>{ye=e(n(),1),o(),b(),I(),j(),V=i(),H=({children:e,icon:t,hotKey:n,className:r,disabled:i,href:o,target:s,rel:c,closeOnSelect:l=!0,onSelect:u})=>{let{closeMenu:d}=O(),f=(0,ye.useCallback)(e=>{if(i){e.preventDefault(),e.stopPropagation();return}u?.(e),!e.defaultPrevented&&l&&d()},[i,u,l,d]),p=a(y.uiPopupOption,F.menuItem,r);return o?(0,V.jsxs)(`a`,{href:o,target:s,rel:c,role:`menuitem`,tabIndex:-1,"aria-disabled":i,"data-menu-item":`true`,"data-disabled":i?`true`:void 0,"data-ui":`context-menu-item`,"data-action":`select-context-menu-item`,className:p,onClick:f,children:[t&&(0,V.jsx)(`span`,{className:a(y.uiPopupOptionIcon,F.menuItemIcon),children:t}),(0,V.jsx)(`span`,{className:a(y.uiOptionText,F.menuItemText),children:e}),n&&(0,V.jsx)(`kbd`,{className:a(y.keyboard,F.menuItemHotKey),children:n})]}):(0,V.jsxs)(`button`,{type:`button`,role:`menuitem`,tabIndex:-1,disabled:i,"data-menu-item":`true`,"data-disabled":i?`true`:void 0,"data-ui":`context-menu-item`,"data-action":`select-context-menu-item`,className:p,onClick:f,children:[t&&(0,V.jsx)(`span`,{className:a(y.uiPopupOptionIcon,F.menuItemIcon),children:t}),(0,V.jsx)(`span`,{className:a(y.uiOptionText,F.menuItemText),children:e}),n&&(0,V.jsx)(`kbd`,{className:a(y.keyboard,F.menuItemHotKey),children:n})]})},H.__docgenInfo={description:``,methods:[],displayName:`MenuItem`,props:{children:{required:!0,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},icon:{required:!1,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},hotKey:{required:!1,tsType:{name:`string`},description:``},className:{required:!1,tsType:{name:`string`},description:``},disabled:{required:!1,tsType:{name:`boolean`},description:``},href:{required:!1,tsType:{name:`string`},description:``},target:{required:!1,tsType:{name:`string`},description:``},rel:{required:!1,tsType:{name:`string`},description:``},closeOnSelect:{required:!1,tsType:{name:`boolean`},description:``,defaultValue:{value:`true`,computed:!1}},onSelect:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(event: React.MouseEvent<HTMLElement>) => void`,signature:{arguments:[{type:{name:`ReactMouseEvent`,raw:`React.MouseEvent<HTMLElement>`,elements:[{name:`HTMLElement`}]},name:`event`}],return:{name:`void`}}},description:``}}}}));function xe(e){return{x:e.clientX,y:e.clientY}}function Se(e){return{x:e.left+e.width/2,y:e.top+e.height/2}}function Ce(e,t){return{contextElement:t??void 0,getBoundingClientRect:()=>({x:e.x,y:e.y,top:e.y,left:e.x,bottom:e.y,right:e.x,width:0,height:0,toJSON:()=>{}})}}function we(e){return{open:!0,source:e.source,anchor:e.anchor}}function U(e){return!e.open&&e.anchor===null?e:{open:!1,source:null,anchor:null}}var Te,Ee=t((()=>{Te={open:!1,source:null,anchor:null}})),W,De,G,Oe=t((()=>{W=e(n(),1),d(),Ee(),j(),De=i(),G=({children:e,mode:t,placement:n=t===`click`?`bottom-start`:`right-start`,open:r,defaultOpen:i,onOpenChange:a})=>{let[o,d]=(0,W.useState)(Te),[p,m]=(0,W.useState)(i??!1),h=r!==void 0,g=h?r:p,_=(0,W.useRef)(null),{refs:v,floatingStyles:y,update:b}=s({placement:n,strategy:t===`contextmenu`?`fixed`:`absolute`,transform:!1,middleware:[c(6),f({padding:8}),u({padding:8})],whileElementsMounted:l}),x=(0,W.useCallback)(e=>{h||m(e),a?.(e),e||d(e=>U(e))},[h,a]),S=(0,W.useCallback)(()=>{x(!1)},[x]);(0,W.useEffect)(()=>{g||d(e=>U(e))},[g]);let C=(0,W.useCallback)((e,t)=>{v.setReference(e),d(we({source:t,anchor:{type:`element`,element:e}})),x(!0)},[v,x]),w=(0,W.useCallback)((e,t,n)=>{v.setReference(Ce(e,n)),d(we({source:t,anchor:{type:`point`,point:e,contextElement:n}})),x(!0),b()},[v,x,b]),T=(0,W.useCallback)(e=>{_.current=e,t===`click`&&v.setReference(e)},[t,v]),E=(0,W.useCallback)(e=>{if(t!==`click`)return;let n=e.currentTarget;if(g&&o.anchor?.type===`element`&&o.anchor.element===n){S();return}C(n,`click`)},[t,g,o.anchor,S,C]),D=(0,W.useCallback)(e=>{if(t!==`contextmenu`)return;e.preventDefault();let n=e.currentTarget,r=xe(e);w(r,`contextmenu`,n)},[t,w]),O=(0,W.useCallback)(e=>{if(!(e.key===`ContextMenu`||e.shiftKey&&e.key===`F10`))return;e.preventDefault();let n=e.currentTarget;if(t===`click`){C(n,`keyboard`);return}let r=Se(n.getBoundingClientRect());w(r,`keyboard`,n)},[t,C,w]),k=g&&o.anchor!==null,j=(0,W.useMemo)(()=>o.anchor?o.anchor.type===`point`?o.anchor.point:Se(o.anchor.element.getBoundingClientRect()):null,[o.anchor]),M=(0,W.useMemo)(()=>({mode:t,open:k,openSource:o.source,anchorPoint:j,floatingStyles:y,floatingRef:v.floating,triggerRef:_,setFloating:v.setFloating,registerTriggerElement:T,onTriggerClick:E,onTriggerContextMenu:D,onTriggerKeyDown:O,closeMenu:S}),[t,k,o.source,j,y,v.floating,v.setFloating,T,E,D,O,S]);return(0,De.jsx)(A.Provider,{value:M,children:e})},G.__docgenInfo={description:``,methods:[],displayName:`MenuRoot`,props:{children:{required:!0,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},mode:{required:!0,tsType:{name:`union`,raw:`"click" | "contextmenu"`,elements:[{name:`literal`,value:`"click"`},{name:`literal`,value:`"contextmenu"`}]},description:``},placement:{required:!1,tsType:{name:`Placement`},description:``,defaultValue:{value:`mode === "click" ? "bottom-start" : "right-start"`,computed:!1}},open:{required:!1,tsType:{name:`boolean`},description:``},defaultOpen:{required:!1,tsType:{name:`boolean`},description:``},onOpenChange:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(open: boolean) => void`,signature:{arguments:[{type:{name:`boolean`},name:`open`}],return:{name:`void`}}},description:``}}}})),ke,K,Ae=t((()=>{n(),o(),b(),ke=i(),K=({className:e})=>(0,ke.jsx)(`div`,{role:`separator`,className:a(y.uiPopupOptionSeparator,e)}),K.__docgenInfo={description:``,methods:[],displayName:`MenuSeparator`,props:{className:{required:!1,tsType:{name:`string`},description:``}}}}));function je(e,t,n){return n<t?t:Math.min(Math.max(e,t),n)}var q,Me,J,Ne,Pe=t((()=>{q=e(n(),1),p(),o(),C(),Me=e(r(),1),I(),j(),J=i(),Ne=({children:e,className:t,closeOnOutside:n=!0,closeOnEscape:r=!0,disableOutsideClick:i=!1,restoreFocus:o=!0,radius:s=76,itemSize:c=64,closeLabel:l=`Закрыть`})=>{let{open:u,anchorPoint:d,floatingRef:f,triggerRef:p,setFloating:h,closeMenu:v}=O(),y=typeof e==`function`?e({closeMenu:v}):e,b=(0,q.useMemo)(()=>q.Children.toArray(y),[y]),C=b.length,w=s*2+c,T=(0,q.useMemo)(()=>{if(typeof window>`u`||!d)return null;let e=w/2+8;return{x:je(d.x,e,window.innerWidth-e),y:je(d.y,e,window.innerHeight-e)}},[d,w]),E=(0,q.useCallback)(()=>{let e=f.current;return e?Array.from(e.querySelectorAll(`[data-menu-item="true"]:not([data-disabled="true"])`)):[]},[f]);_({active:u,initialFocus:e=>E()[0]??e,restoreFocus:o,restoreFocusTarget:()=>p.current,containerRef:f}),(0,q.useEffect)(()=>{if(!u||!d)return;let e=0;return e=window.requestAnimationFrame(()=>{(E()[0]??f.current)?.focus()}),()=>window.cancelAnimationFrame(e)},[u,d,E,f]),m({active:u,enabled:r,onDismiss:v,containerRef:f});let D=(0,q.useCallback)(()=>{!u||i||n&&v()},[u,i,n,v]);g([f,p],D);let k=(0,q.useCallback)(e=>{let t=E();if(t.length===0)return;let n=document.activeElement,r=n?t.indexOf(n):-1;if(e.key===`ArrowRight`||e.key===`ArrowDown`){e.preventDefault(),t[r>=0?(r+1)%t.length:0]?.focus();return}if(e.key===`ArrowLeft`||e.key===`ArrowUp`){e.preventDefault(),t[r>=0?(r-1+t.length)%t.length:t.length-1]?.focus();return}if(e.key===`Home`){e.preventDefault(),t[0]?.focus();return}e.key===`End`&&(e.preventDefault(),t[t.length-1]?.focus())},[E]);return typeof document>`u`?null:(0,Me.createPortal)((0,J.jsx)(x,{children:u&&T&&(0,J.jsxs)(S.div,{ref:h,style:{"--radial-panel-size":`${w}px`,"--radial-radius":`${s}px`,"--radial-item-size":`${c}px`,left:T.x-w/2,top:T.y-w/2,transformOrigin:`center`},role:`menu`,tabIndex:-1,className:a(F.radialPanel,t),onKeyDown:k,initial:{opacity:0,scale:.78},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.78},transition:{duration:.16,ease:`easeOut`},children:[(0,J.jsx)(`div`,{className:F.radialRing,"aria-hidden":`true`}),(0,J.jsx)(`button`,{type:`button`,role:`menuitem`,className:F.radialCenterButton,"aria-label":l,"data-menu-item":`true`,"data-radial-close":`true`,onClick:v,children:(0,J.jsx)(`span`,{className:F.radialCenterButtonText,children:l})}),(0,J.jsx)(`div`,{className:F.radialItems,children:b.map((e,t)=>{let n=C>0?-90+360/C*t:-90;return(0,J.jsx)(`div`,{className:F.radialItemSlot,style:{"--radial-item-angle":`${n}deg`},children:e},t)})})]})}),document.body)}})),Fe,Y,X,Ie=t((()=>{Fe=e(n(),1),o(),I(),j(),Y=i(),X=({children:e,icon:t,className:n,disabled:r,closeOnSelect:i=!0,onSelect:o})=>{let{closeMenu:s}=O(),c=(0,Fe.useCallback)(e=>{if(r){e.preventDefault(),e.stopPropagation();return}o?.(e),!e.defaultPrevented&&i&&s()},[r,o,i,s]);return(0,Y.jsxs)(`button`,{type:`button`,role:`menuitem`,tabIndex:-1,disabled:r,"aria-disabled":r,"data-menu-item":`true`,"data-disabled":r?`true`:void 0,"data-ui":`radial-menu-item`,"data-action":`select-radial-menu-item`,className:a(F.radialItem,n),onClick:c,children:[t&&(0,Y.jsx)(`span`,{className:F.radialItemIcon,children:t}),(0,Y.jsx)(`span`,{className:F.radialItemText,children:e})]})},X.__docgenInfo={description:``,methods:[],displayName:`RadialMenuItem`,props:{children:{required:!0,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},icon:{required:!1,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},className:{required:!1,tsType:{name:`string`},description:``},disabled:{required:!1,tsType:{name:`boolean`},description:``},closeOnSelect:{required:!1,tsType:{name:`boolean`},description:``,defaultValue:{value:`true`,computed:!1}},onSelect:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(event: React.MouseEvent<HTMLButtonElement>) => void`,signature:{arguments:[{type:{name:`ReactMouseEvent`,raw:`React.MouseEvent<HTMLButtonElement>`,elements:[{name:`HTMLButtonElement`}]},name:`event`}],return:{name:`void`}}},description:``}}}})),Le,Z,Re,ze=t((()=>{n(),ee(),ge(),ve(),be(),Oe(),Ae(),Pe(),Ie(),Le=i(),Z=({children:e,placement:t,open:n,defaultOpen:r,onOpenChange:i})=>(0,Le.jsx)(G,{mode:`contextmenu`,placement:t,open:n,defaultOpen:r,onOpenChange:i,children:e}),Re=Object.assign(Z,{Trigger:N,Content:z,RadialContent:Ne,Item:H,RadialItem:X,Separator:K,GroupLabel:B}),Z.__docgenInfo={description:``,methods:[],displayName:`ContextMenuRoot`,props:{children:{required:!0,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},placement:{required:!1,tsType:{name:`Placement`},description:``},open:{required:!1,tsType:{name:`boolean`},description:``},defaultOpen:{required:!1,tsType:{name:`boolean`},description:``},onOpenChange:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(open: boolean) => void`,signature:{arguments:[{type:{name:`boolean`},name:`open`}],return:{name:`void`}}},description:``}}}})),Be,Q,Ve=t((()=>{Be=e(n(),1),D(),j(),Q=({children:e})=>{let{mode:t,open:n,registerTriggerElement:r,onTriggerClick:i,onTriggerKeyDown:a}=O();if(t!==`click`)throw Error(`DropdownMenu.Trigger must be used within <DropdownMenu>`);return(0,Be.cloneElement)(e,{ref:t=>{let n=e.props.ref;w(n,t),r(t)},"aria-haspopup":`menu`,"aria-expanded":n,onClick:T(e.props.onClick,i),onKeyDown:E(e.props.onKeyDown,a)})},Q.__docgenInfo={description:``,methods:[],displayName:`DropdownMenuTrigger`,props:{children:{required:!0,tsType:{name:`ReactReactElement`,raw:`React.ReactElement<React.HTMLAttributes<HTMLElement> & { ref?: React.Ref<HTMLElement> }>`,elements:[{name:`intersection`,raw:`React.HTMLAttributes<HTMLElement> & { ref?: React.Ref<HTMLElement> }`,elements:[{name:`ReactHTMLAttributes`,raw:`React.HTMLAttributes<HTMLElement>`,elements:[{name:`HTMLElement`}]},{name:`signature`,type:`object`,raw:`{ ref?: React.Ref<HTMLElement> }`,signature:{properties:[{key:`ref`,value:{name:`ReactRef`,raw:`React.Ref<HTMLElement>`,elements:[{name:`HTMLElement`}],required:!1}}]}}]}]},description:``}}}})),He,$,Ue,We=t((()=>{n(),Ve(),ge(),ve(),be(),Oe(),Ae(),He=i(),$=({children:e,placement:t,open:n,defaultOpen:r,onOpenChange:i})=>(0,He.jsx)(G,{mode:`click`,placement:t,open:n,defaultOpen:r,onOpenChange:i,children:e}),Ue=Object.assign($,{Trigger:Q,Content:z,Item:H,Separator:K,GroupLabel:B}),$.__docgenInfo={description:``,methods:[],displayName:`DropdownMenuRoot`,props:{children:{required:!0,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},placement:{required:!1,tsType:{name:`Placement`},description:``},open:{required:!1,tsType:{name:`boolean`},description:``},defaultOpen:{required:!1,tsType:{name:`boolean`},description:``},onOpenChange:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(open: boolean) => void`,signature:{arguments:[{type:{name:`boolean`},name:`open`}],return:{name:`void`}}},description:``}}}}));export{ze as i,We as n,Re as r,Ue as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as e,i as t}from"./preload-helper-B45gAKPr.js";import{C as n}from"./iframe-
|
|
1
|
+
import{c as e,i as t}from"./preload-helper-B45gAKPr.js";import{C as n}from"./iframe-BlBhvHwk.js";import{t as r}from"./jsx-runtime-BBQGix-2.js";import{a as i,i as a}from"./utils-De5IM4sM.js";import{S as o,b as s,ft as c,mt as l,t as u,v as d,wt as f}from"./lucide-react-DMR456up.js";import{t as p}from"./Button-DDo_z6nQ.js";import{t as m}from"./CheckBox-Dou46_Q2.js";import{t as h}from"./button-CofLsODD.js";import{a as g}from"./Input-y5ZPRO5m.js";import{t as _}from"./input-DM0LWdwF.js";import{t as v}from"./Select-B36pVYvS.js";import{t as y}from"./select-DDFRb6jY.js";import{t as b}from"./check-box-BUYji84r.js";import{o as x,t as S}from"./misc-_mjs2DH3.js";var C,w,T,E,D,O,k,A=t((()=>{C=`sj-rIq`,w=`_3anR7j`,T=`gMRIsT`,E=`f5Pv1e`,D=`q7eZzv`,O=`maUL24`,k={expandableActionPanel:C,content:w,contentScroller:T,labeledPanel:E,label:D,labeledActionPanel:O}}));function j({children:e,className:t,contentClassName:n,toggleClassName:r,open:a,defaultOpen:o=!1,disabled:s,onOpenChange:u,expandLabel:d=`Раскрыть панель действий влево`,collapseLabel:f=`Свернуть панель действий`,panelLabel:m=`Действия панели`,itemSelector:h,scrollPadding:g,smoothScroll:_}){let[v,y]=(0,M.useState)(o),b=(0,M.useId)(),S=a!==void 0,C=S?a:v,w=(0,M.useCallback)(e=>{let t=typeof e==`function`?e(C):e;S||y(t),u?.(t)},[S,u,C]),T=()=>w(e=>!e),E=C?c:l;return(0,N.jsxs)(`div`,{className:i(k.expandableActionPanel,t),"data-ui":`expandable-action-panel`,"data-open":C?``:void 0,children:[(0,N.jsx)(p,{className:r,icon:(0,N.jsx)(E,{}),title:C?f:d,disabled:s,variant:`neutralOutline`,"aria-expanded":C,"aria-controls":b,"data-ui":`expandable-action-panel-toggle`,"data-action":C?`collapse-action-panel`:`expand-action-panel`,onClick:T}),C&&(0,N.jsx)(`div`,{id:b,role:`group`,"aria-label":m,className:i(k.content,n),children:(0,N.jsx)(x,{className:k.contentScroller,itemSelector:h,scrollPadding:g,smooth:_,children:e})})]})}var M,N,P=t((()=>{M=e(n(),1),a(),u(),h(),S(),A(),N=r(),j.__docgenInfo={description:`Горизонтальная раскрывающаяся панель действий.
|
|
2
2
|
Не знает о внешнем layout и может использоваться рядом с любым содержимым.`,methods:[],displayName:`ExpandableActionPanel`,props:{className:{required:!1,tsType:{name:`string`},description:``},contentClassName:{required:!1,tsType:{name:`string`},description:``},toggleClassName:{required:!1,tsType:{name:`string`},description:``},open:{required:!1,tsType:{name:`boolean`},description:``},defaultOpen:{required:!1,tsType:{name:`boolean`},description:``,defaultValue:{value:`false`,computed:!1}},disabled:{required:!1,tsType:{name:`boolean`},description:``},onOpenChange:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(open: boolean) => void`,signature:{arguments:[{type:{name:`boolean`},name:`open`}],return:{name:`void`}}},description:``},expandLabel:{required:!1,tsType:{name:`string`},description:``,defaultValue:{value:`"Раскрыть панель действий влево"`,computed:!1}},collapseLabel:{required:!1,tsType:{name:`string`},description:``,defaultValue:{value:`"Свернуть панель действий"`,computed:!1}},panelLabel:{required:!1,tsType:{name:`string`},description:``,defaultValue:{value:`"Действия панели"`,computed:!1}},itemSelector:{required:!1,tsType:{name:`string`},description:``},scrollPadding:{required:!1,tsType:{name:`number`},description:``},smoothScroll:{required:!1,tsType:{name:`boolean`},description:``}},composes:[`PropsWithChildren`]}}));function F({label:e,className:t,labelClassName:n,labelStyle:r,labelMinWidth:a=`12em`,panelClassName:o,open:s,defaultOpen:c,...l}){let u={...r,minWidth:a},d=typeof e==`string`?e:void 0;return(0,I.jsxs)(`div`,{className:i(k.labeledPanel,t),"data-ui":`labeled-expandable-action-panel`,children:[(0,I.jsx)(`div`,{className:i(`flexEllipsis`,k.label,n),style:u,title:d,children:e}),(0,I.jsx)(j,{...l,open:s,defaultOpen:c,className:i(k.labeledActionPanel,o)})]})}var I,L=t((()=>{n(),a(),P(),A(),I=r(),F.__docgenInfo={description:"Раскрывающаяся панель действий с левым текстом, который сжимается через `flexEllipsis`.",methods:[],displayName:`LabeledExpandableActionPanel`,props:{label:{required:!0,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:``},className:{required:!1,tsType:{name:`string`},description:``},labelClassName:{required:!1,tsType:{name:`string`},description:``},labelStyle:{required:!1,tsType:{name:`ReactCSSProperties`,raw:`React.CSSProperties`},description:``},labelMinWidth:{required:!1,tsType:{name:`ReactCSSProperties["minWidth"]`,raw:`React.CSSProperties["minWidth"]`},description:``,defaultValue:{value:`"12em"`,computed:!1}},panelClassName:{required:!1,tsType:{name:`string`},description:``}},composes:[`Omit`]}}));function R(){let[e,t]=(0,z.useState)(``),[n,r]=(0,z.useState)(!1),[i,a]=(0,z.useState)(`Все`);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`div`,{style:{width:`calc(14em + var(--width-add))`},children:(0,B.jsx)(g,{placeholder:`Поиск`,value:e,onChange:t,endAdornment:(0,B.jsx)(s,{})})}),(0,B.jsx)(`div`,{style:{width:`calc(12em + var(--width-add))`},children:(0,B.jsx)(v,{placeholder:`Статус`,options:U,value:i,onChange:a,getOptionKey:e=>e,getOptionLabel:e=>e})}),(0,B.jsx)(m,{placeholder:`Только мои`,value:n,onChange:r,noWrap:!0}),(0,B.jsx)(p,{icon:(0,B.jsx)(o,{}),title:`Обновить`}),(0,B.jsx)(p,{icon:(0,B.jsx)(d,{}),title:`Настроить`}),(0,B.jsx)(p,{icon:(0,B.jsx)(f,{}),tone:`success`,appearance:`solid`,children:`Применить`})]})}var z,B,V,H,U,W,G,K;t((()=>{z=e(n(),1),u(),h(),b(),_(),y(),P(),L(),B=r(),{fn:V}=__STORYBOOK_MODULE_TEST__,H={title:`Shared/UI/ExpandableActionPanel`,component:F,args:{label:`Длинное название строки с результатами расчёта и параметрами отбора`,labelMinWidth:`18em`,defaultOpen:!1,onOpenChange:V()},parameters:{atomicCanvas:!0,layout:`padded`},argTypes:{label:{description:`Текст или ReactNode слева от панели.`,control:`text`},labelMinWidth:{description:"Минимальная ширина `flexEllipsis`-текста.",control:`text`},defaultOpen:{description:`Начальное состояние раскрытия в uncontrolled-режиме.`,control:`boolean`},open:{description:`Контролируемое состояние раскрытия.`,control:`boolean`},onOpenChange:{description:`Вызывается при раскрытии или сворачивании панели.`,control:!1}}},U=[`Все`,`Активные`,`Архив`],W={render:e=>(0,B.jsx)(`div`,{style:{width:`min(100%, 920px)`},children:(0,B.jsx)(F,{...e,children:(0,B.jsx)(R,{})})})},G={render:()=>(0,B.jsx)(`div`,{style:{width:`min(100%, 720px)`,display:`flex`,justifyContent:`flex-end`},children:(0,B.jsx)(j,{defaultOpen:!0,children:(0,B.jsx)(R,{})})})},W.parameters={...W.parameters,docs:{...W.parameters?.docs,source:{originalSource:`{
|
|
3
3
|
render: args => <div style={{
|
|
4
4
|
width: "min(100%, 920px)"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e}from"./preload-helper-B45gAKPr.js";import{E as t,a as n,d as r,f as i,l as a,m as o,n as s,p as c,r as l,u}from"./blocks-
|
|
1
|
+
import{i as e}from"./preload-helper-B45gAKPr.js";import{E as t,a as n,d as r,f as i,l as a,m as o,n as s,p as c,r as l,u}from"./blocks-D2VXMZGt.js";import{t as d}from"./jsx-runtime-BBQGix-2.js";import{t as f}from"./mdx-react-shim-BXKB7xbF.js";import{AlignItems as p,BasicColumn as m,BasicRow as h,Directions as g,FlexItems as _,Gaps as v,InlineFlex as y,JustifyContent as b,Predefined as x,RealWorld as S,Wrapping as C,n as w,t as T}from"./Flex.stories-DMuAAT19.js";function E(e){let o={code:`code`,h2:`h2`,h3:`h3`,li:`li`,p:`p`,pre:`pre`,ul:`ul`,...t(),...e.components};return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(a,{of:T,parameters:{docs:{toc:!0}}}),`
|
|
2
2
|
`,(0,O.jsx)(c,{children:`Flex`}),`
|
|
3
3
|
`,(0,O.jsx)(i,{children:`Набор flex-layout примитивов для строк, колонок и быстрых компоновок интерфейса`}),`
|
|
4
4
|
`,(0,O.jsx)(o.p,{children:`Flex уже имеет живые stories, а эта страница собирает их в структурированную документацию с краткими рекомендациями, примерами подключения и API.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c as e,i as t}from"./preload-helper-B45gAKPr.js";import{C as n}from"./iframe-
|
|
1
|
+
import{c as e,i as t}from"./preload-helper-B45gAKPr.js";import{C as n}from"./iframe-BlBhvHwk.js";import{t as r}from"./jsx-runtime-BBQGix-2.js";import{n as i,r as a,t as ee}from"./media-BZMZJXu3.js";var o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,te,ne,re,ie,ae,oe,se,ce,le,ue,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U,de,fe,pe,me,he,ge,_e,W,ve,ye,be,xe,Se,Ce,we,Te,G,Ee=t((()=>{o=`ZNPIAt`,s=`FOfB6f`,c=`S3zmDT`,l=`ZFdq8E`,u=`VAzJwr`,d=`-U1mun`,f=`_4ZMtr-`,p=`SKOoTV`,m=`sSe6vs`,h=`_3K-dKm`,g=`-Pfy-z`,_=`beSYgR`,v=`Ewhv1G`,y=`JXvBB6`,b=`hN3T0k`,x=`KKCJ5o`,S=`MnX1Le`,te=`Hom9eH`,ne=`Oujm4J`,re=`_2ttx6l`,ie=`QEwI8b`,ae=`_7GQOS7`,oe=`_2IOpAA`,se=`fZOYKH`,ce=`_01H9Wl`,le=`GiMq3P`,ue=`tfwckC`,C=`_9tNYb7`,w=`PoehYn`,T=`D9yh46`,E=`B5WUhS`,D=`KfUmo4`,O=`m-8JGj`,k=`zFcs1z`,A=`_0wKkFA`,j=`VQY6wh`,M=`csJmh7`,N=`_-8r3Oj`,P=`sCELJe`,F=`NrH1WE`,I=`IIgbrj`,L=`alT7CJ`,R=`TBFK23`,z=`JR1URZ`,B=`i1imd3`,V=`IVZ-ii`,H=`zhghPS`,U=`-A4gJM`,de=`_3Q-lT-`,fe=`YSg8P9`,pe=`RMXnTk`,me=`YyYE7z`,he=`LD3bM5`,ge=`HpcoTp`,_e=`E7ItD3`,W=`v0JFEC`,ve=`pmMEmH`,ye=`qevFHG`,be=`OTPY33`,xe=`AjRxTP`,Se=`_1YaZWf`,Ce=`H-DHBq`,we=`JzIGGJ`,Te=`aqYTBq`,G={container:o,inline:s,row:c,column:l,rowReverse:u,columnReverse:d,wrap:f,nowrap:p,wrapReverse:m,alignStart:h,alignCenter:g,alignEnd:_,alignStretch:v,alignBaseline:y,justifyStart:b,justifyCenter:x,justifyEnd:S,justifyStretch:te,justifyBetween:ne,justifyAround:re,justifyEvenly:ie,alignContentStart:ae,alignContentCenter:oe,alignContentEnd:se,alignContentStretch:ce,alignContentBetween:le,alignContentAround:ue,alignContentEvenly:C,gapNone:w,gapRowXs:T,gapRowSm:E,gapRowMd:D,gapRowLg:O,gapRowXl:k,gapColumnXs:A,gapColumnSm:j,gapColumnMd:M,gapColumnLg:N,gapColumnXl:P,gapXs:F,gapSm:I,gapMd:L,gapLg:R,gapXl:z,item:B,grow:V,grow0:H,shrink:U,shrink0:de,basis0:fe,basisAuto:pe,flex0:me,flex1:he,alignSelfStart:ge,alignSelfCenter:_e,alignSelfEnd:W,alignSelfStretch:ve,alignSelfBaseline:ye,justifySelfCenter:be,justifySelfEnd:xe,justifySelfStretch:Se,center:Ce,columnCenter:we,centerBetween:Te}})),K,De,Oe,ke,q=t((()=>{K=e(n(),1),Ee(),De=e=>(0,K.useMemo)(()=>{let t=[G.container];return e.inline&&t.push(G.inline),e.row?t.push(G.row):e.column?t.push(G.column):e.rowReverse?t.push(G.rowReverse):e.columnReverse&&t.push(G.columnReverse),e.wrap?t.push(G.wrap):e.nowrap?t.push(G.nowrap):e.wrapReverse&&t.push(G.wrapReverse),e.align&&t.push(G[`align${e.align.charAt(0).toUpperCase()+e.align.slice(1)}`]),e.justify&&t.push(G[`justify${e.justify.charAt(0).toUpperCase()+e.justify.slice(1)}`]),e.alignContent&&t.push(G[`alignContent${e.alignContent.charAt(0).toUpperCase()+e.alignContent.slice(1)}`]),e.gap===`none`?t.push(G.gapNone):e.gap&&t.push(G[`gap${e.gap.charAt(0).toUpperCase()+e.gap.slice(1)}`]),e.gapRow&&t.push(G[`gapRow${e.gapRow.charAt(0).toUpperCase()+e.gapRow.slice(1)}`]),e.gapColumn&&t.push(G[`gapColumn${e.gapColumn.charAt(0).toUpperCase()+e.gapColumn.slice(1)}`]),t.filter(Boolean).join(` `)},[e]),Oe=e=>(0,K.useMemo)(()=>{let t=[G.item];return e.flex0&&t.push(G.flex0),e.flex1&&t.push(G.flex1),!e.flex0&&!e.flex1&&(e.grow?t.push(G.grow):t.push(G.grow0),e.shrink===!1?t.push(G.shrink0):t.push(G.shrink),e.basis===`0`?t.push(G.basis0):e.basis===`auto`&&t.push(G.basisAuto)),e.alignSelf&&t.push(G[`alignSelf${e.alignSelf.charAt(0).toUpperCase()+e.alignSelf.slice(1)}`]),e.justifySelf&&t.push(G[`justifySelf${e.justifySelf.charAt(0).toUpperCase()+e.justifySelf.slice(1)}`]),t.filter(Boolean).join(` `)},[e]),ke=e=>G[e]})),J,Ae,Y,X=t((()=>{J=e(n(),1),a(),q(),Ae=[`inline`,`row`,`column`,`rowReverse`,`columnReverse`,`wrap`,`nowrap`,`wrapReverse`,`align`,`justify`,`alignContent`,`gap`,`gapRow`,`gapColumn`],Y=(0,J.forwardRef)(({children:e,className:t=``,as:n,style:r,inline:a,row:o,column:s,rowReverse:c,columnReverse:l,wrap:u,nowrap:d,wrapReverse:f,align:p,justify:m,alignContent:h,gap:g,gapRow:_,gapColumn:v,...y},b)=>{let{activeBreakpoint:x}=ee(),S=[De((0,J.useMemo)(()=>i({inline:a,row:o,column:s,rowReverse:c,columnReverse:l,wrap:u,nowrap:d,wrapReverse:f,align:p,justify:m,alignContent:h,gap:g,gapRow:_,gapColumn:v},x,Ae),[x,p,h,s,l,g,v,_,a,m,d,o,c,u,f])),t].filter(Boolean).join(` `);return(0,J.createElement)(n||`div`,{...y,ref:b,className:S,style:r},e)}),Y.displayName=`FlexContainer`,Y.__docgenInfo={description:``,methods:[],displayName:`FlexContainer`,props:{inline:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`boolean`}],raw:`ResponsiveValue<boolean>`},description:"Тип display `flex | inline-flex`"},row:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`boolean`}],raw:`ResponsiveValue<boolean>`},description:`Направление flex-контейнера`},column:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`boolean`}],raw:`ResponsiveValue<boolean>`},description:``},rowReverse:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`boolean`}],raw:`ResponsiveValue<boolean>`},description:``},columnReverse:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`boolean`}],raw:`ResponsiveValue<boolean>`},description:``},wrap:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`boolean`}],raw:`ResponsiveValue<boolean>`},description:`Перенос элементов`},nowrap:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`boolean`}],raw:`ResponsiveValue<boolean>`},description:``},wrapReverse:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`boolean`}],raw:`ResponsiveValue<boolean>`},description:``},align:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`union`,raw:`"start" | "center" | "end" | "stretch" | "baseline"`,elements:[{name:`literal`,value:`"start"`},{name:`literal`,value:`"center"`},{name:`literal`,value:`"end"`},{name:`literal`,value:`"stretch"`},{name:`literal`,value:`"baseline"`}]}],raw:`ResponsiveValue<FlexAlign>`},description:`Выравнивание по поперечной оси`},justify:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`union`,raw:`"start" | "center" | "end" | "stretch" | "between" | "around" | "evenly"`,elements:[{name:`literal`,value:`"start"`},{name:`literal`,value:`"center"`},{name:`literal`,value:`"end"`},{name:`literal`,value:`"stretch"`},{name:`literal`,value:`"between"`},{name:`literal`,value:`"around"`},{name:`literal`,value:`"evenly"`}]}],raw:`ResponsiveValue<FlexJustify>`},description:`Выравнивание по главной оси`},alignContent:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`union`,raw:`"start" | "center" | "end" | "stretch" | "between" | "around" | "evenly"`,elements:[{name:`literal`,value:`"start"`},{name:`literal`,value:`"center"`},{name:`literal`,value:`"end"`},{name:`literal`,value:`"stretch"`},{name:`literal`,value:`"between"`},{name:`literal`,value:`"around"`},{name:`literal`,value:`"evenly"`}]}],raw:`ResponsiveValue<FlexJustify>`},description:`Выравнивание контента`},gap:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`union`,raw:`"none" | "xs" | "sm" | "md" | "lg" | "xl"`,elements:[{name:`literal`,value:`"none"`},{name:`literal`,value:`"xs"`},{name:`literal`,value:`"sm"`},{name:`literal`,value:`"md"`},{name:`literal`,value:`"lg"`},{name:`literal`,value:`"xl"`}]}],raw:`ResponsiveValue<FlexGap>`},description:`Gap`},gapRow:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`Exclude`,elements:[{name:`union`,raw:`"none" | "xs" | "sm" | "md" | "lg" | "xl"`,elements:[{name:`literal`,value:`"none"`},{name:`literal`,value:`"xs"`},{name:`literal`,value:`"sm"`},{name:`literal`,value:`"md"`},{name:`literal`,value:`"lg"`},{name:`literal`,value:`"xl"`}]},{name:`literal`,value:`"none"`}],raw:`Exclude<FlexGap, "none">`}],raw:`ResponsiveValue<Exclude<FlexGap, "none">>`},description:`Row gap`},gapColumn:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`Exclude`,elements:[{name:`union`,raw:`"none" | "xs" | "sm" | "md" | "lg" | "xl"`,elements:[{name:`literal`,value:`"none"`},{name:`literal`,value:`"xs"`},{name:`literal`,value:`"sm"`},{name:`literal`,value:`"md"`},{name:`literal`,value:`"lg"`},{name:`literal`,value:`"xl"`}]},{name:`literal`,value:`"none"`}],raw:`Exclude<FlexGap, "none">`}],raw:`ResponsiveValue<Exclude<FlexGap, "none">>`},description:`Column gap`},children:{required:!0,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:`Дочерние элементы`},className:{required:!1,tsType:{name:`string`},description:`CSS класс`,defaultValue:{value:`""`,computed:!1}},as:{required:!1,tsType:{name:`JSX.IntrinsicElements`},description:`HTML тег`},style:{required:!1,tsType:{name:`CSSProperties`},description:`Inline styles`}},composes:[`HTMLAttributes`]}})),Z,je,Q,Me=t((()=>{Z=e(n(),1),a(),q(),je=[`flex0`,`flex1`,`grow`,`shrink`,`basis`,`alignSelf`,`justifySelf`],Q=(0,Z.forwardRef)(({children:e,className:t=``,as:n,style:r,flex0:a,flex1:o,grow:s,shrink:c,basis:l,alignSelf:u,justifySelf:d,...f},p)=>{let{activeBreakpoint:m}=ee(),h=[Oe((0,Z.useMemo)(()=>i({flex0:a,flex1:o,grow:s,shrink:c,basis:l,alignSelf:u,justifySelf:d},m,je),[m,u,l,a,o,s,d,c])),t].filter(Boolean).join(` `);return(0,Z.createElement)(n||`div`,{...f,ref:p,className:h,style:r},e)}),Q.displayName=`FlexItem`,Q.__docgenInfo={description:``,methods:[],displayName:`FlexItem`,props:{grow:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`boolean`}],raw:`ResponsiveValue<boolean>`},description:`Способность расти
|
|
2
2
|
@default false = 0`},shrink:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`boolean`}],raw:`ResponsiveValue<boolean>`},description:`Способность сжиматься
|
|
3
3
|
@default true = 1`},flex0:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`boolean`}],raw:`ResponsiveValue<boolean>`},description:`Использовать составной класс flex0`},flex1:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`boolean`}],raw:`ResponsiveValue<boolean>`},description:`Использовать составной класс flex1`},basis:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`union`,raw:`"0" | "auto"`,elements:[{name:`literal`,value:`"0"`},{name:`literal`,value:`"auto"`}]}],raw:`ResponsiveValue<FlexBasis>`},description:`Базовый размер`},alignSelf:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`union`,raw:`"start" | "center" | "end" | "stretch" | "baseline"`,elements:[{name:`literal`,value:`"start"`},{name:`literal`,value:`"center"`},{name:`literal`,value:`"end"`},{name:`literal`,value:`"stretch"`},{name:`literal`,value:`"baseline"`}]}],raw:`ResponsiveValue<FlexAlign>`},description:`Выравнивание отдельного элемента`},justifySelf:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`Exclude`,elements:[{name:`union`,raw:`"start" | "center" | "end" | "stretch" | "between" | "around" | "evenly"`,elements:[{name:`literal`,value:`"start"`},{name:`literal`,value:`"center"`},{name:`literal`,value:`"end"`},{name:`literal`,value:`"stretch"`},{name:`literal`,value:`"between"`},{name:`literal`,value:`"around"`},{name:`literal`,value:`"evenly"`}]},{name:`union`,raw:`"between" | "around" | "evenly"`,elements:[{name:`literal`,value:`"between"`},{name:`literal`,value:`"around"`},{name:`literal`,value:`"evenly"`}]}],raw:`Exclude<FlexJustify, "between" | "around" | "evenly">`}],raw:`ResponsiveValue<Exclude<FlexJustify, "between" | "around" | "evenly">>`},description:`Justify-self для grid-like выравнивания`},children:{required:!1,tsType:{name:`ReactReactNode`,raw:`React.ReactNode`},description:`Дочерние элементы`},className:{required:!1,tsType:{name:`string`},description:`CSS класс`,defaultValue:{value:`""`,computed:!1}},as:{required:!1,tsType:{name:`JSX.IntrinsicElements`},description:`HTML тег`},style:{required:!1,tsType:{name:`CSSProperties`},description:`Inline styles`}},composes:[`HTMLAttributes`]}})),Ne,Pe,$,Fe=t((()=>{Ne=e(n(),1),X(),q(),Pe=r(),$=(0,Ne.forwardRef)(({variant:e,children:t,className:n=``,...r},i)=>(0,Pe.jsx)(Y,{ref:i,className:[ke(e??``),n].filter(Boolean).join(` `),...r,children:t})),$.displayName=`PredefinedFlex`,$.__docgenInfo={description:``,methods:[],displayName:`PredefinedFlex`,props:{variant:{required:!1,tsType:{name:`union`,raw:`"center" | "centerBetween" | "columnCenter"`,elements:[{name:`literal`,value:`"center"`},{name:`literal`,value:`"centerBetween"`},{name:`literal`,value:`"columnCenter"`}]},description:``},className:{defaultValue:{value:`""`,computed:!1},required:!1}},composes:[`Omit`]}})),Ie,Le=t((()=>{X(),Me(),Fe(),Ie={Container:Y,Item:Q,Predefined:$}}));export{Me as a,Q as i,Le as n,Y as o,Fe as r,X as s,Ie as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,i as t}from"./preload-helper-B45gAKPr.js";import{C as n}from"./iframe-
|
|
1
|
+
import{a as e,i as t}from"./preload-helper-B45gAKPr.js";import{C as n}from"./iframe-BlBhvHwk.js";import{t as r}from"./jsx-runtime-BBQGix-2.js";import{n as i,t as a}from"./Flex-Cl2bB8Po.js";var o=e({AlignItems:()=>g,BasicColumn:()=>p,BasicRow:()=>f,Directions:()=>m,FlexItems:()=>y,Gaps:()=>v,InlineFlex:()=>x,JustifyContent:()=>h,Predefined:()=>b,RealWorld:()=>S,Wrapping:()=>_,__namedExportsOrder:()=>C,default:()=>d}),s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w=t((()=>{n(),i(),s=r(),c={container:{border:`2px dashed var(--border-0)`,padding:`2em`,marginBlock:`1em`},item:{padding:`16px`,textAlign:`center`,fontWeight:`bold`,color:`white`,minHeight:`5em`,minWidth:`10em`,display:`flex`,alignItems:`center`,justifyContent:`center`},itemColors:[`#ff6b6b`,`#4ecdc4`,`#45b7d1`,`#96ceb4`,`#feca57`,`#ff9ff3`]},l=e=>c.itemColors[e%c.itemColors.length],u=({children:e,index:t=0})=>(0,s.jsx)(a.Item,{style:{...c.item,backgroundColor:l(t)},children:e}),d={title:`Shared/Layout/Flex`,component:a.Container,parameters:{layout:`padded`}},f={render:e=>(0,s.jsx)(a.Container,{...e,style:c.container}),args:{children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u,{index:0,children:`Item 1`}),(0,s.jsx)(u,{index:1,children:`Item 2`}),(0,s.jsx)(u,{index:2,children:`Item 3`})]}),row:!0}},p={render:e=>(0,s.jsx)(a.Container,{...e,style:c.container}),args:{children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u,{index:0,children:`Header`}),(0,s.jsx)(u,{index:1,children:`Content`}),(0,s.jsx)(u,{index:2,children:`Footer`})]}),column:!0}},m={render:()=>(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`h3`,{children:`Row (default)`}),(0,s.jsxs)(a.Container,{row:!0,style:c.container,children:[(0,s.jsx)(u,{index:0,children:`1`}),(0,s.jsx)(u,{index:1,children:`2`}),(0,s.jsx)(u,{index:2,children:`3`})]}),(0,s.jsx)(`h3`,{children:`Row Reverse`}),(0,s.jsxs)(a.Container,{rowReverse:!0,style:c.container,children:[(0,s.jsx)(u,{index:0,children:`1`}),(0,s.jsx)(u,{index:1,children:`2`}),(0,s.jsx)(u,{index:2,children:`3`})]}),(0,s.jsx)(`h3`,{children:`Column`}),(0,s.jsxs)(a.Container,{column:!0,style:c.container,children:[(0,s.jsx)(u,{index:0,children:`1`}),(0,s.jsx)(u,{index:1,children:`2`}),(0,s.jsx)(u,{index:2,children:`3`})]}),(0,s.jsx)(`h3`,{children:`Column Reverse`}),(0,s.jsxs)(a.Container,{columnReverse:!0,style:c.container,children:[(0,s.jsx)(u,{index:0,children:`1`}),(0,s.jsx)(u,{index:1,children:`2`}),(0,s.jsx)(u,{index:2,children:`3`})]})]}),args:{children:void 0}},h={render:()=>(0,s.jsx)(`div`,{children:[`start`,`center`,`end`,`between`,`around`,`evenly`].map(e=>(0,s.jsxs)(`div`,{children:[(0,s.jsxs)(`h3`,{children:[`Justify: `,e]}),(0,s.jsxs)(a.Container,{row:!0,justify:e,style:c.container,children:[(0,s.jsx)(u,{index:0,children:`Item 1`}),(0,s.jsx)(u,{index:1,children:`Item 2`}),(0,s.jsx)(u,{index:2,children:`Item 3`})]})]},e))}),args:{children:void 0}},g={render:()=>(0,s.jsx)(`div`,{children:[`start`,`center`,`end`,`stretch`,`baseline`].map(e=>(0,s.jsxs)(`div`,{children:[(0,s.jsxs)(`h3`,{children:[`Align: `,e]}),(0,s.jsxs)(a.Container,{row:!0,align:e,style:{...c.container,height:`120px`},children:[(0,s.jsx)(u,{index:0,children:(0,s.jsx)(`div`,{children:`Short`})}),(0,s.jsx)(u,{index:1,children:(0,s.jsx)(`div`,{style:{padding:`40px`},children:`Tall`})}),(0,s.jsx)(u,{index:2,children:(0,s.jsx)(`div`,{style:{padding:`24px`},children:`Medium`})})]})]},e))}),args:{children:void 0}},_={render:()=>(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`h3`,{children:`No Wrap (default)`}),(0,s.jsx)(a.Container,{row:!0,nowrap:!0,style:c.container,children:[1,2,3,4,5,6,7,8,9,10,11,12].map(e=>(0,s.jsxs)(u,{index:e,children:[`Item `,e]},e))}),(0,s.jsx)(`h3`,{children:`Wrap`}),(0,s.jsx)(a.Container,{row:!0,wrap:!0,style:c.container,children:[1,2,3,4,5,6,7,8,9,10,11,12].map(e=>(0,s.jsxs)(u,{index:e,children:[`Item `,e]},e))}),(0,s.jsx)(`h3`,{children:`Wrap Reverse`}),(0,s.jsx)(a.Container,{row:!0,wrapReverse:!0,style:c.container,children:[1,2,3,4,5,6,7,8,9,10,11,12].map(e=>(0,s.jsxs)(u,{index:e,children:[`Item `,e]},e))})]}),args:{children:void 0}},v={render:()=>(0,s.jsxs)(`div`,{children:[[`xs`,`sm`,`md`,`lg`,`xl`].map(e=>(0,s.jsxs)(`div`,{children:[(0,s.jsxs)(`h3`,{children:[`Gap: `,e]}),(0,s.jsx)(a.Container,{row:!0,wrap:!0,gap:e,style:c.container,children:[1,2,3,4,5,6].map(e=>(0,s.jsxs)(u,{index:e,children:[`Item `,e]},e))})]},e)),(0,s.jsx)(`h3`,{children:`Different Row and Column Gaps`}),(0,s.jsx)(a.Container,{row:!0,wrap:!0,gapRow:`lg`,gapColumn:`sm`,style:c.container,children:[1,2,3,4,5,6,7,8,9,10,11,12].map(e=>(0,s.jsxs)(u,{index:e,children:[`Item `,e]},e))})]}),args:{children:void 0}},y={render:()=>(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`h3`,{children:`Grow Properties`}),(0,s.jsxs)(a.Container,{row:!0,style:c.container,children:[(0,s.jsx)(u,{index:0,children:`Default`}),(0,s.jsx)(a.Item,{grow:!0,children:(0,s.jsx)(`div`,{style:{...c.item,backgroundColor:l(1)},children:`Grow`})}),(0,s.jsx)(u,{index:2,children:`Default`})]}),(0,s.jsx)(`h3`,{children:`Shrink Properties`}),(0,s.jsxs)(a.Container,{row:!0,style:{...c.container,width:`300px`},children:[(0,s.jsx)(a.Item,{shrink:!1,children:(0,s.jsx)(`div`,{style:{...c.item,backgroundColor:l(0),width:`150px`},children:`No Shrink`})}),(0,s.jsx)(a.Item,{children:(0,s.jsx)(`div`,{style:{...c.item,backgroundColor:l(1),width:`150px`},children:`Shrink (default)`})})]}),(0,s.jsx)(`h3`,{children:`Composite Classes`}),(0,s.jsxs)(a.Container,{row:!0,style:c.container,children:[(0,s.jsx)(a.Item,{flex0:!0,children:(0,s.jsx)(`div`,{style:{...c.item,backgroundColor:l(0)},children:`flex0`})}),(0,s.jsx)(a.Item,{flex1:!0,children:(0,s.jsx)(`div`,{style:{...c.item,backgroundColor:l(1)},children:`flex1`})}),(0,s.jsx)(a.Item,{flex0:!0,children:(0,s.jsx)(`div`,{style:{...c.item,backgroundColor:l(2)},children:`flex0`})})]})]}),args:{children:void 0}},b={render:()=>(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`h3`,{children:`Center`}),(0,s.jsx)(a.Predefined,{variant:`center`,style:{...c.container,height:`100px`},children:(0,s.jsx)(u,{index:0,children:`Centered Content`})}),(0,s.jsx)(`h3`,{children:`Center Between`}),(0,s.jsxs)(a.Predefined,{variant:`centerBetween`,style:c.container,children:[(0,s.jsx)(u,{index:0,children:`Left`}),(0,s.jsx)(u,{index:1,children:`Right`})]})]}),args:{children:void 0}},x={render:()=>(0,s.jsxs)(`div`,{children:[(0,s.jsxs)(`p`,{children:[`This is text with`,(0,s.jsxs)(a.Container,{inline:!0,align:`center`,gap:`sm`,style:{margin:`0 8px`},children:[(0,s.jsx)(u,{index:0,children:`inline`}),(0,s.jsx)(u,{index:1,children:`flex`})]}),`elements inside.`]}),(0,s.jsxs)(`p`,{children:[`Another example with`,(0,s.jsxs)(a.Container,{inline:!0,column:!0,gap:`xs`,style:{margin:`0 8px`},children:[(0,s.jsx)(u,{index:2,children:`vertical`}),(0,s.jsx)(u,{index:3,children:`inline`})]}),`flex.`]})]}),args:{children:void 0}},S={render:()=>(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`h3`,{children:`Navigation Bar`}),(0,s.jsxs)(a.Predefined,{variant:`centerBetween`,style:c.container,children:[(0,s.jsxs)(a.Container,{row:!0,align:`center`,gap:`md`,children:[(0,s.jsx)(u,{index:0,children:`Logo`}),(0,s.jsx)(u,{index:1,children:`Home`}),(0,s.jsx)(u,{index:2,children:`About`}),(0,s.jsx)(u,{index:3,children:`Contact`})]}),(0,s.jsx)(u,{index:4,children:`Login`})]}),(0,s.jsx)(`h3`,{children:`Card Layout`}),(0,s.jsx)(a.Container,{row:!0,wrap:!0,gap:`lg`,style:c.container,children:[1,2,3,4].map(e=>(0,s.jsx)(a.Item,{flex1:!0,style:{minWidth:`200px`},children:(0,s.jsxs)(`div`,{style:{border:`1px solid #ddd`,borderRadius:`8px`,padding:`16px`,textAlign:`center`,backgroundColor:l(e)},children:[(0,s.jsxs)(`h4`,{children:[`Card `,e]}),(0,s.jsx)(`p`,{children:`Card content goes here`})]})},e))}),(0,s.jsx)(`h3`,{children:`Form Layout`}),(0,s.jsxs)(a.Container,{column:!0,gap:`md`,style:c.container,children:[(0,s.jsxs)(a.Container,{row:!0,gap:`md`,children:[(0,s.jsx)(a.Item,{flex1:!0,children:(0,s.jsx)(u,{index:0,children:`First Name`})}),(0,s.jsx)(a.Item,{flex1:!0,children:(0,s.jsx)(u,{index:1,children:`Last Name`})})]}),(0,s.jsx)(u,{index:2,children:`Email`}),(0,s.jsx)(u,{index:3,children:`Message`})]})]}),args:{children:void 0}},f.parameters={...f.parameters,docs:{...f.parameters?.docs,source:{originalSource:`{
|
|
2
2
|
render: args => <Flex.Container {...args} style={demoStyles.container} />,
|
|
3
3
|
args: {
|
|
4
4
|
children: <>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as e,i as t}from"./preload-helper-B45gAKPr.js";import{C as n}from"./iframe-
|
|
1
|
+
import{c as e,i as t}from"./preload-helper-B45gAKPr.js";import{C as n}from"./iframe-BlBhvHwk.js";import{i as r,r as i,t as ee}from"./media-BZMZJXu3.js";var a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,te,ne,re,ie,ae,oe,se,j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,K,ce,le,ue,de,fe,pe,me,he,ge,q,_e=t((()=>{a=`_5Z2YQF`,o=`gAEXju`,s=`KdmGbk`,c=`uOpH1m`,l=`EOUgpE`,u=`PoMD0P`,d=`FBebhA`,f=`rwvhfS`,p=`ZIsGgj`,m=`lbAie9`,h=`ylmmN3`,g=`Fg86QU`,_=`_3qWtbZ`,v=`gIXZ8P`,y=`xXxHZM`,b=`zRgpft`,x=`Fb1W2U`,S=`_2EojT9`,C=`gYCGa5`,w=`JN0CZr`,T=`_2QvtUb`,E=`_1kRriS`,D=`ocLWZU`,O=`TS1qri`,k=`FXfvI7`,A=`biKmzi`,te=`_4-sIS7`,ne=`lbdoyi`,re=`WvAC9I`,ie=`LN4Ak-`,ae=`XC0FuJ`,oe=`_6b9wZI`,se=`KevE4M`,j=`Sn-je4`,M=`Wnx9iF`,N=`RAoqm2`,P=`nUjbmv`,F=`TjTsA7`,I=`VdpzYk`,L=`peszxb`,R=`E98bqx`,z=`CdaBbu`,B=`leVL0N`,V=`_6mOZVj`,H=`XHgjM3`,U=`wtrn5A`,W=`LkIh-N`,G=`Vhdvpo`,K=`cyg2du`,ce=`Ptd1ad`,le=`Z22Yty`,ue=`gycEgN`,de=`s69iy2`,fe=`pKEJ9k`,pe=`qWkZVw`,me=`gUbUDY`,he=`S0HulN`,ge=`K2fFKT`,q={grid:a,inline:o,row:s,column:c,dense:l,gapNone:u,gapRowXs:d,gapRowSm:f,gapRowMd:p,gapRowLg:m,gapRowXl:h,gapColumnXs:g,gapColumnSm:_,gapColumnMd:v,gapColumnLg:y,gapColumnXl:b,gapXs:x,gapSm:S,gapMd:C,gapLg:w,gapXl:T,alignStart:E,alignCenter:D,alignEnd:O,alignStretch:k,alignBaseline:A,justifyStart:te,justifyCenter:ne,justifyEnd:re,justifyStretch:ie,alignContentStart:ae,alignContentCenter:oe,alignContentEnd:se,alignContentStretch:j,alignContentBetween:M,alignContentAround:N,alignContentEvenly:P,justifyContentStart:F,justifyContentCenter:I,justifyContentEnd:L,justifyContentStretch:R,justifyContentBetween:z,justifyContentAround:B,justifyContentEvenly:V,item:H,areaAuto:U,alignSelfStart:W,alignSelfCenter:G,alignSelfEnd:K,alignSelfStretch:ce,alignSelfBaseline:le,justifySelfStart:ue,justifySelfCenter:de,justifySelfEnd:fe,justifySelfStretch:pe,autoRows1fr:me,columnsAuto1fr:he,singleColumn:ge}})),J,ve,ye,be,xe,Se=t((()=>{J=e(n(),1),_e(),ve=e=>(0,J.useMemo)(()=>{let t=[q.grid];return e.inline&&t.push(q.inline),e.column?t.push(q.column):e.dense?t.push(q.dense):e.row&&t.push(q.row),e.align&&t.push(q[`align${e.align.charAt(0).toUpperCase()+e.align.slice(1)}`]),e.justify&&t.push(q[`justify${e.justify.charAt(0).toUpperCase()+e.justify.slice(1)}`]),e.justifyContent&&t.push(q[`justifyContent${e.justifyContent.charAt(0).toUpperCase()+e.justifyContent.slice(1)}`]),e.alignContent&&t.push(q[`alignContent${e.alignContent.charAt(0).toUpperCase()+e.alignContent.slice(1)}`]),e.gap===`none`?t.push(q.gapNone):e.gap&&t.push(q[`gap${e.gap.charAt(0).toUpperCase()+e.gap.slice(1)}`]),e.gapRow&&t.push(q[`gapRow${e.gapRow.charAt(0).toUpperCase()+e.gapRow.slice(1)}`]),e.gapColumn&&t.push(q[`gapColumn${e.gapColumn.charAt(0).toUpperCase()+e.gapColumn.slice(1)}`]),e.variant===`single-column`?t.push(q.singleColumn):e.variant===`auto-1fr`?t.push(q.autoRows1fr):e.variant===`auto1fr-rows-auto`&&t.push(q.columnsAuto1fr),t.filter(Boolean).join(` `)},[e]),ye=e=>(0,J.useMemo)(()=>{let t={};return e.templateColumns&&(t.gridTemplateColumns=e.templateColumns),e.templateRows&&(t.gridTemplateRows=e.templateRows),e.autoColumns&&(t.gridAutoColumns=e.autoColumns),e.autoRows&&(t.gridAutoRows=e.autoRows),e.areas&&(t.gridTemplateAreas=e.areas),t},[e.templateColumns,e.templateRows,e.autoColumns,e.autoRows,e.areas]),be=e=>(0,J.useMemo)(()=>{let t=[q.item];return e.alignSelf&&t.push(q[`alignSelf${e.alignSelf.charAt(0).toUpperCase()+e.alignSelf.slice(1)}`]),e.justifySelf&&t.push(q[`justifySelf${e.justifySelf.charAt(0).toUpperCase()+e.justifySelf.slice(1)}`]),t.filter(Boolean).join(` `)},[e]),xe=e=>(0,J.useMemo)(()=>{let t={};return e.area&&(t.gridArea=e.area),e.column&&(t.gridColumn=e.column),e.row&&(t.gridRow=e.row),t},[e.area,e.column,e.row])})),Y,X,Z=t((()=>{Y=e(n(),1),i(),Se(),X=(0,Y.forwardRef)(({children:e,className:t=``,as:n,style:i,inline:a,row:o,column:s,dense:c,gap:l,gapRow:u,gapColumn:d,align:f,justify:p,alignContent:m,justifyContent:h,templateColumns:g,templateRows:_,autoColumns:v,autoRows:y,areas:b,variant:x,...S},C)=>{let{activeBreakpoint:w}=ee(),T=(0,Y.useMemo)(()=>({inline:r(a,w),row:r(o,w),column:r(s,w),dense:r(c,w),gap:r(l,w),gapRow:r(u,w),gapColumn:r(d,w),align:r(f,w),justify:r(p,w),alignContent:r(m,w),justifyContent:r(h,w),variant:r(x,w)}),[w,f,m,s,c,l,d,u,a,p,h,o,x]),E=(0,Y.useMemo)(()=>({templateColumns:r(g,w),templateRows:r(_,w),autoColumns:r(v,w),autoRows:r(y,w),areas:r(b,w)}),[w,g,_,v,y,b]),D=ve(T),O=ye(E),k=[D,t].filter(Boolean).join(` `),A={...O,...i};return(0,Y.createElement)(n||`div`,{...S,ref:C,className:k,style:A},e)}),X.displayName=`GridContainer`,X.__docgenInfo={description:``,methods:[],displayName:`GridContainer`,props:{id:{required:!1,tsType:{name:`string`},description:``},inline:{required:!1,tsType:{name:`ResponsiveValue`,elements:[{name:`boolean`}],raw:`ResponsiveValue<boolean>`},description:`Включение inline-grid вместо обычного grid
|
|
2
2
|
|
|
3
3
|
Позволяет grid-контейнеру вести себя как строчный элемент,
|
|
4
4
|
обтекаясь текстом и другими элементами. Полезно для встраивания grid-раскладки
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e}from"./preload-helper-B45gAKPr.js";import{E as t,a as n,d as r,f as i,l as a,m as o,n as s,p as c,r as l,u}from"./blocks-
|
|
1
|
+
import{i as e}from"./preload-helper-B45gAKPr.js";import{E as t,a as n,d as r,f as i,l as a,m as o,n as s,p as c,r as l,u}from"./blocks-D2VXMZGt.js";import{t as d}from"./jsx-runtime-BBQGix-2.js";import{t as f}from"./mdx-react-shim-BXKB7xbF.js";import{Alignment as p,AutoFlow as m,BasicGrid as h,ComplexTemplates as g,Gaps as _,GridAreas as v,InlineGrid as y,ItemPlacement as b,PredefinedVariants as x,RealWorld as S,Responsive as C,n as w,t as T}from"./Grid.stories-Do5Od8Vw.js";function E(e){let o={code:`code`,h2:`h2`,h3:`h3`,li:`li`,p:`p`,pre:`pre`,ul:`ul`,...t(),...e.components};return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(a,{of:T,parameters:{docs:{toc:!0}}}),`
|
|
2
2
|
`,(0,O.jsx)(c,{children:`Grid`}),`
|
|
3
3
|
`,(0,O.jsx)(i,{children:`Композиция для построения grid-раскладок с управлением колонками, строками и позиционированием элементов`}),`
|
|
4
4
|
`,(0,O.jsx)(o.p,{children:`Grid уже имеет живые stories, а эта страница собирает их в структурированную документацию с краткими рекомендациями, примерами подключения и API.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,i as t}from"./preload-helper-B45gAKPr.js";import{C as n}from"./iframe-
|
|
1
|
+
import{a as e,i as t}from"./preload-helper-B45gAKPr.js";import{C as n}from"./iframe-BlBhvHwk.js";import{t as r}from"./jsx-runtime-BBQGix-2.js";import{n as i,t as a}from"./Grid-Df08ACJK.js";var o=e({Alignment:()=>m,AutoFlow:()=>p,BasicGrid:()=>f,ComplexTemplates:()=>_,Gaps:()=>h,GridAreas:()=>v,InlineGrid:()=>b,ItemPlacement:()=>y,PredefinedVariants:()=>g,RealWorld:()=>x,Responsive:()=>S,__namedExportsOrder:()=>C,default:()=>d}),s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w=t((()=>{n(),i(),s=r(),c={container:{border:`2px dashed var(--border-0)`,padding:`2em`,marginBlock:`1em`},item:{textAlign:`center`,fontWeight:`bold`,color:`white`,minHeight:`5em`,minWidth:`10em`,display:`flex`,alignItems:`center`,justifyContent:`center`},itemColors:[`#ff6b6b`,`#4ecdc4`,`#45b7d1`,`#96ceb4`,`#feca57`,`#ff9ff3`,`#54a0ff`,`#5f27cd`]},l=e=>c.itemColors[e%c.itemColors.length],u=({children:e,index:t=0,style:n})=>(0,s.jsx)(a.Item,{style:{...c.item,backgroundColor:l(t),...n},children:e}),d={title:`Shared/Layout/Grid`,component:a.Container,parameters:{layout:`padded`}},f={render:({children:e,...t})=>(0,s.jsx)(a.Container,{...t,templateColumns:`1fr 1fr 1fr`,style:c.container,children:e}),args:{children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u,{index:0,children:`1`}),(0,s.jsx)(u,{index:1,children:`2`}),(0,s.jsx)(u,{index:2,children:`3`}),(0,s.jsx)(u,{index:3,children:`4`}),(0,s.jsx)(u,{index:4,children:`5`}),(0,s.jsx)(u,{index:5,children:`6`})]})}},p={render:()=>(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`h3`,{children:`Row (default)`}),(0,s.jsxs)(a.Container,{templateColumns:`repeat(3, 100px)`,templateRows:`repeat(2, 60px)`,gap:`sm`,style:c.container,children:[(0,s.jsx)(u,{index:0,children:`1`}),(0,s.jsx)(u,{index:1,children:`2`}),(0,s.jsx)(u,{index:2,children:`3`}),(0,s.jsx)(u,{index:3,children:`4`}),(0,s.jsx)(u,{index:4,children:`5`}),(0,s.jsx)(u,{index:5,children:`6`})]}),(0,s.jsx)(`h3`,{children:`Column`}),(0,s.jsxs)(a.Container,{templateColumns:`repeat(2, 100px)`,templateRows:`repeat(3, 60px)`,column:!0,gap:`sm`,style:c.container,children:[(0,s.jsx)(u,{index:0,children:`1`}),(0,s.jsx)(u,{index:1,children:`2`}),(0,s.jsx)(u,{index:2,children:`3`}),(0,s.jsx)(u,{index:3,children:`4`}),(0,s.jsx)(u,{index:4,children:`5`}),(0,s.jsx)(u,{index:5,children:`6`})]}),(0,s.jsx)(`h3`,{children:`Dense`}),(0,s.jsxs)(a.Container,{templateColumns:`repeat(4, 80px)`,templateRows:`repeat(3, 60px)`,dense:!0,gap:`sm`,style:c.container,children:[(0,s.jsx)(u,{index:0,style:{gridColumn:`span 2`},children:`Span 2`}),(0,s.jsx)(u,{index:1,children:`2`}),(0,s.jsx)(u,{index:2,style:{gridRow:`span 2`},children:`Span 2`}),(0,s.jsx)(u,{index:3,children:`4`}),(0,s.jsx)(u,{index:4,children:`5`}),(0,s.jsx)(u,{index:5,children:`6`}),(0,s.jsx)(u,{index:6,children:`7`})]})]}),args:{children:void 0}},m={render:()=>(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`h3`,{style:{marginBlock:`1em`},children:`Align Items`}),[`start`,`center`,`end`,`stretch`].map(e=>(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`h4`,{children:e}),(0,s.jsxs)(a.Container,{templateColumns:`repeat(3, 1fr)`,align:e,gap:`sm`,style:c.container,children:[(0,s.jsx)(u,{index:0,style:{height:e===`stretch`?`auto`:`5em`},children:`Short`}),(0,s.jsx)(u,{index:1,style:{height:e===`stretch`?`auto`:`10em`},children:`Tall`}),(0,s.jsx)(u,{index:2,style:{height:e===`stretch`?`auto`:`8em`},children:`Medium`})]})]},e)),(0,s.jsx)(`h3`,{style:{marginBlock:`1em`},children:`Justify Items`}),[`start`,`center`,`end`,`stretch`].map(e=>(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`h4`,{children:e}),(0,s.jsxs)(a.Container,{templateColumns:`repeat(3, 20em)`,justify:e,gap:`sm`,style:c.container,children:[(0,s.jsx)(u,{index:0,style:{width:e===`stretch`?`auto`:`10em`},children:`Item`}),(0,s.jsx)(u,{index:1,style:{width:e===`stretch`?`auto`:`10em`},children:`Item`}),(0,s.jsx)(u,{index:2,style:{width:e===`stretch`?`auto`:`10em`},children:`Item`})]})]},e))]}),args:{children:void 0}},h={render:()=>(0,s.jsxs)(`div`,{children:[[`xs`,`sm`,`md`,`lg`,`xl`].map(e=>(0,s.jsxs)(`div`,{children:[(0,s.jsxs)(`h3`,{children:[`Gap: `,e]}),(0,s.jsx)(a.Container,{templateColumns:`repeat(3, 1fr)`,gap:e,style:c.container,children:[1,2,3,4,5,6].map(e=>(0,s.jsxs)(u,{index:e,children:[`Item `,e]},e))})]},e)),(0,s.jsx)(`h3`,{children:`Different Row and Column Gaps`}),(0,s.jsx)(a.Container,{templateColumns:`repeat(3, 1fr)`,gapRow:`lg`,gapColumn:`sm`,style:c.container,children:[1,2,3,4,5,6].map(e=>(0,s.jsxs)(u,{index:e,children:[`Item `,e]},e))})]}),args:{children:void 0}},g={render:()=>(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`h3`,{children:`Single Column (grid-template-columns: 100%; grid-auto-rows: auto 1fr)`}),(0,s.jsxs)(a.Container,{variant:`single-column`,style:{...c.container,height:`200px`},children:[(0,s.jsx)(u,{index:0,children:`Header (auto)`}),(0,s.jsx)(u,{index:1,children:`Content (1fr)`})]}),(0,s.jsx)(`h3`,{children:`Auto 1fr Rows (grid-auto-rows: 1fr)`}),(0,s.jsxs)(a.Container,{variant:`auto-1fr`,templateColumns:`1fr 1fr`,style:{...c.container,height:`150px`},children:[(0,s.jsx)(u,{index:0,children:`Equal`}),(0,s.jsx)(u,{index:1,children:`Height`})]}),(0,s.jsx)(`h3`,{children:`Auto 1fr Columns (grid-template-columns: auto 1fr; grid-auto-rows: auto)`}),(0,s.jsxs)(a.Container,{variant:`auto1fr-rows-auto`,gap:`sm`,style:c.container,children:[(0,s.jsx)(u,{index:0,children:`Label`}),(0,s.jsx)(u,{index:1,children:`Content that takes remaining space`}),(0,s.jsx)(u,{index:2,children:`Another`}),(0,s.jsx)(u,{index:3,children:`More content here`})]})]}),args:{children:void 0}},_={render:()=>(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`h3`,{children:`Auto-fit with Minmax`}),(0,s.jsx)(a.Container,{templateColumns:`repeat(auto-fit, minmax(150px, 1fr))`,gap:`md`,style:c.container,children:[1,2,3,4,5,6].map(e=>(0,s.jsxs)(u,{index:e,children:[`Card `,e]},e))}),(0,s.jsx)(`h3`,{children:`Fixed and Flexible Columns`}),(0,s.jsxs)(a.Container,{templateColumns:`200px 1fr 100px`,gap:`sm`,style:c.container,children:[(0,s.jsx)(u,{index:0,children:`Sidebar`}),(0,s.jsx)(u,{index:1,children:`Main Content`}),(0,s.jsx)(u,{index:2,children:`Tools`})]}),(0,s.jsx)(`h3`,{children:`Masonry-like Layout`}),(0,s.jsxs)(a.Container,{templateColumns:`repeat(4, 1fr)`,autoRows:`100px`,gap:`sm`,style:c.container,children:[(0,s.jsx)(u,{index:0,style:{gridRow:`span 2`},children:`Tall`}),(0,s.jsx)(u,{index:1,children:`Normal`}),(0,s.jsx)(u,{index:2,children:`Normal`}),(0,s.jsx)(u,{index:3,style:{gridRow:`span 3`},children:`Very Tall`}),(0,s.jsx)(u,{index:4,children:`Normal`}),(0,s.jsx)(u,{index:5,style:{gridRow:`span 2`},children:`Tall`}),(0,s.jsx)(u,{index:6,children:`Normal`}),(0,s.jsx)(u,{index:7,children:`Normal`})]})]}),args:{children:void 0}},v={render:()=>(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`h3`,{children:`Basic Layout with Areas`}),(0,s.jsxs)(a.Container,{areas:`
|
|
2
2
|
"header header"
|
|
3
3
|
"nav main"
|
|
4
4
|
"footer footer"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as e,i as t,r as n}from"./preload-helper-B45gAKPr.js";import{C as r}from"./iframe-
|
|
1
|
+
import{c as e,i as t,r as n}from"./preload-helper-B45gAKPr.js";import{C as r}from"./iframe-BlBhvHwk.js";import{t as i}from"./jsx-runtime-BBQGix-2.js";var a=n(((e,t)=>{var n=!1,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_;function v(){if(!n){n=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),v=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(m=/\b(iPhone|iP[ao]d)/.exec(e),h=/\b(iP[ao]d)/.exec(e),f=/Android/i.exec(e),g=/FBAN\/\w+;/i.exec(e),_=/Mobile/i.exec(e),p=!!/Win64/.exec(e),t){r=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,r&&document&&document.documentMode&&(r=document.documentMode);var y=/(?:Trident\/(\d+.\d+))/.exec(e);c=y?parseFloat(y[1])+4:r,i=t[2]?parseFloat(t[2]):NaN,a=t[3]?parseFloat(t[3]):NaN,o=t[4]?parseFloat(t[4]):NaN,o?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),s=t&&t[1]?parseFloat(t[1]):NaN):s=NaN}else r=i=a=s=o=NaN;if(v){if(v[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);l=b?parseFloat(b[1].replace(`_`,`.`)):!0}else l=!1;u=!!v[2],d=!!v[3]}else l=u=d=!1}}var y={ie:function(){return v()||r},ieCompatibilityMode:function(){return v()||c>r},ie64:function(){return y.ie()&&p},firefox:function(){return v()||i},opera:function(){return v()||a},webkit:function(){return v()||o},safari:function(){return y.webkit()},chrome:function(){return v()||s},windows:function(){return v()||u},osx:function(){return v()||l},linux:function(){return v()||d},iphone:function(){return v()||m},mobile:function(){return v()||m||h||f||_},nativeApp:function(){return v()||g},android:function(){return v()||f},ipad:function(){return v()||h}};t.exports=y})),o=n(((e,t)=>{var n=!!(typeof window<`u`&&window.document&&window.document.createElement);t.exports={canUseDOM:n,canUseWorkers:typeof Worker<`u`,canUseEventListeners:n&&!!(window.addEventListener||window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n}})),s=n(((e,t)=>{var n=o(),r;n.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature(``,``)!==!0);function i(e,t){if(!n.canUseDOM||t&&!(`addEventListener`in document))return!1;var i=`on`+e,a=i in document;if(!a){var o=document.createElement(`div`);o.setAttribute(i,`return;`),a=typeof o[i]==`function`}return!a&&r&&e===`wheel`&&(a=document.implementation.hasFeature(`Events.wheel`,`3.0`)),a}t.exports=i})),c=n(((e,t)=>{var n=a(),r=s(),i=10,o=40,c=800;function l(e){var t=0,n=0,r=0,a=0;return`detail`in e&&(n=e.detail),`wheelDelta`in e&&(n=-e.wheelDelta/120),`wheelDeltaY`in e&&(n=-e.wheelDeltaY/120),`wheelDeltaX`in e&&(t=-e.wheelDeltaX/120),`axis`in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=t*i,a=n*i,`deltaY`in e&&(a=e.deltaY),`deltaX`in e&&(r=e.deltaX),(r||a)&&e.deltaMode&&(e.deltaMode==1?(r*=o,a*=o):(r*=c,a*=c)),r&&!t&&(t=r<1?-1:1),a&&!n&&(n=a<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:a}}l.getEventType=function(){return n.firefox()?`DOMMouseScroll`:r(`wheel`)?`wheel`:`mousewheel`},t.exports=l})),l=n(((e,t)=>{t.exports=c()}));function u(e){"@babel/helpers - typeof";return u=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},u(e)}function d(e,t){if(u(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(u(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function f(e){var t=d(e,`string`);return u(t)==`symbol`?t:t+``}function p(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?m(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function g(e,t,n,r,i,a=0){let{width:o,height:s}=k(e,t,a),c=Math.min(o,n),l=Math.min(s,r);return c>l*i?{width:l*i,height:l}:{width:c,height:c/i}}function _(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function v(e,t,n,r,i=0){let{width:a,height:o}=k(t.width,t.height,i);return{x:y(e.x,a,n.width,r),y:y(e.y,o,n.height,r)}}function y(e,t,n,r){let i=Math.abs(t*r/2-n/2);return A(e,-i,i)}function b(e,t){return Math.sqrt((e.y-t.y)**2+(e.x-t.x)**2)}function x(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function S(e,t,n,r,i,a=0,o=!0){let s=o?C:w,c=k(t.width,t.height,a),l=k(t.naturalWidth,t.naturalHeight,a),u={x:s(100,((c.width-n.width/i)/2-e.x/i)/c.width*100),y:s(100,((c.height-n.height/i)/2-e.y/i)/c.height*100),width:s(100,n.width/c.width*100/i),height:s(100,n.height/c.height*100/i)},d=Math.round(s(l.width,u.width*l.width/100)),f=Math.round(s(l.height,u.height*l.height/100)),p=l.width>=l.height*r?{width:Math.round(f*r),height:f}:{width:d,height:Math.round(d/r)};return{croppedAreaPercentages:u,croppedAreaPixels:h(h({},p),{},{x:Math.round(s(l.width-p.width,u.x*l.width/100)),y:Math.round(s(l.height-p.height,u.y*l.height/100))})}}function C(e,t){return Math.min(e,Math.max(0,t))}function w(e,t){return t}function T(e,t,n,r,i,a){let o=k(t.width,t.height,n),s=A(r.width/o.width*(100/e.width),i,a);return{crop:{x:s*o.width/2-r.width/2-o.width*s*(e.x/100),y:s*o.height/2-r.height/2-o.height*s*(e.y/100)},zoom:s}}function ee(e,t,n){let r=_(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}function E(e,t,n=0,r,i,a){let o=k(t.naturalWidth,t.naturalHeight,n),s=A(ee(e,t,r),i,a),c=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((o.width-e.width)/2-e.x)*c,y:((o.height-e.height)/2-e.y)*c},zoom:s}}function D(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function O(e){return e*Math.PI/180}function k(e,t,n){let r=O(n);return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function A(e,t,n){return Math.min(Math.max(e,t),n)}function j(...e){return e.filter(e=>typeof e==`string`&&e.length>0).join(` `).trim()}var M,N,P,F,I,L,R,z,B,V=t((()=>{M=e(r(),1),N=e(l(),1),P=`.reactEasyCrop_Container {
|
|
2
2
|
position: absolute;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as e,i as t}from"./preload-helper-B45gAKPr.js";import{C as n}from"./iframe-
|
|
1
|
+
import{c as e,i as t}from"./preload-helper-B45gAKPr.js";import{C as n}from"./iframe-BlBhvHwk.js";import{t as r}from"./jsx-runtime-BBQGix-2.js";function i({width:e=`100%`,height:t=`100%`,aspectRatio:n=`16 / 9`,className:r}){return(0,a.jsx)(`div`,{style:{width:e,height:t,aspectRatio:n},className:r,children:(0,a.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 200 200`,xmlns:`http://www.w3.org/2000/svg`,role:`img`,fill:`none`,rx:`10`,ry:`10`,style:{display:`block`},"aria-label":`Изображение недоступно`,children:(0,a.jsxs)(`g`,{fill:`var(--surface-0)`,children:[(0,a.jsx)(`rect`,{x:`40`,y:`50`,width:`120`,height:`100`,rx:`10`}),(0,a.jsx)(`circle`,{cx:`60`,cy:`70`,r:`8`,fill:`var(--surface-2)`}),(0,a.jsx)(`path`,{d:`M50 130 L75 100 L100 130 Z`,fill:`var(--surface-2)`}),(0,a.jsx)(`path`,{d:`M90 130 L120 90 L150 130 Z`,fill:`var(--surface-2)`}),(0,a.jsx)(`line`,{x1:`160`,y1:`40`,x2:`40`,y2:`160`,stroke:`var(--surface-0)`,strokeWidth:`15`,strokeLinecap:`round`}),(0,a.jsx)(`line`,{x1:`160`,y1:`40`,x2:`40`,y2:`160`,stroke:`var(--surface-2)`,strokeWidth:`5`,strokeLinecap:`round`})]})})})}var a,o=t((()=>{a=r(),i.__docgenInfo={description:``,methods:[],displayName:`ImagePlaceholder`,props:{width:{required:!1,tsType:{name:`union`,raw:`number | string`,elements:[{name:`number`},{name:`string`}]},description:``,defaultValue:{value:`"100%"`,computed:!1}},height:{required:!1,tsType:{name:`union`,raw:`number | string`,elements:[{name:`number`},{name:`string`}]},description:``,defaultValue:{value:`"100%"`,computed:!1}},aspectRatio:{required:!1,tsType:{name:`union`,raw:`string | "unset"`,elements:[{name:`string`},{name:`literal`,value:`"unset"`}]},description:``,defaultValue:{value:`"16 / 9"`,computed:!1}},className:{required:!1,tsType:{name:`string`},description:``}}}}));function s({src:e,sources:t,alt:n,role:r,ariaLabel:a,caption:o,fallback:s,useFigure:u=!1,layout:d=`cover`,width:f=`100%`,height:p=`100%`,aspectRatio:m,intrinsicWidth:h,intrinsicHeight:g,onLoad:_,onError:v,style:y,wrapperStyle:b,...x}){let S=(0,c.useRef)(null),[C,w]=(0,c.useState)(0),[T,E]=(0,c.useState)(!1),[D,O]=(0,c.useState)(!1),[k,A]=(0,c.useState)(!1);(0,c.useEffect)(()=>{if(typeof IntersectionObserver>`u`){let e=window.setTimeout(()=>E(!0),0);return()=>window.clearTimeout(e)}let e=new IntersectionObserver(([t])=>{if(t.isIntersecting){let n=Math.round(t.boundingClientRect.width);w(n),E(!0),e.disconnect()}},{rootMargin:`100px`,threshold:.01});return S.current&&e.observe(S.current),()=>e.disconnect()},[]);let j=d===`intrinsic`,M=j?`auto`:p,N=h&&g?`${h} / ${g}`:void 0,P=j?N??m??`auto`:m??`16 / 9`,F=j&&P!==`auto`&&P!==`unset`?`100%`:M,I=C?`${C}px`:`100vw`,L=(0,l.jsx)(i,{width:f,height:F,aspectRatio:P}),R=j?{...y,display:`block`,width:`100%`,height:`auto`,objectFit:void 0}:{display:`block`,width:`100%`,height:`100%`,objectFit:d,...y},z=(0,l.jsxs)(l.Fragment,{children:[!D&&!k&&(s||L),T&&!k&&(0,l.jsxs)(`picture`,{children:[t?.map(e=>(0,l.jsx)(`source`,{srcSet:e.srcSet,type:e.type,sizes:e.sizes??I},`${e.type??`source`}-${e.srcSet}`)),(0,l.jsx)(`img`,{src:e,alt:n,role:r,"aria-label":a,onLoad:e=>{O(!0),_?.(e)},onError:e=>{A(!0),v?.(e)},style:D?R:{display:`none`},"aria-busy":!D,width:h,height:g,...x})]}),k&&L]}),B=(0,l.jsx)(`div`,{ref:S,style:{width:f,height:M,aspectRatio:P,...b},children:z});return u?(0,l.jsxs)(`figure`,{className:`relative`,children:[B,o&&(0,l.jsx)(`figcaption`,{style:{bottom:2,right:2,maxWidth:`calc(100% - 4px)`},className:`absolute paddingInlineMd textRight radiusSm fontSizeSm`,children:o})]}):B}var c,l,u=t((()=>{c=e(n(),1),o(),l=r(),s.__docgenInfo={description:`Базовый рендер изображения: lazy-появление, placeholder, обработка ошибки и figure/caption.
|
|
2
2
|
Компонент не знает, как устроено хранилище и какие форматы/размеры доступны.`,methods:[],displayName:`ImageRenderer`,props:{src:{required:!0,tsType:{name:`string`},description:``},sources:{required:!1,tsType:{name:`unknown`},description:``},layout:{required:!1,tsType:{name:`union`,raw:`"cover" | "contain" | "intrinsic"`,elements:[{name:`literal`,value:`"cover"`},{name:`literal`,value:`"contain"`},{name:`literal`,value:`"intrinsic"`}]},description:``,defaultValue:{value:`"cover"`,computed:!1}},alt:{required:!1,tsType:{name:`string`},description:``},role:{required:!1,tsType:{name:`string`},description:``},ariaLabel:{required:!1,tsType:{name:`string`},description:``},caption:{required:!1,tsType:{name:`string`},description:``},fallback:{required:!1,tsType:{name:`ReactNode`},description:``},useFigure:{required:!1,tsType:{name:`boolean`},description:``,defaultValue:{value:`false`,computed:!1}},aspectRatio:{required:!1,tsType:{name:`union`,raw:`string | "unset"`,elements:[{name:`string`},{name:`literal`,value:`"unset"`}]},description:``},width:{required:!1,tsType:{name:`CSSProperties["width"]`,raw:`CSSProperties["width"]`},description:``,defaultValue:{value:`"100%"`,computed:!1}},height:{required:!1,tsType:{name:`CSSProperties["height"]`,raw:`CSSProperties["height"]`},description:``,defaultValue:{value:`"100%"`,computed:!1}},intrinsicWidth:{required:!1,tsType:{name:`number`},description:``},intrinsicHeight:{required:!1,tsType:{name:`number`},description:``},wrapperStyle:{required:!1,tsType:{name:`CSSProperties`},description:``}},composes:[`Omit`]}}));export{u as n,s as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e}from"./preload-helper-B45gAKPr.js";import{n as t,t as n}from"./ImageRenderer-
|
|
1
|
+
import{i as e}from"./preload-helper-B45gAKPr.js";import{n as t,t as n}from"./ImageRenderer-B2AC5NZh.js";var r,i,a,o,s;e((()=>{t(),r={title:`Shared/UI/Image/ImageRenderer`,component:n,args:{src:`https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1600&q=80`,alt:`Горный пейзаж`},parameters:{layout:`padded`},argTypes:{layout:{control:`inline-radio`,options:[`cover`,`contain`,`intrinsic`]}}},i={args:{layout:`cover`,width:`min(100%, 48rem)`,height:`24rem`}},a={args:{layout:`contain`,width:`min(100%, 48rem)`,height:`24rem`,wrapperStyle:{background:`var(--surface-1)`}}},o={args:{layout:`intrinsic`,intrinsicWidth:1600,intrinsicHeight:1067}},i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
layout: "cover",
|
|
4
4
|
width: "min(100%, 48rem)",
|
package/storybook-static/assets/{ImageView.stories-BuexvCt7.js → ImageView.stories-B1g_OpL2.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e}from"./preload-helper-B45gAKPr.js";import{t}from"./jsx-runtime-BBQGix-2.js";import{n,t as r}from"./ImageRenderer-
|
|
1
|
+
import{i as e}from"./preload-helper-B45gAKPr.js";import{t}from"./jsx-runtime-BBQGix-2.js";import{n,t as r}from"./ImageRenderer-B2AC5NZh.js";function i(e){return e.map(e=>`width`in e?`${e.src} ${e.width}w`:`${e.src} ${e.density}x`).join(`, `)}var a=e((()=>{}));function o(e,t){return(e??[]).map(e=>({srcSet:i(e.candidates),type:e.type,sizes:e.sizes??t})).filter(e=>e.srcSet.length>0)}var s=e((()=>{a()}));function c({image:e,alt:t,sizes:n,aspectRatio:a,...s}){let c=o(e.sources,n),u=e.candidates?i(e.candidates):void 0,d=a??(e.intrinsicWidth&&e.intrinsicHeight?`${e.intrinsicWidth} / ${e.intrinsicHeight}`:void 0);return(0,l.jsx)(r,{...s,src:e.src,srcSet:u||void 0,sources:c,sizes:n,alt:t??e.alt,intrinsicWidth:e.intrinsicWidth,intrinsicHeight:e.intrinsicHeight,aspectRatio:d})}var l,u=e((()=>{s(),a(),n(),l=t(),c.__docgenInfo={description:`Собирает picture/srcset из готовых URL и делегирует отображение ImageRenderer.
|
|
2
2
|
Компонент не формирует имена файлов и не знает о форматах или размерах хранилища.`,methods:[],displayName:`ImageView`,props:{image:{required:!0,tsType:{name:`signature`,type:`object`,raw:`{
|
|
3
3
|
src: string;
|
|
4
4
|
alt?: string;
|
package/storybook-static/assets/{ImageViewer.stories-C2rTyKj7.js → ImageViewer.stories-b0cFqboR.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ImageViewerRuntime-
|
|
2
|
-
import{c as e,i as t,n,t as r}from"./preload-helper-B45gAKPr.js";import{C as i}from"./iframe-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ImageViewerRuntime-D_IBJyiC.js","./preload-helper-B45gAKPr.js","./iframe-BlBhvHwk.js","./react-dom-Dymo4Ige.js","./jsx-runtime-BBQGix-2.js","./utils-De5IM4sM.js","./lucide-react-DMR456up.js","./ImageViewerRuntime-CRmlrtpL.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as e,i as t,n,t as r}from"./preload-helper-B45gAKPr.js";import{C as i}from"./iframe-BlBhvHwk.js";import{t as a}from"./jsx-runtime-BBQGix-2.js";import{t as o}from"./Button-DDo_z6nQ.js";import{t as s}from"./button-CofLsODD.js";var c=t((()=>{})),l=t((()=>{})),u=t((()=>{})),d=t((()=>{}));function f(e){let[t,n]=(0,p.useState)(!1),r=(0,p.useCallback)(()=>n(!0),[]);return typeof document<`u`&&(e.open||t)?(0,m.jsx)(p.Suspense,{fallback:null,children:(0,m.jsx)(h,{...e,onRuntimeMounted:r})}):null}var p,m,h,g=t((()=>{p=e(i(),1),c(),l(),u(),d(),m=a(),n(),h=(0,p.lazy)(()=>r(()=>import(`./ImageViewerRuntime-D_IBJyiC.js`),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)),f.__docgenInfo={description:`Управляемый полноэкранный viewer с ленивой границей vendor runtime.
|
|
3
3
|
YARL и его плагины загружаются только при первом открытии, а после mount runtime остаётся в React-дереве,
|
|
4
4
|
чтобы закрытие успело завершить анимацию, снять inert и вернуть focus исходному trigger.`,methods:[],displayName:`ImageViewer`,props:{open:{required:!0,tsType:{name:`boolean`},description:``},images:{required:!0,tsType:{name:`unknown`},description:``},index:{required:!1,tsType:{name:`number`},description:``},onClose:{required:!0,tsType:{name:`signature`,type:`function`,raw:`() => void`,signature:{arguments:[],return:{name:`void`}}},description:``},onIndexChange:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(index: number) => void`,signature:{arguments:[{type:{name:`number`},name:`index`}],return:{name:`void`}}},description:``},features:{required:!1,tsType:{name:`signature`,type:`object`,raw:`{
|
|
5
5
|
readonly captions?: boolean;
|