@jenesei-software/jenesei-kit-react 1.3.9 → 1.3.11
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/build/{area-BC64nSGj.js → area-BWxBop5m.js} +2 -2
- package/build/area-BWxBop5m.js.map +1 -0
- package/build/{area-DRqAofd0.js → area-CD8KKIM0.js} +2 -2
- package/build/area-CD8KKIM0.js.map +1 -0
- package/build/{area-Dnq78ow6.js → area-CT83tDk-.js} +10 -8
- package/build/area-CT83tDk-.js.map +1 -0
- package/build/{area-C6QOr2Kd.cjs → area-CmCMHnRA.cjs} +2 -2
- package/build/area-CmCMHnRA.cjs.map +1 -0
- package/build/{area-C3wR_pPr.cjs → area-DRsIULcw.cjs} +2 -2
- package/build/{area-C3wR_pPr.cjs.map → area-DRsIULcw.cjs.map} +1 -1
- package/build/{area-D7906bXA.cjs → area-Dup_lUb9.cjs} +2 -2
- package/build/area-Dup_lUb9.cjs.map +1 -0
- package/build/area-outside.cjs.js +1 -1
- package/build/area-outside.es.js +1 -1
- package/build/area-preview.cjs.js +1 -1
- package/build/area-preview.es.js +1 -1
- package/build/{area-CFZW3T1g.js → area-sDVSuS3G.js} +3 -3
- package/build/{area-CFZW3T1g.js.map → area-sDVSuS3G.js.map} +1 -1
- package/build/area-scroll.cjs.js +1 -1
- package/build/area-scroll.d.ts +1 -1
- package/build/area-scroll.es.js +1 -1
- package/build/area-skeleton.cjs.js +1 -1
- package/build/area-skeleton.d.ts +1 -1
- package/build/area-skeleton.es.js +1 -1
- package/build/area-smooth.cjs.js +1 -1
- package/build/area-smooth.d.ts +1 -1
- package/build/area-smooth.es.js +1 -1
- package/build/area-t259bohc.cjs +2 -0
- package/build/area-t259bohc.cjs.map +1 -0
- package/build/area.hooks-Bk04M7mk.js.map +1 -1
- package/build/area.hooks-C_UKZzcb.cjs.map +1 -1
- package/build/build-info.txt +3 -3
- package/build/component--jGdo2yq.cjs +2 -0
- package/build/component--jGdo2yq.cjs.map +1 -0
- package/build/{component--Oo5_3xq.cjs → component-8NOxwZJO.cjs} +2 -2
- package/build/component-8NOxwZJO.cjs.map +1 -0
- package/build/component-BVnHSTJd.cjs +245 -0
- package/build/component-BVnHSTJd.cjs.map +1 -0
- package/build/{component-DHq4T6Ku.cjs → component-BhPckvLk.cjs} +2 -2
- package/build/component-BhPckvLk.cjs.map +1 -0
- package/build/component-CLqcB5mM.cjs.map +1 -1
- package/build/{component-C4ULY0c6.js → component-CN6att4f.js} +20 -9
- package/build/component-CN6att4f.js.map +1 -0
- package/build/component-DHM9pbab.js.map +1 -1
- package/build/{component-Bzw_uobM.js → component-DaXKDHnc.js} +48 -7
- package/build/component-DaXKDHnc.js.map +1 -0
- package/build/component-DnJo66DS.cjs +90 -0
- package/build/component-DnJo66DS.cjs.map +1 -0
- package/build/{component-BcHiCCC9.js → component-DpVp9dB1.js} +2 -2
- package/build/component-DpVp9dB1.js.map +1 -0
- package/build/{component-DfxlJBGv.js → component-G5QqAuDV.js} +3 -3
- package/build/component-G5QqAuDV.js.map +1 -0
- package/build/component-GKvpOWlO.cjs +28 -0
- package/build/component-GKvpOWlO.cjs.map +1 -0
- package/build/component-GtWqnaqk.js +710 -0
- package/build/component-GtWqnaqk.js.map +1 -0
- package/build/component-accordion.cjs.js +1 -1
- package/build/component-accordion.d.ts +1 -1
- package/build/component-accordion.es.js +1 -1
- package/build/component-button-group.cjs.js +1 -1
- package/build/component-button-group.d.ts +18 -1
- package/build/component-button-group.es.js +1 -1
- package/build/component-button.cjs.js +1 -1
- package/build/component-button.d.ts +21 -2
- package/build/component-button.es.js +1 -1
- package/build/{component-BiNPQpCQ.cjs → component-cRmWWDr_.cjs} +2 -2
- package/build/component-cRmWWDr_.cjs.map +1 -0
- package/build/component-checkbox-group.cjs.js +1 -1
- package/build/component-checkbox-group.d.ts +20 -3
- package/build/component-checkbox-group.es.js +1 -1
- package/build/component-checkbox.cjs.js +1 -1
- package/build/component-checkbox.d.ts +21 -2
- package/build/component-checkbox.es.js +1 -1
- package/build/component-date-picker.cjs.js +1 -1
- package/build/component-date-picker.d.ts +35 -37
- package/build/component-date-picker.es.js +1 -1
- package/build/{component-CQ8fy2gK.js → component-feWPgACX.js} +2 -2
- package/build/component-feWPgACX.js.map +1 -0
- package/build/component-icon.cjs.js +1 -1
- package/build/component-icon.es.js +1 -1
- package/build/component-image-button.cjs.js +1 -1
- package/build/component-image-button.d.ts +18 -1
- package/build/component-image-button.es.js +1 -1
- package/build/component-image-select.cjs.js +1 -1
- package/build/component-image-select.d.ts +18 -1
- package/build/component-image-select.es.js +1 -1
- package/build/component-image-slider.cjs.js +1 -1
- package/build/component-image-slider.d.ts +1 -1
- package/build/component-image-slider.es.js +1 -1
- package/build/component-image.cjs.js +1 -1
- package/build/component-image.es.js +1 -1
- package/build/component-input-otp.cjs.js +1 -1
- package/build/component-input-otp.d.ts +51 -5
- package/build/component-input-otp.es.js +1 -1
- package/build/component-input.cjs.js +1 -1
- package/build/component-input.d.ts +62 -14
- package/build/component-input.es.js +2 -2
- package/build/component-map.cjs.js +1 -1
- package/build/component-map.es.js +1 -1
- package/build/{component-jPZYT5iL.js → component-mzzOCXSx.js} +12 -12
- package/build/component-mzzOCXSx.js.map +1 -0
- package/build/component-pagination.cjs.js +1 -1
- package/build/component-pagination.d.ts +18 -1
- package/build/component-pagination.es.js +1 -1
- package/build/component-range.cjs.js +1 -1
- package/build/component-range.d.ts +50 -4
- package/build/component-range.es.js +1 -1
- package/build/component-select.cjs.js +1 -1
- package/build/component-select.d.ts +48 -7
- package/build/component-select.es.js +1 -1
- package/build/component-stack.cjs.js +1 -1
- package/build/component-stack.d.ts +5 -7
- package/build/component-stack.es.js +1 -1
- package/build/component-textarea.cjs.js +1 -1
- package/build/component-textarea.d.ts +50 -7
- package/build/component-textarea.es.js +1 -1
- package/build/component-toggle.cjs.js +1 -1
- package/build/component-toggle.d.ts +51 -2
- package/build/component-toggle.es.js +1 -1
- package/build/component-tooltip.cjs.js +1 -1
- package/build/component-tooltip.d.ts +14 -2
- package/build/component-tooltip.es.js +1 -1
- package/build/component-typography.cjs.js +1 -1
- package/build/component-typography.d.ts +27 -13
- package/build/component-typography.es.js +7 -6
- package/build/component-typography.es.js.map +1 -1
- package/build/{component.components-DX0DVix5.js → component.components-C-EEYFsd.js} +4 -4
- package/build/{component.components-DX0DVix5.js.map → component.components-C-EEYFsd.js.map} +1 -1
- package/build/{component.components-H_qAeBHw.cjs → component.components-CC3IeZon.cjs} +2 -2
- package/build/{component.components-H_qAeBHw.cjs.map → component.components-CC3IeZon.cjs.map} +1 -1
- package/build/{component.constants-DjYLZpyY.js → component.constants-34RZJIiQ.js} +3 -3
- package/build/component.constants-34RZJIiQ.js.map +1 -0
- package/build/{component.constants-C7DGbAC8.js → component.constants-BxnfHAYp.js} +8 -8
- package/build/component.constants-BxnfHAYp.js.map +1 -0
- package/build/{component.constants-DwRduxMm.cjs → component.constants-CpRgeAIu.cjs} +3 -3
- package/build/component.constants-CpRgeAIu.cjs.map +1 -0
- package/build/{component.constants-veAUxKBd.cjs → component.constants-D6AJ1xmO.cjs} +2 -2
- package/build/component.constants-D6AJ1xmO.cjs.map +1 -0
- package/build/component.functions-D9ffjEok.cjs +8 -0
- package/build/component.functions-D9ffjEok.cjs.map +1 -0
- package/build/component.functions-DNW6h8kk.js +12 -0
- package/build/component.functions-DNW6h8kk.js.map +1 -0
- package/build/{component.styles--Ug3PJQ6.cjs → component.styles-4ycgapiT.cjs} +7 -7
- package/build/component.styles-4ycgapiT.cjs.map +1 -0
- package/build/{component.styles-DLU0S0KI.cjs → component.styles-B-bndnRM.cjs} +2 -2
- package/build/component.styles-B-bndnRM.cjs.map +1 -0
- package/build/{component.styles-C3hYZJGh.js → component.styles-B0FFHGeN.js} +26 -20
- package/build/component.styles-B0FFHGeN.js.map +1 -0
- package/build/component.styles-B0L4jbOO.js.map +1 -1
- package/build/{component.styles-C1p3V7H6.js → component.styles-BDKsgd6y.js} +32 -19
- package/build/component.styles-BDKsgd6y.js.map +1 -0
- package/build/{component.styles-Cje8zTpf.cjs → component.styles-BELwxHxh.cjs} +7 -7
- package/build/component.styles-BELwxHxh.cjs.map +1 -0
- package/build/{component.styles-BirbSbuD.js → component.styles-BEaqQuF_.js} +4 -4
- package/build/{component.styles-BirbSbuD.js.map → component.styles-BEaqQuF_.js.map} +1 -1
- package/build/{component.styles-DpgkACgI.js → component.styles-BGYbrzvh.js} +2 -2
- package/build/component.styles-BGYbrzvh.js.map +1 -0
- package/build/{component.styles-DSle6iuF.cjs → component.styles-BKnUDWqO.cjs} +2 -2
- package/build/component.styles-BKnUDWqO.cjs.map +1 -0
- package/build/component.styles-Bb7_KygZ.cjs +73 -0
- package/build/component.styles-Bb7_KygZ.cjs.map +1 -0
- package/build/{component.styles-DYS_AJ9F.js → component.styles-BbwS_Ekx.js} +9 -10
- package/build/{component.styles-DYS_AJ9F.js.map → component.styles-BbwS_Ekx.js.map} +1 -1
- package/build/component.styles-BeRVOt5T.cjs +137 -0
- package/build/{component.styles-Crx4pACx.cjs.map → component.styles-BeRVOt5T.cjs.map} +1 -1
- package/build/{component.styles-DX_3POUD.js → component.styles-CJC0h3Ed.js} +4 -4
- package/build/component.styles-CJC0h3Ed.js.map +1 -0
- package/build/{component.styles-CggIUAVx.js → component.styles-CZyAhUtW.js} +21 -10
- package/build/component.styles-CZyAhUtW.js.map +1 -0
- package/build/component.styles-CsB9986a.cjs +99 -0
- package/build/component.styles-CsB9986a.cjs.map +1 -0
- package/build/{component.styles-Bm3Ec-Kd.js → component.styles-DS0ofW1Y.js} +3 -3
- package/build/{component.styles-Bm3Ec-Kd.js.map → component.styles-DS0ofW1Y.js.map} +1 -1
- package/build/component.styles-DTnknwt_.js +94 -0
- package/build/component.styles-DTnknwt_.js.map +1 -0
- package/build/{component.styles-5Xz_H-fR.js → component.styles-DWS6xT-y.js} +32 -11
- package/build/component.styles-DWS6xT-y.js.map +1 -0
- package/build/component.styles-DbWj2stq.cjs +21 -0
- package/build/component.styles-DbWj2stq.cjs.map +1 -0
- package/build/component.styles-Dpg-__rn.cjs.map +1 -1
- package/build/component.styles-PNgt36ZD.cjs +225 -0
- package/build/component.styles-PNgt36ZD.cjs.map +1 -0
- package/build/{component.styles-Bfhg18CX.cjs → component.styles-Py-IeQ2q.cjs} +2 -2
- package/build/component.styles-Py-IeQ2q.cjs.map +1 -0
- package/build/{component.styles-v0YYECwW.js → component.styles-VrNFgg1_.js} +32 -12
- package/build/component.styles-VrNFgg1_.js.map +1 -0
- package/build/{component.styles-DhAMCZ71.cjs → component.styles-ZU_GyVub.cjs} +2 -2
- package/build/component.styles-ZU_GyVub.cjs.map +1 -0
- package/build/component.styles-gZHy-64x.cjs +13 -0
- package/build/component.styles-gZHy-64x.cjs.map +1 -0
- package/build/{component.styles-5CVyEjEh.js → component.styles-mcm1LgEr.js} +51 -23
- package/build/component.styles-mcm1LgEr.js.map +1 -0
- package/build/component.types-BBQ18Npa.js.map +1 -1
- package/build/{component.types-BzBjcohg.js → component.types-BhmQrqBu.js} +95 -68
- package/build/component.types-BhmQrqBu.js.map +1 -0
- package/build/component.types-CfR3RBsV.cjs +171 -0
- package/build/component.types-CfR3RBsV.cjs.map +1 -0
- package/build/component.types-DraGq1j_.cjs.map +1 -1
- package/build/context-app.cjs.js +1 -1
- package/build/context-app.es.js +1 -1
- package/build/context-dialog.cjs.js +1 -1
- package/build/context-dialog.d.ts +11 -4
- package/build/context-dialog.es.js +1 -1
- package/build/context-permission.d.ts +4 -4
- package/build/context-sonner.cjs.js +1 -1
- package/build/context-sonner.d.ts +42 -7
- package/build/context-sonner.es.js +1 -1
- package/build/{context.constants-B9Yk6CGe.js → context.constants-BCpaUfFz.js} +9 -6
- package/build/context.constants-BCpaUfFz.js.map +1 -0
- package/build/context.constants-BLQ_1jZI.cjs +32 -0
- package/build/context.constants-BLQ_1jZI.cjs.map +1 -0
- package/build/{context.constants-Bz_5itIx.js → context.constants-DOMoMUoD.js} +26 -9
- package/build/context.constants-DOMoMUoD.js.map +1 -0
- package/build/context.constants-cm50ZUiS.cjs +98 -0
- package/build/context.constants-cm50ZUiS.cjs.map +1 -0
- package/build/context.functions-80N-5MqM.cjs.map +1 -1
- package/build/context.functions-B8FDl7nJ.js.map +1 -1
- package/build/context.functions-BD15C8_y.js.map +1 -1
- package/build/context.functions-CQ9GerPb.js.map +1 -1
- package/build/context.functions-ar41xFVo.cjs.map +1 -1
- package/build/context.functions-ohI9H54j.cjs.map +1 -1
- package/build/context.hooks-7ydA7mGj.js.map +1 -1
- package/build/context.hooks-BIsapq-0.cjs.map +1 -1
- package/build/context.hooks-BmwyZ1p3.js.map +1 -1
- package/build/context.hooks-BzMTkJNv.js.map +1 -1
- package/build/{context.hooks-DTdppyho.js → context.hooks-CI5aQmpr.js} +4 -4
- package/build/context.hooks-CI5aQmpr.js.map +1 -0
- package/build/{context.hooks-BDEwJHqB.cjs → context.hooks-Ci37RyLf.cjs} +3 -3
- package/build/context.hooks-Ci37RyLf.cjs.map +1 -0
- package/build/context.hooks-D13tbrva.cjs.map +1 -1
- package/build/context.hooks-u408Pxw8.cjs.map +1 -1
- package/build/floating-ui.react--v70Xky9.cjs +2 -0
- package/build/floating-ui.react--v70Xky9.cjs.map +1 -0
- package/build/{component-BoHvC24Q.js → floating-ui.react-Byi6bLb1.js} +17 -704
- package/build/floating-ui.react-Byi6bLb1.js.map +1 -0
- package/build/index.cjs.js +1 -1
- package/build/index.d.ts +92 -100
- package/build/index.es.js +59 -57
- package/build/index.es.js.map +1 -1
- package/build/motion-CIQfrLky.js.map +1 -1
- package/build/motion-DgB7M2Hn.cjs.map +1 -1
- package/build/style-D3Lbn1EL.cjs +32 -0
- package/build/style-D3Lbn1EL.cjs.map +1 -0
- package/build/{style-mc2ST5fY.cjs → style-Df37KnoJ.cjs} +47 -18
- package/build/style-Df37KnoJ.cjs.map +1 -0
- package/build/{style-BgcnmVAY.js → style-RL73t3JD.js} +63 -20
- package/build/style-RL73t3JD.js.map +1 -0
- package/build/style-add.cjs.js +1 -1
- package/build/style-add.d.ts +57 -5
- package/build/style-add.es.js +11 -10
- package/build/style-error.cjs.js +1 -1
- package/build/style-error.d.ts +48 -7
- package/build/style-error.es.js +1 -1
- package/build/style-fRZ6xrVp.cjs.map +1 -1
- package/build/style-plT9Ah7t.js.map +1 -1
- package/build/style-theme.cjs.js +1 -1
- package/build/style-theme.d.ts +2 -2
- package/build/style-theme.es.js +1 -1
- package/build/{style-BQ653xOS.js → style-uVTmdhsH.js} +14 -5
- package/build/style-uVTmdhsH.js.map +1 -0
- package/build/{theme.global-CFUz5Asg.js → theme.global-BgERDJ4e.js} +36 -1
- package/build/theme.global-BgERDJ4e.js.map +1 -0
- package/build/{theme.global-B9t2Fi10.cjs → theme.global-CcoD5bPP.cjs} +2 -2
- package/build/theme.global-CcoD5bPP.cjs.map +1 -0
- package/build/{use-DTZ8c8_g.js → use-Bp4KNVye.js} +7 -7
- package/build/{use-DTZ8c8_g.js.map → use-Bp4KNVye.js.map} +1 -1
- package/build/use-Bp8UVw4Y.js.map +1 -1
- package/build/use-C1l0O0Qo.cjs.map +1 -1
- package/build/{use-D7IsSb34.cjs → use-DQDxWjzu.cjs} +2 -2
- package/build/{use-D7IsSb34.cjs.map → use-DQDxWjzu.cjs.map} +1 -1
- package/build/use-DT0XgvJT.js.map +1 -1
- package/build/use-IhzeVumv.cjs.map +1 -1
- package/package.json +4 -3
- package/build/area-BC64nSGj.js.map +0 -1
- package/build/area-C6QOr2Kd.cjs.map +0 -1
- package/build/area-D7906bXA.cjs.map +0 -1
- package/build/area-DRqAofd0.js.map +0 -1
- package/build/area-DnAf310m.cjs +0 -2
- package/build/area-DnAf310m.cjs.map +0 -1
- package/build/area-Dnq78ow6.js.map +0 -1
- package/build/component--Oo5_3xq.cjs.map +0 -1
- package/build/component-BV_7tGiu.cjs +0 -28
- package/build/component-BV_7tGiu.cjs.map +0 -1
- package/build/component-BcHiCCC9.js.map +0 -1
- package/build/component-BiNPQpCQ.cjs.map +0 -1
- package/build/component-BoHvC24Q.js.map +0 -1
- package/build/component-Bzw_uobM.js.map +0 -1
- package/build/component-C4ULY0c6.js.map +0 -1
- package/build/component-CACoGUK9.cjs +0 -251
- package/build/component-CACoGUK9.cjs.map +0 -1
- package/build/component-CQ8fy2gK.js.map +0 -1
- package/build/component-DHq4T6Ku.cjs.map +0 -1
- package/build/component-DfxlJBGv.js.map +0 -1
- package/build/component-Dn-VRY7-.cjs +0 -2
- package/build/component-Dn-VRY7-.cjs.map +0 -1
- package/build/component-jPZYT5iL.js.map +0 -1
- package/build/component-u_42PteJ.cjs +0 -90
- package/build/component-u_42PteJ.cjs.map +0 -1
- package/build/component.constants-C7DGbAC8.js.map +0 -1
- package/build/component.constants-DjYLZpyY.js.map +0 -1
- package/build/component.constants-DwRduxMm.cjs.map +0 -1
- package/build/component.constants-veAUxKBd.cjs.map +0 -1
- package/build/component.styles--Ug3PJQ6.cjs.map +0 -1
- package/build/component.styles-5CVyEjEh.js.map +0 -1
- package/build/component.styles-5Xz_H-fR.js.map +0 -1
- package/build/component.styles-8tkaznu_.cjs +0 -21
- package/build/component.styles-8tkaznu_.cjs.map +0 -1
- package/build/component.styles-Bfhg18CX.cjs.map +0 -1
- package/build/component.styles-BuzZQhqS.cjs +0 -73
- package/build/component.styles-BuzZQhqS.cjs.map +0 -1
- package/build/component.styles-C1p3V7H6.js.map +0 -1
- package/build/component.styles-C3hYZJGh.js.map +0 -1
- package/build/component.styles-CISd4naT.cjs +0 -13
- package/build/component.styles-CISd4naT.cjs.map +0 -1
- package/build/component.styles-CggIUAVx.js.map +0 -1
- package/build/component.styles-Cje8zTpf.cjs.map +0 -1
- package/build/component.styles-CpFA5YrM.js +0 -71
- package/build/component.styles-CpFA5YrM.js.map +0 -1
- package/build/component.styles-Crx4pACx.cjs +0 -137
- package/build/component.styles-DLU0S0KI.cjs.map +0 -1
- package/build/component.styles-DSle6iuF.cjs.map +0 -1
- package/build/component.styles-DX_3POUD.js.map +0 -1
- package/build/component.styles-Db3HLiuV.cjs +0 -99
- package/build/component.styles-Db3HLiuV.cjs.map +0 -1
- package/build/component.styles-DhAMCZ71.cjs.map +0 -1
- package/build/component.styles-DpgkACgI.js.map +0 -1
- package/build/component.styles-o7GmI4Ap.cjs +0 -225
- package/build/component.styles-o7GmI4Ap.cjs.map +0 -1
- package/build/component.styles-v0YYECwW.js.map +0 -1
- package/build/component.types-BzBjcohg.js.map +0 -1
- package/build/component.types-ydMLhabS.cjs +0 -174
- package/build/component.types-ydMLhabS.cjs.map +0 -1
- package/build/context.constants-B9Yk6CGe.js.map +0 -1
- package/build/context.constants-Bz_5itIx.js.map +0 -1
- package/build/context.constants-CTfUKury.cjs +0 -32
- package/build/context.constants-CTfUKury.cjs.map +0 -1
- package/build/context.constants-CV8ycctl.cjs +0 -100
- package/build/context.constants-CV8ycctl.cjs.map +0 -1
- package/build/context.hooks-BDEwJHqB.cjs.map +0 -1
- package/build/context.hooks-DTdppyho.js.map +0 -1
- package/build/style-B5u4pW5G.cjs +0 -32
- package/build/style-B5u4pW5G.cjs.map +0 -1
- package/build/style-BQ653xOS.js.map +0 -1
- package/build/style-BgcnmVAY.js.map +0 -1
- package/build/style-mc2ST5fY.cjs.map +0 -1
- package/build/theme.global-B9t2Fi10.cjs.map +0 -1
- package/build/theme.global-CFUz5Asg.js.map +0 -1
|
@@ -0,0 +1,710 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "./jsx-runtime-BrDlu8eK.js";
|
|
2
|
+
import { u as useScreenWidth } from "./context.hooks-BmwyZ1p3.js";
|
|
3
|
+
import { createLink } from "@tanstack/react-router";
|
|
4
|
+
import { useState, useRef, useMemo, useEffect, useLayoutEffect, useCallback, memo } from "react";
|
|
5
|
+
import styled, { keyframes, css, useTheme } from "styled-components";
|
|
6
|
+
import { J as JeneseiPalette, K as KEY_SIZE_DATA } from "./theme.global-BgERDJ4e.js";
|
|
7
|
+
import { a as useFloating, b as autoUpdate, o as offset, f as flip, s as shift } from "./floating-ui.react-Byi6bLb1.js";
|
|
8
|
+
import { AnimatePresence, motion } from "framer-motion";
|
|
9
|
+
import ReactDOM__default from "react-dom";
|
|
10
|
+
import { g as addOutline, c as addFont, i as addAlwaysOutline } from "./style-RL73t3JD.js";
|
|
11
|
+
import { a as addSX } from "./style-plT9Ah7t.js";
|
|
12
|
+
import { b as Stack } from "./component-mzzOCXSx.js";
|
|
13
|
+
const shadowPulse = keyframes`
|
|
14
|
+
0% {
|
|
15
|
+
text-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
|
16
|
+
}
|
|
17
|
+
50% {
|
|
18
|
+
text-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5);
|
|
19
|
+
}
|
|
20
|
+
100% {
|
|
21
|
+
text-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
function toStyledCSS(value) {
|
|
25
|
+
return css`
|
|
26
|
+
${value.shadow && value.shadow === "shadowPulse" && css`
|
|
27
|
+
animation: ${shadowPulse} 2s infinite;
|
|
28
|
+
`};
|
|
29
|
+
${value.letterSpacing && css`
|
|
30
|
+
letter-spacing: ${value.letterSpacing};
|
|
31
|
+
`};
|
|
32
|
+
${value.flex && css`
|
|
33
|
+
flex: ${value.flex};
|
|
34
|
+
`};
|
|
35
|
+
${value.cursor && css`
|
|
36
|
+
cursor: ${value.cursor};
|
|
37
|
+
`};
|
|
38
|
+
${value.overflow && css`
|
|
39
|
+
overflow: ${value.overflow};
|
|
40
|
+
`};
|
|
41
|
+
${value.line !== void 0 ? value.line === 1 ? css`
|
|
42
|
+
text-overflow: ellipsis;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
white-space: nowrap;
|
|
45
|
+
width: -webkit-fill-available;
|
|
46
|
+
max-width: fit-content;
|
|
47
|
+
` : css`
|
|
48
|
+
word-break: break-word;
|
|
49
|
+
white-space: normal;
|
|
50
|
+
text-overflow: ellipsis;
|
|
51
|
+
display: -webkit-box;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
-webkit-box-orient: vertical;
|
|
54
|
+
-webkit-line-clamp: ${value.line};
|
|
55
|
+
width: fit-content;
|
|
56
|
+
overflow-wrap: anywhere;
|
|
57
|
+
` : css``};
|
|
58
|
+
${value.family && css`
|
|
59
|
+
font-family: ${value.family};
|
|
60
|
+
`};
|
|
61
|
+
${value.weight && css`
|
|
62
|
+
font-weight: ${value.weight};
|
|
63
|
+
`};
|
|
64
|
+
${value.height && css`
|
|
65
|
+
line-height: ${value.height}px;
|
|
66
|
+
`};
|
|
67
|
+
${value.color && css`
|
|
68
|
+
color: ${JeneseiPalette[value.color]};
|
|
69
|
+
`};
|
|
70
|
+
${value.align && css`
|
|
71
|
+
text-align: ${value.align};
|
|
72
|
+
`};
|
|
73
|
+
${value.wrap && css`
|
|
74
|
+
text-wrap: ${value.wrap};
|
|
75
|
+
`};
|
|
76
|
+
${value.decoration && css`
|
|
77
|
+
text-decoration: ${value.decoration};
|
|
78
|
+
`};
|
|
79
|
+
${value.transform && css`
|
|
80
|
+
text-transform: ${value.transform};
|
|
81
|
+
`};
|
|
82
|
+
${value.isHoverUnderlining && css`
|
|
83
|
+
&:hover {
|
|
84
|
+
text-decoration: underline;
|
|
85
|
+
}
|
|
86
|
+
`};
|
|
87
|
+
${value.isNoUserSelect && css`
|
|
88
|
+
user-select: none;
|
|
89
|
+
-webkit-user-select: none;
|
|
90
|
+
-moz-user-select: none;
|
|
91
|
+
-ms-user-select: none;
|
|
92
|
+
`};
|
|
93
|
+
${"size" in value && value.size && css`
|
|
94
|
+
font-size: ${value.size}px;
|
|
95
|
+
`};
|
|
96
|
+
${"variant" in value && value.variant ? value.variant === "h1" ? css`
|
|
97
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h1 * props.theme.font.sizeDefault.default}px;
|
|
98
|
+
line-height: ${(props) => props.theme.font.lineHeight};
|
|
99
|
+
margin: 0;
|
|
100
|
+
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
101
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h1 * props.theme.font.sizeDefault.tablet}px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
105
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h1 * props.theme.font.sizeDefault.mobile}px;
|
|
106
|
+
}
|
|
107
|
+
` : value.variant === "h2" ? css`
|
|
108
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h2 * props.theme.font.sizeDefault.default}px;
|
|
109
|
+
line-height: ${(props) => props.theme.font.lineHeight};
|
|
110
|
+
margin: 0;
|
|
111
|
+
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
112
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h2 * props.theme.font.sizeDefault.tablet}px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
116
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h2 * props.theme.font.sizeDefault.mobile}px;
|
|
117
|
+
}
|
|
118
|
+
` : value.variant === "h3" ? css`
|
|
119
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h3 * props.theme.font.sizeDefault.default}px;
|
|
120
|
+
line-height: ${(props) => props.theme.font.lineHeight};
|
|
121
|
+
margin: 0;
|
|
122
|
+
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
123
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h3 * props.theme.font.sizeDefault.tablet}px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
127
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h3 * props.theme.font.sizeDefault.mobile}px;
|
|
128
|
+
}
|
|
129
|
+
` : value.variant === "h4" ? css`
|
|
130
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h4 * props.theme.font.sizeDefault.default}px;
|
|
131
|
+
line-height: ${(props) => props.theme.font.lineHeight};
|
|
132
|
+
margin: 0;
|
|
133
|
+
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
134
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h4 * props.theme.font.sizeDefault.tablet}px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
138
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h4 * props.theme.font.sizeDefault.mobile}px;
|
|
139
|
+
}
|
|
140
|
+
` : value.variant === "h5" ? css`
|
|
141
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h5 * props.theme.font.sizeDefault.default}px;
|
|
142
|
+
line-height: ${(props) => props.theme.font.lineHeight};
|
|
143
|
+
margin: 0;
|
|
144
|
+
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
145
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h5 * props.theme.font.sizeDefault.tablet}px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
149
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h5 * props.theme.font.sizeDefault.mobile}px;
|
|
150
|
+
}
|
|
151
|
+
` : value.variant === "h6" ? css`
|
|
152
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h6 * props.theme.font.sizeDefault.default}px;
|
|
153
|
+
line-height: ${(props) => props.theme.font.lineHeight};
|
|
154
|
+
margin: 0;
|
|
155
|
+
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
156
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h6 * props.theme.font.sizeDefault.tablet}px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
160
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h6 * props.theme.font.sizeDefault.mobile}px;
|
|
161
|
+
}
|
|
162
|
+
` : value.variant === "h7" ? css`
|
|
163
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h7 * props.theme.font.sizeDefault.default}px;
|
|
164
|
+
line-height: ${(props) => props.theme.font.lineHeight};
|
|
165
|
+
margin: 0;
|
|
166
|
+
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
167
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h7 * props.theme.font.sizeDefault.tablet}px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
171
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h7 * props.theme.font.sizeDefault.mobile}px;
|
|
172
|
+
}
|
|
173
|
+
` : value.variant === "h8" ? css`
|
|
174
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h8 * props.theme.font.sizeDefault.default}px;
|
|
175
|
+
line-height: ${(props) => props.theme.font.lineHeight};
|
|
176
|
+
margin: 0;
|
|
177
|
+
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
178
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h8 * props.theme.font.sizeDefault.tablet}px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
182
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h8 * props.theme.font.sizeDefault.mobile}px;
|
|
183
|
+
}
|
|
184
|
+
` : value.variant === "h9" ? css`
|
|
185
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h9 * props.theme.font.sizeDefault.default}px;
|
|
186
|
+
line-height: ${(props) => props.theme.font.lineHeight};
|
|
187
|
+
margin: 0;
|
|
188
|
+
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
189
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h9 * props.theme.font.sizeDefault.tablet}px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
193
|
+
font-size: ${(props) => props.theme.font.sizeHeading.h9 * props.theme.font.sizeDefault.mobile}px;
|
|
194
|
+
}
|
|
195
|
+
` : null : null};
|
|
196
|
+
`;
|
|
197
|
+
}
|
|
198
|
+
const addSXTypography = css`
|
|
199
|
+
${(props) => {
|
|
200
|
+
const rawSX = props.$sxTypography;
|
|
201
|
+
if (!rawSX) return null;
|
|
202
|
+
return toStyledCSS(rawSX.default);
|
|
203
|
+
}}
|
|
204
|
+
|
|
205
|
+
${(props) => {
|
|
206
|
+
const rawSX = props.$sxTypography;
|
|
207
|
+
if (!rawSX) return null;
|
|
208
|
+
return Object.entries(rawSX).filter(([key]) => key !== "default").map(([deviceKey, value]) => {
|
|
209
|
+
var _a;
|
|
210
|
+
const screenWidth = (_a = props.theme.screens[deviceKey]) == null ? void 0 : _a.width;
|
|
211
|
+
if (!screenWidth) return null;
|
|
212
|
+
return css`
|
|
213
|
+
@media (max-width: ${screenWidth}px) {
|
|
214
|
+
${toStyledCSS(value)}
|
|
215
|
+
}
|
|
216
|
+
`;
|
|
217
|
+
});
|
|
218
|
+
}}
|
|
219
|
+
`;
|
|
220
|
+
const TypographyCSS = css`
|
|
221
|
+
font-style: normal;
|
|
222
|
+
position: relative;
|
|
223
|
+
overflow: visible;
|
|
224
|
+
text-overflow: ellipsis;
|
|
225
|
+
overflow-wrap: anywhere;
|
|
226
|
+
line-height: ${(props) => props.theme.font.lineHeight};
|
|
227
|
+
${addSXTypography};
|
|
228
|
+
${addSX}
|
|
229
|
+
`;
|
|
230
|
+
const Title = styled.span`
|
|
231
|
+
${TypographyCSS}
|
|
232
|
+
${addOutline}
|
|
233
|
+
`;
|
|
234
|
+
const Popover = (props) => {
|
|
235
|
+
var _a, _b, _c, _d;
|
|
236
|
+
const theme = useTheme();
|
|
237
|
+
return ReactDOM__default.createPortal(
|
|
238
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AnimatePresence, { children: props.isOpen && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
239
|
+
"div",
|
|
240
|
+
{
|
|
241
|
+
tabIndex: -1,
|
|
242
|
+
ref: props.ref,
|
|
243
|
+
style: {
|
|
244
|
+
position: "absolute",
|
|
245
|
+
top: 0,
|
|
246
|
+
left: 0,
|
|
247
|
+
...props.floatingStyles,
|
|
248
|
+
transform: props.floatingStyles.transform,
|
|
249
|
+
zIndex: 9999
|
|
250
|
+
},
|
|
251
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
252
|
+
PopoverWrapper,
|
|
253
|
+
{
|
|
254
|
+
tabIndex: -1,
|
|
255
|
+
$isShowAlwaysOutline: props.isShowAlwaysOutline,
|
|
256
|
+
$genre: props.genre ?? "black",
|
|
257
|
+
$font: {
|
|
258
|
+
size: ((_a = props.font) == null ? void 0 : _a.size) ?? KEY_SIZE_DATA[props.size ?? "medium"].font,
|
|
259
|
+
weight: ((_b = props.font) == null ? void 0 : _b.weight) ?? 700,
|
|
260
|
+
family: ((_c = props.font) == null ? void 0 : _c.family) ?? theme.font.family,
|
|
261
|
+
height: (_d = props.font) == null ? void 0 : _d.height
|
|
262
|
+
},
|
|
263
|
+
className: props.className,
|
|
264
|
+
initial: { opacity: 0, scale: 0.95 },
|
|
265
|
+
animate: { opacity: 1, scale: 1 },
|
|
266
|
+
exit: { opacity: 0, scale: 0.95 },
|
|
267
|
+
transition: { duration: 0.2 },
|
|
268
|
+
$sx: props.sx,
|
|
269
|
+
$size: props.size,
|
|
270
|
+
$sxTypography: props.sxTypography,
|
|
271
|
+
$maxHeight: props.maxHeight,
|
|
272
|
+
$maxWidth: props.maxWidth,
|
|
273
|
+
children: props.children
|
|
274
|
+
}
|
|
275
|
+
)
|
|
276
|
+
}
|
|
277
|
+
) }),
|
|
278
|
+
document.body
|
|
279
|
+
);
|
|
280
|
+
};
|
|
281
|
+
const usePopover = (props) => {
|
|
282
|
+
const { onFocus, onBlur, onBlurReference } = props;
|
|
283
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
284
|
+
const [minWidth, setMinWidth] = useState(void 0);
|
|
285
|
+
const [wasEverOpen, setWasEverOpen] = useState(false);
|
|
286
|
+
const {
|
|
287
|
+
refs,
|
|
288
|
+
floatingStyles,
|
|
289
|
+
update,
|
|
290
|
+
placement: actualPlacement
|
|
291
|
+
} = useFloating({
|
|
292
|
+
open: isOpen,
|
|
293
|
+
placement: props.placement,
|
|
294
|
+
middleware: [offset(props.offset ?? 8), flip(), shift()],
|
|
295
|
+
whileElementsMounted: autoUpdate
|
|
296
|
+
});
|
|
297
|
+
const clickOutsideHandler = useRef(null);
|
|
298
|
+
const hoverCloseTimeout = useRef(null);
|
|
299
|
+
const hoverOffset = useMemo(
|
|
300
|
+
() => props.hoverOffset ?? props.offset ?? DEFAULT_POPOVER_OFFSET,
|
|
301
|
+
[props.hoverOffset, props.offset]
|
|
302
|
+
);
|
|
303
|
+
const hoverCloseDelay = useMemo(() => props.hoverCloseDelay ?? DEFAULT_POPOVER_CLOSE_DELAY, [props.hoverCloseDelay]);
|
|
304
|
+
useEffect(() => {
|
|
305
|
+
if (props.isDisabled) return;
|
|
306
|
+
const refEl = refs.reference.current;
|
|
307
|
+
if (!refEl) return;
|
|
308
|
+
if ((props.mode === "click" || props.mode === "clickOpen") && refEl instanceof HTMLElement) {
|
|
309
|
+
const handleClick = () => {
|
|
310
|
+
if (props.mode === "click") {
|
|
311
|
+
setIsOpen((prev) => !prev);
|
|
312
|
+
} else if (props.mode === "clickOpen") {
|
|
313
|
+
setIsOpen(true);
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
refEl.addEventListener("click", handleClick);
|
|
317
|
+
return () => {
|
|
318
|
+
refEl.removeEventListener("click", handleClick);
|
|
319
|
+
};
|
|
320
|
+
} else if (props.mode === "hover" && refEl instanceof HTMLElement) {
|
|
321
|
+
const handleMouseEnter = () => {
|
|
322
|
+
setIsOpen(true);
|
|
323
|
+
};
|
|
324
|
+
const handleMouseLeave = () => {
|
|
325
|
+
if (hoverCloseTimeout.current) clearTimeout(hoverCloseTimeout.current);
|
|
326
|
+
hoverCloseTimeout.current = setTimeout(() => setIsOpen(false), hoverCloseDelay);
|
|
327
|
+
};
|
|
328
|
+
refEl.addEventListener("mouseenter", handleMouseEnter);
|
|
329
|
+
refEl.addEventListener("mouseleave", handleMouseLeave);
|
|
330
|
+
return () => {
|
|
331
|
+
refEl.removeEventListener("mouseenter", handleMouseEnter);
|
|
332
|
+
refEl.removeEventListener("mouseleave", handleMouseLeave);
|
|
333
|
+
if (hoverCloseTimeout.current) clearTimeout(hoverCloseTimeout.current);
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
}, [props.mode, refs.reference, hoverCloseDelay, props.isDisabled]);
|
|
337
|
+
useEffect(() => {
|
|
338
|
+
if (!isOpen || !refs.reference.current || !refs.floating.current || props.isDisabled) return;
|
|
339
|
+
const cleanup = autoUpdate(refs.reference.current, refs.floating.current, update);
|
|
340
|
+
return () => cleanup();
|
|
341
|
+
}, [isOpen, refs.reference, refs.floating, update, props.isDisabled]);
|
|
342
|
+
useEffect(() => {
|
|
343
|
+
if (!isOpen || !refs.reference.current || !refs.floating.current || props.isDisabled) return;
|
|
344
|
+
if (props.isClickOutside) {
|
|
345
|
+
clickOutsideHandler.current = (e) => {
|
|
346
|
+
const refEl = refs.reference.current;
|
|
347
|
+
const floatingEl = refs.floating.current;
|
|
348
|
+
const otherRefs = props.refsExcludeClickOutside || [];
|
|
349
|
+
if (refEl instanceof HTMLElement && floatingEl instanceof HTMLElement && !refEl.contains(e.target) && !floatingEl.contains(e.target) && !otherRefs.some((ref) => {
|
|
350
|
+
var _a;
|
|
351
|
+
if (typeof ref === "object" && ref !== null && "current" in ref) {
|
|
352
|
+
return (_a = ref.current) == null ? void 0 : _a.contains(e.target);
|
|
353
|
+
}
|
|
354
|
+
return false;
|
|
355
|
+
})) {
|
|
356
|
+
setIsOpen(false);
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
document.addEventListener("mousedown", clickOutsideHandler.current);
|
|
360
|
+
}
|
|
361
|
+
return () => {
|
|
362
|
+
if (clickOutsideHandler.current) {
|
|
363
|
+
document.removeEventListener("mousedown", clickOutsideHandler.current);
|
|
364
|
+
clickOutsideHandler.current = null;
|
|
365
|
+
}
|
|
366
|
+
if (hoverCloseTimeout.current) {
|
|
367
|
+
clearTimeout(hoverCloseTimeout.current);
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
}, [isOpen, refs.reference, refs.floating, props.isClickOutside, props.isDisabled, props.refsExcludeClickOutside]);
|
|
371
|
+
useEffect(() => {
|
|
372
|
+
if (!isOpen || !props.isFloatingHover || !refs.reference.current || !refs.floating.current || props.isDisabled)
|
|
373
|
+
return;
|
|
374
|
+
const refEl = refs.reference.current;
|
|
375
|
+
const floatingEl = refs.floating.current;
|
|
376
|
+
const handleMouseMove = (e) => {
|
|
377
|
+
const mouseX = e.clientX;
|
|
378
|
+
const mouseY = e.clientY;
|
|
379
|
+
const refRect = refEl.getBoundingClientRect();
|
|
380
|
+
const floatingRect = floatingEl.getBoundingClientRect();
|
|
381
|
+
const isInsideRef = mouseX >= refRect.left - hoverOffset && mouseX <= refRect.right + hoverOffset && mouseY >= refRect.top - hoverOffset && mouseY <= refRect.bottom + hoverOffset;
|
|
382
|
+
const isInsideFloating = mouseX >= floatingRect.left - hoverOffset && mouseX <= floatingRect.right + hoverOffset && mouseY >= floatingRect.top - hoverOffset && mouseY <= floatingRect.bottom + hoverOffset;
|
|
383
|
+
if (isInsideRef || isInsideFloating) {
|
|
384
|
+
if (hoverCloseTimeout.current) {
|
|
385
|
+
clearTimeout(hoverCloseTimeout.current);
|
|
386
|
+
hoverCloseTimeout.current = null;
|
|
387
|
+
}
|
|
388
|
+
} else {
|
|
389
|
+
if (hoverCloseTimeout.current) clearTimeout(hoverCloseTimeout.current);
|
|
390
|
+
hoverCloseTimeout.current = setTimeout(() => setIsOpen(false), hoverCloseDelay);
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
394
|
+
return () => {
|
|
395
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
396
|
+
if (hoverCloseTimeout.current) {
|
|
397
|
+
clearTimeout(hoverCloseTimeout.current);
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
}, [isOpen, props.isFloatingHover, refs.reference, refs.floating, hoverOffset, hoverCloseDelay, props.isDisabled]);
|
|
401
|
+
useLayoutEffect(() => {
|
|
402
|
+
if (!props.isWidthAsContent || !refs.reference.current) return;
|
|
403
|
+
const rect = refs.reference.current.getBoundingClientRect();
|
|
404
|
+
setMinWidth(rect.width);
|
|
405
|
+
}, [props.isWidthAsContent, refs.reference]);
|
|
406
|
+
const open = useCallback(() => {
|
|
407
|
+
if (props.isDisabled) return;
|
|
408
|
+
setIsOpen(true);
|
|
409
|
+
}, [props.isDisabled]);
|
|
410
|
+
const close = useCallback(() => {
|
|
411
|
+
if (props.isDisabled) return;
|
|
412
|
+
setIsOpen(false);
|
|
413
|
+
}, [props.isDisabled]);
|
|
414
|
+
const toggle = useCallback(() => {
|
|
415
|
+
if (props.isDisabled) return;
|
|
416
|
+
setIsOpen((prev) => !prev);
|
|
417
|
+
}, [props.isDisabled]);
|
|
418
|
+
const combinedStyles = useMemo(() => {
|
|
419
|
+
return {
|
|
420
|
+
...floatingStyles,
|
|
421
|
+
minWidth: props.isWidthAsContent && minWidth ? `${minWidth}px` : void 0,
|
|
422
|
+
maxWidth: props.isWidthAsContent && minWidth ? `${minWidth}px` : void 0
|
|
423
|
+
};
|
|
424
|
+
}, [floatingStyles, props.isWidthAsContent, minWidth]);
|
|
425
|
+
useEffect(() => {
|
|
426
|
+
if (isOpen) {
|
|
427
|
+
onFocus == null ? void 0 : onFocus();
|
|
428
|
+
setWasEverOpen(true);
|
|
429
|
+
}
|
|
430
|
+
}, [isOpen, onFocus]);
|
|
431
|
+
useEffect(() => {
|
|
432
|
+
if (!isOpen && wasEverOpen) {
|
|
433
|
+
onBlur == null ? void 0 : onBlur();
|
|
434
|
+
}
|
|
435
|
+
}, [isOpen, wasEverOpen, onBlur]);
|
|
436
|
+
useEffect(() => {
|
|
437
|
+
if (!isOpen || props.isDisabled) return;
|
|
438
|
+
const handleFocusIn = (e) => {
|
|
439
|
+
const refEl = refs.reference.current;
|
|
440
|
+
const floatingEl = refs.floating.current;
|
|
441
|
+
const otherRefs = props.refsExcludeClickOutside || [];
|
|
442
|
+
const isInside = refEl instanceof HTMLElement && refEl.contains(e.target) || floatingEl instanceof HTMLElement && floatingEl.contains(e.target) || otherRefs.some((ref) => {
|
|
443
|
+
if (ref && "current" in ref && ref.current && ref.current instanceof HTMLElement) {
|
|
444
|
+
return ref.current.contains(e.target);
|
|
445
|
+
}
|
|
446
|
+
return false;
|
|
447
|
+
});
|
|
448
|
+
if (!isInside) {
|
|
449
|
+
setIsOpen(false);
|
|
450
|
+
}
|
|
451
|
+
};
|
|
452
|
+
document.addEventListener("focusin", handleFocusIn);
|
|
453
|
+
return () => {
|
|
454
|
+
document.removeEventListener("focusin", handleFocusIn);
|
|
455
|
+
};
|
|
456
|
+
}, [isOpen, refs.reference, refs.floating, props.refsExcludeClickOutside, props.isDisabled]);
|
|
457
|
+
useEffect(() => {
|
|
458
|
+
if (!refs.reference.current || props.isDisabled || !onBlurReference) return;
|
|
459
|
+
const refEl = refs.reference.current;
|
|
460
|
+
const otherRefs = props.refsExcludeBlur || [];
|
|
461
|
+
const handleBlur = (e) => {
|
|
462
|
+
if (refEl instanceof HTMLElement && !refEl.contains(e.relatedTarget) && !otherRefs.some((ref) => {
|
|
463
|
+
if (ref && "current" in ref && ref.current && ref.current instanceof HTMLElement)
|
|
464
|
+
return ref.current.contains(e.relatedTarget);
|
|
465
|
+
})) {
|
|
466
|
+
onBlurReference();
|
|
467
|
+
}
|
|
468
|
+
};
|
|
469
|
+
if (refEl instanceof HTMLElement) refEl.addEventListener("blur", handleBlur, true);
|
|
470
|
+
return () => {
|
|
471
|
+
if (refEl instanceof HTMLElement) refEl.removeEventListener("blur", handleBlur, true);
|
|
472
|
+
};
|
|
473
|
+
}, [refs.reference, props.isDisabled, onBlurReference, props.refsExcludeBlur]);
|
|
474
|
+
const getIsInside = useCallback(
|
|
475
|
+
(target) => {
|
|
476
|
+
if (!target) return false;
|
|
477
|
+
const refEl = refs.reference.current;
|
|
478
|
+
const floatingEl = refs.floating.current;
|
|
479
|
+
const otherRefs = props.refsExcludeBlur || [];
|
|
480
|
+
return refEl instanceof HTMLElement && refEl.contains(target) || floatingEl instanceof HTMLElement && floatingEl.contains(target) || otherRefs.some((ref) => {
|
|
481
|
+
if (ref && "current" in ref && ref.current && ref.current instanceof HTMLElement) {
|
|
482
|
+
return ref.current.contains(target);
|
|
483
|
+
}
|
|
484
|
+
return false;
|
|
485
|
+
});
|
|
486
|
+
},
|
|
487
|
+
[refs.reference, refs.floating, props.refsExcludeBlur]
|
|
488
|
+
);
|
|
489
|
+
return {
|
|
490
|
+
getIsInside,
|
|
491
|
+
isOpen,
|
|
492
|
+
setIsOpen,
|
|
493
|
+
open,
|
|
494
|
+
close,
|
|
495
|
+
toggle,
|
|
496
|
+
refReference: refs.setReference,
|
|
497
|
+
refFloating: refs.setFloating,
|
|
498
|
+
floatingStyles: combinedStyles,
|
|
499
|
+
placement: actualPlacement
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
const addPopoverGenre = css`
|
|
503
|
+
${(props) => css`
|
|
504
|
+
background: ${props.theme.colors.button[props.$genre].background.rest};
|
|
505
|
+
border-color: ${props.theme.colors.button[props.$genre].border.rest};
|
|
506
|
+
color: ${props.theme.colors.button[props.$genre].color.rest};
|
|
507
|
+
/* box-shadow: ${props.theme.effects.button}; */
|
|
508
|
+
`};
|
|
509
|
+
`;
|
|
510
|
+
const addPopoverSize = css`
|
|
511
|
+
${(props) => addPopoverSizeConstructor({
|
|
512
|
+
...KEY_SIZE_DATA[props.$size ?? "medium"]
|
|
513
|
+
})};
|
|
514
|
+
`;
|
|
515
|
+
const addPopoverSizeConstructor = (props) => css`
|
|
516
|
+
display: flex;
|
|
517
|
+
border-radius: ${props.radius}px;
|
|
518
|
+
padding: ${props.padding}px;
|
|
519
|
+
gap: ${props.padding - 2}px;
|
|
520
|
+
`;
|
|
521
|
+
const PopoverWrapper = styled(motion.div)`
|
|
522
|
+
max-width: ${(props) => props.$maxWidth || "100%"};
|
|
523
|
+
max-height: ${(props) => props.$maxHeight || "100%"};
|
|
524
|
+
overflow: auto;
|
|
525
|
+
flex-direction: column;
|
|
526
|
+
${addFont};
|
|
527
|
+
${addPopoverSize};
|
|
528
|
+
${addAlwaysOutline};
|
|
529
|
+
${addSXTypography};
|
|
530
|
+
${addPopoverGenre};
|
|
531
|
+
${addSX};
|
|
532
|
+
`;
|
|
533
|
+
const DEFAULT_POPOVER_OFFSET = 8;
|
|
534
|
+
const DEFAULT_POPOVER_CLOSE_DELAY = 100;
|
|
535
|
+
const TooltipContainer = styled(Stack)`
|
|
536
|
+
display: flex;
|
|
537
|
+
width: fit-content;
|
|
538
|
+
height: fit-content;
|
|
539
|
+
`;
|
|
540
|
+
const addTooltipBoxSize = css`
|
|
541
|
+
${(props) => addTooltipBoxSizeConstructor({
|
|
542
|
+
...KEY_SIZE_DATA[props.size ?? "medium"]
|
|
543
|
+
})};
|
|
544
|
+
`;
|
|
545
|
+
const addTooltipBoxSizeConstructor = (props) => css`
|
|
546
|
+
gap: 0px;
|
|
547
|
+
padding: ${props.padding}px ${props.padding}px 0px ${props.padding}px;
|
|
548
|
+
:after {
|
|
549
|
+
content: '';
|
|
550
|
+
display: block;
|
|
551
|
+
height: ${props.padding}px;
|
|
552
|
+
width: 100%;
|
|
553
|
+
}
|
|
554
|
+
`;
|
|
555
|
+
const TooltipBox = styled(Popover)`
|
|
556
|
+
${addTooltipBoxSize};
|
|
557
|
+
`;
|
|
558
|
+
const Tooltip = memo((props) => {
|
|
559
|
+
if (props.isDisabled) return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: props.children });
|
|
560
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { ...props });
|
|
561
|
+
});
|
|
562
|
+
const TooltipContent = (props) => {
|
|
563
|
+
const { isOpen, refReference, refFloating, floatingStyles } = usePopover({
|
|
564
|
+
placement: props.placement ?? DEFAULT_TOOLTIP_PLACEMENT_FALLBACK,
|
|
565
|
+
offset: props.offset ?? DEFAULT_TOOLTIP_OFFSET_FALLBACK,
|
|
566
|
+
mode: props.mode ?? "hover",
|
|
567
|
+
isClickOutside: props.isClickOutside ?? true,
|
|
568
|
+
isFloatingHover: props.isFloatingHover ?? true,
|
|
569
|
+
isWidthAsContent: props.isWidthAsContent ?? false,
|
|
570
|
+
hoverCloseDelay: props.hoverCloseDelay ?? void 0,
|
|
571
|
+
hoverOffset: props.hoverOffset ?? void 0
|
|
572
|
+
});
|
|
573
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
574
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContainer, { sx: props.sx, ref: refReference, children: props.children }),
|
|
575
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
576
|
+
TooltipBox,
|
|
577
|
+
{
|
|
578
|
+
size: props.size,
|
|
579
|
+
isOpen,
|
|
580
|
+
genre: props.genre,
|
|
581
|
+
floatingStyles,
|
|
582
|
+
ref: refFloating,
|
|
583
|
+
maxHeight: props.maxHeight,
|
|
584
|
+
maxWidth: props.maxWidth,
|
|
585
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
586
|
+
Typography,
|
|
587
|
+
{
|
|
588
|
+
sx: props.sxTypography ?? {
|
|
589
|
+
default: {
|
|
590
|
+
size: 14
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
children: props.content
|
|
594
|
+
}
|
|
595
|
+
)
|
|
596
|
+
}
|
|
597
|
+
)
|
|
598
|
+
] });
|
|
599
|
+
};
|
|
600
|
+
Tooltip.displayName = "Tooltip";
|
|
601
|
+
const DEFAULT_TOOLTIP_PLACEMENT_FALLBACK = "bottom-start";
|
|
602
|
+
const DEFAULT_TOOLTIP_OFFSET_FALLBACK = 8;
|
|
603
|
+
const TypographyWithRef = (props) => {
|
|
604
|
+
const { screenActual } = useScreenWidth();
|
|
605
|
+
const cssProps = useMemo(
|
|
606
|
+
() => ({
|
|
607
|
+
$sxTypography: props.sx,
|
|
608
|
+
style: props.style,
|
|
609
|
+
className: props.className,
|
|
610
|
+
$sx: props.sxStandard,
|
|
611
|
+
$isDisabledOutline: props.isDisabledOutline,
|
|
612
|
+
$isOutlineBoxShadow: props.isOutlineBoxShadow,
|
|
613
|
+
$isReadOnly: props.isReadOnly,
|
|
614
|
+
onClick: props.onClick ? props.onClick : () => {
|
|
615
|
+
}
|
|
616
|
+
}),
|
|
617
|
+
[
|
|
618
|
+
props.sx,
|
|
619
|
+
props.style,
|
|
620
|
+
props.className,
|
|
621
|
+
props.sxStandard,
|
|
622
|
+
props.onClick,
|
|
623
|
+
props.isDisabledOutline,
|
|
624
|
+
props.isOutlineBoxShadow,
|
|
625
|
+
props.isReadOnly
|
|
626
|
+
]
|
|
627
|
+
);
|
|
628
|
+
const screenSX = useMemo(() => {
|
|
629
|
+
var _a, _b;
|
|
630
|
+
return ((_a = props.sx) == null ? void 0 : _a[screenActual]) ?? ((_b = props.sx) == null ? void 0 : _b.default);
|
|
631
|
+
}, [props.sx, screenActual]);
|
|
632
|
+
if (screenSX && "variant" in screenSX) {
|
|
633
|
+
if (screenSX.variant === "h7" || screenSX.variant === "h8" || screenSX.variant === "h9") {
|
|
634
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
635
|
+
Title,
|
|
636
|
+
{
|
|
637
|
+
ref: props.ref,
|
|
638
|
+
as: props.isAnchor ? "a" : props.isParagraph ? "p" : props.isSpan ? "span" : "span",
|
|
639
|
+
href: props.href,
|
|
640
|
+
...cssProps,
|
|
641
|
+
children: props.children
|
|
642
|
+
}
|
|
643
|
+
);
|
|
644
|
+
} else {
|
|
645
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
646
|
+
Title,
|
|
647
|
+
{
|
|
648
|
+
ref: props.ref,
|
|
649
|
+
as: props.isAnchor ? "a" : props.isParagraph ? "p" : props.isSpan ? "span" : screenSX.variant,
|
|
650
|
+
href: props.href,
|
|
651
|
+
...cssProps,
|
|
652
|
+
children: props.children
|
|
653
|
+
}
|
|
654
|
+
);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
658
|
+
Title,
|
|
659
|
+
{
|
|
660
|
+
ref: props.ref,
|
|
661
|
+
as: props.isAnchor ? "a" : props.isParagraph ? "p" : props.isSpan ? "span" : "span",
|
|
662
|
+
href: props.href,
|
|
663
|
+
...cssProps,
|
|
664
|
+
children: props.children
|
|
665
|
+
}
|
|
666
|
+
);
|
|
667
|
+
};
|
|
668
|
+
const Typography = (props) => {
|
|
669
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyWithRef, { ...props });
|
|
670
|
+
};
|
|
671
|
+
const TypographySizeIsAnchor = (props) => {
|
|
672
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyWithRef, { isAnchor: true, ...props, ref: props.ref, href: props.href });
|
|
673
|
+
};
|
|
674
|
+
const TypographyLink = createLink(TypographySizeIsAnchor);
|
|
675
|
+
const TypographyTooltip = memo((props) => {
|
|
676
|
+
const [isOverflowing, setIsOverflowing] = useState(false);
|
|
677
|
+
const contentRef = useRef(null);
|
|
678
|
+
useEffect(() => {
|
|
679
|
+
const checkOverflow = () => {
|
|
680
|
+
if (contentRef.current) {
|
|
681
|
+
setIsOverflowing(contentRef.current.scrollWidth > contentRef.current.clientWidth);
|
|
682
|
+
}
|
|
683
|
+
};
|
|
684
|
+
checkOverflow();
|
|
685
|
+
window.addEventListener("resize", checkOverflow);
|
|
686
|
+
return () => window.removeEventListener("resize", checkOverflow);
|
|
687
|
+
}, [props.children]);
|
|
688
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { isDisabled: !isOverflowing, content: props.children, ...props.tooltip, children: /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyWithRef, { ref: contentRef, ...props.typography, style: { position: "relative" }, children: props.children }) });
|
|
689
|
+
});
|
|
690
|
+
TypographyTooltip.displayName = "TypographyTooltip";
|
|
691
|
+
TypographyWithRef.displayName = "TypographyWithRef";
|
|
692
|
+
TypographySizeIsAnchor.displayName = "TypographySizeIsAnchor";
|
|
693
|
+
export {
|
|
694
|
+
DEFAULT_TOOLTIP_PLACEMENT_FALLBACK as D,
|
|
695
|
+
Popover as P,
|
|
696
|
+
TooltipContainer as T,
|
|
697
|
+
addTooltipBoxSize as a,
|
|
698
|
+
addTooltipBoxSizeConstructor as b,
|
|
699
|
+
TooltipBox as c,
|
|
700
|
+
Tooltip as d,
|
|
701
|
+
TooltipContent as e,
|
|
702
|
+
DEFAULT_TOOLTIP_OFFSET_FALLBACK as f,
|
|
703
|
+
addSXTypography as g,
|
|
704
|
+
Title as h,
|
|
705
|
+
Typography as i,
|
|
706
|
+
TypographyLink as j,
|
|
707
|
+
TypographyTooltip as k,
|
|
708
|
+
usePopover as u
|
|
709
|
+
};
|
|
710
|
+
//# sourceMappingURL=component-GtWqnaqk.js.map
|