@jenesei-software/jenesei-kit-react 1.3.8 → 1.3.10
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/README.md +0 -20
- package/build/{area-CH6c_n7-.js → area-BYuHpaUX.js} +2 -2
- package/build/{area-CH6c_n7-.js.map → area-BYuHpaUX.js.map} +1 -1
- package/build/{area-AbheP_ot.cjs → area-C6XuN6wk.cjs} +2 -2
- package/build/{area-AbheP_ot.cjs.map → area-C6XuN6wk.cjs.map} +1 -1
- package/build/{area-CFZW3T1g.js → area-CkM4ZN2F.js} +2 -2
- package/build/{area-CFZW3T1g.js.map → area-CkM4ZN2F.js.map} +1 -1
- package/build/{area-C3wR_pPr.cjs → area-oZm7ewxw.cjs} +2 -2
- package/build/{area-C3wR_pPr.cjs.map → area-oZm7ewxw.cjs.map} +1 -1
- package/build/area-preview.cjs.js +1 -1
- package/build/area-preview.es.js +1 -1
- package/build/area-skeleton.cjs.js +1 -1
- package/build/area-skeleton.es.js +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-B1bvPlyB.cjs +90 -0
- package/build/component-B1bvPlyB.cjs.map +1 -0
- package/build/{component-DfqhPd0e.cjs → component-BYox4gmt.cjs} +2 -2
- package/build/{component-DfqhPd0e.cjs.map → component-BYox4gmt.cjs.map} +1 -1
- package/build/component-C67KboOB.cjs +245 -0
- package/build/component-C67KboOB.cjs.map +1 -0
- package/build/{component-D7A-4DNQ.cjs → component-CLqcB5mM.cjs} +2 -2
- package/build/component-CLqcB5mM.cjs.map +1 -0
- package/build/{component-BuxekWox.cjs → component-CY7lfJVv.cjs} +2 -2
- package/build/{component-BuxekWox.cjs.map → component-CY7lfJVv.cjs.map} +1 -1
- package/build/{component-BFhXrZ3a.js → component-CvW0MIM8.js} +3 -3
- package/build/{component-BFhXrZ3a.js.map → component-CvW0MIM8.js.map} +1 -1
- package/build/{component-vpCWcIhC.js → component-DHM9pbab.js} +3 -3
- package/build/component-DHM9pbab.js.map +1 -0
- package/build/{component-CmotrA_9.js → component-DJYgewYg.js} +32 -11
- package/build/component-DJYgewYg.js.map +1 -0
- package/build/component-DKMsOpqH.js +710 -0
- package/build/component-DKMsOpqH.js.map +1 -0
- package/build/{component-D8qbXvM4.js → component-DaXKDHnc.js} +48 -7
- package/build/component-DaXKDHnc.js.map +1 -0
- package/build/{component-BvLPfi2B.js → component-WUYE2soZ.js} +2 -2
- package/build/{component-BvLPfi2B.js.map → component-WUYE2soZ.js.map} +1 -1
- 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 +40 -7
- package/build/component-button-group.es.js +1 -1
- package/build/component-button.cjs.js +1 -1
- package/build/component-button.d.ts +43 -8
- package/build/component-button.es.js +1 -1
- package/build/component-checkbox-group.cjs.js +1 -1
- package/build/component-checkbox-group.d.ts +39 -9
- package/build/component-checkbox-group.es.js +1 -1
- package/build/component-checkbox.cjs.js +1 -1
- package/build/component-checkbox.d.ts +41 -9
- package/build/component-checkbox.es.js +1 -1
- package/build/component-date-picker.cjs.js +1 -1
- package/build/component-date-picker.d.ts +57 -43
- package/build/component-date-picker.es.js +1 -1
- package/build/component-icon.cjs.js +1 -1
- package/build/component-icon.d.ts +16 -3
- package/build/component-icon.es.js +3 -2
- package/build/component-image-button.cjs.js +1 -1
- package/build/component-image-button.d.ts +40 -7
- 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 +40 -7
- 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 +52 -6
- package/build/component-input-otp.es.js +1 -1
- package/build/component-input.cjs.js +1 -1
- package/build/component-input.d.ts +63 -15
- package/build/component-input.es.js +2 -2
- package/build/component-map.cjs.js +1 -1
- package/build/component-map.d.ts +11 -12
- package/build/component-map.es.js +2 -2
- package/build/component-pagination.cjs.js +1 -1
- package/build/component-pagination.d.ts +40 -7
- package/build/component-pagination.es.js +1 -1
- package/build/component-range.cjs.js +1 -1
- package/build/component-range.d.ts +51 -5
- package/build/component-range.es.js +1 -1
- package/build/component-ripple.cjs.js +1 -1
- package/build/component-ripple.es.js +1 -1
- package/build/component-select.cjs.js +1 -1
- package/build/component-select.d.ts +51 -10
- package/build/component-select.es.js +1 -1
- package/build/component-separator.d.ts +1 -1
- package/build/component-textarea.cjs.js +1 -1
- package/build/component-textarea.d.ts +51 -8
- package/build/component-textarea.es.js +1 -1
- package/build/component-toggle.cjs.js +1 -1
- package/build/component-toggle.d.ts +52 -3
- package/build/component-toggle.es.js +1 -1
- package/build/component-tooltip.cjs.js +1 -1
- package/build/component-tooltip.d.ts +18 -6
- package/build/component-tooltip.es.js +1 -1
- package/build/component-typography.cjs.js +1 -1
- package/build/component-typography.d.ts +31 -17
- package/build/component-typography.es.js +7 -6
- package/build/component-typography.es.js.map +1 -1
- package/build/{component.components-BWWKHxKD.cjs → component.components-CeKyOsDE.cjs} +3 -3
- package/build/component.components-CeKyOsDE.cjs.map +1 -0
- package/build/{component.components-BPIVZi-R.js → component.components-f-tFdB6f.js} +26 -18
- package/build/component.components-f-tFdB6f.js.map +1 -0
- package/build/{component.constants-DyKCJRH3.cjs → component.constants-B9xzGc3A.cjs} +2 -2
- package/build/{component.constants-DyKCJRH3.cjs.map → component.constants-B9xzGc3A.cjs.map} +1 -1
- package/build/{component.constants-CmQuESzl.js → component.constants-BrJrCmlA.js} +2 -2
- package/build/{component.constants-CmQuESzl.js.map → component.constants-BrJrCmlA.js.map} +1 -1
- package/build/{component.constants-D8QVKsqc.cjs → component.constants-DRPyaSU8.cjs} +3 -3
- package/build/{component.constants-D8QVKsqc.cjs.map → component.constants-DRPyaSU8.cjs.map} +1 -1
- package/build/{component.constants-Dtw4932G.js → component.constants-amkB3VHg.js} +7 -7
- package/build/{component.constants-Dtw4932G.js.map → component.constants-amkB3VHg.js.map} +1 -1
- 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-CQbSHrL_.js → component.styles--PEjCgcA.js} +51 -23
- package/build/component.styles--PEjCgcA.js.map +1 -0
- package/build/{component.styles-DoUBnv1C.js → component.styles-B0FFHGeN.js} +26 -20
- package/build/component.styles-B0FFHGeN.js.map +1 -0
- package/build/{component.styles-ClU_KFe9.js → component.styles-BDKsgd6y.js} +32 -19
- package/build/component.styles-BDKsgd6y.js.map +1 -0
- package/build/{component.styles-BMJamWba.cjs → component.styles-BELwxHxh.cjs} +7 -7
- package/build/component.styles-BELwxHxh.cjs.map +1 -0
- package/build/{component.styles-usmYNSi8.js → component.styles-BGYbrzvh.js} +2 -2
- package/build/{component.styles-usmYNSi8.js.map → component.styles-BGYbrzvh.js.map} +1 -1
- package/build/component.styles-BKnUDWqO.cjs +22 -0
- package/build/component.styles-BKnUDWqO.cjs.map +1 -0
- package/build/{component.styles-DLU0S0KI.cjs → component.styles-BTsmbWT6.cjs} +2 -2
- package/build/{component.styles-DLU0S0KI.cjs.map → component.styles-BTsmbWT6.cjs.map} +1 -1
- package/build/{component.styles-CMXsg9Uj.js → component.styles-BbwS_Ekx.js} +9 -10
- package/build/{component.styles-CMXsg9Uj.js.map → component.styles-BbwS_Ekx.js.map} +1 -1
- package/build/component.styles-BeRVOt5T.cjs +137 -0
- package/build/{component.styles-DETkOSnM.cjs.map → component.styles-BeRVOt5T.cjs.map} +1 -1
- package/build/component.styles-BpvpyZax.cjs +73 -0
- package/build/component.styles-BpvpyZax.cjs.map +1 -0
- package/build/{component.styles-BirbSbuD.js → component.styles-CPWNnqqm.js} +3 -3
- package/build/{component.styles-BirbSbuD.js.map → component.styles-CPWNnqqm.js.map} +1 -1
- package/build/component.styles-CsB9986a.cjs +99 -0
- package/build/component.styles-CsB9986a.cjs.map +1 -0
- package/build/{component.styles-CKArb78Q.js → component.styles-DARNjy9P.js} +33 -12
- package/build/component.styles-DARNjy9P.js.map +1 -0
- package/build/{component.styles-BfzC8j7O.js → component.styles-DOnQEUrI.js} +20 -9
- package/build/{component.styles-BfzC8j7O.js.map → component.styles-DOnQEUrI.js.map} +1 -1
- package/build/{component.styles-DYAuT7U2.js → component.styles-DS0ofW1Y.js} +41 -14
- package/build/component.styles-DS0ofW1Y.js.map +1 -0
- package/build/component.styles-DWGUgUoF.cjs +21 -0
- package/build/component.styles-DWGUgUoF.cjs.map +1 -0
- package/build/{component.styles-DkL2qYQQ.js → component.styles-DjoG6jr2.js} +3 -3
- package/build/{component.styles-DkL2qYQQ.js.map → component.styles-DjoG6jr2.js.map} +1 -1
- package/build/{component.styles-R92hjRRA.cjs → component.styles-Dpo373cZ.cjs} +2 -2
- package/build/{component.styles-R92hjRRA.cjs.map → component.styles-Dpo373cZ.cjs.map} +1 -1
- package/build/{component.styles-BHBTNQ8p.js → component.styles-VrNFgg1_.js} +32 -12
- package/build/component.styles-VrNFgg1_.js.map +1 -0
- package/build/{component.styles-b_DLfQqU.cjs → component.styles-ZU_GyVub.cjs} +2 -2
- package/build/{component.styles-b_DLfQqU.cjs.map → component.styles-ZU_GyVub.cjs.map} +1 -1
- package/build/component.styles-gZHy-64x.cjs +13 -0
- package/build/component.styles-gZHy-64x.cjs.map +1 -0
- package/build/{component.styles-CKLd9UoP.cjs → component.styles-iHE8mmya.cjs} +7 -7
- package/build/{component.styles-CKLd9UoP.cjs.map → component.styles-iHE8mmya.cjs.map} +1 -1
- package/build/component.styles-mhkAuWyU.cjs +225 -0
- package/build/component.styles-mhkAuWyU.cjs.map +1 -0
- package/build/component.styles-nl99kkS3.js +94 -0
- package/build/component.styles-nl99kkS3.js.map +1 -0
- package/build/{component.types-D05KdxnZ.js → component.types-BBQ18Npa.js} +14 -3
- package/build/component.types-BBQ18Npa.js.map +1 -0
- package/build/{component.types-D2nk9HlK.js → component.types-CSnoBg2y.js} +95 -68
- package/build/component.types-CSnoBg2y.js.map +1 -0
- package/build/component.types-CWp0NPUN.cjs +171 -0
- package/build/component.types-CWp0NPUN.cjs.map +1 -0
- package/build/{component.types-gy5Q9qHX.cjs → component.types-DraGq1j_.cjs} +2 -2
- package/build/component.types-DraGq1j_.cjs.map +1 -0
- package/build/consts.cjs.js +1 -1
- package/build/consts.cjs.js.map +1 -1
- package/build/consts.d.ts +1 -1
- package/build/consts.es.js +1 -1
- package/build/consts.es.js.map +1 -1
- package/build/context-app.cjs.js +1 -1
- package/build/context-app.d.ts +1 -1
- package/build/context-app.es.js +1 -1
- package/build/context-dialog.cjs.js +1 -1
- package/build/context-dialog.d.ts +12 -5
- package/build/context-dialog.es.js +1 -1
- package/build/context-sonner.cjs.js +1 -1
- package/build/context-sonner.d.ts +47 -11
- package/build/context-sonner.es.js +1 -1
- package/build/context.constants-ByXsACU7.cjs +32 -0
- package/build/context.constants-ByXsACU7.cjs.map +1 -0
- package/build/context.constants-CTr1U0kI.cjs +98 -0
- package/build/context.constants-CTr1U0kI.cjs.map +1 -0
- package/build/{context.constants-B9Yk6CGe.js → context.constants-CvkvB0XC.js} +8 -5
- package/build/context.constants-CvkvB0XC.js.map +1 -0
- package/build/{context.constants-4kkNHBzR.js → context.constants-DRimaVcG.js} +26 -9
- package/build/context.constants-DRimaVcG.js.map +1 -0
- package/build/{context.hooks-DGmZRxkb.cjs → context.hooks-DOygH-Yj.cjs} +3 -3
- package/build/{context.hooks-DGmZRxkb.cjs.map → context.hooks-DOygH-Yj.cjs.map} +1 -1
- package/build/{context.hooks-Cfr2Mp8e.js → context.hooks-kga1DMrX.js} +4 -4
- package/build/{context.hooks-Cfr2Mp8e.js.map → context.hooks-kga1DMrX.js.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-Bwu-fBEh.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 +120 -110
- package/build/index.es.js +67 -64
- package/build/index.es.js.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 +42 -1
- 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 +7 -6
- package/build/style-theme.es.js +1 -1
- package/build/{style-CQOBaUTO.js → style-uVTmdhsH.js} +14 -5
- package/build/style-uVTmdhsH.js.map +1 -0
- package/build/{theme.global-DuEXPcSK.js → theme.global-BgERDJ4e.js} +105 -1
- package/build/theme.global-BgERDJ4e.js.map +1 -0
- package/build/theme.global-CcoD5bPP.cjs +173 -0
- package/build/theme.global-CcoD5bPP.cjs.map +1 -0
- package/build/{use-BsyZ6-h6.js → use-DLVWi2kS.js} +6 -6
- package/build/{use-BsyZ6-h6.js.map → use-DLVWi2kS.js.map} +1 -1
- package/build/{use-D0mgQexh.cjs → use-Dg449cuf.cjs} +2 -2
- package/build/{use-D0mgQexh.cjs.map → use-Dg449cuf.cjs.map} +1 -1
- package/package.json +2 -1
- package/build/component-Bwu-fBEh.js.map +0 -1
- package/build/component-CMkU2lIg.cjs +0 -90
- package/build/component-CMkU2lIg.cjs.map +0 -1
- package/build/component-CeWNemV1.cjs +0 -251
- package/build/component-CeWNemV1.cjs.map +0 -1
- package/build/component-CmotrA_9.js.map +0 -1
- package/build/component-D7A-4DNQ.cjs.map +0 -1
- package/build/component-D8qbXvM4.js.map +0 -1
- package/build/component-DUUxsxY6.cjs +0 -2
- package/build/component-DUUxsxY6.cjs.map +0 -1
- package/build/component-vpCWcIhC.js.map +0 -1
- package/build/component.components-BPIVZi-R.js.map +0 -1
- package/build/component.components-BWWKHxKD.cjs.map +0 -1
- package/build/component.styles-B294m7QY.cjs +0 -99
- package/build/component.styles-B294m7QY.cjs.map +0 -1
- package/build/component.styles-B5kjhqh4.cjs +0 -225
- package/build/component.styles-B5kjhqh4.cjs.map +0 -1
- package/build/component.styles-BHBTNQ8p.js.map +0 -1
- package/build/component.styles-BMJamWba.cjs.map +0 -1
- package/build/component.styles-C-mr1A0b.cjs +0 -73
- package/build/component.styles-C-mr1A0b.cjs.map +0 -1
- package/build/component.styles-CKArb78Q.js.map +0 -1
- package/build/component.styles-CQbSHrL_.js.map +0 -1
- package/build/component.styles-CS_lQRm0.cjs +0 -21
- package/build/component.styles-CS_lQRm0.cjs.map +0 -1
- package/build/component.styles-CbkvPvEl.cjs +0 -22
- package/build/component.styles-CbkvPvEl.cjs.map +0 -1
- package/build/component.styles-ClU_KFe9.js.map +0 -1
- package/build/component.styles-DETkOSnM.cjs +0 -137
- package/build/component.styles-DYAuT7U2.js.map +0 -1
- package/build/component.styles-DoUBnv1C.js.map +0 -1
- package/build/component.styles-DyTB01CW.js +0 -71
- package/build/component.styles-DyTB01CW.js.map +0 -1
- package/build/component.styles-l0Dr5zHf.cjs +0 -13
- package/build/component.styles-l0Dr5zHf.cjs.map +0 -1
- package/build/component.types-D05KdxnZ.js.map +0 -1
- package/build/component.types-D2nk9HlK.js.map +0 -1
- package/build/component.types-DoUkmzRs.cjs +0 -174
- package/build/component.types-DoUkmzRs.cjs.map +0 -1
- package/build/component.types-gy5Q9qHX.cjs.map +0 -1
- package/build/context.constants-4kkNHBzR.js.map +0 -1
- package/build/context.constants-B9Yk6CGe.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-DKCD80Pp.cjs +0 -100
- package/build/context.constants-DKCD80Pp.cjs.map +0 -1
- package/build/style-BVejuajH.cjs +0 -32
- package/build/style-BVejuajH.cjs.map +0 -1
- package/build/style-BgcnmVAY.js.map +0 -1
- package/build/style-CQOBaUTO.js.map +0 -1
- package/build/style-mc2ST5fY.cjs.map +0 -1
- package/build/theme.global-B9wIU_rF.cjs +0 -173
- package/build/theme.global-B9wIU_rF.cjs.map +0 -1
- package/build/theme.global-DuEXPcSK.js.map +0 -1
|
@@ -1,244 +1,7 @@
|
|
|
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
1
|
import * as React from "react";
|
|
5
|
-
import { useLayoutEffect
|
|
6
|
-
import
|
|
7
|
-
import { J as JeneseiPalette, K as KEY_SIZE_DATA } from "./theme.global-DuEXPcSK.js";
|
|
2
|
+
import { useLayoutEffect } from "react";
|
|
3
|
+
import "./jsx-runtime-BrDlu8eK.js";
|
|
8
4
|
import * as ReactDOM from "react-dom";
|
|
9
|
-
import ReactDOM__default from "react-dom";
|
|
10
|
-
import { AnimatePresence, motion } from "framer-motion";
|
|
11
|
-
import { f as addOutline, h as addAlwaysOutline } from "./style-BgcnmVAY.js";
|
|
12
|
-
import { a as addSX } from "./style-plT9Ah7t.js";
|
|
13
|
-
import { b as Stack } from "./component-jPZYT5iL.js";
|
|
14
|
-
const getFontSizeStyles = (size, weight, family, height) => css`
|
|
15
|
-
font-family: ${family ? family : "inherit"};
|
|
16
|
-
font-style: normal;
|
|
17
|
-
line-height: ${(props) => height ? height : props.theme.font.lineHeight};
|
|
18
|
-
font-size: ${size}px;
|
|
19
|
-
font-weight: ${weight};
|
|
20
|
-
`;
|
|
21
|
-
const shadowPulse = keyframes`
|
|
22
|
-
0% {
|
|
23
|
-
text-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
|
24
|
-
}
|
|
25
|
-
50% {
|
|
26
|
-
text-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5);
|
|
27
|
-
}
|
|
28
|
-
100% {
|
|
29
|
-
text-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
32
|
-
function toStyledCSS(value) {
|
|
33
|
-
return css`
|
|
34
|
-
${value.shadow && value.shadow === "shadowPulse" && css`
|
|
35
|
-
animation: ${shadowPulse} 2s infinite;
|
|
36
|
-
`};
|
|
37
|
-
${value.letterSpacing && css`
|
|
38
|
-
letter-spacing: ${value.letterSpacing};
|
|
39
|
-
`};
|
|
40
|
-
${value.flex && css`
|
|
41
|
-
flex: ${value.flex};
|
|
42
|
-
`};
|
|
43
|
-
${value.cursor && css`
|
|
44
|
-
cursor: ${value.cursor};
|
|
45
|
-
`};
|
|
46
|
-
${value.overflow && css`
|
|
47
|
-
overflow: ${value.overflow};
|
|
48
|
-
`};
|
|
49
|
-
${value.line !== void 0 ? value.line === 1 ? css`
|
|
50
|
-
text-overflow: ellipsis;
|
|
51
|
-
overflow: hidden;
|
|
52
|
-
white-space: nowrap;
|
|
53
|
-
width: -webkit-fill-available;
|
|
54
|
-
max-width: fit-content;
|
|
55
|
-
` : css`
|
|
56
|
-
word-break: break-word;
|
|
57
|
-
white-space: normal;
|
|
58
|
-
text-overflow: ellipsis;
|
|
59
|
-
display: -webkit-box;
|
|
60
|
-
overflow: hidden;
|
|
61
|
-
-webkit-box-orient: vertical;
|
|
62
|
-
-webkit-line-clamp: ${value.line};
|
|
63
|
-
width: fit-content;
|
|
64
|
-
overflow-wrap: anywhere;
|
|
65
|
-
` : css``};
|
|
66
|
-
${value.family && css`
|
|
67
|
-
font-family: ${value.family};
|
|
68
|
-
`};
|
|
69
|
-
${value.weight && css`
|
|
70
|
-
font-weight: ${value.weight};
|
|
71
|
-
`};
|
|
72
|
-
${value.height && css`
|
|
73
|
-
line-height: ${value.height}px;
|
|
74
|
-
`};
|
|
75
|
-
${value.color && css`
|
|
76
|
-
color: ${JeneseiPalette[value.color]};
|
|
77
|
-
`};
|
|
78
|
-
${value.align && css`
|
|
79
|
-
text-align: ${value.align};
|
|
80
|
-
`};
|
|
81
|
-
${value.wrap && css`
|
|
82
|
-
text-wrap: ${value.wrap};
|
|
83
|
-
`};
|
|
84
|
-
${value.decoration && css`
|
|
85
|
-
text-decoration: ${value.decoration};
|
|
86
|
-
`};
|
|
87
|
-
${value.transform && css`
|
|
88
|
-
text-transform: ${value.transform};
|
|
89
|
-
`};
|
|
90
|
-
${value.isHoverUnderlining && css`
|
|
91
|
-
&:hover {
|
|
92
|
-
text-decoration: underline;
|
|
93
|
-
}
|
|
94
|
-
`};
|
|
95
|
-
${value.isNoUserSelect && css`
|
|
96
|
-
user-select: none;
|
|
97
|
-
-webkit-user-select: none;
|
|
98
|
-
-moz-user-select: none;
|
|
99
|
-
-ms-user-select: none;
|
|
100
|
-
`};
|
|
101
|
-
${"size" in value && value.size && css`
|
|
102
|
-
font-size: ${value.size}px;
|
|
103
|
-
`};
|
|
104
|
-
${"variant" in value && value.variant ? value.variant === "h1" ? css`
|
|
105
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h1 * props.theme.font.sizeDefault.default}px;
|
|
106
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
107
|
-
margin: 0;
|
|
108
|
-
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
109
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h1 * props.theme.font.sizeDefault.tablet}px;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
113
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h1 * props.theme.font.sizeDefault.mobile}px;
|
|
114
|
-
}
|
|
115
|
-
` : value.variant === "h2" ? css`
|
|
116
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h2 * props.theme.font.sizeDefault.default}px;
|
|
117
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
118
|
-
margin: 0;
|
|
119
|
-
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
120
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h2 * props.theme.font.sizeDefault.tablet}px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
124
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h2 * props.theme.font.sizeDefault.mobile}px;
|
|
125
|
-
}
|
|
126
|
-
` : value.variant === "h3" ? css`
|
|
127
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h3 * props.theme.font.sizeDefault.default}px;
|
|
128
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
129
|
-
margin: 0;
|
|
130
|
-
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
131
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h3 * props.theme.font.sizeDefault.tablet}px;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
135
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h3 * props.theme.font.sizeDefault.mobile}px;
|
|
136
|
-
}
|
|
137
|
-
` : value.variant === "h4" ? css`
|
|
138
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h4 * props.theme.font.sizeDefault.default}px;
|
|
139
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
140
|
-
margin: 0;
|
|
141
|
-
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
142
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h4 * props.theme.font.sizeDefault.tablet}px;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
146
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h4 * props.theme.font.sizeDefault.mobile}px;
|
|
147
|
-
}
|
|
148
|
-
` : value.variant === "h5" ? css`
|
|
149
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h5 * props.theme.font.sizeDefault.default}px;
|
|
150
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
151
|
-
margin: 0;
|
|
152
|
-
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
153
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h5 * props.theme.font.sizeDefault.tablet}px;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
157
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h5 * props.theme.font.sizeDefault.mobile}px;
|
|
158
|
-
}
|
|
159
|
-
` : value.variant === "h6" ? css`
|
|
160
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h6 * props.theme.font.sizeDefault.default}px;
|
|
161
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
162
|
-
margin: 0;
|
|
163
|
-
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
164
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h6 * props.theme.font.sizeDefault.tablet}px;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
168
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h6 * props.theme.font.sizeDefault.mobile}px;
|
|
169
|
-
}
|
|
170
|
-
` : value.variant === "h7" ? css`
|
|
171
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h7 * props.theme.font.sizeDefault.default}px;
|
|
172
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
173
|
-
margin: 0;
|
|
174
|
-
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
175
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h7 * props.theme.font.sizeDefault.tablet}px;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
179
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h7 * props.theme.font.sizeDefault.mobile}px;
|
|
180
|
-
}
|
|
181
|
-
` : value.variant === "h8" ? css`
|
|
182
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h8 * props.theme.font.sizeDefault.default}px;
|
|
183
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
184
|
-
margin: 0;
|
|
185
|
-
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
186
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h8 * props.theme.font.sizeDefault.tablet}px;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
190
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h8 * props.theme.font.sizeDefault.mobile}px;
|
|
191
|
-
}
|
|
192
|
-
` : value.variant === "h9" ? css`
|
|
193
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h9 * props.theme.font.sizeDefault.default}px;
|
|
194
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
195
|
-
margin: 0;
|
|
196
|
-
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
197
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h9 * props.theme.font.sizeDefault.tablet}px;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
@media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
|
|
201
|
-
font-size: ${(props) => props.theme.font.sizeHeading.h9 * props.theme.font.sizeDefault.mobile}px;
|
|
202
|
-
}
|
|
203
|
-
` : null : null};
|
|
204
|
-
`;
|
|
205
|
-
}
|
|
206
|
-
const addSXTypography = css`
|
|
207
|
-
${(props) => {
|
|
208
|
-
const rawSX = props.$sxTypography;
|
|
209
|
-
if (!rawSX) return null;
|
|
210
|
-
return toStyledCSS(rawSX.default);
|
|
211
|
-
}}
|
|
212
|
-
|
|
213
|
-
${(props) => {
|
|
214
|
-
const rawSX = props.$sxTypography;
|
|
215
|
-
if (!rawSX) return null;
|
|
216
|
-
return Object.entries(rawSX).filter(([key]) => key !== "default").map(([deviceKey, value]) => {
|
|
217
|
-
var _a;
|
|
218
|
-
const screenWidth = (_a = props.theme.screens[deviceKey]) == null ? void 0 : _a.width;
|
|
219
|
-
if (!screenWidth) return null;
|
|
220
|
-
return css`
|
|
221
|
-
@media (max-width: ${screenWidth}px) {
|
|
222
|
-
${toStyledCSS(value)}
|
|
223
|
-
}
|
|
224
|
-
`;
|
|
225
|
-
});
|
|
226
|
-
}}
|
|
227
|
-
`;
|
|
228
|
-
const TypographyCSS = css`
|
|
229
|
-
font-style: normal;
|
|
230
|
-
position: relative;
|
|
231
|
-
overflow: visible;
|
|
232
|
-
text-overflow: ellipsis;
|
|
233
|
-
overflow-wrap: anywhere;
|
|
234
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
235
|
-
${addSXTypography};
|
|
236
|
-
${addSX}
|
|
237
|
-
`;
|
|
238
|
-
const Title = styled.span`
|
|
239
|
-
${TypographyCSS}
|
|
240
|
-
${addOutline}
|
|
241
|
-
`;
|
|
242
5
|
function hasWindow() {
|
|
243
6
|
return typeof window !== "undefined";
|
|
244
7
|
}
|
|
@@ -303,8 +66,8 @@ function isTopLayer(element) {
|
|
|
303
66
|
}
|
|
304
67
|
function isContainingBlock(elementOrCss) {
|
|
305
68
|
const webkit = isWebKit();
|
|
306
|
-
const
|
|
307
|
-
return ["transform", "translate", "scale", "rotate", "perspective"].some((value) =>
|
|
69
|
+
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
70
|
+
return ["transform", "translate", "scale", "rotate", "perspective"].some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((value) => (css.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css.contain || "").includes(value));
|
|
308
71
|
}
|
|
309
72
|
function getContainingBlock(element) {
|
|
310
73
|
let currentNode = getParentNode(element);
|
|
@@ -979,9 +742,9 @@ const shift$2 = function(options) {
|
|
|
979
742
|
};
|
|
980
743
|
};
|
|
981
744
|
function getCssDimensions(element) {
|
|
982
|
-
const
|
|
983
|
-
let width = parseFloat(
|
|
984
|
-
let height = parseFloat(
|
|
745
|
+
const css = getComputedStyle(element);
|
|
746
|
+
let width = parseFloat(css.width) || 0;
|
|
747
|
+
let height = parseFloat(css.height) || 0;
|
|
985
748
|
const hasOffset = isHTMLElement(element);
|
|
986
749
|
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
987
750
|
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
@@ -1075,9 +838,9 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
1075
838
|
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
1076
839
|
const iframeScale = getScale(currentIFrame);
|
|
1077
840
|
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
1078
|
-
const
|
|
1079
|
-
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(
|
|
1080
|
-
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(
|
|
841
|
+
const css = getComputedStyle(currentIFrame);
|
|
842
|
+
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
843
|
+
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
1081
844
|
x *= iframeScale.x;
|
|
1082
845
|
y *= iframeScale.y;
|
|
1083
846
|
width *= iframeScale.x;
|
|
@@ -2044,462 +1807,12 @@ function useFloating(options) {
|
|
|
2044
1807
|
elements
|
|
2045
1808
|
}), [position, refs, elements, context]);
|
|
2046
1809
|
}
|
|
2047
|
-
const Popover = (props) => {
|
|
2048
|
-
return ReactDOM__default.createPortal(
|
|
2049
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(AnimatePresence, { children: props.isOpen && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2050
|
-
"div",
|
|
2051
|
-
{
|
|
2052
|
-
tabIndex: -1,
|
|
2053
|
-
ref: props.ref,
|
|
2054
|
-
style: {
|
|
2055
|
-
position: "absolute",
|
|
2056
|
-
top: 0,
|
|
2057
|
-
left: 0,
|
|
2058
|
-
...props.floatingStyles,
|
|
2059
|
-
transform: props.floatingStyles.transform,
|
|
2060
|
-
zIndex: 9999
|
|
2061
|
-
},
|
|
2062
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2063
|
-
PopoverWrapper,
|
|
2064
|
-
{
|
|
2065
|
-
tabIndex: -1,
|
|
2066
|
-
$isShowAlwaysOutline: props.isShowAlwaysOutline,
|
|
2067
|
-
$genre: props.genre ?? "black",
|
|
2068
|
-
className: props.className,
|
|
2069
|
-
initial: { opacity: 0, scale: 0.95 },
|
|
2070
|
-
animate: { opacity: 1, scale: 1 },
|
|
2071
|
-
exit: { opacity: 0, scale: 0.95 },
|
|
2072
|
-
transition: { duration: 0.2 },
|
|
2073
|
-
$sx: props.sx,
|
|
2074
|
-
$size: props.size,
|
|
2075
|
-
$sxTypography: props.sxTypography,
|
|
2076
|
-
$maxHeight: props.maxHeight,
|
|
2077
|
-
$maxWidth: props.maxWidth,
|
|
2078
|
-
children: props.children
|
|
2079
|
-
}
|
|
2080
|
-
)
|
|
2081
|
-
}
|
|
2082
|
-
) }),
|
|
2083
|
-
document.body
|
|
2084
|
-
);
|
|
2085
|
-
};
|
|
2086
|
-
const usePopover = (props) => {
|
|
2087
|
-
const { onFocus, onBlur, onBlurReference } = props;
|
|
2088
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
2089
|
-
const [minWidth, setMinWidth] = useState(void 0);
|
|
2090
|
-
const [wasEverOpen, setWasEverOpen] = useState(false);
|
|
2091
|
-
const {
|
|
2092
|
-
refs,
|
|
2093
|
-
floatingStyles,
|
|
2094
|
-
update,
|
|
2095
|
-
placement: actualPlacement
|
|
2096
|
-
} = useFloating({
|
|
2097
|
-
open: isOpen,
|
|
2098
|
-
placement: props.placement,
|
|
2099
|
-
middleware: [offset(props.offset ?? 8), flip(), shift()],
|
|
2100
|
-
whileElementsMounted: autoUpdate
|
|
2101
|
-
});
|
|
2102
|
-
const clickOutsideHandler = useRef(null);
|
|
2103
|
-
const hoverCloseTimeout = useRef(null);
|
|
2104
|
-
const hoverOffset = useMemo(
|
|
2105
|
-
() => props.hoverOffset ?? props.offset ?? DEFAULT_POPOVER_OFFSET,
|
|
2106
|
-
[props.hoverOffset, props.offset]
|
|
2107
|
-
);
|
|
2108
|
-
const hoverCloseDelay = useMemo(() => props.hoverCloseDelay ?? DEFAULT_POPOVER_CLOSE_DELAY, [props.hoverCloseDelay]);
|
|
2109
|
-
useEffect(() => {
|
|
2110
|
-
if (props.isDisabled) return;
|
|
2111
|
-
const refEl = refs.reference.current;
|
|
2112
|
-
if (!refEl) return;
|
|
2113
|
-
if ((props.mode === "click" || props.mode === "clickOpen") && refEl instanceof HTMLElement) {
|
|
2114
|
-
const handleClick = () => {
|
|
2115
|
-
if (props.mode === "click") {
|
|
2116
|
-
setIsOpen((prev) => !prev);
|
|
2117
|
-
} else if (props.mode === "clickOpen") {
|
|
2118
|
-
setIsOpen(true);
|
|
2119
|
-
}
|
|
2120
|
-
};
|
|
2121
|
-
refEl.addEventListener("click", handleClick);
|
|
2122
|
-
return () => {
|
|
2123
|
-
refEl.removeEventListener("click", handleClick);
|
|
2124
|
-
};
|
|
2125
|
-
} else if (props.mode === "hover" && refEl instanceof HTMLElement) {
|
|
2126
|
-
const handleMouseEnter = () => {
|
|
2127
|
-
setIsOpen(true);
|
|
2128
|
-
};
|
|
2129
|
-
const handleMouseLeave = () => {
|
|
2130
|
-
if (hoverCloseTimeout.current) clearTimeout(hoverCloseTimeout.current);
|
|
2131
|
-
hoverCloseTimeout.current = setTimeout(() => setIsOpen(false), hoverCloseDelay);
|
|
2132
|
-
};
|
|
2133
|
-
refEl.addEventListener("mouseenter", handleMouseEnter);
|
|
2134
|
-
refEl.addEventListener("mouseleave", handleMouseLeave);
|
|
2135
|
-
return () => {
|
|
2136
|
-
refEl.removeEventListener("mouseenter", handleMouseEnter);
|
|
2137
|
-
refEl.removeEventListener("mouseleave", handleMouseLeave);
|
|
2138
|
-
if (hoverCloseTimeout.current) clearTimeout(hoverCloseTimeout.current);
|
|
2139
|
-
};
|
|
2140
|
-
}
|
|
2141
|
-
}, [props.mode, refs.reference, hoverCloseDelay, props.isDisabled]);
|
|
2142
|
-
useEffect(() => {
|
|
2143
|
-
if (!isOpen || !refs.reference.current || !refs.floating.current || props.isDisabled) return;
|
|
2144
|
-
const cleanup = autoUpdate(refs.reference.current, refs.floating.current, update);
|
|
2145
|
-
return () => cleanup();
|
|
2146
|
-
}, [isOpen, refs.reference, refs.floating, update, props.isDisabled]);
|
|
2147
|
-
useEffect(() => {
|
|
2148
|
-
if (!isOpen || !refs.reference.current || !refs.floating.current || props.isDisabled) return;
|
|
2149
|
-
if (props.isClickOutside) {
|
|
2150
|
-
clickOutsideHandler.current = (e) => {
|
|
2151
|
-
const refEl = refs.reference.current;
|
|
2152
|
-
const floatingEl = refs.floating.current;
|
|
2153
|
-
const otherRefs = props.refsExcludeClickOutside || [];
|
|
2154
|
-
if (refEl instanceof HTMLElement && floatingEl instanceof HTMLElement && !refEl.contains(e.target) && !floatingEl.contains(e.target) && !otherRefs.some((ref) => {
|
|
2155
|
-
var _a;
|
|
2156
|
-
if (typeof ref === "object" && ref !== null && "current" in ref) {
|
|
2157
|
-
return (_a = ref.current) == null ? void 0 : _a.contains(e.target);
|
|
2158
|
-
}
|
|
2159
|
-
return false;
|
|
2160
|
-
})) {
|
|
2161
|
-
setIsOpen(false);
|
|
2162
|
-
}
|
|
2163
|
-
};
|
|
2164
|
-
document.addEventListener("mousedown", clickOutsideHandler.current);
|
|
2165
|
-
}
|
|
2166
|
-
return () => {
|
|
2167
|
-
if (clickOutsideHandler.current) {
|
|
2168
|
-
document.removeEventListener("mousedown", clickOutsideHandler.current);
|
|
2169
|
-
clickOutsideHandler.current = null;
|
|
2170
|
-
}
|
|
2171
|
-
if (hoverCloseTimeout.current) {
|
|
2172
|
-
clearTimeout(hoverCloseTimeout.current);
|
|
2173
|
-
}
|
|
2174
|
-
};
|
|
2175
|
-
}, [isOpen, refs.reference, refs.floating, props.isClickOutside, props.isDisabled, props.refsExcludeClickOutside]);
|
|
2176
|
-
useEffect(() => {
|
|
2177
|
-
if (!isOpen || !props.isFloatingHover || !refs.reference.current || !refs.floating.current || props.isDisabled)
|
|
2178
|
-
return;
|
|
2179
|
-
const refEl = refs.reference.current;
|
|
2180
|
-
const floatingEl = refs.floating.current;
|
|
2181
|
-
const handleMouseMove = (e) => {
|
|
2182
|
-
const mouseX = e.clientX;
|
|
2183
|
-
const mouseY = e.clientY;
|
|
2184
|
-
const refRect = refEl.getBoundingClientRect();
|
|
2185
|
-
const floatingRect = floatingEl.getBoundingClientRect();
|
|
2186
|
-
const isInsideRef = mouseX >= refRect.left - hoverOffset && mouseX <= refRect.right + hoverOffset && mouseY >= refRect.top - hoverOffset && mouseY <= refRect.bottom + hoverOffset;
|
|
2187
|
-
const isInsideFloating = mouseX >= floatingRect.left - hoverOffset && mouseX <= floatingRect.right + hoverOffset && mouseY >= floatingRect.top - hoverOffset && mouseY <= floatingRect.bottom + hoverOffset;
|
|
2188
|
-
if (isInsideRef || isInsideFloating) {
|
|
2189
|
-
if (hoverCloseTimeout.current) {
|
|
2190
|
-
clearTimeout(hoverCloseTimeout.current);
|
|
2191
|
-
hoverCloseTimeout.current = null;
|
|
2192
|
-
}
|
|
2193
|
-
} else {
|
|
2194
|
-
if (hoverCloseTimeout.current) clearTimeout(hoverCloseTimeout.current);
|
|
2195
|
-
hoverCloseTimeout.current = setTimeout(() => setIsOpen(false), hoverCloseDelay);
|
|
2196
|
-
}
|
|
2197
|
-
};
|
|
2198
|
-
document.addEventListener("mousemove", handleMouseMove);
|
|
2199
|
-
return () => {
|
|
2200
|
-
document.removeEventListener("mousemove", handleMouseMove);
|
|
2201
|
-
if (hoverCloseTimeout.current) {
|
|
2202
|
-
clearTimeout(hoverCloseTimeout.current);
|
|
2203
|
-
}
|
|
2204
|
-
};
|
|
2205
|
-
}, [isOpen, props.isFloatingHover, refs.reference, refs.floating, hoverOffset, hoverCloseDelay, props.isDisabled]);
|
|
2206
|
-
useLayoutEffect(() => {
|
|
2207
|
-
if (!props.isWidthAsContent || !refs.reference.current) return;
|
|
2208
|
-
const rect = refs.reference.current.getBoundingClientRect();
|
|
2209
|
-
setMinWidth(rect.width);
|
|
2210
|
-
}, [props.isWidthAsContent, refs.reference]);
|
|
2211
|
-
const open = useCallback(() => {
|
|
2212
|
-
if (props.isDisabled) return;
|
|
2213
|
-
setIsOpen(true);
|
|
2214
|
-
}, [props.isDisabled]);
|
|
2215
|
-
const close = useCallback(() => {
|
|
2216
|
-
if (props.isDisabled) return;
|
|
2217
|
-
setIsOpen(false);
|
|
2218
|
-
}, [props.isDisabled]);
|
|
2219
|
-
const toggle = useCallback(() => {
|
|
2220
|
-
if (props.isDisabled) return;
|
|
2221
|
-
setIsOpen((prev) => !prev);
|
|
2222
|
-
}, [props.isDisabled]);
|
|
2223
|
-
const combinedStyles = useMemo(() => {
|
|
2224
|
-
return {
|
|
2225
|
-
...floatingStyles,
|
|
2226
|
-
minWidth: props.isWidthAsContent && minWidth ? `${minWidth}px` : void 0,
|
|
2227
|
-
maxWidth: props.isWidthAsContent && minWidth ? `${minWidth}px` : void 0
|
|
2228
|
-
};
|
|
2229
|
-
}, [floatingStyles, props.isWidthAsContent, minWidth]);
|
|
2230
|
-
useEffect(() => {
|
|
2231
|
-
if (isOpen) {
|
|
2232
|
-
onFocus == null ? void 0 : onFocus();
|
|
2233
|
-
setWasEverOpen(true);
|
|
2234
|
-
}
|
|
2235
|
-
}, [isOpen, onFocus]);
|
|
2236
|
-
useEffect(() => {
|
|
2237
|
-
if (!isOpen && wasEverOpen) {
|
|
2238
|
-
onBlur == null ? void 0 : onBlur();
|
|
2239
|
-
}
|
|
2240
|
-
}, [isOpen, wasEverOpen, onBlur]);
|
|
2241
|
-
useEffect(() => {
|
|
2242
|
-
if (!isOpen || props.isDisabled) return;
|
|
2243
|
-
const handleFocusIn = (e) => {
|
|
2244
|
-
const refEl = refs.reference.current;
|
|
2245
|
-
const floatingEl = refs.floating.current;
|
|
2246
|
-
const otherRefs = props.refsExcludeClickOutside || [];
|
|
2247
|
-
const isInside = refEl instanceof HTMLElement && refEl.contains(e.target) || floatingEl instanceof HTMLElement && floatingEl.contains(e.target) || otherRefs.some((ref) => {
|
|
2248
|
-
if (ref && "current" in ref && ref.current && ref.current instanceof HTMLElement) {
|
|
2249
|
-
return ref.current.contains(e.target);
|
|
2250
|
-
}
|
|
2251
|
-
return false;
|
|
2252
|
-
});
|
|
2253
|
-
if (!isInside) {
|
|
2254
|
-
setIsOpen(false);
|
|
2255
|
-
}
|
|
2256
|
-
};
|
|
2257
|
-
document.addEventListener("focusin", handleFocusIn);
|
|
2258
|
-
return () => {
|
|
2259
|
-
document.removeEventListener("focusin", handleFocusIn);
|
|
2260
|
-
};
|
|
2261
|
-
}, [isOpen, refs.reference, refs.floating, props.refsExcludeClickOutside, props.isDisabled]);
|
|
2262
|
-
useEffect(() => {
|
|
2263
|
-
if (!refs.reference.current || props.isDisabled || !onBlurReference) return;
|
|
2264
|
-
const refEl = refs.reference.current;
|
|
2265
|
-
const otherRefs = props.refsExcludeBlur || [];
|
|
2266
|
-
const handleBlur = (e) => {
|
|
2267
|
-
if (refEl instanceof HTMLElement && !refEl.contains(e.relatedTarget) && !otherRefs.some((ref) => {
|
|
2268
|
-
if (ref && "current" in ref && ref.current && ref.current instanceof HTMLElement)
|
|
2269
|
-
return ref.current.contains(e.relatedTarget);
|
|
2270
|
-
})) {
|
|
2271
|
-
onBlurReference();
|
|
2272
|
-
}
|
|
2273
|
-
};
|
|
2274
|
-
if (refEl instanceof HTMLElement) refEl.addEventListener("blur", handleBlur, true);
|
|
2275
|
-
return () => {
|
|
2276
|
-
if (refEl instanceof HTMLElement) refEl.removeEventListener("blur", handleBlur, true);
|
|
2277
|
-
};
|
|
2278
|
-
}, [refs.reference, props.isDisabled, onBlurReference, props.refsExcludeBlur]);
|
|
2279
|
-
const getIsInside = useCallback(
|
|
2280
|
-
(target) => {
|
|
2281
|
-
if (!target) return false;
|
|
2282
|
-
const refEl = refs.reference.current;
|
|
2283
|
-
const floatingEl = refs.floating.current;
|
|
2284
|
-
const otherRefs = props.refsExcludeBlur || [];
|
|
2285
|
-
return refEl instanceof HTMLElement && refEl.contains(target) || floatingEl instanceof HTMLElement && floatingEl.contains(target) || otherRefs.some((ref) => {
|
|
2286
|
-
if (ref && "current" in ref && ref.current && ref.current instanceof HTMLElement) {
|
|
2287
|
-
return ref.current.contains(target);
|
|
2288
|
-
}
|
|
2289
|
-
return false;
|
|
2290
|
-
});
|
|
2291
|
-
},
|
|
2292
|
-
[refs.reference, refs.floating, props.refsExcludeBlur]
|
|
2293
|
-
);
|
|
2294
|
-
return {
|
|
2295
|
-
getIsInside,
|
|
2296
|
-
isOpen,
|
|
2297
|
-
setIsOpen,
|
|
2298
|
-
open,
|
|
2299
|
-
close,
|
|
2300
|
-
toggle,
|
|
2301
|
-
refReference: refs.setReference,
|
|
2302
|
-
refFloating: refs.setFloating,
|
|
2303
|
-
floatingStyles: combinedStyles,
|
|
2304
|
-
placement: actualPlacement
|
|
2305
|
-
};
|
|
2306
|
-
};
|
|
2307
|
-
const addPopoverGenre = css`
|
|
2308
|
-
${(props) => css`
|
|
2309
|
-
background: ${props.theme.colors.button[props.$genre].background.rest};
|
|
2310
|
-
border-color: ${props.theme.colors.button[props.$genre].border.rest};
|
|
2311
|
-
color: ${props.theme.colors.button[props.$genre].color.rest};
|
|
2312
|
-
/* box-shadow: ${props.theme.effects.button}; */
|
|
2313
|
-
`};
|
|
2314
|
-
`;
|
|
2315
|
-
const addPopoverSize = css`
|
|
2316
|
-
${(props) => addPopoverSizeConstructor({
|
|
2317
|
-
...KEY_SIZE_DATA[props.$size ?? "medium"]
|
|
2318
|
-
})};
|
|
2319
|
-
`;
|
|
2320
|
-
const addPopoverSizeConstructor = (props) => css`
|
|
2321
|
-
display: flex;
|
|
2322
|
-
border-radius: ${props.radius}px;
|
|
2323
|
-
padding: ${props.padding}px;
|
|
2324
|
-
gap: ${props.padding - 2}px;
|
|
2325
|
-
${(params) => getFontSizeStyles(props.font, 500, params.theme.font.family)};
|
|
2326
|
-
`;
|
|
2327
|
-
const PopoverWrapper = styled(motion.div)`
|
|
2328
|
-
max-width: ${(props) => props.$maxWidth || "100%"};
|
|
2329
|
-
max-height: ${(props) => props.$maxHeight || "100%"};
|
|
2330
|
-
overflow: auto;
|
|
2331
|
-
flex-direction: column;
|
|
2332
|
-
${addPopoverSize};
|
|
2333
|
-
${addAlwaysOutline};
|
|
2334
|
-
${addSXTypography};
|
|
2335
|
-
${addPopoverGenre};
|
|
2336
|
-
${addSX};
|
|
2337
|
-
`;
|
|
2338
|
-
const DEFAULT_POPOVER_OFFSET = 8;
|
|
2339
|
-
const DEFAULT_POPOVER_CLOSE_DELAY = 100;
|
|
2340
|
-
const TooltipContainer = styled(Stack)`
|
|
2341
|
-
display: flex;
|
|
2342
|
-
width: fit-content;
|
|
2343
|
-
height: fit-content;
|
|
2344
|
-
`;
|
|
2345
|
-
const addTooltipBoxSize = css`
|
|
2346
|
-
${(props) => addTooltipBoxSizeConstructor({
|
|
2347
|
-
...KEY_SIZE_DATA[props.size ?? "medium"]
|
|
2348
|
-
})};
|
|
2349
|
-
`;
|
|
2350
|
-
const addTooltipBoxSizeConstructor = (props) => css`
|
|
2351
|
-
gap: 0px;
|
|
2352
|
-
padding: ${props.padding}px ${props.padding}px 0px ${props.padding}px;
|
|
2353
|
-
:after {
|
|
2354
|
-
content: '';
|
|
2355
|
-
display: block;
|
|
2356
|
-
height: ${props.padding}px;
|
|
2357
|
-
width: 100%;
|
|
2358
|
-
}
|
|
2359
|
-
`;
|
|
2360
|
-
const TooltipBox = styled(Popover)`
|
|
2361
|
-
${addTooltipBoxSize};
|
|
2362
|
-
`;
|
|
2363
|
-
const Tooltip = memo((props) => {
|
|
2364
|
-
if (props.isDisabled) return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: props.children });
|
|
2365
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { ...props });
|
|
2366
|
-
});
|
|
2367
|
-
const TooltipContent = (props) => {
|
|
2368
|
-
const { isOpen, refReference, refFloating, floatingStyles } = usePopover({
|
|
2369
|
-
placement: props.placement ?? DEFAULT_TOOLTIP_PLACEMENT_FALLBACK,
|
|
2370
|
-
offset: props.offset ?? DEFAULT_TOOLTIP_OFFSET_FALLBACK,
|
|
2371
|
-
mode: props.mode ?? "hover",
|
|
2372
|
-
isClickOutside: props.isClickOutside ?? true,
|
|
2373
|
-
isFloatingHover: props.isFloatingHover ?? true,
|
|
2374
|
-
isWidthAsContent: props.isWidthAsContent ?? false,
|
|
2375
|
-
hoverCloseDelay: props.hoverCloseDelay ?? void 0,
|
|
2376
|
-
hoverOffset: props.hoverOffset ?? void 0
|
|
2377
|
-
});
|
|
2378
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
2379
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContainer, { sx: props.sx, ref: refReference, children: props.children }),
|
|
2380
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2381
|
-
TooltipBox,
|
|
2382
|
-
{
|
|
2383
|
-
size: props.size,
|
|
2384
|
-
isOpen,
|
|
2385
|
-
genre: props.genre,
|
|
2386
|
-
floatingStyles,
|
|
2387
|
-
ref: refFloating,
|
|
2388
|
-
maxHeight: props.maxHeight,
|
|
2389
|
-
maxWidth: props.maxWidth,
|
|
2390
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2391
|
-
Typography,
|
|
2392
|
-
{
|
|
2393
|
-
sx: props.sxTypography ?? {
|
|
2394
|
-
default: {
|
|
2395
|
-
size: 14
|
|
2396
|
-
}
|
|
2397
|
-
},
|
|
2398
|
-
children: props.content
|
|
2399
|
-
}
|
|
2400
|
-
)
|
|
2401
|
-
}
|
|
2402
|
-
)
|
|
2403
|
-
] });
|
|
2404
|
-
};
|
|
2405
|
-
Tooltip.displayName = "Tooltip";
|
|
2406
|
-
const DEFAULT_TOOLTIP_PLACEMENT_FALLBACK = "bottom-start";
|
|
2407
|
-
const DEFAULT_TOOLTIP_OFFSET_FALLBACK = 8;
|
|
2408
|
-
const TypographyWithRef = (props) => {
|
|
2409
|
-
const { screenActual } = useScreenWidth();
|
|
2410
|
-
const cssProps = useMemo(
|
|
2411
|
-
() => ({
|
|
2412
|
-
$sxTypography: props.sx,
|
|
2413
|
-
style: props.style,
|
|
2414
|
-
className: props.className,
|
|
2415
|
-
$sx: props.sxStandard,
|
|
2416
|
-
onClick: props.onClick ? props.onClick : () => {
|
|
2417
|
-
}
|
|
2418
|
-
}),
|
|
2419
|
-
[props.sx, props.style, props.className, props.sxStandard, props.onClick]
|
|
2420
|
-
);
|
|
2421
|
-
const screenSX = useMemo(() => {
|
|
2422
|
-
var _a, _b;
|
|
2423
|
-
return ((_a = props.sx) == null ? void 0 : _a[screenActual]) ?? ((_b = props.sx) == null ? void 0 : _b.default);
|
|
2424
|
-
}, [props.sx, screenActual]);
|
|
2425
|
-
if (screenSX && "variant" in screenSX) {
|
|
2426
|
-
if (screenSX.variant === "h7" || screenSX.variant === "h8" || screenSX.variant === "h9") {
|
|
2427
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2428
|
-
Title,
|
|
2429
|
-
{
|
|
2430
|
-
ref: props.ref,
|
|
2431
|
-
as: props.isAnchor ? "a" : props.isParagraph ? "p" : props.isSpan ? "span" : "span",
|
|
2432
|
-
href: props.href,
|
|
2433
|
-
...cssProps,
|
|
2434
|
-
children: props.children
|
|
2435
|
-
}
|
|
2436
|
-
);
|
|
2437
|
-
} else {
|
|
2438
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2439
|
-
Title,
|
|
2440
|
-
{
|
|
2441
|
-
ref: props.ref,
|
|
2442
|
-
as: props.isAnchor ? "a" : props.isParagraph ? "p" : props.isSpan ? "span" : screenSX.variant,
|
|
2443
|
-
href: props.href,
|
|
2444
|
-
...cssProps,
|
|
2445
|
-
children: props.children
|
|
2446
|
-
}
|
|
2447
|
-
);
|
|
2448
|
-
}
|
|
2449
|
-
}
|
|
2450
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2451
|
-
Title,
|
|
2452
|
-
{
|
|
2453
|
-
ref: props.ref,
|
|
2454
|
-
as: props.isAnchor ? "a" : props.isParagraph ? "p" : props.isSpan ? "span" : "span",
|
|
2455
|
-
href: props.href,
|
|
2456
|
-
...cssProps,
|
|
2457
|
-
children: props.children
|
|
2458
|
-
}
|
|
2459
|
-
);
|
|
2460
|
-
};
|
|
2461
|
-
const Typography = (props) => {
|
|
2462
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyWithRef, { ...props });
|
|
2463
|
-
};
|
|
2464
|
-
const TypographySizeIsAnchor = (props) => {
|
|
2465
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyWithRef, { isAnchor: true, ...props, ref: props.ref, href: props.href });
|
|
2466
|
-
};
|
|
2467
|
-
const TypographyLink = createLink(TypographySizeIsAnchor);
|
|
2468
|
-
const TypographyTooltip = memo((props) => {
|
|
2469
|
-
const [isOverflowing, setIsOverflowing] = useState(false);
|
|
2470
|
-
const contentRef = useRef(null);
|
|
2471
|
-
useEffect(() => {
|
|
2472
|
-
const checkOverflow = () => {
|
|
2473
|
-
if (contentRef.current) {
|
|
2474
|
-
setIsOverflowing(contentRef.current.scrollWidth > contentRef.current.clientWidth);
|
|
2475
|
-
}
|
|
2476
|
-
};
|
|
2477
|
-
checkOverflow();
|
|
2478
|
-
window.addEventListener("resize", checkOverflow);
|
|
2479
|
-
return () => window.removeEventListener("resize", checkOverflow);
|
|
2480
|
-
}, [props.children]);
|
|
2481
|
-
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 }) });
|
|
2482
|
-
});
|
|
2483
|
-
TypographyTooltip.displayName = "TypographyTooltip";
|
|
2484
|
-
TypographyWithRef.displayName = "TypographyWithRef";
|
|
2485
|
-
TypographySizeIsAnchor.displayName = "TypographySizeIsAnchor";
|
|
2486
1810
|
export {
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
Tooltip as d,
|
|
2494
|
-
TooltipContent as e,
|
|
2495
|
-
DEFAULT_TOOLTIP_OFFSET_FALLBACK as f,
|
|
2496
|
-
getFontSizeStyles as g,
|
|
2497
|
-
addSXTypography as h,
|
|
2498
|
-
Title as i,
|
|
2499
|
-
Typography as j,
|
|
2500
|
-
TypographyLink as k,
|
|
2501
|
-
TypographyTooltip as l,
|
|
2502
|
-
useMergeRefs as m,
|
|
2503
|
-
usePopover as u
|
|
1811
|
+
useFloating as a,
|
|
1812
|
+
autoUpdate as b,
|
|
1813
|
+
flip as f,
|
|
1814
|
+
offset as o,
|
|
1815
|
+
shift as s,
|
|
1816
|
+
useMergeRefs as u
|
|
2504
1817
|
};
|
|
2505
|
-
//# sourceMappingURL=
|
|
1818
|
+
//# sourceMappingURL=floating-ui.react-Byi6bLb1.js.map
|